From 871122e721db3acf0de1a2becc02b9155193ff2c Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 20 Sep 2023 02:10:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/pages/frame/userLogin/userLogin.html | 189 ++++++++++-------- public/pages/frame/userLogin/userLogin.js | 51 ++++- .../listStoreManage/listStoreManage.js | 30 +-- 3 files changed, 169 insertions(+), 101 deletions(-) diff --git a/public/pages/frame/userLogin/userLogin.html b/public/pages/frame/userLogin/userLogin.html index 5f2ca5d9e..7fc199eff 100644 --- a/public/pages/frame/userLogin/userLogin.html +++ b/public/pages/frame/userLogin/userLogin.html @@ -1,101 +1,126 @@
-
-
-
-
- -
-
- -
+
+
+
+
    + +
  • + {{item.name}}({{item.storeTypeName}}) +
  • +
-
-
+
+
+
+
+
+
+
+
+ +
+
-
-
- -
-
-
-
- -
-
-
-
-
+
+
-
- +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+ +
+
-
-
+
+
+
+
+
+ +
+
-
-
-
-
-
- -
-
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
{{userLogin.loginId}}{{userLogin.parentOrgName || '-'}}{{userLogin.orgName}}{{userLogin.userName}}{{userLogin.loginTime}}{{userLogin.userId}}
+ + +
-
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
{{userLogin.loginId}}{{userLogin.parentOrgName || '-'}}{{userLogin.orgName}}{{userLogin.userName}}{{userLogin.loginTime}}{{userLogin.userId}}
- - - -
diff --git a/public/pages/frame/userLogin/userLogin.js b/public/pages/frame/userLogin/userLogin.js index 9166ab473..73364d6c1 100644 --- a/public/pages/frame/userLogin/userLogin.js +++ b/public/pages/frame/userLogin/userLogin.js @@ -6,15 +6,27 @@ userLoginInfo: { moreCondition: false, logs: [], + stores:[], conditions: { name: '', tel: '', - userLoginId: '' + userLoginId: '', + storeId:'', + startTime:'', + endTime:'' } }, }, _initMethod: function () { - $that.loadData(1, 10); + $that.loadData(1, DEFAULT_ROWS); + $that._listListStores(); + + vc.initDateTime('startTime',function(_value){ + $that.userLoginInfo.conditions.startTime = _value; + }); + vc.initDateTime('endTime',function(_value){ + $that.userLoginInfo.conditions.endTime = _value; + }) }, _initEvent: function () { @@ -60,9 +72,40 @@ }, - _queryuserLoginMethod: function () { + _queryUserLoginMethod: function () { $that.loadData(DEFAULT_PAGE, DEFAULT_ROWS) - } + }, + _listListStores: function (_page, _rows) { + let param = { + params: { + page:1, + row:100 + } + }; + + $that.userLoginInfo.stores = [{ + storeId: '', + name: '全部' + }]; + + //发送get请求 + vc.http.apiGet('/store.listStores', + param, + function (json, res) { + let _json = JSON.parse(json); + _json.data.forEach(item => { + $that.userLoginInfo.stores.push(item); + }); + + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + swatchStore:function(_app){ + $that.userLoginInfo.conditions.storeId = _app.storeId; + $that.loadData(1, DEFAULT_ROWS); + }, }, diff --git a/public/pages/property/listStoreManage/listStoreManage.js b/public/pages/property/listStoreManage/listStoreManage.js index ff1af15b8..0aada0dff 100644 --- a/public/pages/property/listStoreManage/listStoreManage.js +++ b/public/pages/property/listStoreManage/listStoreManage.js @@ -19,23 +19,23 @@ } }, _initMethod: function () { - vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS); + $that._listListStores(DEFAULT_PAGE, DEFAULT_ROWS); }, _initEvent: function () { vc.on('listStoreManage', 'listListStore', function (_param) { - vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS); + $that._listListStores(DEFAULT_PAGE, DEFAULT_ROWS); }); vc.on('pagination', 'page_event', function (_currentPage) { - vc.component._listListStores(_currentPage, DEFAULT_ROWS); + $that._listListStores(_currentPage, DEFAULT_ROWS); }); }, methods: { _listListStores: function (_page, _rows) { - vc.component.listStoreManageInfo.conditions.page = _page; - vc.component.listStoreManageInfo.conditions.row = _rows; + $that.listStoreManageInfo.conditions.page = _page; + $that.listStoreManageInfo.conditions.row = _rows; var param = { - params: vc.component.listStoreManageInfo.conditions + params: $that.listStoreManageInfo.conditions }; //发送get请求 @@ -43,12 +43,12 @@ param, function (json, res) { var _listStoreManageInfo = JSON.parse(json); - vc.component.listStoreManageInfo.total = _listStoreManageInfo.total; - vc.component.listStoreManageInfo.records = _listStoreManageInfo.records; - vc.component.listStoreManageInfo.listStores = _listStoreManageInfo.data; + $that.listStoreManageInfo.total = _listStoreManageInfo.total; + $that.listStoreManageInfo.records = _listStoreManageInfo.records; + $that.listStoreManageInfo.listStores = _listStoreManageInfo.data; vc.emit('pagination', 'init', { - total: vc.component.listStoreManageInfo.records, - dataCount: vc.component.listStoreManageInfo.total, + total: $that.listStoreManageInfo.records, + dataCount: $that.listStoreManageInfo.total, currentPage: _page }); }, function (errInfo, error) { @@ -60,14 +60,14 @@ vc.emit('storesCommunity','openStoresCommunity', _listStore); }, _queryListStoreMethod: function () { - vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS); + $that._listListStores(DEFAULT_PAGE, DEFAULT_ROWS); }, _moreCondition: function () { - if (vc.component.listStoreManageInfo.moreCondition) { - vc.component.listStoreManageInfo.moreCondition = false; + if ($that.listStoreManageInfo.moreCondition) { + $that.listStoreManageInfo.moreCondition = false; } else { - vc.component.listStoreManageInfo.moreCondition = true; + $that.listStoreManageInfo.moreCondition = true; } }