From 78cf30802189becef2725af73f37b5d2cb28600f Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 11 八月 2023 10:57:48 +0800
Subject: [PATCH] 新建跟进记录入参修改

---
 src/views/service/serviceFollowup/DetailServiceFollowup.vue         |   12 +++---
 src/views/client/contacts/index.vue                                 |    5 +-
 src/views/client/salesLead/DetailSalesLead.vue                      |   13 +++++-
 src/views/client/client/index.vue                                   |    7 ++-
 src/views/service/clientServiceOrder/DetailClientServiceOrder.vue   |    2 
 src/views/client/client/DetailClientManage.vue                      |   15 ++++++-
 src/views/client/followupRecords/index.vue                          |   29 ++++++++++++--
 src/views/sales/salesOpportunity/index.vue                          |    9 +++-
 src/views/client/contacts/DetailContacts.vue                        |   11 ++++-
 src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue |    8 ++--
 src/views/service/serviceFollowup/index.vue                         |    8 ++-
 11 files changed, 89 insertions(+), 30 deletions(-)

diff --git a/src/views/client/client/DetailClientManage.vue b/src/views/client/client/DetailClientManage.vue
index 9a4b6ec..966d3a5 100644
--- a/src/views/client/client/DetailClientManage.vue
+++ b/src/views/client/client/DetailClientManage.vue
@@ -183,7 +183,11 @@
           <Contacts :isDetail="true" />
         </div>
         <div v-if="activeName === 'second'" class="second">
-          <FollowupRecords :isDetail="true" />
+          <FollowupRecords
+            :isDetail="true"
+            :follow-record="detailConfig.infomation.follow_record"
+            :add-config="addConfig"
+          />
         </div>
         <div v-if="activeName === 'salesOpportunity'" class="second">
           <SalesOpportunity :isDetail="true" />
@@ -243,11 +247,18 @@
       isAddressExpand: true, // 鍦板潃淇℃伅
       addressInfoList: [],
       isRemarkExpand: true, // 澶囨敞淇℃伅
-      isAnnexExpand: true // 闄勪欢淇℃伅
+      isAnnexExpand: true, // 闄勪欢淇℃伅
+      addConfig: {}
     }
   },
   created() {
     this.setData(this.detailConfig.infomation)
+    this.addConfig = {
+      client: this.detailConfig.infomation.id,
+      client_name: this.detailConfig.infomation.name,
+      contact_name: this.detailConfig.infomation.contact_name,
+      client_status_id: this.detailConfig.infomation.client_status_id
+    }
   },
   mounted() {},
   methods: {
diff --git a/src/views/client/client/index.vue b/src/views/client/client/index.vue
index 2c75e5d..c321210 100644
--- a/src/views/client/client/index.vue
+++ b/src/views/client/client/index.vue
@@ -285,7 +285,6 @@
     },
     // 鑱旂郴浜鸿鎯�
     selContactsClick(row) {
-      console.log(row)
       this.contactsDeail.visible = true
       let contact = {}
       if (row.contacts.length !== 0) {
@@ -295,7 +294,11 @@
           }
         }
       }
-      this.contactsDeail.infomation = { ...contact, Client: { name: row.name } }
+      this.contactsDeail.infomation = {
+        ...contact,
+        Client: { name: row.name, client_status_id: row.client_status_id },
+        client_name: row.name
+      }
     },
     // 璺熻繘
     followupClick(row) {
diff --git a/src/views/client/contacts/DetailContacts.vue b/src/views/client/contacts/DetailContacts.vue
index 45574a1..98716b9 100644
--- a/src/views/client/contacts/DetailContacts.vue
+++ b/src/views/client/contacts/DetailContacts.vue
@@ -109,7 +109,7 @@
           </div>
         </div>
         <div v-if="activeName === 'second'" class="second">
-          <FollowupRecords :isDetail="true" />
+          <FollowupRecords :isDetail="true" :add-config="addConfig" />
         </div>
         <div v-if="activeName === 'detail'" class="second">
           <SalesDetails :isDetail="true" />
@@ -150,11 +150,18 @@
       isAddressExpand: true, // 鍦板潃淇℃伅
       addressInfoList: [],
       isRemarkExpand: true, // 澶囨敞淇℃伅
-      isAnnexExpand: true // 闄勪欢淇℃伅
+      isAnnexExpand: true, // 闄勪欢淇℃伅
+      addConfig: {}
     }
   },
   created() {
     this.setData(this.detailConfig.infomation)
+    this.addConfig = {
+      contact: this.detailConfig.infomation.id,
+      client_name: this.detailConfig.infomation.client_name,
+      contact_name: this.detailConfig.infomation.name,
+      client_status_id: this.detailConfig.infomation.Client.client_status_id
+    }
   },
   mounted() {},
   methods: {
diff --git a/src/views/client/contacts/index.vue b/src/views/client/contacts/index.vue
index a9ac243..4285667 100644
--- a/src/views/client/contacts/index.vue
+++ b/src/views/client/contacts/index.vue
@@ -252,13 +252,14 @@
     },
     // 瀹㈡埛鍚嶇О璇︽儏
     selClientClick(row) {
-      console.log(row)
+      // console.log(row)
       this.clientDeail.visible = true
       this.clientDeail.infomation = {
         ...row.Client,
         client_name: row.Client.name,
         client_level: row.Client.client_level.name,
-        client_status: row.Client.client_status.name
+        client_status: row.Client.client_status.name,
+        contact_name: row.name
       }
     },
     // 璺熻繘
