From ed2f130164f4145560b4176da6629890c0806ded Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 10 八月 2023 18:11:27 +0800
Subject: [PATCH] 服务管理模块联调

---
 src/views/service/serviceContract/AddServiceContractDialog.vue      |  327 ++++++++++++---
 src/api/serviceManage/serviceFollowup.js                            |    5 
 src/views/client/client/index.vue                                   |    2 
 src/store/modules/getClientName.js                                  |   30 +
 src/views/service/serviceContract/DetailServiceContract.vue         |   59 +-
 src/views/client/salesLead/AdvanceDialog.vue                        |   18 
 src/views/service/serviceFollowup/AddServiceFollowupDialog.vue      |  221 +++++++---
 src/views/service/clientServiceOrder/DetailClientServiceOrder.vue   |    6 
 src/views/client/client/DetailClientManage.vue                      |   30 
 src/components/makepager/SearchCommonView.vue                       |   12 
 src/views/other/commonDialog/SelectCommonDialog.vue                 |   25 +
 src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue |   34 -
 src/views/service/serviceFollowup/DetailServiceFollowup.vue         |   24 
 src/views/client/contacts/index.vue                                 |   19 
 src/api/serviceManage/clientServiceOrder.js                         |   10 
 src/views/client/salesLead/index.vue                                |    2 
 src/views/client/followupRecords/index.vue                          |   27 +
 src/api/common/other.js                                             |    8 
 src/views/service/clientServiceOrder/index.vue                      |   92 +++-
 src/views/client/contacts/DetailContacts.vue                        |   12 
 src/views/service/serviceContract/index.vue                         |   94 +++-
 src/views/service/serviceFollowup/index.vue                         |   98 +++-
 src/api/serviceManage/serviceContract.js                            |    5 
 23 files changed, 819 insertions(+), 341 deletions(-)

diff --git a/src/api/common/other.js b/src/api/common/other.js
index 2ef9c72..237b1b0 100644
--- a/src/api/common/other.js
+++ b/src/api/common/other.js
@@ -39,3 +39,11 @@
     method: "get"
   })
 }
+
+// 鑾峰彇鏈嶅姟鍚堝悓绫诲瀷
+export function getServiceContractTypeList() {
+  return request({
+    url: "/api/serviceContractType/list",
+    method: "get"
+  })
+}
diff --git a/src/api/serviceManage/clientServiceOrder.js b/src/api/serviceManage/clientServiceOrder.js
index cd3b4e4..8ccdc04 100644
--- a/src/api/serviceManage/clientServiceOrder.js
+++ b/src/api/serviceManage/clientServiceOrder.js
@@ -1,10 +1,11 @@
 import request from "@/common/untils/request.js"
 
 // 鏈嶅姟鍗曞垪琛�
-export function getServiceOrderList() {
+export function getServiceOrderList(data) {
   return request({
     url: "/api/serviceOrder/list",
-    method: "get"
+    method: "post",
+    data
   })
 }
 // 娣诲姞鏈嶅姟鍗�
@@ -18,8 +19,9 @@
 // 鍒犻櫎鏈嶅姟鍗�
 export function getDelServiceOrder(data) {
   return request({
-    url: "/api/serviceOrder/delete/" + data.id,
-    method: "delete"
+    url: "/api/serviceOrder/delete",
+    method: "delete",
+    data
   })
 }
 // 鏇存柊鏈嶅姟鍗�
diff --git a/src/api/serviceManage/serviceContract.js b/src/api/serviceManage/serviceContract.js
index f3a528f..49e079a 100644
--- a/src/api/serviceManage/serviceContract.js
+++ b/src/api/serviceManage/serviceContract.js
@@ -19,8 +19,9 @@
 // 鍒犻櫎鏈嶅姟鍚堝悓
 export function getDelServiceContract(data) {
   return request({
-    url: "/api/serviceContract/delete/" + data.id,
-    method: "delete"
+    url: "/api/serviceContract/delete",
+    method: "delete",
+    data
   })
 }
 // 鏇存柊鏈嶅姟鍚堝悓
diff --git a/src/api/serviceManage/serviceFollowup.js b/src/api/serviceManage/serviceFollowup.js
index c9b5669..3ca3f47 100644
--- a/src/api/serviceManage/serviceFollowup.js
+++ b/src/api/serviceManage/serviceFollowup.js
@@ -19,8 +19,9 @@
 // 鍒犻櫎鏈嶅姟鍥炶鍗�
 export function getDelServiceFollowup(data) {
   return request({
-    url: "/api/serviceFollowup/delete/" + data.id,
-    method: "delete"
+    url: "/api/serviceFollowup/delete",
+    method: "delete",
+    data
   })
 }
 // 鏇存柊鏈嶅姟鍥炶鍗�
diff --git a/src/components/makepager/SearchCommonView.vue b/src/components/makepager/SearchCommonView.vue
index ed2292d..5976c3b 100644
--- a/src/components/makepager/SearchCommonView.vue
+++ b/src/components/makepager/SearchCommonView.vue
@@ -14,8 +14,7 @@
       <div class="search">
         <el-input placeholder="璇疯緭鍏ュ唴瀹�" v-model="searchInput" class="input-with-select" clearable>
           <el-select v-model="searchSelValue" slot="prepend" placeholder="璇烽�夋嫨" class="search-sel">
-            <el-option v-for="item in searchOptions" :key="item.value" :label="item.label" :value="item.value">
-            </el-option>
+            <el-option v-for="item in searchOptions" :key="item.value" :label="item.label" :value="item"> </el-option>
           </el-select>
           <!-- <i slot="suffix" class="el-icon-search" style="cursor: pointer" @click="searchClick"></i> -->
         </el-input>
@@ -110,8 +109,13 @@
       default: () => []
     },
     searchSel: {
-      type: String,
-      default: "name"
+      type: Object,
+      default: () => {
+        return {
+          value: "name",
+          label: ""
+        }
+      }
     },
     searchOptions: {
       type: Array,
diff --git a/src/store/modules/getClientName.js b/src/store/modules/getClientName.js
index b815996..9a474ce 100644
--- a/src/store/modules/getClientName.js
+++ b/src/store/modules/getClientName.js
@@ -6,6 +6,8 @@
 import { getServiceContractList } from "@/api/serviceManage/serviceContract"
 import { getContractList } from "@/api/sales/contractManage"
 import { getSalesDetailsList } from "@/api/sales/salesDetails"
+import { getQuotationList } from "@/api/sales/quotation"
+import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder"
 import { Message } from "element-ui"
 
 export default {
@@ -17,7 +19,9 @@
     masterOrderList: [], // 閿�鍞�诲崟
     serviceContractList: [], // 鏈嶅姟鍚堝悓
     getContractList: [], // 鍚堝悓璁㈠崟
-    salesDetailsList: [] // 閿�鍞槑缁嗗崟
+    salesDetailsList: [], // 閿�鍞槑缁嗗崟
+    quotationList: [], // 鎶ヤ环鍗�
+    serviceOrderList: [] // 瀹㈡埛鏈嶅姟鍗�
   },
   mutations: {
     clientNameList(state, payload) {
@@ -43,6 +47,12 @@
     },
     salesDetailsList(state, payload) {
       state.salesDetailsList = payload
+    },
+    quotationList(state, payload) {
+      state.quotationList = payload
+    },
+    serviceOrderList(state, payload) {
+      state.serviceOrderList = payload
     }
   },
   actions: {
@@ -117,6 +127,24 @@
           Message.error(res.msg)
         }
       })
+    },
+    geQuotation(context) {
+      getQuotationList().then((res) => {
+        if (res.code == 200) {
+          context.commit("quotationList", res.data.list)
+        } else {
+          Message.error(res.msg)
+        }
+      })
+    },
+    geServiceOrder(context) {
+      getServiceOrderList().then((res) => {
+        if (res.code == 200) {
+          context.commit("serviceOrderList", res.data.data)
+        } else {
+          Message.error(res.msg)
+        }
+      })
     }
   }
 }
