Explorar o código

商品详情显示默认修改

huangzhiguo %!s(int64=2) %!d(string=hai) anos
pai
achega
d98724a438

+ 15 - 15
src/main/resources/mappings/modules/cmme/product/CmmeProductMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.cmme.modules.product.dao.CmmeProductDao">
-    
+
 	<sql id="cmmeProductColumns">
 		a.productID AS "id",
 		a.productID AS "productID",
@@ -52,22 +52,22 @@
 		cpd.clinicalResult AS "clinicalResult",
 		cpd.video AS "video"
 	</sql>
-	
+
 	<sql id="cmmeProductJoins">
 		LEFT JOIN cmme_shop cs ON cs.shopID = a.shopID
 		LEFT JOIN cmme_productdetailinfo cpd ON cpd.productID = a.productID
 	</sql>
-    
+
 	<select id="get" resultType="CmmeProduct">
-		SELECT 
+		SELECT
 			<include refid="cmmeProductColumns"/>
 		FROM cmme_product a
 		<include refid="cmmeProductJoins"/>
 		WHERE a.productID = #{id}
 	</select>
-	
+
 	<select id="findList" resultType="CmmeProduct">
-		SELECT 
+		SELECT
 			<include refid="cmmeProductColumns"/>
 		FROM cmme_product a
 		<include refid="cmmeProductJoins"/>
@@ -88,7 +88,7 @@
 				AND a.shopCode = #{shopCode}
 			</if>
 			<if test="name != null and name != ''">
-				AND a.name LIKE 
+				AND a.name LIKE
 					<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
 					<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
 					<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
@@ -106,15 +106,15 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<select id="findAllList" resultType="CmmeProduct">
-		SELECT 
+		SELECT
 			<include refid="cmmeProductColumns"/>
 		FROM cmme_product a
 		<include refid="cmmeProductJoins"/>
 		<where>
-			
-		</where>		
+
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -123,7 +123,7 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<insert id="insert" parameterType="CmmeProduct"  keyProperty="id" useGeneratedKeys="true">
 		INSERT INTO cmme_product(
 			brandID,
@@ -201,7 +201,7 @@
 			#{docBoost}
 		)
 	</insert>
-	
+
 	<update id="update">
 		UPDATE cmme_product SET
 		<if test="brandID != null and brandID != ''">
@@ -315,7 +315,7 @@
 		    productID = #{productID}
 		WHERE productID = #{productID}
 	</update>
-	
+
 	<delete id="delete">
 		DELETE FROM cmme_product
 		WHERE productID = #{productID}
@@ -419,4 +419,4 @@
 			AND a.productID != #{productID}
 		</if>
 	</select>
-</mapper>
+</mapper>

+ 2 - 8
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -925,7 +925,7 @@
                 } else if (mac == '2') {
                     // 械字号二类
                     $("#visibility").val(3);
-                    $("#priceFlag").val(0);
+                    $("#priceFlag").val(3);
                     $("#commodityDetailsFlag").val(4);
                     $("#visibility").prev().find(".select2-chosen").text("所有人可见");
                     $("#priceFlag").prev().find(".select2-chosen").text("对所有机构公开");
@@ -933,18 +933,12 @@
                 } else if(mac == '3') {
                     // 械字号三类
                     $("#visibility").val(3);
-                    $("#priceFlag").val(0);
+                    $("#priceFlag").val(3);
                     $("#commodityDetailsFlag").val(4);
                     $("#visibility").prev().find(".select2-chosen").text("所有人可见");
                     $("#priceFlag").prev().find(".select2-chosen").text("对所有机构公开");
                     $("#commodityDetailsFlag").prev().find(".select2-chosen").text("仅医美机构可见");
                 }
-                // $("#priceFlag").val(3);
-                // $("#visibility").val(4);
-                // $("#visibility").prev().find(".select2-chosen").text("所有人可见");
-                // $("#priceFlag").prev().find(".select2-chosen").text("仅对医美机构开放");
-                // $("#priceFlag").prop("disabled",true);
-                // $("#visibility").prop("disabled",true);
             } else {
                 $("#priceFlag").prop("disabled",false);
                 $("#visibility").prop("disabled",false);