Commit 31f6a7eb authored by 邓春圆's avatar 邓春圆

国际化优化2

parent f5af7e5b
......@@ -101,7 +101,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column :label="$t('信用等级')" :prop="isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn'"></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
......@@ -522,9 +522,12 @@ import Template from "@/views/cms/template/index.vue";
export default {
name: "Customer",
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
channel(){
return (val)=>{
return !!val ? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE).filter(i => (val.split(',') || []).includes(i.value)).map(i => i.label).join('') :''
return !!val ? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE).filter(i => (val.split(',') || []).includes(i.value)).map(i => this.isChinese ? i.label : i.labelEn ).join('') :''
}
}
},
......@@ -612,7 +615,7 @@ export default {
methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
return this.isChinese ? country?.nameZh : country?.nameEn
},
/** 查询列表 */
getList() {
......
......@@ -19,7 +19,7 @@
<el-descriptions-item :label="$t('结算方式')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户生日')">{{ parseTime(customer.birthday, '{y}-{m}-{d}') }}</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
{{ getDictDatas2(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE, (customer.transportType||'').split(',')).map(e => e.label).join(', ') }}
{{ getDictDatas2(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE, (customer.transportType||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ') }}
<!-- <dict-tag v-if="customer.transportType" v-for="item in (customer.transportType || '').split(',')" :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" :value="item"></dict-tag>-->
</el-descriptions-item>
<el-descriptions-item :label="$t('资源类型')">
......@@ -600,7 +600,7 @@ export default {
}
},
computed: {
isChinese(){
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
productType(){
......
......@@ -88,7 +88,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column :label="$t('信用等级')" :prop="isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn'"></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
......@@ -361,6 +361,11 @@ import {getCreditPage} from "@/api/customer/credit";
export default {
name: "Customer",
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
components: {
},
data() {
......@@ -429,7 +434,7 @@ export default {
methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
return this.isChinese ? country?.nameZh : country?.nameEn
},
/** 查询列表 */
getList() {
......
......@@ -99,7 +99,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column :label="$t('信用等级')" :prop=" isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn' "></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
......@@ -255,7 +255,7 @@ export default {
methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
return this.isChinese ? country?.nameZh : country?.nameEn
},
handleSelectionChange(val){
this.selectCustomerList = val.map(i => i.id);
......@@ -444,6 +444,11 @@ export default {
this.$refs.multipleTable.clearSelection();
}
},
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
}
};
</script>
......@@ -88,7 +88,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column :label="$t('信用等级')" :prop="isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn' "></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
......@@ -162,6 +162,11 @@ export default {
customerComplaints,
transferCustomer
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
data() {
return {
show:false,
......@@ -243,7 +248,7 @@ export default {
},
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
return this.isChinese ? country?.nameZh : country?.nameEn
},
/** 查询列表 */
getList() {
......
......@@ -93,7 +93,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column :label="$t('信用等级')" :prop="isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn'"></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
......@@ -245,10 +245,15 @@ export default {
// this.nodeList = r.data
// })
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
return this.isChinese ? country?.nameZh : country?.nameEn
},
/** 查询列表 */
getList() {
......
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