Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

yuliang 5 лет назад
Родитель
Сommit
93f1af38fc

+ 19 - 9
whepi-ui/templates/yeweihui/home.ftl

@@ -13,9 +13,9 @@
         </div>
         <div id="tab2" class="weui-tab__bd-item">
             <#include "/yeweihui/qiuzhu.ftl" /></div>
-        <#--<div id="tab3" class="weui-tab__bd-item">-->
-            <#--<#include "/yeweihui/tuangou.ftl" />-->
-        <#--</div>-->
+        <div id="tab3" class="weui-tab__bd-item">
+            <#include "/yeweihui/tuangou.ftl" />
+        </div>
     <#--<div id="tab3" class="weui-tab__bd-item">-->
     <#--<h1>页面三</h1> </div>-->
     <#--<div id="tab4" class="weui-tab__bd-item">-->
@@ -30,10 +30,10 @@
             <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
             <p class="weui-tabbar__label">求助</p>
         </a>
-        <#--<a id="tab2a" href="#tab3" class="weui-tabbar__item">-->
-            <#--<div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>-->
-            <#--<p class="weui-tabbar__label">团购</p>-->
-        <#--</a>-->
+        <a id="tab3a" href="#tab3" class="weui-tabbar__item">
+            <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
+            <p class="weui-tabbar__label">团购</p>
+        </a>
     <#--<a href="#tab3" class="weui-tabbar__item">-->
     <#--<div class="weui-tabbar__icon"> <img src="./images/icon_nav_article.png" alt=""> </div>-->
     <#--<p class="weui-tabbar__label">发现</p>-->
@@ -57,7 +57,7 @@
     var taskList = ${taskList!'[]'};
     var statisticsOrderList =${rbList!'[]'};
 
