Jelajahi Sumber

业主购买2月10号

guojing 5 tahun lalu
induk
melakukan
16d624f10e

+ 7 - 4
whepi-ui/templates/home/buy.ftl

@@ -130,19 +130,22 @@
                     '                        <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 5vh;">\n' +
                     '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">' + v.tgTitle + '</div>\n' +
                     '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">' + timestampToTime(v.timeCreate) + '</div>\n' +
-                    '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">' + getStatus(v.tgStatus) + '</div>\n' +
-                    '                        </div>\n' +
+                    '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">' + getStatus(v.buyStatus) + '</div>\n' +
+                    '                        </div>\n' + '<div style="display: none;width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 12px">' + getStatus(v.tgStatus) + '</div>\n' +
                     '                    </a>')
         }
 
         function myBuyClick2(v) {
-            window.location.href = "/home/buytc.html?userId=" + $('#userId').val() + "&jmId=" + v.jmId + "&type=" + 2+"&tgStatus="+v.tgStatus;
+            if (v.buyStatus != 1) {
+                return  $.alert("该订单已经取消");
+            }
+            window.location.href = "/home/buytc.html?userId=" + $('#userId').val() + "&jmId=" + v.jmId + "&type=" + 2 + "&tgStatus=" + v.tgStatus;
         }
 
 
         /*居民求助信息*/
         function myBuyClick(v) {
-            window.location.href = "/home/buytc.html?userId=" + $('#userId').val() + "&jmId=" + v.jmId + "&type=" + 1+"&tgStatus="+v.tgStatus;
+            window.location.href = "/home/buytc.html?userId=" + $('#userId').val() + "&jmId=" + v.jmId + "&type=" + 1 + "&tgStatus=" + v.tgStatus;
         }
 
 

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

@@ -88,6 +88,10 @@
          error: function () {
          }
      });
+     //自己的列表的也不允许修改
+     /*if () {
+
+     }*/
      </#if>
         //套餐不在团不允许添加修改
         if ($('#tgStatusBuy').val() != 1) {
@@ -96,7 +100,6 @@
             $('#Myremarks').attr("disabled", "disabled");
         }
 
-
     })(jQuery);
 
     function timestampToTime(timestamp) {

+ 1 - 1
whepi-web/src/main/resources/mapper/BuyMapper.xml

@@ -19,7 +19,7 @@
     </select>
 
     <select id="MyGroup" resultType="com.bofeng.entity.Buy">
-        select DISTINCT a.tg_title,b.time_create,a.tg_status,a.jm_id
+        select DISTINCT a.tg_title,b.time_create,a.tg_status,a.jm_id,b.buy_status
         from  jm_tuangou a
         INNER JOIN jm_buy b on a.jm_id=b.jm_id
         where a.user_id=#{userId}