From 662d2b010ec254b16e4c5fd6532dac56e077f837 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Wed, 24 Sep 2025 14:55:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=B9=E7=A7=8D=E7=BA=B8?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 22 ++--- src/main/webapp/views/product/coupon.jsp | 9 +- .../webapp/views/product/specialCard2.jsp | 91 ++++++++++++++----- 3 files changed, 86 insertions(+), 36 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index ad402b7..9c8311a 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -1460,25 +1460,27 @@ public class ProductService { } else if ("素芸".equals(kind)) { int[] count_list = {100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000}; double[] prices = {}; + prices = new double[]{144, 272, 528, 660, 1280, 2560, 3840, 6400, 12800}; - if (craft_list.contains("圆角") && !craft_list.contains("击凸") && !craft_list.contains("压凹") && !craft_list.contains("单面烫金") && !craft_list.contains("双面烫金")) { + if (craft_list.contains("击凸") || craft_list.contains("压凹") || (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) { + prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300}; + } + if (craft_list.contains("圆角")) { prices = new double[]{146, 276, 536, 670, 1300, 2600, 3900, 6500, 13000}; } if (craft_list.contains("圆角") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) { prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500}; } - if (!craft_list.contains("圆角") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) { - prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300}; - } if (craft_list.contains("圆角") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) { prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500}; } - if (!craft_list.contains("圆角") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) { + if (craft_list.contains("异形模切") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) { prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300}; } - if (prices.length == 0 || craft_list.size() == 0 || craft_list.contains("异形模切")) { - prices = new double[]{144, 272, 528, 660, 1280, 2560, 3840, 6400, 12800}; + if (craft_list.contains("异形模切") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) { + prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300}; } + priceList = new ArrayList<>(); Product dto2 = null; @@ -1519,11 +1521,7 @@ public class ProductService { int min = getNum(length, width); for (Product product : priceList) { - if (craft_list.contains("异形模切")) { - product.setPrice(Math.floor(product.getPrice() * number * min * 2)); - } else { - product.setPrice(Math.floor(product.getPrice() * number * min)); - } + product.setPrice(Math.floor(product.getPrice() * number * min)); product.setWeight(df.format(number * (length) / 100 * (width) / 100 * product.getCount() * 0.5)); } return priceList; diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index 3f36bd2..4ce3142 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -1925,7 +1925,14 @@ $(".tj").hide(); $(".tj").find(":input").attr("disabled", true); } - + form.on('checkbox(switchMQ)', function (switchData) { + if ($(".mq:checked").length > 1) { + $(switchData.elem).next().attr("class", "layui-unselect layui-form-checkbox"); + $(switchData.elem).prop("checked", false); + layer.msg('[裁切- 模切]不能同时选择!', {offset: ['300px', '300px']}, {icon: 5}); + return false; + } + }) form.render('checkbox'); diff --git a/src/main/webapp/views/product/specialCard2.jsp b/src/main/webapp/views/product/specialCard2.jsp index 94b3344..b6df5c4 100644 --- a/src/main/webapp/views/product/specialCard2.jsp +++ b/src/main/webapp/views/product/specialCard2.jsp @@ -167,10 +167,8 @@ class="noCraft"> - -
@@ -211,12 +219,15 @@ - -