From f631b513e095ea988d77ab439e425c913ac1e411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=8D=93?= <huangzhuo@hikoon.com> Date: Thu, 23 Jun 2022 11:15:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AD=97=E6=AE=B5id=E8=BD=AC?= =?UTF-8?q?=E4=B9=89=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CustomerFollow/index.vue | 6 +++++- src/views/ecw/customer/edit.vue | 2 +- src/views/ecw/customer/query.vue | 21 ++++++++++++++++++--- src/views/ecw/customerComplaint/index.vue | 2 +- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/components/CustomerFollow/index.vue b/src/components/CustomerFollow/index.vue index 850f015b..589c246a 100644 --- a/src/components/CustomerFollow/index.vue +++ b/src/components/CustomerFollow/index.vue @@ -9,13 +9,14 @@ style="width: 100%" > <el-table-column - prop="" + type="index" label="#" > </el-table-column> <el-table-column prop="followType" label="跟进类型" + :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_TYPE, cellValue)" > </el-table-column> <el-table-column @@ -26,6 +27,7 @@ <el-table-column prop="followMethod" label="跟进方å¼" + :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_METHOD, cellValue)" > </el-table-column> <el-table-column @@ -47,6 +49,7 @@ <el-table-column prop="followUserId" label="跟进业务" + :formatter="(row, column, cellValue) => serviceUserList.find(e => e.id === cellValue).nickname" > </el-table-column> </el-table> @@ -136,6 +139,7 @@ export default { data() { return { DICT_TYPE, + getDictDataLabel, parseTime, customerFollowList: [], serviceUserList: [], diff --git a/src/views/ecw/customer/edit.vue b/src/views/ecw/customer/edit.vue index a28b5f45..b0de9e4f 100644 --- a/src/views/ecw/customer/edit.vue +++ b/src/views/ecw/customer/edit.vue @@ -529,7 +529,7 @@ export default { }, getCustomer(id) { getCustomer(id).then(response => { - this.form = { ...this.form, ...response.data }; + this.form = { ...this.form, ...response.data, id: this.customerId }; this.open = true; this.title = "修改客户"; }); diff --git a/src/views/ecw/customer/query.vue b/src/views/ecw/customer/query.vue index dd23d4db..2d20b16e 100644 --- a/src/views/ecw/customer/query.vue +++ b/src/views/ecw/customer/query.vue @@ -25,8 +25,8 @@ <el-descriptions-item label="客户æ¥æº">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item> <el-descriptions-item label="客户类别">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_TYPE, customer.type) }}</el-descriptions-item> <!-- <el-descriptions-item label="è”系方å¼">{{ customer }}</el-descriptions-item>--> - <el-descriptions-item label="推介人">{{ customer.promoter }}</el-descriptions-item> - <el-descriptions-item label="跟进客æœ">{{ customer.customerService }}</el-descriptions-item> + <el-descriptions-item label="推介人">{{ promoter }}</el-descriptions-item> + <el-descriptions-item label="跟进客æœ">{{ customerService }}</el-descriptions-item> <el-descriptions-item label="å…¬å¸å称">{{ customer.company }}</el-descriptions-item> <el-descriptions-item label="è”系地å€">{{ customer.address }}</el-descriptions-item> <el-descriptions-item label="创建时间">{{ parseTime(customer.createTime) }}</el-descriptions-item> @@ -172,7 +172,7 @@ </template> <script> -import { getCustomer } from '@/api/ecw/customer' +import { getCustomer, getCustomerSelect } from '@/api/ecw/customer' import { DICT_TYPE, getDictDataLabel } from '@/utils/dict' import { getProductTypeList } from '@/api/ecw/productType' import { getNodeList } from '@/api/ecw/node' @@ -180,6 +180,7 @@ import DictSelector from "@/components/DictSelector" import CustomerFollow from "@/components/CustomerFollow" import { parseTime } from '@/utils/ruoyi' import CustomerComplaint from '@/views/ecw/customerComplaint' +import { listServiceUser } from '@/api/system/user' export default { name: 'query', @@ -202,6 +203,12 @@ export default { this.productTypeList = r.data }) + getCustomerSelect().then(r => { + this.customerSelect = r.data + }) + listServiceUser().then(r => { + this.serviceUserList = r.data + }) }, data() { return { @@ -210,6 +217,8 @@ export default { parseTime, nodeList: [], productTypeList: [], + customerSelect: [], + serviceUserList: [], customer: { id: undefined, number: undefined, @@ -258,6 +267,12 @@ export default { pickupPoint(){ const pickupPoint = this.nodeList.find(p => p.id === parseInt(this.customer.pickupPoint)) return pickupPoint ? pickupPoint.titleZh : '' + }, + promoter() { + return this.customerSelect.find(e => e.id === this.customer.promoter)?.name || '' + }, + customerService() { + return this.serviceUserList.find(e => e.id === this.customer.customerService)?.nickname || '' } } } diff --git a/src/views/ecw/customerComplaint/index.vue b/src/views/ecw/customerComplaint/index.vue index 85f8812f..fbf67d5e 100644 --- a/src/views/ecw/customerComplaint/index.vue +++ b/src/views/ecw/customerComplaint/index.vue @@ -100,7 +100,7 @@ v-for="item in customerSelect" :key="item.id" :label="item.name" - :value="item.id.toString()"></el-option> + :value="item.id"></el-option> </el-select> </el-form-item> <el-form-item label="投诉类型" prop="type"> -- 2.22.0