From 6be74fae87a57996e8cf1b8778ad16ddbb1f870b Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期二, 27 二月 2024 16:57:10 +0800
Subject: [PATCH] 如果销售机会,客户名称为空查询所有销售报价单列表,否则查对应报价单,如果客户名称为空查所有销售机会列表

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

diff --git a/src/views/sales/quotation/AddQuotationDialog.vue b/src/views/sales/quotation/AddQuotationDialog.vue
index c08cbe4..7d8067e 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
@@ -638,6 +638,8 @@
         this.contactId = row.id
       } else if (value === "chance") {
         this.editConfig.infomation.sale_chance_name = row.name
+        this.editConfig.infomation.client_name=row.client.name
+        this.clientId = row.client.id
         this.saleChanceId = row.id
       } else {
         this.editConfig.infomation.client_name = row.name

--
Gitblit v1.8.0