diff --git a/src/api/wms/repleinshJobMain/index.ts b/src/api/wms/repleinshJobMain/index.ts index edeb47b21..7be585cda 100644 --- a/src/api/wms/repleinshJobMain/index.ts +++ b/src/api/wms/repleinshJobMain/index.ts @@ -72,10 +72,35 @@ export const deleteRepleinshJobMain = async (id: number) => { // 导出补料任务主 Excel export const exportRepleinshJobMain = async (params) => { - return await request.download({ url: `/wms/repleinsh-job-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/repleinsh-job-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/repleinsh-job-main/export-excel`, params }) + } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/repleinsh-job-main/get-import-template' }) +} + +// 承接发料任务 +export const acceptRepleinshMain = async (id) => { + return await request.put({ url: `/wms/repleinsh-job-main/accept?id=` + id }) +} + +// 放弃发料任务 +export const abandonRepleinshMain = async (id) => { + return await request.put({ url: `/wms/repleinsh-job-main/abandon?id=` + id }) +} + +// 关闭发料任务 +export const closeRepleinshMain = async (id) => { + return await request.put({ url: `/wms/repleinsh-job-main/close?id=` + id }) +} + +// 执行发料任务 +export const executeRepleinshMain = async (data) => { + return await request.put({ url: `/wms/repleinsh-job-main/execute`, data}) } \ No newline at end of file diff --git a/src/views/wms/issueManage/issue/issueJobMain/index.vue b/src/views/wms/issueManage/issue/issueJobMain/index.vue index 80c650e4c..a2a7dbbdc 100644 --- a/src/views/wms/issueManage/issue/issueJobMain/index.vue +++ b/src/views/wms/issueManage/issue/issueJobMain/index.vue @@ -168,7 +168,6 @@ const butttondata = (row) => { // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { - console.log(170, val) if (val == 'mainJobExe') { // 执行 let aaa = { id: '1809190000221670786', diff --git a/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue index 7d5071ed9..05e9fc7c7 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue @@ -103,29 +103,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 - //row[formField] = val[0][searchField] - //row['poLine'] = val[0]['poLine'] - //row['batch'] = val[0]['toBatch'] - //row['altBatch'] = val[0]['altBatch'] - //row['itemCode'] = val[0]['itemCode'] - //row['itemName'] = val[0]['itemName'] - //row['itemDesc1'] = val[0]['itemDesc1'] - //row['itemDesc2'] = val[0]['itemDesc2'] - //row['projectCode'] = val[0]['projectCode'] - //row['qty'] = val[0]['qty'] - //row['uom'] = val[0]['uom'] + row[formField] = val[0][searchField] } else { const setV = {} setV[formField] = val[0][searchField] - //setV['ppNumber'] = val[0]['ppNumber'] - //setV['supplierCode'] = val[0]['supplierCode'] formRef.setValues(setV) } }) } -// 子表新增的时候选择表格之后需要会显得字段 -// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] -const Echo = [] const { tableObject, tableMethods } = useTable({ getListApi: RepleinshJobMainApi.getRepleinshJobMainPage // 分页接口 @@ -177,20 +162,139 @@ const butttondata = (row) => { defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 - // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 + defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 ] } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'mainJobExe') { // 执行 - console.log('列表-操作按钮事件-执行') + let aaa = { + "id": "1809180001854123375", + "requestNumber": "REQ2020231128-0002", + "requestTime": null, + "requestDueTime": 1701014400000, + "status": "1", + "expiredTime": null, + "updateTime": 1701151187000, + "updater": "1", + "jobStageStatus": null, + "priority": null, + "priorityIncrement": null, + "departmentCode": null, + "acceptUserId": "1", + "acceptTime": 1701159181000, + "completeUserId": null, + "completeTime": null, + "fromLocationTypes": "RAW,SEMI", + "toLocationTypes": "WIP", + "number": "JOB0720231128-0001", + "businessType": "Repleinment", + "remark": null, + "createTime": 1701151187000, + "creator": "1", + "fromWarehouseCode": null, + "toWarehouseCode": null, + "fromAreaCodes": "", + "toAreaCodes": "", + "autoComplete": "FALSE", + "allowModifyLocation": "TRUE", + "allowModifyQty": "TRUE", + "allowBiggerQty": "TRUE", + "allowSmallerQty": "TRUE", + "allowModifyInventoryStatus": "TRUE", + "allowContinuousScanning": "TRUE", + "allowPartialComplete": "TRUE", + "allowModifyBatch": "FALSE", + "allowModifyPackingNumber": "FALSE", + subList: [ + { + "id": "1809180000559485683", + "packingNumber": "12", + "containerNumber": "001", + "batch": "21", + "inventoryStatus": "OK", + "fromLocationCode": "H03", + "toLocationCode": "WIP", + "itemCode": "item01", + "itemName": "物品01", + "itemDesc1": "", + "itemDesc2": "", + "projectCode": "xm01", + "qty": 110, + "uom": "EA", + "number": "JOB0720231128-0001", + "remark": null, + "createTime": 1701151187000, + "creator": "1", + "fromOwnerCode": null, + "toOwnerCode": null, + recordLst: [{ + handleQty: 10, + toPackingNumber: '12', + toContainerNumber: '001', + toBatch: '21', + toInventoryStatus: 'OK', + toLocationCode: 'H03', + supplierCode: '31213', + },{ + handleQty: 20, + toPackingNumber: 'M20230421000005', + toContainerNumber: '001', + toBatch: '20230808', + toInventoryStatus: 'OK', + toLocationCode: 'SFG', + supplierCode: '31213', + }] + }, + { + "id": "1809180000559485682", + "packingNumber": "P20230427000027", + "containerNumber": "001", + "batch": "20230427", + "inventoryStatus": "OK", + "fromLocationCode": "INSPECT", + "toLocationCode": "WIP", + "itemCode": "item01", + "itemName": "物品01", + "itemDesc1": "", + "itemDesc2": "", + "projectCode": "xm01", + "qty": 110, + "uom": "EA", + "number": "JOB0720231128-0001", + "remark": null, + "createTime": 1701151187000, + "creator": "1", + "fromOwnerCode": null, + "toOwnerCode": null, + recordLst: [{ + handleQty: 30, + toPackingNumber: '12', + toContainerNumber: '001', + toBatch: '21', + toInventoryStatus: 'OK', + toLocationCode: 'H03', + supplierCode: '31213', + },{ + handleQty: 40, + toPackingNumber: 'M20230421000005', + toContainerNumber: '001', + toBatch: '20230808', + toInventoryStatus: 'OK', + toLocationCode: 'SFG', + supplierCode: '31213', + }] + } +] +} + RepleinshJobMainApi.executeRepleinshMain(aaa) } else if (val == 'mainJobAba') { // 放弃 - console.log('列表-操作按钮事件-放弃') + RepleinshJobMainApi.abandonRepleinshMain(row.id) } else if (val == 'mainJobClo') { // 关闭 - console.log('列表-操作按钮事件-关闭') + RepleinshJobMainApi.closeRepleinshMain(row.id) } else if (val == 'mainJobAcc') { // 承接 - console.log('列表-操作按钮事件-承接') + RepleinshJobMainApi.acceptRepleinshMain(row.id) } } @@ -208,8 +312,8 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await RepleinshJobMainApi.exportRepleinshJobMain(setSearchParams) - download.excel(data, '补料任务主.xlsx') + const data = await RepleinshJobMainApi.exportRepleinshJobMain(tableObject.params) + download.excel(data, '补料任务.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts b/src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts index 44256e19e..1e4abbac8 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts +++ b/src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts @@ -62,14 +62,6 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ } }, }, - { - label: '状态', - field: 'jobStageStatus', - sort: 'custom', - table: { - width: 150 - }, - }, { label: '过期时间', field: 'expiredTime', @@ -507,16 +499,16 @@ export const RepleinshJobMain = useCrudSchemas(reactive([ } } }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width: 120, - fixed: 'right' - }, - } + // { + // label: '操作', + // field: 'action', + // isDetail: false, + // isForm: false, + // table: { + // width: 120, + // fixed: 'right' + // }, + // } ])) //表单校验 @@ -545,9 +537,6 @@ export const RepleinshJobMainRules = reactive({ status: [ { required: true, message: '请选择状态', trigger: 'change' } ], - jobStageStatus: [ - { required: true, message: '请选择阶段状态', trigger: 'change' } - ], priority: [ { required: true, message: '请输入优先级', trigger: 'blur' } ], diff --git a/src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts b/src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts index cd25401b8..a0103e0dc 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts +++ b/src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts @@ -192,14 +192,6 @@ export const RepleinshRecordMain = useCrudSchemas(reactive([ } }, }, - { - label: '代码', - field: 'code', - sort: 'custom', - table: { - width: 150 - }, - }, { label: '从仓库代码', field: 'fromWarehouseCode', @@ -545,14 +537,6 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '代码', - field: 'code', - sort: 'custom', - table: { - width: 150 - }, - }, { label: '接口类型', field: 'interfaceType', @@ -564,14 +548,6 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '任务明细ID', - field: 'jobDetailId', - sort: 'custom', - table: { - width: 150 - }, - }, { label: '从器具号', field: 'fromContainerNumber', diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue index 2ca16dcce..8d0749514 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue @@ -275,7 +275,7 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(setSearchParams) + const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(tableObject.params) download.excel(data, '补料申请.xlsx') } catch { } finally {