From d6beaea6b299079410a004a9ee5ba76c549deb62 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 17 Apr 2023 02:36:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=90=9C=E7=B4=A0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/components/frame/nav2/nav2.js | 1 + .../searchCommunityData.html | 155 +++++++++--------- .../searchCommunityData.js | 82 ++++++++- public/css/vc.css | 14 ++ 4 files changed, 167 insertions(+), 85 deletions(-) diff --git a/public/components/frame/nav2/nav2.js b/public/components/frame/nav2/nav2.js index d47492e3b..4392e6144 100755 --- a/public/components/frame/nav2/nav2.js +++ b/public/components/frame/nav2/nav2.js @@ -256,6 +256,7 @@ if (_catalog.url.startsWith('?')) { let _modelName = _catalog.url.substring(1, _catalog.url.length); $('#' + _modelName).modal('show'); + vc.emit(_modelName, '_loadData',{}) return true; } return false; diff --git a/public/components/frame/searchCommunityData/searchCommunityData.html b/public/components/frame/searchCommunityData/searchCommunityData.html index 6271f1a41..b52c52a95 100644 --- a/public/components/frame/searchCommunityData/searchCommunityData.html +++ b/public/components/frame/searchCommunityData/searchCommunityData.html @@ -11,87 +11,90 @@
-
-
-
-
房屋信息:
-
- 1-1-1001 - 1-1-1001 - 1-1-1001 - 1-1-1001 - 1-1-1001 +
+
+
+
+
房屋信息
+ +
+
+
业主信息
+ +
+
+
业主成员
+ +
+
+
小区车辆
+ +
+
+
成员车辆
+ +
+
+
合同
+ +
+
+
报修工单
+ +
+
+
访客
+ +
+
+
员工
+
-
-
业主信息:
-
- 张三 - 李四 - 王五 -
-
-
-
业主成员:
-
- 张三 - 李四 - 王五 -
-
-
-
小区车辆:
- -
-
-
成员车辆:
- -
-
-
合同:
- -
-
-
报修工单:
- -
-
-
访客:
- -
-
-
员工:
- +
+
抱歉,没有数据
diff --git a/public/components/frame/searchCommunityData/searchCommunityData.js b/public/components/frame/searchCommunityData/searchCommunityData.js index d588f0251..c551280d0 100644 --- a/public/components/frame/searchCommunityData/searchCommunityData.js +++ b/public/components/frame/searchCommunityData/searchCommunityData.js @@ -3,27 +3,91 @@ vc.extends({ data: { searchCommunityDataInfo: { - title: '', searchValue:'', - data: {} + rooms:[], + owners:[], + ownerMembers:[], + cars:[], + carMembers:[], + contracts:[], + repairs:[], + visits:[], + staffs:[], + noData:true }, - flagOrgName: false }, _initMethod: function() { }, _initEvent: function() { - vc.on('searchCommunityData', 'openViewDataModal', function(_param) { - $that.searchCommunityDataInfo.title = _param.title; - $that.searchCommunityDataInfo.data = _param.data; - $('#searchCommunityDataModel').modal('show'); + vc.on('searchCommunityDataModel', '_loadData', function(_param) { + $that._clearSearchCommunityData(); + //$('#searchCommunityDataModel').modal('show'); }); }, methods: { _doSearchCommunityData:function(){ - + if (!vc.isNotEmpty($that.searchCommunityDataInfo.searchValue)) { + vc.toast('请输入查询条件'); + return; + } + // 清理信息 + let _param = { + params: { + searchValue: $that.searchCommunityDataInfo.searchValue, + communityId: vc.getCurrentCommunity().communityId + } + } + vc.http.apiGet('/search.searchCommunityData', + _param, + function (json, res) { + let _ownerJson = JSON.parse(json); + if (_ownerJson.code != 0) { + vc.toast(_ownerJson.msg); + return; + } + $that.searchCommunityDataInfo.noData = false; + _ownerJson = _ownerJson.data; + $that.searchCommunityDataInfo.rooms = _ownerJson.rooms; + $that.searchCommunityDataInfo.owners = _ownerJson.owners; + $that.searchCommunityDataInfo.ownerMembers = _ownerJson.ownerMembers; + $that.searchCommunityDataInfo.cars = _ownerJson.cars; + $that.searchCommunityDataInfo.carMembers = _ownerJson.carMembers; + $that.searchCommunityDataInfo.contracts = _ownerJson.contracts; + $that.searchCommunityDataInfo.repairs = _ownerJson.repairs; + $that.searchCommunityDataInfo.visits = _ownerJson.visitDtos; + $that.searchCommunityDataInfo.staffs = _ownerJson.staffs; + }, + function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _toSimplifyAcceptance: function (_room) { + let _date = new Date(); + vc.saveData("JAVA110_IS_BACK", _date.getTime()); + vc.saveData('simplifyAcceptanceSearch', { + searchType: '1', + searchValue: _room.floorNum + "-" + _room.unitNum + "-" + _room.roomNum, + searchPlaceholder: '请输入房屋编号 楼栋-单元-房屋 如1-1-1', + }) + window.open('/#/pages/property/simplifyAcceptance?tab=业务受理'); + }, + _clearSearchCommunityData:function(){ + $that.searchCommunityDataInfo ={ + searchValue:'', + noData:true, + rooms:[], + owners:[], + ownerMembers:[], + cars:[], + carMembers:[], + contracts:[], + repairs:[], + visits:[], + staffs:[], + }; } - } }); diff --git a/public/css/vc.css b/public/css/vc.css index c35641d77..0c8911ff6 100644 --- a/public/css/vc.css +++ b/public/css/vc.css @@ -1019,3 +1019,17 @@ nav-link nav-link-breadcrumb active:active { text-overflow: ellipsis; white-space: normal; } +.vc-search-community-item{ + margin-top: 10px; +} + +.vc-search-community-item .item-title{ + font-size: 16px; +} + +.vc-search-community-item .item-content{ + margin-top:5px; +} +.vc-search-community-item .item-content a{ + margin-right: 10px; +}