From 87e657307d298ce119967753c385696f26d75e2c Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Mon, 26 Aug 2024 16:24:14 +0800 Subject: [PATCH] =?UTF-8?q?HL-5657=E7=BB=93=E7=AE=97=E5=87=BA=E5=BA=93=20?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=AE=A2=E5=8D=95=E8=A1=8C=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E5=81=9A=E6=A0=A1=E9=AA=8C(=E7=9B=AE=E5=89=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98=E5=9C=A8=E4=BA=8E=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=A1=8C=E6=95=B0=E9=87=8F=E5=B7=B2=E7=BB=8F=E6=BB=A1?= =?UTF-8?q?=E8=B6=B3=E4=BA=86=EF=BC=8C=E4=BD=86=E8=BF=98=E8=83=BD=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E7=94=B3=E8=AF=B7=EF=BC=8C=E5=AE=B9=E6=98=93=E4=BA=A7?= =?UTF-8?q?=E7=94=9F=E8=BF=B7=E6=83=91=E6=80=A7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saleShipmentMainRequest/index.vue | 22 ++++++++++++++++++- .../saleShipmentMain.data.ts | 9 +++++++- 2 files changed, 29 insertions(+), 2 deletions(-) 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: '计量单位',