From 0bdc7d10c8c4b13a993f5f1474b7fb2fc8c88fc9 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期二, 17 十月 2023 14:26:40 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into wn

---
 src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
index fa9e011..7f09501 100644
--- a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
+++ b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
@@ -93,6 +93,7 @@
                       "
                       value-key="name"
                       @select="handleSelectClient('contact', $event)"
+                      placeholder="璇峰厛閫夋嫨瀹㈡埛鍚嶇О"
                       :disabled="isContact"
                     ></el-autocomplete>
                     <div v-if="!isContact" class="common-select-btn" @click="selClientClick('contact')">
@@ -655,6 +656,10 @@
     }
     this.getCommonData()
     this.formInfo()
+    if (this.editConfig.title === '缂栬緫'){
+      this.isContact = false
+      this.getContactList(this.editConfig.infomation.contact_id)
+    }
   },
   watch: {
     "editConfig.visible"(val) {
@@ -707,6 +712,7 @@
     // 淇濆瓨
     saveClick(formName) {
       this.$refs[formName].validate((valid) => {
+        this.validateFormNumber()
         if (valid) {
           console.log(this.editConfig.infomation)
           const params = this.saveParams()
@@ -813,11 +819,16 @@
     handleSelectClient(value, item) {
       if (value === "client") {
         this.clientId = item.id
+        this.editConfig.infomation.client_name = item.name
+        this.editConfig.infomation.contact_name = ''
+        this.contactId = 0
         this.isContact = false
         this.getContactList(item.id)
       } else if (value === "contact") {
+        this.editConfig.infomation.contact_name = item.name
         this.contactId = item.id
       }
+      this.refresh()
     },
     selClientClick(value) {
       if (value === "client") {
@@ -830,11 +841,13 @@
       if (value === "contact") {
         this.editConfig.infomation.contact_name = row.name
         this.contactId = row.id
-        this.isContact = false
-        this.getContactList(row.id)
       } else if (value === "client") {
         this.editConfig.infomation.client_name = row.name
         this.clientId = row.id
+        this.editConfig.infomation.contact_name = ''
+        this.contactId = 0
+        this.isContact = false
+        this.getContactList(row.id)
       }
       this.refresh()
     },
@@ -872,9 +885,8 @@
     },
     async getCityList(val, value) {
       await getCityList({ province_id: val }).then((res) => {
-        console.log(res)
-        if (res.data.code === 200) {
-          this.cityOptions = res.data.data.list
+        if (res.code === 200) {
+          this.cityOptions = res.data.list
           if (value === "sel") {
             this.editConfig.infomation.city_id = ""
           }

--
Gitblit v1.8.0