Browse Source

Merge remote-tracking branch 'origin/developer' into developer

Aslee 3 năm trước cách đây
mục cha
commit
645b4c03ff

+ 2 - 3
src/main/java/com/caimei/modules/cmpage/web/CmPageCentreController.java

@@ -114,7 +114,7 @@ public class CmPageCentreController extends BaseController {
         if ("5".equals(cmPageCentre.getType())) {
             //清除产品仪器缓存
             cleanRedisCache();
-        } else if ("6".equals(cmPageCentre.getType()) || "7".equals(cmPageCentre.getType())) {
+        } else {
             //清除活动专题缓存
             redisService.removePattern("getPageFloorData*");
         }
@@ -128,8 +128,7 @@ public class CmPageCentreController extends BaseController {
         if ("5".equals(cmPageCentre.getType())) {
             //清除产品仪器缓存
             cleanRedisCache();
-        }
-        if ("6".equals(cmPageCentre.getType()) || "7".equals(cmPageCentre.getType())) {
+        } else {
             //清除活动专题缓存
             redisService.removePattern("getPageFloorData*");
         }

+ 61 - 63
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -297,27 +297,20 @@
                     <form:option value="3" label="所有人可见"/>
                     <form:option value="2" label="所有机构可见"/>
                     <form:option value="1" label="仅会员机构可见"/>
+                    <form:option value="4" label="仅医美机构可见"/>
                 </form:select>
             </td>
         </tr>
         <tr>
             <th><span class="red">*</span>价格可见度:</th>
-            <td>
-                <form:select path="priceFlag" class="input-small required hide" id="priceFlag">
-                    <form:option value="1" label="所有机构都不可见"/>
-                    <form:option value="2" label="仅会员机构可见"/>
-                    <form:option value="0" label="所有机构都可见"/>
+            <td colspan="3">
+                <form:select path="priceFlag" class="input-large required" id="priceFlag">
+                    <form:option value="0" label="对所有机构公开"/>
+                    <form:option value="2" label="仅对会员机构公开"/>
+                    <form:option value="3" label="仅对医美机构公开"/>
+                    <form:option value="1" label="价格不公开"/>
                 </form:select>
             </td>
-            <td colspan="2">
-                <span id="textFlagNote" style="color:#ab1e1e;">
-                    ${product.priceFlag == "1" ?  "所有机构都不可见" : ""}
-                    ${product.priceFlag == "2" ?  "仅会员机构可见" : ""}
-                    ${product.priceFlag == "0" ? "所有机构都可见" : ""}
-                </span>
-                <%--<input type="radio" name="priceFlag" value="0" ${product.priceFlag == "0" ? "checked" : ""} />公开<b class="line">|</b>
-                <input type="radio" name="priceFlag" value="1" ${product.priceFlag == "1" ? "checked" : ""} />不公开--%>
-            </td>
         </tr>
         <tr>
             <th><span class="red">*</span>成本:</th>
@@ -519,55 +512,60 @@
             }
         });
     });