-    var showQZ = ${showQZ!'"-"'};
+    var show = ${show!'"-"'};
 
     (function ($) {
         $(function () {
@@ -134,9 +134,19 @@
             $("#tab2a").addClass('weui-bar__item--on');
         }
 
-        if (showQZ != '-') {
+        function selecttuangou() {
+            $("#tab1").removeClass('weui-tab__bd-item--active');
+            $("#tab1a").removeClass('weui-bar__item--on');
+            $("#tab3").addClass('weui-tab__bd-item--active');
+            $("#tab3a").addClass('weui-bar__item--on');
+        }
+
+        if (show === 'qiuzhu') {
             selectqiuzhu();
         }
+        else if (show === 'tuangou') {
+            selecttuangou();
+        }
 
     })(jQuery);
 </script>

+ 2 - 2
whepi-ui/templates/yeweihui/qiuzhuDetail.ftl

@@ -93,7 +93,7 @@
             },
             success: function (data) {
                 $.closePopup();
-                window.location.href = "/yeweihui/home.html?showQZ=true&userId=" + userId;
+                window.location.href = "/yeweihui/home.html?show=qiuzhu&userId=" + userId;
             },
             error: function () {
                 $.alert("网络异常");
@@ -102,7 +102,7 @@
     }
 
     function goback() {
-        window.location.href = "/yeweihui/home.html?showQZ=true&userId=" + userId;
+        window.location.href = "/yeweihui/home.html?show=qiuzhu&userId=" + userId;
     }
 
     function getdealdetail() {

+ 32 - 0
whepi-ui/templates/yeweihui/tgPublish.ftl

@@ -0,0 +1,32 @@
+<#assign title="求助详情"/>
+<#include "/home/frag.head.ftl" />
+
+<div class="weui-tab">
+    <div class="weui-btn-area" style="display: flex; flex-direction: row;">
+        <a class="weui-btn weui-btn_primary" href="javascript:goback();" style="width: 25vw; height: 6vh; line-height: 6vh;">返回</a>
+        <div style="width: 65%;"></div>
+    </div>
+
+    <div class="weui-btn-area">
+
+        <p class="weui-media-box__desc">求助标题</p>
+        <h4 class="weui-media-box__title">sss</h4>
+        <br>
+        <p class="weui-media-box__desc">求助对象</p>
+        <h4 class="weui-media-box__title">sasa</h4>
+        <br>
+        <p class="weui-media-box__desc">求助内容</p>
+        <h4 class="weui-media-box__title">fda</h4>
+        <br>
+    </div>
+</div>
+
+<#include "/home/frag.foot.ftl" />
+
+<script>
+    var userId = ${userId};
+
+    function goback() {
+        window.location.href = "/yeweihui/home.html?show=tuangou&userId=" + userId;
+    }
+</script>

+ 100 - 12
whepi-ui/templates/yeweihui/tuangou.ftl

@@ -24,7 +24,7 @@
                 </div>
 
                 <div class="weui-panel weui-panel_access">
-                    <div style="display: flex; flex-direction: row; color: grey; font-size: medium;">
+                    <div style="display: flex; flex-direction: row; color: grey; font-size: medium; line-height: 7vh;">
                         <div style="width: 40%; text-align: center;">标题</div>
                         <div style="width: 15%; text-align: center;">已团</div>
                         <div style="width: 30%; text-align: center;">截止时间</div>
@@ -32,7 +32,55 @@
                     </div>
                     <div id="tg_list1" class="weui-panel__bd">
                         <a href="javascript:void(0);" style="color: grey;">
-                            <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 5vh;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                            <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                            <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                            <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                            <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                        </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
                                 <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
                                 <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
                                 <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
@@ -40,7 +88,39 @@
                             </div>
                         </a>
                         <a href="javascript:void(0);" style="color: grey;">
-                            <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 5vh;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
+                            </div>
+                        </a>
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
                                 <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
                                 <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
                                 <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
@@ -48,7 +128,12 @@
                             </div>
                         </a>
                     </div>
-                    <div class="weui-cell">
+                    <div class="weui-btn-area">
+                        <a id="tg_publish" class="weui-btn weui-btn_primary">
+                            发布新团购
+                        </a>
+                    </div>
+                    <div style="line-height: 55px;">
                         <br>
                     </div>
                 </div>
@@ -66,18 +151,21 @@
 
                 <div class="weui-panel weui-panel_access">
                     <div id="tg_list2" class="weui-panel__bd">
-                        <a href="javascript:void(0);">
-                            <div>
-                                第2.1行
+                        <a href="javascript:void(0);" style="color: grey;">
+                            <div style="display: flex; flex-direction: row; text-align: center; font-size: small; line-height: 5vh;">
+                                <div style="width: 40%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">蔬菜套餐,猪肉牛肉金针菇等</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">24/100</div>
+                                <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">02/02 14:30</div>
+                                <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">在团</div>
                             </div>
                         </a>
-                        <a href="javascript:void(0);">
-                            <div>
-                                第2.2行
-                            </div>
+                    </div>
+                    <div class="weui-btn-area">
+                        <a id="tg_publish" class="weui-btn weui-btn_primary">
+                            发布新团购
                         </a>
                     </div>
-                    <div class="weui-cell">
+                    <div style="line-height: 55px;">
                         <br>
                     </div>
                 </div>

+ 3 - 1
whepi-ui/templates/yeweihui/tuangou.js

@@ -1,3 +1,5 @@
 function tuangou_init(tt) {
-
+    $('#tg_publish').on('click', function () {
+        window.location.href = "/yeweihui/tgPublish.html?userId=" + $('#userId').val();
+    });
 };

+ 80 - 0
whepi-web/src/main/java/com/bofeng/entity/JmTuangou.java

@@ -0,0 +1,80 @@
+package com.bofeng.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * jm_tuangou
+ * @author 
+ */
+@Data
+public class JmTuangou implements Serializable {
+    /**
+     * 团购id
+     */
+    private Long jmId;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 小区ID
+     */
+    private Long uptownId;
+
+    /**
+     * 团购标题
+     */
+    private String tgTitle;
+
+    /**
+     * 团购供应商
+     */
+    private String tgSupplier;
+
+    /**
+     * 团购物资(套餐)
+     */
+    private String tgGoods;
+
+    /**
+     * 价格
+     */
+    private String tgPrice;
+
+    /**
+     * 最小起订量
+     */
+    private Integer tgMinNum;
+
+    /**
+     * 团购截止时间
+     */
+    private Date tgEndTime;
+
+    /**
+     * 预计送货时间
+     */
+    private Date tgDeliverTime;
+
+    /**
+     * 联系人电话
+     */
+    private String tgPhoneNumber;
+
+    /**
+     * 增补修订
+     */
+    private String remark;
+
+    /**
+     * 团购状态:1在团,2发货,3完成,4取消
+     */
+    private Integer tgStatus;
+
+    private static final long serialVersionUID = 1L;
+}

+ 9 - 2
whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java

@@ -52,7 +52,7 @@ public class YeWeiHuiController {
     private RbMapper rbMapper;
 
     @GetMapping("/yeweihui/home.html")
-    public ModelAndView yeweihui(ModelMap model,@RequestParam(value = "userId") Long userId, @RequestParam(value = "showQZ", required = false, defaultValue = "-") String showQZ) {
+    public ModelAndView yeweihui(ModelMap model,@RequestParam(value = "userId") Long userId, @RequestParam(value = "show", required = false, defaultValue = "-") String show) {
 
 //        List<QzTask> taskList = qzTaskService.selectAll(1225321682867105793L);
 //        List<sysUptownUnit> rbList = rbService.selectAll(1225321682867105793L);
@@ -61,7 +61,7 @@ public class YeWeiHuiController {
         model.put("taskList", YvanUtil.toJsonPretty(taskList));
         model.put("rbList", YvanUtil.toJsonPretty(rbList));
         model.put("user_id", "\""+userId+"\"");
-        model.put("showQZ", "\""+showQZ+"\"");
+        model.put("show", "\""+show+"\"");
 
         return new ModelAndView("/yeweihui/home.ftl", model);
     }
@@ -270,4 +270,11 @@ public class YeWeiHuiController {
             ExcelUtils.writeSheet(ExcelRiBaoPrivate.class, list).export(resp, fileName);
         }
     }
+
+    @GetMapping("/yeweihui/tgPublish.html")
+    public ModelAndView tuangouPublish(@Pd(name = "userId") Long userId, ModelMap model) throws JsonProcessingException {
+        model.put("userId", "\""+userId+"\"");
+
+        return new ModelAndView("/yeweihui/tgPublish.ftl", model);
+    }
 }