优化代码

This commit is contained in:
Your Name 2023-09-18 22:41:38 +08:00
parent c02e03db7a
commit 651f907a85
3 changed files with 39 additions and 21 deletions

View File

@ -1,7 +1,8 @@
<div> <div>
<div class="row margin-top-lg"> <div class="row margin-top-lg">
<div class="col-lg-2 padding-right-xs padding-left-xl"> <div class="col-lg-2 padding-right-xs padding-left-xl">
<select class="custom-select custom-select-sm" v-model="simplifyFeeReceiptInfo.objType" @change="_changeSimplifyFeeReceiptFeeTypeCd(simplifyFeeReceiptInfo.objType)"> <select class="custom-select custom-select-sm" v-model="simplifyFeeReceiptInfo.objType"
@change="_changeSimplifyFeeReceiptFeeTypeCd(simplifyFeeReceiptInfo.objType)">
<option disabled value="">{{vc.i18n('请选择收费类型','simplifyFeeReceipt')}}</option> <option disabled value="">{{vc.i18n('请选择收费类型','simplifyFeeReceipt')}}</option>
<option selected value="3333">{{vc.i18n('房屋费','simplifyFeeReceipt')}}</option> <option selected value="3333">{{vc.i18n('房屋费','simplifyFeeReceipt')}}</option>
<option value="6666">{{vc.i18n('车位费','simplifyFeeReceipt')}}</option> <option value="6666">{{vc.i18n('车位费','simplifyFeeReceipt')}}</option>
@ -9,14 +10,16 @@
</select> </select>
</div> </div>
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType == '6666'"> <div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType == '6666'">
<select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.carId" @change="changeSimplifyFeeReceiptCar()"> <select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.carId"
@change="changeSimplifyFeeReceiptCar()">
<option disabled value="">{{vc.i18n('请选择车辆','simplifyFeeReceipt')}}</option> <option disabled value="">{{vc.i18n('请选择车辆','simplifyFeeReceipt')}}</option>
<option v-for="(item,index) in simplifyFeeReceiptInfo.ownerCars" :value="item.carId">{{item.carNum}} <option v-for="(item,index) in simplifyFeeReceiptInfo.ownerCars" :value="item.carId">{{item.carNum}}
</option> </option>
</select> </select>
</div> </div>
<div class="col-lg-2 padding-right-xs padding-left-xl" v-else-if="simplifyFeeReceiptInfo.objType == '7777'"> <div class="col-lg-2 padding-right-xs padding-left-xl" v-else-if="simplifyFeeReceiptInfo.objType == '7777'">
<select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.contractId" @change="changeSimplifyFeeReceiptCar()"> <select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.contractId"
@change="changeSimplifyFeeReceiptCar()">
<option disabled value="">{{vc.i18n('请选择合同','simplifyFeeReceipt')}}</option> <option disabled value="">{{vc.i18n('请选择合同','simplifyFeeReceipt')}}</option>
<option v-for="(item,index) in simplifyFeeReceiptInfo.ownerContracts" :value="item.contractId"> <option v-for="(item,index) in simplifyFeeReceiptInfo.ownerContracts" :value="item.contractId">
{{item.contractCode}} {{item.contractCode}}
@ -24,7 +27,8 @@
</select> </select>
</div> </div>
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType != '7777'"> <div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType != '7777'">
<select class="custom-select custom-select-sm" v-model="simplifyFeeReceiptInfo.ownerFlag" @change="_queryFeeReceiptMethod()"> <select class="custom-select custom-select-sm" v-model="simplifyFeeReceiptInfo.ownerFlag"
@change="_queryFeeReceiptMethod()">
<option value="F">{{vc.i18n('当前','simplifyFeeReceipt')}}{{simplifyFeeReceiptInfo.objType == <option value="F">{{vc.i18n('当前','simplifyFeeReceipt')}}{{simplifyFeeReceiptInfo.objType ==
'6666'?'车辆':'房屋'}} '6666'?'车辆':'房屋'}}
</option> </option>
@ -45,11 +49,14 @@
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType != '6666' "> <div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType != '6666' ">
</div> </div>
<div class="col-lg-4 text-right padding-right-lg"> <div class="col-lg-4 text-right padding-right-lg">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-on:click="_printFeeReceipt()">打印 <button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_printFeeReceipt()">打印
</button> </button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-on:click="_printFeeSmallReceipt()">打印小票 <button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_printFeeSmallReceipt()">打印小票
</button> </button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-on:click="_printApplyFeeReceipt()">申请单 <button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_printApplyFeeReceipt()">申请单
</button> </button>
</div> </div>
</div> </div>
@ -58,7 +65,8 @@
<thead> <thead>
<tr> <tr>
<th class="text-center"> <th class="text-center">
<input type="checkbox" class="i-checks" v-bind:checked="simplifyFeeReceiptInfo.quan == true" @click="checkAllReceipt($event)"> <input type="checkbox" class="i-checks" v-bind:checked="simplifyFeeReceiptInfo.quan == true"
@click="checkAllReceipt($event)">
</th> </th>
<th class="text-center"> <th class="text-center">
<vc:i18n name="收据编号" namespace="simplifyFeeReceipt"></vc:i18n> <vc:i18n name="收据编号" namespace="simplifyFeeReceipt"></vc:i18n>
@ -70,34 +78,37 @@
{{_getFeeObjName(simplifyFeeReceiptInfo.objType)}} {{_getFeeObjName(simplifyFeeReceiptInfo.objType)}}
</th> </th>
<th class="text-center"> <th class="text-center">
<span><vc:i18n name="业主" namespace="simplifyFeeReceipt"></vc:i18n></span> <vc:i18n name="业主" namespace="simplifyFeeReceipt"></vc:i18n>
</th> </th>
<th class="text-center"> <th class="text-center">
<span><vc:i18n name="费用项目" namespace="simplifyFeeReceipt"></vc:i18n></span> <vc:i18n name="费用项目" namespace="simplifyFeeReceipt"></vc:i18n>
</th> </th>
<th class="text-center"> <th class="text-center">
<span><vc:i18n name="收费时间段" namespace="simplifyFeeReceipt"></vc:i18n></span> <vc:i18n name="收费时间段" namespace="simplifyFeeReceipt"></vc:i18n>
</th> </th>
<th class="text-center"> <th class="text-center">
<span><vc:i18n name="总金额" namespace="simplifyFeeReceipt"></vc:i18n></span> <vc:i18n name="总金额" namespace="simplifyFeeReceipt"></vc:i18n>
</th> </th>
<th class="text-center"> <th class="text-center">
<span><vc:i18n name="缴费时间" namespace="simplifyFeeReceipt"></vc:i18n></span> <vc:i18n name="缴费时间" namespace="simplifyFeeReceipt"></vc:i18n>
</th> </th>
<th class="text-center"> <th class="text-center">
<span><vc:i18n name="收据" namespace="simplifyFeeReceipt"></vc:i18n></span>ID <vc:i18n name="收据ID" namespace="simplifyFeeReceipt"></vc:i18n>
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="feeReceipt in simplifyFeeReceiptInfo.feeReceipts"> <tr v-for="feeReceipt in simplifyFeeReceiptInfo.feeReceipts">
<td class="text-center"> <td class="text-center">
<input type="checkbox" class="i-checks checReceiptItem" v-bind:value="feeReceipt.receiptId" v-model="simplifyFeeReceiptInfo.selectReceipts"> <input type="checkbox" class="i-checks checReceiptItem" v-bind:value="feeReceipt.receiptId"
v-model="simplifyFeeReceiptInfo.selectReceipts">
</td> </td>
<td class="text-center">{{feeReceipt.receiptCode}} <td class="text-center">{{feeReceipt.receiptCode}}
</td> </td>
<td class="text-center">{{_getFeeObjName(feeReceipt.objType)}} <td class="text-center">{{_getFeeObjName(feeReceipt.objType)}}
<span><vc:i18n name="费" namespace="simplifyFeeReceipt"></vc:i18n></span> <span>
<vc:i18n name="费" namespace="simplifyFeeReceipt"></vc:i18n>
</span>
</td> </td>
<td class="text-center">{{feeReceipt.objName}}</td> <td class="text-center">{{feeReceipt.objName}}</td>
<td class="text-center">{{feeReceipt.payObjName}}</td> <td class="text-center">{{feeReceipt.payObjName}}</td>

View File

@ -101,8 +101,9 @@
if (_json.code != '0') { if (_json.code != '0') {
return; return;
} }
$that._listSimplifyFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS); //$that._listSimplifyFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS);
$('#generatorReceiptModel').modal('hide'); $('#generatorReceiptModel').modal('hide');
vc.emit('simplifyAcceptance', 'doSearch','simplifyHisFee')
}, },
function(errInfo, error) { function(errInfo, error) {

View File

@ -72,6 +72,12 @@
$that.simplifyAcceptanceInfo.searchValue = _param.roomName; $that.simplifyAcceptanceInfo.searchValue = _param.roomName;
$that.simplifyAcceptanceInfo.searchPlaceholder = "请输入房屋编号 楼栋-单元-房屋 如1-1-1"; $that.simplifyAcceptanceInfo.searchPlaceholder = "请输入房屋编号 楼栋-单元-房屋 如1-1-1";
$that._doSearch(); $that._doSearch();
});
vc.on('simplifyAcceptance', 'doSearch', function (_tab) {
$that._doSearch();
setTimeout(function(){
$that.changeTab(_tab)
},2000)
}) })
}, },
methods: { methods: {