From 37e436a97c6753b38f0c462068122b32a8612a6a Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期二, 08 八月 2023 16:40:46 +0800
Subject: [PATCH] 客户服务单联调

---
 src/views/other/commonDialog/SelectCommonDialog.vue |   69 ++++++++++++++++------------------
 1 files changed, 33 insertions(+), 36 deletions(-)

diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index 04ff4a0..8e42445 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -32,9 +32,8 @@
 </template>
 
 <script>
-import { getMasterOrderList } from "@/api/sales/masterOrder"
 export default {
-  name: "EditSelChanceDialog",
+  name: "EditSelCommonDialog",
   props: {
     editCommonConfig: {
       type: Object,
@@ -42,7 +41,7 @@
         return {
           editVisible: false,
           title: "",
-          infomation: {}
+          tableInfomation: []
         }
       }
     }
@@ -54,7 +53,7 @@
       dialogWidth: "50%",
       editConfig: this.editCommonConfig,
       queryInput: "",
-      select: "1",
+      select: "鍏ㄩ儴瀛楁",
       tableData: [],
       searchSelOptions: [],
       loading: false,
@@ -63,62 +62,60 @@
     }
   },
   created() {
-    this.getData()
     this.setTable()
   },
   methods: {
     setTable() {
       if (this.editConfig.title === "閿�鍞�诲崟") {
         this.tableList = {
-          tableInfomation: [],
+          tableInfomation: this.editConfig.tableInfomation,
           tableColumn: [
             { label: "鍗曟嵁缂栧彿", prop: "number", isClick: true }, // 鍗曟嵁缂栧彿
             { label: "璐熻矗浜�", prop: "member_id" } // 璐熻矗浜�
           ]
         }
+      } else if (this.editConfig.title === "鏈嶅姟鍚堝悓") {
+        this.tableList = {
+          tableInfomation: this.editConfig.tableInfomation,
+          tableColumn: [
+            { label: "瀹㈡埛鍚嶇О", prop: "clientId" }, // 瀹㈡埛鍚嶇О
+            { label: "鏈嶅姟鍚堝悓缂栧彿", prop: "number", isClick: true }, // 鏈嶅姟鍚堝悓缂栧彿
+            { label: "璐熻矗浜�", prop: "memberId" }, // 璐熻矗浜�
+            { label: "鍚堣", prop: "total" }, // 鍚堣
+            { label: "绛剧害鏃ユ湡", prop: "signTime", isTime: true }, // 绛剧害鏃ユ湡
+            { label: "鍚堝悓鐘舵��", prop: "serviceContractStatusId" } // 鍚堝悓鐘舵��
+          ]
+        }
+      } else if (this.editConfig.title === "閿�鍞槑缁嗗崟") {
+        this.tableList = {
+          tableInfomation: this.editConfig.tableInfomation,
+          tableColumn: [
+            { label: "瀹㈡埛鍚嶇О", prop: "clientId" }, // 瀹㈡埛鍚嶇О
+            { label: "璁㈠崟缂栧彿", prop: "number", isClick: true }, // 璁㈠崟缂栧彿
+            { label: "绛剧害鏃ユ湡", prop: "signTime" }, // 绛剧害鏃ユ湡
+            { label: "閿�鍞礋璐d汉", prop: "memberId" }, // 閿�鍞礋璐d汉
+            { label: "鍚堣", prop: "tptal" } // 鍚堣
+          ]
+        }
       }
 
-      this.commonOptions = [{ value: 1, name: "鍏ㄩ儴瀛楁" }]
+      this.commonOptions = [{ id: 1, name: "鍏ㄩ儴瀛楁" }]
       for (let i = 1; i < this.tableList.tableColumn.length; i++) {
         const label = this.tableList.tableColumn[i].label
-        this.commonOptions.push({ value: (i + 1).toString(), name: label })
+        this.commonOptions.push({ id: (i + 1).toString(), name: label })
       }
     },
     handleClose() {
       this.editConfig.editVisible = false
     },
-    // 璇锋眰鏁版嵁
-    async getData() {
-      this.loading = true
-      await getMasterOrderList()
-        .then((res) => {
-          console.log(res)
-          if (res.code === 200) {
-            if (res.data.list && res.data.list.length > 0) {
-              const list = res.data.list.map((item) => {
-                return {
-                  ...item
-                }
-              })
-              this.tableList.tableInfomation = list.slice(0, 5) || []
-            } else {
-              this.tableList.tableInfomation = []
-            }
-          } else {
-            this.tableList.tableInfomation = []
-          }
-          this.loading = false
-        })
-        .catch((err) => {
-          console.log(err)
-          this.tableData = []
-          this.loading = false
-        })
-    },
     selNameClick(row) {
       this.editConfig.editVisible = false
       if (this.editConfig.title === "閿�鍞�诲崟") {
         this.$emit("selClient", row, "master")
+      } else if (this.editConfig.title === "鏈嶅姟鍚堝悓") {
+        this.$emit("selClient", row, "serviceContract")
+      } else if (this.editConfig.title === "閿�鍞槑缁嗗崟") {
+        this.$emit("selClient", row, "contract")
       }
     }
   }

--
Gitblit v1.8.0