From 761f038c7e537df98368d21154f851fda2ccfbcd Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 2 Aug 2024 15:14:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E9=87=8F=E4=B8=8D=E8=83=BD=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerreturnRequestMain.data.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts index 93916bd81..8d51356d4 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts @@ -1206,7 +1206,13 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive hiddenInMain:true } ])) - +function validateQty(rule, value, callback) { + if (value>0) { + callback() + }else{ + callback(new Error('数量必须大于0')) + } +} //表单校验 export const CustomerreturnRequestDetailRules = reactive({ itemCode: [ @@ -1221,6 +1227,9 @@ export const CustomerreturnRequestDetailRules = reactive({ packQty: [ { required: true, message: '请选择包装数量', trigger: 'blur' } ], + qty:[ + { validator:validateQty, message: '数量必须大于0', trigger: 'change'} + ] }) export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive([