Browse Source

Merge remote-tracking branch 'origin/master'

peiguo 5 years ago
parent
commit
5cef8e3a6b

+ 7 - 9
admin-ui/app/whepi/tugou/dialogTugou.js

@@ -97,19 +97,13 @@ define(function (require) {
               onChange: function (data) {
               onChange: function (data) {
 
 
               },
               },
-            },{
+            }, {
               name: 'tgPrice',
               name: 'tgPrice',
               label: '单价',
               label: '单价',
               readonly: context.isEdit ? true : false,
               readonly: context.isEdit ? true : false,
-              maxlength: 4, validType: 'integer',
+              maxlength: 6, validType: 'number',
               width: 450, height: 35,
               width: 450, height: 35,
             },
             },
-              {
-                name: 'tgSupplier',
-                label: '指挥部',
-                xtype: 'hidden',
-                value:'指挥部',
-              }
             ],
             ],
             [{
             [{
               name: 'tgGoods', label: '套餐描述',
               name: 'tgGoods', label: '套餐描述',
@@ -149,6 +143,10 @@ define(function (require) {
                 label: '联系电话', width: 450, height: 35,
                 label: '联系电话', width: 450, height: 35,
                 readonly: context.isEdit ? true : false,
                 readonly: context.isEdit ? true : false,
                 required: true, maxlength: 11,
                 required: true, maxlength: 11,
+              },
+              {
+                name: 'tgSupplier', width: 450, height: 35,
+                label: '供应商', maxlength: 20,
               }],
               }],
           ],
           ],
         }
         }
@@ -189,7 +187,7 @@ define(function (require) {
                 } else {
                 } else {
                   $.yvan.msg('保存失败');
                   $.yvan.msg('保存失败');
                 }
                 }
-              }
+              },
             });
             });
           }
           }
         }, {
         }, {

+ 1 - 1
admin-ui/app/whepi/tugou/tugou.js

@@ -252,7 +252,7 @@ define(function (require) {
                         }
                         }
                       }
                       }
                     },
                     },