diff --git a/src/views/client/client/DetailClientManage.vue b/src/views/client/client/DetailClientManage.vue
index 428d650..9a4b6ec 100644
--- a/src/views/client/client/DetailClientManage.vue
+++ b/src/views/client/client/DetailClientManage.vue
@@ -44,11 +44,11 @@
                 <li v-for="(item, i) in basicInfoList" :key="i">
                   <div class="left">
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
-                    <div class="content-data">{{ item.leftValue }}</div>
+                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
-                    <div class="content-data">{{ item.rightValue }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
@@ -66,11 +66,11 @@
                 <li v-for="(item, i) in contactList" :key="i">
                   <div class="left">
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
-                    <div class="content-data">{{ item.leftValue }}</div>
+                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
-                    <div class="content-data">{{ item.rightValue }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
@@ -88,11 +88,11 @@
                 <li v-for="(item, i) in dynamicInfoList" :key="i">
                   <div class="left">
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
-                    <div class="content-data">{{ item.leftValue }}</div>
+                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
-                    <div class="content-data">{{ item.rightValue }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
@@ -110,11 +110,11 @@
                 <li v-for="(item, i) in businessInfoList" :key="i">
                   <div class="left">
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
-                    <div class="content-data">{{ item.leftValue }}</div>
+                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
-                    <div class="content-data">{{ item.rightValue }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
@@ -132,11 +132,11 @@
                 <li v-for="(item, i) in addressInfoList" :key="i">
                   <div class="left">
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
-                    <div class="content-data">{{ item.leftValue }}</div>
+                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
-                    <div class="content-data">{{ item.rightValue }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
diff --git a/src/views/client/client/index.vue b/src/views/client/client/index.vue
index 63111a9..2c75e5d 100644
--- a/src/views/client/client/index.vue
+++ b/src/views/client/client/index.vue
@@ -213,7 +213,7 @@
     searchClick(val, content) {
       console.log(val, content)
       this.search_map = {
-        [val]: content
+        [val.value]: content
       }
       this.getData()
     },
diff --git a/src/views/client/contacts/DetailContacts.vue b/src/views/client/contacts/DetailContacts.vue
index 38a94bb..45574a1 100644
--- a/src/views/client/contacts/DetailContacts.vue
+++ b/src/views/client/contacts/DetailContacts.vue
@@ -39,11 +39,11 @@
                 <li v-for="(item, i) in basicInfoList" :key="i">
                   <div class="left">
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
-                    <div class="content-data">{{ item.leftValue }}</div>
+                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
-                    <div class="content-data">{{ item.rightValue }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
@@ -61,11 +61,11 @@
                 <li v-for="(item, i) in addressInfoList" :key="i">
                   <div class="left">
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
-                    <div class="content-data">{{ item.leftValue }}</div>
+                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
-                    <div class="content-data">{{ item.rightValue }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
diff --git a/src/views/client/contacts/index.vue b/src/views/client/contacts/index.vue
index 014eb51..a9ac243 100644
--- a/src/views/client/contacts/index.vue
+++ b/src/views/client/contacts/index.vue
@@ -9,6 +9,8 @@
         ref="searchCommonView"
         :query-class-options="queryClassOptions"
         :search-options="searchOptions"
+        @searchClick="searchClick"
+        @resetClick="resetClick"
       />
       <div class="btn-pager">
         <PublicFunctionBtnView :operates-list="operatesList" :allocation="false" @batchDelete="delClick" />
@@ -105,7 +107,8 @@
         visible: false,
         title: "鏂板缓",
         infomation: {}
-      }
+      },
+      search_map: {}
     }
   },
   created() {
@@ -137,7 +140,7 @@
     async getData() {
       this.loading = true
       await getContactList({
-        keyword: "",
+        search_map: this.search_map,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       })
@@ -168,6 +171,18 @@
           this.loading = false
         })
     },
+    // 鎼滅储
+    searchClick(val, content) {
+      console.log(val, content)
+      this.search_map = {
+        [val.value]: content
+      }
+      this.getData()
+    },
+    resetClick() {
+      this.search_map = {}
+      this.getData()
+    },
     // 鏂板缓
     addBtnClick() {
       this.editConfig.visible = true
diff --git a/src/views/client/followupRecords/index.vue b/src/views/client/followupRecords/index.vue
index a9486b0..3572cff 100644
--- a/src/views/client/followupRecords/index.vue
+++ b/src/views/client/followupRecords/index.vue
@@ -9,6 +9,9 @@
         ref="searchCommonView"
         :query-class-options="queryClassOptions"
         :search-options="searchOptions"
+        :search-sel="searchSel"
+        @searchClick="searchClick"
+        @resetClick="resetClick"
       />
       <div class="btn-pager">
         <PublicFunctionBtnView :statistics="true" :operates-list="operatesList" @batchDelete="delClick" />
@@ -103,7 +106,12 @@
         visible: false,
         infomation: {}
       },
-      selValueList: []
+      selValueList: [],
+      searchSel: {
+        value: "topic",
+        label: ""
+      },
+      search_map: {}
     }
   },
   created() {
@@ -129,14 +137,15 @@
       this.searchOptions = []
       for (let i = 0; i < this.tableList.tableColumn.length; i++) {
         const label = this.tableList.tableColumn[i].label
-        this.searchOptions.push({ value: (i + 1).toString(), label: label })
+        const value = this.tableList.tableColumn[i].prop
+        this.searchOptions.push({ value: value, label: label })
       }
     },
     // 璇锋眰鏁版嵁
     async getData() {
       this.loading = true
       await getFollowRecordList({
-        keyword: "",
+        search_map: this.search_map,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       })
@@ -169,6 +178,18 @@
           this.loading = false
         })
     },
+    // 鎼滅储
+    searchClick(val, content) {
+      console.log(val, content)
+      this.search_map = {
+        [val.value]: content
+      }
+      this.getData()
+    },
+    resetClick() {
+      this.search_map = {}
+      this.getData()
+    },
     // 鏂板缓
     addBtnClick() {
       this.editConfig.visible = true
diff --git a/src/views/client/salesLead/AdvanceDialog.vue b/src/views/client/salesLead/AdvanceDialog.vue
index 849f044..68e6ba0 100644
--- a/src/views/client/salesLead/AdvanceDialog.vue
+++ b/src/views/client/salesLead/AdvanceDialog.vue
@@ -95,18 +95,18 @@
   },
   methods: {
     setData(status) {
-      if (status === 1) {
-        this.options = ["鏂板缓", "澶辫触鍏抽棴", "鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�"]
-        this.value = "澶辫触鍏抽棴"
-        this.value1 = "澶辫触鍏抽棴"
-      } else if (status === -1) {
-        this.options = ["鏂板缓", "璺熻繘涓�", "鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�"]
-        this.value = "鍗囩骇鍒板鎴�"
-        this.value1 = "鍗囩骇鍒板鎴�"
-      } else {
+      if (status === 0) {
         this.options = ["璺熻繘涓�", "澶辫触鍏抽棴", "鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�"]
         this.value = "璺熻繘涓�"
         this.value1 = "璺熻繘涓�"
+      } else if (status === 1) {
+        this.options = ["澶辫触鍏抽棴", "鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�"]
+        this.value = "澶辫触鍏抽棴"
+        this.value1 = "澶辫触鍏抽棴"
+      } else if (status === -1) {
+        this.options = ["鍗囩骇鍒板鎴�", "鍗囩骇鍒板鎴峰拰閿�鍞満浼�"]
+        this.value = "鍗囩骇鍒板鎴�"
+        this.value1 = "鍗囩骇鍒板鎴�"
       }
     },
     handleClose() {
diff --git a/src/views/client/salesLead/index.vue b/src/views/client/salesLead/index.vue
index ad1e2e0..73e5bee 100644
--- a/src/views/client/salesLead/index.vue
+++ b/src/views/client/salesLead/index.vue
@@ -175,7 +175,7 @@
     searchClick(val, content) {
       console.log(val, content)
       this.search_map = {
-        [val]: content
+        [val.value]: content
       }
       this.getData()
     },
diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index 8e42445..f3dd1e3 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -97,6 +97,27 @@
             { label: "鍚堣", prop: "tptal" } // 鍚堣
           ]
         }
+      } else if (this.editConfig.title === "鎶ヤ环鍗�") {
+        this.tableList = {
+          tableInfomation: this.editConfig.tableInfomation,
+          tableColumn: [
+            { label: "鎶ヤ环鍗曞彿", prop: "number", isClick: true }, // 鎶ヤ环鍗曞彿
+            { label: "閿�鍞礋璐d汉", prop: "memberId" } // 閿�鍞礋璐d汉
+          ]
+        }
+      } else if (this.editConfig.title === "瀹㈡埛鏈嶅姟鍗�") {
+        this.tableList = {
+          tableInfomation: this.editConfig.tableInfomation,
+          tableColumn: [
+            { label: "鏈嶅姟鍗曠紪鍙�", prop: "serviceNumber", isClick: true }, // 鏈嶅姟鍗曠紪鍙�
+            { label: "涓婚", prop: "subject" }, // 涓婚
+            { label: "鏈嶅姟鏂瑰紡", prop: "serviceType_name" }, // 鏈嶅姟鏂瑰紡
+            { label: "鏈嶅姟浜哄憳", prop: "serviceManId" }, // 鏈嶅姟浜哄憳
+            { label: "浼樺厛绾у埆", prop: "priorityLevelId" }, // 浼樺厛绾у埆
+            { label: "澶勭悊鐘舵��", prop: "status" }, // 澶勭悊鐘舵��
+            { label: "瀹㈡埛绛惧悕", prop: "qianming" } // 瀹㈡埛绛惧悕
+          ]
+        }
       }
 
       this.commonOptions = [{ id: 1, name: "鍏ㄩ儴瀛楁" }]
