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) } } + } , /**