diff --git a/src/views/payment/invoice-application-form.vue b/src/views/payment/invoice-application-form.vue index 8c6d212..5a8df00 100644 --- a/src/views/payment/invoice-application-form.vue +++ b/src/views/payment/invoice-application-form.vue @@ -497,6 +497,7 @@ const emptyLine = () => ({ localId: ++localId, goodsCategory: '', goodsName: '', + taxClassificationCode: '', unit: '吨', quantity: 0, unitPriceNoTax: 0, @@ -724,9 +725,11 @@ export default { const item = this.findInvoiceItem(line); if (item) { line.taxRate = Number(item.defaultTaxRate || 0); + line.taxClassificationCode = item.taxClassificationCode || ''; } else if (clearInvalid) { line.goodsName = ''; line.taxRate = 0; + line.taxClassificationCode = ''; } this.recalculateLine(line); }, @@ -734,6 +737,7 @@ export default { const names = this.invoiceItemNames(line.goodsCategory); if (!names.some(item => item.shortName === line.goodsName)) line.goodsName = ''; line.taxRate = 0; + line.taxClassificationCode = this.findInvoiceItem(line)?.taxClassificationCode || ''; if (names.length === 1) { line.goodsName = names[0].shortName; this.handleGoodsNameChange(line); @@ -743,9 +747,11 @@ export default { const item = this.findInvoiceItem(line); if (!item) { line.taxRate = 0; + line.taxClassificationCode = ''; return; } line.taxRate = Number(item.defaultTaxRate || 0); + line.taxClassificationCode = item.taxClassificationCode || ''; this.recalculateLine(line); }, validateSettlements(rule, value, callback) { @@ -1141,6 +1147,7 @@ export default { lines: sheet.lines.map(line => ({ goodsCategory: line.goodsCategory, goodsName: line.goodsName, + taxClassificationCode: line.taxClassificationCode, unit: line.unit, quantity: line.quantity, unitPriceNoTax: line.unitPriceNoTax,