@@ -116,6 +137,10 @@
         this.$emit("selClient", row, "serviceContract")
       } else if (this.editConfig.title === "閿�鍞槑缁嗗崟") {
         this.$emit("selClient", row, "contract")
+      } else if (this.editConfig.title === "鎶ヤ环鍗�") {
+        this.$emit("selClient", row, "quotation")
+      } else if (this.editConfig.title === "瀹㈡埛鏈嶅姟鍗�") {
+        this.$emit("selClient", row, "customService")
       }
     }
   }
diff --git a/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue b/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue
index d1571bf..d2f6883 100644
--- a/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue
+++ b/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue
@@ -81,6 +81,7 @@
                       class="common-select-sel"
                       size="mini"
                     >
+                      <!-- @focus="getFaultTypeList" -->
                       <el-option v-for="item in faultTypeOptions" :key="item.id" :label="item.name" :value="item.id">
                       </el-option>
                     </el-select>
@@ -520,7 +521,7 @@
         :edit-common-config="editSelectClientConfig"
         @selClient="selClient"
       />
-      <!-- 閫夋嫨鏈嶅姟鍚堝悓 -->
+      <!-- 閫夋嫨鏈嶅姟鍚堝悓 鍚堝悓璁㈠崟 -->
       <SelectCommonDialog
         v-if="editSelCommonConfig.editVisible"
         :edit-common-config="editSelCommonConfig"
@@ -680,15 +681,12 @@
       }
     },
     getCommonData() {
-      getAllData()
-        .then((res) => {
-          this.memberOptions = res.data.member
-          this.serviceManOptions = res.data.member
-          this.reportSourceOptions = res.data.reportSource
-        })
-        .catch((err) => {
-          console.log(err)
-        })
+      getAllData().then((res) => {
+        this.memberOptions = res.data.member
+        this.serviceManOptions = res.data.member
+        this.reportSourceOptions = res.data.reportSource
+      })
+      this.getServiceTypeList()
     },
     // 淇濆瓨
     saveClick(formName) {
@@ -899,17 +897,11 @@
       }
     },
     // 鏁呴殰绫诲埆
-    async getFaultTypeList(e) {
-      if (e) {
-        await getFaultTypeList()
-          .then((res) => {
-            console.log(res)
-            this.faultTypeOptions = res.data.data
-          })
-          .catch((err) => {
-            console.log(err)
-          })
-      }
+    async getFaultTypeList() {
+      await getFaultTypeList().then((res) => {
+        console.log(res)
+        this.faultTypeOptions = res.data.data
+      })
     },
     // 鏈嶅姟鏂瑰紡
     async getServiceTypeList() {
diff --git a/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue b/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue
index d7446de..c113f4b 100644
--- a/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue
+++ b/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue
@@ -40,7 +40,7 @@
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
                     <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
                     <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
@@ -62,7 +62,7 @@
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
                     <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
                     <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
@@ -84,7 +84,7 @@
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
                     <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
                     <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
diff --git a/src/views/service/clientServiceOrder/index.vue b/src/views/service/clientServiceOrder/index.vue
index 689a8c8..d231635 100644
--- a/src/views/service/clientServiceOrder/index.vue
+++ b/src/views/service/clientServiceOrder/index.vue
@@ -9,9 +9,17 @@
         ref="searchCommonView"
         :query-class-options="queryClassOptions"
         :search-options="searchOptions"
+        :search-sel="searchSel"
+        @searchClick="searchClick"
+        @resetClick="resetClick"
       />
       <div class="btn-pager">
-        <PublicFunctionBtnView :receive="true" :submit-approval="true" :operates-list="operatesList" />
+        <PublicFunctionBtnView
+          :receive="true"
+          :submit-approval="true"
+          :operates-list="operatesList"
+          @batchDelete="delClick"
+        />
         <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
       </div>
     </div>
@@ -21,12 +29,13 @@
       :select-box="!isDetail"
       @selClientClick="selClientClick"
       @selCommonClick="selCommonClick"
+      @getSelectArray="getSelectArray"
     >
       <template slot="tableButton">
-        <el-table-column label="鎿嶄綔" width="90">
+        <el-table-column label="鎿嶄綔" width="60">
           <template slot-scope="scope">
             <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button>
-            <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button>
+            <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button> -->
           </template>
         </el-table-column>
       </template>
@@ -93,7 +102,12 @@
       clientDeail: {
         visible: false,
         infomation: {}
-      }
+      },
+      searchSel: {
+        value: "serviceNumber",
+        label: "鏈嶅姟鍗曠紪鍙�"
+      },
+      selValueList: []
     }
   },
   created() {
@@ -118,13 +132,19 @@
       this.searchOptions = []
       for (let i = 0; i < this.tableList.tableColumn.length; i++) {
         const label = this.tableList.tableColumn[i].label
-        this.searchOptions.push({ value: (i + 1).toString(), label: label })
+        const value = this.tableList.tableColumn[i].prop
+        this.searchOptions.push({ value: value, label: label })
       }
     },
     // 璇锋眰鏁版嵁
