From 46ed69e3b72658140a40127f4bae16bef9a02d56 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期一, 21 八月 2023 11:23:34 +0800 Subject: [PATCH] bug修复 --- src/views/service/clientServiceOrder/index.vue | 47 ++++++++++++++++++++++++++++++++++------------- 1 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/views/service/clientServiceOrder/index.vue b/src/views/service/clientServiceOrder/index.vue index d231635..fec8e62 100644 --- a/src/views/service/clientServiceOrder/index.vue +++ b/src/views/service/clientServiceOrder/index.vue @@ -61,6 +61,12 @@ isDetail: { type: Boolean, default: false + }, + addConfig: { + type: Object, + default: () => { + return {} + } } }, mixins: [pageMixin], @@ -107,11 +113,20 @@ value: "serviceNumber", label: "鏈嶅姟鍗曠紪鍙�" }, - selValueList: [] + selValueList: [], + keyword: "", + keywordType: "" } }, created() { this.setTable() + if (!this.isDetail) { + this.keyword = "" + this.keywordType = "" + } else { + this.keyword = this.addConfig.keyword + this.keywordType = this.addConfig.keywordType + } this.getData() }, methods: { @@ -123,9 +138,9 @@ { label: "涓婚", prop: "subject" }, // 涓婚 { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 130, isClientClick: true }, // 瀹㈡埛鍚嶇О { label: "瀹為檯澶勭悊鏃堕棿", prop: "realTime" }, // 瀹為檯澶勭悊鏃堕棿 - { label: "鏈嶅姟浜哄憳", prop: "serviceManId" }, // 鏈嶅姟浜哄憳 + { label: "鏈嶅姟浜哄憳", prop: "serviceMan_name" }, // 鏈嶅姟浜哄憳 { label: "鏈嶅姟鏂瑰紡", prop: "serviceType_name" }, // 鏈嶅姟鏂瑰紡 - { label: "浜у搧绫诲埆", prop: "reportSourceId" }, // 浜у搧绫诲埆 + // { label: "浜у搧绫诲埆", prop: "reportSourceId" }, // 浜у搧绫诲埆 { label: "鏁呴殰绫诲埆", prop: "faultType_name" } // 鏁呴殰绫诲埆 ] } @@ -137,13 +152,15 @@ } }, // 璇锋眰鏁版嵁 - async getData(keyword, keywordType) { + async getData() { this.loading = true await getServiceOrderList({ - keyword: keyword, - keywordType: keywordType, + keyword: this.keyword, + keywordType: this.keywordType, page: this.pagerOptions.currPage, - pageSize: this.pagerOptions.pageSize + pageSize: this.pagerOptions.pageSize, + salesDetailsId: 0, + serviceContractId: 0 }) .then((res) => { console.log(res) @@ -154,7 +171,9 @@ ...item, client_name: item.Client.name, serviceType_name: item.ServiceType.name, - faultType_name: item.FaultType.name + faultType_name: item.FaultType.name, + serviceContract_Number: item.ServiceContract.number, + serviceMan_name: item.serviceMan.username } }) this.tableList.tableInfomation = list || [] @@ -179,11 +198,13 @@ }, // 鎼滅储 searchClick(val, content) { - console.log(val, content) - this.getData(content, val.label) + this.keyword = content + this.keywordType = val.label + this.getData() }, resetClick() { - this.search_map = {} + this.keyword = "" + this.keywordType = "" this.getData() }, // 鏂板缓 @@ -197,7 +218,7 @@ console.log(row) this.editConfig.visible = true this.editConfig.title = "缂栬緫" - this.editConfig.infomation = { ...row } + this.editConfig.infomation = { ...row, contact_name: row.Contact.name, service_number: row.serviceContractId } }, // 鍒犻櫎 delClick() { @@ -245,7 +266,7 @@ selCommonClick(row) { console.log(row) this.clientServiceDetail.visible = true - this.clientServiceDetail.infomation = { ...row } + this.clientServiceDetail.infomation = { ...row, contact_name: row.Contact.name } } } } -- Gitblit v1.8.0