From 13646595f3a8cb6c27a20f287c23a7649cbdff05 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 11 十月 2023 16:05:59 +0800
Subject: [PATCH] 销售线索+客户管理+联系人页面的跟进弹框编码规则获取问题更改+销售发票编码input修改为编码规则

---
 src/views/client/client/DetailClientManage.vue |  168 +++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 107 insertions(+), 61 deletions(-)

diff --git a/src/views/client/client/DetailClientManage.vue b/src/views/client/client/DetailClientManage.vue
index 966d3a5..3184063 100644
--- a/src/views/client/client/DetailClientManage.vue
+++ b/src/views/client/client/DetailClientManage.vue
@@ -28,7 +28,7 @@
             <el-tab-pane label="閿�鍞�诲崟" name="master"></el-tab-pane>
             <el-tab-pane label="閿�鍞瓙鍗�" name="sub"></el-tab-pane>
             <el-tab-pane label="閿�鍞槑缁嗗崟" name="detail"></el-tab-pane>
-            <el-tab-pane label="鏀舵鍗�" name="plan"></el-tab-pane>
+            <el-tab-pane label="鏀舵鍗�" name="receipt"></el-tab-pane>
           </el-tabs>
         </div>
         <div v-if="activeName === 'first'" class="detail">
@@ -47,7 +47,7 @@
                     <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
                   <div v-if="item.rightStr" class="right">
-                    <div class="content-title">{{ item.rightStr }}</div>
+                    <div class="content-title">{{ item.rightStr + "锛�" }}</div>
                     <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
@@ -69,7 +69,7 @@
                     <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
                   <div v-if="item.rightStr" class="right">
-                    <div class="content-title">{{ item.rightStr }}</div>
+                    <div class="content-title">{{ item.rightStr + "锛�" }}</div>
                     <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
@@ -91,7 +91,7 @@
                     <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
                   <div v-if="item.rightStr" class="right">
-                    <div class="content-title">{{ item.rightStr }}</div>
+                    <div class="content-title">{{ item.rightStr + "锛�" }}</div>
                     <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
@@ -113,11 +113,15 @@
                     <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
                   <div v-if="item.rightStr" class="right">
-                    <div class="content-title">{{ item.rightStr }}</div>
+                    <div class="content-title">{{ item.rightStr + "锛�" }}</div>
                     <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
+              <div class="business_scope">
+                <div class="content-title">{{ "缁忚惀鑼冨洿锛�" }}</div>
+                <div class="content-data">{{ detailConfig.infomation.business_scope }}</div>
+              </div>
             </div>
           </div>
           <!-- 鍦板潃淇℃伅 -->
@@ -135,11 +139,15 @@
                     <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
                   <div v-if="item.rightStr" class="right">
-                    <div class="content-title">{{ item.rightStr }}</div>
+                    <div class="content-title">{{ item.rightStr + "锛�" }}</div>
                     <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
+              <div class="business_scope">
+                <div class="content-title">{{ "鍦板潃淇℃伅" }}</div>
+                <div class="content-data">{{ detailConfig.infomation.detail_address }}</div>
+              </div>
             </div>
           </div>
           <!-- 澶囨敞淇℃伅 -->
@@ -161,7 +169,7 @@
             </div>
           </div>
           <!-- 闄勪欢淇℃伅 -->
-          <div class="basic-info">
+          <!-- <div class="basic-info">
             <div class="basic-info-label" @click="expandClick('annex')">
               <i v-if="isAnnexExpand" class="el-icon-arrow-down"></i>
               <i v-else class="el-icon-arrow-up"></i>
@@ -177,32 +185,31 @@
                 </li>
               </ul>
             </div>
-          </div>
+          </div> -->
         </div>
         <div v-if="activeName === 'contact'" class="second">
-          <Contacts :isDetail="true" />
+          <Contacts :isDetail="true" :add-config="addConfig" />
         </div>
         <div v-if="activeName === 'second'" class="second">
-          <FollowupRecords
-            :isDetail="true"
-            :follow-record="detailConfig.infomation.follow_record"
-            :add-config="addConfig"
-          />
+          <FollowupRecords :isDetail="true" :add-config="addConfig" />
         </div>
         <div v-if="activeName === 'salesOpportunity'" class="second">
