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',