From d4f4c52402b91cb8e17c1845da71c5e39662fde0 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期三, 03 一月 2024 15:28:06 +0800
Subject: [PATCH] 销售报价单列表页增加统计内容及接口联调、添加报价单天天客户名称及对应限制功能

---
 src/views/client/salesLead/AdvanceDialog.vue |   38 ++++++++++++++++++++++++--------------
 1 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/src/views/client/salesLead/AdvanceDialog.vue b/src/views/client/salesLead/AdvanceDialog.vue
index 849f044..d3606c5 100644
--- a/src/views/client/salesLead/AdvanceDialog.vue
+++ b/src/views/client/salesLead/AdvanceDialog.vue
@@ -10,14 +10,14 @@
     >
       <div class="content">
         <el-radio-group v-model="radio">
-          <div class="one">
+          <!-- <div class="one">
             <el-radio :label="1">
               <span>鎺ㄨ繘鍒颁笅涓�闃舵</span>
               <el-select v-model="value1" size="mini" disabled>
                 <el-option v-for="(item, index) in options" :key="index" :label="item" :value="item"></el-option>
               </el-select>
             </el-radio>
-          </div>
+          </div> -->
           <div class="two">
             <el-radio :label="2">
               <span>鎺ㄨ繘鍒版寚瀹氶樁娈�</span>
@@ -41,6 +41,7 @@
         v-if="editConfig.visible"
         :edit-client-manage-config="editConfig"
         @salesOpportunityClick="salesOpportunityClick"
+        @reshData="reshData"
       />
       <!-- 鏂板缓/缂栬緫閿�鍞満浼� -->
       <AddSalesOpportunityDialog v-if="editOpportunityConfig.visible" :edit-common-config="editOpportunityConfig" />
@@ -70,7 +71,7 @@
   data() {
     return {
       dialogWidth: "25%",
-      radio: 1,
+      radio: 2,
       commonConfig: this.advanceConfig,
       value1: "",
       value: "",
@@ -95,18 +96,18 @@
   },
   methods: {
     setData(status) {
-      if (status === 1) {
-        this.options = ["鏂板缓", "澶辫触鍏抽棴", "鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�"]
+      if (status === 0) {
+        this.options = ["璺熻繘涓�", "鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�", "澶辫触鍏抽棴"]
+        this.value = "璺熻繘涓�"
+        this.value1 = "璺熻繘涓�"
+      } else if (status === 1) {
+        this.options = ["鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�", "澶辫触鍏抽棴"]
         this.value = "澶辫触鍏抽棴"
         this.value1 = "澶辫触鍏抽棴"
       } else if (status === -1) {
-        this.options = ["鏂板缓", "璺熻繘涓�", "鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�"]
+        this.options = ["鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�"]
         this.value = "鍗囩骇鍒板鎴�"
         this.value1 = "鍗囩骇鍒板鎴�"
-      } else {
-        this.options = ["璺熻繘涓�", "澶辫触鍏抽棴", "鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�"]
-        this.value = "璺熻繘涓�"
-        this.value1 = "璺熻繘涓�"
       }
     },
     handleClose() {
@@ -121,6 +122,8 @@
     },
     saveClick() {
       console.log(this.value)
+      // this.commonConfig.visible = false
+      //
       if (this.value === "璺熻繘涓�") {
         // val === '鏂板缓' ||
         this.pushSalesSources(1)
@@ -137,12 +140,14 @@
           type: "warning"
         })
           .then(() => {
-            this.editConfig.visible = true
             this.editConfig.title = "鏂板缓"
             this.editConfig.infomation = {
               ...this.commonConfig.infomation,
               sales_leads_id: this.commonConfig.infomation.id
             }
+            this.editConfig.isResh = true
+            this.editConfig.infomation.codeStandID = ""
+            this.editConfig.visible = true
           })
           .catch(() => {})
       } else if (this.value === "鍗囩骇鍒板鎴峰拰閿�鍞満浼�") {
@@ -152,13 +157,15 @@
           type: "warning"
         })
           .then(() => {
-            this.editConfig.visible = true
             this.editConfig.title = "鏂板缓"
             this.editConfig.isSalesOpportunity = true
+            this.editConfig.isResh = true
             this.editConfig.infomation = {
               ...this.commonConfig.infomation,
               sales_leads_id: this.commonConfig.infomation.id
             }
+            this.editConfig.infomation.codeStandID = ""
+            this.editConfig.visible = true
           })
           .catch(() => {})
       }
@@ -173,15 +180,18 @@
         console.log(res)
         this.$message.success("鎺ㄨ繘鎴愬姛")
         this.handleClose()
-        this.$parent.getData()
+        this.reshData()
       })
+    },
+    reshData() {
+      this.$parent.getData()
     },
     // 閿�鍞満浼�
     salesOpportunityClick(item) {
       console.log(item)
       this.editOpportunityConfig.visible = true
       this.editOpportunityConfig.title = "鏂板缓"
-      this.editOpportunityConfig.infomation = { client_name: item.name }
+      this.editOpportunityConfig.infomation = { client_name: item.name, sourceTitle: "鎺ㄨ繘" }
     }
   }
 }

--
Gitblit v1.8.0