Forráskód Böngészése

新增金属标颜色

zhuyiyi 1 napja
szülő
commit
ab1e443e4b

+ 2 - 2
src/main/java/lingtao/net/service/ProductService.java

@@ -2624,7 +2624,7 @@ public class ProductService {
 
                             product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5));
 
-                            product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() / 10000));
+                            product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() * number / 10000 * 0.5));
                             if (product.getPrice() < apprise) {
                                 product.setPrice(apprise);
                             }
@@ -2695,7 +2695,7 @@ public class ProductService {
 //                    double base = number < 6 && number > 1 ? 5 : 0;
                     double apprise = 0;
                     for (Product product : priceList) {
-                        product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() / 10000));
+                        product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() * number / 10000 * 0.5));
                         if (apprise > product.getPrice()) {
                             product.setPrice(apprise);
                         }

+ 5 - 4
src/main/webapp/views/product/canopy.jsp

@@ -35,6 +35,7 @@
                 <span>
                     <input type="checkbox" name="switchSize" lay-filter="switchSize" title="自定义尺寸">
                 </span>
+                <span style="font-size:14px;color:red">尺寸超过160cm需要拼接!</span>
             </p>
             <div class="layui-form-item">
                 <select name="size" id="size" class="layui-form-select">
@@ -272,10 +273,10 @@
                 });
                 return false;
             }
-            if (size.split("*")[0] > 160 || size.split("*")[1] > 160) {
-                layer.msg('天幕尺寸超过160cm需要拼接!', {offset: ['300px', '300px']}, function () {
-                });
-            }
+            // if (size.split("*")[0] > 160 || size.split("*")[1] > 160) {
+            //     layer.msg('天幕尺寸超过160cm需要拼接!', {offset: ['300px', '300px']}, function () {
+            //     });
+            // }
             $.ajax({
                 url: "${path}/getThanSum",
                 type: "GET",

+ 3 - 0
src/main/webapp/views/product/metal.jsp

@@ -48,6 +48,9 @@
                         <option value="紫色">紫色</option>
                         <option value="玫红色">玫红色</option>
                         <option value="玫瑰金色">玫瑰金色</option>
+                        <option value="咖啡色(棕色)">咖啡色(棕色)</option>
+                        <option value="淡蓝色">淡蓝色</option>
+                        <option value="淡金色">淡金色</option>
                     </select>
                 </div>
                 <p>

+ 11 - 13
src/main/webapp/views/product/printedAcrylic.jsp

@@ -276,19 +276,17 @@
                 return false;
             }
 
-            //
-            // if ((size.split("*")[0] < 5.4 || size.split("*")[1] < 5.4)) {
-            //     if (!craft.includes("异形模切")) {
-            //         layer.msg("尺寸小与5.4*5.4请选择异形模切", {offset: ['300px', '300px']}, function () {
-            //         });
-            //         return false;
-            //     }
-            // }
-            // if ((size.split("*")[0] < 5.4 || size.split("*")[1] < 5.4)) {
-            //     layer.msg("最小尺寸不能小于5.4*5.4", {offset: ['300px', '300px']}, function () {
-            //     });
-            //     return false;
-            // }
+            
+            if ((size.split("*")[0] > 60 || size.split("*")[1] > 60)) {
+                layer.msg("最大尺寸不能大于60*60", {offset: ['300px', '300px']}, function () {
+                });
+                return false;
+            }
+            if ((size.split("*")[0] < 2.4 || size.split("*")[1] < 2.4)) {
+                layer.msg("最小尺寸不能小于2.4*2.4", {offset: ['300px', '300px']}, function () {
+                });
+                return false;
+            }
 
             $.ajax({
                 url: "${path}/getThanSum",