From a4f649633da4eefe21355c607cd7bd95a16ce40e Mon Sep 17 00:00:00 2001 From: fengachen <373943794@qq.com> Date: Wed, 9 Nov 2022 16:12:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E6=89=93?= =?UTF-8?q?=E5=8C=85=E7=AE=A1=E7=90=86=20=E6=89=B9=E9=87=8F=E6=9D=A5?= =?UTF-8?q?=E6=AC=BE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/BatchIncomePaymentModule.vue | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/views/packManagement/modules/BatchIncomePaymentModule.vue b/src/views/packManagement/modules/BatchIncomePaymentModule.vue index 787eeaa..97fdcdd 100644 --- a/src/views/packManagement/modules/BatchIncomePaymentModule.vue +++ b/src/views/packManagement/modules/BatchIncomePaymentModule.vue @@ -53,6 +53,11 @@ @change="e => {e.target.value = (e.target.value + '').trim()}"> + + + @@ -96,7 +101,7 @@ export default { data() { return { title: '批量来款', - width: 1000, + width: 1200, confirmLoading: false, form: this.$form.createForm(this), labelCol: { @@ -156,7 +161,27 @@ export default { align: 'center', width: 140, dataIndex: 'thisIncomingAmount' - }, { + }, + { + title: '税率', + align: 'center', + width: 120, + dataIndex: 'taxRate', + scopedSlots: {customRender: 'tax-rate'} + }, + { + title: '税额', + align: 'center', + width: 100, + dataIndex: 'tax', + }, + { + title: '未税额', + align: 'center', + width: 100, + dataIndex: 'noTaxAmount', + }, + { title: '备注', align: 'center', width: 200, @@ -185,6 +210,17 @@ export default { this.addZero(e) return e.target.value }, + /** + * 计算本项目开票金额的税额与未税额 + * */ + changeRate(record){ + // 获取本次来款金额 税率 + let {thisIncomingAmount,taxRate} = record + // 计算本次开票金额的 税额与未税额 + if(!thisIncomingAmount) return + record.noTaxAmount = (thisIncomingAmount / (1 + taxRate * 1)).toFixed(2) + record.tax = (thisIncomingAmount - record.noTaxAmount).toFixed(2) + }, loadData() { // 计算项目欠款信息 this.dataSource.forEach(item => { @@ -214,6 +250,9 @@ export default { this.submitDataSource.forEach((item, index) => { let obj = { amountReceived: item.thisIncomingAmount, + tax:item.tax, + taxRate:item.taxRate, + noTaxAmount:item.noTaxAmount, paymentDate: values.paymentDate, projectId: item.id, projectType: item.projectType, @@ -343,6 +382,7 @@ export default { this.$set(this.dataSource, i, item) } } + } , /**