Longlin před 5 roky
rodič
revize
9f8def5ebd

+ 10 - 2
whepi-ui/templates/groupBuying/groupBuyingCx.ftl

@@ -23,9 +23,9 @@
             <div style="height: 1vh;"></div>
             <p style="text-indent: -0em;margin-left: 2em;">单&nbsp;&nbsp;&nbsp;&nbsp;价:&nbsp;&nbsp;${ tgItem.tgPrice }</p>
             <div style="height: 1vh;"></div>
-            <p style="text-indent: -0em;margin-left: 2em;">最低起送(份):&nbsp;&nbsp;${ tgItem.tgMinNum }</p>
+            <p id="cx_p_tgMinNum" style="text-indent: -0em;margin-left: 2em;">最低起送(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
-            <p style="text-indent: -0em;margin-left: 2em;">最大订量(份):&nbsp;&nbsp;${ tgItem.tgMaxNum }</p>
+            <p id="cx_p_tgMaxNum" style="text-indent: -0em;margin-left: 2em;">最大订量(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
             <p id="cx_p_tgItemNum" style="text-indent: -0em;margin-left: 2em;">个人限额(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
@@ -57,6 +57,14 @@
     $('#cx_p_endTime').append(tgItem.tgEndTime);
     $('#cx_p_deliverTime').append(tgItem.tgDeliverTime);
 
+    if (tgItem.tgMinNum != 0) {
+        $('#cx_p_tgMinNum').append(tgItem.tgMinNum);
+    }
+
+    if (tgItem.tgMaxNum != 0) {
+        $('#cx_p_tgMaxNum').append(tgItem.tgMaxNum);
+    }
+
     if (tgItem.tgItemNum != 0) {
         $('#cx_p_tgItemNum').append(tgItem.tgItemNum);
     }

+ 10 - 2
whepi-ui/templates/groupBuying/groupBuyingXx.ftl

@@ -24,9 +24,9 @@
             <div style="height: 1vh;"></div>
             <p style="text-indent: -0em;margin-left: 2em;">单&nbsp;&nbsp;&nbsp;&nbsp;价:&nbsp;&nbsp;${ tgItem.tgPrice }</p>
             <div style="height: 1vh;"></div>
-            <p style="text-indent: -0em;margin-left: 2em;">最低起送(份):&nbsp;&nbsp;${ tgItem.tgMinNum }</p>
+            <p id="p_tgMinNum" style="text-indent: -0em;margin-left: 2em;">最低起送(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
-            <p style="text-indent: -0em;margin-left: 2em;">最大订量(份):&nbsp;&nbsp;${ tgItem.tgMaxNum }</p>
+            <p id="p_tgMaxNum" style="text-indent: -0em;margin-left: 2em;">最大订量(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
             <p id="p_tgItemNum" style="text-indent: -0em;margin-left: 2em;">个人限额(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
@@ -136,6 +136,14 @@
     $('#p_endTime').append(tgItem.tgEndTime);
     $('#p_deliverTime').append(tgItem.tgDeliverTime);
 
+    if (tgItem.tgMinNum != 0) {
+        $('#p_tgMinNum').append(tgItem.tgMinNum);
+    }
+
+    if (tgItem.tgMaxNum != 0) {
+        $('#p_tgMaxNum').append(tgItem.tgMaxNum);
+    }
+
     if (tgItem.tgItemNum != 0) {
         $('#p_tgItemNum').append(tgItem.tgItemNum);
     }

+ 10 - 6
whepi-ui/templates/yeweihui/tgPublish.ftl

@@ -156,9 +156,11 @@
         //     return;
         // }
 
-        if (parseInt(maxnum) < parseInt(minnum)) {
-            $.alert("最大订量应大于或等于最低起送量");
-            return;
+        if (maxnum != "0" && minnum != "0") {
+            if (parseInt(maxnum) < parseInt(minnum)) {
+                $.alert("最大订量应大于或等于最低起送量");
+                return;
+            }
         }
 
         // if (parseInt(itemNum) <= 0) {
@@ -166,9 +168,11 @@
         //     return;
         // }
 
-        if (parseInt(maxnum) < parseInt(itemNum)) {
-            $.alert("最大订量应大于或等于个人限额");
-            return;
+        if (maxnum != "0" && itemNum != "0") {
+            if (parseInt(maxnum) < parseInt(itemNum)) {
+                $.alert("最大订量应大于或等于个人限额");
+                return;
+            }
         }
 
         let curTimestamp =(new Date()).valueOf();