| | |
| | | JSONObject paramObj = JSONObject.parseObject(paramIn); |
| | | |
| | | HttpHeaders header = new HttpHeaders(); |
| | | dataFlowContext.getRequestCurrentHeaders().put(CommonConstant.HTTP_USER_ID, "-1"); |
| | | dataFlowContext.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D"); |
| | | JSONArray businesses = new JSONArray(); |
| | | |
| | |
| | | /** |
| | | * 添加小区楼信息 |
| | | * |
| | | * * name:'', |
| | | * * age:'', |
| | | * * link:'', |
| | | * * sex:'', |
| | | * * remark:'' |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | JSONObject businessOwner = new JSONObject(); |
| | | businessOwner.put("ownerId", paramInJson.getString("ownerId")); |
| | | businessOwner.put("name", paramInJson.getString("name")); |
| | | businessOwner.put("remark", paramInJson.getString("remark")); |
| | | businessOwner.put("userId", paramInJson.getString("userId")); |
| | | businessOwner.put("ownerNum", paramInJson.getString("ownerNum")); |
| | | businessOwner.putAll(paramInJson); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessOwner", businessOwner); |
| | | |
| | | return business; |
| | |
| | | businessCommunityMember.put("communityMemberId", "-1"); |
| | | businessCommunityMember.put("communityId", paramInJson.getString("communityId")); |
| | | businessCommunityMember.put("memberId", paramInJson.getString("ownerId")); |
| | | businessCommunityMember.put("memberTypeCd", CommunityMemberTypeConstant.FLOOR); |
| | | businessCommunityMember.put("memberTypeCd", CommunityMemberTypeConstant.OWNER); |
| | | businessCommunityMember.put("auditStatusCd", StatusConstant.STATUS_CD_AUDIT_COMPLETE); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessCommunityMember", businessCommunityMember); |
| | | |
| | |
| | | /** |
| | | * 数据校验 |
| | | * |
| | | * name:'', |
| | | * age:'', |
| | | * link:'', |
| | | * sex:'', |
| | | * remark:'' |
| | | * |
| | | * @param paramIn "communityId": "7020181217000001", |
| | | * "memberId": "3456789", |
| | | * "memberTypeCd": "390001200001" |
| | |
| | | private void validate(String paramIn) { |
| | | Assert.jsonObjectHaveKey(paramIn, "name", "请求报文中未包含name"); |
| | | Assert.jsonObjectHaveKey(paramIn, "userId", "请求报文中未包含userId"); |
| | | Assert.jsonObjectHaveKey(paramIn, "ownerNum", "请求报文中未包含ownerNum"); |
| | | Assert.jsonObjectHaveKey(paramIn, "age", "请求报文中未包含age"); |
| | | Assert.jsonObjectHaveKey(paramIn, "link", "请求报文中未包含link"); |
| | | Assert.jsonObjectHaveKey(paramIn, "sex", "请求报文中未包含sex"); |
| | | Assert.jsonObjectHaveKey(paramIn, "communityId", "请求报文中未包含communityId"); |
| | | } |
| | | |
| | |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-body"> |
| | | <h3 class="m-t-none m-b ">添加小区楼</h3> |
| | | <h3 class="m-t-none m-b ">添加业主</h3> |
| | | <div class="ibox-content"> |
| | | <div> |
| | | <p style="color:red;">{{addOwnerInfo.errorInfo}}</p> |
| | | <div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">楼名称</label> |
| | | <label class="col-sm-2 col-form-label">名称</label> |
| | | <div class="col-sm-10"><input v-model="addOwnerInfo.name" type="text" placeholder="必填,请填写名称" class="form-control"></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">楼编号</label> |
| | | <div class="col-sm-10"><input v-model="addOwnerInfo.ownerNum" type="email" placeholder="必填,请填写编号" class="form-control"></div> |
| | | <label class="col-sm-2 col-form-label">性别</label> |
| | | <div class="col-sm-10"> |
| | | <select class="custom-select" v-model="addOwnerInfo.sex"> |
| | | <option selected disabled value="">必填,请选择性别</option> |
| | | <option value="0">男</option> |
| | | <option value="1">女</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">年龄</label> |
| | | <div class="col-sm-10"><input v-model="addOwnerInfo.age" type="number" placeholder="必填,请填写年龄" class="form-control"></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">手机</label> |
| | | <div class="col-sm-10"><input v-model="addOwnerInfo.link" type="number" placeholder="必填,请填写联系方式" class="form-control"></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">备注</label> |
| | |
| | | data:{ |
| | | addOwnerInfo:{ |
| | | name:'', |
| | | ownerNum:'', |
| | | remark:'', |
| | | errorInfo:'' |
| | | age:'', |
| | | link:'', |
| | | sex:'', |
| | | remark:'' |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"楼名称不能为空" |
| | | errInfo:"名称不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,10", |
| | | errInfo:"楼名称长度必须在2位至10位" |
| | | errInfo:"名称长度必须在2位至10位" |
| | | }, |
| | | ], |
| | | 'addOwnerInfo.ownerNum':[ |
| | | 'addOwnerInfo.age':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"楼编号不能为空" |
| | | errInfo:"年龄不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"不是有效的数字" |
| | | errInfo:"年龄不是有效的数字" |
| | | }, |
| | | ], |
| | | 'addOwnerInfo.sex':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"性别不能为空" |
| | | } |
| | | ], |
| | | 'addOwnerInfo.link':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"手机号不能为空" |
| | | }, |
| | | { |
| | | limit:"phone", |
| | | param:"", |
| | | errInfo:"不是有效的手机号" |
| | | } |
| | | ], |
| | | 'addOwnerInfo.remark':[ |
| | | |
| | |
| | | }, |
| | | saveOwnerInfo:function(){ |
| | | if(!vc.component.addOwnerValidate()){ |
| | | vc.component.addOwnerInfo.errorInfo = vc.validate.errInfo; |
| | | vc.message(vc.validate.errInfo); |
| | | |
| | | return ; |
| | | } |
| | | |
| | | vc.component.addOwnerInfo.errorInfo = ""; |
| | | |
| | | vc.component.addOwnerInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | vc.http.post( |
| | |
| | | |
| | | return ; |
| | | } |
| | | vc.component.addOwnerInfo.errorInfo = json; |
| | | vc.message(json); |
| | | |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.component.addOwnerInfo.errorInfo = errInfo; |
| | | vc.message(errInfo); |
| | | |
| | | }); |
| | | }, |
| | | clearAddOwnerInfo:function(){ |
| | | vc.component.addOwnerInfo = { |
| | | name:'', |
| | | ownerNum:'', |
| | | remark:'', |
| | | errorInfo:'' |
| | | age:'', |
| | | link:'', |
| | | sex:'', |
| | | remark:'' |
| | | }; |
| | | } |
| | | } |