调整 合同、运力、基础配置、客商
This commit is contained in:
@@ -953,7 +953,10 @@ export default {
|
||||
this.receiverInvoiceOptions = Array.isArray(invoiceInfos) ? invoiceInfos : [];
|
||||
this.contactOptions = data.contacts || [];
|
||||
const invoiceInfoEmails = [
|
||||
...this.receiverInvoiceOptions.flatMap(item => this.parseEmails(item.email)),
|
||||
...this.receiverInvoiceOptions.flatMap(item => [
|
||||
...this.parseEmails(item.email),
|
||||
...(item.contacts || []).flatMap(contact => this.parseEmails(contact.email)),
|
||||
]),
|
||||
];
|
||||
this.departmentEmailOptions = invoiceInfoEmails.filter(Boolean).reduce((emails, email) => {
|
||||
if (!emails.some(item => item.toLowerCase() === email.toLowerCase())) emails.push(email);
|
||||
@@ -989,14 +992,19 @@ export default {
|
||||
handleReceiverChange(id) {
|
||||
const info = this.receiverInvoiceOptions.find(item => String(item.id) === String(id));
|
||||
if (!info) return;
|
||||
const invoiceContact = (info.contacts || []).find(item => item.contactName || item.email) || {};
|
||||
Object.assign(this.form, {
|
||||
receiverName: info.invoiceTitle,
|
||||
taxpayerNo: info.taxNo,
|
||||
bankName: info.bankName,
|
||||
bankAccount: info.bankAccount,
|
||||
registeredAddress: info.registeredAddress,
|
||||
email: info.email || '',
|
||||
email: invoiceContact.email || '',
|
||||
});
|
||||
if (invoiceContact.contactName) {
|
||||
this.form.contactName = invoiceContact.contactName;
|
||||
this.form.contactPhone = invoiceContact.contactPhone || '';
|
||||
}
|
||||
this.handleInvoiceTypeChange();
|
||||
},
|
||||
handleContactChange(name) {
|
||||
|
||||
Reference in New Issue
Block a user