Commit f8152820 authored by Marcus's avatar Marcus

新建客户成功后,客户列表和客户详情页,“国家”、“客户编号”、“客户类别”等字段未取到值,“社交软件”展示的是枚举值(应该为枚举值对应文字)

http://zentao.jdshangmen.com/bug-view-208.html
parent 21efa4fc
......@@ -20,7 +20,7 @@
<el-descriptions-item :label="$t('结算方式')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户生日')">{{ parseTime(customer.birthday, '{y}-{m}-{d}') }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{ getDictDataLabel(DICT_TYPE.COUNTRY, customer.country) }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{ country }}</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_TYPE, customer.type) }}</el-descriptions-item>
......@@ -73,13 +73,15 @@
</template>
</el-table-column>
<el-table-column
prop="username"
prop="userid"
:label="$t('关联账号')"
:formatter="userIdFormatter"
>
</el-table-column>
<el-table-column
prop="social"
:label="$t('社交软件')"
:formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.SOCIAL, cellValue)"
>
</el-table-column>
<el-table-column
......@@ -404,7 +406,7 @@ import {
orderStatistics,
creditLogCreate,
creditScoreStatistic,
infoListReceiptPage
infoListReceiptPage, userMemberUserList
} from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel } from '@/utils/dict'
import { getProductTypeList } from '@/api/ecw/productType'
......@@ -417,6 +419,7 @@ import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import {getOrderPage} from "@/api/ecw/order";
import Template from "@/views/cms/template";
import {getCreditRulePage} from "@/api/customer/creditRule";
import {getCountry} from "@/api/ecw/country"
export default {
name: 'query',
......@@ -442,6 +445,10 @@ export default {
getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
this.customerContacts = r.data
})
getCountry(this.customer.country).then(r => {
this.country = r.data.nameZh
})
})
getProductTypeList().then(r => {
this.productTypeList = r.data
......@@ -461,6 +468,10 @@ export default {
this.getOrderStatistics()
this.creditScoreStatisticFn()
this.infoListReceiptFn()
userMemberUserList().then(r => {
this.memberList = r.data
})
},
data() {
return {
......@@ -482,6 +493,7 @@ export default {
customerSelect: [],
serviceUserList: [],
customerContacts: [],
memberList: [],
customer: {
id: undefined,
number: undefined,
......@@ -559,7 +571,8 @@ export default {
pageNo:1,
pageSize:10,
},
infoListReceiptTotal:0
infoListReceiptTotal:0,
country: ''
}
},
computed: {
......@@ -591,6 +604,14 @@ export default {
}
},
methods:{
userIdFormatter(row, column, cellValue){
const member = this.memberList.find(e => e.id === cellValue)
if (member) {
return member.nickname + '(' + member.mobile + ')'
} else {
return ''
}
},
changeDate(val){
if(val){
this.queryParams.houseStartDate = val[0];
......
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