优化代码

This commit is contained in:
wuxw 2024-12-23 22:03:04 +08:00
parent 322197adf8
commit 300f6e1c95

View File

@ -1,169 +1,152 @@
<div>
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5><span>
<vc:i18n name="查询条件"></vc:i18n>
</span></h5>
<div class="ibox-tools" style="top:10px;">
<!-- <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
<div class="ibox ">
<div class="ibox-title">
<h5><span>
<vc:i18n name="查询条件"></vc:i18n>
</span></h5>
<div class="ibox-tools" style="top:10px;">
<!-- <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
v-on:click="_moreCondition()">{{couponPropertyPoolManageInfo.moreCondition ==
true?'隐藏':'更多'}}</button> -->
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请选择优惠券编号','couponPropertyPoolManage')"
v-model="couponPropertyPoolManageInfo.conditions.cppId" class=" form-control">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请选择优惠券编号','couponPropertyPoolManage')"
v-model="couponPropertyPoolManageInfo.conditions.cppId" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请选择优惠券名称','couponPropertyPoolManage')"
v-model="couponPropertyPoolManageInfo.conditions.couponName" class=" form-control">
</div>
</div>
<div class="col-sm-3">
<select class="custom-select" v-model="couponPropertyPoolManageInfo.conditions.fromType">
<option selected value="">
{{vc.i18n('请选择来自方式','couponPropertyPoolManage')}}
</option>
<option value="1001"> {{vc.i18n('优惠券市场购买','couponPropertyPoolManage')}}
</option>
<option value="2002">{{vc.i18n('自己制作','couponPropertyPoolManage')}}
</option>
</select>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_queryCouponPropertyPoolMethod()">
<i class="glyphicon glyphicon-search"></i> <span>
<vc:i18n name="查询"></vc:i18n>
</span>
</button>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请选择优惠券名称','couponPropertyPoolManage')"
v-model="couponPropertyPoolManageInfo.conditions.couponName" class=" form-control">
</div>
<div class="row">
<div class="col-sm-4">
<select class="custom-select" v-model="couponPropertyPoolManageInfo.conditions.toType">
<option selected value="">{{vc.i18n('选择用途','couponPropertyPoolManage')}}
</option>
<option value="1001">{{vc.i18n('购物','couponPropertyPoolManage')}}
</option>
<!-- <option value="2002">{{vc.i18n('缴费','couponPropertyPoolManage')}}
</div>
<div class="col-sm-3">
<select class="custom-select" v-model="couponPropertyPoolManageInfo.conditions.fromType">
<option selected value="">
{{vc.i18n('请选择来自方式','couponPropertyPoolManage')}}
</option>
<option value="1001"> {{vc.i18n('优惠券市场购买','couponPropertyPoolManage')}}
</option>
<option value="2002">{{vc.i18n('自己制作','couponPropertyPoolManage')}}
</option>
</select>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryCouponPropertyPoolMethod()">
<i class="glyphicon glyphicon-search"></i> <span>
<vc:i18n name="查询"></vc:i18n>
</span>
</button>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<select class="custom-select" v-model="couponPropertyPoolManageInfo.conditions.toType">
<option selected value="">{{vc.i18n('选择用途','couponPropertyPoolManage')}}
</option>
<option value="1001">{{vc.i18n('购物','couponPropertyPoolManage')}}
</option>
<!-- <option value="2002">{{vc.i18n('缴费','couponPropertyPoolManage')}}
</option> -->
<option value="3003">{{vc.i18n('维修劵','couponPropertyPoolManage')}}
</option>
<option value="4004">{{vc.i18n('停车劵','couponPropertyPoolManage')}}
</option>
</select>
</div>
</div>
<option value="3003">{{vc.i18n('维修劵','couponPropertyPoolManage')}}
</option>
<option value="4004">{{vc.i18n('停车劵','couponPropertyPoolManage')}}
</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5><span>
<vc:i18n name="优惠券" namespace="couponPropertyPoolManage"></vc:i18n>
</span></h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-white btn-sm" v-on:click="vc.showMarkdown('/pages/scm/couponPropertyPoolManage')">
<vc:i18n name="文档"></vc:i18n>
</button>
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_openAddCouponPropertyPoolModal()">
<span>
<vc:i18n name="制作" namespace="couponPropertyPoolManage"></vc:i18n>
</span>
</button>
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center"><span>
<vc:i18n name='编号' namespace='couponPropertyPoolManage'></vc:i18n>
</span></th>
<th class="text-center"><span>
<vc:i18n name='优惠券名称' namespace='couponPropertyPoolManage'></vc:i18n>
</span></th>
<th class="text-center"><span>
<vc:i18n name='来自方式' namespace='couponPropertyPoolManage'></vc:i18n>
</span></th>
<th class="text-center"><span>
<vc:i18n name='用途' namespace='couponPropertyPoolManage'></vc:i18n>
</span></th>
<th class="text-center"><span>
<vc:i18n name='数量' namespace='couponPropertyPoolManage'></vc:i18n>
</span></th>
<th class="text-center"><span>
<vc:i18n name='有效期' namespace=' couponPropertyPoolManage'></vc:i18n>
</span></th>
<th class="text-center"><span>
<vc:i18n name='创建时间' namespace=' couponPropertyPoolManage'></vc:i18n>
</span></th>
<th class="text-center"><span>
<vc:i18n name='操作'></vc:i18n>
</span></th>
</tr>
</thead>
<tbody>
<tr v-for="couponPropertyPool in couponPropertyPoolManageInfo.couponPropertyPools">
<td class="text-center">{{couponPropertyPool.cppId}}</td>
<td class="text-center">{{couponPropertyPool.couponName}}</td>
<td class="text-center">{{couponPropertyPool.fromTypeName}}</td>
<td class="text-center">{{couponPropertyPool.toTypeName}}</td>
<td class="text-center">{{couponPropertyPool.stock}}</td>
<td class="text-center">{{couponPropertyPool.validityDay}}天</td>
<td class="text-center">{{couponPropertyPool.createTime}}</td>
<td class="text-center">
<div class="btn-group" v-if="couponPropertyPool.stock >0">
<button class="btn-white btn btn-xs"
v-on:click="_openGiftCouponPropertyPoolModel(couponPropertyPool)"><span>
<vc:i18n name='手工赠送'></vc:i18n>
</span></button>
</div>
<div class="btn-group" v-if="couponPropertyPool.fromType == '2002'">
<button class="btn-white btn btn-xs"
v-on:click="_openEditCouponPropertyPoolModel(couponPropertyPool)"><span>
<vc:i18n name='修改'></vc:i18n>
</span></button>
</div>
<div class="btn-group" v-if="couponPropertyPool.fromType == '2002'">
<button class="btn-white btn btn-xs"
v-on:click="_openDeleteCouponPropertyPoolModel(couponPropertyPool)"><span>
<vc:i18n name='删除'></vc:i18n>
</span></button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>
<vc:i18n name="优惠券" namespace="couponPropertyPoolManage"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-white btn-sm"
v-on:click="vc.showMarkdown('/pages/scm/couponPropertyPoolManage')">
<vc:i18n name="文档"></vc:i18n>
</button>
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddCouponPropertyPoolModal()">
<vc:i18n name="制作" namespace="couponPropertyPoolManage"></vc:i18n>
</button>
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<vc:i18n name='编号' namespace='couponPropertyPoolManage'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='优惠券名称' namespace='couponPropertyPoolManage'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='来自方式' namespace='couponPropertyPoolManage'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='用途' namespace='couponPropertyPoolManage'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='数量' namespace='couponPropertyPoolManage'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='有效期' namespace=' couponPropertyPoolManage'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='创建时间' namespace=' couponPropertyPoolManage'></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name='操作'></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="couponPropertyPool in couponPropertyPoolManageInfo.couponPropertyPools">
<td class="text-center">{{couponPropertyPool.cppId}}</td>
<td class="text-center">{{couponPropertyPool.couponName}}</td>
<td class="text-center">{{couponPropertyPool.fromTypeName}}</td>
<td class="text-center">{{couponPropertyPool.toTypeName}}</td>
<td class="text-center">{{couponPropertyPool.stock}}</td>
<td class="text-center">{{couponPropertyPool.validityDay}}天</td>
<td class="text-center">{{couponPropertyPool.createTime}}</td>
<td class="text-center">
<div class="btn-group" v-if="couponPropertyPool.stock >0">
<button class="btn-white btn btn-xs"
v-on:click="_openGiftCouponPropertyPoolModel(couponPropertyPool)">
<vc:i18n name='手工赠送'></vc:i18n>
</button>
</div>
<div class="btn-group" v-if="couponPropertyPool.fromType == '2002'">
<button class="btn-white btn btn-xs"
v-on:click="_openEditCouponPropertyPoolModel(couponPropertyPool)">
<vc:i18n name='修改'></vc:i18n>
</button>
</div>
<div class="btn-group" v-if="couponPropertyPool.fromType == '2002'">
<button class="btn-white btn btn-xs"
v-on:click="_openDeleteCouponPropertyPoolModel(couponPropertyPool)">
<vc:i18n name='删除'></vc:i18n>
</button>
</div>
</td>
</tr>
</tbody>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>