Commit 46f81137 authored by 我在何方's avatar 我在何方

间接客户修复

parent 2244a243
...@@ -450,6 +450,7 @@ export default { ...@@ -450,6 +450,7 @@ export default {
this.customerId = this.$route.query.id this.customerId = this.$route.query.id
this.getCustomer(this.customerId).then(() => { this.getCustomer(this.customerId).then(() => {
getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => { getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => {
if(r.data&&r.data.length>0){
this.form.customerContacts = r.data this.form.customerContacts = r.data
let list = this.form.customerContacts.map(item => item.userid); let list = this.form.customerContacts.map(item => item.userid);
if(list.length >0){ if(list.length >0){
...@@ -457,6 +458,7 @@ export default { ...@@ -457,6 +458,7 @@ export default {
this.selectMemberList = r.data this.selectMemberList = r.data
}) })
} }
}
if(this.form.promoter){ if(this.form.promoter){
getCustomerList({ids:this.form.promoter}).then(r => { getCustomerList({ids:this.form.promoter}).then(r => {
this.recommended = r.data; this.recommended = r.data;
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
<div style="display: flex;justify-content: space-between;align-items: flex-end;"> <div style="display: flex;justify-content: space-between;align-items: flex-end;">
<h2>{{$t('查看')}}</h2> <h2>{{$t('查看')}}</h2>
<div> <div>
<el-button type="primary" size="small" @click="$router.push('/customer/edit/' + id)">{{$t('编辑')}}</el-button> <el-button type="primary" size="small" @click="$router.push('/customer/editIndirect?id=' + id)">{{$t('编辑')}}</el-button>
<!-- <el-button @click="$router.push('/offer/create')" type="primary" size="small">{{$t('报价')}}</el-button> <!-- <el-button @click="$router.push('/offer/create')" type="primary" size="small">{{$t('报价')}}</el-button>
<el-button type="primary" size="small" @click="$refs['customerFollow'].customerFollow.dialogVisible = true">{{$t('跟进')}}</el-button> <el-button type="primary" size="small" @click="$refs['customerFollow'].customerFollow.dialogVisible = true">{{$t('跟进')}}</el-button>
<el-button type="primary" size="small" @click="$refs['customerComplaint'].handleAdd()">{{$t('客诉')}}</el-button> --> <el-button type="primary" size="small" @click="$refs['customerComplaint'].handleAdd()">{{$t('客诉')}}</el-button> -->
<el-button type="danger" size="small">{{$t('删除')}}</el-button> <el-button type="danger" @click="delCustomer" size="small">{{$t('删除')}}</el-button>
</div> </div>
</div> </div>
<el-card style="margin-top: 15px;"> <el-card style="margin-top: 15px;">
...@@ -441,15 +441,18 @@ export default { ...@@ -441,15 +441,18 @@ export default {
this.customer = { ...this.customer, ...response.data } this.customer = { ...this.customer, ...response.data }
console.log(this.id) console.log(this.id)
getCustomerContactsListByCustomer({customerId: this.id}).then(r => { getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
this.customerContacts = r.data if(r.data&&r.data.length>0){
let list = this.customerContacts.map(r => r.userid) this.customerContacts = r.data
memberUserList({ids:list.join(',')}).then(r => { let list = this.customerContacts.map(r => r.userid)
this.memberList = r.data memberUserList({ids:list.join(',')}).then(r => {
}) this.memberList = r.data
})
}
}) })
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?r.data.nameZh:''
}) })
}) })
getProductTypeList().then(r => { getProductTypeList().then(r => {
...@@ -614,6 +617,9 @@ export default { ...@@ -614,6 +617,9 @@ export default {
} else { } else {
return '' return ''
} }
},
delCustomer(){
}, },
changeDate(val){ changeDate(val){
if(val){ if(val){
......
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