import request from '@/utils/httpRequest'

export default class WareHouseService {
  list (params) {
    return request({
      url: '/material/management/wareHouse/list',
      method: 'get',
      params: params
    })
  }
  wareHouseList (param) {
    return request({
      url: '/material/management/wareHouse/wareHouseList',
      method: 'get',
      params: param
    })
  }
  wareHouseHistoryList (param) {
    return request({
      url: '/material/management/wareHouse/wareHouseHistoryList',
      method: 'get',
      params: param
    })
  }
  collectHistoryList (param) {
    return request({
      url: '/material/management/wareHouse/collectHistoryList',
      method: 'get',
      params: param
    })
  }
  wareHouseSummaryList (param) {
    return request({
      url: '/material/management/wareHouse/wareHouseSummaryList',
      method: 'get',
      params: param
    })
  }
  wareHouseSummaryList2 (param) {
    return request({
      url: '/material/management/wareHouse/wareHouseSummaryList2',
      method: 'get',
      params: param
    })
  }
  save (param) {
    return request({
      url: '/material/management/wareHouse/save',
      method: 'post',
      data: param
    })
  }
  findById (id) {
    return request({
      url: '/material/management/wareHouse/findById',
      method: 'get',
      params: {id: id}
    })
  }
  remove (id) {
    return request({
      url: '/material/management/wareHouse/remove',
      method: 'get',
      params: {id: id}
    })
  }
  findRequestId (purchaseNo) {
    return request({
      url: '/material/management/wareHouse/findRequestId',
      method: 'get',
      params: {purchaseNo: purchaseNo}
    })
  }
  updateStatusById (data) {
    return request({
      url: '/material/management/wareHouse/updateStatusById',
      method: 'post',
      data: data
    })
  }
}
