优化代码

This commit is contained in:
wuxw 2024-04-12 15:05:44 +08:00
parent fecd1d5749
commit 26dceee789
2 changed files with 71 additions and 73 deletions

View File

@ -4,7 +4,7 @@
<div class="ibox ">
<div class="ibox-title">
<h5>
<span><vc:i18n name="查询条件" namespace="merchantManage"></vc:i18n></span>
<vc:i18n name="查询条件" namespace="merchantManage"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;"></div>
</div>
@ -13,19 +13,19 @@
<div class="col-sm-3">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入商家编号','merchantManage')"
v-model="merchantManageInfo.conditions.storeId" class=" form-control">
v-model="merchantManageInfo.conditions.storeId" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入名称','merchantManage')"
v-model="merchantManageInfo.conditions.name" class=" form-control">
v-model="merchantManageInfo.conditions.name" class=" form-control">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入电话','merchantManage')"
v-model="merchantManageInfo.conditions.tel" class=" form-control">
v-model="merchantManageInfo.conditions.tel" class=" form-control">
</div>
</div>
<div class="col-sm-2">
@ -46,11 +46,11 @@
<div class="ibox">
<div class="ibox-title">
<h5>
<span><vc:i18n name="商家公司" namespace="merchantManage"></vc:i18n></span>
<vc:i18n name="商家公司" namespace="merchantManage"></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/admin/merchantManage')">
v-on:click="vc.showMarkdown('/pages/admin/merchantManage')">
<vc:i18n name="文档"></vc:i18n>
</button>
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddMerchantModal()">
@ -61,77 +61,72 @@
<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="merchantManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="名称" namespace="merchantManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="地址" namespace="merchantManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="管理员" namespace="merchantManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="电话" namespace="merchantManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="创建时间" namespace="merchantManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="操作" namespace="merchantManage"></vc:i18n></span>
</th>
</tr>
<tr>
<th class="text-center">
<vc:i18n name="编号" namespace="merchantManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="名称" namespace="merchantManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="地址" namespace="merchantManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="管理员" namespace="merchantManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="电话" namespace="merchantManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="创建时间" namespace="merchantManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="操作" namespace="merchantManage"></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="propertyCompany in merchantManageInfo.propertyCompanys">
<td class="text-center">{{propertyCompany.storeId}}</td>
<td class="text-center">{{propertyCompany.name}}</td>
<td class="text-center">{{propertyCompany.address}}</td>
<td class="text-center">{{propertyCompany.tel}}</td>
<td class="text-center">{{propertyCompany.tel}}</td>
<td class="text-center">{{propertyCompany.createTime}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-if="propertyCompany.state != '48002'"
<tr v-for="propertyCompany in merchantManageInfo.propertyCompanys">
<td class="text-center">{{propertyCompany.storeId}}</td>
<td class="text-center">{{propertyCompany.name}}</td>
<td class="text-center">{{propertyCompany.address}}</td>
<td class="text-center">{{propertyCompany.tel}}</td>
<td class="text-center">{{propertyCompany.tel}}</td>
<td class="text-center">{{propertyCompany.createTime}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-if="propertyCompany.state != '48002'"
v-on:click="_openUpdateStoreStateModel(propertyCompany,'48002')">
<span><vc:i18n name="限制登录" namespace="merchantManage"></vc:i18n></span>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs" v-else
<vc:i18n name="限制登录" namespace="merchantManage"></vc:i18n>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs" v-else
v-on:click="_openUpdateStoreStateModel(propertyCompany,'48001')">
<span><vc:i18n name="恢复登录" namespace="merchantManage"></vc:i18n></span>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_resetStaffPwd(propertyCompany)">
<span><vc:i18n name="重置密码" namespace="merchantManage"></vc:i18n></span>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_toStoreShopPage(propertyCompany)">
<span><vc:i18n name="管理店铺" namespace="merchantManage"></vc:i18n></span>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
<vc:i18n name="恢复登录" namespace="merchantManage"></vc:i18n>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_resetStaffPwd(propertyCompany)">
<vc:i18n name="重置密码" namespace="merchantManage"></vc:i18n>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_toStoreShopPage(propertyCompany)">
<vc:i18n name="管理店铺" namespace="merchantManage"></vc:i18n>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDeleteMerchantModel(propertyCompany)">
<span><vc:i18n name="删除"></vc:i18n></span>
</button>
</div>
</td>
</tr>
<vc:i18n name="删除"></vc:i18n>
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<div class="row">
@ -148,4 +143,4 @@
<vc:create path="admin/updateStoreState"></vc:create>
<vc:create path="frame/resetStaffPwd"></vc:create>
<vc:create path="admin/deleteMerchant"></vc:create>
</div>
</div>

View File

@ -67,7 +67,10 @@
vc.emit('editMerchant', 'openEditMerchantModal', _propertyCompany);
},
_openDeleteMerchantModel: function(_propertyCompany) {
vc.emit('deleteMerchant', 'openDeleteMerchantModal', _propertyCompany);
vc.emit('deleteMerchant', 'openDeleteMerchantModal', {
storeId:_propertyCompany.storeId,
storeTypeCd:_propertyCompany.storeTypeCd
});
},
//查询
_queryMerchantMethod: function() {