-    async getData() {
+    async getData(keyword, keywordType) {
       this.loading = true
-      await getServiceOrderList()
+      await getServiceOrderList({
+        keyword: keyword,
+        keywordType: keywordType,
+        page: this.pagerOptions.currPage,
+        pageSize: this.pagerOptions.pageSize
+      })
         .then((res) => {
           console.log(res)
           if (res.code === 200) {
@@ -157,6 +177,15 @@
     tabsClick(tab, event) {
       console.log(tab, event)
     },
+    // 鎼滅储
+    searchClick(val, content) {
+      console.log(val, content)
+      this.getData(content, val.label)
+    },
+    resetClick() {
+      this.search_map = {}
+      this.getData()
+    },
     // 鏂板缓
     addBtnClick() {
       this.editConfig.visible = true
@@ -171,33 +200,46 @@
       this.editConfig.infomation = { ...row }
     },
     // 鍒犻櫎
-    delClick(id) {
-      this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
-        confirmButtonText: "纭畾",
-        cancelButtonText: "鍙栨秷",
-        type: "warning"
-      })
-        .then(function () {
-          return getDelServiceOrder({ id: id })
+    delClick() {
+      if (this.selValueList && this.selValueList.length > 0) {
+        this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning"
         })
-        .then((response) => {
-          if (response.code === 200) {
-            this.$message.success("鍒犻櫎鎴愬姛")
-            this.getData()
-          } else {
-            this.$message.warning("鍒犻櫎澶辫触")
-          }
-        })
-        .catch(function () {})
+          .then(() => {
+            getDelServiceOrder({ ids: this.selValueList }).then((response) => {
+              if (response.code === 200) {
+                this.$message.success("鍒犻櫎鎴愬姛")
+                this.getData()
+              } else {
+                this.$message.warning("鍒犻櫎澶辫触")
+              }
+            })
+          })
+          .catch(() => {})
+      } else {
+        this.$message.warning("璇疯嚦灏戦�夋嫨涓�鏉¤褰�")
+      }
     },
     getSelectArray(val) {
       console.log(val)
+      this.selValueList = []
+      const list = val.map((item) => {
+        return item.id
+      })
+      this.selValueList = list
     },
     // 瀹㈡埛鍚嶇О璇︽儏
     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
+      }
     },
     // 瀹㈡埛鏈嶅姟鍗曡鎯�
     selCommonClick(row) {
diff --git a/src/views/service/serviceContract/AddServiceContractDialog.vue b/src/views/service/serviceContract/AddServiceContractDialog.vue
index 0e5110a..fe2da95 100644
--- a/src/views/service/serviceContract/AddServiceContractDialog.vue
+++ b/src/views/service/serviceContract/AddServiceContractDialog.vue
@@ -28,14 +28,18 @@
                   <div class="custom-name">
                     <el-autocomplete
                       v-model="editConfig.infomation.client_name"
-                      :fetch-suggestions="querySearchAsync"
+                      :fetch-suggestions="
+                        (queryString, callback) => {
+                          querySearchAsync(queryString, callback, 'client')
+                        }
+                      "
                       value-key="name"
-                      @select="handleSelectClient"
+                      @select="handleSelectClient('client', $event)"
                     ></el-autocomplete>
-                    <div class="common-select-btn" @click="selClientClick">
+                    <div class="common-select-btn" @click="selClientClick('client')">
                       <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
                     </div>
-                    <div class="common-select-btn" @click="clearupClient">
+                    <div class="common-select-btn" @click="clearupClient('client')">
                       <i class="el-icon-edit-outline" title="娓呴櫎"></i>
                     </div>
                   </div>
@@ -62,36 +66,88 @@
               <el-col :span="12">
                 <el-form-item label="鑱旂郴浜哄鍚�" prop="contactId">
                   <div class="custom-name">
-                    <el-input v-model="editConfig.infomation.contactId"></el-input>
-                    <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="閫夋嫨"></i></div>
-                    <div class="common-select-btn"><i class="el-icon-edit" title="缂栬緫"></i></div>
+                    <el-autocomplete
+                      v-model="editConfig.infomation.contact_name"
+                      :fetch-suggestions="
+                        (queryString, callback) => {
+                          querySearchAsync(queryString, callback, 'contact')
+                        }
+                      "
+                      value-key="name"
+                      @select="handleSelectClient('contact', $event)"
+                    ></el-autocomplete>
+                    <div class="common-select-btn" @click="selClientClick('contact')">
+                      <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
+                    </div>
+                    <div class="common-select-btn" @click="clearupClient('contact')">
+                      <i class="el-icon-edit-outline" title="娓呴櫎"></i>
+                    </div>
                   </div>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="閿�鍞満浼�" prop="saleChanceId">
                   <div class="custom-name">
-                    <el-input v-model="editConfig.infomation.saleChanceId"></el-input>
-                    <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="閫夋嫨"></i></div>
-                    <div class="common-select-btn"><i class="el-icon-edit" title="缂栬緫"></i></div>
+                    <el-autocomplete
+                      v-model="editConfig.infomation.sale_chance_name"
+                      :fetch-suggestions="
+                        (queryString, callback) => {
+                          querySearchAsync(queryString, callback, 'chance')
+                        }
+                      "
+                      value-key="name"
+                      @select="handleSelectClient('chance', $event)"
+                    ></el-autocomplete>
+                    <div class="common-select-btn" @click="selClientClick('chance')">
+                      <i class="el-icon-circle-plus-outline"></i>
+                    </div>
+                    <div class="common-select-btn" @click="clearupClient('chance')">
+                      <i class="el-icon-edit-outline"></i>
+                    </div>
                   </div>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="鍚堝悓璁㈠崟" prop="contractId">
                   <div class="custom-name">
-                    <el-input v-model="editConfig.infomation.contractId"></el-input>
-                    <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="閫夋嫨"></i></div>
-                    <div class="common-select-btn"><i class="el-icon-edit" title="缂栬緫"></i></div>
+                    <el-autocomplete
+                      v-model="editConfig.infomation.contract_number"
+                      :fetch-suggestions="
+                        (queryString, callback) => {
+                          querySearchAsync(queryString, callback, 'contract')
+                        }
+                      "
+                      value-key="number"
+                      @select="handleSelectClient('contract', $event)"
+                    ></el-autocomplete>
+                    <div class="common-select-btn" @click="selClientClick('contract')">
+                      <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
+                    </div>
+                    <div class="common-select-btn" @click="clearupClient('contract')">
+                      <i class="el-icon-edit-outline" title="娓呴櫎"></i>
+                    </div>
                   </div>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="鎶ヤ环鍗�" prop="quotationId">
                   <div class="custom-name">
-                    <el-input v-model="editConfig.infomation.quotationId"></el-input>
-                    <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="閫夋嫨"></i></div>
-                    <div class="common-select-btn"><i class="el-icon-edit" title="缂栬緫"></i></div>
+                    <el-autocomplete
+                      v-model="editConfig.infomation.quotation_number"
+                      :fetch-suggestions="
+                        (queryString, callback) => {
+                          querySearchAsync(queryString, callback, 'quotation')
+                        }
+                      "
+                      value-key="number"
+                      @select="handleSelectClient('quotation', $event)"
+                    ></el-autocomplete>
+                    <div class="common-select-btn" @click="selClientClick('quotation')">
+                      <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
+                    </div>
+                    <div class="common-select-btn" @click="clearupClient('quotation')">
+                      <i class="el-icon-edit-outline" title="娓呴櫎"></i>
+                    </div>
                   </div>
                 </el-form-item>
               </el-col>
@@ -113,19 +169,34 @@
               </el-col>
               <el-col :span="12">
                 <el-form-item label="绛剧害鏃ユ湡" prop="signTime">
-                  <el-date-picker v-model="editConfig.infomation.signTime" type="date" placeholder="閫夋嫨鏃ユ湡">
+                  <el-date-picker
+                    v-model="editConfig.infomation.signTime"
+                    value-format="yyyy-MM-dd"
+                    type="date"
+                    placeholder="閫夋嫨鏃ユ湡"
+                  >
                   </el-date-picker>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="鏈嶅姟寮�濮嬫棩鏈�" prop="startTime">
-                  <el-date-picker v-model="editConfig.infomation.startTime" type="date" placeholder="閫夋嫨鏃ユ湡">
+                  <el-date-picker
+                    v-model="editConfig.infomation.startTime"
+                    value-format="yyyy-MM-dd"
+                    type="date"
+                    placeholder="閫夋嫨鏃ユ湡"
+                  >
                   </el-date-picker>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="鏈嶅姟鍒版湡鏃�" prop="endTime">
-                  <el-date-picker v-model="editConfig.infomation.endTime" type="date" placeholder="閫夋嫨鏃ユ湡">
+                  <el-date-picker
+                    v-model="editConfig.infomation.endTime"
+                    value-format="yyyy-MM-dd"
+                    type="date"
+                    placeholder="閫夋嫨鏃ユ湡"
+                  >
                   </el-date-picker>
                 </el-form-item>
               </el-col>
@@ -290,6 +361,24 @@
         :edit-common-config="editSelectClientConfig"
         @selClient="selClient"
       />
+      <!-- 閫夋嫨鑱旂郴浜� -->
+      <SelectContactDialog
+        v-if="editSelectContactConfig.editVisible"
+        :edit-common-config="editSelectContactConfig"
+        @selClient="selClient"
+      />
+      <!-- 閫夋嫨閿�鍞満浼� -->
+      <SelectChanceDialog
+        v-if="editSelectChanceConfig.editVisible"
+        :edit-common-config="editSelectChanceConfig"
+        @selClient="selClient"
+      />
+      <!-- 鍚堝悓璁㈠崟 -->
+      <SelectCommonDialog
+        v-if="editSelCommonConfig.editVisible"
+        :edit-common-config="editSelCommonConfig"
+        @selClient="selClient"
+      />
     </el-dialog>
   </div>
 </template>
@@ -299,6 +388,9 @@
 import { getAllData } from "@/api/client/client"
 import { getAddServiceContract, getUpdateServiceContract } from "@/api/serviceManage/serviceContract"
 import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog"
+import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog"
+import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog"
+import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
 export default {
   name: "AddServiceContractDialog",
   props: {
@@ -313,13 +405,25 @@
       }
     }
   },
-  components: { CommonFormTableView, SelectClientDialog },
+  components: { CommonFormTableView, SelectClientDialog, SelectContactDialog, SelectChanceDialog, SelectCommonDialog },
   computed: {
     searchCommonHeight() {
       return this.$refs.searchCommonView.offsetHeight
     },
     clientList() {
       return this.$store.state.getClientName.clientList
+    },
+    contactNamelist() {
+      return this.$store.state.getClientName.contactNamelist
+    },
+    saleChancelist() {
+      return this.$store.state.getClientName.saleChancelist
+    },
+    salesDetailsList() {
+      return this.$store.state.getClientName.salesDetailsList
+    },
+    quotationList() {
+      return this.$store.state.getClientName.quotationList
     }
   },
   data() {
@@ -351,11 +455,35 @@
         editVisible: false,
         title: "",
         infomation: {}
-      }
+      },
+      editSelectContactConfig: {
+        editVisible: false,
+        title: "",
+        infomation: {}
+      },
+      editSelectChanceConfig: {
+        editVisible: false,
+        title: "",
+        infomation: {}
+      },
+      editSelCommonConfig: {
+        editVisible: false,
+        title: "",
+        infomation: {}
+      },
+      clientId: this.editCommonConfig.infomation.clientId,
+      contactId: this.editCommonConfig.infomation.contactId,
+      saleChanceId: this.editCommonConfig.infomation.saleChanceId,
+      contractId: this.editCommonConfig.infomation.salesDetailsId,
+      quotationId: this.editCommonConfig.infomation.quotationId
     }
   },
   created() {
     this.$store.dispatch("geClient")
+    this.$store.dispatch("geContact")
+    this.$store.dispatch("geChance")
+    this.$store.dispatch("geSalesDetails")
+    this.$store.dispatch("geQuotation")
     this.setTableForm()
     this.getCommonData()
   },
