From 5dc7deb5593d760afb14f66247eec36e0b087d43 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 2 Aug 2024 11:19:21 +0800 Subject: [PATCH] =?UTF-8?q?WMS=20=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E7=94=B3=E8=AF=B7=E3=80=81=E8=AE=A1=E5=88=92=E5=A4=96?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E7=94=B3=E8=AF=B7=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=98=8E=E7=BB=86=E4=B8=AD=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedissueRequestMain.data.ts | 11 ++++++++++- .../unplannedreceiptRequestMain.data.ts | 11 ++++++++++- .../productscrapRequestMain.data.ts | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index 5ddd1c9de..27e78019e 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -1086,7 +1086,13 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive hiddenInMain:true, } ])) - +function validateQty(rule, value, callback) { + if (value>0) { + callback() + }else{ + callback(new Error('数量必须大于0')) + } +} //表单校验 export const UnplannedissueRequestDetailRules = reactive({ // packingNumber: [ @@ -1111,6 +1117,9 @@ export const UnplannedissueRequestDetailRules = reactive({ { required: true, message: '请选择物料代码', trigger: 'change' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], + qty:[ + { validator:validateQty, message: '数量必须大于0', trigger: 'change'} + ], remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 7ba954a82..f17b2d593 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -1317,7 +1317,13 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive0) { + callback() + }else{ + callback(new Error('数量必须大于0')) + } +} //表单校验 export const UnplannedreceiptRequestDetailRules = reactive({ arriveDate: [ @@ -1335,6 +1341,9 @@ export const UnplannedreceiptRequestDetailRules = reactive({ inventoryStatus: [ { required: true, message: '请选择库存状态', trigger: 'change' } ], + qty:[ + { validator:validateQty, message: '数量必须大于0', trigger: 'change'} + ], itemCode: [ { required: true, message: '请选择物料代码', trigger: 'change' } ], diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts index 5cbf8d788..6067ca3e1 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts @@ -1262,7 +1262,7 @@ export const ProductscrapRequestDetailRules = reactive({ { required: true, message: '请选择工位代码', trigger: 'change' } ], qty:[ - { validator:validateQty, message: '数量必须大于0', trigger: 'blur'} + { validator:validateQty, message: '数量必须大于0', trigger: 'change'} ], // processCode: [ // { required: true, message: '请选择工序代码', trigger: 'change' }