diff --git a/src/api/wms/productreceiptJobMain/index.ts b/src/api/wms/productreceiptJobMain/index.ts index cff1dd556..b22dae6b4 100644 --- a/src/api/wms/productreceiptJobMain/index.ts +++ b/src/api/wms/productreceiptJobMain/index.ts @@ -75,10 +75,35 @@ export const deleteProductreceiptJobMain = async (id: number) => { // 导出制品收货任务主 Excel export const exportProductreceiptJobMain = async (params) => { - return await request.download({ url: `/wms/productreceipt-job-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productreceipt-job-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productreceipt-job-main/export-excel`, params }) + } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/productreceipt-job-main/get-import-template' }) +} + +// 承接发料任务 +export const acceptProductreceiptMain = async (id) => { + return await request.put({ url: `/wms/productreceipt-job-main/accept?id=` + id }) +} + +// 放弃发料任务 +export const abandonProductreceiptMain = async (id) => { + return await request.put({ url: `/wms/productreceipt-job-main/abandon?id=` + id }) +} + +// 关闭发料任务 +export const closeProductreceiptMain = async (id) => { + return await request.put({ url: `/wms/productreceipt-job-main/close?id=` + id }) +} + +// 执行发料任务 +export const executeProductreceiptMain = async (data) => { + return await request.put({ url: `/wms/productreceipt-job-main/execute`, data}) } \ No newline at end of file diff --git a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue index 97ccbb965..cdc3167ab 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue @@ -90,12 +90,6 @@ const updataTableColumns = (val) => { // 查询列表页面参数设置 const searchTableParams = ref([ -//{ -// formField: 'productItemCode', -// searchTableTitle: '物料信息', -// searchTableAllSchemas: Itembasic.allSchemas, -// searchTablePage: ItembasicApi.getItembasicPage -//} ]) // 查询页面返回 @@ -103,29 +97,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: ProductreceiptJobMainApi.getProductreceiptJobMainPage // 分页接口 @@ -177,20 +156,101 @@ 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": "1809190001478278226", + "requestNumber": "REC4620231212-0011", + "productionPlanNumber": "WP20231212-0002", + "workShopCode": "work2", + "team": "7", + "shift": "8", + "details": null, + "requestTime": 1702376849000, + "requestDueTime": null, + "status": "2", + "expiredTime": null, + "updateTime": 1702376904000, + "updater": "超级管理员", + "jobStageStatus": null, + "priority": null, + "priorityIncrement": null, + "departmentCode": "103", + "acceptUserId": "1", + "acceptTime": 1702376913000, + "completeUserId": "1", + "completeTime": 1702377036000, + "toWarehouseCode": null, + "toAreaCodes": "", + "fromLocationTypes": "WIP", + "toLocationTypes": "WIP", + "number": "JOB2120231212-0001", + "businessType": "ProductReceipt", + "remark": null, + "createTime": 1702376904000, + "creator": "超级管理员", + "autoComplete": "FALSE", + "allowModifyLocation": "FALSE", + "allowModifyQty": "TRUE", + "allowBiggerQty": "TRUE", + "allowSmallerQty": "TRUE", + "allowModifyInventoryStatus": "TRUE", + "allowContinuousScanning": "TRUE", + "allowPartialComplete": "TRUE", + "allowModifyBatch": "FALSE", + "allowModifyPackingNumber": "FALSE", + "inInventoryStatuses": "OK", + "outInventoryStatuses": "OK", + "concurrencyStamp": null, + subList: [ + { + "id": "1809190000003953999", + "productionLineCode": "line4", + "workStationCode": "station4", + "processCode": null, + "packingNumber": "PN-00113", + "containerNumber": null, + "batch": "20231212", + "produceDate": null, + "expireDate": null, + "inventoryStatus": "OK", + "woNumber": null, + "woLine": null, + "stdPackQty": 8, + "stdPackUnit": "BOX", + "itemCode": "item01", + "itemName": "物品01", + "itemDesc1": "", + "itemDesc2": "", + "projectCode": "xm01", + "qty": 2, + "uom": "EA", + "number": "JOB2120231212-0001", + "remark": null, + "createTime": 1702376904000, + "creator": "1", + "toOwnerCode": null, + handleQty: 10, + toPackingNumber: '12', + toContainerNumber: '001', + toBatch: '21', + toInventoryStatus: 'OK', + toLocationCode: 'H03', + } + ] + } + ProductreceiptJobMainApi.executeProductreceiptMain(aaa) } else if (val == 'mainJobAba') { // 放弃 - console.log('列表-操作按钮事件-放弃') + ProductreceiptJobMainApi.abandonProductreceiptMain(row.id) } else if (val == 'mainJobClo') { // 关闭 - console.log('列表-操作按钮事件-关闭') + ProductreceiptJobMainApi.closeProductreceiptMain(row.id) } else if (val == 'mainJobAcc') { // 承接 - console.log('列表-操作按钮事件-承接') + ProductreceiptJobMainApi.acceptProductreceiptMain(row.id) } } @@ -208,8 +268,8 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(setSearchParams) - download.excel(data, '制品收货任务主.xlsx') + const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(tableObject.params) + download.excel(data, '制品收货任务.xlsx') } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts index 147ded08f..099526119 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts @@ -522,16 +522,16 @@ export const ProductreceiptJobMain = 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' + // }, + // } ])) //表单校验 diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue index 75b52130c..1ba1b1db3 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue @@ -57,15 +57,39 @@ :detailAllSchemas="ProductreceiptRecordDetail.allSchemas" :detailAllSchemasRules="ProductreceiptRecordDetailRules" :apiPage="ProductreceiptRecordDetailApi.getProductreceiptRecordDetailPage" + :buttondataTable="buttondataTable" + @tableFormButton="tableFormButton" /> + + + + +