|
|
@@ -281,7 +281,7 @@ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
},
|
|
|
{
|
|
|
minWidth: 160,
|
|
|
- prop: 'payableAmt',
|
|
|
+ prop: 'payablePrice',
|
|
|
label: '累计应付金额',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true
|
|
|
@@ -319,10 +319,10 @@ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
// ) / 100
|
|
|
// );
|
|
|
},
|
|
|
- // 累计应付总金额:取自下方明细行 payableAmt 之和(不可调整)
|
|
|
+ // 累计应付总金额:取自下方明细行 payablePrice 之和(不可调整)
|
|
|
payableTotalPrice() {
|
|
|
const sum = this.localList.reduce(
|
|
|
- (pre, cur) => pre + Math.round((+cur.payableAmt || 0) * 100),
|
|
|
+ (pre, cur) => pre + Math.round((+cur.payablePrice || 0) * 100),
|
|
|
0
|
|
|
);
|
|
|
return sum / 100;
|
|
|
@@ -410,9 +410,9 @@ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
this.recalcRow(row);
|
|
|
},
|
|
|
// 根据本次对账金额重算单行:
|
|
|
- // 确收金额 = min(未对账预付款确收金额, 本次对账金额)
|
|
|
+ // 确付金额 = min(未对账预付款确收金额, 本次对账金额)
|
|
|
// 本次应付金额 = 本次对账金额 - 确收金额
|
|
|
- // 累计应付金额 = 本次对账金额 - 累计预付确付金额 + 上期累计应付金额
|
|
|
+ // 累计应付金额直接取 payablePrice,不再前端另算累计公式
|
|
|
recalcRow(row) {
|
|
|
const statementAmount = +row.statementAmount || 0;
|
|
|
let val = +row.confirmedPrepayAmt || 0;
|
|
|
@@ -425,16 +425,6 @@ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
'payablePrice',
|
|
|
Math.round((statementAmount - val) * 100) / 100
|
|
|
);
|
|
|
- // 累计应付金额=本次对账金额-累计预付确付金额+上期累计应付金额
|
|
|
- const totalPayableAmount =
|
|
|
- statementAmount -
|
|
|
- (+row.confirmedPrepayAmt || 0) +
|
|
|
- (+row.lastPayableAmt || 0);
|
|
|
- this.$set(
|
|
|
- row,
|
|
|
- 'payableAmt',
|
|
|
- Math.round(totalPayableAmount * 100) / 100
|
|
|
- );
|
|
|
},
|
|
|
// 明细表按采购单号汇总本次对账金额后,同步到对应采购单号的应付行
|
|
|
syncStatementAmount(summaryMap) {
|
|
|
@@ -443,7 +433,7 @@ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
const amount = summaryMap[row.purchaseCode];
|
|
|
if (amount !== undefined) {
|
|
|
// 本次对账金额、本次对账应付总金额随明细表汇总同步,
|
|
|
- // 再由 recalcRow 重算 本次应付金额/累计应付金额
|
|
|
+ // 再由 recalcRow 重算 payablePrice(累计应付金额取该值)
|
|
|
this.$set(row, 'statementAmount', amount);
|
|
|
this.$set(row, 'statementAmt', amount);
|
|
|
this.recalcRow(row);
|