diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 820b540..5587688 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/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); } diff --git a/src/main/webapp/views/product/canopy.jsp b/src/main/webapp/views/product/canopy.jsp index 847a12a..5ad2cda 100644 --- a/src/main/webapp/views/product/canopy.jsp +++ b/src/main/webapp/views/product/canopy.jsp @@ -35,6 +35,7 @@ + 尺寸超过160cm需要拼接!
diff --git a/src/main/webapp/views/product/printedAcrylic.jsp b/src/main/webapp/views/product/printedAcrylic.jsp index becb813..2a244ed 100644 --- a/src/main/webapp/views/product/printedAcrylic.jsp +++ b/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",