From 7b0a71310a043e12ffceda1e352a1b2317807679 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Fri, 1 Nov 2024 16:43:38 +0800 Subject: [PATCH] =?UTF-8?q?YT-588=E7=89=A9=E6=96=99=E9=9A=94=E7=A6=BB?= =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/inventorymoveRequestDetail/index.ts | 7 ++++++- .../inventorymoveRequestMainOKHOLD/index.vue | 10 +++++++++- .../inventorymoveRequestMain.data.ts | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/api/wms/inventorymoveRequestDetail/index.ts b/src/api/wms/inventorymoveRequestDetail/index.ts index 26ad3a1ab..f78b67a06 100644 --- a/src/api/wms/inventorymoveRequestDetail/index.ts +++ b/src/api/wms/inventorymoveRequestDetail/index.ts @@ -22,12 +22,13 @@ export interface InventorymoveRequestDetailVO { itemDesc2: string projectCode: string qty: number + inventoryQty: number uom: string updateTime: Date updater: string itemCode: string } - +const message = useMessage() // 消息弹窗 // 查询库存转移申请子列表 export const getInventorymoveRequestDetailPage = async (params) => { if (params.isSearch) { @@ -51,6 +52,10 @@ export const createInventorymoveRequestDetail = async (data: InventorymoveReques // 修改库存转移申请子 export const updateInventorymoveRequestDetail = async (data: InventorymoveRequestDetailVO) => { + if(parseFloat(data.inventoryQty) < parseFloat(data.qty)){ + message.warning("数量不能大于库存数量") + return + } return await request.put({ url: `/wms/inventorymove-request-detail/update`, data }) } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue index 8ac2d8b84..a1e237350 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue @@ -332,7 +332,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['fromContainerNumber'] = item['containerNumber'] newRow['itemCode'] = item['itemCode'] newRow['fromBatch'] = item['batch'] - + newRow['inventoryQty'] = item['qty'] + //从批次 await ruleApi.getManagementPrecision({ itemCodes: [item['itemCode']], @@ -704,6 +705,13 @@ const submitForm = async (formType, submitData) => { return } data.subList = tableData.value // 拼接子表数据参数 + const cmdExists = data.subList.some(filter => + parseFloat(filter.inventoryQty) < parseFloat(filter.qty) + ); + if(cmdExists){ + message.warning("数量不能大于库存数量") + return + } let isExist = false tableData.value.forEach(item => { item['toLocationCode'] = toLocationCode diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts index 422e39fc8..a2998e593 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts @@ -1230,6 +1230,21 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( // isTableForm: false, // isForm: false, // }, + { + label: '库存数量 ', + field: 'inventoryQty', + sort: 'custom', + isSearch: false, + isTable: false, + tableForm: { + disabled: true + }, + form:{ + componentProps:{ + disabled:true + } + } + }, { label: '数量', field: 'qty',