【修改】打包管理 批量来款处理

This commit is contained in:
fengachen
2022-11-09 16:12:33 +08:00
parent 8f40c543ca
commit a4f649633d
@@ -53,6 +53,11 @@
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</template>
<!-- 税率-->
<template slot="tax-rate" slot-scope="text,record">
<j-dict-select-tag style="width: 100%" @input="changeRate(record)" placeholder="请选择税率" dict-code="rate" v-model="record.taxRate"></j-dict-select-tag>
</template>
<template slot="text" slot-scope="text">
<j-ellipsis :value="text" :length="18"></j-ellipsis>
</template>
@@ -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)
}
}
}
,
/**