优化代码

This commit is contained in:
wuxw 2024-02-18 16:28:16 +08:00
parent 36b254dc45
commit daa98b5ac6
2 changed files with 17 additions and 21 deletions

View File

@ -3,11 +3,11 @@
<div class="col-lg-4 padding-right-xs padding-left-xl"> <div class="col-lg-4 padding-right-xs padding-left-xl">
<span class="margin-right" v-for="(item,index) in ownerDetailRoomFeeInfo.payObjs"> <span class="margin-right" v-for="(item,index) in ownerDetailRoomFeeInfo.payObjs">
<input type="checkbox" class="i-checks checkRoomItem" v-bind:value="item.roomId" <input type="checkbox" class="i-checks checkRoomItem" v-bind:value="item.roomId"
v-model="ownerDetailRoomFeeInfo.payerObjIds" v-model="ownerDetailRoomFeeInfo.payerObjIds" @change="_chanagePayerObjId()">
@change="_chanagePayerObjId()"> {{item.floorNum}}-{{item.unitNum}}-{{item.roomNum}} {{item.floorNum}}-{{item.unitNum}}-{{item.roomNum}}
</span> </span>
</div> </div>
<div class="col-lg-1 padding-lr-xs" > <div class="col-lg-1 padding-lr-xs">
<select class="custom-select custom-select-sm" v-model="ownerDetailRoomFeeInfo.state" <select class="custom-select custom-select-sm" v-model="ownerDetailRoomFeeInfo.state"
@change="_changeContractConfigId()"> @change="_changeContractConfigId()">
<option selected value="">{{vc.i18n('请选择状态','ownerDetailRoomFee')}}</option> <option selected value="">{{vc.i18n('请选择状态','ownerDetailRoomFee')}}</option>
@ -18,11 +18,10 @@
<div class="col-lg-7 text-right"> <div class="col-lg-7 text-right">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" <button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-if="vc.hasPrivilege('502020082314267912')" v-on:click="_openBatchPayRoomFeeModal()"> v-if="vc.hasPrivilege('502020082314267912')" v-on:click="_openBatchPayRoomFeeModal()">
<vc:i18n name="批量缴费" namespace="ownerDetailRoomFee"></vc:i18n> <vc:i18n name="批量缴费" namespace="ownerDetailRoomFee"></vc:i18n>
</button> </button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" <button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-if="vc.hasPrivilege('502022073007100003')" v-if="vc.hasPrivilege('502022073007100003')" v-on:click="_openTempImportRoomFeeModal()">
v-on:click="_openTempImportRoomFeeModal()">
临时收费 临时收费
</button> </button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" <button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
@ -30,13 +29,11 @@
<vc:i18n name="按量缴费" namespace="ownerDetailRoomFee"></vc:i18n> <vc:i18n name="按量缴费" namespace="ownerDetailRoomFee"></vc:i18n>
</button> </button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" <button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-if="vc.hasPrivilege('502022073096990007')" v-if="vc.hasPrivilege('502022073096990007')" v-on:click="_openRoomsCreateFeeModal()">
v-on:click="_openRoomsCreateFeeModal()" >
创建费用 创建费用
</button> </button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" <button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-if="vc.hasPrivilege('502020080570210194')" v-if="vc.hasPrivilege('502020080570210194')" v-on:click="_toRoomOwePayFee()">
v-on:click="_toRoomOwePayFee()">
欠费缴费 欠费缴费
</button> </button>
<button type="button" class="btn btn-white btn-sm" style="margin-left:10px" v-on:click="_printOwnOrder()"> <button type="button" class="btn btn-white btn-sm" style="margin-left:10px" v-on:click="_printOwnOrder()">
@ -123,7 +120,9 @@
</span>{{_getRoomAttrValue(fee.feeAttrs,'390003')}}</div> </span>{{_getRoomAttrValue(fee.feeAttrs,'390003')}}</div>
</td> </td>
<td class="text-center" width="150" v-else-if="fee.computingFormula == '4004'"> <td class="text-center" width="150" v-else-if="fee.computingFormula == '4004'">
<div><vc:i18n name="费用根据实际情况而定" namespace="ownerDetailRoomFee"></vc:i18n></div> <div>
<vc:i18n name="费用根据实际情况而定" namespace="ownerDetailRoomFee"></vc:i18n>
</div>
</td> </td>
<td class="text-center" v-else> <td class="text-center" v-else>
<div><span> <div><span>
@ -176,12 +175,9 @@
</div> </div>
<div class="col-sm-2"> <div class="col-sm-2">
<span> <span>
<span> <vc:i18n name="欠费小计:" namespace="ownerDetailRoomFee"></vc:i18n>
<span>
<vc:i18n name="欠费小计" namespace="ownerDetailRoomFee"></vc:i18n>
</span>
</span>{{ownerDetailRoomFeeInfo.totalAmount}}
</span> </span>
{{ownerDetailRoomFeeInfo.totalAmount}}
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<vc:create namespace="ownerDetailRoomFee" path="frame/paginationPlus"></vc:create> <vc:create namespace="ownerDetailRoomFee" path="frame/paginationPlus"></vc:create>

View File

@ -3,7 +3,7 @@
**/ **/
(function (vc) { (function (vc) {
var DEFAULT_PAGE = 1; var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10; var DEFAULT_ROWS = 30;
vc.extends({ vc.extends({
data: { data: {
ownerDetailRoomFeeInfo: { ownerDetailRoomFeeInfo: {
@ -52,7 +52,7 @@
$that.ownerDetailRoomFeeInfo.total = _feeConfigInfo.total; $that.ownerDetailRoomFeeInfo.total = _feeConfigInfo.total;
$that.ownerDetailRoomFeeInfo.records = _feeConfigInfo.records; $that.ownerDetailRoomFeeInfo.records = _feeConfigInfo.records;
$that.ownerDetailRoomFeeInfo.fees = _feeConfigInfo.fees; $that.ownerDetailRoomFeeInfo.fees = _feeConfigInfo.fees;
vc.emit('pagination', 'init', { vc.emit('ownerDetailRoomFee','paginationPlus', 'init', {
total: _feeConfigInfo.records, total: _feeConfigInfo.records,
currentPage: _page currentPage: _page
}); });