import request from "../../common/request"
import { PUBLIC_MODULES_PATH as prefix } from "@/api/AppPath";

export default {
  updateStatusById: function (param) {
    return request({
      url: prefix + '/material/collect/updateStatusById',
      method: 'post',
      data: param
    })
  },
  remove: function (id) {
    return request({
      url: prefix + '/material/collect/remove',
      method: 'get',
      params: {id: id}
    })
  },
  save: function (param) {
    return request({
      url: prefix + '/material/collect/save',
      method: 'post',
      data: param
    })
  },
  findById: function (id) {
    return request({
      url: prefix + '/material/collect/findById',
      method: 'get',
      params: {id: id}
    })
  },
  list: function (param) {
    return request({
      url: prefix + '/material/collect/list',
      method: 'get',
      params: param
    })
  },
  wareHouseList: function (params) {
    return request({
      url: prefix + '/material/collect/wareHouseList',
      method: 'get',
      params: params
    })
  },
  createReturnData: function (param) {
    return request({
      url: prefix + '/material/collect/createReturnData',
      method: 'post',
      data: param
    })
  },
  saveReturn: function (param) {
    return request({
      url: prefix + '/material/collect/saveReturn',
      method: 'post',
      data: param
    })
  },
  saveReturnAgree: function (param) {
    return request({
      url: prefix + '/material/collect/saveReturnAgree',
      method: 'post',
      data: param
    })
  },
  updateStatusByIdReturn: function (param) {
    return request({
      url: prefix + '/material/collect/updateStatusByIdReturn',
      method: 'post',
      data: param
    })
  },
  findByReturnId: function (id) {
    return request({
      url: prefix + '/material/collect/findByReturnId',
      method: 'get',
      params: {returnId: id}
    })
  },
  returnRequest: function (param) {
    return request({
      url: prefix + '/material/collect/returnRequest',
      method: 'post',
      data: param
    })
  },
  findHiById: function (id) {
    return request({
      url: prefix + '/material/collect/findHiById',
      method: 'get',
      params: {collectId: id}
    })
  },
  findHiByHiId: function (id) {
    return request({
      url: prefix + '/material/collect/findHiByHiId',
      method: 'get',
      params: {id: id}
    })
  },
  findLastHiByid: function (id) {
    return request({
      url: prefix + '/material/collect/findLastHiByid',
      method: 'get',
      params: {collectId: id}
    })
  }
}
