优化代码

This commit is contained in:
java110 2021-11-15 19:47:47 +08:00
parent 29d2389061
commit d1abb47776
2 changed files with 18 additions and 2 deletions

View File

@ -184,8 +184,8 @@
<span class="col-md-1 margin-left">
<div class="row"><b>大计</b></div>
</span>
<span class="col-md-2" v-for="(item,index) in listOweFeeInfo.fees[0].itemTotalOweAmounts">
<div>{{item.configName}}: {{item.totalOweAmount}}元</div>
<span class="col-md-2" v-for="(item,index) in listOweFeeInfo.feeConfigNames">
<div>{{item.configName}}: {{_getFeeOweAllTotalAmount(item)}}元</div>
</span>
<span class="col-md-2">
<div>合计: {{listOweFeeInfo.fees[0].totalOweAmount}}元</div>

View File

@ -250,6 +250,22 @@
_openChooseFloorMethod: function () {
vc.emit('searchFloor', 'openSearchFloorModel', {});
},
_getFeeOweAllTotalAmount: function (_item) {
let _value = 0;
let _itemTotalOweAmounts = $that.listOweFeeInfo.fees[0].itemTotalOweAmounts;
if (!$that.listOweFeeInfo.fees[0] || !$that.listOweFeeInfo.fees[0].itemTotalOweAmounts) {
return _value;
}
_itemTotalOweAmounts.forEach(item => {
if (_item.configName == item.configName) {
_value = item.totalOweAmount;
}
})
return _value;
}
}
});
})(window.vc);