From 4e8e3e78c35ca2ff4a31f865561f0d5c4d89dad9 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期二, 17 十月 2023 17:42:39 +0800
Subject: [PATCH] Merge branch 'dev' of ssh://192.168.5.5:29418/web/crm-web into dev

---
 src/views/client/client/index.vue                              |    3 
 src/views/other/commonDialog/SelectContactDialog.vue           |   15 +++--
 src/views/client/contacts/AddContactsDialog.vue                |   33 +++++-----
 src/views/client/salesLead/AdvanceDialog.vue                   |    8 ++
 src/views/sales/salesDetails/AddSalesDetailsDialog.vue         |    2 
 src/views/other/payment/saleInvoice/index.vue                  |    2 
 src/views/sales/refundForm/index.vue                           |    2 
 src/views/service/clientServiceOrder/mixin/codeMixin.js        |    4 +
 src/views/client/client/AddClientManageDialog.vue              |    6 +
 src/views/client/contacts/index.vue                            |    2 
 src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue |   13 ++--
 src/views/sales/salesReturn/index.vue                          |    2 
 src/views/other/payment/receipt/index.vue                      |    6 +-
 src/views/service/clientServiceOrder/index.vue                 |   24 +++++--
 14 files changed, 75 insertions(+), 47 deletions(-)

diff --git a/src/views/client/client/AddClientManageDialog.vue b/src/views/client/client/AddClientManageDialog.vue
index 1263593..c314122 100644
--- a/src/views/client/client/AddClientManageDialog.vue
+++ b/src/views/client/client/AddClientManageDialog.vue
@@ -549,8 +549,9 @@
         client_status_id: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鐘舵��", trigger: ["change",'blur' ] }],
         member_id: [{ required: false, message: "璇烽�夋嫨閿�鍞礋璐d汉", trigger: ["change",'blur' ] }],
         approvalOpinion: [{ required: true, message: "璇疯緭鍏ュ鎵规剰瑙�", trigger: ["change",'blur' ] }],
+        contact_name: [{ required: true, message: "璇疯緭鍏ヨ仈绯讳汉濮撳悕", trigger: ["change",'blur' ] }],
         contact_phone: [
-          { required: false, message: "", trigger:["change",'blur' ] },
+          { required: true, message: "璇疯緭鍏ヨ仈绯讳汉鎵嬫満", trigger:["change",'blur' ] },
           { len: 11, message: "闀垮害鍦�11涓瓧绗�", trigger: ["change",'blur' ] },
           {
             pattern: /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/,
@@ -664,6 +665,9 @@
                 } else {
                   this.$parent.getData()
                 }
+                if (this.editConfig.isResh) {
+                  this.$emit("reshData")
+                }
               }
             })
           } else {
diff --git a/src/views/client/client/index.vue b/src/views/client/client/index.vue
index 6dfdd2d..585bd9d 100644
--- a/src/views/client/client/index.vue
+++ b/src/views/client/client/index.vue
@@ -376,7 +376,8 @@
         client_name: row.name,
         number: "",
         codeStandID:'',
-        next_follow_time: row.next_visit_time
+        next_follow_time: row.next_visit_time,
+        client_id:row.id
       }
       this.editFollowupConfig.visible = true
     },
diff --git a/src/views/client/contacts/AddContactsDialog.vue b/src/views/client/contacts/AddContactsDialog.vue
index edd0a04..f691b9b6 100644
--- a/src/views/client/contacts/AddContactsDialog.vue
+++ b/src/views/client/contacts/AddContactsDialog.vue
@@ -14,7 +14,7 @@
         :model="editConfig.infomation"
         :rules="rules"
         label-position="right"
-        label-width="120px"
+        label-width="110px"
         size="mini"
       >
         <!-- 淇℃伅 -->
@@ -23,7 +23,7 @@
           <div v-if="isUnflod" class="basic-info-title">鍩烘湰淇℃伅</div>
           <div class="basic-info-view">
             <el-row>