-          <SalesOpportunity :isDetail="true" />
+          <SalesOpportunity :isDetail="true" :add-config="addConfig" />
         </div>
         <div v-if="activeName === 'quotation'" class="second">
-          <Quotation :isDetail="true" />
+          <Quotation :isDetail="true" :add-config="addConfig" />
         </div>
         <div v-if="activeName === 'master'" class="second">
-          <MasterOrder :isDetail="true" />
+          <MasterOrder :isDetail="true" :add-config="addConfig" />
         </div>
         <div v-if="activeName === 'sub'" class="second">
-          <SubOrder :isDetail="true" />
+          <SubOrder :isDetail="true" :add-config="addConfig" />
         </div>
         <div v-if="activeName === 'detail'" class="second">
-          <SalesDetails :isDetail="true" />
+          <SalesDetails :isDetail="true" :add-config="addConfig" />
+        </div>
+        <div v-if="activeName === 'receipt'" class="second">
+          <Receipt :isDetail="true" :add-config="addConfig" :source-type="1" />
         </div>
       </div>
     </el-drawer>
@@ -217,6 +224,8 @@
 import MasterOrder from "@/views/sales/masterOrder"
 import SubOrder from "@/views/sales/subOrder"
 import SalesDetails from "@/views/sales/salesDetails"
+import Receipt from "@/views/other/payment/receipt"
+import { getContactList } from "@/api/client/contacts"
 export default {
   name: "DetailClientManage",
   props: {
@@ -230,7 +239,7 @@
       }
     }
   },
-  components: { FollowupRecords, Contacts, SalesOpportunity, Quotation, MasterOrder, SubOrder, SalesDetails },
+  components: { FollowupRecords, Contacts, SalesOpportunity, Quotation, MasterOrder, SubOrder, SalesDetails, Receipt },
   computed: {},
   data() {
     return {
@@ -248,16 +257,28 @@
       addressInfoList: [],
       isRemarkExpand: true, // 澶囨敞淇℃伅
       isAnnexExpand: true, // 闄勪欢淇℃伅
-      addConfig: {}
+      addConfig: {},
+      contact_name: "",
+      contact_phone: "",
+      contact_position: "",
+      contact_wechat: "",
+      contact_email: ""
     }
   },
   created() {
+    this.getContactList()
     this.setData(this.detailConfig.infomation)
     this.addConfig = {
-      client: this.detailConfig.infomation.id,
+      id_name: "client_name",
+      keywordType: "瀹㈡埛鍚嶇О",
+      keyword: this.detailConfig.infomation.name,
+      id: this.detailConfig.infomation.id,
+      common_name: this.detailConfig.infomation.name,
       client_name: this.detailConfig.infomation.name,
       contact_name: this.detailConfig.infomation.contact_name,
-      client_status_id: this.detailConfig.infomation.client_status_id
+      client_status_id: this.detailConfig.infomation.client_status_id,
+      client_id: this.detailConfig.infomation.id,
+      contact_id: this.detailConfig.infomation.contact_id
     }
   },
   mounted() {},
@@ -274,7 +295,7 @@
           leftStr: "瀹㈡埛鐘舵��",
           leftValue: item.client_status,
           rightStr: "閿�鍞礋璐d汉",