@@ -382,37 +510,23 @@
           const params = this.saveParams()
           console.log(params)
           if (this.editConfig.title === "鏂板缓") {
-            getAddServiceContract(params)
-              .then((res) => {
-                console.log(res)
-                this.editConfig.visible = false
-                if (res.code === 200) {
-                  this.$message({
-                    message: "娣诲姞鎴愬姛",
-                    type: "success"
-                  })
-                  this.$parent.getData()
-                }
-              })
-              .catch((err) => {
-                console.log(err)
-              })
+            getAddServiceContract(params).then((res) => {
+              console.log(res)
+              this.editConfig.visible = false
+              if (res.code === 200) {
+                this.$message.success("娣诲姞鎴愬姛")
+                this.$parent.getData()
+              }
+            })
           } else {
-            getUpdateServiceContract(params)
-              .then((res) => {
-                console.log(res)
-                this.editConfig.visible = false
-                if (res.code === 200) {
-                  this.$message({
-                    message: "缂栬緫鎴愬姛",
-                    type: "success"
-                  })
-                  this.$parent.getData()
-                }
-              })
-              .catch((err) => {
-                console.log(err)
-              })
+            getUpdateServiceContract(params).then((res) => {
+              console.log(res)
+              this.editConfig.visible = false
+              if (res.code === 200) {
+                this.$message.success("缂栬緫鎴愬姛")
+                this.$parent.getData()
+              }
+            })
           }
         } else {
           console.log("error submit")
@@ -424,9 +538,8 @@
       let data = this.editConfig.infomation
       let params = {
         id: this.editConfig.title === "鏂板缓" ? 0 : data.id,
-        clientId: parseInt(data.clientId) || 0,
-        contactId: data.contactId || 0,
-        contractId: data.contractId || 0,
+        clientId: this.clientId || 0,
+        contactId: this.contactId || 0,
         endTime: data.endTime || "",
         memberId: data.memberId || 0,
         number: data.number || "",
@@ -441,9 +554,10 @@
             total: 0
           }
         ],
-        quotationId: data.quotationId || 0,
+        quotationId: this.quotationId || 0,
         remark: data.remark || "",
-        saleChanceId: data.saleChanceId || 0,
+        saleChanceId: this.saleChanceId || 0,
+        salesDetailsId: this.contractId || 0,
         serviceTimes: data.serviceTimes || 0,
         signTime: data.signTime || "",
         startTime: data.startTime || "",
@@ -453,36 +567,103 @@
       }
       return params
     },
-
     handleClose() {
       this.editConfig.visible = false
     },
     // 閫夋嫨瀹㈡埛鐩稿叧鏂规硶
