Commit 19e13b70 authored by zhengyi's avatar zhengyi

fix:【报价单】报价单复制,弹出了选择联系人

parent e343f799
...@@ -1199,14 +1199,21 @@ export default { ...@@ -1199,14 +1199,21 @@ export default {
getCustomerContactsSelect({ getCustomerContactsSelect({
ids: [res.data.consigneeId, res.data.consignorId].join(",") ids: [res.data.consigneeId, res.data.consignorId].join(",")
}).then(({ data }) => { }).then(({ data }) => {
this.contactChooseType = "consignee" this.onContactAssignValueBackToDisplay(data.list.find((item) => item.customerContactsId == res.data.consigneeId), "consignee")
this.onContactChoose(data.list.find((item) => item.customerContactsId == res.data.consigneeId)) this.onContactAssignValueBackToDisplay(data.list.find((item) => item.customerContactsId == res.data.consignorId), "consignor")
this.contactChooseType = "consignor"
this.onContactChoose(data.list.find((item) => item.customerContactsId == res.data.consignorId))
}) })
}) })
} }
}, },
onContactAssignValueBackToDisplay(contact, contactChooseType) {
if (!contact) return
this.$set(this.form, contactChooseType + "Company", contact.company)
this.$set(this.form, contactChooseType + "Id", contact.customerContactsId)
this.$set(this.form, contactChooseType + "CountryCode", contact.areaCode)
this.$set(this.form, contactChooseType + "Email", contact.email)
this.$set(this.form, contactChooseType + "Name", contact.contactsName)
this.$set(this.form, contactChooseType + "Phone", contact.phoneNew)
},
onContactChoose(contact) { onContactChoose(contact) {
if (!contact) return if (!contact) 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