From ab1e443e4b19c945aa7f25e94363cfbabb7ed41e Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Thu, 7 May 2026 15:44:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=87=91=E5=B1=9E=E6=A0=87?= =?UTF-8?q?=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 4 ++-- src/main/webapp/views/product/canopy.jsp | 9 +++---- src/main/webapp/views/product/metal.jsp | 3 +++ .../webapp/views/product/printedAcrylic.jsp | 24 +++++++++---------- 4 files changed, 21 insertions(+), 19 deletions(-) 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",