Commit ca4d9052 authored by zhengyi's avatar zhengyi

客户类别多选展示bug修复

parent 56ce6a19
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
<script> <script>
import {createCustomer} from '@/api/ecw/customer' import {createCustomer} from '@/api/ecw/customer'
import {DICT_TYPE} from "@/utils/dict";
import {listServiceUser} from "@/api/system/user" import {listServiceUser} from "@/api/system/user"
import { getCountryListAll } from '@/api/ecw/country' import { getCountryListAll } from '@/api/ecw/country'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts' import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
...@@ -74,7 +75,7 @@ export default { ...@@ -74,7 +75,7 @@ export default {
data(){ data(){
return { return {
show: true, show: true,
DICT_TYPE,
// 表单参数 // 表单参数
form: { form: {
customerContacts:[{isDefault: 1}] customerContacts:[{isDefault: 1}]
......
...@@ -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_TYPE, (row.type||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_TYPE" <!-- <dict-tag-->
:value="scope.row.type" <!-- :type="DICT_TYPE.CUSTOMER_TYPE"-->
/> <!-- :value="scope.row.type"-->
<!-- />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('角色')" align="center"> <el-table-column :label="$t('角色')" align="center">
......
...@@ -644,11 +644,12 @@ ...@@ -644,11 +644,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_TYPE, (row.type||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_TYPE" <!-- <dict-tag-->
:value="scope.row.type" <!-- :type="DICT_TYPE.CUSTOMER_TYPE"-->
/> <!-- :value="scope.row.type"-->
<!-- />-->
</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">
......
...@@ -101,7 +101,8 @@ ...@@ -101,7 +101,8 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户类别')" align="center" prop="sourse"> <el-table-column :label="$t('客户类别')" align="center" prop="sourse">
<template v-slot="{row}"> <template v-slot="{row}">
<dict-tag :value="row.type" :type="DICT_TYPE.CUSTOMER_TYPE" /> {{ getDictDatas2(DICT_TYPE.CUSTOMER_TYPE, (row.type||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
<!-- <dict-tag :value="row.type" :type="DICT_TYPE.CUSTOMER_TYPE" />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180"> <el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180">
...@@ -130,16 +131,18 @@ ...@@ -130,16 +131,18 @@
<script> <script>
import {updateCustomer, getCustomer, import {updateCustomer, getCustomer,
getCustomerPage, exportCustomerExcel } from "@/api/ecw/indirectCustomer"; getCustomerPage, exportCustomerExcel } from "@/api/ecw/indirectCustomer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { getDictDatas, DICT_TYPE, getDictDatas2 } from '@/utils/dict';
import {listServiceUser} from "@/api/system/user"; import {listServiceUser} from "@/api/system/user";
import {exportCustomerComplaintExcel} from "@/api/ecw/customerComplaint"; import {exportCustomerComplaintExcel} from "@/api/ecw/customerComplaint";
import {indirectCustomerExportExcel} from "@/api/ecw/customer"; import {indirectCustomerExportExcel} from "@/api/ecw/customer";
import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue"; import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue";
import Template from "@/views/cms/template/index.vue";
export default { export default {
name: "EcwCustomerIndirectcustomer", name: "EcwCustomerIndirectcustomer",
components: { components: {
Template,
AreaCodeSelector AreaCodeSelector
}, },
activated() { activated() {
...@@ -149,6 +152,7 @@ export default { ...@@ -149,6 +152,7 @@ export default {
return { return {
exportLoading:false, exportLoading:false,
getDictDatas, getDictDatas,
getDictDatas2,
DICT_TYPE, DICT_TYPE,
// 遮罩层 // 遮罩层
loading: true, loading: true,
......
...@@ -454,11 +454,12 @@ ...@@ -454,11 +454,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_TYPE, (row.type||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_TYPE" <!-- <dict-tag-->
:value="scope.row.type" <!-- :type="DICT_TYPE.CUSTOMER_TYPE"-->
/> <!-- :value="scope.row.type"-->
<!-- />-->
</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">
......
...@@ -451,11 +451,12 @@ ...@@ -451,11 +451,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_TYPE, (row.type||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_TYPE" <!-- <dict-tag-->
:value="scope.row.type" <!-- :type="DICT_TYPE.CUSTOMER_TYPE"-->
/> <!-- :value="scope.row.type"-->
<!-- />-->
</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">
......
...@@ -508,11 +508,12 @@ ...@@ -508,11 +508,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_TYPE, (row.type||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_TYPE" <!-- <dict-tag-->
:value="scope.row.type" <!-- :type="DICT_TYPE.CUSTOMER_TYPE"-->
/> <!-- :value="scope.row.type"-->
<!-- />-->
</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">
......
...@@ -503,11 +503,12 @@ ...@@ -503,11 +503,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_TYPE, (row.type||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
:type="DICT_TYPE.CUSTOMER_TYPE" <!-- <dict-tag-->
:value="scope.row.type" <!-- :type="DICT_TYPE.CUSTOMER_TYPE"-->
/> <!-- :value="scope.row.type"-->
<!-- />-->
</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">
......
...@@ -401,6 +401,7 @@ ...@@ -401,6 +401,7 @@
<script> <script>
//国家列表接口 //国家列表接口
import { getCountryListAll } from "@/api/ecw/country"; import { getCountryListAll } from "@/api/ecw/country";
import { DICT_TYPE, getDictDatas, getDictDatas2 } from '@/utils/dict'
import UserSelector from "@/components/UserSelector"; import UserSelector from "@/components/UserSelector";
import { listServiceUser2 } from "@/api/system/user"; import { listServiceUser2 } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
...@@ -482,6 +483,9 @@ export default { ...@@ -482,6 +483,9 @@ export default {
return { return {
// 遮罩层 // 遮罩层
loading: true, loading: true,
getDictDatas2,
getDictDatas,
DICT_TYPE,
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 显示搜索条件 // 显示搜索条件
...@@ -849,4 +853,3 @@ export default { ...@@ -849,4 +853,3 @@ export default {
}, },
}; };
</script> </script>
\ No newline at end of file
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