-    querySearchAsync(queryString, cb) {
-      var restaurants = this.clientList
-      var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants
+    querySearchAsync(queryString, cb, value) {
+      var restaurants = []
+      if (value === "client") {
+        restaurants = this.clientList
+      } else if (value === "contact") {
+        restaurants = this.contactNamelist
+      } else if (value === "chance") {
+        restaurants = this.saleChancelist
+      } else if (value === "contract") {
+        restaurants = this.salesDetailsList
+      } else if (value === "quotation") {
+        restaurants = this.quotationList
+      }
+      var results = queryString ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants
       cb(results)
     },
-    createStateFilter(queryString) {
+    createStateFilter(queryString, value) {
       return (state) => {
-        return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+        if (value === "contract" || value === "quotation") {
+          return state.number.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+        } else {
+          return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+        }
       }
     },
-    handleSelectClient(item) {
-      this.editConfig.infomation.client_id = item.id
+    handleSelectClient(value, item) {
+      console.log(value)
+      if (value === "client") {
+        this.clientId = item.id
+      } else if (value === "contact") {
+        this.contactId = item.id
+      } else if (value === "chance") {
+        this.saleChanceId = item.id
+      } else if (value === "contract") {
+        this.contractId = item.id
+      } else if (value === "quotation") {
+        this.quotationId = item.id
+      }
     },
-    selClientClick() {
-      this.editSelectClientConfig.editVisible = true
+    selClientClick(value) {
+      if (value === "client") {
+        this.editSelectClientConfig.editVisible = true
+      } else if (value === "contact") {
+        this.editSelectContactConfig.editVisible = true
+      } else if (value === "chance") {
+        this.editSelectChanceConfig.editVisible = true
+      } else if (value === "contract") {
+        this.editSelCommonConfig.title = "閿�鍞槑缁嗗崟"
+        this.editSelCommonConfig.editVisible = true
+        this.editSelCommonConfig.tableInfomation = [...this.salesDetailsList]
+      } else if (value === "quotation") {
+        this.editSelCommonConfig.title = "鎶ヤ环鍗�"
+        this.editSelCommonConfig.editVisible = true
+        this.editSelCommonConfig.tableInfomation = [...this.quotationList]
+      }
     },
-    selClient(row) {
-      console.log(row)
-      this.editConfig.infomation.client_name = row.name
-      this.editConfig.infomation.client_id = row.id
+    selClient(row, value) {
+      console.log(value)
+      if (value === "contact") {
+        this.editConfig.infomation.contact_name = row.name
+        this.contactId = row.id
+      } else if (value === "client") {
+        this.editConfig.infomation.client_name = row.name
+        this.clientId = row.id
+      } else if (value === "chance") {
+        this.editConfig.infomation.sale_chance_name = row.name
+        this.saleChanceId = row.id
+      } else if (value === "contract") {
+        this.editConfig.infomation.contract_number = row.number
+        this.contractId = row.id
+      } else if (value === "quotation") {
+        this.editConfig.infomation.quotation_number = row.number
+        this.quotationId = row.id
+      }
     },
     // 娓呴櫎宸查�夋嫨鐢ㄦ埛
-    clearupClient() {
-      this.editConfig.infomation.client_name = ""
-      this.editConfig.infomation.client_id = 0
+    clearupClient(value) {
+      if (value === "client") {
+        this.editConfig.infomation.client_name = ""
+        this.clientId = 0
+      } else if (value === "contact") {
+        this.editConfig.infomation.contact_name = ""
+        this.contactId = 0
+      } else if (value === "chance") {
+        this.editConfig.infomation.sale_chance_name = ""
+        this.saleChanceId = 0
+      } else if (value === "contract") {
+        this.editConfig.infomation.contract_number = ""
+        this.contractId = 0
+      } else if (value === "quotation") {
+        this.editConfig.infomation.quotation_number = ""
+        this.quotationId = 0
+      }
     },
     // 娣诲姞闄勪欢
     addAnnexClick() {},
diff --git a/src/views/service/serviceContract/DetailServiceContract.vue b/src/views/service/serviceContract/DetailServiceContract.vue
index 6bac9a8..f7b3d0d 100644
--- a/src/views/service/serviceContract/DetailServiceContract.vue
+++ b/src/views/service/serviceContract/DetailServiceContract.vue
@@ -25,7 +25,6 @@
             <el-tab-pane label="鏀舵鍗�" name="receipt"></el-tab-pane>
             <el-tab-pane label="瀹㈡埛鏈嶅姟鍗�" name="clientService"> </el-tab-pane>
             <el-tab-pane label="閿�鍞彂绁�" name="invoice"></el-tab-pane>
-            <el-tab-pane label="閿�鍞瓙鍗�" name="sub"></el-tab-pane>
           </el-tabs>
         </div>
         <div v-if="activeName === 'first'" class="detail">
@@ -41,11 +40,11 @@
                 <li v-for="(item, i) in basicInfoList" :key="i">
                   <div class="left">
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
-                    <div class="content-data">{{ item.leftValue }}</div>
+                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
-                    <div class="content-data">{{ item.rightValue }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
@@ -63,11 +62,11 @@
                 <li v-for="(item, i) in dynamicInfoList" :key="i">
                   <div class="left">
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
-                    <div class="content-data">{{ item.leftValue }}</div>
+                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
-                    <div class="content-data">{{ item.rightValue }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
@@ -103,7 +102,7 @@
                 <li>
                   <div class="left remark">
                     <div class="content-title">{{ "澶囨敞锛�" }}</div>
-                    <div class="content-data">{{ "" }}</div>
+                    <div class="content-data">{{ detailConfig.infomation.remark }}</div>
                   </div>
                 </li>
               </ul>
@@ -156,9 +155,6 @@
         <div v-if="activeName === 'invoice'" class="second">
           <!-- <FollowupRecords :isDetail="true" /> -->
         </div>
-        <div v-if="activeName === 'sub'" class="second">
-          <SubOrder :isDetail="true" />
-        </div>
       </div>
     </el-drawer>
   </div>
@@ -166,7 +162,6 @@
 
 <script>
 import ClientServiceOrder from "@/views/service/clientServiceOrder"
-import SubOrder from "@/views/sales/subOrder"
 import Status from "@/common/const/salesFixedStatus"
 import CommonFormTableView from "@/components/makepager/CommonFormTableView"
 export default {
@@ -182,7 +177,7 @@
       }
     }
   },
-  components: { ClientServiceOrder, SubOrder, CommonFormTableView },
+  components: { ClientServiceOrder, CommonFormTableView },
   computed: {},
   data() {
     return {
@@ -208,36 +203,36 @@
     }
   },
   created() {
-    this.setData()
+    this.setData(this.detailConfig.infomation)
     this.setTableForm()
   },
   mounted() {},
   methods: {
-    setData() {
+    setData(item) {
       this.basicInfoList = [
         {
           leftStr: "瀹㈡埛鍚嶇О",
-          leftValue: "",
+          leftValue: item.client_name,
           rightStr: "鏈嶅姟鍚堝悓缂栧彿",
-          rightValue: ""
+          rightValue: item.number
         },
         {
           leftStr: "璐熻矗浜�",
-          leftValue: "",
+          leftValue: item.memberId,
           rightStr: "鑱旂郴浜哄鍚�",
-          rightValue: ""
+          rightValue: item.contactId
         },
         {
           leftStr: "閿�鍞満浼�",
-          leftValue: "",
+          leftValue: item.SaleChance.name,
           rightStr: "鍚堝悓璁㈠崟",
-          rightValue: ""
+          rightValue: item.salesDetails.number
         },
         {
           leftStr: "鎶ヤ环鍗�",
-          leftValue: "",
+          leftValue: item.quotation.number,
           rightStr: "鍚堝悓绫诲瀷",
-          rightValue: ""
+          rightValue: item.serviceContractType
         },
         {
           leftStr: "鍚堝悓鍙戣捣浜�",
@@ -247,15 +242,15 @@
         },
         {
           leftStr: "绛剧害鏃ユ湡",
-          leftValue: "",
+          leftValue: item.signTime,
           rightStr: "鏈嶅姟寮�濮嬫棩鏈�",
-          rightValue: ""
+          rightValue: item.startTime
         },
         {
           leftStr: "鍒涘缓浜�",
           leftValue: "",
           rightStr: "鏈嶅姟鍒版湡鏃�",
-          rightValue: ""
+          rightValue: item.endTime
         },
         {
           leftStr: "鍒涘缓鏃堕棿",
@@ -269,25 +264,25 @@
           leftStr: "瀹℃壒鐘舵��",
           leftValue: "",
           rightStr: "鍚堝悓鐘舵��",
-          rightValue: ""
+          rightValue: item.serviceContractStatus
         },
         {
           leftStr: "宸叉湇鍔℃鏁�",
-          leftValue: "",
+          leftValue: item.serviceTimes,
           rightStr: "搴旀湇鍔℃鏁�",
           rightValue: ""
         },
         {
           leftStr: "宸叉敹鎬婚",
-          leftValue: "",
+          leftValue: item.amountReceived,
           rightStr: "搴旀敹浣欓",
-          rightValue: ""
+          rightValue: item.amountReceivable
         },
         {
           leftStr: "宸插紑绁ㄩ噾棰�",
-          leftValue: "",
+          leftValue: item.amountInvoiced,
           rightStr: "鏈紑绁ㄩ噾棰�",
-          rightValue: ""
+          rightValue: item.amountUnInvoiced
         }
       ]
     },
diff --git a/src/views/service/serviceContract/index.vue b/src/views/service/serviceContract/index.vue
index 40d1ab6..6c36084 100644
--- a/src/views/service/serviceContract/index.vue
+++ b/src/views/service/serviceContract/index.vue
@@ -9,9 +9,12 @@
         ref="searchCommonView"
         :query-class-options="queryClassOptions"
         :search-options="searchOptions"
+        :search-sel="searchSel"
+        @searchClick="searchClick"
+        @resetClick="resetClick"
       />
       <div class="btn-pager">
-        <PublicFunctionBtnView :submit-approval="true" :operates-list="operatesList" />
+        <PublicFunctionBtnView :submit-approval="true" :operates-list="operatesList" @batchDelete="delClick" />
         <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
       </div>
     </div>
@@ -21,12 +24,13 @@
       :select-box="!isDetail"
       @selClientClick="selClientClick"
       @selCommonClick="selCommonClick"
+      @getSelectArray="getSelectArray"
     >
       <template slot="tableButton">
-        <el-table-column label="鎿嶄綔" width="90">
+        <el-table-column label="鎿嶄綔" width="60">
           <template slot-scope="scope">
             <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button>
-            <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button>
+            <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button> -->
           </template>
         </el-table-column>
       </template>
@@ -99,7 +103,12 @@
       clientDeail: {
         visible: false,
         infomation: {}
-      }
+      },
+      searchSel: {
+        value: "number",
+        label: "鏈嶅姟鍚堝悓缂栧彿"
+      },
+      selValueList: []
     }
   },
   created() {
@@ -112,10 +121,10 @@
         tableInfomation: [],
         tableColumn: [
           { label: "鏈嶅姟鍚堝悓缂栧彿", prop: "number", min: 100, isCommonClick: true }, // 鏈嶅姟鍚堝悓缂栧彿
-          { label: "瀹㈡埛鍚嶇О", prop: "clientId", min: 120, isClientClick: true }, // 瀹㈡埛鍚嶇О
+          { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 120, isClientClick: true }, // 瀹㈡埛鍚嶇О
           { label: "绛剧害鏃ユ湡", prop: "signTime" }, // 绛剧害鏃ユ湡
-          { label: "鍚堝悓绫诲瀷", prop: "typeId" }, // 鍚堝悓绫诲瀷
-          { label: "鍚堝悓鐘舵��", prop: "serviceContractStatusId" }, // 鍚堝悓鐘舵��
+          { label: "鍚堝悓绫诲瀷", prop: "serviceContractType" }, // 鍚堝悓绫诲瀷
+          { label: "鍚堝悓鐘舵��", prop: "serviceContractStatus" }, // 鍚堝悓鐘舵��
           { label: "璐熻矗浜�", prop: "memberId" }, // 璐熻矗浜�
           { label: "浜у搧鍚嶇О", prop: "productName" }, // 浜у搧鍚嶇О
           { label: "鏈嶅姟寮�濮嬫棩", prop: "startTime" }, // 鏈嶅姟寮�濮嬫棩
@@ -126,14 +135,16 @@
       this.searchOptions = []
       for (let i = 0; i < this.tableList.tableColumn.length; i++) {
         const label = this.tableList.tableColumn[i].label
-        this.searchOptions.push({ value: (i + 1).toString(), label: label })
+        const value = this.tableList.tableColumn[i].prop
+        this.searchOptions.push({ value: value, label: label })
       }
     },
     // 璇锋眰鏁版嵁
-    async getData() {
+    async getData(keyword, keywordType) {
       this.loading = true
       await getServiceContractList({
-        keyword: "",
+        keyword: keyword,
+        keywordType: keywordType,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       })
@@ -143,7 +154,10 @@
             if (res.data.list && res.data.list.length > 0) {
               const list = res.data.list.map((item) => {
                 return {
-                  ...item
+                  ...item,
+                  client_name: item.client.name,
+                  serviceContractStatus: item.serviceContractStatus.name,
+                  serviceContractType: item.serviceContractType.name
                 }
               })
               this.tableList.tableInfomation = list || []
@@ -162,6 +176,15 @@
           this.loading = false
         })
     },
+    // 鎼滅储
+    searchClick(val, content) {
+      console.log(val, content)
+      this.getData(content, val.label)
+    },
+    resetClick() {
+      this.search_map = {}
+      this.getData()
+    },
     // 鏂板缓
     addBtnClick() {
       this.editConfig.visible = true
@@ -176,33 +199,46 @@
       this.editConfig.infomation = { ...row }
     },
     // 鍒犻櫎
-    delClick(id) {
-      this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
-        confirmButtonText: "纭畾",
-        cancelButtonText: "鍙栨秷",
-        type: "warning"
-      })
-        .then(function () {
-          return getDelServiceContract({ id: id })
+    delClick() {
+      if (this.selValueList && this.selValueList.length > 0) {
+        this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning"
         })
-        .then((response) => {
-          if (response.code === 200) {
-            this.$message.success("鍒犻櫎鎴愬姛")
-            this.getData()
-          } else {
-            this.$message.warning("鍒犻櫎澶辫触")
-          }
-        })
-        .catch(function () {})
+          .then(() => {
+            getDelServiceContract({ ids: this.selValueList }).then((response) => {
+              if (response.code === 200) {
+                this.$message.success("鍒犻櫎鎴愬姛")
+                this.getData()
+              } else {
+                this.$message.warning("鍒犻櫎澶辫触")
+              }
+            })
+          })
+          .catch(() => {})
+      } else {
+        this.$message.warning("璇疯嚦灏戦�夋嫨涓�鏉¤褰�")
+      }
     },
     getSelectArray(val) {
       console.log(val)
+      this.selValueList = []
+      const list = val.map((item) => {
+        return item.id
+      })
+      this.selValueList = list
     },
     // 瀹㈡埛鍚嶇О璇︽儏
     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
+      }
     },
     // 鏈嶅姟鍚堝悓璇︽儏
     selCommonClick(row) {
diff --git a/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue b/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue
index 3564b13..83ed22f 100644
--- a/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue
+++ b/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue
@@ -28,14 +28,18 @@
                   <div class="custom-name">
                     <el-autocomplete
                       v-model="editConfig.infomation.client_name"
-                      :fetch-suggestions="querySearchAsync"
+                      :fetch-suggestions="
+                        (queryString, callback) => {
+                          querySearchAsync(queryString, callback, 'client')
+                        }
+                      "
                       value-key="name"
-                      @select="handleSelectClient"
+                      @select="handleSelectClient('client', $event)"
                     ></el-autocomplete>
-                    <div class="common-select-btn" @click="selClientClick">
+                    <div class="common-select-btn" @click="selClientClick('client')">
                       <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
                     </div>
-                    <div class="common-select-btn" @click="clearupClient">
+                    <div class="common-select-btn" @click="clearupClient('client')">
                       <i class="el-icon-edit-outline" title="娓呴櫎"></i>
                     </div>
                   </div>
@@ -49,18 +53,44 @@
               <el-col :span="12">
                 <el-form-item label="鑱旂郴浜哄鍚�" prop="contactId">
                   <div class="custom-name">
-                    <el-input v-model="editConfig.infomation.contactId"></el-input>
-                    <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="閫夋嫨"></i></div>
-                    <div class="common-select-btn"><i class="el-icon-edit" title="缂栬緫"></i></div>
+                    <el-autocomplete
+                      v-model="editConfig.infomation.contact_name"
+                      :fetch-suggestions="
+                        (queryString, callback) => {
+                          querySearchAsync(queryString, callback, 'contact')
+                        }
+                      "
+                      value-key="name"
+                      @select="handleSelectClient('contact', $event)"
+                    ></el-autocomplete>
+                    <div class="common-select-btn" @click="selClientClick('contact')">
+                      <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
+                    </div>
+                    <div class="common-select-btn" @click="clearupClient('contact')">
+                      <i class="el-icon-edit-outline" title="娓呴櫎"></i>
+                    </div>
                   </div>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <el-form-item label="瀹㈡埛鏈嶅姟鍗�" prop="customServiceForm">
+                <el-form-item label="瀹㈡埛鏈嶅姟鍗�" prop="service_number">
                   <div class="custom-name">
-                    <el-input v-model="editConfig.infomation.customServiceForm"></el-input>
-                    <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="閫夋嫨"></i></div>
-                    <div class="common-select-btn"><i class="el-icon-edit" title="缂栬緫"></i></div>
+                    <el-autocomplete
+                      v-model="editConfig.infomation.service_number"
+                      :fetch-suggestions="
+                        (queryString, callback) => {
+                          querySearchAsync(queryString, callback, 'customService')
+                        }
+                      "
+                      value-key="serviceNumber"
+                      @select="handleSelectClient('customService', $event)"
+                    ></el-autocomplete>
+                    <div class="common-select-btn" @click="selClientClick('customService')">
+                      <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
+                    </div>
+                    <div class="common-select-btn" @click="clearupClient('customService')">
+                      <i class="el-icon-edit-outline" title="娓呴櫎"></i>
+                    </div>
                   </div>
                 </el-form-item>
               </el-col>
@@ -210,6 +240,18 @@
         :edit-common-config="editSelectClientConfig"
         @selClient="selClient"
       />
+      <!-- 閫夋嫨鑱旂郴浜� -->
+      <SelectContactDialog
+        v-if="editSelectContactConfig.editVisible"
+        :edit-common-config="editSelectContactConfig"
+        @selClient="selClient"
+      />
+      <!-- 瀹㈡埛鏈嶅姟璁㈠崟 -->
+      <SelectCommonDialog
+        v-if="editSelCommonConfig.editVisible"
+        :edit-common-config="editSelCommonConfig"
+        @selClient="selClient"
+      />
     </el-dialog>
   </div>
 </template>
@@ -218,6 +260,8 @@
 import { getAllData } from "@/api/client/client"
 import { getAddServiceFollowup, getUpdateServiceFollowup } from "@/api/serviceManage/serviceFollowup"
 import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog"
+import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog"
+import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
 export default {
   name: "AddServiceFollowupDialog",
   props: {
@@ -232,13 +276,16 @@
       }
     }
   },
-  components: { SelectClientDialog },
+  components: { SelectClientDialog, SelectContactDialog, SelectCommonDialog },
   computed: {
-    searchCommonHeight() {
-      return this.$refs.searchCommonView.offsetHeight
-    },
     clientList() {
       return this.$store.state.getClientName.clientList
+    },
+    contactNamelist() {
+      return this.$store.state.getClientName.contactNamelist
+    },
+    serviceOrderList() {
+      return this.$store.state.getClientName.serviceOrderList
     }
   },
   data() {
@@ -259,11 +306,26 @@
         editVisible: false,
         title: "",
         infomation: {}
-      }
+      },
+      editSelectContactConfig: {
+        editVisible: false,
+        title: "",
+        infomation: {}
+      },
+      editSelCommonConfig: {
+        editVisible: false,
+        title: "",
+        infomation: {}
+      },
+      clientId: this.editCommonConfig.infomation.clientId,
+      contactId: this.editCommonConfig.infomation.contactId,
+      serviceId: this.editCommonConfig.infomation.serviceId
     }
   },
   created() {
     this.$store.dispatch("geClient")
+    this.$store.dispatch("geContact")
+    this.$store.dispatch("geServiceOrder")
     this.getCommonData()
   },
   methods: {
@@ -289,37 +351,23 @@
           const params = this.saveParams()
           console.log(params)
           if (this.editConfig.title === "鏂板缓") {
-            getAddServiceFollowup(params)
-              .then((res) => {
-                console.log(res)
-                this.editConfig.visible = false
-                if (res.code === 200) {
-                  this.$message({
-                    message: "娣诲姞鎴愬姛",
-                    type: "success"
-                  })
-                  this.$parent.getData()
-                }
-              })
-              .catch((err) => {
-                console.log(err)
-              })
+            getAddServiceFollowup(params).then((res) => {
+              console.log(res)
+              this.editConfig.visible = false
+              if (res.code === 200) {
+                this.$message.success("娣诲姞鎴愬姛")
+                this.$parent.getData()
+              }
+            })
           } else {
-            getUpdateServiceFollowup(params)
-              .then((res) => {
-                console.log(res)
-                this.editConfig.visible = false
-                if (res.code === 200) {
-                  this.$message({
-                    message: "缂栬緫鎴愬姛",
-                    type: "success"
-                  })
-                  this.$parent.getData()
-                }
-              })
-              .catch((err) => {
-                console.log(err)
-              })
+            getUpdateServiceFollowup(params).then((res) => {
+              console.log(res)
+              this.editConfig.visible = false
+              if (res.code === 200) {
+                this.$message.success("缂栬緫鎴愬姛")
+                this.$parent.getData()
+              }
+            })
           }
         } else {
           console.log("error submit")
@@ -331,8 +379,8 @@
       let data = this.editConfig.infomation
       let params = {
         id: this.editConfig.title === "鏂板缓" ? 0 : data.id,
-        clientId: data.clientId || 0,
-        contactId: data.contactId || 0,
+        clientId: this.clientId || 0,
+        contactId: this.contactId || 0,
         file: data.file || "",
         isVisit: data.isVisit || 0,
         memberId: data.memberId || 0,
@@ -341,7 +389,7 @@
         planId: data.planId || 0,
         remark: data.remark || "",
         satisfaction: data.satisfaction || 0,
-        serviceId: data.serviceId || 0,
+        serviceId: this.serviceId || 0,
         solveRate: data.solveRate || 0,
         timelyRate: data.timelyRate || 0
       }
@@ -351,31 +399,74 @@
       this.editConfig.visible = false
     },
     // 閫夋嫨瀹㈡埛鐩稿叧鏂规硶
