Bläddra i källkod

Merge remote-tracking branch 'origin/master'

peiguo 5 år sedan
förälder
incheckning
28e9dbdf82

+ 50 - 51
admin-ui/app/whepi/tugou/dialogTugou.js

@@ -93,65 +93,65 @@ define(function (require) {
               {
                 name: 'tgSupplier', label: '组织者', maxlength: 20,
                 width: 450, height: 35,
-                required: true,value:'指挥部',
-                readonly:  true ,
-              },
-              [{
-                name: 'tgGoods', label: '团购套餐',
-                required: true, width: 900, height: 35,
-                maxlength: 50,
-                readonly: context.isEdit ? true : false,
-                height: '100px', multiline: true,
+                required: true, value: '指挥部',
+                readonly: true,
               }],
-              {
-                name: 'tgPrice',
-                label: '单价',
-                readonly: context.isEdit ? true : false,
-                maxlength: 4, validType: 'integer',
-                required: true, width: 450, height: 35,
-              },
+            [{
+              name: 'tgGoods', label: '团购套餐',
+              required: true, width: 900, height: 35,
+              maxlength: 50,
+              readonly: context.isEdit ? true : false,
+              height: '100px', multiline: true,
+            }],
+            [{
+              name: 'tgPrice',
+              label: '单价',
+              readonly: context.isEdit ? true : false,
+              maxlength: 4, validType: 'integer',
+              required: true, width: 450, height: 35,
+            },
               {
                 name: 'tgMinNum',
                 label: '最小起订量',
                 readonly: context.isEdit ? true : false,
                 maxlength: 4, validType: 'integer',
                 required: true, width: 450, height: 35,
-              },
-              [{
-                name: 'tgMaxNum',
-                readonly: context.isEdit ? true : false,
-                label: '最大上限', required: true, validType: 'integer',
-                maxlength: 4, width: 450, height: 35,
-              },
-                {
-                  name: 'tgEndTime',
-                  label: '团购截止时间',
-                  readonly: context.isEdit ? true : false,
-                  xtype: 'datetimebox',
-                  required: true, width: 450, height: 35,
-                },],
-              [{
-                name: 'tgDeliverTime',
-                multiline: true,
+              }],
+            [{
+              name: 'tgMaxNum',
+              readonly: context.isEdit ? true : false,
+              label: '最大上限', required: true, validType: 'integer',
+              maxlength: 4, width: 450, height: 35,
+            },
+              {
+                name: 'tgEndTime',
+                label: '团购截止时间',
                 readonly: context.isEdit ? true : false,
                 xtype: 'datetimebox',
-                label: '预计送货时间',
                 required: true, width: 450, height: 35,
-              },
-                {
-                  name: 'tgPhoneNumber', validType: 'telNum',
-                  label: '联系电话', width: 450, height: 35,
-                  readonly: context.isEdit ? true : false,
-                  required: true, maxlength: 11,
-                }],
-              [{
-                name: 'remark',
-                label: '备注',
-                multiline: true,
-                width: 900,
-                height: '100px',
-                maxlength: 100,
-              }]]
+              }],
+            [{
+              name: 'tgDeliverTime',
+              multiline: true,
+              readonly: context.isEdit ? true : false,
+              xtype: 'datetimebox',
+              label: '预计送货时间',
+              required: true, width: 450, height: 35,
+            },
+              {
+                name: 'tgPhoneNumber', validType: 'telNum',
+                label: '联系电话', width: 450, height: 35,
+                readonly: context.isEdit ? true : false,
+                required: true, maxlength: 11,
+              }],
+            [{
+              name: 'remark',
+              label: '备注',
+              multiline: true,
+              width: 900,
+              height: '100px',
+              maxlength: 100,
+            }]
           ],
         }
       },
