Commit 57642874 authored by zhengyi's avatar zhengyi

客户列表回显bug修复

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