-              <el-col :span="12" v-if="isUnflod">
+              <!-- <el-col :span="12" v-if="isUnflod">
                 <el-form-item label="鑱旂郴浜虹紪鍙�" prop="number">
                   <WordInput
                     v-if="codenumer && (explain != '' || isIdDisabled) && method == 0"
@@ -38,7 +38,7 @@
                   >
                   <span v-else>鑷姩鐢熸垚</span>
                 </el-form-item>
-              </el-col>
+              </el-col> -->
               <el-col :span="12">
                 <el-form-item label="鑱旂郴浜哄鍚�" prop="name">
                   <el-input v-model="editConfig.infomation.name"></el-input>
@@ -95,7 +95,7 @@
                   </el-select>
                 </el-form-item>
               </el-col>
-              <el-col :span="12">
+              <el-col :span="12" style='height:47px;'>
                 <el-form-item v-if="isUnflod" label="棣栬鑱旂郴浜�" prop="is_first">
                   <el-switch v-model="editConfig.infomation.is_first" active-color="#2E68DB" inactive-color="#AEB9CA">
                   </el-switch>
@@ -299,12 +299,12 @@
       dialogWidth: "50%",
       editConfig: this.editContactsConfig,
       rules: {
-        name: [{ required: true, message: "璇疯緭鍏�", trigger:  ["change",'blur'] }],
+        name: [{ required: true, message: "璇疯緭鍏ヨ仈绯讳汉濮撳悕", trigger:  ["change",'blur'] }],
         number: [{ required: true, message: "璇疯緭鍏�", trigger: ["change",'blur'] }],
         client_name: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鍚嶇О", trigger: ["change",'blur'] }],
         member_id: [{ required: true, message: "璇烽�夋嫨", trigger: ["change",'blur'] }],
         phone: [
-          { required: false, message: "", trigger: ["change",'blur'] },
+          { required: false, message: "璇疯緭鍏ユ墜鏈哄彿", trigger: ["change",'blur'] },
           { len: 11, message: "闀垮害鍦�11涓瓧绗�", trigger: ["change",'blur'] },
           {
             pattern: /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/,
@@ -352,16 +352,16 @@
       this.getCityList(this.editConfig.infomation.province_id, "edit")
     }
     this.getCommonData()
-    this.formInfo()
+    // this.formInfo()
   },
   watch: {
     "editContactsConfig.visible"(val) {
       if (val) {
-        this.formInfo()
+        // this.formInfo()
       }
     },
     "editContactsConfig.infomation.codeStandID"() {
-      this.formInfo()
+      // this.formInfo()
     }
   },
   methods: {
@@ -448,14 +448,14 @@
         is_first: data.is_first || false,
         member_id: data.member_id || 0,
         name: data.name || "",
-        number: data.number || "",
+        // number: data.number || "",
         phone: data.phone || "",
         position: data.position || "",
         province_id: data.province_id || 0,
         region_id: data.region_id || 0,
         wechat: data.wechat || "",
-        codeStandID: data.ID,
-        codeRule: this.codeRule
+        // codeStandID: data.ID,
+        // codeRule: this.codeRule
       }
       return params
     },
@@ -479,16 +479,15 @@
     },
     selClient(row) {
       console.log(row)
-      this.editConfig.infomation.client_name = row.name
       this.clientId = row.id
+      this.$set( this.editConfig.infomation,'client_name',row.name)
     },
     // 娓呴櫎宸查�夋嫨鐢ㄦ埛
     clearupClient() {
-      console.log("sssssssss")
-      console.log(this.editConfig.infomation.client_name)
+      console.log(this.editConfig.infomation.client_name,'sssssssss')
       // if (this.editConfig.infomation.client_name !== "") {
-      this.editConfig.infomation.client_name = ""
-      this.clientId = 0
+      this.clientId = null
+      this.$set(this.editConfig.infomation,'client_name','')
       // }
     },
     // 娣诲姞闄勪欢
diff --git a/src/views/client/contacts/index.vue b/src/views/client/contacts/index.vue
index 12e1d31..3712433 100644
--- a/src/views/client/contacts/index.vue
+++ b/src/views/client/contacts/index.vue
@@ -133,7 +133,7 @@
       tableColumn: [
         { label: "鑱旂郴浜哄鍚�", prop: "name", min: 100, isContactClick: true, default: true }, // 鑱旂郴浜哄鍚�
         { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 190, isClientClick: true }, // 瀹㈡埛鍚嶇О
-        { label: "鑱旂郴浜虹紪鍙�", prop: "number", min: 100 }, // 鑱旂郴浜虹紪鍙�
+        // { label: "鑱旂郴浜虹紪鍙�", prop: "number", min: 100 }, // 鑱旂郴浜虹紪鍙�
         { label: "鑱屽姟", prop: "position", min: 120 }, // 鑱屽姟
         { label: "鎵嬫満", prop: "phone", min: 100 }, // 鎵嬫満鍙风爜
         { label: "閿�鍞礋璐d汉", prop: "member_name", min: 120 }, // 閿�鍞礋璐d汉
diff --git a/src/views/client/salesLead/AdvanceDialog.vue b/src/views/client/salesLead/AdvanceDialog.vue
index 8110bde..60ee2a2 100644
--- a/src/views/client/salesLead/AdvanceDialog.vue
+++ b/src/views/client/salesLead/AdvanceDialog.vue
@@ -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" />
@@ -142,6 +143,7 @@
               ...this.commonConfig.infomation,
               sales_leads_id: this.commonConfig.infomation.id
             }
+            this.editConfig.isResh = true
             this.editConfig.infomation.codeStandID=''
             this.editConfig.visible = true
           })
@@ -155,6 +157,7 @@
           .then(() => {
             this.editConfig.title = "鏂板缓"
             this.editConfig.isSalesOpportunity = true
+            this.editConfig.isResh = true
             this.editConfig.infomation = {
               ...this.commonConfig.infomation,
               sales_leads_id: this.commonConfig.infomation.id
@@ -175,9 +178,12 @@
         console.log(res)
         this.$message.success("鎺ㄨ繘鎴愬姛")
         this.handleClose()
-        this.$parent.getData()
+        this.reshData()
       })
     },
+    reshData(){
+      this.$parent.getData()
+    },
     // 閿�鍞満浼�
     salesOpportunityClick(item) {
       console.log(item)
diff --git a/src/views/other/commonDialog/SelectContactDialog.vue b/src/views/other/commonDialog/SelectContactDialog.vue
index 4c71a20..1b291da 100644
--- a/src/views/other/commonDialog/SelectContactDialog.vue
+++ b/src/views/other/commonDialog/SelectContactDialog.vue
@@ -54,8 +54,8 @@
         return {
           editVisible: false,
           title: "",
-          infomation: {},
-          search_map: {}
+          clientId: 0,
+          infomation: {}
         }
       }
     }
@@ -71,7 +71,7 @@
       tableList: [],
       searchSelOptions: [],
       loading: false,
-      // search_map: {},
+      search_map: {},
       tableColumn: [
         { label: "鑱旂郴浜哄鍚�", prop: "name", isContactClick: true, default: true }, // 鑱旂郴浜哄鍚�
         { label: "鑱旂郴浜虹紪鍙�", prop: "number" }, // 鑱旂郴浜虹紪鍙�
@@ -82,6 +82,9 @@
     }
   },
   created() {
+    this.search_map = {
+      client_id: this.editConfig.clientId
+    }
     this.setTable()
     this.getData()
   },