diff --git a/src/views/client/followupRecords/index.vue b/src/views/client/followupRecords/index.vue
index 3572cff..bb04e8b 100644
--- a/src/views/client/followupRecords/index.vue
+++ b/src/views/client/followupRecords/index.vue
@@ -56,6 +56,18 @@
     isDetail: {
       type: Boolean,
       default: false
+    },
+    followRecord: {
+      type: Array,
+      default: () => []
+    },
+    addConfig: {
+      type: Object,
+      default: () => {
+        return {
+          sales_leads_name: ""
+        }
+      }
     }
   },
   mixins: [pageMixin],
@@ -116,7 +128,11 @@
   },
   created() {
     this.setTable()
-    this.getData()
+    if (!this.isDetail) {
+      this.getData()
+    } else {
+      this.tableList.tableInfomation = this.followRecord
+    }
   },
   methods: {
     setTable() {
@@ -194,7 +210,7 @@
     addBtnClick() {
       this.editConfig.visible = true
       this.editConfig.title = "鏂板缓"
-      this.editConfig.infomation = {}
+      this.editConfig.infomation = { ...this.addConfig }
     },
     // 缂栬緫
     handleClick(row) {
@@ -238,7 +254,11 @@
     selContactsClick(row) {
       console.log(row)
       this.contactsDeail.visible = true
-      this.contactsDeail.infomation = { ...row.contact, Client: { name: row.client_name } }
+      this.contactsDeail.infomation = {
+        ...row.contact,
+        Client: { name: row.client_name, client_status_id: row.client.client_status_id },
+        client_name: row.client_name
+      }
     },
     // 瀹㈡埛鍚嶇О璇︽儏
     selClientClick(row) {
@@ -248,7 +268,8 @@
         ...row.client,
         client_name: row.client.name,
         client_level: row.client.client_level.name,
-        client_status: row.client.client_status.name
+        client_status: row.client.client_status.name,
+        contact_name: row.contact_name
       }
     }
   }
diff --git a/src/views/client/salesLead/DetailSalesLead.vue b/src/views/client/salesLead/DetailSalesLead.vue
index f10ef5c..1172a5a 100644
--- a/src/views/client/salesLead/DetailSalesLead.vue
+++ b/src/views/client/salesLead/DetailSalesLead.vue
@@ -105,7 +105,11 @@
           </div>
         </div>
         <div v-if="activeName === 'second'" class="second">
-          <FollowupRecords :isDetail="true" />
+          <FollowupRecords
+            :isDetail="true"
+            :follow-record="detailConfig.infomation.FollowRecord"
+            :add-config="addConfig"
+          />
         </div>
       </div>
     </el-drawer>
@@ -140,11 +144,16 @@
       isAddressExpand: true, // 鍦板潃淇℃伅
       addressInfoList: [],
       isRemarkExpand: true, // 澶囨敞淇℃伅
-      remarkInfoList: []
+      remarkInfoList: [],
+      addConfig: {}
     }
   },
   created() {
     this.setData()
+    this.addConfig = {
+      sealsLead: this.detailConfig.infomation.id,
+      sales_leads_name: this.detailConfig.infomation.name
+    }
   },
   mounted() {},
   methods: {
diff --git a/src/views/sales/salesOpportunity/index.vue b/src/views/sales/salesOpportunity/index.vue
index b9071f5..9518def 100644
--- a/src/views/sales/salesOpportunity/index.vue
+++ b/src/views/sales/salesOpportunity/index.vue
@@ -224,13 +224,18 @@
     selClientClick(row) {
       console.log(row)
       this.clientDeail.visible = true
-      this.clientDeail.infomation = { ...row, client_name: row.name }
+      this.clientDeail.infomation = {
+        ...row.client,
+        client_name: row.client.name,
+        client_level: row.client.client_level.name,
+        client_status: row.client.client_status.name
+      }
     },
     // 鑱旂郴浜鸿鎯�
     selContactsClick(row) {
       console.log(row)
       this.contactsDeail.visible = true
-      this.contactsDeail.infomation = { ...row }
+      this.contactsDeail.infomation = { ...row.contact }
     },
     // 鏈轰細鍚嶇О璇︽儏
     selCommonClick(row) {
diff --git a/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue b/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue
index d2f6883..6483d54 100644
--- a/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue
+++ b/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue
@@ -306,10 +306,10 @@
           <div class="basic-info-view">
             <el-row>
               <el-col :span="12">
-                <el-form-item label="澶勭悊鐘舵��" prop="status">
+                <el-form-item label="澶勭悊鐘舵��" prop="serviceOrderStatusId">
                   <div class="common-select">
                     <el-select
-                      v-model="editConfig.infomation.status"
+                      v-model="editConfig.infomation.serviceOrderStatusId"
                       placeholder="璇烽�夋嫨"
                       class="common-select-sel"
                       size="mini"
@@ -603,7 +603,7 @@
         subject: [{ required: true, message: "璇疯緭鍏ヤ富棰�", trigger: "blur" }],
         productCategory: [{ required: true, message: "璇烽�夋嫨浜у搧绫诲埆", trigger: "change" }],
         serviceManId: [{ required: true, message: "璇烽�夋嫨浜у搧绫诲埆", trigger: "change" }],
-        status: [{ required: true, message: "璇烽�夋嫨鏁呴殰绫诲埆", trigger: "change" }],
+        serviceOrderStatusId: [{ required: true, message: "璇烽�夋嫨鏁呴殰绫诲埆", trigger: "change" }],
         problemDesc: [{ required: true, message: "璇疯緭鍏ラ棶棰樻弿杩�", trigger: "blur" }]
       },
       faultTypeOptions: [{ id: 1, name: "鏈嶅姟鍥炶" }], // 鏁呴殰绫诲埆
@@ -761,7 +761,7 @@
         severity: data.severity || 0,
         solution: data.solution || "",
         solutionRemark: data.solutionRemark || "",
-        status: data.status || 0,
+        serviceOrderStatusId: data.serviceOrderStatusId || 0,
         subject: data.subject || "",
         timeSpentId: data.timeSpentId || 0
       }
