Commit 6056e844 authored by zhengyi's avatar zhengyi

客户跳转报价创建页面携带客户信息bug修复

parent f1d2f60e
...@@ -1044,15 +1044,14 @@ export default { ...@@ -1044,15 +1044,14 @@ export default {
getCustomerContactsListByCustomer({customerId: this.id}).then(r => { getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
this.customerContacts = r.data this.customerContacts = r.data
if (this.customerContacts.length > 0) { if (this.customerContacts.length > 0) {
this.customerContacts.forEach(contacts => { const contacts = this.customerContacts.findIndex(contacts => contacts.isDefault === 1);
if (contacts.isDefault === 1) { if (contacts.isDefault === 1) {
this.customer.defaultContactName = this.isChinese ? contacts.nameZh : contacts.nameEn; this.customer.defaultContactName = this.isChinese ? contacts.nameZh : contacts.nameEn;
this.customer.defaultContactId = contacts.id; this.customer.defaultContactId = contacts.id;
this.customer.defaultContactPhone = contacts.phoneNew; this.customer.defaultContactPhone = contacts.phoneNew;
this.customer.defaultCountryCode = contacts.areaCode; this.customer.defaultCountryCode = contacts.areaCode;
this.customer.defaultEmail = contacts.email; this.customer.defaultEmail = contacts.email;
} }
});
let list = this.customerContacts.filter(r => r.userid) let list = this.customerContacts.filter(r => r.userid)
if (list.length > 0) { if (list.length > 0) {
memberUserList({ids: list.map(i => i.userid).join(',')}).then(r => { memberUserList({ids: list.map(i => i.userid).join(',')}).then(r => {
......
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