From c1adf27fbabbff1d76b60993521c765ef1ed79ef Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期二, 15 八月 2023 20:03:21 +0800 Subject: [PATCH] 新建客户管理 客户名称查重 --- src/views/other/commonDialog/SelectCommonDialog.vue | 94 +++++++++++++++++++++++++++++------------------ 1 files changed, 58 insertions(+), 36 deletions(-) diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue index 04ff4a0..f3dd1e3 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,85 @@ } }, 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" } // 鍚堣 + ] + } + } 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 = [{ 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") + } else if (this.editConfig.title === "鎶ヤ环鍗�") { + this.$emit("selClient", row, "quotation") + } else if (this.editConfig.title === "瀹㈡埛鏈嶅姟鍗�") { + this.$emit("selClient", row, "customService") } } } -- Gitblit v1.8.0