diff --git a/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue b/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue
index c113f4b..ccd05dd 100644
--- a/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue
+++ b/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue
@@ -395,7 +395,7 @@
       this.dynamicInfoList = [
         {
           leftStr: "澶勭悊鐘舵��",
-          leftValue: data.status,
+          leftValue: data.serviceOrderStatusId,
           rightStr: "鏈�鏂板垎閰嶆椂闂�",
           rightValue: ""
         },
diff --git a/src/views/service/serviceFollowup/DetailServiceFollowup.vue b/src/views/service/serviceFollowup/DetailServiceFollowup.vue
index d0a986f..9b53e73 100644
--- a/src/views/service/serviceFollowup/DetailServiceFollowup.vue
+++ b/src/views/service/serviceFollowup/DetailServiceFollowup.vue
@@ -139,25 +139,25 @@
         },
         {
           leftStr: "鍥炶浜�",
-          leftValue: item.isVisit,
+          leftValue: item.Member.username,
           rightStr: "椤圭洰璁″垝",
           rightValue: ""
         },
         {
           leftStr: "婊℃剰搴�",
-          leftValue: item.satisfaction,
+          leftValue: item.satisfaction.name,
           rightStr: "鍙婃椂鐜�",
-          rightValue: item.timelyRate
+          rightValue: item.timelyRate.name
         },
         {
           leftStr: "瑙e喅鐜�",
-          leftValue: "",
+          leftValue: item.solveRate.name,
           rightStr: "鍘熸湇鍔′汉鍛�",
-          rightValue: ""
+          rightValue: item.oldMember.username
         },
         {
           leftStr: "鏈嶅姟浜哄憳鏄惁鏉ヨ繃",
-          leftValue: "",
+          leftValue: item.isVisit.name,
           rightStr: "鍒涘缓鏃堕棿",
           rightValue: ""
         },
diff --git a/src/views/service/serviceFollowup/index.vue b/src/views/service/serviceFollowup/index.vue
index d6f6588..5fb5107 100644
--- a/src/views/service/serviceFollowup/index.vue
+++ b/src/views/service/serviceFollowup/index.vue
@@ -133,8 +133,8 @@
           { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 130, isClientClick: true }, // 瀹㈡埛鍚嶇О
           { label: "鑱旂郴浜哄鍚�", prop: "contact_name", isContactClick: true }, // 鑱旂郴浜哄鍚�
           { label: "瀹㈡埛鏈嶅姟鍗�", prop: "client_service_order", isServiceOrder: true }, // 瀹㈡埛鏈嶅姟鍗�
-          { label: "鍥炶浜�", prop: "isVisit" }, // 鍥炶浜�
-          { label: "婊℃剰搴�", prop: "satisfaction" } // 婊℃剰搴�
+          { label: "鍥炶浜�", prop: "member_name" }, // 鍥炶浜�
+          { label: "婊℃剰搴�", prop: "satisfaction_name" } // 婊℃剰搴�
           // { label: "淇敼鏃堕棿", prop: "modifyTime" } // 淇敼鏃堕棿
         ]
       }
@@ -163,7 +163,9 @@
                   ...item,
                   client_service_order: item.ServiceOrder.serviceNumber,
                   client_name: item.client.name,
-                  contact_name: item.contact.name
+                  contact_name: item.contact.name,
+                  member_name: item.Member.username,
+                  satisfaction_name: item.satisfaction.name
                 }
               })
               this.tableList.tableInfomation = list || []

--
Gitblit v1.8.0