You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
5.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. import { createAPI } from '@/utils/httpRequest.js'
  2. export const searchInspectionRequestHeaderList = (data) => createAPI(`/inspection/searchInspectionRequestHeaderList`, 'post', data)
  3. // 待验货申请单查询:条件与上面一致,但不区分 planner
  4. export const searchInspectionRequestHeaderListIgnorePlanner = (data) => createAPI(`/inspection/searchInspectionRequestHeaderListIgnorePlanner`, 'post', data)
  5. export const getInspectionRequestDetailList = (data) => createAPI(`/inspection/getInspectionRequestDetailList`, 'post', data)
  6. export const getInspectionRequestDetailSubList = (data) => createAPI(`/inspection/getInspectionRequestDetailSubList`, 'post', data)
  7. export const getInspectionResultList = (data) => createAPI(`/inspection/getInspectionResultList`, 'post', data)
  8. // 查询可申请验货PO
  9. export const queryPoPage = (data) => createAPI(`/inspection/queryPoPage`, 'post', data)
  10. // 查询可申请验货PO(排除已存在的PO明细)
  11. export const queryPoPageExclude = (data) => createAPI(`/inspection/queryPoPageExclude`, 'post', data)
  12. // 查询可申请验货供应商(按PO明细聚合)
  13. export const queryPoSupplierPage = (data) => createAPI(`/inspection/queryPoSupplierPage`, 'post', data)
  14. // 从订单选择供应商专用分页查询
  15. export const queryPoSupplierOrderPage = (data) => createAPI(`/inspection/queryPoSupplierOrderPage`, 'post', data)
  16. // 保存验货申请
  17. export const saveInspectionRequest = (data) => createAPI(`/inspection/save`, 'post', data)
  18. // 删除验货申请
  19. export const deleteInspectionRequest = (requestNo) => createAPI(`/inspection/delete/${requestNo}`, 'post')
  20. // 确认验货申请
  21. export const confirmInspectionRequest = (requestNo) => createAPI(`/inspection/confirm/${requestNo}`, 'post')
  22. // 下载验货申请导入模板
  23. export const downloadTemplate = () => createAPI(`/inspection/downloadTemplate`, 'get', {}, { responseType: 'blob' })
  24. // 预览上传的Excel数据
  25. export const previewUpload = (file) => {
  26. const formData = new FormData()
  27. formData.append('file', file)
  28. return createAPI(`/inspection/previewUpload`, 'post', formData)
  29. }
  30. // 批量保存上传的数据
  31. export const batchSave = (file) => {
  32. const formData = new FormData()
  33. formData.append('file', file)
  34. return createAPI(`/inspection/batchSave`, 'post', formData)
  35. }
  36. // 审核验货申请
  37. export const auditInspectionRequest = (requestNo) => createAPI(`/inspection/audit/${requestNo}`, 'post')
  38. // 申请变更验货申请
  39. export const applyChangeInspectionRequest = (requestNo, data) => createAPI(`/inspection/applyChange/${requestNo}`, 'post', data || {})
  40. // 变更审批(APPROVE/REJECT)
  41. export const auditChangeInspectionRequest = (data) => createAPI(`/inspection/auditChange`, 'post', data)
  42. // 验货排程(支持单个和批量)
  43. export const scheduleInspectionRequest = (data) => createAPI(`/inspection/schedule`, 'post', data)
  44. // 查询QC人员列表
  45. export const getQcPersonList = (data) => createAPI(`/inspection/getQcPersonList`, 'post', data)
  46. // 查询排程视图
  47. export const getScheduleView = (qcOperator, startDate, site) => {
  48. const params = [`qcOperator=${encodeURIComponent(qcOperator || '')}`]
  49. if (startDate) {
  50. params.push(`startDate=${encodeURIComponent(startDate)}`)
  51. }
  52. if (site) {
  53. params.push(`site=${encodeURIComponent(site)}`)
  54. }
  55. return createAPI(`/inspection/scheduleView?${params.join('&')}`, 'get')
  56. }
  57. // 修改验货申请(仅允许修改建议验货日期、验货地址和联系人)
  58. export const updateInspectionRequest = (data) => createAPI(`/inspection/update`, 'post', data)
  59. // 查询我的验货清单
  60. export const getMyInspectionList = (data) => createAPI(`/inspection/getMyInspectionList`, 'post', data)
  61. // 我的验货清单删除明细(仅已排程/验货中状态,一并删除关联IQC检验单)
  62. export const deleteMyInspectionDetail = (data) => createAPI(`/inspection/deleteMyInspectionDetail`, 'post', data)
  63. // 我的验货清单修改验货数量(仅已排程且未创建IQC检验单时可用)
  64. export const updateMyInspectionQty = (data) => createAPI(`/inspection/updateMyInspectionQty`, 'post', data)
  65. // 创建IQC检验单
  66. export const createIqc = (data) => createAPI(`/qms/qc/createIqc`, 'post', data)
  67. // 开始验货
  68. export const startInspection = (data) => createAPI(`/inspection/startInspection`, 'post', data)
  69. // 导出验货申请单(后端生成带边框样式的Excel)
  70. export const exportInspectionRequest = (requestNo, site) => createAPI(`/inspection/export/${requestNo}`, 'get', { site: site }, 'download')
  71. // 新增验货申请明细
  72. export const addInspectionDetails = (data) => createAPI(`/inspection/addDetails`, 'post', data)
  73. // 编辑验货申请明细
  74. export const editInspectionDetails = (data) => createAPI(`/inspection/editDetails`, 'post', data)
  75. // 删除验货申请明细
  76. export const deleteInspectionDetails = (data) => createAPI(`/inspection/deleteDetails`, 'post', data)
  77. // 草稿编辑保存(合并删除/修改/新增/更新基础信息)
  78. export const editSaveInspectionRequest = (data) => createAPI(`/inspection/editSave`, 'post', data)