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

export default class MaterialManagementService {
  list (param) {
    return request({
      url: prefix + '/material/management/list',
      method: 'get',
      params: param
    })
  }
  save (param) {
    return request({
      url: prefix + '/material/management/save',
      method: 'post',
      data: param
    })
  }
  findById (id) {
    return request({
      url: prefix + '/material/management/findById',
      method: 'get',
      params: {id: id}
    })
  }
  remove (id) {
    return request({
      url: prefix + '/material/management/remove',
      method: 'get',
      params: {id: id}
    })
  }
  updateStatusById (param) {
    return request({
      url: prefix + '/material/management/updateStatusById',
      method: 'post',
      data: param
    })
  }
  exportFile (params) {
    return request({
      url: prefix + '/reimbursementApproval/info/exportFile',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
  findTradeByTypeId (typeId) {
    return request({
      url: prefix + '/material/management/findTradeByTypeId',
      method: 'get',
      params: {typeId: typeId}
    })
  }
}
