Commit 4aa1e598 authored by Marcus's avatar Marcus

Merge remote-tracking branch 'origin/dev' into dev

parents c91335d9 7dabf2ad
...@@ -296,7 +296,8 @@ export default { ...@@ -296,7 +296,8 @@ export default {
readonly: false, readonly: false,
// 表单参数 // 表单参数
form: { form: {
status: 1 status: 1,
isSimilarSuperposition: true
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -361,12 +362,18 @@ export default { ...@@ -361,12 +362,18 @@ export default {
// 满减组合单位列表 // 满减组合单位列表
combUnitList(){ combUnitList(){
let arr = [] let arr = []
this.currencyList.forEach(item => {
arr.push({ // 满减和折扣暂时不需要货币单位
label: this.$l(item, 'title'), if(this.form.type != 2 && this.form.type != 4){
value: 'fullCurrencyId_' + item.id this.currencyList.forEach(item => {
}) arr.push({
}) label: this.$l(item, 'title'),
value: 'fullCurrencyId_' + item.id
})
})
}
this.unitList.forEach(item => { this.unitList.forEach(item => {
arr.push({ arr.push({
label: this.$l(item, 'title'), label: this.$l(item, 'title'),
...@@ -590,7 +597,7 @@ export default { ...@@ -590,7 +597,7 @@ export default {
validDays: undefined, validDays: undefined,
costType: undefined, costType: undefined,
discountDetailed: undefined, discountDetailed: undefined,
isSimilarSuperposition: undefined, isSimilarSuperposition: true,
couponIds: undefined, couponIds: undefined,
suitableUserType: undefined, suitableUserType: undefined,
suitableLineType: undefined, suitableLineType: undefined,
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<el-form-item :label="$t('客户等级')" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small"> <el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('联系方式')"> <el-form-item :label="$t('联系方式')">
...@@ -30,19 +30,19 @@ ...@@ -30,19 +30,19 @@
<el-form-item :label="$t('客户来源')" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small"> <el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')" prop="source"> <el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')"> <el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList" <el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" /> :key="dict.id" :label=" isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户状态')" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small"> <el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('信用等级')" prop="department"> <el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" > <el-select clearable v-model="queryParams.creditLevel" >
<el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option> <el-option v-for="(item,index) in creditList" :label="isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" /> <dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template> </template>
</el-table-column> </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"> <el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
<el-form-item :label="$t('国家')" prop="country"> <el-form-item :label="$t('国家')" prop="country">
<el-select v-model="form.country" :placeholder="$t('请选择国家')"> <el-select v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.COUNTRY)" <el-option v-for="dict in getDictDatas(DICT_TYPE.COUNTRY)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
<el-form-item :label="$t('客户等级')" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" :placeholder="$t('请选择客户等级')"> <el-select v-model="form.level" :placeholder="$t('请选择客户等级')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
<el-form-item :label="$t('客户类别')" prop="type"> <el-form-item :label="$t('客户类别')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择客户类别')"> <el-select v-model="form.type" :placeholder="$t('请选择客户类别')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_TYPE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
<el-form-item :label="$t('客户来源')" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select v-model="form.source" :placeholder="$t('请选择客户来源')"> <el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
<el-form-item :label="$t('结算方式')" prop="balance"> <el-form-item :label="$t('结算方式')" prop="balance">
<el-select v-model="form.balance" :placeholder="$t('请选择结算方式')"> <el-select v-model="form.balance" :placeholder="$t('请选择结算方式')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -270,9 +270,10 @@ ...@@ -270,9 +270,10 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户状态')" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select v-model="form.status" :placeholder="$t('请选择客户状态')"> <el-select v-model="form.status" :placeholder="$t('请选择客户状态')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -378,7 +379,7 @@ ...@@ -378,7 +379,7 @@
<template v-slot="{row}"> <template v-slot="{row}">
<el-select v-model="row.areaCode" :placeholder="$t('请选择区号')"> <el-select v-model="row.areaCode" :placeholder="$t('请选择区号')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.AREA_CODE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.AREA_CODE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
...@@ -404,7 +405,7 @@ ...@@ -404,7 +405,7 @@
<template v-slot="{row}"> <template v-slot="{row}">
<el-select v-model="row.social" :placeholder="$t('请选择社交软件')"> <el-select v-model="row.social" :placeholder="$t('请选择社交软件')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
...@@ -522,9 +523,12 @@ import Template from "@/views/cms/template/index.vue"; ...@@ -522,9 +523,12 @@ import Template from "@/views/cms/template/index.vue";
export default { export default {
name: "Customer", name: "Customer",
computed:{ computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
channel(){ channel(){
return (val)=>{ 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 +616,7 @@ export default { ...@@ -612,7 +616,7 @@ export default {
methods: { methods: {
countryFormatter(row, column, cellValue) { countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue) const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh return this.isChinese ? country?.nameZh : country?.nameEn
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<el-form-item :label="$t('客户来源')" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small"> <el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
...@@ -137,6 +137,11 @@ export default { ...@@ -137,6 +137,11 @@ export default {
this.customerServiceList = r.data; this.customerServiceList = r.data;
}) })
}, },
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
methods: { methods: {
// 导出 // 导出
handleExport() { handleExport() {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-descriptions-item :label="$t('结算方式')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item> <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('客户生日')">{{ parseTime(customer.birthday, '{y}-{m}-{d}') }}</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')"> <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>--> <!-- <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>
<el-descriptions-item :label="$t('资源类型')"> <el-descriptions-item :label="$t('资源类型')">
...@@ -600,7 +600,7 @@ export default { ...@@ -600,7 +600,7 @@ export default {
} }
}, },
computed: { computed: {
isChinese(){ isChinese(){
return this.$i18n.locale === 'zh_CN' return this.$i18n.locale === 'zh_CN'
}, },
productType(){ productType(){
...@@ -625,7 +625,8 @@ export default { ...@@ -625,7 +625,8 @@ export default {
if(val === 'all'){ if(val === 'all'){
return this.$t('信用分') return this.$t('信用分')
}else{ }else{
return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val)||{}).label if(this.isChinese) return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val)||{}).label
else return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val)||{}).labelEn
} }
} }
} }
......
...@@ -27,19 +27,19 @@ ...@@ -27,19 +27,19 @@
<el-form-item :label="$t('佣金类型')" prop="transportId"> <el-form-item :label="$t('佣金类型')" prop="transportId">
<el-select v-model="queryParams.type" clearable size="small"> <el-select v-model="queryParams.type" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMISSION_TYPE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMISSION_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('运输方式')" prop="departureId"> <el-form-item :label="$t('运输方式')" prop="departureId">
<el-select v-model="queryParams.departureId" clearable size="small"> <el-select v-model="queryParams.departureId" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="objectiveId"> <el-form-item :label="$t('始发地')" prop="objectiveId">
<el-select v-model="queryParams.objectiveId" clearable size="small"> <el-select v-model="queryParams.objectiveId" clearable size="small">
<el-option v-for="dict in exportCityList" <el-option v-for="dict in exportCityList"
:key="dict.id" :label="dict.titleZh" :value="dict.id"/> :key="dict.id" :label=" isChinese ? dict.titleZh : dict.titleEn" :value="dict.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="customsType"> <el-form-item :label="$t('目的地')" prop="customsType">
...@@ -51,13 +51,13 @@ ...@@ -51,13 +51,13 @@
<el-form-item :label="$t('报关方式')" prop="approval"> <el-form-item :label="$t('报关方式')" prop="approval">
<el-select v-model="queryParams.approval" clearable size="small"> <el-select v-model="queryParams.approval" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.SHIPPING_DECLARATION_TYPE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.SHIPPING_DECLARATION_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('备案')" prop="darkReturnType"> <el-form-item :label="$t('备案')" prop="darkReturnType">
<el-select v-model="queryParams.darkReturnType" clearable size="small"> <el-select v-model="queryParams.darkReturnType" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<div style="width:100%;display: flex;justify-content: space-between;margin-bottom: 50px;"> <div style="width:100%;display: flex;justify-content: space-between;margin-bottom: 50px;">
...@@ -195,6 +195,9 @@ export default { ...@@ -195,6 +195,9 @@ export default {
}; };
}, },
computed:{ computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
//目的地 //目的地
importCityList(){ importCityList(){
return this.tradeCityList.filter(item => item.type == 1) return this.tradeCityList.filter(item => item.type == 1)
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<el-form-item :label="$t('处理状态')" prop="status"> <el-form-item :label="$t('处理状态')" prop="status">
<el-select v-model="queryParams.status" :placeholder="$t('请选择处理状态')" clearable size="small"> <el-select v-model="queryParams.status" :placeholder="$t('请选择处理状态')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_STATUS)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label=" isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('投诉编号')" prop="code"> <el-form-item :label="$t('投诉编号')" prop="code">
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<el-form-item :label="$t('客户等级')" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small"> <el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('联系方式')"> <el-form-item :label="$t('联系方式')">
...@@ -30,19 +30,19 @@ ...@@ -30,19 +30,19 @@
<el-form-item :label="$t('客户来源')" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small"> <el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')" prop="source"> <el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="form.country" :placeholder="$t('请选择国家')"> <el-select clearable v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList" <el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" /> :key="dict.id" :label=" isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户状态')" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small"> <el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('信用等级')" prop="department"> <el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" > <el-select clearable v-model="queryParams.creditLevel" >
<el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option> <el-option v-for="(item,index) in creditList" :label=" isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" /> <dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template> </template>
</el-table-column> </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"> <el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
<el-form-item :label="$t('客户等级')" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" :placeholder="$t('请选择客户等级')"> <el-select v-model="form.level" :placeholder="$t('请选择客户等级')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
<el-form-item :label="$t('所属代理')" prop="agentId"> <el-form-item :label="$t('所属代理')" prop="agentId">
<el-select v-model="form.agentId" :placeholder="$t('请选择所属代理')"> <el-select v-model="form.agentId" :placeholder="$t('请选择所属代理')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
<el-form-item :label="$t('客户类别')" prop="type"> <el-form-item :label="$t('客户类别')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择客户类别')"> <el-select v-model="form.type" :placeholder="$t('请选择客户类别')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_TYPE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
<el-form-item :label="$t('客户来源')" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select v-model="form.source" :placeholder="$t('请选择客户来源')"> <el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
<el-form-item :label="$t('结算方式')" prop="balance"> <el-form-item :label="$t('结算方式')" prop="balance">
<el-select v-model="form.balance" :placeholder="$t('请选择结算方式')"> <el-select v-model="form.balance" :placeholder="$t('请选择结算方式')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
<el-form-item :label="$t('客户状态')" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select v-model="form.status" :placeholder="$t('请选择客户状态')"> <el-select v-model="form.status" :placeholder="$t('请选择客户状态')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -361,6 +361,11 @@ import {getCreditPage} from "@/api/customer/credit"; ...@@ -361,6 +361,11 @@ import {getCreditPage} from "@/api/customer/credit";
export default { export default {
name: "Customer", name: "Customer",
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
components: { components: {
}, },
data() { data() {
...@@ -429,7 +434,7 @@ export default { ...@@ -429,7 +434,7 @@ export default {
methods: { methods: {
countryFormatter(row, column, cellValue) { countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue) const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh return this.isChinese ? country?.nameZh : country?.nameEn
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-form-item :label="$t('客户等级')" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small"> <el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('联系方式')"> <el-form-item :label="$t('联系方式')">
...@@ -31,19 +31,19 @@ ...@@ -31,19 +31,19 @@
<el-form-item :label="$t('客户来源')" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small"> <el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')" prop="source"> <el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')"> <el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList" <el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" /> :key="dict.id" :label="isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户状态')" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small"> <el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('信用等级')" prop="department"> <el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" > <el-select clearable v-model="queryParams.creditLevel" >
<el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option> <el-option v-for="(item,index) in creditList" :label="isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" /> <dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template> </template>
</el-table-column> </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"> <el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
...@@ -255,7 +255,7 @@ export default { ...@@ -255,7 +255,7 @@ export default {
methods: { methods: {
countryFormatter(row, column, cellValue) { countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue) const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh return this.isChinese ? country?.nameZh : country?.nameEn
}, },
handleSelectionChange(val){ handleSelectionChange(val){
this.selectCustomerList = val.map(i => i.id); this.selectCustomerList = val.map(i => i.id);
...@@ -444,6 +444,11 @@ export default { ...@@ -444,6 +444,11 @@ export default {
this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.clearSelection();
} }
}, },
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
} }
}; };
</script> </script>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-form-item :label="$t('状态')" prop="status"> <el-form-item :label="$t('状态')" prop="status">
<el-select v-model="queryParams.status" :placeholder="$t('请选择状态')" clearable size="small"> <el-select v-model="queryParams.status" :placeholder="$t('请选择状态')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_MESSAGE_LEAVE_STATUS)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_MESSAGE_LEAVE_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-form-item :label="$t('客户等级')" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small"> <el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('联系方式')"> <el-form-item :label="$t('联系方式')">
...@@ -25,19 +25,19 @@ ...@@ -25,19 +25,19 @@
<el-form-item :label="$t('客户来源')" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small"> <el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')" prop="source"> <el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')"> <el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList" <el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" /> :key="dict.id" :label=" isChinese ? dict.nameZh : dict.nameEn " :value="parseInt(dict.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户状态')" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small"> <el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<el-form-item :label="$t('信用等级')" prop="department"> <el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" > <el-select clearable v-model="queryParams.creditLevel" >
<el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option> <el-option v-for="(item,index) in creditList" :label="isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" /> <dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template> </template>
</el-table-column> </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"> <el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
...@@ -162,6 +162,11 @@ export default { ...@@ -162,6 +162,11 @@ export default {
customerComplaints, customerComplaints,
transferCustomer transferCustomer
}, },
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
data() { data() {
return { return {
show:false, show:false,
...@@ -243,7 +248,7 @@ export default { ...@@ -243,7 +248,7 @@ export default {
}, },
countryFormatter(row, column, cellValue) { countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue) const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh return this.isChinese ? country?.nameZh : country?.nameEn
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-form-item :label="$t('客户等级')" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small"> <el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('联系方式')"> <el-form-item :label="$t('联系方式')">
...@@ -31,19 +31,19 @@ ...@@ -31,19 +31,19 @@
<el-form-item :label="$t('客户来源')" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small"> <el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')" prop="source"> <el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')"> <el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList" <el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" /> :key="dict.id" :label=" isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户状态')" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small"> <el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('信用等级')" prop="department"> <el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" > <el-select clearable v-model="queryParams.creditLevel" >
<el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option> <el-option v-for="(item,index) in creditList" :label="isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" /> <dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template> </template>
</el-table-column> </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"> <el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
...@@ -245,10 +245,15 @@ export default { ...@@ -245,10 +245,15 @@ export default {
// this.nodeList = r.data // this.nodeList = r.data
// }) // })
}, },
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
methods: { methods: {
countryFormatter(row, column, cellValue) { countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue) const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh return this.isChinese ? country?.nameZh : country?.nameEn
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div class="title-font"> <div class="title-font">
<label>{{$t('报价单所属')}}{{list.relation?list.relation==1?$t('发货人'):$t('收货人'):$t('发货人')}}</label> <label>{{$t('报价单所属')}}{{list.relation?list.relation==1?$t('发货人'):$t('收货人'):$t('发货人')}}</label>
</div> </div>
<el-descriptions :column="3" border class="card"> <el-descriptions :column="3" border class="card" v-if="list.consignorId">
<el-descriptions-item :label="$t('发货人')+':'"> <el-descriptions-item :label="$t('发货人')+':'">
{{consignorData.contactsName||$t('')}} {{consignorData.contactsName||$t('')}}
</el-descriptions-item> </el-descriptions-item>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="3" border class="card"> <el-descriptions :column="3" border class="card" v-if="list.consigneeId">
<el-descriptions-item :label="$t('收货人')+':'"> <el-descriptions-item :label="$t('收货人')+':'">
{{consigneeData.contactsName||$t('')}} {{consigneeData.contactsName||$t('')}}
</el-descriptions-item> </el-descriptions-item>
......
...@@ -289,6 +289,33 @@ ...@@ -289,6 +289,33 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div v-if="feeDetail && feeDetail.coupons && feeDetail.coupons.length" class="page-title">优惠详情</div>
<el-table v-if="feeDetail && feeDetail.coupons && feeDetail.coupons.length" :data="feeDetail.coupons">
<el-table-column label="优惠ID" prop="couponId"></el-table-column>
<el-table-column label="优惠名称">
<template slot-scope="{row}">
{{ $l(row, 'title') }}
</template>
</el-table-column>
<el-table-column label="类型">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="row.type" ></dict-tag>
</template>
</el-table-column>
<el-table-column label="运费优惠">
<template slot-scope="{row}">
{{ row.freightReduceAmount}}
{{currencyMap[row.freightReduceCurrencyId]}}
</template>
</el-table-column>
<el-table-column label="清关费优惠">
<template slot-scope="{row}">
{{ row.clearanceReduceAmount}}
{{ currencyMap[row.clearanceReduceCurrencyId] }}
</template>
</el-table-column>
</el-table>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -406,6 +433,8 @@ export default { ...@@ -406,6 +433,8 @@ export default {
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
console.log('2023-01-14 23:23 看到此消息则表示代码最新')
}, },
methods: { methods: {
// 显示费用详情 // 显示费用详情
...@@ -488,7 +517,7 @@ export default { ...@@ -488,7 +517,7 @@ export default {
label: this.$t('价格更新时间'), label: this.$t('价格更新时间'),
value: parseTime(row.updateTime) value: parseTime(row.updateTime)
}) })
this.feeDetail = {freight, clearance, charging: row.charging} this.feeDetail = {freight, clearance, charging: row.charging, coupons: row.couponInfoVOList}
}, },
closeFeeDetail(){ closeFeeDetail(){
......
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column :label="$t('公司名称')" align="center" prop="enterpriseName" /> <el-table-column :label="$t('公司名称')" align="center" prop="enterpriseName" />
<el-table-column :label="$t('用户昵称')" align="center" prop="nickname" /> <el-table-column :label="$t('用户昵称')" align="center" prop="nickname" width="150"/>
<el-table-column :label="$t('真实姓名')" align="center" prop="identityName" /> <el-table-column :label="$t('真实姓名')" align="center" prop="identityName" />
<el-table-column :label="$t('区号')"> <el-table-column :label="$t('区号')">
<template v-slot:default = 'scope'> <template v-slot:default = 'scope'>
+{{scope.row.areaCode ? `${scope.row.areaCode}`:''}} +{{scope.row.areaCode ? `${scope.row.areaCode}`:''}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('手机号')" show-overflow-tooltip align="center" prop="mobile" > <el-table-column :label="$t('手机号')" show-overflow-tooltip align="center" prop="mobile" width="150">
</el-table-column> </el-table-column>
<el-table-column :label="$t('成交')" align="center" prop="customerStatus" show-overflow-tooltip > <el-table-column :label="$t('成交')" align="center" prop="customerStatus" show-overflow-tooltip >
<template v-slot="{row}"> <template v-slot="{row}">
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" /> <el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" />
</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" >
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="!scope.row.identityAuditStatus">{{$t('未提交')}}</div> <div v-if="!scope.row.identityAuditStatus">{{$t('未提交')}}</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.identityAuditStatus" ></dict-tag> <dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.identityAuditStatus" ></dict-tag>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</el-tooltip> </el-tooltip>
</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" >
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="!scope.row.enterpriseAuditStatus">{{$t('未提交')}}</div> <div v-if="!scope.row.enterpriseAuditStatus">{{$t('未提交')}}</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.enterpriseAuditStatus" ></dict-tag> <dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.enterpriseAuditStatus" ></dict-tag>
......
...@@ -22,14 +22,18 @@ ...@@ -22,14 +22,18 @@
v-hasPermi="['system:menu:create']">{{ $t('新增') }}</el-button> v-hasPermi="['system:menu:create']">{{ $t('新增') }}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">展开/折叠</el-button> <el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">{{$t('展开')}}/{{$t('折叠')}}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-if="refreshTable" v-loading="loading" :data="menuList" row-key="id" :default-expand-all="isExpandAll" <el-table v-if="refreshTable" v-loading="loading" :data="menuList" row-key="id" :default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"> :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column prop="name" :label="$t('菜单名称')" :show-overflow-tooltip="true" width="250"></el-table-column> <el-table-column prop="name" :label="$t('菜单名称')" :show-overflow-tooltip="true" width="250">
<template slot-scope="{row}">
{{ $l(row, 'name') }}
</template>
</el-table-column>
<el-table-column prop="icon" :label="$t('图标')" align="center" width="100"> <el-table-column prop="icon" :label="$t('图标')" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<svg-icon :icon-class="scope.row.icon" /> <svg-icon :icon-class="scope.row.icon" />
...@@ -74,7 +78,7 @@ ...@@ -74,7 +78,7 @@
<el-form-item :label="$t('菜单类型')" prop="type"> <el-form-item :label="$t('菜单类型')" prop="type">
<el-radio-group v-model="form.type"> <el-radio-group v-model="form.type">
<el-radio v-for="dict in menuTypeDictDatas" :key="parseInt(dict.value)" :label="parseInt(dict.value)"> <el-radio v-for="dict in menuTypeDictDatas" :key="parseInt(dict.value)" :label="parseInt(dict.value)">
{{dict.label}}</el-radio> {{$l(dict, 'label')}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -135,7 +139,7 @@ ...@@ -135,7 +139,7 @@
<el-form-item :label="$t('菜单状态')"> <el-form-item :label="$t('菜单状态')">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)" <el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio> :key="dict.value" :label="parseInt(dict.value)">{{$l(dict, 'label')}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -241,12 +245,13 @@ export default { ...@@ -241,12 +245,13 @@ export default {
} }
return { return {
id: node.id, id: node.id,
label: node.name, label: this.$l(node, 'name'),
children: node.children children: node.children
}; };
}, },
/** 查询菜单下拉树结构 */ /** 查询菜单下拉树结构 */
getTreeselect() { getTreeselect() {
console.log('this.handleTree', this.handleTree)
listMenu().then(response => { listMenu().then(response => {
this.menuOptions = []; this.menuOptions = [];
const menu = { id: 0, name: this.$t('主类目'), children: [] }; const menu = { id: 0, name: this.$t('主类目'), children: [] };
...@@ -327,10 +332,10 @@ export default { ...@@ -327,10 +332,10 @@ export default {
if (path && path.indexOf('http://') === -1 || path.indexOf('https://') === -1) { if (path && path.indexOf('http://') === -1 || path.indexOf('https://') === -1) {
// 父权限为根节点,path 必须以 / 开头 // 父权限为根节点,path 必须以 / 开头
if (this.form.parentId === 0 && path.charAt(0) !== '/') { if (this.form.parentId === 0 && path.charAt(0) !== '/') {
this.$modal.msgSuccess('前端必须以 / 开头') this.$modal.msgSuccess(this.$t('前端必须以 / 开头'))
return return
} else if (this.form.parentId !== 0 && path.charAt(0) === '/') { } else if (this.form.parentId !== 0 && path.charAt(0) === '/') {
this.$modal.msgSuccess('前端不能以 / 开头') this.$modal.msgSuccess(this.$t('前端不能以 / 开头'))
return return
} }
} }
...@@ -339,13 +344,13 @@ export default { ...@@ -339,13 +344,13 @@ export default {
// 提交 // 提交
if (this.form.id !== undefined) { if (this.form.id !== undefined) {
updateMenu(this.form).then(response => { updateMenu(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess(this.$t("修改成功"));
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addMenu(this.form).then(response => { addMenu(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess(this.$t("新增成功"));
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
...@@ -355,11 +360,11 @@ export default { ...@@ -355,11 +360,11 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() { this.$modal.confirm(this.$t('是否确认删除此项?')).then(function() {
return delMenu(row.id); return delMenu(row.id);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess(this.$t("删除成功"));
}).catch(() => {}); }).catch(() => {});
} }
} }
......
...@@ -111,15 +111,15 @@ ...@@ -111,15 +111,15 @@
<el-option <el-option
v-for="item in dataScopeDictDatas" v-for="item in dataScopeDictDatas"
:key="parseInt(item.value)" :key="parseInt(item.value)"
:label="item.label" :label="$l(item, 'label')"
:value="parseInt(item.value)" :value="parseInt(item.value)"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('数据权限')" v-show="form.dataScope === SysDataScopeEnum.DEPT_CUSTOM"> <el-form-item :label="$t('数据权限')" v-show="form.dataScope === SysDataScopeEnum.DEPT_CUSTOM">
<el-checkbox :checked="!form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">父子联动(选中父节点,自动选择子节点)</el-checkbox> <el-checkbox :checked="!form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">{{$t('父子联动')}}({{$t('选中父节点,自动选择子节点')}})</el-checkbox>
<el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">展开/折叠</el-checkbox> <el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">{{$t('展开')}}/{{$t('折叠')}}</el-checkbox>
<el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">全选/全不选</el-checkbox> <el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">{{$t('全选')}}/{{$t('全不选')}}</el-checkbox>
<el-tree <el-tree
class="tree-border" class="tree-border"
:data="deptOptions" :data="deptOptions"
...@@ -128,8 +128,11 @@ ...@@ -128,8 +128,11 @@
ref="dept" ref="dept"
node-key="id" node-key="id"
:check-strictly="form.deptCheckStrictly" :check-strictly="form.deptCheckStrictly"
empty-text="加载中,请稍后" :empty-text="$t('加载中,请稍后')"
:props="defaultProps" :props="{
label: 'name',
children: 'children'
}"
></el-tree> ></el-tree>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -149,10 +152,10 @@ ...@@ -149,10 +152,10 @@
<el-input v-model="form.code" :disabled="true" /> <el-input v-model="form.code" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('菜单权限')"> <el-form-item :label="$t('菜单权限')">
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox> <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">{{$t('展开')}}/{{$t('折叠')}}</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox> <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">{{$t('全选')}}/{{$t('全不选')}}</el-checkbox>
<el-tree class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id" <el-tree v-if="openMenu" class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id"
:check-strictly="true" empty-text="加载中,请稍后" :props="defaultProps"></el-tree> :check-strictly="true" :empty-text="$t('加载中,请稍后')" :props="defaultProps"></el-tree>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -223,10 +226,6 @@ export default { ...@@ -223,10 +226,6 @@ export default {
}, },
// 表单参数 // 表单参数
form: {}, form: {},
defaultProps: {
label: "name",
children: "children"
},
// 表单校验 // 表单校验
rules: { rules: {
name: [ name: [
...@@ -249,6 +248,14 @@ export default { ...@@ -249,6 +248,14 @@ export default {
dataScopeDictDatas: getDictDatas(DICT_TYPE.SYSTEM_DATA_SCOPE) dataScopeDictDatas: getDictDatas(DICT_TYPE.SYSTEM_DATA_SCOPE)
}; };
}, },
computed:{
defaultProps(){
return {
label: this.$i18n.locale.indexOf('en') > -1 ? 'nameEn' : 'name',
children: "children"
}
},
},
created() { created() {
this.getList(); this.getList();
}, },
...@@ -391,6 +398,7 @@ export default { ...@@ -391,6 +398,7 @@ export default {
listSimpleMenus().then(response => { listSimpleMenus().then(response => {
// 处理 menuOptions 参数 // 处理 menuOptions 参数
this.menuOptions = []; this.menuOptions = [];
console.log("response.data:"+JSON.stringify(response.data));
this.menuOptions.push(...this.handleTree(response.data, "id")); this.menuOptions.push(...this.handleTree(response.data, "id"));
}); });
// 获得角色拥有的菜单集合 // 获得角色拥有的菜单集合
......
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