优化代码

This commit is contained in:
wuxw 2025-02-26 11:12:04 +08:00
parent 954122f1a4
commit c83fa45b7b
2 changed files with 11 additions and 7 deletions

View File

@ -92,12 +92,13 @@
<td class="text-center" width="200px">{{item.remark}}</td> <td class="text-center" width="200px">{{item.remark}}</td>
</tr> </tr>
<tr> <tr>
<td colspan="3" class="text-center "><span> <td colspan="3" class="text-center ">大写人民币(元)</td>
<vc:i18n name="大写人民币" namespace="printPayFee"></vc:i18n> <td colspan="2" class="text-center ">{{vc.changeNumMoneyToChinese(printPayFeeInfo.amount)}}
</span>(元)</td> </td>
<td colspan="4" class="text-center ">{{vc.changeNumMoneyToChinese(printPayFeeInfo.amount)}} <td colspan="1" class="text-center ">{{printPayFeeInfo.amount}}</td>
<td colspan="2" class="text-center ">账户扣款</td>
<td colspan="2" class="text-center ">{{printPayFeeInfo.acctAmount}}
</td> </td>
<td colspan="3" class="text-center ">{{printPayFeeInfo.amount}}</td>
</tr> </tr>
<tr v-if="printPayFeeInfo.content || printPayFeeInfo.qrImg"> <tr v-if="printPayFeeInfo.content || printPayFeeInfo.qrImg">
<td colspan="6"> <td colspan="6">

View File

@ -17,7 +17,8 @@
payObjName: '', payObjName: '',
feeReceipt: [], feeReceipt: [],
apply: 'N', apply: 'N',
receiptNum:'' receiptNum:'',
acctAmount:0
}, },
printFlag: '0' printFlag: '0'
}, },
@ -109,7 +110,9 @@
if(_feeReceiptDetails[0].amount < 0){ if(_feeReceiptDetails[0].amount < 0){
$that.printPayFeeInfo.apply = 'R'; $that.printPayFeeInfo.apply = 'R';
} }
let _acctAmount = 0.0;
_feeReceiptDetails.forEach(item => { _feeReceiptDetails.forEach(item => {
_acctAmount = _acctAmount + parseFloat(item.acctAmount);
$that.printPayFeeInfo.feeReceipt.forEach(im => { $that.printPayFeeInfo.feeReceipt.forEach(im => {
if (item.receiptId == im.receiptId) { if (item.receiptId == im.receiptId) {
item.objName = im.objName; item.objName = im.objName;
@ -118,7 +121,7 @@
}) })
}) })
$that.printPayFeeInfo.fees = _feeReceiptDetails; $that.printPayFeeInfo.fees = _feeReceiptDetails;
$that.printPayFeeInfo.acctAmount = _acctAmount.toFixed(2);
}, },
function(errInfo, error) { function(errInfo, error) {