From db2b422bb8d0fef2d95f364db88ded1f2074784a Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期一, 08 一月 2024 16:37:35 +0800
Subject: [PATCH] 报价单 新建编辑操作的时候 成本单价调用接口之前的校验修改,不填写不校验,填写了校验大于0的2位小数

---
 src/views/sales/quotation/AddQuotationDialog.vue |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/views/sales/quotation/AddQuotationDialog.vue b/src/views/sales/quotation/AddQuotationDialog.vue
index c08cbe4..8684bc1 100644
--- a/src/views/sales/quotation/AddQuotationDialog.vue
+++ b/src/views/sales/quotation/AddQuotationDialog.vue
@@ -527,8 +527,8 @@
             this.$message.error("浜у搧鍚嶇О涓嶈兘涓虹┖")
           } else {
             for (let i = 0; i < this.tableData.length; i++) {
-              if (this.tableData[i].cost || Number(this.tableData[i].cost) == 0) {
-                let reg = /^\+?[1-9]\d*$/
+              if (this.tableData[i].cost) {
+                let reg =/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
                 if (!reg.test(this.tableData[i].cost)) {
                   this.$message.error("鎴愭湰鍗曚环闇�瑕佸~鍐欏ぇ浜�0鐨�2浣嶅皬鏁帮紒")
                   return true

--
Gitblit v1.8.0