zhijiezhao 3 years ago
parent
commit
26e9a2c1db

+ 1 - 1
src/main/java/com/caimei/modules/bulkpurchase/entity/PurchaseProduct.java

@@ -16,7 +16,7 @@ import java.util.List;
 public class PurchaseProduct extends DataEntity<PurchaseProduct> {
 
     private static final long serialVersionUID = 1L;
-    private String discounts; //是否支持叠加优惠,0支持,1不支持
+    private String discounts; //是否支持叠加优惠,1支持,2不支持
     private String purchaseProductName;        // 商品名称
     private String name;        // 商品名称
     private String image;//商品图片

+ 2 - 2
src/main/java/com/caimei/modules/product/entity/CmPromotion.java

@@ -13,11 +13,11 @@ public class CmPromotion extends DataEntity<CmPromotion> {
     private static final long serialVersionUID = 1L;
 
     /**
-     * 是否支持叠加优惠,0支持,1不支持
+     * 是否支持叠加优惠,1支持,2不支持
      */
     private String discount;
     /**
-     * 活动可见度,0所有人,1仅对机构
+     * 活动可见度, 1所有人,2仅对机构
      */
     private String seen;
     /**

+ 4 - 4
src/main/webapp/WEB-INF/views/modules/product-new/multiPromotionForm.jsp

@@ -400,14 +400,14 @@
 
     <div class="control-group" id="discount">
         <label>叠加优惠:</label>
-        <input type="radio" name="discount" value="0" ${cmPromotion.discount == null ? "checked" : cmPromotion.discount == "0"?"checked":""} />支持
-        <input type="radio" name="discount" value="1" ${cmPromotion.discount == "1" ? "checked" : ""} />不支持
+        <input type="radio" name="discount" value="0" ${cmPromotion.discount == null ? "checked" : cmPromotion.discount == "1"?"checked":""} />支持
+        <input type="radio" name="discount" value="1" ${cmPromotion.discount == "2" ? "checked" : ""} />不支持
     </div>
 
     <div class="control-group">
         <label>活动可见度:</label>
-        <input type="radio" name="seen" value="0" ${cmPromotion.seen == null ? "checked" : cmPromotion.seen == "0"?"checked":""}/>对所有人可见(含协销)
-        <input type="radio" name="seen" value="1" ${cmPromotion.seen == "1" ? "checked" : ""}/>仅对机构可见(不含协销)
+        <input type="radio" name="seen" value="0" ${cmPromotion.seen == null ? "checked" : cmPromotion.seen == "1"?"checked":""}/>对所有人可见(含协销)
+        <input type="radio" name="seen" value="1" ${cmPromotion.seen == "2" ? "checked" : ""}/>仅对机构可见(不含协销)
     </div>
 
     <div class="control-group">

+ 4 - 4
src/main/webapp/WEB-INF/views/modules/product-new/shopPromotionForm.jsp

@@ -397,14 +397,14 @@
 
     <div class="control-group" id="discount">
         <label>叠加优惠:</label>
-        <input type="radio" name="discount" value="0" ${cmPromotion.discount == null ? "checked" : cmPromotion.discount == "0"?"checked":""} />支持
-        <input type="radio" name="discount" value="1" ${cmPromotion.discount == "1" ? "checked" : ""} />不支持
+        <input type="radio" name="discount" value="0" ${cmPromotion.discount == null ? "checked" : cmPromotion.discount == "1"?"checked":""} />支持
+        <input type="radio" name="discount" value="1" ${cmPromotion.discount == "2" ? "checked" : ""} />不支持
     </div>
 
     <div class="control-group">
         <label>活动可见度:</label>
-        <input type="radio" name="seen" value="0" ${cmPromotion.seen == null ? "checked" : cmPromotion.seen == "0"?"checked":""}/>对所有人可见(含协销)
-        <input type="radio" name="seen" value="1" ${cmPromotion.seen == "1" ? "checked" : ""}/>仅对机构可见(不含协销)
+        <input type="radio" name="seen" value="0" ${cmPromotion.seen == null ? "checked" : cmPromotion.seen == "1"?"checked":""}/>对所有人可见(含协销)
+        <input type="radio" name="seen" value="1" ${cmPromotion.seen == "2" ? "checked" : ""}/>仅对机构可见(不含协销)
     </div>
 
     <div class="control-group">

+ 4 - 4
src/main/webapp/WEB-INF/views/modules/product-new/singlePromotionForm.jsp

@@ -441,14 +441,14 @@
 
     <div class="control-group" id="discount" style="display: ${cmPromotion.mode == null ? "none" : cmPromotion.mode == "1"?"none":""}">
         <label>叠加优惠:</label>
-        <input type="radio" name="discount" value="0" ${cmPromotion.discount == null ? "checked" : cmPromotion.discount == "0"?"checked":""} />支持
-        <input type="radio" name="discount" value="1" ${cmPromotion.discount == "1" ? "checked" : ""} />不支持
+        <input type="radio" name="discount" value="0" ${cmPromotion.discount == null ? "checked" : cmPromotion.discount == "1"?"checked":""} />支持
+        <input type="radio" name="discount" value="1" ${cmPromotion.discount == "2" ? "checked" : ""} />不支持
     </div>
 
     <div class="control-group">
         <label>活动可见度:</label>
-        <input type="radio" name="seen" value="0" ${cmPromotion.seen == null ? "checked" : cmPromotion.seen == "0"?"checked":""}/>对所有人可见(含协销)
-        <input type="radio" name="seen" value="1" ${cmPromotion.seen == "1" ? "checked" : ""}/>仅对机构可见(不含协销)
+        <input type="radio" name="seen" value="0" ${cmPromotion.seen == null ? "checked" : cmPromotion.seen == "1"?"checked":""}/>对所有人可见(含协销)
+        <input type="radio" name="seen" value="1" ${cmPromotion.seen == "2" ? "checked" : ""}/>仅对机构可见(不含协销)
     </div>
 
     <div class="control-group">

+ 4 - 4
src/main/webapp/static/modules/bulkpurchase/orderForm.js

@@ -1076,7 +1076,7 @@ function setGiftHtmlList(data, cmPromotion) {
                                     .attr("data-value"));
                                 console.log(thisTouchPrice);
                                 console.log(data.cmPromotion.touchPrice);
-                                if (gift.discounts * 1 === 0) {
+                                if (gift.discounts * 1 === 1) {
                                     // var totalfee = $(".totalFee").val();
                                     var b = Math.floor(thisTouchPrice / data.cmPromotion.touchPrice);
                                     gift.num = gift.num * 1 * b + pageGift.num * 1;
@@ -1085,7 +1085,7 @@ function setGiftHtmlList(data, cmPromotion) {
                                 }
                                 $("#product_promotion_" + gift.productId).remove();
                             }
-                            if (gift.discounts * 1 === 0) {
+                            if (gift.discounts * 1 === 1) {
                                 // var totalfee = $(".totalFee").val();
                                 var b = Math.floor(thisTouchPrice / data.cmPromotion.touchPrice);
                                 gift.num = gift.num * 1 * b;
@@ -1275,7 +1275,7 @@ function setOrderFee() { //不考虑经理折扣、运费,此时 商品总金
                 touchPrice += (product.number * product.price + product.totalTax * 1);
             });
             if (touchPrice >= item.touchPrice) {
-                if (item.discount * 1 === 0) {
+                if (item.discount * 1 === 1) {
                     var b = Math.floor(touchPrice/item.touchPrice);
                     reducedPrice = b * item.reducedPrice;
                     payTotalFee -= reducedPrice;
@@ -2059,7 +2059,7 @@ function setProductTotalFee() {
                 touchPrice += (product.number * product.price + product.totalTax * 1);
             });
             if (touchPrice >= item.touchPrice) {
-                if (item.discount * 1 === 0) {
+                if (item.discount * 1 === 1) {
                     var b = Math.floor(touchPrice/item.touchPrice);
                     reducedPrice = b * item.reducedPrice;
                     payTotalFee -= reducedPrice;