-    // 商品可见度
-    /*$(function() {
-        var initValue = ${(product.visibility <= 0) ? 3 : ((product.visibility >= 3) ? 3 : product.visibility)}
-        var select = $("#visibility");
-        var slider = $("<div id='slider'></div>").insertAfter(select).slider({
-          min: 1,
-          max: 3,
-          range: "min",
-          value: initValue,
-          slide: function(event, ui) {
-            if (ui.value*1 === 1){
-                // 所有可见
-                select.val(1);
-            } else if (ui.value*1 === 2){
-                // 会员可见
-                select.val(2);
-            } else{
-                // 不可见
-                select.val(3);
-            }
-            $("#visibilityNote").text(select.find("option:selected").text());
-          }
-        });
-    });*/
-    // 价格可见度
-    $(function() {
-        var initValue = ${(product.priceFlag eq 0) ? 2 : ((product.priceFlag eq 2) ? 1 : 0)}
-        var select = $("#priceFlag");
-        var slider = $("<div id='slider'></div>").insertAfter(select).slider({
-          min: 0,
-          max: 2,
-          range: "min",
-          value: initValue,
-          slide: function(event, ui) {
-            if (ui.value*1 === 2){
-                // 所有可见
-                select.val(0);
-            } else if (ui.value*1 === 1){
-                // 会员可见
-                select.val(2);
-            } else{
-                // 不可见
-                select.val(1);
-            }
-            //select[0].selectedIndex = ui.value;
-            $("#textFlagNote").text(select.find("option:selected").text());
-          }
-        });
-    });
+    <%--// 商品可见度--%>
+    <%--/*$(function() {--%>
+    <%--    var initValue = ${(product.visibility <= 0) ? 3 : ((product.visibility >= 3) ? 3 : product.visibility)}--%>
+    <%--    var select = $("#visibility");--%>
+    <%--    var slider = $("<div id='slider'></div>").insertAfter(select).slider({--%>
+    <%--      min: 1,--%>
+    <%--      max: 3,--%>
+    <%--      range: "min",--%>
+    <%--      value: initValue,--%>
+    <%--      slide: function(event, ui) {--%>
+    <%--        if (ui.value*1 === 1){--%>
+    <%--            // 所有可见--%>
+    <%--            select.val(1);--%>
+    <%--        } else if (ui.value*1 === 2){--%>
+    <%--            // 会员可见--%>
+    <%--            select.val(2);--%>
+    <%--        } else{--%>
+    <%--            // 不可见--%>
+    <%--            select.val(3);--%>
+    <%--        }--%>
+    <%--        $("#visibilityNote").text(select.find("option:selected").text());--%>
+    <%--      }--%>
+    <%--    });--%>
+    <%--});*/--%>
+    <%--// 价格可见度: 1不公开价格,3仅对医美机构公开,2仅对会员机构公开,0公开价格--%>
+    <%--// 对应滑块:1->2->3->4--%>
+    <%--$(function() {--%>
+    <%--    var initValue = ${(product.priceFlag eq 0) ? 2 : ((product.priceFlag eq 2) ? 1 : 0)}--%>
+    <%--    var initValue = ${(product.priceFlag eq 1) ? 1 : ((product.priceFlag eq 3) ? 2 : ((product.priceFlag eq 2) ? 3 : 4))}--%>
+    <%--    var select = $("#priceFlag");--%>
+    <%--    var slider = $("<div id='slider'></div>").insertAfter(select).slider({--%>
+    <%--      min: 1,--%>
+    <%--      max: 4,--%>
+    <%--      range: "min",--%>
+    <%--      value: initValue,--%>
+    <%--      slide: function(event, ui) {--%>
+    <%--        if (ui.value*1 === 4){--%>
+    <%--            // 所有可见--%>
+    <%--            select.val(0);--%>
+    <%--        } else if (ui.value*1 === 3){--%>
+    <%--            // 会员可见--%>
+    <%--            select.val(2);--%>
+    <%--        } else if (ui.value*1 === 2){--%>
+    <%--            // 医美可见--%>
+    <%--            select.val(3);--%>
+    <%--        } else{--%>
+    <%--            // 不可见--%>
+    <%--            select.val(1);--%>
+    <%--        }--%>
+    <%--        //select[0].selectedIndex = ui.value;--%>
+    <%--        $("#textFlagNote").text(select.find("option:selected").text());--%>
+    <%--      }--%>
+    <%--    });--%>
+    <%--});--%>
 
     //初始化标签
     $(function () {

+ 9 - 3
src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp

@@ -191,6 +191,9 @@
 				</td>
 				<td>${product.price}</td>
 				<td>
+					<c:if test="${product.visibility eq 4}">
+						仅医美机构可见
+					</c:if>
 					<c:if test="${product.visibility eq 1}">
 						仅会员机构可见
 					</c:if>
@@ -207,14 +210,17 @@
 					</c:if>
 					<c:if test="${product.productCategory ne 2}">
 					    <c:if test="${product.priceFlag eq 0}">
-						<font color="green">所有机构都可见</font>
+						<font color="green">对所有机构公开</font>
                         </c:if>
                         <c:if test="${product.priceFlag eq 1}">
-                            <font color="red">所有机构都不可见</font>
+                            <font color="red">价格不公开</font>
                         </c:if>
                         <c:if test="${product.priceFlag eq 2}">
-                            <font color="darkorange">仅会员机构可见</font>
+                            <font color="#ff8c00">仅对会员机构公开</font>
                         </c:if>
+						<c:if test="${product.priceFlag eq 3}">
+							<font color="#ff69b4">仅对医美机构公开</font>
+						</c:if>
 					</c:if>
 				</td>
 				<td>

+ 3 - 2
src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp

@@ -348,9 +348,10 @@
 		<label class="control-label"><font color="red">*</font>商品可见度:</label>
 		<div class="controls">
 			<form:select path="visibility" class="input-large required" id="visibility">
-				<form:option value="1" label="仅会员机构可见"/>
-				<form:option value="2" label="所有机构可见"/>
 				<form:option value="3" label="所有人可见"/>
+				<form:option value="2" label="所有机构可见"/>
+				<form:option value="1" label="仅会员机构可见"/>
+				<form:option value="4" label="仅医美机构可见"/>
 			</form:select>
 		</div>
 	</div>