【修改】打包管理 批量来款处理
This commit is contained in:
@@ -53,6 +53,11 @@
|
|||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</template>
|
</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">
|
<template slot="text" slot-scope="text">
|
||||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||||
</template>
|
</template>
|
||||||
@@ -96,7 +101,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '批量来款',
|
title: '批量来款',
|
||||||
width: 1000,
|
width: 1200,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
labelCol: {
|
labelCol: {
|
||||||
@@ -156,7 +161,27 @@ export default {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 140,
|
width: 140,
|
||||||
dataIndex: 'thisIncomingAmount'
|
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: '备注',
|
title: '备注',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200,
|
width: 200,
|
||||||
@@ -185,6 +210,17 @@ export default {
|
|||||||
this.addZero(e)
|
this.addZero(e)
|
||||||
return e.target.value
|
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() {
|
loadData() {
|
||||||
// 计算项目欠款信息
|
// 计算项目欠款信息
|
||||||
this.dataSource.forEach(item => {
|
this.dataSource.forEach(item => {
|
||||||
@@ -214,6 +250,9 @@ export default {
|
|||||||
this.submitDataSource.forEach((item, index) => {
|
this.submitDataSource.forEach((item, index) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
amountReceived: item.thisIncomingAmount,
|
amountReceived: item.thisIncomingAmount,
|
||||||
|
tax:item.tax,
|
||||||
|
taxRate:item.taxRate,
|
||||||
|
noTaxAmount:item.noTaxAmount,
|
||||||
paymentDate: values.paymentDate,
|
paymentDate: values.paymentDate,
|
||||||
projectId: item.id,
|
projectId: item.id,
|
||||||
projectType: item.projectType,
|
projectType: item.projectType,
|
||||||
@@ -343,6 +382,7 @@ export default {
|
|||||||
this.$set(this.dataSource, i, item)
|
this.$set(this.dataSource, i, item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user