import request from "@/utils/httpRequest";
import { PUBLIC_MODULES_PATH as prefix } from "../AppPath";

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