优化代码

This commit is contained in:
wuxw 2022-12-04 01:55:23 +08:00
parent 361287fe26
commit f2020fe527
2 changed files with 14 additions and 11 deletions

View File

@ -10,19 +10,19 @@
<span>{{printPayFeeInfo.payObjName}}</span> <span>{{printPayFeeInfo.payObjName}}</span>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<span></span> <span><span><vc:i18n name="业主" namespace="printOweFee"></vc:i18n></span>{{printPayFeeInfo.ownerName}}</span>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<span><span><vc:i18n name="打印时间" namespace="printOweFee"></vc:i18n></span>{{printPayFeeInfo.feeTime}}</span> <span><span><vc:i18n name="打印时间" namespace="printOweFee"></vc:i18n></span>{{printPayFeeInfo.feeTime}}</span>
</div> </div>
</div> </div>
<table class="table vc-table-border margin-top"> <table class="table vc-table-border margin-top" style="color:#000;font-size:14px">
<thead> <thead>
<tr > <tr >
<th scope="col" class="text-center"><span><vc:i18n name="项目名称" namespace="printOweFee"></vc:i18n></span></th> <th scope="col" class="text-center"><span><vc:i18n name="项目名称" namespace="printOweFee"></vc:i18n></span></th>
<th scope="col" class="text-center"><span><vc:i18n name="费用期间" namespace="printOweFee"></vc:i18n></span></th> <th scope="col" class="text-center"><span><vc:i18n name="费用期间" namespace="printOweFee"></vc:i18n></span></th>
<th scope="col" class="text-center"><span><vc:i18n name="单位" namespace="printOweFee"></vc:i18n></span></th> <th scope="col" class="text-center"><span><vc:i18n name="单位" namespace="printOweFee"></vc:i18n></span></th>
<th scope="col" class="text-center"><span><vc:i18n name="面积" namespace="printOweFee"></vc:i18n></span></th> <th scope="col" class="text-center"><span><vc:i18n name="面积/用量" namespace="printOweFee"></vc:i18n></span></th>
<th scope="col" class="text-center"><span><vc:i18n name="单价" namespace="printOweFee"></vc:i18n></span></th> <th scope="col" class="text-center"><span><vc:i18n name="单价" namespace="printOweFee"></vc:i18n></span></th>
<th scope="col" class="text-center"><span><vc:i18n name="金额" namespace="printOweFee"></vc:i18n></span></th> <th scope="col" class="text-center"><span><vc:i18n name="金额" namespace="printOweFee"></vc:i18n></span></th>
</tr> </tr>
@ -41,8 +41,10 @@
{{vc.dateFormat(item.deadlineTime)}} {{vc.dateFormat(item.deadlineTime)}}
</td> </td>
<td class="text-center"><span><vc:i18n name="元" namespace="printOweFee"></vc:i18n></span></td> <td class="text-center"><span><vc:i18n name="元" namespace="printOweFee"></vc:i18n></span></td>
<td class="text-center">{{printPayFeeInfo.builtUpArea}}</td> <td class="text-center" v-if="item.preDegrees">{{(item.curDegrees-item.preDegrees).toFixed(2)}}</td>
<td class="text-center">{{item.squarePrice}}/{{item.additionalAmount}}</td> <td class="text-center" v-else>{{printPayFeeInfo.builtUpArea}}</td>
<td class="text-center" v-if="item.preDegrees">{{item.mwPrice}}</td>
<td class="text-center" v-else>{{item.squarePrice}}/{{item.additionalAmount}}</td>
<td class="text-center">{{item.feePrice}}</td> <td class="text-center">{{item.feePrice}}</td>
</tr> </tr>
<tr> <tr>
@ -53,10 +55,10 @@
</tr> </tr>
<tr height="60px" v-if="printPayFeeInfo.content"> <tr height="60px" v-if="printPayFeeInfo.content">
<td colspan="3"> <td colspan="3">
<p style="max-width: 600px;">
<!-- {{printPayFeeInfo.content}} --> <!-- {{printPayFeeInfo.content}} -->
<div v-html="printPayFeeInfo.content"></div> <div style="max-width: 600px;" v-html="printPayFeeInfo.content"></div>
</p>
</td> </td>
<td colspan="4"> <td colspan="4">
<img :src="printPayFeeInfo.qrImg" width="100px" height="100px"> <img :src="printPayFeeInfo.qrImg" width="100px" height="100px">

View File

@ -14,7 +14,8 @@
payObjId: '', payObjId: '',
builtUpArea: '', builtUpArea: '',
payObjType:'', payObjType:'',
payObjName:'' payObjName:'',
ownerName:''
}, },
printFlag: '0' printFlag: '0'
}, },
@ -143,7 +144,7 @@
$that.printPayFeeInfo.fees.forEach(item => { $that.printPayFeeInfo.fees.forEach(item => {
//item.feePrice = $that._getFixedNum(item.feePrice); //item.feePrice = $that._getFixedNum(item.feePrice);
item.receivableAmount = item.feePrice; item.receivableAmount = item.feePrice;
item.feePrice = item.feeTotalPrice; item.feePrice = item.feePrice;
_totalAmount += item.feePrice; _totalAmount += item.feePrice;
}); });
_totalAmount = Math.round(_totalAmount * 100) / 100; _totalAmount = Math.round(_totalAmount * 100) / 100;