-          rightValue: item.member_id
+          rightValue: item.member.username
         },
         {
           leftStr: "瀹㈡埛绫诲瀷",
@@ -291,20 +312,14 @@
         {
           leftStr: "鎵�灞炲叕娴�",
           leftValue: "",
-          rightStr: "鏈嶅姟浠h〃",
-          rightValue: ""
-        },
-        {
-          leftStr: "绛惧埌",
-          leftValue: "",
           rightStr: "涓嬫鍥炶鏃ユ湡",
-          rightValue: this.processTime(item.next_visit_time)
+          rightValue: item.next_visit_time
         },
         {
-          leftStr: "鍒涘缓鏃堕棿",
-          leftValue: "",
-          rightStr: "鏈�鏅氭湇鍔″埌鏈熸棩",
-          rightValue: this.processTime(item.latest_service_time)
+          leftStr: "鏈�鏅氭湇鍔″埌鏈熸棩",
+          leftValue: item.latest_service_time,
+          rightStr: "鍒涘缓鏃堕棿",
+          rightValue: ""
         },
         {
           leftStr: "鍒涘缓浜�",
@@ -316,19 +331,19 @@
       this.contactList = [
         {
           leftStr: "鑱旂郴浜哄鍚�",
-          leftValue: item.contact_name,
+          leftValue: this.contact_name,
           rightStr: "鑱旂郴浜烘墜鏈�",
-          rightValue: item.contact_phone
+          rightValue: this.contact_phone
         },
         {
           leftStr: "鑱旂郴浜鸿亴鍔�",
-          leftValue: "",
+          leftValue: this.contact_position,
           rightStr: "鑱旂郴浜哄井淇�",
-          rightValue: ""
+          rightValue: this.contact_wechat
         },
         {
           leftStr: "鑱旂郴浜篍mail",
-          leftValue: "",
+          leftValue: this.contact_email,
           rightStr: "",
           rightValue: ""
         }
@@ -356,7 +371,7 @@
         },
         {
           leftStr: "娉ㄥ唽鏃堕棿",
-          leftValue: this.processTime(item.registration_time),
+          leftValue: item.registration_time,
           rightStr: "娉ㄥ唽璧勯噾",
           rightValue: item.RegisteredCapital.name
         },
@@ -365,33 +380,27 @@
           leftValue: item.EnterpriseNature.name,
           rightStr: "瀹㈡埛瑙勬ā",
           rightValue: item.EnterpriseScale.name
-        },
-        {
-          leftStr: "缁忚惀鑼冨洿",
-          leftValue: item.business_scope,
-          rightStr: "",
-          rightValue: ""
         }
       ]
       this.addressInfoList = [
         {
           leftStr: "鍥藉",
-          leftValue: item.Country.name,
+          leftValue: "涓浗",
           rightStr: "鐪佷唤",
           rightValue: item.Province.name
         },
         {
           leftStr: "鍩庡競",
           leftValue: item.City.name,
-          rightStr: "鍖哄煙",
-          rightValue: item.Region.name
-        },
-        {
-          leftStr: "璇︾粏鍦板潃",
-          leftValue: item.detail_address,
           rightStr: "",
           rightValue: ""
         }
+        // {
+        //   leftStr: "璇︾粏鍦板潃",
+        //   leftValue: item.detail_address,
+        //   rightStr: "",
+        //   rightValue: ""
+        // }
       ]
     },
     handleClose() {
@@ -420,12 +429,6 @@
         this.isAnnexExpand = !this.isAnnexExpand
       }
     },
-    // 澶勭悊鏃堕棿
-    processTime(dateTime) {
-      return this.dateFormat("YYYY-mm-dd HH:MM:SS", dateTime) === "1900-01-01 08:00:00"
-        ? "--"
-        : this.dateFormat("YYYY-mm-dd HH:MM:SS", dateTime)
-    },
     // 鏃堕棿鏄剧ず
     dateFormat(fmt, date) {
       let ret = ""
@@ -446,6 +449,29 @@
         }
       }
       return fmt
+    },
+    getContactList() {
+      getContactList({
+        search_map: {
+          client_id: this.clientManageDetail.infomation.id
+        },
+        page: 0,
+        pageSize: 0
+      }).then((res) => {
+        if (res.code === 200) {
+          console.log(res.data.list)
+          if (res.data.list && res.data.list.length > 0) {
+            let data = res.data.list[0]
+            console.log(data)
+            this.contact_name = data.name
+            this.contact_phone = data.phone
+            this.contact_position = data.position
+            this.contact_wechat = data.wechat
+            this.contact_email = data.email
+          }
+        }
+        this.setData(this.detailConfig.infomation)
+      })
     }
   }
 }
@@ -544,14 +570,34 @@
                   color: #333;
                 }
               }
-              .remark {
+              .remark,
+              .all {
                 width: 100%;
+              }
+            }
+            .business_scope {
+              display: flex;
+              align-items: center;
+              font-size: 14px;
+              min-height: 40px;
+              .content-title {
+                width: 320px;
+                text-align: right;
+                color: #555;
+              }
+              .content-data {
+                flex: 1;
+                padding: 5px;
+                text-align: left;
+                margin-left: 25px;
+                color: #333;
               }
             }
           }
         }
       }
       .second {
+        height: calc(100vh - 111px);
         background: #fff;
         .followup-records {
           .table-view {

--
Gitblit v1.8.0