Commit 19e13b70 authored by zhengyi's avatar zhengyi

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

parent e343f799
......@@ -1199,14 +1199,21 @@ export default {
getCustomerContactsSelect({
ids: [res.data.consigneeId, res.data.consignorId].join(",")
}).then(({ data }) => {
this.contactChooseType = "consignee"
this.onContactChoose(data.list.find((item) => item.customerContactsId == res.data.consigneeId))
this.contactChooseType = "consignor"
this.onContactChoose(data.list.find((item) => item.customerContactsId == res.data.consignorId))
this.onContactAssignValueBackToDisplay(data.list.find((item) => item.customerContactsId == res.data.consigneeId), "consignee")
this.onContactAssignValueBackToDisplay(data.list.find((item) => item.customerContactsId == res.data.consignorId), "consignor")
})
})
}
},
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) {
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