优化代码

This commit is contained in:
wuxw 2025-03-09 18:03:55 +08:00
parent 0ddb8e8a86
commit 707fa05e06
4 changed files with 0 additions and 384 deletions

View File

@ -1,111 +0,0 @@
<div class="animated fadeInRight ecommerce">
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5><span><vc:i18n name="查询条件" namespace="listPropertyManage"></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()">{{listPropertyManageInfo.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('请输入物业名称','listPropertyManage')"
v-model="listPropertyManageInfo.conditions.name" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<input type="text" :placeholder="vc.i18n('请输入管理员','listPropertyManage')"
v-model="listPropertyManageInfo.conditions.staffName" class=" form-control">
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入联系电话','listPropertyManage')" v-model="listPropertyManageInfo.conditions.tel"
class=" form-control">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_queryListPropertyMethod()">
<i class="fa fa-search"></i> <span><vc:i18n name="查询" namespace="listPropertyManage"></vc:i18n></span>
</button>
</div>
</div>
</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="listPropertyManage"></vc:i18n></span></h5>
<div class="ibox-tools" style="top:10px;">
</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="listPropertyManage"></vc:i18n></span></th>
<th class="text-center"><span><vc:i18n name="管理员" namespace="listPropertyManage"></vc:i18n></span></th>
<th class="text-center"><span><vc:i18n name="管理员电话" namespace="listPropertyManage"></vc:i18n></span></th>
<th class="text-center"><span><vc:i18n name="管理员" namespace="listPropertyManage"></vc:i18n></span>ID</th>
<th class="text-center"><span><vc:i18n name="状态" namespace="listPropertyManage"></vc:i18n></span></th>
<th class="text-center"><span><vc:i18n name="创建时间" namespace="listPropertyManage"></vc:i18n></span></th>
<th class="text-right"><span><vc:i18n name="操作" namespace="listPropertyManage"></vc:i18n></span></th>
</tr>
</thead>
<tbody>
<tr v-for="listProperty in listPropertyManageInfo.listPropertys">
<td class="text-center">{{listProperty.storeName}}</td>
<td class="text-center">{{listProperty.staffName}}</td>
<td class="text-center">{{listProperty.staffTel}}</td>
<td class="text-center">{{listProperty.staffId}}</td>
<td class="text-center">{{listProperty.state == '48002'?'限制登录':'正常'}}</td>
<td class="text-center">{{listProperty.createTime}}</td>
<td class="text-right">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openPropertysCommunityModel(listProperty)"><span><vc:i18n name="隶属小区" namespace="listPropertyManage"></vc:i18n></span>
</button>
<button class="btn-white btn btn-xs"
v-on:click="_openAdminLoginPropertyModel(listProperty)"><span><vc:i18n name="登录" namespace="listPropertyManage"></vc:i18n></span>
</button>
<button class="btn-white btn btn-xs" v-if="listProperty.state != '48002'"
v-on:click="_openUpdateStoreStateModel(listProperty,'48002')"><span><vc:i18n name="限制登录" namespace="listPropertyManage"></vc:i18n></span>
</button>
<button class="btn-white btn btn-xs" v-else
v-on:click="_openUpdateStoreStateModel(listProperty,'48001')"><span><vc:i18n name="恢复登录" namespace="listPropertyManage"></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>
</div>
</div>
<vc:create path="common/storesCommunity"></vc:create>
<vc:create path="admin/adminLoginProperty"></vc:create>
<vc:create path="admin/updateStoreState"></vc:create>
</div>

View File