@@ -163,14 +163,13 @@ define(function (require) {
               return;
             }
             if ($form.formGet().tgMinNum > $form.formGet().tgMaxNum) {
-              $.yvan.msg('最大上线必须大于等于最小起订量');
+              $.yvan.msg('最大上必须大于等于最小起订量');
               return;
             }
             if ($form.formGet().tgEndTime > $form.formGet().tgDeliverTime) {
               $.yvan.msg('团购截止时间必须小于预计送货时间');
               return;
             }
-
             console.log($form.formGet())
             $.yvan.postForm($form, {
               url: (context.isEdit ? api('/yeweihui/tgStatus') : api('/yeweihui/tgPublish')),

+ 1 - 1
whepi-ui/templates/home/ribao.js

@@ -726,7 +726,7 @@ function getGreder(greder) {
 
 function getFamilyStatus(familyStatus) {
   var familyStatusList = familyStatus.split(",");
-  var familyStatusString = "";
+  var familyStatusString = "无病史,";
   if (familyStatusList[0] == 1)
     familyStatusString += "心脑血管疾病(服用ARB),";
   if (familyStatusList[1] == 1)

+ 9 - 11
whepi-web/src/main/java/com/bofeng/controller/WxUserOpenController.java

@@ -5,7 +5,6 @@ import com.bofeng.entity.*;
 import com.bofeng.service.HomeService;
 import com.bofeng.service.WxUserOpenService;
 import com.yvan.Model;
-import com.yvan.platform.Conv;
 import com.yvan.platform.JsonWapper;
 import com.yvan.platform.StringUtils;
 import com.yvan.springmvc.HttpParameterParser;
@@ -15,7 +14,6 @@ import lombok.val;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
@@ -54,15 +52,15 @@ public class WxUserOpenController {
     }
 
     @ApiOperation("用户注册页面点登录")
-    @PostMapping("/userOpen/login")
-    public Model<Long> login(@RequestBody String body) {
-//        val parser = HttpParameterParser.newInstance(HttpUtils.currentRequest());
-//        String openId = parser.getString("openId");
-//        String code = parser.getString("code");
-        JsonWapper jsonWapper = new JsonWapper(body);
-        Map map = jsonWapper.getInnerMap();
-        String openId = Conv.NS(map.get("openId"));
-        String code = Conv.NS(map.get("code"));
+    @GetMapping("/userOpen/login")
+    public Model<Long> login() {
+        val parser = HttpParameterParser.newInstance(HttpUtils.currentRequest());
+        String openId = parser.getString("openId");
+        String code = parser.getString("code");
+//        JsonWapper jsonWapper = new JsonWapper(body);
+//        Map map = jsonWapper.getInnerMap();
+//        String openId = Conv.NS(map.get("openId"));
+//        String code = Conv.NS(map.get("code"));
 
         if (StringUtils.isNullOrEmpty(code)) {
             return Model.newFail("code为空");

+ 5 - 17
whepi-web/src/main/java/com/bofeng/service/WxUserOpenService.java

@@ -219,30 +219,18 @@ public class WxUserOpenService {
         }
         //判断业委会是否已经建立
         List<Owner> lstSysOwner = ownerMapper.getOwnerByUptownId(myUptownId);
-        boolean hasOwner = false;
         if (lstSysOwner != null && lstSysOwner.size() > 0) {
             for (Owner item : lstSysOwner) {
                 if (item.getUserId() == sysUserId && item.getType() == 1) {
                     //业委会负责人的绑定用户是自己
-                    hasOwner = true;
-                    break;
+                    return 1L;  //该小区已成立业委会,且业委会负责人的绑定用户是自己,可以进入编辑
+//                    break;
                 }
             }
-            if (!hasOwner) {
-                throw new Exception("该小区已建立业委会");
-            }
-        }
-        List<OwnerLinkman> lstOwnerLinkman = ownerLinkmanMapper.getOwnerLinkmanByOwnerId(sysUserId);
-        if (lstOwnerLinkman == null) {
-            return 1L;
-            //throw new Exception("不是业委会成员!");
-        }
-        for (OwnerLinkman item : lstOwnerLinkman) {
-            if (item.getType() == 1) {
-                return 1L;  //业委会负责人可以编辑完善业委会信息
-            }
+            throw new Exception("小区业委会已建立,非业委会负责人不能编辑!");
+        } else {
+            return 1L;  //该小区没有成立业委会,可以进入新增
         }
-        return 0L;
     }
 
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)