From 624e812b40ac87bf8d7a17b83b4a3bc3bbd901fb Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 03 八月 2023 18:38:58 +0800
Subject: [PATCH] 增加客户服务单(删除工单管理、消费服务单)和客户管理模块详情页

---
 src/views/client/contacts/index.vue |   74 ++++++++++++++++++++++++++++++++----
 1 files changed, 65 insertions(+), 9 deletions(-)

diff --git a/src/views/client/contacts/index.vue b/src/views/client/contacts/index.vue
index 6d2325e..ec669d5 100644
--- a/src/views/client/contacts/index.vue
+++ b/src/views/client/contacts/index.vue
@@ -1,11 +1,27 @@
 <template>
   <div class="contacts-view">
-    <SearchCommonView ref="searchCommonView" :query-class-options="queryClassOptions" :search-options="searchOptions" />
-    <div class="btn-pager">
-      <PublicFunctionBtnView :operates-list="operatesList" />
+    <div v-if="isDetail" class="detail-top">
+      <DetailListCommonBtn :query-class-options="queryClassOptions" />
       <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
     </div>
-    <TableCommonView ref="tableListRef" v-loading="loading" :table-list="tableList">
+    <div v-else class="top">
+      <SearchCommonView
+        ref="searchCommonView"
+        :query-class-options="queryClassOptions"
+        :search-options="searchOptions"
+      />
+      <div class="btn-pager">
+        <PublicFunctionBtnView :operates-list="operatesList" :allocation="false" />
+        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+      </div>
+    </div>
+    <TableCommonView
+      ref="tableListRef"
+      v-loading="loading"
+      :table-list="tableList"
+      @selContactsClick="selContactsClick"
+      @selClientClick="selClientClick"
+    >
       <template slot="tableButton">
         <el-table-column label="鎿嶄綔" width="120" fixed="right">
           <template slot-scope="scope">
@@ -18,6 +34,10 @@
     </TableCommonView>
     <!-- 鏂板缓/缂栬緫鑱旂郴浜� -->
     <AddContactsDialog v-if="editConfig.visible" :edit-contacts-config="editConfig" />
+    <!-- 鑱旂郴浜鸿鎯� -->
+    <DetailContacts v-if="contactsDeail.visible" :contacts-detail="contactsDeail" />
+    <!-- 瀹㈡埛璇︽儏 -->
+    <DetailClientManage v-if="clientDeail.visible" :client-manage-detail="clientDeail" />
   </div>
 </template>
 
@@ -27,10 +47,17 @@
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
 export default {
   name: "ContactsView",
-  props: {},
+  props: {
+    isDetail: {
+      type: Boolean,
+      default: false
+    }
+  },
   mixins: [pageMixin],
   components: {
-    AddContactsDialog
+    AddContactsDialog,
+    DetailContacts: () => import("@/views/client/contacts/DetailContacts"),
+    DetailClientManage: () => import("@/views/client/client/DetailClientManage")
   },
   computed: {},
   data() {
@@ -59,6 +86,14 @@
         visible: false,
         title: "鏂板缓",
         infomation: {}
+      },
+      contactsDeail: {
+        visible: false,
+        infomation: {}
+      },
+      clientDeail: {
+        visible: false,
+        infomation: {}
       }
     }
   },
@@ -71,8 +106,8 @@
       this.tableList = {
         tableInfomation: [],
         tableColumn: [
-          { label: "鑱旂郴浜哄鍚�", prop: "name", min: 100 }, // 鑱旂郴浜哄鍚�
-          { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 190 }, // 瀹㈡埛鍚嶇О
+          { label: "鑱旂郴浜哄鍚�", prop: "name", min: 100, isContactClick: true }, // 鑱旂郴浜哄鍚�
+          { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 190, isClientClick: true }, // 瀹㈡埛鍚嶇О
           { label: "鑱旂郴浜虹紪鍙�", prop: "number", min: 100 }, // 鑱旂郴浜虹紪鍙�
           { label: "鑱屽姟", prop: "position", min: 120 }, // 鑱屽姟
           { label: "鎵嬫満", prop: "phone", min: 100 }, // 鎵嬫満鍙风爜
@@ -156,6 +191,18 @@
     },
     getSelectArray(val) {
       console.log(val)
+    },
+    // 鑱旂郴浜鸿鎯�
+    selContactsClick(row) {
+      console.log(row)
+      this.contactsDeail.visible = true
+      this.contactsDeail.infomation = { ...row, contact_name: row.name }
+    },
+    // 瀹㈡埛鍚嶇О璇︽儏
+    selClientClick(row) {
+      console.log(row)
+      this.clientDeail.visible = true
+      this.clientDeail.infomation = { ...row, client_name: row.Client.name }
     }
   }
 }
@@ -164,7 +211,16 @@
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style lang="scss" scoped>
 .contacts-view {
-  .btn-pager {
+  .top {
+    margin-bottom: 20px;
+    .btn-pager {
+      display: flex;
+      .page {
+        margin-left: auto;
+      }
+    }
+  }
+  .detail-top {
     display: flex;
     .page {
       margin-left: auto;

--
Gitblit v1.8.0