-                    // {field: 'tgSupplier', title: '组织者', maxWidth: 200,},
+                    {field: 'tgSupplier', title: '供应商', maxWidth: 200,},
                     {
                     {
                       field: 'tgGoods',
                       field: 'tgGoods',
                       title: '套餐描述', maxWidth: 200,
                       title: '套餐描述', maxWidth: 200,

+ 1 - 1
whepi-doc/group.sql

@@ -54,4 +54,4 @@ ADD  user_create    bigint(20)      NOT NULL DEFAULT 0          COMMENT '新增
 ADD  time_create    datetime(0)     NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
 ADD  time_create    datetime(0)     NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
 ADD  user_update    bigint(20)      NOT NULL DEFAULT 0          COMMENT '修改人',
 ADD  user_update    bigint(20)      NOT NULL DEFAULT 0          COMMENT '修改人',
 ADD  time_update    datetime(0)     NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间';
 ADD  time_update    datetime(0)     NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间';
-ADD  role_type      int(11)         NOT NULL DEFAULT 0          COMMENT '角色类型  1 业委会角色 2 指挥部' AFTER tg_min_num;
+ADD  role_type      int(11)         NOT NULL DEFAULT 0          COMMENT '角色类型  0 业委会角色 1 指挥部' AFTER tg_min_num;

+ 11 - 2
whepi-ui/templates/home/buy.ftl

@@ -103,7 +103,7 @@
             $('#buyAll').append(' <a href="javascript:void(0);" style="color: grey;font-size: large" data-id="form"\n' +
             $('#buyAll').append(' <a href="javascript:void(0);" style="color: grey;font-size: large" data-id="form"\n' +
                     '                                             onclick=\'myBuyClick(' + JSON.stringify(v) + ')\'>\n' +
                     '                                             onclick=\'myBuyClick(' + JSON.stringify(v) + ')\'>\n' +
                     '                <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 4vh;">\n' +
                     '                <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 4vh;">\n' +
-                    '                    <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px;text-align: left;">' +'【'+v.tgSupplier+'】'+ v.tgTitle + '</div>\n' +
+                    '                    <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px;text-align: left;">' + '【' + type(v.roleType) + '】' + v.tgTitle + '</div>\n' +
                     '                    <div style="width: 20%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">\n' + v.count + '/' + v.tgMinNum + '</div>\n' +
                     '                    <div style="width: 20%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">\n' + v.count + '/' + v.tgMinNum + '</div>\n' +
                     '                    <div style="width: 35%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + sub(v.tgEndTime) + '</div>\n' +
                     '                    <div style="width: 35%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + sub(v.tgEndTime) + '</div>\n' +
                     '                    <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + getStatus(v.tgStatus) + '</div>\n' +
                     '                    <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + getStatus(v.tgStatus) + '</div>\n' +
@@ -143,7 +143,7 @@
         function MybuyList(v) {
         function MybuyList(v) {
             $('#MyBuyAll').append('<a href="javascript:void(0);" style="color: grey;font-size: large" data-id="form" onclick=\'myBuyClick2(' + JSON.stringify(v) + ')\'>\n' +
             $('#MyBuyAll').append('<a href="javascript:void(0);" style="color: grey;font-size: large" data-id="form" onclick=\'myBuyClick2(' + JSON.stringify(v) + ')\'>\n' +
                     '                        <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 4vh;">\n' +
                     '                        <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 4vh;">\n' +
-                    '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px;text-align: left;">' +'【'+v.tgSupplier+'】'+ v.tgTitle + '</div>\n' +
+                    '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px;text-align: left;">' + '【' + type(v.roleType) + '】' + v.tgTitle + '</div>\n' +
                     '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + timestampY(v.timeCreate) + '</div>\n' +
                     '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + timestampY(v.timeCreate) + '</div>\n' +
                     '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + getStatus(v.tgStatus) + '</div>\n' +
                     '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + getStatus(v.tgStatus) + '</div>\n' +
                     '                        </div>\n' + '                    </a>')
                     '                        </div>\n' + '                    </a>')
@@ -201,4 +201,13 @@
         function sub(v) {
         function sub(v) {
             return v.substring(5, v.length);
             return v.substring(5, v.length);
         }
         }
+
+        //角色
+        function type(v) {
+            if (v == 0) {
+                return "管理员";
+            } else {
+                return "指挥部";
+            }
+        }
     </script>
     </script>

+ 1 - 1
whepi-ui/templates/home/buytc.ftl

@@ -54,7 +54,7 @@
                         '            </div>\n' +
                         '            </div>\n' +
                         '        </div>\n' +
                         '        </div>\n' +
                         '        <div>\n' +
                         '        <div>\n' +
-                        '            <div style="text-indent: -0em;margin-left: 2em;">组织者:&nbsp;&nbsp;' + v.tgSupplier + '</div>\n' +
+                        '            <div style="text-indent: -0em;margin-left: 2em;">供应商:&nbsp;&nbsp;' + v.tgSupplier + '</div>\n' +
                         '\n' +
                         '\n' +
                         '            <div style="text-indent: -0em;margin-left: 2em;">套&nbsp;&nbsp;&nbsp;&nbsp;餐:&nbsp;&nbsp;' + v.tgGoods + '</div>\n' +
                         '            <div style="text-indent: -0em;margin-left: 2em;">套&nbsp;&nbsp;&nbsp;&nbsp;餐:&nbsp;&nbsp;' + v.tgGoods + '</div>\n' +
                         '\n' +
                         '\n' +

+ 28 - 7
whepi-ui/templates/yeweihui/tgPublish.ftl

@@ -15,7 +15,7 @@
         <p class="weui-media-box__desc" style="margin-top: 1vh;">套餐:</p>
         <p class="weui-media-box__desc" style="margin-top: 1vh;">套餐:</p>
         <input id="tg_input_goods" class="weui-input" autofocus="" type="text" placeholder="请输入" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
         <input id="tg_input_goods" class="weui-input" autofocus="" type="text" placeholder="请输入" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
         <p class="weui-media-box__desc" style="margin-top: 1vh;">单价(元):</p>
         <p class="weui-media-box__desc" style="margin-top: 1vh;">单价(元):</p>
-        <input id="tg_input_price" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
+        <input id="tg_input_price" onkeyup="clearNoNum(this)" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
         <p class="weui-media-box__desc" style="margin-top: 1vh;">最低起送(份):</p>
         <p class="weui-media-box__desc" style="margin-top: 1vh;">最低起送(份):</p>
         <input id="tg_input_minnum" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
         <input id="tg_input_minnum" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
         <p class="weui-media-box__desc" style="margin-top: 1vh;">最大订量(份):</p>
         <p class="weui-media-box__desc" style="margin-top: 1vh;">最大订量(份):</p>
@@ -40,6 +40,8 @@
 <script>
 <script>
     var userId = ${userId};
     var userId = ${userId};
 
 
+    var isLoading = false;
+
     $("#tg_input_end_time").datetimePicker();
     $("#tg_input_end_time").datetimePicker();
     $("#tg_input_deliver_time").datetimePicker();
     $("#tg_input_deliver_time").datetimePicker();
 
 
@@ -47,6 +49,16 @@
         window.location.href = "/yeweihui/home.html?show=tuangou&userId=" + userId;
         window.location.href = "/yeweihui/home.html?show=tuangou&userId=" + userId;
     }
     }
 
 
+    function clearNoNum(obj){
+        obj.value = obj.value.replace(/[^\d.]/g,"");  //清除“数字”和“.”以外的字符
+        obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个. 清除多余的
+        obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
+        obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');//只能输入两个小数
+        if(obj.value.indexOf(".")< 0 && obj.value !=""){//以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
+            obj.value= parseFloat(obj.value);
+        }
+    }
+
     $("#tg_publish").on('click', function () {
     $("#tg_publish").on('click', function () {
 
 
         let title = $("#tg_input_title").val();
         let title = $("#tg_input_title").val();
@@ -102,12 +114,12 @@
             return;
             return;
         }
         }
 
 
-        if (/^[0-9]+$/.test(price) == false) {
-            $.alert("价格请输入整数");
-            return;
-        }
-        if (price.length > 4) {
-            $.alert("价格最大为9999");
+        // if (/^-?(([1-9]{1}\d*)|(0{1}))(\.\d{2})?$/.test(price) == false) {
+        //     $.alert("价格保留两位小数");
+        //     return;
+        // }
+        if (parseFloat(price) > 10000) {
+            $.alert("价格最大为10000");
             return;
             return;
         }
         }
 
 
@@ -190,11 +202,19 @@
 
 
         };
         };
 
 
+        if (isLoading == true) {
+            return;
+        }
+        else {
+            isLoading = true;
+        }
+
         $.ajax({
         $.ajax({
             url: '/yeweihui/tgPublish.json',
             url: '/yeweihui/tgPublish.json',
             type: 'post',
             type: 'post',
             data: sendData,
             data: sendData,
             success: function (data) {
             success: function (data) {
+                isLoading = false;
                 // console.log(data);
                 // console.log(data);
                 if (data.success) {
                 if (data.success) {
                     window.location.href = "/yeweihui/home.html?show=tuangou&userId=" + userId;
                     window.location.href = "/yeweihui/home.html?show=tuangou&userId=" + userId;
@@ -204,6 +224,7 @@
                 }
                 }
             },
             },
             error: function () {
             error: function () {
+                isLoading = false;
                 $.alert("网络异常");
                 $.alert("网络异常");
             }
             }
         });
         });

+ 15 - 12
whepi-web/src/main/java/com/bofeng/entity/JmTuangouMember.java

@@ -27,64 +27,67 @@ public class JmTuangouMember {
     /**
     /**
      * 价格
      * 价格
      */
      */
-    @ExcelProperty(value = "价格", index = 3)
+    @ExcelProperty(value = "价格", index = 6)
     private String tgPrice;
     private String tgPrice;
 
 
     /**
     /**
      * 最低起送
      * 最低起送
      */
      */
-    @ExcelProperty(value = "最低起送", index = 4)
+    //@ExcelProperty(value = "最低起送", index = 4)
     private Integer tgMinNum;
     private Integer tgMinNum;
     /**
     /**
      * 配送上限
      * 配送上限
      */
      */
-    @ExcelProperty(value = "配送上限", index = 5)
+   // @ExcelProperty(value = "配送上限", index = 5)
     private Integer tgMaxNum;
     private Integer tgMaxNum;
     /**
     /**
      * 小区名称
      * 小区名称
      */
      */
-    @ExcelProperty(value = "小区名称", index = 6)
+    @ExcelProperty(value = "小区名称", index = 3)
     private String uptownName;
     private String uptownName;
     /**
     /**
      * 栋
      * 栋
      */
      */
-    @ExcelProperty(value = "楼栋", index = 7)
+   // @ExcelProperty(value = "楼栋", index = 5)
     private String ridgepole;
     private String ridgepole;
     /**
     /**
      * 单元
      * 单元
      */
      */
-    @ExcelProperty(value = "单元", index = 8)
+   // @ExcelProperty(value = "单元", index = 6)
     private String unit;
     private String unit;
     /**
     /**
      * 门牌号
      * 门牌号
      */
      */
-    @ExcelProperty(value = "门牌号", index = 9)
+
     private String houseNumber;
     private String houseNumber;
     /**
     /**
      * 参团数量
      * 参团数量
      */
      */
-    @ExcelProperty(value = "参团数量", index = 10)
+    @ExcelProperty(value = "参团数量", index = 7)
     private Integer buyCount;
     private Integer buyCount;
     /**
     /**
      * 应付款
      * 应付款
      */
      */
-    @ExcelProperty(value = "应付款", index = 11)
+    @ExcelProperty(value = "应付款", index = 8)
     private Integer buyMoney;
     private Integer buyMoney;
     /**
     /**
      * 已付款
      * 已付款
      */
      */
-    @ExcelProperty(value = "已付款", index = 12)
+    @ExcelProperty(value = "已付款", index = 9)
     private Integer payMoney;
     private Integer payMoney;
     /**
     /**
      * 联系方式
      * 联系方式
      */
      */
-    @ExcelProperty(value = "联系方式", index = 13)
+    @ExcelProperty(value = "联系方式", index = 5)
     private String phone;
     private String phone;
     /**
     /**
      * 备注
      * 备注
      */
      */
-    @ExcelProperty(value = "备注", index = 14)
+    @ExcelProperty(value = "备注", index = 10)
     private String myRemark;
     private String myRemark;
 
 
     private Integer uptownId;
     private Integer uptownId;
+
+    @ExcelProperty(value = "门牌号", index = 4)
+    private String forName;
 }
 }

+ 1 - 1
whepi-web/src/main/java/com/bofeng/service/EpiTemplateMessageService.java

@@ -95,7 +95,7 @@ public class EpiTemplateMessageService {
             map.put("keyword3", str1);
             map.put("keyword3", str1);
             map.put("keyword4", "无");
             map.put("keyword4", "无");
             map.put("keyword5", "系统");
             map.put("keyword5", "系统");
-            map.put("remark", "亲爱的居民,有新的团购正在组织进行请及时关注,如有需要进入应用在截止时前上报您的物资需求,谢谢配合");
+            map.put("remark", "亲爱的居民,有新的团购正在组织进行请及时关注,如有需要进入应用在截止时前上报您的物资需求,谢谢配合");
             re = 1;
             re = 1;
         }
         }
         templateMessageService.sendSysRemindMessage(openId, "", map);
         templateMessageService.sendSysRemindMessage(openId, "", map);

+ 17 - 10
whepi-web/src/main/java/com/bofeng/service/JmTuangouMemberService.java

@@ -14,17 +14,24 @@ import java.util.Map;
 @Transactional(readOnly = true)
 @Transactional(readOnly = true)
 public class JmTuangouMemberService {
 public class JmTuangouMemberService {
 
 
-    @Autowired
-    private JmTuangouMemberDao jmTuangouMemberDao;
+  @Autowired
+  private JmTuangouMemberDao jmTuangouMemberDao;
 
 
-    public List<JmTuangouMember> querMemberListByJmId (Long jmId) {
-        return jmTuangouMemberDao.querMemberListByJmId(jmId);
-    }
+  public List<JmTuangouMember> querMemberListByJmId(Long jmId) {
+    return jmTuangouMemberDao.querMemberListByJmId(jmId);
+  }
 
 
-    public List<JmTuangouMember> querMemberListByJmIdXX (Map<String, Object> queryParam) {
-        return jmTuangouMemberDao.querMemberListByJmIdXX(queryParam);
-    }
-    public List<JmTuangouMember> querMemberListByJmIdexport (Long jmId, String queryProperties,PageDb pageDb) {
-        return jmTuangouMemberDao.querMemberListByJmIdexport(jmId,queryProperties,pageDb);
+  public List<JmTuangouMember> querMemberListByJmIdXX(Map<String, Object> queryParam) {
+    List<JmTuangouMember> jmTuangouMembers = jmTuangouMemberDao.querMemberListByJmIdXX(queryParam);
+    if (jmTuangouMembers != null && jmTuangouMembers.size() > 0) {
+      for (JmTuangouMember xq : jmTuangouMembers) {
+        xq.setForName(xq.getRidgepole() + "-" + xq.getUnit() + "-" + xq.getHouseNumber());
+      }
     }
     }
+    return jmTuangouMembers;
+  }
+
+  public List<JmTuangouMember> querMemberListByJmIdexport(Long jmId, String queryProperties, PageDb pageDb) {
+    return jmTuangouMemberDao.querMemberListByJmIdexport(jmId, queryProperties, pageDb);
+  }
 }
 }

+ 1 - 1
whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java

@@ -65,7 +65,7 @@ public class UserOpenController {
                              @RequestParam(value = "userType", required = false, defaultValue = "0") Integer userType) throws JsonProcessingException {
                              @RequestParam(value = "userType", required = false, defaultValue = "0") Integer userType) throws JsonProcessingException {
         List<UserRole> list = new ArrayList<>();
         List<UserRole> list = new ArrayList<>();
         if (userId == 0) {
         if (userId == 0) {
-            UserOpen userOpen = homeService.getUserOpen();
+           UserOpen userOpen = homeService.getUserOpen();
             list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());
             list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());
 //            list = userRoleMapper.getUserRoleByUserId(1225321682867105793L);
 //            list = userRoleMapper.getUserRoleByUserId(1225321682867105793L);
 //            UserOpen userOpen = userOpenMapper.selectByUserId(1225321682867105793L);
 //            UserOpen userOpen = userOpenMapper.selectByUserId(1225321682867105793L);

+ 0 - 3
whepi-web/src/main/resources/mapper/JmTuangouMemberMapper.xml

@@ -34,9 +34,6 @@
         INNER JOIN sys_uptown_unit c on c.unit_id=b.unit_id
         INNER JOIN sys_uptown_unit c on c.unit_id=b.unit_id
         INNER JOIN sys_uptown u on u.uptown_id = c.uptown_id
         INNER JOIN sys_uptown u on u.uptown_id = c.uptown_id
         where a.user_id in (select user_id from jm_buy where jm_id=#{jmId})
         where a.user_id in (select user_id from jm_buy where jm_id=#{jmId})
-        <if test="queryProperties!=null and queryProperties!=''">
-            and u.uptown_name like concat('%',#{queryProperties},'%')
-        </if>
         ) y
         ) y
         on a.user_id=y.user_id
         on a.user_id=y.user_id
         LEFT JOIN
         LEFT JOIN