-    querySearchAsync(queryString, cb) {
-      var restaurants = this.clientList
-      var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants
+    querySearchAsync(queryString, cb, value) {
+      var restaurants = []
+      if (value === "client") {
+        restaurants = this.clientList
+      } else if (value === "contact") {
+        restaurants = this.contactNamelist
+      } else if (value === "customService") {
+        console.log(this.serviceOrderList)
+        restaurants = this.serviceOrderList
+      }
+      var results = queryString ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants
       cb(results)
     },
-    createStateFilter(queryString) {
+    createStateFilter(queryString, value) {
       return (state) => {
-        return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+        if (value === "customService") {
+          return state.serviceNumber.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+        } else {
+          return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+        }
       }
     },
-    handleSelectClient(item) {
-      this.editConfig.infomation.client_id = item.id
+    handleSelectClient(value, item) {
+      console.log(value)
+      if (value === "client") {
+        this.clientId = item.id
+      } else if (value === "contact") {
+        this.contactId = item.id
+      } else if (value === "customService") {
+        this.serviceId = item.id
+      }
     },
-    selClientClick() {
-      this.editSelectClientConfig.editVisible = true
+    selClientClick(value) {
+      if (value === "client") {
+        this.editSelectClientConfig.editVisible = true
+      } else if (value === "contact") {
+        this.editSelectContactConfig.editVisible = true
+      } else if (value === "customService") {
+        this.editSelCommonConfig.title = "瀹㈡埛鏈嶅姟鍗�"
+        this.editSelCommonConfig.editVisible = true
+        this.editSelCommonConfig.tableInfomation = [...this.serviceOrderList]
+      }
     },
-    selClient(row) {
-      console.log(row)
-      this.editConfig.infomation.client_name = row.name
-      this.editConfig.infomation.client_id = row.id
+    selClient(row, value) {
+      console.log(value)
+      if (value === "contact") {
+        this.editConfig.infomation.contact_name = row.name
+        this.contactId = row.id
+      } else if (value === "client") {
+        this.editConfig.infomation.client_name = row.name
+        this.clientId = row.id
+      } else if (value === "customService") {
+        this.editConfig.infomation.service_number = row.serviceNumber
+        this.serviceId = row.id
+      }
     },
     // 娓呴櫎宸查�夋嫨鐢ㄦ埛
-    clearupClient() {
-      this.editConfig.infomation.client_name = ""
-      this.editConfig.infomation.client_id = 0
+    clearupClient(value) {
+      if (value === "client") {
+        this.editConfig.infomation.client_name = ""
+        this.clientId = 0
+      } else if (value === "contact") {
+        this.editConfig.infomation.contact_name = ""
+        this.contactId = 0
+      } else if (value === "customService") {
+        this.editConfig.infomation.service_number = ""
+        this.serviceId = 0
+      }
     },
     // 娣诲姞闄勪欢
     addAnnexClick() {},
diff --git a/src/views/service/serviceFollowup/DetailServiceFollowup.vue b/src/views/service/serviceFollowup/DetailServiceFollowup.vue
index 44d36a1..d0a986f 100644
--- a/src/views/service/serviceFollowup/DetailServiceFollowup.vue
+++ b/src/views/service/serviceFollowup/DetailServiceFollowup.vue
@@ -37,11 +37,11 @@
                 <li v-for="(item, i) in basicInfoList" :key="i">
                   <div class="left">
                     <div class="content-title">{{ item.leftStr + "锛�" }}</div>
-                    <div class="content-data">{{ item.leftValue }}</div>
+                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                   </div>
-                  <div class="right">
+                  <div v-if="item.rightStr" class="right">
                     <div class="content-title">{{ item.rightStr }}</div>
-                    <div class="content-data">{{ item.rightValue }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
@@ -119,35 +119,35 @@
     }
   },
   created() {
-    this.setData()
+    this.setData(this.detailConfig.infomation)
   },
   mounted() {},
   methods: {
-    setData() {
+    setData(item) {
       this.basicInfoList = [
         {
           leftStr: "瀹㈡埛鍚嶇О",
-          leftValue: "",
+          leftValue: item.client_name,
           rightStr: "鍥炶鍗曠紪鍙�",
-          rightValue: ""
+          rightValue: item.number
         },
         {
           leftStr: "鑱旂郴浜哄鍚�",
-          leftValue: "",
+          leftValue: item.contact_name,
           rightStr: "瀹㈡埛鏈嶅姟鍗�",
-          rightValue: ""
+          rightValue: item.ServiceOrder.serviceNumber
         },
         {
           leftStr: "鍥炶浜�",
-          leftValue: "",
+          leftValue: item.isVisit,
           rightStr: "椤圭洰璁″垝",
           rightValue: ""
         },
         {
           leftStr: "婊℃剰搴�",
-          leftValue: "",
+          leftValue: item.satisfaction,
           rightStr: "鍙婃椂鐜�",
-          rightValue: ""
+          rightValue: item.timelyRate
         },
         {
           leftStr: "瑙e喅鐜�",
diff --git a/src/views/service/serviceFollowup/index.vue b/src/views/service/serviceFollowup/index.vue
index 3ad980c..d6f6588 100644
--- a/src/views/service/serviceFollowup/index.vue
+++ b/src/views/service/serviceFollowup/index.vue
@@ -9,9 +9,12 @@
         ref="searchCommonView"
         :query-class-options="queryClassOptions"
         :search-options="searchOptions"
+        :search-sel="searchSel"
+        @searchClick="searchClick"
+        @resetClick="resetClick"
       />
       <div class="btn-pager">
-        <PublicFunctionBtnView :import-button="false" :operates-list="operatesList" />
+        <PublicFunctionBtnView :import-button="false" :operates-list="operatesList" @batchDelete="delClick" />
         <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
       </div>
     </div>
@@ -23,12 +26,13 @@
       @selCommonClick="selCommonClick"
       @selContactsClick="selContactsClick"
       @selServiceOrderClick="selServiceOrderClick"
+      @getSelectArray="getSelectArray"
     >
       <template slot="tableButton">
-        <el-table-column label="鎿嶄綔" width="90">
+        <el-table-column label="鎿嶄綔" width="60">
           <template slot-scope="scope">
             <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button>
-            <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button>
+            <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button> -->
           </template>
         </el-table-column>
       </template>
@@ -108,7 +112,12 @@
       clientServiceDetail: {
         visible: false,
         infomation: {}
-      }
+      },
+      searchSel: {
+        value: "number",
+        label: "鍥炶鍗曠紪鍙�"
+      },
+      selValueList: []
     }
   },
   created() {
@@ -121,9 +130,9 @@
         tableInfomation: [],
         tableColumn: [
           { label: "鍥炶鍗曠紪鍙�", prop: "number", min: 80, isCommonClick: true }, // 鍥炶鍗曠紪鍙�
-          { label: "瀹㈡埛鍚嶇О", prop: "clientId", min: 130, isClientClick: true }, // 瀹㈡埛鍚嶇О
-          { label: "鑱旂郴浜哄鍚�", prop: "contactId", isContactClick: true }, // 鑱旂郴浜哄鍚�
-          { label: "瀹㈡埛鏈嶅姟鍗�", prop: "serviceId", isServiceOrder: true }, // 瀹㈡埛鏈嶅姟鍗�
+          { 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: "modifyTime" } // 淇敼鏃堕棿
@@ -132,14 +141,16 @@
       this.searchOptions = []
       for (let i = 0; i < this.tableList.tableColumn.length; i++) {
         const label = this.tableList.tableColumn[i].label
-        this.searchOptions.push({ value: (i + 1).toString(), label: label })
+        const value = this.tableList.tableColumn[i].prop
+        this.searchOptions.push({ value: value, label: label })
       }
     },
     // 璇锋眰鏁版嵁
-    async getData() {
+    async getData(keyword, keywordType) {
       this.loading = true
       await getServiceFollowupList({
-        keyword: "",
+        keyword: keyword,
+        keywordType: keywordType,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       })
@@ -149,7 +160,10 @@
             if (res.data.list && res.data.list.length > 0) {
               const list = res.data.list.map((item) => {
                 return {
-                  ...item
+                  ...item,
+                  client_service_order: item.ServiceOrder.serviceNumber,
+                  client_name: item.client.name,
+                  contact_name: item.contact.name
                 }
               })
               this.tableList.tableInfomation = list || []
@@ -168,6 +182,15 @@
           this.loading = false
         })
     },
+    // 鎼滅储
+    searchClick(val, content) {
+      console.log(val, content)
+      this.getData(content, val.label)
+    },
+    resetClick() {
+      this.search_map = {}
+      this.getData()
+    },
     // 鏂板缓
     addBtnClick() {
       this.editConfig.visible = true
@@ -182,39 +205,52 @@
       this.editConfig.infomation = { ...row }
     },
     // 鍒犻櫎
-    delClick(id) {
-      this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
-        confirmButtonText: "纭畾",
-        cancelButtonText: "鍙栨秷",
-        type: "warning"
-      })
-        .then(function () {
-          return getDelServiceFollowup({ id: id })
+    delClick() {
+      if (this.selValueList && this.selValueList.length > 0) {
+        this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning"
         })
-        .then((response) => {
-          if (response.code === 200) {
-            this.$message.success("鍒犻櫎鎴愬姛")
-            this.getData()
-          } else {
-            this.$message.warning("鍒犻櫎澶辫触")
-          }
-        })
-        .catch(function () {})
+          .then(() => {
+            getDelServiceFollowup({ ids: this.selValueList }).then((response) => {
+              if (response.code === 200) {
+                this.$message.success("鍒犻櫎鎴愬姛")
+                this.getData()
+              } else {
+                this.$message.warning("鍒犻櫎澶辫触")
+              }
+            })
+          })
+          .catch(() => {})
+      } else {
+        this.$message.warning("璇疯嚦灏戦�夋嫨涓�鏉¤褰�")
+      }
     },
     getSelectArray(val) {
       console.log(val)
+      this.selValueList = []
+      const list = val.map((item) => {
+        return item.id
+      })
+      this.selValueList = list
     },
     // 瀹㈡埛鍚嶇О璇︽儏
     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, Client: row.client }
     },
     // 鏈嶅姟鍥炶鍗曡鎯�
     selCommonClick(row) {
@@ -225,7 +261,7 @@
     selServiceOrderClick(row) {
       console.log(row)
       this.clientServiceDetail.visible = true
-      this.clientServiceDetail.infomation = { ...row }
+      this.clientServiceDetail.infomation = { ...row.ServiceOrder }
     }
   }
 }

--
Gitblit v1.8.0