From c5d68d050a5fb84f2e60a34409809fb0b08466c5 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 28 二月 2024 15:22:13 +0800
Subject: [PATCH] 跟进记录模块 如果客户名称有值查询对应的销售机会列表,如果没有查询所有销售机会的逻辑

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

diff --git a/src/views/sales/quotation/AddQuotationDialog.vue b/src/views/sales/quotation/AddQuotationDialog.vue
index 8684bc1..543a115 100644
--- a/src/views/sales/quotation/AddQuotationDialog.vue
+++ b/src/views/sales/quotation/AddQuotationDialog.vue
@@ -617,6 +617,8 @@
         this.getSaleChanceList(item)
       } else if (value === "chance") {
         this.saleChanceId = item.id
+        this.productTableList.tableData = item.products?item.products:[]
+        this.tableData = item.products?item.products:[]
       } else {
         this.contactId = item.id
       }
@@ -638,7 +640,11 @@
         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
+        this.productTableList.tableData = row.products?row.products:[]
+        this.tableData = row.products?row.products:[]
       } else {
         this.editConfig.infomation.client_name = row.name
         this.clientId = row.id
@@ -658,6 +664,8 @@
         this.editConfig.infomation.contact_name = ""
         this.contactId = 0
       }
+      this.productTableList.tableData = []
+      this.tableData = []
       this.refresh()
     },
     // 閿�鍞満浼氬垪琛�

--
Gitblit v1.8.0