| | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息"); |
| | | //Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息"); |
| | | |
| | | } |
| | | |
| | |
| | | storeAttrDto.setStoreIds(getStoreIds(stores)); |
| | | List<StoreAttrDto> storeAttrDtos = storeInnerServiceSMOImpl.getStoreAttrs(storeAttrDto); |
| | | |
| | | for(ApiStoreDataVo storeDataVo : stores){ |
| | | for(StoreAttrDto tmpStoreAttrDto: storeAttrDtos){ |
| | | if(!storeDataVo.getStoreId().equals(tmpStoreAttrDto.getStoreId())){ |
| | | for (ApiStoreDataVo storeDataVo : stores) { |
| | | for (StoreAttrDto tmpStoreAttrDto : storeAttrDtos) { |
| | | if (!storeDataVo.getStoreId().equals(tmpStoreAttrDto.getStoreId())) { |
| | | continue; |
| | | } |
| | | if("100201903001".equals(tmpStoreAttrDto.getSpecCd())){ |
| | | if ("100201903001".equals(tmpStoreAttrDto.getSpecCd())) { |
| | | storeDataVo.setArtificialPerson(tmpStoreAttrDto.getValue()); |
| | | }else if("100201903003".equals(tmpStoreAttrDto.getSpecCd())){ |
| | | } else if ("100201903003".equals(tmpStoreAttrDto.getSpecCd())) { |
| | | storeDataVo.setEstablishment(tmpStoreAttrDto.getValue()); |
| | | }else if("100201903005".equals(tmpStoreAttrDto.getSpecCd())){ |
| | | } else if ("100201903005".equals(tmpStoreAttrDto.getSpecCd())) { |
| | | storeDataVo.setBusinessScope(tmpStoreAttrDto.getValue()); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.community; |
| | | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.community.IListCommunitysSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | | * 小区组件管理类 |
| | | * |
| | | * add by wuxw |
| | | * |
| | | * 2019-06-29 |
| | | */ |
| | | @Component("storesCommunity") |
| | | public class StoresCommunityComponent { |
| | | |
| | | @Autowired |
| | | private IListCommunitysSMO listCommunitysSMOImpl; |
| | | |
| | | /** |
| | | * 查询小区列表 |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> listMyCommunity(IPageData pd){ |
| | | return listCommunitysSMOImpl.listCommunitys(pd); |
| | | } |
| | | |
| | | public IListCommunitysSMO getListCommunitysSMOImpl() { |
| | | return listCommunitysSMOImpl; |
| | | } |
| | | |
| | | public void setListCommunitysSMOImpl(IListCommunitysSMO listCommunitysSMOImpl) { |
| | | this.listCommunitysSMOImpl = listCommunitysSMOImpl; |
| | | } |
| | | } |
| | |
| | | * <p> |
| | | * 2019-06-29 |
| | | */ |
| | | @Component("listStoreManageManage") |
| | | @Component("listStoreManage") |
| | | public class ListStoreManageComponent { |
| | | |
| | | @Autowired |
| | |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ComponentValidateResult result = super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | Map paramMap = BeanConvertUtil.beanCovertMap(result); |
| | | paramIn.putAll(paramMap); |
| | | if(!paramIn.containsKey("storeId")) { |
| | | Map paramMap = BeanConvertUtil.beanCovertMap(result); |
| | | paramIn.putAll(paramMap); |
| | | } |
| | | |
| | | |
| | | if(!StoreTypeConstant.STORE_TYPE_SYSTEM_MANAGER.equals(result.getStoreTypeCd())) { |
| | | paramIn.put("memberId", result.getStoreId()); |
| | | if(!StoreTypeConstant.STORE_TYPE_SYSTEM_MANAGER.equals(result.getStoreTypeCd()) || paramIn.containsKey("storeId")) { |
| | | paramIn.put("memberId", paramIn.getString("storeId")); |
| | | } |
| | | |
| | | String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/community.listCommunitys" + mapToUrlParam(paramIn); |
| | |
| | | throw new IllegalArgumentException("您当前没有权限访问"); |
| | | } |
| | | |
| | | Map paramMap = BeanConvertUtil.beanCovertMap(result); |
| | | paramIn.putAll(paramMap); |
| | | // Map paramMap = BeanConvertUtil.beanCovertMap(result); |
| | | // paramIn.putAll(paramMap); |
| | | |
| | | String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/store.listStores" + mapToUrlParam(paramIn); |
| | | |
| New file |
| | |
| | | <div id = "storesCommunityModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" > |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h3 class="modal-title" id="addPrivilegeModalLabel">商户小区</h3> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class=" row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="row"> |
| | | |
| | | <div class="col-sm-7 m-b-xs"> |
| | | |
| | | </div> |
| | | <div class="col-sm-5"> |
| | | <div class="input-group"> |
| | | <input placeholder="输入小区名称" v-model="storesCommunityInfo.searchCommunityName" type="text" class="form-control form-control-sm"> |
| | | <span class="input-group-append"> |
| | | <button type="button" class="btn btn-sm btn-primary" v-on:click="listMyCommunity(1,10)">查询</button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="table-responsive" style="margin-top:15px"> |
| | | <table class="table table-striped"> |
| | | <thead> |
| | | <tr> |
| | | <th>小区ID</th> |
| | | <th data-hide="phone">名称</th> |
| | | <th data-hide="phone">地址</th> |
| | | <th data-hide="phone">状态</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="community in storesCommunityInfo.communityInfo"> |
| | | <td> |
| | | {{community.communityId}} |
| | | </td> |
| | | <td> |
| | | {{community.name}} |
| | | </td> |
| | | <td> |
| | | {{community.address}} |
| | | </td> |
| | | <td> |
| | | {{community.stateName}} |
| | | </td> |
| | | |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | <vc:create |
| | | name="paginationPlus" |
| | | namespace="storesCommunity" |
| | | ></vc:create> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc){ |
| | | var DEFAULT_PAGE = 1; |
| | | var DEFAULT_ROWS = 10; |
| | | vc.extends({ |
| | | data:{ |
| | | storesCommunityInfo:{ |
| | | communityInfo:[], |
| | | errorInfo:'', |
| | | searchCommunityName:'', |
| | | storeId:'' |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('storesCommunity','openStoresCommunity',function(_params){ |
| | | $('#storesCommunityModel').modal('show'); |
| | | vc.component.storesCommunityInfo.searchCommunityName = ''; |
| | | vc.component.storesCommunityInfo.storeId = _params.storeId; |
| | | vc.component.listMyCommunity(DEFAULT_PAGE,DEFAULT_ROWS); |
| | | }); |
| | | vc.on('storesCommunity','paginationPlus', 'page_event', function (_currentPage) { |
| | | vc.component.listMyCommunity(_currentPage, DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | listMyCommunity:function(_page,_row){ |
| | | var param = { |
| | | params:{ |
| | | communityName:vc.component.storesCommunityInfo.searchCommunityName, |
| | | storeId:vc.component.storesCommunityInfo.storeId, |
| | | page:_page, |
| | | row:_row |
| | | } |
| | | |
| | | } |
| | | //发送get请求 |
| | | vc.http.get('storesCommunity', |
| | | 'listMyCommunity', |
| | | param, |
| | | function(json,res){ |
| | | var _communityInfo =JSON.parse(json); |
| | | vc.component.storesCommunityInfo.communityInfo = _communityInfo.communitys |
| | | vc.emit('storesCommunity','paginationPlus', 'init', { |
| | | total: _communityInfo.records, |
| | | currentPage: _page |
| | | }); |
| | | },function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc); |
| | |
| | | <nav aria-label="Page navigation example" v-if="this.paginationPlusInfo.total != 0"> |
| | | <ul class="pagination justify-content-end"> |
| | | <li class="page-item" v-bind:class="{disabled:this.paginationPlusInfo.currentPage == 1}"> |
| | | <a class="page-link" v-on:click="current(1)"> « </a> |
| | | <a class="page-link" v-on:click="this.current(1)"> « </a> |
| | | </li> |
| | | <li class="page-item" v-bind:class="{disabled:this.paginationPlusInfo.currentPage == 1}"> |
| | | <a class="page-link" v-on:click="previous()"> ‹ </a> |
| | | <a class="page-link" v-on:click="this.previous()"> ‹ </a> |
| | | </li> |
| | | <li class="page-item" v-for="pageInfo in this.paginationPlusInfo.pageList" v-bind:class="{active:pageInfo.currentPage}"> |
| | | <a class="page-link" v-on:click="current(pageInfo.page)">{{pageInfo.pageView}}</a> |
| | | <a class="page-link" v-on:click="this.current(pageInfo.page)">{{pageInfo.pageView}}</a> |
| | | </li> |
| | | <li class="page-item" v-bind:class="{disabled:this.paginationPlusInfo.currentPage == this.paginationPlusInfo.total}"> |
| | | <a class="page-link" v-on:click="next()"> › </a> |
| | | <a class="page-link" v-on:click="this.next()"> › </a> |
| | | </li> |
| | | <li class="page-item" v-bind:class="{disabled:this.paginationPlusInfo.currentPage == this.paginationPlusInfo.total}"> |
| | | <a class="page-link" v-on:click="current(this.paginationPlusInfo.total)"> » </a> |
| | | <a class="page-link" v-on:click="this.current(this.paginationPlusInfo.total)"> » </a> |
| | | </li> |
| | | <span class="total" style="line-height: 30px;margin-left: 10px;" v-if="this.paginationPlusInfo.dataCount != 0">共 {{this.paginationPlusInfo.dataCount}} 条</span> |
| | | </ul> |
| | |
| | | <td class="text-right"> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" |
| | | v-on:click="_openEditListStoreModel(listStore)">隶属小区 |
| | | v-on:click="_openStoresCommunityModel(listStore)">隶属小区 |
| | | </button> |
| | | </div> |
| | | </td> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="storesCommunity"></vc:create> |
| | | |
| | | </div> |
| | |
| | | var _listStoreManageInfo = JSON.parse(json); |
| | | vc.component.listStoreManageInfo.total = _listStoreManageInfo.total; |
| | | vc.component.listStoreManageInfo.records = _listStoreManageInfo.records; |
| | | vc.component.listStoreManageInfo.listStores = _listStoreManageInfo.listStores; |
| | | vc.component.listStoreManageInfo.listStores = _listStoreManageInfo.stores; |
| | | vc.emit('pagination', 'init', { |
| | | total: vc.component.listStoreManageInfo.records, |
| | | currentPage: _page |
| | |
| | | } |
| | | ); |
| | | }, |
| | | _openDeleteListStoreModel: function (_listStore) { |
| | | vc.emit('deleteListStore', 'openDeleteListStoreModal', _listStore); |
| | | _openStoresCommunityModel: function (_listStore) { |
| | | vc.emit('storesCommunity','openStoresCommunity', _listStore); |
| | | }, |
| | | _queryListStoreMethod: function () { |
| | | vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS); |