优化代码

This commit is contained in:
wuxw 2024-06-05 16:47:44 +08:00
parent 658329d2ad
commit 63895453d3

View File

@ -10,13 +10,11 @@
<div class="col-lg-6 text-right" v-if="simplifyCarFeeInfo.carId">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_toBuyCarMonthCard()">
<vc:i18n name="买月卡" namespace="simplifyCarFee"></vc:i18n>
<vc:i18n name="买月卡" namespace="simplifyCarFee"></vc:i18n>
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openBatchPayCarFeeModal()">
<span>
<vc:i18n name="批量缴费" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="批量缴费" namespace="simplifyCarFee"></vc:i18n>
</button>
<!--<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openSimplifyCarAddMeterWaterModal()">
@ -24,7 +22,7 @@
</button>-->
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openSimplifyCarCreateFeeAddModal()">
<vc:i18n name="创建费用" namespace="simplifyCarFee"></vc:i18n>
<vc:i18n name="创建费用" namespace="simplifyCarFee"></vc:i18n>
</button>
</div>
</div>
@ -33,49 +31,31 @@
<thead>
<tr>
<th class="text-center">
<span>
<vc:i18n name="费用项目" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="费用项目" namespace="simplifyCarFee"></vc:i18n>
</th>
<th class="text-center">
<span>
<vc:i18n name="费用标识" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="费用标识" namespace="simplifyCarFee"></vc:i18n>
</th>
<th class="text-center">
<span>
<vc:i18n name="费用类型" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="费用类型" namespace="simplifyCarFee"></vc:i18n>
</th>
<th class="text-center">
<span>
<vc:i18n name="应收金额" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="应收金额" namespace="simplifyCarFee"></vc:i18n>
</th>
<th class="text-center">
<span>
<vc:i18n name="建账时间" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="建账时间" namespace="simplifyCarFee"></vc:i18n>
</th>
<th class="text-center">
<span>
<vc:i18n name="应收时间段" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="应收时间段" namespace="simplifyCarFee"></vc:i18n>
</th>
<th class="text-center">
<span>
<vc:i18n name="说明" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="说明" namespace="simplifyCarFee"></vc:i18n>
</th>
<th class="text-center">
<span>
<vc:i18n name="状态" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="状态" namespace="simplifyCarFee"></vc:i18n>
</th>
<th class="text-center">
<span>
<vc:i18n name="操作" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="操作" namespace="simplifyCarFee"></vc:i18n>
</th>
</tr>
</thead>
@ -93,30 +73,22 @@
:title="_simplifyCarGetFeeOwnerInfo(fee.feeAttrs)">
<div>
<span>
<span>
<vc:i18n name="上期度数" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="上期度数" namespace="simplifyCarFee"></vc:i18n>
</span>{{fee.preDegrees}}
</div>
<div>
<span>
<span>
<vc:i18n name="本期度数" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="本期度数" namespace="simplifyCarFee"></vc:i18n>
</span>{{fee.curDegrees}}
</div>
<div>
<span>
<span>
<vc:i18n name="单价" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="单价" namespace="simplifyCarFee"></vc:i18n>
</span>{{fee.squarePrice}}
</div>
<div>
<span>
<span>
<vc:i18n name="附加费" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="附加费" namespace="simplifyCarFee"></vc:i18n>
</span>{{fee.additionalAmount}}
</div>
</td>
@ -124,32 +96,24 @@
:title="_simplifyCarGetFeeOwnerInfo(fee.feeAttrs)">
<div>
<span>
<span>
<vc:i18n name="算法" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="算法" namespace="simplifyCarFee"></vc:i18n>
</span>{{_getAttrValue(fee.feeAttrs,'390005')}}
</div>
<div>
<span>
<span>
<vc:i18n name="用量" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="用量" namespace="simplifyCarFee"></vc:i18n>
</span>{{_getAttrValue(fee.feeAttrs,'390003')}}
</div>
</td>
<td class="text-center" v-else :title="_simplifyCarGetFeeOwnerInfo(fee.feeAttrs)">
<div>
<span>
<span>
<vc:i18n name="单价" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="单价" namespace="simplifyCarFee"></vc:i18n>
</span>{{fee.squarePrice}}
</div>
<div>
<span>
<span>
<vc:i18n name="固定费" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="固定费" namespace="simplifyCarFee"></vc:i18n>
</span>{{fee.additionalAmount}}
</div>
</td>
@ -158,42 +122,30 @@
<button class="btn btn-link btn-xs"
v-if="fee.state != '2009001' && vc.hasPrivilege('502020082314267912')"
v-on:click="_simplifyCarPayFee(fee)">
<span>
<vc:i18n name="缴费" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="缴费" namespace="simplifyCarFee"></vc:i18n>
</button>
<button class="btn btn-link btn-xs" v-on:click="_simplifyCarPayFeeHis(fee)">
<span>
<vc:i18n name="缴费历史" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="缴费历史" namespace="simplifyCarFee"></vc:i18n>
</button>
<div class="btn-group btn-link btn-xs">
<button class="btn-white btn btn-xs dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span>
<vc:i18n name="更多操作" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="更多操作" namespace="simplifyCarFee"></vc:i18n>
</button>
<div class="dropdown-menu p-4 text-muted" style="max-width: 500px;">
<p v-if="fee.isDefault == 'F' && vc.hasPrivilege('502020090604200029')">
<a href="javascript:void(0)" v-on:click="_simplifyCarDeleteFee(fee)">
<span>
<vc:i18n name="取消费用" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="取消费用" namespace="simplifyCarFee"></vc:i18n>
</a>
</p>
<p v-if="vc.hasPrivilege('502021070488970005')">
<a href="javascript:void(0)" v-on:click="_simplifyCarFinishFee(fee)">
<span>
<vc:i18n name="手工结束" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="手工结束" namespace="simplifyCarFee"></vc:i18n>
</a>
</p>
<p v-if="fee.state != '2009001' && vc.hasPrivilege('502020090427190001')">
<a href="javascript:void(0)" v-on:click="_simplifyCarEditFee(fee)">
<span>
<vc:i18n name="费用变更" namespace="simplifyCarFee"></vc:i18n>
</span>
<vc:i18n name="费用变更" namespace="simplifyCarFee"></vc:i18n>
</a>
</p>
<p>