@@ -121,7 +124,7 @@
     async getData() {
       this.loading = true
       await getContactList({
-        search_map: this.editConfig.search_map,
+        search_map: this.search_map,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       })
@@ -158,13 +161,13 @@
     // 鎼滅储
     searchClick(val, content) {
       console.log(val, content)
-      this.editConfig.search_map = {
+      this.search_map = {
         [val.value]: content
       }
       this.getData()
     },
     resetClick() {
-      this.editConfig.search_map = {}
+      this.search_map = {}
       this.getData()
     }
   }
diff --git a/src/views/other/payment/receipt/index.vue b/src/views/other/payment/receipt/index.vue
index 98d506c..ec12224 100644
--- a/src/views/other/payment/receipt/index.vue
+++ b/src/views/other/payment/receipt/index.vue
@@ -180,10 +180,10 @@
       // console.log()
       this.loading = true
       let params = {}
-      let sourceTyle = (this.addConfig.keywordType === "閿�鍞槑缁嗗崟"||this.addConfig.keywordType ==='瀹㈡埛鍚嶇О') ? 1 : 2
+      let sourceTyle = this.addConfig.keywordType === "閿�鍞槑缁嗗崟" || this.addConfig.keywordType === "瀹㈡埛鍚嶇О" ? 1 : 2
       if (this.addConfig.id) {
         params = {
-          sourceID: this.addConfig.id,
+          sourceId: this.addConfig.id,
           sourceType: sourceTyle,
           page: this.pagerOptions.currPage,
           pageSize: this.pagerOptions.pageSize,
@@ -246,7 +246,7 @@
     addBtnClick() {
       this.editConfig.visible = true
       this.editConfig.title = "鏂板缓"
-      this.editConfig.sourceType = this.addConfig.keywordType ==='瀹㈡埛鍚嶇О'?1:this.sourceType
+      this.editConfig.sourceType = this.addConfig.keywordType === "瀹㈡埛鍚嶇О" ? 1 : this.sourceType
       this.editConfig.infomation = { ...this.addConfig, saleDetailNumber: "" }
     }
   }
diff --git a/src/views/other/payment/saleInvoice/index.vue b/src/views/other/payment/saleInvoice/index.vue
index b430c93..bd13fb7 100644
--- a/src/views/other/payment/saleInvoice/index.vue
+++ b/src/views/other/payment/saleInvoice/index.vue
@@ -174,7 +174,7 @@
       let sourceTyle = this.addConfig.keywordType === "閿�鍞槑缁嗗崟" ? 1 : 2
       if (this.addConfig.id) {
         params = {
-          sourceID: this.addConfig.id,
+          sourceId: this.addConfig.id,
           sourceType: sourceTyle,
           page: this.pagerOptions.currPage,
           pageSize: this.pagerOptions.pageSize
diff --git a/src/views/sales/refundForm/index.vue b/src/views/sales/refundForm/index.vue
index 77593ed..c4f7515 100644
--- a/src/views/sales/refundForm/index.vue
+++ b/src/views/sales/refundForm/index.vue
@@ -185,7 +185,7 @@
       let params = {}
       if (this.addConfig.id) {
         params = {
-          sourceID: this.addConfig.id,
+          sourceId: this.addConfig.id,
           page: this.pagerOptions.currPage,
           pageSize: this.pagerOptions.pageSize
         }
diff --git a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
index 11ad76e..53cf0eb 100644
--- a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
+++ b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -497,7 +497,7 @@
         infomation: {}
       },
       clientId: this.editCommonConfig.infomation.client_id,
-      saleChanceId: this.editCommonConfig.infomation.saleChanceId,
+      saleChanceId: this.editCommonConfig.infomation.sale_chance_id,
       subbillId: this.editCommonConfig.infomation.subbillId,
       productId: 1,
       isNoProduct: true,
diff --git a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
index 7f09501..1f1ef32 100644
--- a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
+++ b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
@@ -656,7 +656,7 @@
     }
     this.getCommonData()
     this.formInfo()
-    if (this.editConfig.title === '缂栬緫'){
+    if (this.editConfig.title === "缂栬緫") {
       this.isContact = false
       this.getContactList(this.editConfig.infomation.contact_id)
     }
@@ -778,7 +778,6 @@
         status_id: data.status_id || 0,
         threats: data.threats || "",
         whether_established: data.whether_established || "",
-
         remark: data.remark || "",
         detail_address: data.detail_address || "",
 
@@ -790,10 +789,11 @@
     // 鑾峰彇鑱旂郴浜哄垪琛�
     getContactList(id) {
       getContactList({
-        clientId: id,
         page: 0,
         pageSize: 0,
-        search_map: {}
+        search_map: {
+          client_id: id
+        }
       }).then((res) => {
         if (res.code == 200) {
           this.contactNamelist = res.data.list
@@ -820,7 +820,7 @@
       if (value === "client") {
         this.clientId = item.id
         this.editConfig.infomation.client_name = item.name
-        this.editConfig.infomation.contact_name = ''
+        this.editConfig.infomation.contact_name = ""
         this.contactId = 0
         this.isContact = false
         this.getContactList(item.id)
@@ -835,6 +835,7 @@
         this.editSelectClientConfig.editVisible = true
       } else if (value === "contact") {
         this.editSelectContactConfig.editVisible = true
+        this.editSelectContactConfig.clientId = this.clientId
       }
     },
     selClient(row, value) {
@@ -844,7 +845,7 @@
       } else if (value === "client") {
         this.editConfig.infomation.client_name = row.name
         this.clientId = row.id
-        this.editConfig.infomation.contact_name = ''
+        this.editConfig.infomation.contact_name = ""
         this.contactId = 0
         this.isContact = false
         this.getContactList(row.id)
diff --git a/src/views/sales/salesReturn/index.vue b/src/views/sales/salesReturn/index.vue
index b9b3ee8..9850bf9 100644
--- a/src/views/sales/salesReturn/index.vue
+++ b/src/views/sales/salesReturn/index.vue
@@ -190,7 +190,7 @@
       let params = {}
       if (this.addConfig.id) {
         params = {
-          sourceID: this.addConfig.id,
+          sourceId: this.addConfig.id,
           sourceType: 1,
           page: this.pagerOptions.currPage,
           pageSize: this.pagerOptions.pageSize
diff --git a/src/views/service/clientServiceOrder/index.vue b/src/views/service/clientServiceOrder/index.vue
index dcc31aa..c8fd71a 100644
--- a/src/views/service/clientServiceOrder/index.vue
+++ b/src/views/service/clientServiceOrder/index.vue
@@ -179,13 +179,23 @@
     // 璇锋眰鏁版嵁
     async getData() {
       this.loading = true
-      await getServiceOrderList({
-        keyword: this.keyword,
-        keywordType: this.keywordType,
-        page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize,
-        sourceId: this.addConfig.id
-      })
+      console.log(this.addConfig)
+      let params = {}
+      if (this.addConfig.keywordType === "鏈嶅姟鍚堝悓") {
+        params = {
+          serviceContractId: this.addConfig.serviceContractId,
+          page: this.pagerOptions.currPage,
+          pageSize: this.pagerOptions.pageSize
+        }
+      } else {
+        params = {
+          keyword: this.keyword,
+          keywordType: this.keywordType,
+          page: this.pagerOptions.currPage,
+          pageSize: this.pagerOptions.pageSize
+        }
+      }
+      await getServiceOrderList(params)
         .then((res) => {
           console.log(res)
           if (res.code === 200) {
diff --git a/src/views/service/clientServiceOrder/mixin/codeMixin.js b/src/views/service/clientServiceOrder/mixin/codeMixin.js
index db2034f..22a1625 100644
--- a/src/views/service/clientServiceOrder/mixin/codeMixin.js
+++ b/src/views/service/clientServiceOrder/mixin/codeMixin.js
@@ -89,6 +89,10 @@
         this.codenumberList.length > 0 ? this.codenumberList.replace(/,/g, "") : ""
       console.log(this.codenumberList.replace(/,/g, ""))
     },
+    validateFormNumber(){
+      this.$set(this.editConfig.infomation,'serviceNumber',this.editConfig.infomation.serviceNumber)
+      this.$refs.form.validateField('serviceNumber')
+    },
     // 閰嶇疆缂栫爜瑙勮寖鐨勮烦杞�
     numberClick() {
       window.open("http://www.fai365.com:9080/facilty", "_blank")

--
Gitblit v1.8.0