Browse Source

联合丽格V1.0.2

kaick 1 year ago
parent
commit
880f024acc

+ 4 - 4
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -487,10 +487,10 @@ public class ProductNewController extends BaseController {
             for (CmSku s : product.getSkuList()) {
                 if (null != s.getCostCheckFlag() && s.getCostCheckFlag() == 2) {
                     double v = MathUtil.add(MathUtil.add(s.getShopPercent(), s.getOrganizePercent()), s.getCmPercent()).doubleValue();
-//                    if (v != 100) {
-//                        addMessage(redirectAttributes, "保存商品失败,佣金比例和必须为100");
-//                        return "redirect:" + Global.getAdminPath() + "/product/new/productEdit";
-//                    }
+                    if (v != 100) {
+                        addMessage(redirectAttributes, "保存商品失败,佣金比例和必须为100");
+                        return "redirect:" + Global.getAdminPath() + "/product/new/productEdit?id="+product.getId();
+                    }
                 }
             }
         }

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

@@ -825,14 +825,14 @@
             </td>
         </tr>
         <tr>
-            <td colspan="2" style="vertical-align: top;style="width: 620px;"">
-                <div class="detailInfoEditor" >
+            <td colspan="2" style="vertical-align: top;">
+                <div class="detailInfoEditor"  style="width: 620px;">
                     <form:textarea path="detailInfo" htmlEscape="false" class="input-xlarge required hide"/>
                     <!-- 富文本编辑器 -->
                     <div id="detailInfoEditor">${product.detailInfo}</div>
                 </div>
             </td>
-            <td colspan="3" style="text-align:center;style="width: 620px;"">
+            <td colspan="3" style="vertical-align: top;">
                 <div class="detailInfoEditor" style="width: 620px;">
                     <form:textarea path="commonDetailInfo" htmlEscape="false" class="input-xlarge required hide"/>
                     <!-- 富文本编辑器 -->
@@ -2167,8 +2167,9 @@
             minBuyNumber.parent('.sku-minBuyNumber').hide();
         }
         if (organize != 0) {
-            ladderPriceFlag.parent().hide();
+            ladderPriceFlag.parent().parent().hide();
         }
+        costCheckFlag.parent().parent().hide();
 
         ladderPriceBox.find('.ladderPrice').each(function (index, item) {
             var ladderPrice = {}