@ -1,92 +0,0 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
listPropertyManageInfo: {
listPropertys: [],
total: 0,
records: 1,
moreCondition: false,
conditions: {
name: '',
staffName: '',
tel: '',
relCd: '600311000001'
}
}
},
_initMethod: function () {
$that._listListPropertys(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('listPropertyManage', 'listListProperty', function (_param) {
$that._listListPropertys(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
$that._listListPropertys(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listListPropertys: function (_page, _rows) {
$that.listPropertyManageInfo.conditions.page = _page;
$that.listPropertyManageInfo.conditions.row = _rows;
let param = {
params: $that.listPropertyManageInfo.conditions
};
//发送get请求
vc.http.apiGet('/storeStaff/getPropertyStaffs',
param,
function (json, res) {
let _json = JSON.parse(json);
$that.listPropertyManageInfo.total = _json.total;
$that.listPropertyManageInfo.records = _json.records;
$that.listPropertyManageInfo.listPropertys = _json.data;
vc.emit('pagination', 'init', {
total: $that.listPropertyManageInfo.records,
dataCount: $that.listPropertyManageInfo.total,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openPropertysCommunityModel: function (_listProperty) {
vc.emit('storesCommunity', 'openStoresCommunity', _listProperty);
},
_openAdminLoginPropertyModel: function (_listProperty) {
vc.emit('adminLoginProperty', 'login', {
username: _listProperty.staffName,
userId: _listProperty.staffId,
curUserName: vc.getData('/nav/getUserInfo').name
})
},
_openUpdateStoreStateModel: function (_listProperty, state) {
vc.emit('updateStoreState', 'open', {
storeId: _listProperty.storeId,
state: state,
stateName: state == '48002' ? '限制登录' : '恢复登录'
})
},
_queryListPropertyMethod: function () {
$that._listListPropertys(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if ($that.listPropertyManageInfo.moreCondition) {
$that.listPropertyManageInfo.moreCondition = false;
} else {
$that.listPropertyManageInfo.moreCondition = true;
}
}
}
});
})(window.vc);

View File

@ -1,104 +0,0 @@
<div class="animated fadeInRight ecommerce">
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5><span><vc:i18n name="查询条件" namespace="listStoreManage"></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()">{{listStoreManageInfo.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('请输入商户名称','listStoreManage')"
v-model="listStoreManageInfo.conditions.name" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<select class="custom-select" v-model="listStoreManageInfo.conditions.storeTypeCd">
<option selected value="">{{vc.i18n('请选择商户类型','listStoreManage')}}</option>
<option value="800900000003">{{vc.i18n('物业公司','listStoreManage')}}</option>
<option value="800900000005">{{vc.i18n('商家','listStoreManage')}}</option>
</select></div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入联系电话','listStoreManage')"
v-model="listStoreManageInfo.conditions.tel" class=" form-control">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_queryListStoreMethod()">
<i class="fa fa-search"></i> <span><vc:i18n name="查询" namespace="listStoreManage"></vc:i18n></span>
</button>
</div>
</div>
</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="listStoreManage"></vc:i18n></span></h5>
<div class="ibox-tools" style="top:10px;">
</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="listStoreManage"></vc:i18n></span></th>
<th class="text-center"><span><vc:i18n name="商户地址" namespace="listStoreManage"></vc:i18n></span></th>
<th class="text-center"><span><vc:i18n name="联系电话" namespace="listStoreManage"></vc:i18n></span></th>
<th class="text-center"><span><vc:i18n name="商户类型" namespace="listStoreManage"></vc:i18n></span></th>
<th class="text-center"><span><vc:i18n name="企业法人" namespace="listStoreManage"></vc:i18n></span></th>
<th class="text-center"><span><vc:i18n name="成立日期" namespace="listStoreManage"></vc:i18n></span></th>
<th class="text-right"><span><vc:i18n name="操作" namespace="listStoreManage"></vc:i18n></span></th>
</tr>
</thead>
<tbody>
<tr v-for="listStore in listStoreManageInfo.listStores">
<td class="text-center">{{listStore.name}}</td>
<td class="text-center">{{listStore.address}}</td>
<td class="text-center">{{listStore.tel}}</td>
<td class="text-center">{{listStore.storeTypeName}}</td>
<td class="text-center">{{listStore.artificialPerson}}</td>
<td class="text-center">{{listStore.establishment}}</td>
<td class="text-right">
<div class="btn-group">
<!-- <button class="btn-white btn btn-xs"-->
<!-- v-on:click="_openStoresCommunityModel(listStore)"><span><vc:i18n name="隶属小区" namespace="listStoreManage"></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>
</div>
</div>
<vc:create path="common/storesCommunity"></vc:create>
</div>

View File

@ -1,77 +0,0 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
listStoreManageInfo: {
listStores: [],
total: 0,
records: 1,
moreCondition: false,
conditions: {
name: '',
storeTypeCd: '',
tel: ''
}
}
},
_initMethod: function () {
$that._listListStores(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('listStoreManage', 'listListStore', function (_param) {
$that._listListStores(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
$that._listListStores(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listListStores: function (_page, _rows) {
$that.listStoreManageInfo.conditions.page = _page;
$that.listStoreManageInfo.conditions.row = _rows;
var param = {
params: $that.listStoreManageInfo.conditions
};
//发送get请求
vc.http.apiGet('/store.listStores',
param,
function (json, res) {
var _listStoreManageInfo = JSON.parse(json);
$that.listStoreManageInfo.total = _listStoreManageInfo.total;
$that.listStoreManageInfo.records = _listStoreManageInfo.records;
$that.listStoreManageInfo.listStores = _listStoreManageInfo.data;
vc.emit('pagination', 'init', {
total: $that.listStoreManageInfo.records,
dataCount: $that.listStoreManageInfo.total,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openStoresCommunityModel: function (_listStore) {
vc.emit('storesCommunity','openStoresCommunity', _listStore);
},
_queryListStoreMethod: function () {
$that._listListStores(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if ($that.listStoreManageInfo.moreCondition) {
$that.listStoreManageInfo.moreCondition = false;
} else {
$that.listStoreManageInfo.moreCondition = true;
}
}
}
});
})(window.vc);