魏熙美 6 vuotta sitten
vanhempi
commit
f0f5d658ed
21 muutettua tiedostoa jossa 368 lisäystä ja 165 poistoa
  1. 3
    5
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BillController.java
  2. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/WxLoginController.java
  3. 25
    18
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/WxPayController.java
  4. 13
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBillOrder.java
  5. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/WxPayServiceI.java
  6. 24
    9
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java
  7. 9
    5
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  8. 4
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxLoginServiceImpl.java
  9. 64
    18
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxPayServiceImpl.java
  10. 8
    8
      CODE/smart-community/app-api/src/main/resources/application.yml
  11. 19
    4
      CODE/smart-community/app-api/src/main/resources/mapper/TpBillOrderMapper.xml
  12. 21
    3
      CODE/smart-community/community-common/src/main/java/com/community/commom/mode/ResponseBean.java
  13. BIN
      CODE/smart-community/community-common/target/community-common-0.0.1.jar
  14. 1
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivityServiceImpl.java
  15. 4
    4
      VUECODE/smart-property-manage/src/api/billInvoice.js
  16. 7
    0
      VUECODE/smart-property-manage/src/router/index.js
  17. 45
    36
      VUECODE/smart-property-manage/src/views/bill/info/add/index.vue
  18. 49
    40
      VUECODE/smart-property-manage/src/views/bill/info/index.vue
  19. 10
    2
      VUECODE/smart-property-manage/src/views/building/edi/index.vue
  20. 9
    9
      VUECODE/smart-property-manage/src/views/building/index.vue
  21. 51
    0
      VUECODE/smart-property-manage/src/views/building/info/index.vue

+ 3
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BillController.java Näytä tiedosto

@@ -34,21 +34,19 @@ public class BillController extends BaseController {
34 34
 	private BillServiceI billServiceI;
35 35
 	
36 36
 	@ApiOperation(value = "获取本人的收费账单信息(已缴费或未缴费)", notes = "获取本人的收费账单信息(已缴费或未缴费)")
37
-	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
38
-			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "payType", value = "0是未缴费1是已缴费"),
37
+	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "payType", value = "0是未缴费1是已缴费"),
39 38
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
40 39
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
41 40
 			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
42 41
 	})
43 42
 	@RequestMapping(value = "/bills/current_user/{payType}",method = RequestMethod.GET)
