diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue index 6f25d3091..e6dc7e8e0 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue @@ -61,6 +61,7 @@ @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" :isShowButton = isShowButton + @inputNumberChange="inputNumberChange" /> newRow['itemCode'] = item['itemCode'] newRow['projectCode'] = item['projectCode'] newRow['uom'] = item['uom'] + newRow['subSettleQty'] = item['subSettleQty'] tableData.value.push(newRow) }) @@ -355,13 +357,31 @@ const openForm = (type: string, row?: any) => { basicFormRef.value.open(type, row) } - +const inputNumberChange = (field, val,row, index) => { + if(field=='qty'){ + if(row['subSettleQty']&&row['qty']>row['subSettleQty']){ + message.error(`物料${row['itemCode']}最大数量为${row['subSettleQty']}`) + } + } + console.log('inputNumberChange',field, val,row, index) +} // 主子数据 提交 const submitForm = async (formType, submitData) => { let data = {...submitData} if(data.masterId){ data.id = data.masterId } + let flag = true + tableData.value.forEach(item=>{ + if(item['subSettleQty']&&item['qty']>item['subSettleQty']){ + flag = false + message.error(`物料${item['itemCode']}最大数量为${item['subSettleQty']}`) + } + }) + if(!flag){ + return + } + data.subList = tableData.value // 拼接子表数据参数 let isExist = false tableData.value.forEach(item => { diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts index e2ac37953..cacd6c7b1 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts @@ -335,6 +335,9 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([ disabled: true } }, + tableForm:{ + disabled: true + } }, { label: '销售订单行', @@ -344,8 +347,9 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([ width: 150 }, tableForm:{ + disabled:true, multiple: true, - isInpuFocusShow: true, // 开启查询弹窗 + // isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择销售订单行', searchField: 'lineNumber', searchTitle: '销售订单信息', @@ -527,6 +531,9 @@ export const SaleShipmentDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm:{ + type:'InputNumber' + } }, { label: '计量单位',