Commit daf18e58 authored by 黄卓's avatar 黄卓

客户查看详情

parent bea7a98c
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<h2>查看</h2> <h2>查看</h2>
<div> <div>
<el-button type="primary" size="small">添加优惠</el-button> <el-button type="primary" size="small">添加优惠</el-button>
<el-button type="primary" size="small">编辑</el-button> <el-button type="primary" size="small" @click="$router.push('/customer/edit/' + customerId)">编辑</el-button>
<el-button type="primary" size="small">报价</el-button> <el-button type="primary" size="small">报价</el-button>
<el-button type="primary" size="small">跟进</el-button> <el-button type="primary" size="small">跟进</el-button>
<el-button type="primary" size="small">客诉</el-button> <el-button type="primary" size="small">客诉</el-button>
...@@ -17,23 +17,25 @@ ...@@ -17,23 +17,25 @@
<el-descriptions :column="4" border> <el-descriptions :column="4" border>
<el-descriptions-item label="客户编号">{{ customer.number }}</el-descriptions-item> <el-descriptions-item label="客户编号">{{ customer.number }}</el-descriptions-item>
<el-descriptions-item label="客户名称">{{ customer.name }}</el-descriptions-item> <el-descriptions-item label="客户名称">{{ customer.name }}</el-descriptions-item>
<el-descriptions-item label="结算方式">{{ customer.balance }}</el-descriptions-item> <el-descriptions-item label="结算方式">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item>
<el-descriptions-item label="客户生日">{{ customer.birthday }}</el-descriptions-item> <el-descriptions-item label="客户生日">{{ customer.birthday }}</el-descriptions-item>
<el-descriptions-item label="客户等级">{{ customer.level }}</el-descriptions-item> <el-descriptions-item label="客户等级">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item>
<el-descriptions-item label="国家">{{ customer.country }}</el-descriptions-item> <el-descriptions-item label="国家">{{ getDictDataLabel(DICT_TYPE.COUNTRY, customer.country) }}</el-descriptions-item>
<!-- <el-descriptions-item label="业务员">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item label="业务员">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item label="客户来源">{{ customer.source }}</el-descriptions-item> <el-descriptions-item label="客户来源">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item>
<el-descriptions-item label="客户类别">{{ customer.type }}</el-descriptions-item> <el-descriptions-item label="客户类别">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_TYPE, customer.type) }}</el-descriptions-item>
<!-- <el-descriptions-item label="联系方式">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item label="联系方式">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item label="推介人">{{ customer.promoter }}</el-descriptions-item> <el-descriptions-item label="推介人">{{ customer.promoter }}</el-descriptions-item>
<el-descriptions-item label="跟进客服">{{ customer.customerService }}</el-descriptions-item> <el-descriptions-item label="跟进客服">{{ customer.customerService }}</el-descriptions-item>
<el-descriptions-item label="公司名称">{{ customer.company }}</el-descriptions-item> <el-descriptions-item label="公司名称">{{ customer.company }}</el-descriptions-item>
<el-descriptions-item label="联系地址">{{ customer.address }}</el-descriptions-item> <el-descriptions-item label="联系地址">{{ customer.address }}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{ customer.createTime }}</el-descriptions-item> <el-descriptions-item label="创建时间">{{ customer.createTime }}</el-descriptions-item>
<el-descriptions-item label="状态">{{ customer.status }}</el-descriptions-item> <el-descriptions-item label="状态">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status) }}</el-descriptions-item>
<el-descriptions-item label="主营类别">{{ customer.productType }}</el-descriptions-item> <el-descriptions-item label="主营类别">{{ productType }}</el-descriptions-item>
<el-descriptions-item label="常提货网点">{{ customer.pickupPoint }}</el-descriptions-item> <el-descriptions-item label="常提货网点">{{ pickupPoint }}</el-descriptions-item>
<el-descriptions-item label="图片">{{ customer.picture }}</el-descriptions-item> <el-descriptions-item label="图片">
<el-image :src="customer.picture" style="width: 100px;height: 100px"></el-image>
</el-descriptions-item>
<el-descriptions-item label="备注">{{ customer.remarks }}</el-descriptions-item> <el-descriptions-item label="备注">{{ customer.remarks }}</el-descriptions-item>
<!-- <el-descriptions-item label="信用等级">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item label="信用等级">{{ customer }}</el-descriptions-item>-->
</el-descriptions> </el-descriptions>
...@@ -287,13 +289,33 @@ ...@@ -287,13 +289,33 @@
</template> </template>
<script> <script>
import { getCustomer } from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel } from '@/utils/dict'
import { getProductTypeList } from '@/api/ecw/productType'
import { getNodeList } from '@/api/ecw/node'
export default { export default {
name: 'query', name: 'query',
props: { props: {
customerId: String customerId: String
}, },
created() {
getNodeList().then(r => {
this.nodeList = r.data
})
getCustomer(this.customerId).then(response => {
this.customer = { ...this.customer, ...response.data }
})
getProductTypeList().then(r => {
this.productTypeList = r.data
})
},
data() { data() {
return { return {
DICT_TYPE,
getDictDataLabel,
nodeList: [],
productTypeList: [],
customer: { customer: {
id: undefined, id: undefined,
number: undefined, number: undefined,
...@@ -333,6 +355,19 @@ export default { ...@@ -333,6 +355,19 @@ export default {
createTime: undefined createTime: undefined
} }
} }
},
methods: {
},
computed: {
productType(){
const productType = this.productTypeList.find(p => p.id === parseInt(this.customer.productType))
return productType ? productType.titleZh : ''
},
pickupPoint(){
const pickupPoint = this.nodeList.find(p => p.id === parseInt(this.customer.pickupPoint))
return pickupPoint ? pickupPoint.titleZh : ''
}
} }
} }
</script> </script>
......
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