44
-	public ResponseBean getBillInvoice(@PathVariable Integer communityId,
45
-									   @PathVariable Integer payType,
43
+	public ResponseBean getBillInvoice(@PathVariable Integer payType,
46 44
 									   @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47 45
 									   @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize, HttpSession session){
48 46
 		UserElement userElement = getUserElement(session);
49 47
 		ResponseBean responseBean = new ResponseBean();
50 48
 
51
-		if (!check(communityId)) {
49
+		if (!check(userElement.getCommunityId())) {
52 50
 			responseBean.addError("小区不存在");
53 51
 			return responseBean;
54 52
 		}

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/WxLoginController.java Näytä tiedosto

@@ -29,7 +29,7 @@ public class WxLoginController {
29 29
 	/**
30 30
 	 * 微信登录
31 31
 	 */
32
-	@RequestMapping("/wxLogin/{wxcode}")
32
+	@RequestMapping(value = "/wxLogin/{wxcode}", method = RequestMethod.POST)
33 33
 	public ResponseBean autoLogin(@PathVariable String wxcode, HttpServletRequest request) {
34 34
 		ResponseBean responseBean = new ResponseBean();
35 35
 		if (StringUtils.isEmpty(wxcode)){

+ 25
- 18
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/WxPayController.java Näytä tiedosto

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.controller;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.constant.Constant;
4 5
 import com.community.commom.mode.ResponseBean;
5 6
 import com.community.commom.redis.RedisTemplate;
@@ -19,19 +20,15 @@ import org.slf4j.Logger;
19 20
 import org.slf4j.LoggerFactory;
20 21
 import org.springframework.beans.factory.annotation.Autowired;
21 22
 import org.springframework.cloud.context.config.annotation.RefreshScope;
22
-import org.springframework.web.bind.annotation.PathVariable;
23
-import org.springframework.web.bind.annotation.RequestMapping;
24
-import org.springframework.web.bind.annotation.RequestMethod;
25
-import org.springframework.web.bind.annotation.RestController;
23
+import org.springframework.web.bind.annotation.*;
26 24
 
27 25
 import javax.servlet.http.HttpServletRequest;
28 26
 import javax.servlet.http.HttpServletResponse;
29 27
 import javax.servlet.http.HttpSession;
30 28
 import java.io.ByteArrayOutputStream;
31 29
 import java.io.InputStream;
32
-import java.util.HashMap;
33
-import java.util.List;
34
-import java.util.Map;
30
+import java.lang.reflect.Type;
31
+import java.util.*;
35 32
 
36 33
 /**
37 34
  * @author FXF
@@ -48,8 +45,10 @@ public class WxPayController {
48 45
 	private WxPayServiceI wxPayService;
49 46
 	
50 47
 	@ApiOperation(value = "统一下单", notes = "统一下单")
51
-	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "billInvoiceId", value = "账单Id"),
52
-			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token") })
48
+	@ApiImplicitParams({
49
+			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "outTradeNo", value = "订单号"),
50
+			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
51
+	})
53 52
 	@RequestMapping(value = "/wxUnifiedOrder/{outTradeNo}",method = RequestMethod.GET)
54 53
 	public ResponseBean wxUnifiedOrder(@PathVariable("outTradeNo") String outTradeNo, HttpSession session){
55 54
 		ResponseBean responseBean = new ResponseBean();
@@ -115,12 +114,15 @@ public class WxPayController {
115 114
 	}
116 115
 	
117 116
 	@ApiOperation(value = "订单查询", notes = "订单查询")
118
-	@RequestMapping(value = "/wxOrderQuery",method = RequestMethod.GET)
119
-	public ResponseBean wxOrderQuery(){
117
+	@ApiImplicitParams({
118
+			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "outTradeNo", value = "订单号")
119
+	})
120
+	@RequestMapping(value = "/wxOrderQuery/{outTradeNo}",method = RequestMethod.GET)
121
+	public ResponseBean wxOrderQuery(@PathVariable("outTradeNo") String outTradeNo){
120 122
 		ResponseBean responseBean = new ResponseBean();
121 123
 		Map<String, String> resp = Maps.newHashMap();
122 124
 		try {
123
-			resp = wxPayService.wxOrderQuery();
125
+			resp = wxPayService.wxOrderQuery(outTradeNo);
124 126
 		} catch (Exception e) {
125 127
 			e.printStackTrace();
126 128
 			responseBean.addError("查询失败");
@@ -131,15 +133,18 @@ public class WxPayController {
131 133
 	}
132 134
 	
133 135
 	@ApiOperation(value = "准备开始支付", notes = "准备开始支付")
134
-	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "billInvoiceId", value = "账单Id"),
135
-			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token") })
136
+	@ApiImplicitParams({
137
+			@ApiImplicitParam(paramType = "body", dataType = "Integer", name = "billInvoiceIdList", value = "账单Id集合"),
138
+			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
139
+	})
136 140
 	@RequestMapping(value = "/wxStartPay",method = RequestMethod.POST)
137
-	public ResponseBean wxStartPay(List<Integer> billInvoiceIdList, HttpSession session){
141
+	public ResponseBean wxStartPay(@RequestBody String billInvoiceIdList, HttpSession session){
138 142
 		ResponseBean responseBean = new ResponseBean();
139 143
 		try {
140 144
 			UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
141
-			String outTradeNo = wxPayService.wxStartPay(billInvoiceIdList, userElement);
145
+			 Integer[] integers = JSONObject.parseArray(billInvoiceIdList).toArray(new Integer[]{});
142 146
 
147
+			String outTradeNo = wxPayService.wxStartPay( Arrays.asList(integers), userElement);
143 148
 			Map<String,Object> resultMap = Maps.newHashMap();
144 149
 			resultMap.put("outTradeNo", outTradeNo);
145 150
 			responseBean.addSuccess(resultMap);
@@ -152,8 +157,10 @@ public class WxPayController {
152 157
 	}
153 158
 	
154 159
 	@ApiOperation(value = "取消支付", notes = "取消支付")
155
-	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "billInvoiceId", value = "账单Id"),
156
-			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token") })
160
+	@ApiImplicitParams({
161
+			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "outTradeNo", value = "订单号"),
162
+			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
163
+	})
157 164
 	@RequestMapping(value = "/wxCancelPay/{outTradeNo}",method = RequestMethod.POST)
158 165
 	public ResponseBean wxCancelPay(@PathVariable("outTradeNo") String outTradeNo, HttpSession session){
159 166
 		ResponseBean responseBean = new ResponseBean();

+ 13
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBillOrder.java Näytä tiedosto

@@ -21,6 +21,11 @@ public class TpBillOrder {
21 21
 
22 22
     private Date updateDate;
23 23
 
24
+    /**
25
+     *  0:未支付  1: 已支付 2: 正在支付中
26
+     */
27
+    private String orderStatus;
28
+
24 29
     public Integer getId() {
25 30
         return id;
26 31
     }
@@ -92,4 +97,12 @@ public class TpBillOrder {
92 97
     public void setUpdateDate(Date updateDate) {
93 98
         this.updateDate = updateDate;
94 99
     }
100
+
101
+    public String getOrderStatus() {
102
+        return orderStatus;
103
+    }
104
+
105
+    public void setOrderStatus(String orderStatus) {
106
+        this.orderStatus = orderStatus;
107
+    }
95 108
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/WxPayServiceI.java Näytä tiedosto

@@ -25,7 +25,7 @@ public interface WxPayServiceI {
25 25
 	 * 订单查询
26 26
 	 * @return
27 27
 	 */
28
-	Map<String, String> wxOrderQuery() throws Exception;
28
+	Map<String, String> wxOrderQuery(String outTradeNo) throws Exception;
29 29
 	
30 30
 	/**
31 31
 	 * 准备支付

+ 24
- 9
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java Näytä tiedosto

@@ -1,13 +1,11 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3 3
 import com.community.commom.session.UserElement;
4
-import com.community.huiju.dao.TaSysRoleMapper;
5
-import com.community.huiju.dao.TaUserMapper;
6
-import com.community.huiju.dao.TaUserVerifyMapper;
7
-import com.community.huiju.dao.TpBillInvoiceMapper;
4
+import com.community.huiju.dao.*;
8 5
 import com.community.huiju.model.TaSysRole;
9 6
 import com.community.huiju.model.TaUser;
10 7
 import com.community.huiju.model.TaUserVerify;
8
+import com.community.huiju.model.TpBuildingOwnerInfo;
11 9
 import com.community.huiju.service.BillServiceI;
12 10
 import com.github.pagehelper.Page;
13 11
 import com.github.pagehelper.PageHelper;
@@ -36,6 +34,9 @@ public class BillServiceImpl implements BillServiceI {
36 34
 
37 35
 	@Autowired
38 36
 	private TaUserVerifyMapper taUserVerifyMapper;
37
+
38
+	@Autowired
39
+	private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
39 40
 	
40 41
 	/**
41 42
 	 * 根据payType分页获取缴费或未缴费的数据
@@ -47,16 +48,30 @@ public class BillServiceImpl implements BillServiceI {
47 48
 	 */
48 49
 	@Override
49 50
 	public Map<String, Object> getBillsList(UserElement userElement, Integer payType, Integer pageNum, Integer pageSize) {
50
-		//使用分页插件
51
-		Page<Map<String,Object>> page = PageHelper.startPage(pageNum, pageSize);
51
+
52 52
 
53 53
 		/**
54
-		 * 账单 关联的是房产, 查询 审核表, 审核表里面的 roomNoId 就是楼栋资料库的id
54
+		 * 账单 关联的是房产,
55 55
  		 */
56 56
 
57
-		TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
57
+		/**
58
+		 * 获取这个房产的业主
59
+		 */
58 60
 
59
-		List<Map<String,Object>> billsList = tpBillInvoiceMapper.getBillsList(userElement.getCommunityId(), userVerify.getRoomNoId(), payType);
61
+		TaUserVerify userVerify = taUserVerifyMapper.selectCommunityAndAddressAndRoleId(userElement.getCommunityId(),
62
+										userElement.getPhaseId(), userElement.getBuildingId(), userElement.getUnitId(),
63
+										userElement.getLevelId(), userElement.getRoomNoId());
64
+		// 业主信息
65
+		TaUser user = taUserMapper.selectByPrimaryKey(userVerify.getUserId());
66
+
67
+		TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityAndAddressAndPhone(userElement.getCommunityId(),
68
+				userElement.getPhaseId(), userElement.getBuildingId(), userElement.getUnitId(),
69
+				userElement.getLevelId(), userElement.getRoomNoId(), user.getLoginName());
70
+
71
+
72
+		//使用分页插件
73
+		Page<Map<String,Object>> page = PageHelper.startPage(pageNum, pageSize);
74
+		List<Map<String,Object>> billsList = tpBillInvoiceMapper.getBillsList(userElement.getCommunityId(), tpBuildingOwnerInfo.getId(), payType);
60 75
 		billsList.forEach(e-> {
61 76
 			String payPrice = String.valueOf(e.get("payPrice"));
62 77
 			Double payPriceDouble = Double.parseDouble(payPrice) / 100;

+ 9
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Näytä tiedosto

@@ -13,6 +13,7 @@ import com.community.huiju.common.code.ICode;
13 13
 import com.community.huiju.common.code.cache.AppkeyCache;
14 14
 import com.community.huiju.common.hk.HKConstant;
15 15
 import com.community.huiju.common.hk.HKOpenApi;
16
+import com.community.huiju.common.perproties.LoginCodePerproties;
16 17
 import com.community.huiju.common.welcome.OkHttpRequestUtils;
17 18
 import com.community.huiju.common.welcome.WelcomeProperties;
18 19
 import com.community.huiju.dao.*;
@@ -100,6 +101,9 @@ public class TaUserServiceImpl implements ITaUserService {
100 101
     @Autowired
101 102
     private TaUserVerifyMapper taUserVerifyMapper;
102 103
 
104
+    @Autowired
105
+    private LoginCodePerproties loginCodePerproties;
106
+
103 107
     @Override
104 108
     @Transactional(rollbackFor = Exception.class)
105 109
     public ResponseBean login(String loginName, String code) {
@@ -110,7 +114,7 @@ public class TaUserServiceImpl implements ITaUserService {
110 114
 
111 115
         TaUser currentUser = hasUserPhone(loginName);
112 116
         if (null == currentUser) {
113
-            response.addError("未注册,请先注册");
117
+            response.addError("未注册,请先注册", loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_UNREGISTERED.getCode()));
114 118
             return response;
115 119
         }
116 120
 
@@ -189,7 +193,7 @@ public class TaUserServiceImpl implements ITaUserService {
189 193
         List<TaUserVerify> taUserVerifies = taUserVerifyMapper.selectByUserId(currentUser.getId());
190 194
         // 无关联房产
191 195
         if (null == taUserVerifies || taUserVerifies.size() == 0) {
192
-            response.addSuccess(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getCode(), UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getMsg(), taUserVO);
196
+            response.addSuccess(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_AUDIT_REAL_ESTATE.getCode()));
193 197
             return response;
194 198
         }
195 199
 
@@ -204,7 +208,7 @@ public class TaUserServiceImpl implements ITaUserService {
204 208
 
205 209
             return checkHouse(response, taUserVO, userVerify);
206 210
         } else if (taUserVerifies.size() >= 2) {
207
-            response.addSuccess(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getCode(), taUserVO);
211
+            response.addSuccess(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.A_MULTIPLE_REAL_ESTATE.getCode()));
208 212
             return response;
209 213
         }
210 214
 
@@ -1036,12 +1040,12 @@ public class TaUserServiceImpl implements ITaUserService {
1036 1040
             TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
1037 1041
             taUserVO.setRole(taSysRole.getRoleName());
1038 1042
 
1039
-            responseBean.addSuccess(UserVerifyEnum.A_AUDIT_REAL_ESTATE.getCode(), taUserVO);
1043
+            responseBean.addSuccess(UserVerifyEnum.A_AUDIT_REAL_ESTATE.getMsg(), taUserVO, loginCodePerproties.getLoginCode().get(UserVerifyEnum.A_AUDIT_REAL_ESTATE.getCode()));
1040 1044
             return responseBean;
1041 1045
         }
1042 1046
         String resultCode = "0".equals(verifyStatus) ? UserVerifyEnum.A_TO_AUDIT_REAL_ESTATE.getCode() :
1043 1047
                 "2".equals(verifyStatus) ? UserVerifyEnum.A_AUDIT_FAILED_REAL_ESTATE.getCode() : "500";
1044
-        responseBean.addSuccess(resultCode, UserVerifyEnum.getMsg(resultCode), taUserVO);
1048
+        responseBean.addSuccess(UserVerifyEnum.getMsg(resultCode), taUserVO, loginCodePerproties.getLoginCode().get(resultCode));
1045 1049
         return responseBean;
1046 1050
     }
1047 1051
 

+ 4
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxLoginServiceImpl.java Näytä tiedosto

@@ -3,6 +3,7 @@ package com.community.huiju.service.impl;
3 3
 import com.alibaba.fastjson.JSONObject;
4 4
 import com.community.commom.mode.ResponseBean;
5 5
 import com.community.huiju.common.code.ICode;
6
+import com.community.huiju.common.perproties.LoginCodePerproties;
6 7
 import com.community.huiju.dao.TaUserMapper;
7 8
 import com.community.huiju.enums.UserVerifyEnum;
8 9
 import com.community.huiju.model.TaUser;
@@ -45,6 +46,8 @@ public class WxLoginServiceImpl implements WxLoginServiceI {
45 46
 	@Qualifier("phoneCodeImpl")
46 47
 	private ICode iCode;
47 48
 
49
+	@Autowired
50
+	private LoginCodePerproties loginCodePerproties;
48 51
 	
49 52
 	@Override
50 53
 	public ResponseBean getOpenidByWxcode(String wxcode) {
@@ -69,7 +72,7 @@ public class WxLoginServiceImpl implements WxLoginServiceI {
69 72
 			result.put("userInfo", userInfo);
70 73
 			result.put("openid", openId);
71 74
 
72
-			responseBean.addSuccess(UserVerifyEnum.NO_ACCOUNT.getCode(), UserVerifyEnum.NO_ACCOUNT.getMsg(), result);
75
+			responseBean.addSuccess(UserVerifyEnum.NO_ACCOUNT.getMsg(), result, loginCodePerproties.getLoginCode().get(UserVerifyEnum.NO_ACCOUNT.getCode()));
73 76
 			return responseBean;
74 77
 		}
75 78
 

+ 64
- 18
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxPayServiceImpl.java Näytä tiedosto

@@ -52,6 +52,12 @@ public class WxPayServiceImpl implements WxPayServiceI {
52 52
 	@Autowired
53 53
 	private TpBillOrderMapper tpBillOrderMapper;
54 54
 
55
+	@Autowired
56
+	private TaUserVerifyMapper taUserVerifyMapper;
57
+
58
+	@Autowired
59
+	private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
60
+
55 61
 	/**
56 62
 	 * 微信支付统一下单
57 63
 	 *
@@ -106,6 +112,16 @@ public class WxPayServiceImpl implements WxPayServiceI {
106 112
 		secondSignData.put("timestamp", String.valueOf(timestamp));
107 113
 		secondSignData.put("package", "Sign=WXPay");
108 114
 		secondSignData.put("sign", WXPayUtil.generateSignature(secondSignData, config.getKey(), WXPayConstants.SignType.MD5));
115
+
116
+		log.info("订单: {}, 状态变更为正在支付", orderNo);
117
+
118
+		// 更改订单状态 为正在支付
119
+		List<TpBillOrder> billOrders = tpBillOrderMapper.selectByOrderBumber(orderNo);
120
+		billOrders.forEach(e-> {
121
+			e.setOrderStatus("3");
122
+			tpBillOrderMapper.updateByPrimaryKeySelective(e);
123
+		});
124
+
109 125
 		return secondSignData;
110 126
 	}
111 127
 	
@@ -128,9 +144,6 @@ public class WxPayServiceImpl implements WxPayServiceI {
128 144
 
129 145
 		for ( TpBillOrder billOrder : billOrderList){
130 146
 			TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByPrimaryKey(billOrder.getTpBillInvoiceId());
131
-			if (!tpBillInvoice.getBillStatus().equals("3")){
132
-				return "订单状态出错";
133
-			}
134 147
 
135 148
 			// 更新为正在支付状态
136 149
 			// 更改收费单的 缴费时间, 修改人, 修改时间
@@ -169,15 +182,24 @@ public class WxPayServiceImpl implements WxPayServiceI {
169 182
 			tpBillMapper.updateByPrimaryKeySelective(tpBill);
170 183
 
171 184
 			// 把相对应的APP端, 代办消息设置为无效
172
-			Map<String, Object> map = Maps.newHashMap();
173
-			map.put("communityId", tpBillInvoice.getCommunityId());
174
-			map.put("billInvoiceId", tpBillInvoice.getId());
175
-			map.put("userId", tpBillInvoice.getTaUserId());
176
-			TpMessage tpMessage = tpMessageMapper.selectBillinvoiceMessage(map);
177
-			tpMessage.setStatus("0");
178
-			tpMessageMapper.updateByPrimaryKeySelective(tpMessage);
185
+//			Map<String, Object> map = Maps.newHashMap();
186
+//			map.put("communityId", tpBillInvoice.getCommunityId());
187
+//			map.put("billInvoiceId", tpBillInvoice.getId());
188
+//			map.put("userId", tpBillInvoice.getTaUserId());
189
+//			TpMessage tpMessage = tpMessageMapper.selectBillinvoiceMessage(map);
190
+//			tpMessage.setStatus("0");
191
+//			tpMessageMapper.updateByPrimaryKeySelective(tpMessage);
179 192
 		}
180 193
 
194
+		log.info("订单: {}, 状态变更为支付成功", outTradeNo);
195
+
196
+		// 更改订单状态 为支付成功
197
+		List<TpBillOrder> billOrders = tpBillOrderMapper.selectByOrderBumber(outTradeNo);
198
+		billOrders.forEach(e-> {
199
+			e.setOrderStatus("1");
200
+			tpBillOrderMapper.updateByPrimaryKeySelective(e);
201
+		});
202
+
181 203
 		return "success";
182 204
 	}
183 205
 	
@@ -187,12 +209,12 @@ public class WxPayServiceImpl implements WxPayServiceI {
187 209
 	 * @return
188 210
 	 */
189 211
 	@Override
190
-	public Map<String, String> wxOrderQuery() throws Exception {
212
+	public Map<String, String> wxOrderQuery(String outTradeNo) throws Exception {
191 213
 		HfWxConfig config = new HfWxConfig();
192 214
 		WXPay wxpay = new WXPay(config);
193 215
 		
194 216
 		Map<String, String> data = new HashMap<String, String>();
195
-		data.put("out_trade_no", "2019021910595900000012");
217
+		data.put("out_trade_no", outTradeNo);
196 218
 		return wxpay.orderQuery(data);
197 219
 	}
198 220
 	
@@ -202,14 +224,29 @@ public class WxPayServiceImpl implements WxPayServiceI {
202 224
 
203 225
 		// 如果是家属/租客, 应该用业主的用户id
204 226
 		TaUser taUser = taUserMapper.selectByPrimaryKey(userElement.getId());
227
+
205 228
 		List<TpBillOrder> billOrderList = Lists.newArrayList();
206 229
 
207 230
 		Random random = new Random();
208 231
 		String orderNo = String.valueOf(System.currentTimeMillis()) + random.nextInt();
209 232
 
233
+		/**
234
+		 * 获取这个房产的业主
235
+		 */
236
+
237
+		TaUserVerify userVerify = taUserVerifyMapper.selectCommunityAndAddressAndRoleId(userElement.getCommunityId(),
238
+				userElement.getPhaseId(), userElement.getBuildingId(), userElement.getUnitId(),
239
+				userElement.getLevelId(), userElement.getRoomNoId());
240
+		// 业主信息
241
+		TaUser user = taUserMapper.selectByPrimaryKey(userVerify.getUserId());
242
+
243
+		TpBuildingOwnerInfo tpBuildingOwnerInfo = tpBuildingOwnerInfoMapper.selectCommunityAndAddressAndPhone(userElement.getCommunityId(),
244
+				userElement.getPhaseId(), userElement.getBuildingId(), userElement.getUnitId(),
245
+				userElement.getLevelId(), userElement.getRoomNoId(), user.getLoginName());
246
+
210 247
 		//获取支付金额
211 248
 		for (Integer billInvoiceId : billInvoiceIdArray) {
212
-			TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByIdAndBuildingOwnerInfoId(billInvoiceId,userElement.getRoomNoId(),userElement.getCommunityId());
249
+			TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByIdAndBuildingOwnerInfoId(billInvoiceId,tpBuildingOwnerInfo.getId(),userElement.getCommunityId());
213 250
 			if (null == tpBillInvoice){
214 251
 				throw new Exception("订单不存在");
215 252
 			}else if (!tpBillInvoice.getBillStatus().equals("0")){
@@ -226,15 +263,16 @@ public class WxPayServiceImpl implements WxPayServiceI {
226 263
 			tpBillOrder.setUpdateUser(userElement.getId());
227 264
 			tpBillOrder.setOrderBumber(orderNo);
228 265
 
229
-			billOrderList.add(tpBillOrder);
230
-		}
266
+			tpBillOrderMapper.insertSelective(tpBillOrder);
231 267
 
268
+			// billOrderList.add(tpBillOrder);
269
+		}
232 270
 
233
-		//更新为正在支付状态
234
-		updateBillInvoiceBillStatus(billInvoiceIdArray, taUser.getUserName(),"3");
271
+		// 修改缴费人
272
+		// updateBillInvoiceBillStatus(billInvoiceIdArray, user.getUserName(), "1");
235 273
 
236 274
 		// 生成缴费订单
237
-		tpBillOrderMapper.batchInsertSelective(billOrderList);
275
+		// tpBillOrderMapper.batchInsertSelective(billOrderList);
238 276
 
239 277
 		return orderNo;
240 278
 	}
@@ -283,6 +321,14 @@ public class WxPayServiceImpl implements WxPayServiceI {
283 321
 
284 322
 		//更新为正在支付状态
285 323
 		updateBillInvoiceBillStatus(billInvoiceIdList,"0");
324
+		log.info("订单: {}, 状态变更为取消支付", outTradeNo);
325
+
326
+		// 更改订单状态 为支付成功
327
+		List<TpBillOrder> billOrders = tpBillOrderMapper.selectByOrderBumber(outTradeNo);
328
+		billOrders.forEach(e-> {
329
+			e.setOrderStatus("0");
330
+			tpBillOrderMapper.updateByPrimaryKeySelective(e);
331
+		});
286 332
 	}
287 333
 	
288 334
 	/**

+ 8
- 8
CODE/smart-community/app-api/src/main/resources/application.yml Näytä tiedosto

@@ -32,11 +32,11 @@ welcome:
32 32
 # 登陆的状态跳转url配置
33 33
 login-code-perproties:
34 34
   login-code:
35
-    1000: url # 无关联房产
36
-    1001: url # 关联一个审核通过的房产
37
-    1002: url # 关联一个待审核房产
38
-    1003: url # 关联一个审核未通过房产
39
-    1004: url  # 有多个关联房产
40
-    1005: url # 该房产,暂无审核通过的业主!
41
-    1006: url # 无关联账号!
42
-    1007: url # 未注册!
35
+    1000: /linkBuilding?from=index # 无关联房产
36
+    1001: index  # 关联一个审核通过的房产
37
+    1002: /linkBuildingState?from=index # 关联一个待审核房产
38
+    1003: /linkBuildingState?from=index # 关联一个审核未通过房产
39
+    1004:    # 有多个关联房产
40
+    1005:    # 该房产,暂无审核通过的业主!关联房产的时候,验证是否可以选择业主进行绑定
41
+    1006: /linkWeChat?from=index # 无关联账号!社交授权登录的时候
42
+    1007: /register?from=index # 未注册!社交授权登录 关联手机号账号未注册

+ 19
- 4
CODE/smart-community/app-api/src/main/resources/mapper/TpBillOrderMapper.xml Näytä tiedosto

@@ -11,10 +11,11 @@
11 11
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
12 12
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
13 13
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
14
+    <result column="order_status" property="orderStatus" jdbcType="VARCHAR" />
14 15
   </resultMap>
15 16
   <sql id="Base_Column_List" >
16 17
     id, community_id, tp_bill_id, tp_bill_invoice_id, order_bumber, create_user, create_date, 
17
-    update_user, update_date
18
+    update_user, update_date, order_status
18 19
   </sql>
19 20
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
20 21
     select 
@@ -29,11 +30,12 @@
29 30
   <insert id="insert" parameterType="com.community.huiju.model.TpBillOrder" >
30 31
     insert into tp_bill_order (id, community_id, tp_bill_id, 
31 32
       tp_bill_invoice_id, order_bumber, create_user, 
32
-      create_date, update_user, update_date
33
+      create_date, update_user, update_date, order_status
33 34
       )
34 35
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{tpBillId,jdbcType=INTEGER}, 
35 36
       #{tpBillInvoiceId,jdbcType=INTEGER}, #{orderBumber,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, 
36
-      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
37
+      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP},
38
+      #{orderStatus,jdbcType=VARCHAR}
37 39
       )
38 40
   </insert>
39 41
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpBillOrder" >
@@ -66,6 +68,9 @@
66 68
       <if test="updateDate != null" >
67 69
         update_date,
68 70
       </if>
71
+      <if test="orderStatus != null">
72
+        order_status,
73
+      </if>
69 74
     </trim>
70 75
     <trim prefix="values (" suffix=")" suffixOverrides="," >
71 76
       <if test="id != null" >
@@ -95,6 +100,9 @@
95 100
       <if test="updateDate != null" >
96 101
         #{updateDate,jdbcType=TIMESTAMP},
97 102
       </if>
103
+      <if test="orderStatus != null">
104
+        #{orderStatus,jdbcType=VARCHAR},
105
+      </if>
98 106
     </trim>
99 107
   </insert>
100 108
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBillOrder" >
@@ -124,6 +132,9 @@
124 132
       <if test="updateDate != null" >
125 133
         update_date = #{updateDate,jdbcType=TIMESTAMP},
126 134
       </if>
135
+      <if test="orderStatus != null">
136
+        order_status = #{orderStatus,jdbcType=VARCHAR}
137
+      </if>
127 138
     </set>
128 139
     where id = #{id,jdbcType=INTEGER}
129 140
   </update>
@@ -136,7 +147,8 @@
136 147
       create_user = #{createUser,jdbcType=INTEGER},
137 148
       create_date = #{createDate,jdbcType=TIMESTAMP},
138 149
       update_user = #{updateUser,jdbcType=INTEGER},
139
-      update_date = #{updateDate,jdbcType=TIMESTAMP}
150
+      update_date = #{updateDate,jdbcType=TIMESTAMP},
151
+      order_status = #{orderStatus,jdbcType=VARCHAR}
140 152
     where id = #{id,jdbcType=INTEGER}
141 153
   </update>
142 154
 
@@ -172,6 +184,9 @@
172 184
         <if test="item.updateDate != null" >
173 185
           #{item.updateDate,jdbcType=TIMESTAMP},
174 186
         </if>
187
+        <if test="orderStatus != null">
188
+          order_status = #{orderStatus,jdbcType=VARCHAR},
189
+        </if>
175 190
       </trim>
176 191
     </foreach>
177 192
   </insert>

+ 21
- 3
CODE/smart-community/community-common/src/main/java/com/community/commom/mode/ResponseBean.java Näytä tiedosto

@@ -18,6 +18,8 @@ public class ResponseBean<T> implements Serializable {
18 18
 
19 19
     private T data;
20 20
 
21
+    private String url;
22
+
21 23
     public ResponseBean() {
22 24
     }
23 25
 
@@ -31,9 +33,10 @@ public class ResponseBean<T> implements Serializable {
31 33
         this.message = message;
32 34
     }
33 35
 
34
-    public void addError(String code, String message) {
35
-        this.code = code;
36
+    public void addError(String message, String url) {
37
+        this.code = "1";
36 38
         this.message = message;
39
+        this.url = url;
37 40
     }
38 41
 
39 42
     public void addSuccess(String message) {
@@ -53,6 +56,13 @@ public class ResponseBean<T> implements Serializable {
53 56
         this.data = data;
54 57
     }
55 58
 
59
+    public void addSuccess(String message, T data, String url) {
60
+        this.code = "0";
61
+        this.message = message;
62
+        this.data = data;
63
+        this.url = url;
64
+    }
65
+
56 66
     public void addSuccess(T data) {
57 67
         this.code = "0";
58 68
         this.message = "成功";
@@ -73,6 +83,14 @@ public class ResponseBean<T> implements Serializable {
73 83
 
74 84
     @Override
75 85
     public String toString() {
76
-        return "ResponseBaseBean [code=" + this.code + ", message=" + this.message + ", data=" + this.data + "]";
86
+        return "ResponseBaseBean [code=" + this.code + ", message=" + this.message + ", data=" + this.data + ", url=" + url + "]";
87
+    }
88
+
89
+    public String getUrl() {
90
+        return url;
91
+    }
92
+
93
+    public void setUrl(String url) {
94
+        this.url = url;
77 95
     }
78 96
 }

BIN
CODE/smart-community/community-common/target/community-common-0.0.1.jar Näytä tiedosto


+ 1
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpActivityServiceImpl.java Näytä tiedosto

@@ -237,7 +237,7 @@ public class TpActivityServiceImpl extends ServiceImpl<TpActivityMapper, TpActiv
237 237
 
238 238
                 if (radio==1){
239 239
                     try {
240
-                       InputStream inputStream= QRCode.encode(tpActivity.getId()+"");
240
+                       InputStream inputStream= QRCode.encode(qrCodePerproties.getUrl(),tpActivity.getId()+"");
241 241
                         String codeUrl= imageServiceI.getImageUrl(inputStream);
242 242
                         TdImages tdImages= new TdImages();
243 243
                         tdImages.setImageUrl(codeUrl);

+ 4
- 4
VUECODE/smart-property-manage/src/api/billInvoice.js Näytä tiedosto

@@ -67,10 +67,10 @@ export function addTempBillInvoice(data) {
67 67
     method: 'post',
68 68
     data: {
69 69
       billId: data.billId, //  收费项id
70
-      phase: data.phase, // 期/区
71
-      building: data.building, // 栋
72
-      unit: data.unit, // 单元
73
-      roomNo: data.roomNo, // 户号
70
+      phase: data.phaseId, // 期/区
71
+      building: data.buildingId, // 栋
72
+      unit: data.unitId, // 单元
73
+      roomNo: data.roomNoId, // 户号
74 74
       worthOf: data.worthOf, // 催缴日期
75 75
       billInvoiceExplain: data.billInvoiceExplain, // 收费单说明
76 76
       payPrice: data.payPrice // 收费金额

+ 7
- 0
VUECODE/smart-property-manage/src/router/index.js Näytä tiedosto

@@ -49,6 +49,13 @@ export const constantRouterMap = [
49 49
         name: 'building-index',
50 50
         meta: { title: '楼栋业主资料库', icon: 'building' }
51 51
       },
52
+      {
53
+        path: '/building/info/index',
54
+        component: () => import('@/views/building/info/index'),
55
+        name: 'building-info-index',
56
+        hidden: true,
57
+        meta: { title: '楼栋业主资料库详情', icon: 'building' }
58
+      },
52 59
       {
53 60
         path: '/building/buildingdata/edibuildingdata',
54 61
         component: () => import('@/views/building/buildingdata/edibuildingdata'),

+ 45
- 36
VUECODE/smart-property-manage/src/views/bill/info/add/index.vue Näytä tiedosto

@@ -2,33 +2,41 @@
2 2
   <div id="root">
3 3
     <el-form :model="formInline" inline="true" class="demo-form-inline">
4 4
       <el-form-item label="选择房子">
5
-        <el-select v-model="formInline.phase" placeholder="请选择期" @change="buildSelectChange(0)">
5
+        <el-select v-model="formInline.phaseId" placeholder="请选择期" @change="buildSelectChange(0)">
6 6
           <el-option
7 7
             v-for="item in phaseList"
8 8
             :key="item.id"
9
-            :label="item.phase"
10
-            :value="item.phase"/>
9
+            :label="item.name"
10
+            :value="item.id"/>
11 11
         </el-select>
12
-        <el-select v-model="formInline.building" placeholder="请选择栋" @change="buildSelectChange(1)">
12
+        <el-select v-model="formInline.buildingId" placeholder="请选择栋" @change="buildSelectChange(1)">
13 13
           <el-option
14 14
             v-for="item in buildingList"
15 15
             :key="item.id"
16
-            :label="item.building"
17
-            :value="item.building"/>
16
+            :label="item.name"
17
+            :value="item.id"/>
18 18
         </el-select>
19
-        <el-select v-model="formInline.unit" placeholder="请选择单元" @change="buildSelectChange(3)">
19
+        <el-select v-model="formInline.unitId" placeholder="请选择单元" @change="buildSelectChange(2)">
20 20
           <el-option
21 21
             v-for="item in unitList"
22 22
             :key="item.id"
23
-            :label="item.unit"
24
-            :value="item.unit"/>
23
+            :label="item.name"
24
+            :value="item.id"/>
25 25
         </el-select>
26
-        <el-select v-model="formInline.roomNo" placeholder="请选择户">
26
+        <el-select v-model="formInline.levelId" placeholder="楼层" @change="buildSelectChange(3)">
27
+          <!--<el-option label="选择楼层" value="-1" />-->
28
+          <el-option
29
+            v-for="item in levelList"
30
+            :key="item.id"
31
+            :label="item.name"
32
+            :value="item.id"/>
33
+        </el-select>
34
+        <el-select v-model="formInline.roomNoId" placeholder="请选择户">
27 35
           <el-option
28 36
             v-for="item in roomNoList"
29 37
             :key="item.id"
30
-            :label="item.roomNo"
31
-            :value="item.roomNo"/>
38
+            :label="item.name"
39
+            :value="item.id"/>
32 40
         </el-select>
33 41
       </el-form-item>
34 42
       <br>
@@ -95,10 +103,11 @@ export default {
95 103
     return {
96 104
       formInline: {
97 105
         billId: '', //  收费项id
98
-        phase: '', // 期/区
99
-        building: '', // 栋
100
-        unit: '', // 单元
101
-        roomNo: '', // 户号
106
+        phaseId: '',
107
+        buildingId: '',
108
+        unitId: '',
109
+        levelId: '',
110
+        roomNoId: '',
102 111
         worthOf: '', // 催缴日期
103 112
         billInvoiceExplain: '', // 收费单说明
104 113
         payPrice: '' // 收费金额
@@ -198,40 +207,40 @@ export default {
198 207
       })
199 208
     },
200 209
     getPhase() { // 获取期
201
-      this.formInline.phase = ''
202
-      this.$store.dispatch('BuildingAddress', this.formInline).then((res) => {
210
+      this.formInline.phaseId = ''
211
+      this.$store.dispatch('GetPhaseList', this.formInline).then((res) => {
203 212
         this.phaseList = res.data
204 213
       }).catch(() => {
205 214
         console.log('error phase BuildingAddress')
206 215
       })
207 216
     },
208 217
     getBuild() { // 获取楼栋
209
-      this.formInline.building = ''
210
-      this.$store.dispatch('BuildingAddress', this.formInline).then((res) => {
218
+      this.formInline.buildingId = ''
219
+      this.$store.dispatch('GetBuildingList', this.formInline).then((res) => {
211 220
         this.buildingList = res.data
212 221
       }).catch(() => {
213 222
         console.log('error building BuildingAddress')
214 223
       })
215 224
     },
216 225
     getUnit() { // 获取单元
217
-      this.formInline.unit = ''
218
-      this.$store.dispatch('BuildingAddress', this.formInline).then((res) => {
226
+      this.formInline.unitId = ''
227
+      this.$store.dispatch('GetUnitList', this.formInline).then((res) => {
219 228
         this.unitList = res.data
220 229
       }).catch(() => {
221 230
         console.log('error unit BuildingAddress')
222 231
       })
223 232
     },
224 233
     getLevel() { // 获取楼层
225
-      this.formInline.level = ''
226
-      this.$store.dispatch('BuildingAddress', this.formInline).then((res) => {
234
+      this.formInline.levelId = ''
235
+      this.$store.dispatch('GetLevelList', this.formInline).then((res) => {
227 236
         this.levelList = res.data
228 237
       }).catch(() => {
229 238
         console.log('error level BuildingAddress')
230 239
       })
231 240
     },
232 241
     getRoomNo() { // 获取户号
233
-      this.formInline.roomNo = ''
234
-      this.$store.dispatch('BuildingAddress', this.formInline).then((res) => {
242
+      this.formInline.roomNoId = ''
243
+      this.$store.dispatch('GetRoomNoList', this.formInline).then((res) => {
235 244
         this.roomNoList = res.data
236 245
       }).catch(() => {
237 246
         console.log('error roomNo BuildingAddress')
@@ -244,31 +253,31 @@ export default {
244 253
           this.unitList = []
245 254
           this.levelList = []
246 255
           this.roomNoList = []
247
-          this.formInline.building = ''
248
-          this.formInline.unit = ''
249
-          this.formInline.level = ''
250
-          this.formInline.roomNo = ''
256
+          this.formInline.buildingId = ''
257
+          this.formInline.unitId = ''
258
+          this.formInline.levelId = ''
259
+          this.formInline.roomNoId = ''
251 260
           this.getBuild()
252 261
           break
253 262
         case 1: // 查询 单元
254 263
           this.unitList = []
255 264
           this.levelList = []
256 265
           this.roomNoList = []
257
-          this.formInline.unit = ''
258
-          this.formInline.level = ''
259
-          this.formInline.roomNo = ''
266
+          this.formInline.unitId = ''
267
+          this.formInline.levelId = ''
268
+          this.formInline.roomNoId = ''
260 269
           this.getUnit()
261 270
           break
262 271
         case 2: // 查询 楼层
263 272
           this.levelList = []
264 273
           this.roomNoList = []
265
-          this.formInline.level = ''
266
-          this.formInline.roomNo = ''
274
+          this.formInline.levelId = ''
275
+          this.formInline.roomNoId = ''
267 276
           this.getLevel()
268 277
           break
269 278
         case 3: // 查询 户号
270 279
           this.roomNoList = []
271
-          this.formInline.roomNo = ''
280
+          this.formInline.roomNoId = ''
272 281
           this.getRoomNo()
273 282
           break
274 283
       }

+ 49
- 40
VUECODE/smart-property-manage/src/views/bill/info/index.vue Näytä tiedosto

@@ -10,33 +10,41 @@
10 10
       <span style="font-weight: bold;">收费情况</span>
11 11
       <el-form :model="formInline" inline="true" class="form-inline">
12 12
         <el-form-item label="选择房子">
13
-          <el-select v-model="formInline.phase" placeholder="请选择期" @change="buildSelectChange(0)">
13
+          <el-select v-model="formInline.phaseId" placeholder="请选择期" @change="buildSelectChange(0)">
14 14
             <el-option
15 15
               v-for="item in phaseList"
16 16
               :key="item.id"
17
-              :label="item.phase"
18
-              :value="item.phase"/>
17
+              :label="item.name"
18
+              :value="item.id"/>
19 19
           </el-select>
20
-          <el-select v-model="formInline.building" placeholder="请选择栋" @change="buildSelectChange(1)">
20
+          <el-select v-model="formInline.buildingId" placeholder="请选择栋" @change="buildSelectChange(1)">
21 21
             <el-option
22 22
               v-for="item in buildingList"
23 23
               :key="item.id"
24
-              :label="item.building"
25
-              :value="item.building"/>
24
+              :label="item.name"
25
+              :value="item.id"/>
26 26
           </el-select>
27
-          <el-select v-model="formInline.unit" placeholder="请选择单元" @change="buildSelectChange(3)">
27
+          <el-select v-model="formInline.unitId" placeholder="请选择单元" @change="buildSelectChange(2)">
28 28
             <el-option
29 29
               v-for="item in unitList"
30 30
               :key="item.id"
31
-              :label="item.unit"
32
-              :value="item.unit"/>
31
+              :label="item.name"
32
+              :value="item.id"/>
33 33
           </el-select>
34
-          <el-select v-model="formInline.roomNo" placeholder="请选择户">
34
+          <el-select v-model="formInline.levelId" placeholder="请选择楼层" @change="buildSelectChange(3)">
35
+            <!--<el-option label="选择楼层" value="-1" />-->
36
+            <el-option
37
+              v-for="item in levelList"
38
+              :key="item.id"
39
+              :label="item.name"
40
+              :value="item.id"/>
41
+          </el-select>
42
+          <el-select v-model="formInline.roomNoId" placeholder="请选择户">
35 43
             <el-option
36 44
               v-for="item in roomNoList"
37 45
               :key="item.id"
38
-              :label="item.roomNo"
39
-              :value="item.roomNo"/>
46
+              :label="item.name"
47
+              :value="item.id"/>
40 48
           </el-select>
41 49
         </el-form-item>
42 50
         <br>
@@ -191,10 +199,11 @@ export default {
191 199
     return {
192 200
       formInline: {
193 201
         billId: '', // 缴费项目id
194
-        phase: '',
195
-        building: '',
196
-        unit: '',
197
-        roomNo: '',
202
+        phaseId: '',
203
+        buildingId: '',
204
+        unitId: '',
205
+        levelId: '',
206
+        roomNoId: '',
198 207
         ownerName: '',
199 208
         billStatus: '',
200 209
         payName: '',
@@ -230,10 +239,10 @@ export default {
230 239
       }
231 240
     },
232 241
     cleanQuery() { // 清空
233
-      this.formInline.phase = ''
234
-      this.formInline.building = ''
235
-      this.formInline.unit = ''
236
-      this.formInline.roomNo = ''
242
+      this.formInline.phaseId = ''
243
+      this.formInline.buildingId = ''
244
+      this.formInline.unitId = ''
245
+      this.formInline.roomNoId = ''
237 246
       this.formInline.ownerName = ''
238 247
       this.formInline.billStatus = ''
239 248
       this.formInline.payName = ''
@@ -257,40 +266,40 @@ export default {
257 266
       })
258 267
     },
259 268
     getPhase() { // 获取期
260
-      this.formInline.phase = ''
261
-      this.$store.dispatch('BuildingAddress', this.formInline).then((res) => {
269
+      this.formInline.phaseId = ''
270
+      this.$store.dispatch('GetPhaseList', this.formInline).then((res) => {
262 271
         this.phaseList = res.data
263 272
       }).catch(() => {
264 273
         console.log('error phase BuildingAddress')
265 274
       })
266 275
     },
267 276
     getBuild() { // 获取楼栋
268
-      this.formInline.building = ''
269
-      this.$store.dispatch('BuildingAddress', this.formInline).then((res) => {
277
+      this.formInline.buildingId = ''
278
+      this.$store.dispatch('GetBuildingList', this.formInline).then((res) => {
270 279
         this.buildingList = res.data
271 280
       }).catch(() => {
272 281
         console.log('error building BuildingAddress')
273 282
       })
274 283
     },
275 284
     getUnit() { // 获取单元
276
-      this.formInline.unit = ''
277
-      this.$store.dispatch('BuildingAddress', this.formInline).then((res) => {
285
+      this.formInline.unitId = ''
286
+      this.$store.dispatch('GetUnitList', this.formInline).then((res) => {
278 287
         this.unitList = res.data
279 288
       }).catch(() => {
280 289
         console.log('error unit BuildingAddress')
281 290
       })
282 291
     },
283 292
     getLevel() { // 获取楼层
284
-      this.formInline.level = ''
285
-      this.$store.dispatch('BuildingAddress', this.formInline).then((res) => {
293
+      this.formInline.levelId = ''
294
+      this.$store.dispatch('GetLevelList', this.formInline).then((res) => {
286 295
         this.levelList = res.data
287 296
       }).catch(() => {
288 297
         console.log('error level BuildingAddress')
289 298
       })
290 299
     },
291 300
     getRoomNo() { // 获取户号
292
-      this.formInline.roomNo = ''
293
-      this.$store.dispatch('BuildingAddress', this.formInline).then((res) => {
301
+      this.formInline.roomNoId = ''
302
+      this.$store.dispatch('GetRoomNoList', this.formInline).then((res) => {
294 303
         this.roomNoList = res.data
295 304
       }).catch(() => {
296 305
         console.log('error roomNo BuildingAddress')
@@ -303,31 +312,31 @@ export default {
303 312
           this.unitList = []
304 313
           this.levelList = []
305 314
           this.roomNoList = []
306
-          this.formInline.building = ''
307
-          this.formInline.unit = ''
308
-          this.formInline.level = ''
309
-          this.formInline.roomNo = ''
315
+          this.formInline.buildingId = ''
316
+          this.formInline.unitId = ''
317
+          this.formInline.levelId = ''
318
+          this.formInline.roomNoId = ''
310 319
           this.getBuild()
311 320
           break
312 321
         case 1: // 查询 单元
313 322
           this.unitList = []
314 323
           this.levelList = []
315 324
           this.roomNoList = []
316
-          this.formInline.unit = ''
317
-          this.formInline.level = ''
318
-          this.formInline.roomNo = ''
325
+          this.formInline.unitId = ''
326
+          this.formInline.levelId = ''
327
+          this.formInline.roomNoId = ''
319 328
           this.getUnit()
320 329
           break
321 330
         case 2: // 查询 楼层
322 331
           this.levelList = []
323 332
           this.roomNoList = []
324
-          this.formInline.level = ''
325
-          this.formInline.roomNo = ''
333
+          this.formInline.levelId = ''
334
+          this.formInline.roomNoId = ''
326 335
           this.getLevel()
327 336
           break
328 337
         case 3: // 查询 户号
329 338
           this.roomNoList = []
330
-          this.formInline.roomNo = ''
339
+          this.formInline.roomNoId = ''
331 340
           this.getRoomNo()
332 341
           break
333 342
       }

+ 10
- 2
VUECODE/smart-property-manage/src/views/building/edi/index.vue Näytä tiedosto

@@ -21,7 +21,7 @@
21 21
         <el-radio v-model="listQuery.verifyStatus" label="true">通过</el-radio>
22 22
         <el-radio v-model="listQuery.verifyStatus" label="false">不通过</el-radio>
23 23
       </el-form-item>
24
-      <el-form-item v-if="listQuery.verifyStatus === false" label="不通过的原因">
24
+      <el-form-item v-if="listQuery.verifyStatus === 'false'" label="不通过的原因">
25 25
         <el-radio v-model="listQuery.remark" label="不认识的人的手机号">不认识的人的手机号</el-radio>
26 26
         <el-radio v-model="listQuery.remark" label="其他原因需要沟通">其他原因需要沟通</el-radio>
27 27
       </el-form-item>
@@ -39,7 +39,7 @@
39 39
           <span style="margin-left: 100px;">{{ idCard }}</span>
40 40
         </el-form-item>
41 41
       </div>
42
-      <el-form-item>
42
+      <el-form-item v-if="button_bol">
43 43
         <el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
44 44
         <el-button @click="resetForm('ruleForm')">重置</el-button>
45 45
       </el-form-item>
@@ -57,6 +57,7 @@ export default {
57 57
         roleId: '',
58 58
         remark: ''
59 59
       },
60
+      button_bol: true, // 是否显示 确定和重置 按钮
60 61
       isRegistered: true, // true 未注册 false 注册
61 62
       roleDisabled: false, // 是否禁用业主下拉选项
62 63
       phaseList: [], // 期 集合
@@ -129,6 +130,13 @@ export default {
129 130
           // 表示已经是业主
130 131
           this.roleDisabled = true
131 132
         }
133
+
134
+        // 审核状态
135
+        const resVerify = resData.verify
136
+        const verifyStatus = resVerify.verifyStatus
137
+        this.listQuery.verifyStatus = verifyStatus === '1' ? 'true' : verifyStatus === '0' ? '' : 'false'
138
+        this.listQuery.roleId = resVerify.roleId + ''
139
+        this.button_bol = verifyStatus === '0' ? true : false
132 140
       }).catch(() => {
133 141
         console.log('GetByIdBuildingId error')
134 142
       })

+ 9
- 9
VUECODE/smart-property-manage/src/views/building/index.vue Näytä tiedosto

@@ -307,7 +307,7 @@ export default {
307 307
       this.dataQuery()
308 308
     },
309 309
     clickTitle(id) {
310
-      alert(id)
310
+      this.$router.push({ name: 'building-info-index', query: { id: id }})
311 311
     },
312 312
     deleteData() { // 删除
313 313
       this.$confirm('您确定要删除吗?')
@@ -342,14 +342,14 @@ export default {
342 342
         return
343 343
       }
344 344
       this.$store.dispatch('GetByIdBuildingId', ids[0]).then((res) => {
345
-        const resCode = res.code
346
-        if (resCode === '0') {
347
-          const resData = res.data
348
-          if (resData.verifyStatus === '1') {
349
-            this.$message.error('不能修改已认证的楼栋业主信息!')
350
-            return
351
-          }
352
-        }
345
+        // const resCode = res.code
346
+        // if (resCode === '0') {
347
+        //   const resData = res.data
348
+        //   if (resData.verify.verifyStatus !== '0') {
349
+        //     this.$message.error('不能修改已审核的资料信息!')
350
+        //     return
351
+        //   }
352
+        // }
353 353
         this.$router.push({ name: 'building-edi', query: { id: ids[0], listQuery: this.listQuery }})
354 354
       }).catch(() => {
355 355
         console.log('error GetByIdBuildingId')

+ 51
- 0
VUECODE/smart-property-manage/src/views/building/info/index.vue Näytä tiedosto

@@ -0,0 +1,51 @@
1
+<template>
2
+  <div id="root">
3
+    <div class="form-div">
4
+      <el-form ref="form" label-width="150px" label-position="left">
5
+        <el-form-item label="基本信息"/>
6
+        <el-form-item>
7
+          <table>
8
+            <tr>
9
+              <td>姓名</td>
10
+              <td>张三</td>
11
+              <td>性别</td>
12
+              <td>男</td>
13
+              <td>手机号</td>
14
+              <td>15871301059</td>
15
+            </tr>
16
+            <tr>
17
+              <td>微信昵称</td>
18
+              <td>张三</td>
19
+              <td>微信ID</td>
20
+              <td>男</td>
21
+              <td>身份证</td>
22
+              <td>15871301059</td>
23
+            </tr>
24
+            <tr>
25
+              <td>头像</td>
26
+              <td colspan="5">张三</td>
27
+            </tr>
28
+          </table>
29
+        </el-form-item>
30
+        <el-form-item label="在当前房屋"/>
31
+        <el-form-item label="关联本小区其他房屋"/>
32
+      </el-form>
33
+    </div>
34
+  </div>
35
+</template>
36
+
37
+<script>
38
+export default {
39
+  name: 'InfoIndex'
40
+}
41
+</script>
42
+
43
+<style scoped>
44
+table tr td {
45
+  padding-right: 50px;
46
+}
47
+.form-div {
48
+  display: flex;
49
+  justify-content: center;
50
+}
51
+</style>