Commit d58cf469 authored by dragondean@qq.com's avatar dragondean@qq.com
parents 223ee884 2a75db02
<template> <template>
<div> <div>
<div style="display: flex;justify-content: right;margin-bottom: 15px"> <div style="display: flex;justify-content: right;margin-bottom: 15px">
<el-button type="primary" style="text-align: right" @click="customerFollow.dialogVisible = true">新增</el-button> <el-button type="primary" style="text-align: right" @click="customerFollow.dialogVisible = true">{{$t('新增')}}</el-button>
</div> </div>
<el-table <el-table
...@@ -10,45 +10,45 @@ ...@@ -10,45 +10,45 @@
> >
<el-table-column <el-table-column
type="index" type="index"
label="序号" :label="$t('序号')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="followType" prop="followType"
label="跟进类型" :label="$t('跟进类型')"
:formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_TYPE, cellValue)" :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_TYPE, cellValue)"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="contactName" prop="contactName"
label="联系人" :label="$t('联系人')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="followMethod" prop="followMethod"
label="跟进方式" :label="$t('跟进方式')"
:formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_METHOD, cellValue)" :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_METHOD, cellValue)"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="followTime" prop="followTime"
label="跟进时间" :label="$t('跟进时间')"
:formatter="(row, column, cellValue) => parseTime(cellValue)" :formatter="(row, column, cellValue) => parseTime(cellValue)"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="feedback" prop="feedback"
label="客户反馈" :label="$t('客户反馈')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="result" prop="result"
label="处理结果" :label="$t('处理结果')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="followUserName" prop="followUserName"
label="客户经理 " :label="$t('客户经理')"
> >
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
@pagination="getCustomerFollowList"/> @pagination="getCustomerFollowList"/>
<el-dialog <el-dialog
append-to-body append-to-body
title="客户跟进" :title="$t('客户跟进')"
:visible.sync="customerFollow.dialogVisible" :visible.sync="customerFollow.dialogVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="customerFollowClose" :before-close="customerFollowClose"
...@@ -64,19 +64,19 @@ ...@@ -64,19 +64,19 @@
<el-form ref="customerFollowForm" :model="customerFollow.form" label-width="80px"> <el-form ref="customerFollowForm" :model="customerFollow.form" label-width="80px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col> <el-col>
<el-form-item label="跟进类型" required> <el-form-item :label="$t('跟进类型')" required>
<!-- <dict-selector ref="dictType" form-type="radio" v-model="customerFollow.form.followType" :type="DICT_TYPE.CUSTOMER_FOLLOW_TYPE"></dict-selector> --> <!-- <dict-selector ref="dictType" form-type="radio" v-model="customerFollow.form.followType" :type="DICT_TYPE.CUSTOMER_FOLLOW_TYPE"></dict-selector> -->
<el-radio v-model="customerFollow.form.followType" label="3">{{$t('投诉回访')}}</el-radio> <el-radio v-model="customerFollow.form.followType" label="3">{{$t('投诉回访')}}</el-radio>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="跟进时间" required> <el-form-item :label="$t('跟进时间')" required>
<el-date-picker v-model="customerFollow.form.followTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择跟进时间"></el-date-picker> <el-date-picker v-model="customerFollow.form.followTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('选择跟进时间')"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系人" required> <el-form-item :label="$t('联系人')" required>
<el-select v-model="customerFollow.form.contactName" placeholder="请选择"> <el-select v-model="customerFollow.form.contactName" :placeholder="$t('请选择')">
<el-option <el-option
v-for="(item, index) in customerContactsList" v-for="(item, index) in customerContactsList"
:key="index" :key="index"
...@@ -87,8 +87,8 @@ ...@@ -87,8 +87,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="客户经理" required> <el-form-item :label="$t('客户经理')" required>
<el-select v-model="customerFollow.form.followUserId" placeholder="请选择"> <el-select v-model="customerFollow.form.followUserId" :placeholder="$t('请选择')">
<el-option <el-option
v-for="item in serviceUserList" v-for="item in serviceUserList"
:key="item.id" :key="item.id"
...@@ -99,25 +99,25 @@ ...@@ -99,25 +99,25 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="跟进方式" required> <el-form-item :label="$t('跟进方式')" required>
<dict-selector ref="dictMethod" v-model="customerFollow.form.followMethod" :type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD"></dict-selector> <dict-selector ref="dictMethod" v-model="customerFollow.form.followMethod" :type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD"></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col> <el-col>
<el-form-item label="客户反馈" required> <el-form-item :label="$t('客户反馈')" required>
<el-input type="textarea" v-model="customerFollow.form.feedback"></el-input> <el-input type="textarea" v-model="customerFollow.form.feedback"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col> <el-col>
<el-form-item label="处理结果" required> <el-form-item :label="$t('处理结果')" required>
<el-input type="textarea" v-model="customerFollow.form.result"></el-input> <el-input type="textarea" v-model="customerFollow.form.result"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="customerFollowClose">取 消</el-button> <el-button @click="customerFollowClose">{{$t('取 消')}}</el-button>
<el-button type="primary" @click="customerFollowSubmit">确 定</el-button> <el-button type="primary" @click="customerFollowSubmit">{{$t('确 定')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -187,27 +187,27 @@ export default { ...@@ -187,27 +187,27 @@ export default {
return return
} }
if(!this.customerFollow.form.followTime){ if(!this.customerFollow.form.followTime){
this.$modal.msgError("请选择跟进时间"); this.$modal.msgError(this.$t('请选择跟进时间'));
return return
} }
if(!this.customerFollow.form.contactName){ if(!this.customerFollow.form.contactName){
this.$modal.msgError("请选择联系人"); this.$modal.msgError(this.$t('请选择联系人'));
return return
} }
if(!this.customerFollow.form.followUserId){ if(!this.customerFollow.form.followUserId){
this.$modal.msgError("请选择跟进业务"); this.$modal.msgError(this.$t('请选择跟进业务'));
return return
} }
if(!this.customerFollow.form.followMethod){ if(!this.customerFollow.form.followMethod){
this.$modal.msgError("请选择跟进方式"); this.$modal.msgError(this.$t('请选择跟进方式'));
return return
} }
if(!this.customerFollow.form.feedback){ if(!this.customerFollow.form.feedback){
this.$modal.msgError("请输入客户反馈"); this.$modal.msgError(this.$t('请输入客户反馈'));
return return
} }
if(!this.customerFollow.form.result){ if(!this.customerFollow.form.result){
this.$modal.msgError("请输入处理结果"); this.$modal.msgError(this.$t('请输入处理结果'));
return return
} }
createCustomerFollow(this.customerFollow.form).then(r => { createCustomerFollow(this.customerFollow.form).then(r => {
......
...@@ -45,15 +45,15 @@ ...@@ -45,15 +45,15 @@
<!-- 上传提示 --> <!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip"> <div class="el-upload__tip" slot="tip" v-if="showTip">
请上传 {{$t('请上传')}}
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template> <template v-if="fileSize"> {{$t('大小不超过')}} <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template> <template v-if="fileType"> {{$t('格式为')}} <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
的文件 {{$t('的文件')}}
</div> </div>
<el-dialog <el-dialog
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
title="预览" :title="$t('预览')"
width="800" width="800"
append-to-body append-to-body
> >
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-form-item label="投诉类型" prop="type"> <el-form-item label="投诉类型" prop="type">
<el-select v-model="form.type" placeholder="请选择投诉类型"> <el-select v-model="form.type" placeholder="请选择投诉类型">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="$i18n.locale === 'zh_CN' ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="订单号" prop="orderId"> <el-form-item label="订单号" prop="orderId">
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-form-item :label="$t('国家')" prop="country"> <el-form-item :label="$t('国家')" prop="country">
<el-select filterable clearable v-model="form.country" :placeholder="$t('请选择国家')"> <el-select filterable 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-col> </el-col>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<el-form-item :label="$t('客户等级')" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" :placeholder="$t('请选择客户等级')" disabled> <el-select v-model="form.level" :placeholder="$t('请选择客户等级')" disabled>
<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>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,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>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,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>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
<el-form-item :label="$t('客户状态')" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select v-model="form.status" :placeholder="$t('请选择客户状态')" disabled> <el-select v-model="form.status" :placeholder="$t('请选择客户状态')" disabled>
<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>
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
<el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" label=""> <el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" label="">
<el-select v-model="row.areaCode" :placeholder="$t('请选择区号')" filterable size="mini"> <el-select v-model="row.areaCode" :placeholder="$t('请选择区号')" filterable size="mini">
<el-option v-for="(item, index) in countryList" <el-option v-for="(item, index) in countryList"
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" /> :key="index" :label="item.nameShort + (isChinese ? item.nameZh : item.nameEn) + '(' + item.tel + ')'" :value="item.tel" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
<el-form-item label=""> <el-form-item label="">
<el-select v-model="row.social" :placeholder="$t('请选择社交软件')" size="mini"> <el-select v-model="row.social" :placeholder="$t('请选择社交软件')" size="mini">
<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>
</el-form-item> </el-form-item>
</template> </template>
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
<el-form-item label=""> <el-form-item label="">
<el-select v-model="row.isDefault" :placeholder="$t('设为默认')" @change="handleDefaultChange($index)" size="mini"> <el-select v-model="row.isDefault" :placeholder="$t('设为默认')" @change="handleDefaultChange($index)" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)" <el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value" :label="dict.label" :value="Number(dict.value)" /> :key="dict.value" :label=" isChinese ? dict.label : dict.labelEn" :value="Number(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
<el-row :gutter="10" style="margin-top: 15px"> <el-row :gutter="10" style="margin-top: 15px">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="发票抬头" prop="invoiceTitle"> <el-form-item :label="$t('发票抬头')" prop="invoiceTitle">
<el-input v-model="form.invoiceTitle" :placeholder="$t('请输入发票抬头')" /> <el-input v-model="form.invoiceTitle" :placeholder="$t('请输入发票抬头')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -811,6 +811,9 @@ export default { ...@@ -811,6 +811,9 @@ export default {
} }
}, },
computed: { computed: {
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
userId(){ userId(){
return this.$store.state.user.id return this.$store.state.user.id
}, },
......
...@@ -26,12 +26,14 @@ ...@@ -26,12 +26,14 @@
<dict-tag :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" :value="customer.resourceType"></dict-tag> <dict-tag :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" :value="customer.resourceType"></dict-tag>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item> <el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item>
<el-descriptions-item :label="$t('信用等级')">{{ customer.creditLevelNameZh }}</el-descriptions-item> <el-descriptions-item :label="$t('信用等级')">{{isChinese ? customer.creditLevelNameZh :customer.creditLevelNameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{ country }}</el-descriptions-item> <el-descriptions-item :label="$t('国家')">{{ isChinese ? country.nameZn : country.nameEn }}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('业务员')">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item :label="$t('业务员')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item> <el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户类别')">{{ getDictDatas2(DICT_TYPE.CUSTOMER_TYPE, (customer.type||'').split(',')).map(e => e.label).join(', ') }}</el-descriptions-item> <el-descriptions-item :label="$t('客户类别')">
{{ getDictDatas2(DICT_TYPE.CUSTOMER_TYPE, (customer.type||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('联系方式')">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item :label="$t('联系方式')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('推介人')">{{ promoter }}</el-descriptions-item> <el-descriptions-item :label="$t('推介人')">{{ promoter }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{customerService }}</el-descriptions-item> <el-descriptions-item :label="$t('客户经理')">{{customerService }}</el-descriptions-item>
...@@ -468,7 +470,7 @@ export default { ...@@ -468,7 +470,7 @@ export default {
}) })
getCountry(this.customer.country ? this.customer.country : 0 ).then(r => { getCountry(this.customer.country ? this.customer.country : 0 ).then(r => {
this.country = r.data.nameZh this.country = r.data
}) })
}) })
getProductTypeList().then(r => { getProductTypeList().then(r => {
...@@ -598,6 +600,9 @@ export default { ...@@ -598,6 +600,9 @@ export default {
} }
}, },
computed: { computed: {
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
productType(){ productType(){
const productType = this.productTypeList.find(p => p.id === parseInt(this.customer.productType)) const productType = this.productTypeList.find(p => p.id === parseInt(this.customer.productType))
return productType ? productType.titleZh : '' return productType ? productType.titleZh : ''
...@@ -607,11 +612,9 @@ export default { ...@@ -607,11 +612,9 @@ export default {
return pickupPoint ? pickupPoint.titleZh : '' return pickupPoint ? pickupPoint.titleZh : ''
}, },
promoter() { promoter() {
console.log(this.customerSelect,'this.customerSelect.find');
return this.customerSelect.find(e => e.id === this.customer.promoter)?.name || '' return this.customerSelect.find(e => e.id === this.customer.promoter)?.name || ''
}, },
customerService() { customerService() {
console.log(this.serviceUserList,'this.serviceUserList');
return this.serviceUserList.find(e => e.id === this.customer.customerService)?.nickname || '' return this.serviceUserList.find(e => e.id === this.customer.customerService)?.nickname || ''
}, },
id() { id() {
...@@ -651,7 +654,6 @@ export default { ...@@ -651,7 +654,6 @@ export default {
}, },
getCustomerGrade(){ getCustomerGrade(){
levelLogPage({...this.getCustomerGradeFrom,customerId:this.id,total:undefined}).then(r => { levelLogPage({...this.getCustomerGradeFrom,customerId:this.id,total:undefined}).then(r => {
console.log(r,'客户等级');
if(r.code === 0){ if(r.code === 0){
this.getCustomerGradeList = r.data.list; this.getCustomerGradeList = r.data.list;
this.getCustomerGradeFrom.total = r.data.total; this.getCustomerGradeFrom.total = r.data.total;
...@@ -662,7 +664,6 @@ export default { ...@@ -662,7 +664,6 @@ export default {
creditLogPage(){ creditLogPage(){
customerCreditLogPage({...this.customerCreditLogFrom,customerId:this.id}).then(r => { customerCreditLogPage({...this.customerCreditLogFrom,customerId:this.id}).then(r => {
if(r.code === 0){ if(r.code === 0){
console.log(r,'r');
this.customerCreditLogList = r.data.list; this.customerCreditLogList = r.data.list;
this.customerCreditLogFrom.total = r.data.total; this.customerCreditLogFrom.total = r.data.total;
} }
...@@ -688,7 +689,6 @@ export default { ...@@ -688,7 +689,6 @@ export default {
// 数据 // 数据
getOrderStatistics(){ getOrderStatistics(){
orderStatistics({customerId:this.id}).then(r => { orderStatistics({customerId:this.id}).then(r => {
console.log(r,'数据')
if(r.code === 0){ if(r.code === 0){
this.orderStatisticsObj = r.data this.orderStatisticsObj = r.data
} }
...@@ -713,7 +713,7 @@ export default { ...@@ -713,7 +713,7 @@ export default {
// 获取账单数据 // 获取账单数据
infoListReceiptFn(){ infoListReceiptFn(){
infoListReceiptPage({...this.infoListReceiptFrom,customerId:this.id}).then(r => { infoListReceiptPage({...this.infoListReceiptFrom,customerId:this.id}).then(r => {
console.log(r)
if(r.code === 0){ if(r.code === 0){
this.infoListReceiptList = r.data.list; this.infoListReceiptList = r.data.list;
this.infoListReceiptTotal = r.data.total; this.infoListReceiptTotal = r.data.total;
......
...@@ -277,7 +277,8 @@ export default { ...@@ -277,7 +277,8 @@ export default {
let index1 = this.exportCityList.findIndex(item =>item.id == row.departureId); let index1 = this.exportCityList.findIndex(item =>item.id == row.departureId);
let index2 = this.importCityList.findIndex(item => item.id == row.objectiveId); let index2 = this.importCityList.findIndex(item => item.id == row.objectiveId);
let flag = `${index1 === -1 ? this.$t('全部') : this.exportCityList[index1].titleZh}/${index2 === -1 ? this.$t('全部') : this.importCityList[index2].titleZh}`;
let flag = `${index1 === -1 ? this.$t('全部') : this.$i18n.locale === 'zh_CN' ? this.exportCityList[index1].titleZh : this.exportCityList[index1].titleEn}/${index2 === -1 ? this.$t('全部') :this.$i18n.locale === 'zh_CN'? this.importCityList[index2].titleZh : this.importCityList[index2].titleEn }`;
return flag return flag
}, },
} }
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<el-col :span="5"> <el-col :span="5">
<el-form-item :label="$t('始发地')" prop="departureId"> <el-form-item :label="$t('始发地')" prop="departureId">
<div> <div>
<custom-selectors-dictionary :all-show="true" label-key="titleZh" value-key="id" v-model="form.departureId" <custom-selectors-dictionary :all-show="true" :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id" v-model="form.departureId"
:options="exportCityList"></custom-selectors-dictionary> :options="exportCityList"></custom-selectors-dictionary>
</div> </div>
</el-form-item> </el-form-item>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<el-col :span="5"> <el-col :span="5">
<el-form-item :label="$t('目的地')" prop="objectiveId"> <el-form-item :label="$t('目的地')" prop="objectiveId">
<div> <div>
<custom-selectors-dictionary :all-show="true" label-key="titleZh" value-key="id" v-model="form.objectiveId" <custom-selectors-dictionary :all-show="true" :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id" v-model="form.objectiveId"
:options="importCityList"></custom-selectors-dictionary> :options="importCityList"></custom-selectors-dictionary>
</div> </div>
</el-form-item> </el-form-item>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<el-form-item label-width="150px" :label="$t('佣金类型(明佣、暗佣)')"> <el-form-item label-width="150px" :label="$t('佣金类型(明佣、暗佣)')">
<el-radio-group v-model="form.type"> <el-radio-group v-model="form.type">
<el-radio v-for="(item,index) in getDictDatas(DICT_TYPE.COMMISSION_TYPE)" v-show="item.value != 0" :label="parseInt(item.value)" <el-radio v-for="(item,index) in getDictDatas(DICT_TYPE.COMMISSION_TYPE)" v-show="item.value != 0" :label="parseInt(item.value)"
:key="index">{{ item.label }} :key="index">{{ isChinese ? item.label :item.labelEn }}
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<el-form-item :label="$t('返佣类型')" v-if="form.type == 2"> <el-form-item :label="$t('返佣类型')" v-if="form.type == 2">
<el-radio-group v-model="form.darkReturnType"> <el-radio-group v-model="form.darkReturnType">
<el-radio v-for="(item,index) in getDictDatas(DICT_TYPE.COMMISSION_DARK_TYPE)" :label="parseInt(item.value)" <el-radio v-for="(item,index) in getDictDatas(DICT_TYPE.COMMISSION_DARK_TYPE)" :label="parseInt(item.value)"
:key="index">{{ item.label }} :key="index">{{ isChinese ? item.label :item.labelEn }}
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -101,14 +101,14 @@ ...@@ -101,14 +101,14 @@
</div> </div>
<div> <div>
<el-select v-model="mingServantFrom[0].refundCurrency"> <el-select v-model="mingServantFrom[0].refundCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" />
</el-select> </el-select>
<!-- <custom-selectors-dictionary v-model="mingServantFrom[0].refundCurrency" <!-- <custom-selectors-dictionary v-model="mingServantFrom[0].refundCurrency"
:options="currencyList"></custom-selectors-dictionary> --> :options="currencyList"></custom-selectors-dictionary> -->
</div> </div>
<div> <div>
<custom-selectors-dictionary v-model="mingServantFrom[0].refundUnit" label-key="titleZh" value-key="id" <custom-selectors-dictionary v-model="mingServantFrom[0].refundUnit" :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id"
:options="weightList"></custom-selectors-dictionary> :options="weightList"></custom-selectors-dictionary>
</div> </div>
</div> </div>
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<el-form-item :label="$t('商品类型')" v-for="(item,index) in darkServantAndProductForm" :key="index"> <el-form-item :label="$t('商品类型')" v-for="(item,index) in darkServantAndProductForm" :key="index">
<div class="shanping-type"> <div class="shanping-type">
<div class="tool"> <div class="tool">
<custom-selectors-dictionary :all-show="true" v-model="item.productType" :options="productAttrList" label-key="titleZh" <custom-selectors-dictionary :all-show="true" v-model="item.productType" :options="productAttrList" :label-key="isChinese ? 'titleZh' : 'titleEn'"
value-key="id"></custom-selectors-dictionary> value-key="id"></custom-selectors-dictionary>
</div> </div>
<div class="box"> <div class="box">
...@@ -138,13 +138,13 @@ ...@@ -138,13 +138,13 @@
</div> </div>
<div class="custom"> <div class="custom">
<el-select v-model="item.darkCurrency"> <el-select v-model="item.darkCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh:item.titleEn" :value="item.id" />
</el-select> </el-select>
<!-- <custom-selectors-dictionary v-model="item.darkCurrency" <!-- <custom-selectors-dictionary v-model="item.darkCurrency"
:options="currencyList"></custom-selectors-dictionary> --> :options="currencyList"></custom-selectors-dictionary> -->
</div> </div>
<div class="custom"> <div class="custom">
<custom-selectors-dictionary v-model="item.darkUnit" label-key="titleZh" value-key="id" <custom-selectors-dictionary v-model="item.darkUnit" :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id"
:options="weightList"></custom-selectors-dictionary> :options="weightList"></custom-selectors-dictionary>
</div> </div>
</div> </div>
...@@ -166,14 +166,14 @@ ...@@ -166,14 +166,14 @@
</div> </div>
<div class="item"> <div class="item">
<el-select v-model="item.amountCurrency"> <el-select v-model="item.amountCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" />
</el-select> </el-select>
<!-- <custom-selectors-dictionary v-model="item.amountCurrency" <!-- <custom-selectors-dictionary v-model="item.amountCurrency"
:options="currencyList"></custom-selectors-dictionary> --> :options="currencyList"></custom-selectors-dictionary> -->
</div> </div>
<div class="item"> <div class="item">
<custom-selectors-dictionary v-model="item.amountUnit" <custom-selectors-dictionary v-model="item.amountUnit"
label-key="titleZh" value-key="id" :options="weightList"></custom-selectors-dictionary> :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id" :options="weightList"></custom-selectors-dictionary>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
...@@ -183,14 +183,14 @@ ...@@ -183,14 +183,14 @@
</div> </div>
<div class="item"> <div class="item">
<el-select v-model="item.refundCurrency"> <el-select v-model="item.refundCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" />
</el-select> </el-select>
<!-- <custom-selectors-dictionary v-model="item.refundCurrency" <!-- <custom-selectors-dictionary v-model="item.refundCurrency"
:options="currencyList"></custom-selectors-dictionary> --> :options="currencyList"></custom-selectors-dictionary> -->
</div> </div>
<div class="item"> <div class="item">
<custom-selectors-dictionary v-model="item.refundUnit" <custom-selectors-dictionary v-model="item.refundUnit"
label-key="titleZh" value-key="id" :options="weightList"></custom-selectors-dictionary> :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id" :options="weightList"></custom-selectors-dictionary>
</div> </div>
</div> </div>
<el-button type="primary" @click="addToFn(2)" v-show="darkServantAndRebateForm.length -1 === index">{{$t('添加')}}</el-button> <el-button type="primary" @click="addToFn(2)" v-show="darkServantAndRebateForm.length -1 === index">{{$t('添加')}}</el-button>
...@@ -205,13 +205,13 @@ ...@@ -205,13 +205,13 @@
</div> </div>
<div class="item"> <div class="item">
<el-select v-model="mingServantAnddarkServant[0].refundCurrency"> <el-select v-model="mingServantAnddarkServant[0].refundCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" />
</el-select> </el-select>
<!-- <custom-selectors-dictionary v-model="mingServantAnddarkServant[0].refundCurrency" <!-- <custom-selectors-dictionary v-model="mingServantAnddarkServant[0].refundCurrency"
:options="currencyList"></custom-selectors-dictionary> --> :options="currencyList"></custom-selectors-dictionary> -->
</div> </div>
<div class="item"> <div class="item">
<custom-selectors-dictionary label-key="titleZh" value-key="id" v-model="mingServantAnddarkServant[0].refundUnit" <custom-selectors-dictionary :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id" v-model="mingServantAnddarkServant[0].refundUnit"
:options="weightList"></custom-selectors-dictionary> :options="weightList"></custom-selectors-dictionary>
</div> </div>
</div> </div>
...@@ -227,13 +227,13 @@ ...@@ -227,13 +227,13 @@
</div> </div>
<div class="item"> <div class="item">
<el-select v-model="mingServantAnddarkServant[0].darkAdjustCurrency"> <el-select v-model="mingServantAnddarkServant[0].darkAdjustCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" />
</el-select> </el-select>
<!-- <custom-selectors-dictionary v-model="mingServantAnddarkServant[0].darkAdjustCurrency" <!-- <custom-selectors-dictionary v-model="mingServantAnddarkServant[0].darkAdjustCurrency"
:options="currencyList"></custom-selectors-dictionary> --> :options="currencyList"></custom-selectors-dictionary> -->
</div> </div>
<div class="item"> <div class="item">
<custom-selectors-dictionary v-model="mingServantAnddarkServant[0].darkAdjustUnit" label-key="titleZh" value-key="id" <custom-selectors-dictionary v-model="mingServantAnddarkServant[0].darkAdjustUnit" :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id"
:options="weightList"></custom-selectors-dictionary> :options="weightList"></custom-selectors-dictionary>
</div> </div>
</div> </div>
...@@ -373,6 +373,9 @@ export default { ...@@ -373,6 +373,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)
}, },
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('投诉类型')" prop="type"> <el-form-item :label="$t('投诉类型')" prop="type">
<el-select v-model="queryParams.type" :placeholder="$t('请选择投诉类型')" clearable size="small"> <el-select v-model="queryParams.type" :placeholder="$t('请选择投诉类型')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="$i18n.locale === 'zh_CN' ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('订单号')" prop="orderId"> <el-form-item :label="$t('订单号')" prop="orderId">
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,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_COMPLAINT_TYPE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="$i18n.locale === 'zh_CN' ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('订单号')" prop="orderId"> <el-form-item :label="$t('订单号')" prop="orderId">
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
<el-form-item v-show="form.status == '3'" :label="$t('赔付金额')"> <el-form-item v-show="form.status == '3'" :label="$t('赔付金额')">
<el-input v-model="form.indemnity" :placeholder="$t('请输入赔付金额')"> <el-input v-model="form.indemnity" :placeholder="$t('请输入赔付金额')">
<el-select slot="append" defaultable v-model="form.currencyUnit" :placeholder="$t('请选择货币单位')" style="width: 110px"> <el-select slot="append" defaultable v-model="form.currencyUnit" :placeholder="$t('请选择货币单位')" style="width: 110px">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn " :value="item.id" />
</el-select> </el-select>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
<el-form-item :label="$t('订单号')+':'" prop="orderId" > <el-form-item :label="$t('订单号')+':'" prop="orderId" >
<div>{{form.orderId}}</div> <div>{{form.orderId}}</div>
</el-form-item> </el-form-item>
<el-form-item label="提单号:" prop="ladingbillId" > <el-form-item :label="$t('提单号') + ':'" prop="ladingbillId" >
<div>{{form.ladingbillId|| $t('无')}}</div> <div>{{form.ladingbillId|| $t('无')}}</div>
</el-form-item> </el-form-item>
<div> <div>
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
<el-form-item v-show="form.status == '3'" :label="$t('赔付金额')"> <el-form-item v-show="form.status == '3'" :label="$t('赔付金额')">
<el-input v-model="form.indemnity" :placeholder="$t('请输入赔付金额')"> <el-input v-model="form.indemnity" :placeholder="$t('请输入赔付金额')">
<el-select slot="append" defaultable v-model="form.currencyUnit" :placeholder="$t('请选择货币单位')" style="width: 110px"> <el-select slot="append" defaultable v-model="form.currencyUnit" :placeholder="$t('请选择货币单位')" style="width: 110px">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh :item.titleEn" :value="item.id" />
</el-select> </el-select>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -314,6 +314,11 @@ export default { ...@@ -314,6 +314,11 @@ export default {
DictSelector, DictSelector,
customerSelect customerSelect
}, },
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
data() { data() {
return { return {
DICT_TYPE, DICT_TYPE,
...@@ -390,7 +395,7 @@ export default { ...@@ -390,7 +395,7 @@ export default {
}, },
getCurrencyLabel(id){ getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id) var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh if(label.length>0) return this.isChinese ? label[0].titleZh : label[0].titleEn
return '' return ''
}, },
getOrderList(key){ getOrderList(key){
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<el-form-item :label="$t('咨询类型')" prop="type"> <el-form-item :label="$t('咨询类型')" prop="type">
<el-select v-model="queryParams.type" :placeholder="$t('请选择咨询类型')" clearable size="small"> <el-select v-model="queryParams.type" :placeholder="$t('请选择咨询类型')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_MESSAGE_LEAVE_TYPE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_MESSAGE_LEAVE_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="status"> <el-form-item :label="$t('状态')" prop="status">
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<el-form-item :label="$t('咨询类型')" prop="type"> <el-form-item :label="$t('咨询类型')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择咨询类型')" :disabled="form.id ? true : false"> <el-select v-model="form.type" :placeholder="$t('请选择咨询类型')" :disabled="form.id ? true : false">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_MESSAGE_LEAVE_TYPE)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_MESSAGE_LEAVE_TYPE)"
: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>
...@@ -128,13 +128,13 @@ ...@@ -128,13 +128,13 @@
<el-col :span="4">{{$t('联系方式')}}:</el-col><el-col :span="12">{{messageVal.phone}}</el-col> <el-col :span="4">{{$t('联系方式')}}:</el-col><el-col :span="12">{{messageVal.phone}}</el-col>
</el-row> </el-row>
<el-row class="el-row-leaving" :gutter="10"> <el-row class="el-row-leaving" :gutter="10">
<el-col :span="4">{{$t('当前状态')}}:</el-col><el-col :span="12">{{messageVal.status === 1 ? '待回复' : '已回复'}}</el-col> <el-col :span="4">{{$t('当前状态')}}:</el-col><el-col :span="12">{{messageVal.status === 1 ? $t('待回复') : $t('已回复')}}</el-col>
</el-row> </el-row>
<el-row class="el-row-leaving" :gutter="10"> <el-row class="el-row-leaving" :gutter="10">
<el-col :span="4">{{$t('订单编号')}}:</el-col><el-col :span="12">{{messageVal.orderCode}}</el-col> <el-col :span="4">{{$t('订单编号')}}:</el-col><el-col :span="12">{{messageVal.orderCode}}</el-col>
</el-row> </el-row>
<el-row class="el-row-leaving" :gutter="10"> <el-row class="el-row-leaving" :gutter="10">
<el-col :span="4">{{$t('留言类型')}}:</el-col><el-col :span="12">{{messageVal.type === 1 ? '咨询':'建议'}}</el-col> <el-col :span="4">{{$t('留言类型')}}:</el-col><el-col :span="12">{{messageVal.type === 1 ? $t('咨询'):$t('建议')}}</el-col>
</el-row> </el-row>
<div style="background-color:#cccccc;padding:10px 20px;"> <div style="background-color:#cccccc;padding:10px 20px;">
<el-row class="el-row-leaving" :gutter="10"> <el-row class="el-row-leaving" :gutter="10">
...@@ -169,6 +169,11 @@ export default { ...@@ -169,6 +169,11 @@ export default {
name: "MessageLeave", name: "MessageLeave",
components: { components: {
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
}, },
data() { data() {
return { return {
......
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