Commit 57642874 authored by zhengyi's avatar zhengyi

客户列表回显bug修复

parent 0fa84789
...@@ -151,11 +151,12 @@ ...@@ -151,11 +151,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('角色')" align="center"> <el-table-column :label="$t('角色')" align="center">
<template slot-scope="scope"> <template slot-scope="{ row }">
<dict-tag {{ getDictDatas2(DICT_TYPE.CUSTOMER_ROLE, (row.roles||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_ROLE" <!-- <dict-tag-->
:value="scope.row.roles" <!-- :type="DICT_TYPE.CUSTOMER_ROLE"-->
/> <!-- :value="scope.row.roles"-->
<!-- />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column>
...@@ -242,7 +243,7 @@ ...@@ -242,7 +243,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:type="DICT_TYPE.CUSTOMER_GET_METHOD" :type="DICT_TYPE.CUSTOMER_GET_METHOD"
:value="scope.row.getMethods" :value="scope.row.getMethod"
/> />
</template> </template>
</el-table-column> </el-table-column>
...@@ -273,15 +274,18 @@ ...@@ -273,15 +274,18 @@
import { getCustomerPage, customerMergeCus } from "@/api/ecw/customer" import { getCustomerPage, customerMergeCus } from "@/api/ecw/customer"
import { getDictDatas, DICT_TYPE } from "@/utils/dict" import { getDictDatas, DICT_TYPE } from "@/utils/dict"
import Contacts from "./contacts.vue"; import Contacts from "./contacts.vue";
import Template from "@/views/cms/template/index.vue";
export default { export default {
name: "CustomerMerge", name: "CustomerMerge",
components: { components: {
Template,
Contacts Contacts
}, },
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
getDictDatas, getDictDatas,
getDictDatas2,
DICT_TYPE, DICT_TYPE,
loading: false, loading: false,
customerId: null, customerId: null,
......
...@@ -652,11 +652,13 @@ ...@@ -652,11 +652,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('角色')" align="center" prop="status"> <el-table-column :label="$t('角色')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="{ row }">
<dict-tag {{ getDictDatas2(DICT_TYPE.CUSTOMER_ROLE, (row.roles||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_ROLE" <!-- {{ getCustomerRoles(row.roles) }}-->
:value="scope.row.roles" <!-- <dict-tag-->
/> <!-- :type="DICT_TYPE.CUSTOMER_ROLE"-->
<!-- :value="scope.row.roles"-->
<!-- />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column>
...@@ -741,7 +743,7 @@ ...@@ -741,7 +743,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:type="DICT_TYPE.CUSTOMER_GET_METHOD" :type="DICT_TYPE.CUSTOMER_GET_METHOD"
:value="scope.row.getMethods" :value="scope.row.getMethod"
/> />
</template> </template>
</el-table-column> </el-table-column>
...@@ -1417,7 +1419,7 @@ import { ...@@ -1417,7 +1419,7 @@ import {
updatecustomerToOld, updatecustomerToOld,
competitorListAll competitorListAll
} from "@/api/ecw/customer"; } from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from "@/utils/dict"; import {getDictDatas, DICT_TYPE, getDictDatas2} from "@/utils/dict";
import { CommonStatusEnum } from "@/utils/constants"; import { CommonStatusEnum } from "@/utils/constants";
import { uploadFile } from "@/api/infra/file"; import { uploadFile } from "@/api/infra/file";
import upload from "@/components/ImageUpload"; import upload from "@/components/ImageUpload";
...@@ -1457,6 +1459,7 @@ export default { ...@@ -1457,6 +1459,7 @@ export default {
return { return {
env: process.env.NODE_ENV, env: process.env.NODE_ENV,
getDictDatas, getDictDatas,
getDictDatas2,
DICT_TYPE, DICT_TYPE,
// 遮罩层 // 遮罩层
loading: true, loading: true,
...@@ -2132,6 +2135,20 @@ export default { ...@@ -2132,6 +2135,20 @@ export default {
return null return null
} }
}, },
getCustomerRoles(ids) {
if (ids) {
const idsArr = ids.split(',')
const strArr = []
DICT_TYPE.CUSTOMER_ROLE.forEach(item => {
if (idsArr.includes(item.value.toString())) {
strArr.push(this.isChinese ? item.label : item.labelEn)
}
})
return strArr.length > 0 ? strArr.join(',') : null
} else {
return null
}
},
getProductTypeNames(ids) { getProductTypeNames(ids) {
if (ids) { if (ids) {
const idsArr = ids.toString().split(',') const idsArr = ids.toString().split(',')
......
...@@ -462,11 +462,12 @@ ...@@ -462,11 +462,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('角色')" align="center" prop="status"> <el-table-column :label="$t('角色')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="{ row }">
<dict-tag {{ getDictDatas2(DICT_TYPE.CUSTOMER_ROLE, (row.roles||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_ROLE" <!-- <dict-tag-->
:value="scope.row.roles" <!-- :type="DICT_TYPE.CUSTOMER_ROLE"-->
/> <!-- :value="scope.row.roles"-->
<!-- />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column>
...@@ -551,7 +552,7 @@ ...@@ -551,7 +552,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:type="DICT_TYPE.CUSTOMER_GET_METHOD" :type="DICT_TYPE.CUSTOMER_GET_METHOD"
:value="scope.row.getMethods" :value="scope.row.getMethod"
/> />
</template> </template>
</el-table-column> </el-table-column>
...@@ -830,7 +831,7 @@ import { ...@@ -830,7 +831,7 @@ import {
competitorListAll competitorListAll
} from "@/api/ecw/customer"; } from "@/api/ecw/customer";
import { listServiceUser, listAllSimpl } from "@/api/system/user" import { listServiceUser, listAllSimpl } from "@/api/system/user"
import { getDictDatas, DICT_TYPE } from '@/utils/dict' import {getDictDatas, DICT_TYPE, getDictDatas2} from '@/utils/dict'
import {CommonStatusEnum} from '@/utils/constants' import {CommonStatusEnum} from '@/utils/constants'
import {handOverCustomer} from "../../../api/ecw/customer"; import {handOverCustomer} from "../../../api/ecw/customer";
import {getCountryListAll} from "@/api/ecw/country"; import {getCountryListAll} from "@/api/ecw/country";
...@@ -844,6 +845,7 @@ import { getCustomerSelect, changeCustomerDefaultPay, changeCustomerNoConsignee, ...@@ -844,6 +845,7 @@ import { getCustomerSelect, changeCustomerDefaultPay, changeCustomerNoConsignee,
import { getProductTypeList } from "@/api/ecw/productType"; import { getProductTypeList } from "@/api/ecw/productType";
import { getProductList } from "@/api/ecw/product"; import { getProductList } from "@/api/ecw/product";
import { listMySimpleDepts } from "@/api/system/dept"; import { listMySimpleDepts } from "@/api/system/dept";
import Template from "@/views/cms/template/index.vue";
export default { export default {
name: "EcwCustomerconfirmIndex", name: "EcwCustomerconfirmIndex",
activated() { activated() {
...@@ -920,6 +922,7 @@ export default { ...@@ -920,6 +922,7 @@ export default {
}, },
}, },
components: { components: {
Template,
Contacts, Contacts,
transferCustomer, transferCustomer,
AreaCodeSelector, AreaCodeSelector,
...@@ -933,6 +936,7 @@ export default { ...@@ -933,6 +936,7 @@ export default {
exportLoading: false, exportLoading: false,
// 显示搜索条件 // 显示搜索条件
showSearch: false, showSearch: false,
getDictDatas2,
// 总条数 // 总条数
total: 0, total: 0,
// 客户列表 // 客户列表
......
...@@ -459,11 +459,12 @@ ...@@ -459,11 +459,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('角色')" align="center" prop="status"> <el-table-column :label="$t('角色')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="{ row }">
<dict-tag {{ getDictDatas2(DICT_TYPE.CUSTOMER_ROLE, (row.roles||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_ROLE" <!-- <dict-tag-->
:value="scope.row.roles" <!-- :type="DICT_TYPE.CUSTOMER_ROLE"-->
/> <!-- :value="scope.row.roles"-->
<!-- />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column>
...@@ -548,7 +549,7 @@ ...@@ -548,7 +549,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:type="DICT_TYPE.CUSTOMER_GET_METHOD" :type="DICT_TYPE.CUSTOMER_GET_METHOD"
:value="scope.row.getMethods" :value="scope.row.getMethod"
/> />
</template> </template>
</el-table-column> </el-table-column>
...@@ -655,6 +656,7 @@ export default { ...@@ -655,6 +656,7 @@ export default {
return { return {
batchTransferShow:false, batchTransferShow:false,
getDictDatas, getDictDatas,
getDictDatas2,
DICT_TYPE, DICT_TYPE,
// 遮罩层 // 遮罩层
loading: true, loading: true,
......
...@@ -516,11 +516,12 @@ ...@@ -516,11 +516,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('角色')" align="center" prop="status"> <el-table-column :label="$t('角色')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="{ row }">
<dict-tag {{ getDictDatas2(DICT_TYPE.CUSTOMER_ROLE, (row.roles||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_ROLE" <!-- <dict-tag-->
:value="scope.row.roles" <!-- :type="DICT_TYPE.CUSTOMER_ROLE"-->
/> <!-- :value="scope.row.roles"-->
<!-- />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column>
...@@ -839,6 +840,7 @@ export default { ...@@ -839,6 +840,7 @@ export default {
countryList: [], countryList: [],
customerServiceList: [], customerServiceList: [],
getDictDatas, getDictDatas,
getDictDatas2,
DICT_TYPE, DICT_TYPE,
// 遮罩层 // 遮罩层
loading: true, loading: true,
......
...@@ -511,11 +511,12 @@ ...@@ -511,11 +511,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('角色')" align="center" prop="status"> <el-table-column :label="$t('角色')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="{ row }">
<dict-tag {{ getDictDatas2(DICT_TYPE.CUSTOMER_ROLE, (row.roles||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_ROLE" <!-- <dict-tag-->
:value="scope.row.roles" <!-- :type="DICT_TYPE.CUSTOMER_ROLE"-->
/> <!-- :value="scope.row.roles"-->
<!-- />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column> <el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column>
...@@ -600,7 +601,7 @@ ...@@ -600,7 +601,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:type="DICT_TYPE.CUSTOMER_GET_METHOD" :type="DICT_TYPE.CUSTOMER_GET_METHOD"
:value="scope.row.getMethods" :value="scope.row.getMethod"
/> />
</template> </template>
</el-table-column> </el-table-column>
...@@ -739,6 +740,7 @@ export default { ...@@ -739,6 +740,7 @@ export default {
data() { data() {
return { return {
getDictDatas, getDictDatas,
getDictDatas2,
DICT_TYPE, DICT_TYPE,
// 遮罩层 // 遮罩层
loading: true, loading: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment