diff --git a/src/api/wms/deliverPlanDetail/index.ts b/src/api/wms/deliverPlanDetail/index.ts index 6cfe8a5d6..33aeffdb9 100644 --- a/src/api/wms/deliverPlanDetail/index.ts +++ b/src/api/wms/deliverPlanDetail/index.ts @@ -17,6 +17,11 @@ export interface DeliverPlanDetailVO { available: string } +// 查询发货计划子列表 +export const selectDetailByMasterID = async (id: number) => { + return await request.get({ url: `/wms/deliver-plan-detail/detailList?id=` + id }) +} + // 查询发货计划子列表 export const getDeliverPlanDetailPage = async (params) => { return await request.get({ url: `/wms/deliver-plan-detail/page`, params }) diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue index e10c534ea..11a7bee1d 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue @@ -233,10 +233,10 @@ const buttonTableClick = async (val, row) => { "allowModifyBatch": "FALSE", "allowModifyPackingNumber": "FALSE", "subList": [{ - "id": "1809200000441442039", + "id": "1809200000441442040", "soNumber": null, "soLine": null, - "packingNumber": "M20230421000005", + "packingNumber": "testCF", "batch": "20230808", "inventoryStatus": "OK", "ownerCode": null, @@ -250,25 +250,11 @@ const buttonTableClick = async (val, row) => { "projectCode": null, "qty": 22, "uom": "EA", - "number": "REQ1820231205-0005", + "number": "REQ1820231206-0001", "remark": "子表备注", "createtime": null, - "creator": "1", - "handleQty": null, - "toPackingNumber": null, - "toContainerNumber": null, - "toBatch": null, - "toInventoryStatus": null, - recordList: [{ - handleQty: 22, - toPackingNumber: 'M20230421000005', - toContainerNumber: '001', - toBatch: '20230808', - toInventoryStatus: 'OK', - toLocationCode: 'SFG', - supplierCode: '31213', - }] - }] + "creator": "1" +}] } handleHandle(aaa) } else if (val == 'mainJobAba') { // 放弃 diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index ad51814e4..e24806d3e 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -142,11 +142,10 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { setV['fromLocationCode'] = val[0]['locationCode'] setV['itemCode'] = val[0]['itemCode'] setV['uom'] = val[0]['uom'] - formRef.setValues(setV) } else { setV[formField] = val[0][searchField] - formRef.setValues(setV) } + formRef.setValues(setV) }) } diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue index 9bd481c89..a300a7250 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue @@ -103,11 +103,12 @@ const updataTableColumns = (val) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { if (type == 'tableForm') { + console.log(106, val[0]) row['soNumber'] = val[0]['soNumber'] row['soLine'] = val[0]['soLine'] row['packingNumber'] = val[0]['packingNumber'] row['batch'] = val[0]['batch'] - row['itemCode'] = val[0]['itemCode'] + row['itemCode'] = val[0]['code'] } else { const setV = {} setV[formField] = val[0][searchField] @@ -122,12 +123,18 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { nextTick(() => { const setV = {} + if(formField == 'deliverRecordNumber') { + setV['deliverRecordNumber'] = val[0]['deliverRecordNumber'] + setV['deliverPlanNumber'] = val[0]['deliverPlanNumber'] + setV['customerCode'] = val[0]['customerCode'] + }else if(formField == 'itemCode') { + setV['packingNumber'] = val[0]['packingNumber'] + setV['batch'] = val[0]['batch'] + setV['itemCode'] = val[0]['itemCode'] + } + else { setV[formField] = val[0][searchField] - setV['soNumber'] = val[0]['soNumber'] - setV['soLine'] = val[0]['soLine'] - setV['packingNumber'] = val[0]['packingNumber'] - setV['batch'] = val[0]['batch'] - setV['itemCode'] = val[0]['itemCode'] + } formRef.setValues(setV) }) } @@ -145,8 +152,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'wms:customersettle-request-main:create'}), // 新增——需要手动修改下权限 - defaultButtons.defaultImportBtn({hasPermi:'wms:customersettle-request-main:import'}), // 导入 + // defaultButtons.defaultAddBtn({hasPermi:'wms:customersettle-request-main:create'}), // 新增——需要手动修改下权限 + // defaultButtons.defaultImportBtn({hasPermi:'wms:customersettle-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:customersettle-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 @@ -163,11 +170,12 @@ const HeadButttondata = [ // 头部按钮事件 const buttonBaseClick = (val, item) => { - if (val == 'add') { // 新增 - openForm('create') - } else if (val == 'import') { // 导入 - handleImport() - } else if (val == 'export') { // 导出 + // if (val == 'add') { // 新增 + // openForm('create') + // } else if (val == 'import') { // 导入 + // handleImport() + // } else + if (val == 'export') { // 导出 handleExport() } else if (val == 'refresh') { // 刷新 getList() diff --git a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue index ee5df0ad5..e2c62302d 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue @@ -185,23 +185,23 @@ const butttondata = (row) => { const buttonTableClick = async (val, row) => {  if (val == 'mainJobExe') { // 执行     let aaa = { - "id": "1809190002130023676", - "requestNumber": "REQ1720231205-0001", + "id": "1809200001805505477", + "requestNumber": "REQ1820231206-0001", + "deliverRecordNumber": "JOB2420231206-0005", "deliverPlanNumber": "DP20231205-0002", - "customerDeliverNumber": "CUST20231205-00000001", "customerCode": "CF", "customerDockCode": "CFCKYT", - "deliverDock": null, + "receiptDock": null, "carrierCode": "cys-001", "transferMode": "LOAD", "vehiclePlateNumber": "车牌号", "fromWarehouseCode": null, - "toWarehouseCode": "CFCK", - "requestTime": 1701740774000, + "toWarehouseCode": null, + "requestTime": 1701826510000, "requestDueTime": 1704470400000, "status": "2", "expiredTime": null, - "updateTime": 1701740969000, + "updateTime": 1701827786000, "updater": "1", "jobStageStatus": null, "priority": null, @@ -218,7 +218,6 @@ const buttonTableClick = async (val, row) => { "remark": "主表备注", "createTime": 1701740969000, "creator": "1", - "ruleUserId": null, "fromAreaCodes": "采购在途库", "toAreaCodes": "采购在途库", "fromDockCode": null, @@ -232,8 +231,6 @@ const buttonTableClick = async (val, row) => { "allowPartialComplete": "TRUE", "allowModifyBatch": "FALSE", "allowModifyPackingNumber": "FALSE", - "inInventoryStatuses": "OK", - "outInventoryStatuses": "OK", "subList": [{ "id": "1809190001245559377", "soNumber": null, @@ -259,7 +256,6 @@ const buttonTableClick = async (val, row) => { "toPackingNumber": null, "toContainerNumber": null, "toBatch": null, - "handleQty": null, "toInventoryStatus": null, recordList: [{ handleQty: 10, @@ -286,8 +282,8 @@ const buttonTableClick = async (val, row) => { DeliverJobMainApi.abandonDeliverJobMain(row.id) } else if (val == 'mainJobClo') { // 关闭 DeliverJobMainApi.closeDeliverJobMain(row.id) - } else if (val == 'mainJobAcc') { // 执行 - DeliverJobMainApi.executeDeliverJobMain(row.id) + } else if (val == 'mainJobAcc') { // 承接 + DeliverJobMainApi.acceptDeliverJobMain(row.id) } } diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 1bdac4a75..5c6848479 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -83,6 +83,7 @@ import { DeliverRequestMain,DeliverRequestMainRules,DeliverRequestDetail,Deliver import * as DeliverRequestMainApi from '@/api/wms/deliverRequestMain' import * as DeliverRequestDetailApi from '@/api/wms/deliverRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' // 发货申请 defineOptions({ name: 'DeliverRequestMain' }) @@ -95,6 +96,8 @@ const routeName = ref() routeName.value = route.name const tableColumns = ref(DeliverRequestMain.allSchemas.tableColumns) +const isShowButton = ref(true) + // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val @@ -111,11 +114,37 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if(formField == 'deliverPlanNumber') { setV['deliverPlanNumber'] = val[0]['number'] setV['customerCode'] = val[0]['customerCode'] - formRef.setValues(setV) + isShowButton.value = false + // 获取子表数据 getBomDisassemble + DeliverPlanDetailApi.selectDetailByMasterID(val[0]['id']) + .then(res => { + console.log(120,res) + res.forEach(item => { + item.qty = item.planQty + }) + if (res) tableData.value = res + // 修改 tableform 属性 + DeliverRequestDetail.allSchemas.tableFormColumns.map(item => { + if(item.field == 'itemCode') { + item.isInpuFocusShow = false + item.tableForm.isInpuFocusShow = false + item.tableForm.disabled = true + } + if(item.field == 'qty') { + item.tableForm.disabled = true + } + if(item.field == 'uom') { + item.tableForm.disabled = true + } + }) + }).catch(err => { + console.log(err) + message.error('错误') + }) } else { setV[formField] = val[0][searchField] - formRef.setValues(setV) } + formRef.setValues(setV) } }) } @@ -161,6 +190,7 @@ const HeadButttondata = [ const buttonBaseClick = (val, item) => { if (val == 'add') { // 新增 openForm('create') + resetShow() } else if (val == 'import') { // 导入 handleImport() } else if (val == 'export') { // 导出 @@ -360,6 +390,30 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } + +// 恢复最初属性:明细添加/删除行按钮,字段查询弹窗,可输入状态等 +// 列表头部 新增按钮 触发 +const resetShow = async () => { + isShowButton.value = true // tableform按钮恢复到显示 + // 修改 tableform 属性 + DeliverRequestDetail.allSchemas.tableFormColumns.map(item => { + if(item.field == 'itemCode') { + item.isInpuFocusShow = true + item.tableForm.isInpuFocusShow = true + item.tableForm.disabled = false + } + if(item.field == 'planQty') { + item.tableForm.disabled = false + } + if(item.field == 'uom') { + item.tableForm.disabled = false + } + if(item.field == 'available') { + item.tableForm.disabled = false + } + }) +} + /** 初始化 **/ onMounted(async () => { getList()