From b83b220750dc0e5e281474d655a39ea121c26f84 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Thu, 18 Apr 2024 17:15:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8E=E7=8E=87=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierinvoiceRequestMain.data.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 4378fc895..9cb674cee 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -697,8 +697,20 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( } ])) +function validateTaxRate(rule, value, callback) { + if (value>0) { + callback() + }else{ + callback(new Error('税率必须大于0')) + } +} + //表单校验 export const SupplierinvoiceRequestMainRules = reactive({ + taxRate: [ + required, + { validator:validateTaxRate, message: '税率必须大于0', trigger: 'blur'} + ], invoiceTime: [ { required: true, message: '请选择发票日期', trigger: 'change' } ],