From fea143f0e194ecfc2602df79daea0ce9bf67333c Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Fri, 17 Apr 2026 14:45:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=A1=E7=89=87=E5=B7=A5?= =?UTF-8?q?=E8=89=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 50 +++- src/main/webapp/views/product/coupon.jsp | 267 ++++++++++-------- src/main/webapp/views/product/stickers.jsp | 68 ++++- 3 files changed, 259 insertions(+), 126 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index c25e314..3ee427e 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -410,6 +410,22 @@ public class ProductService { oldKind = "13"; dto.setKindValue("2"); kind = "2"; + } else if ("17".equals(kind) || "18".equals(kind)) { + // 单个产品的面积 + area = (length + 0.3) * (width + 0.3) / 10000; + if ("17".equals(kind)) { + kind = "6"; + } + if ("18".equals(kind)) { + kind = "7"; + } + priceList = new PriceUtils().rollLabelPrice(kind, area, count, dto.getCraft(), dto.getYinbai(), dto.getCraftTang(), getStickersTanBasePrice(area * 10000)); + // 根据款数重新算价格/计算重量 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25)); + } + return priceList; } else if ("15".equals(kind) || "16".equals(kind)) { List craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>(); @@ -1800,7 +1816,7 @@ public class ProductService { } } else { dto.setMaxian(1); - getCraft(dto, priceList, null, null, 0); + getCraft(dto, priceList, length, width, 0); } // 根据位数重新算价格 // 根据款数重新算价格 @@ -7786,20 +7802,30 @@ public class ProductService { } } if ("特种纸名片".equals(dto.getProTypeValue()) && craftList.contains("异形模切") && !craftList.contains("单面烫金") && !craftList.contains("双面烫金")) {// 200-500张按照原有的价格乘以3倍 1000-5000张按照原有的价格乘以2.4倍 5000-10000张按照原有的价格乘以2倍 + double[] prices = {140, 190, 260, 470, 690, 1110, 2190}; + int[] counts = {200, 500, 1000, 2000, 3000, 5000, 10000}; + int num = getNum(width, length); + if (num == 1) { + } else if (num == 2) { + prices = new double[]{250, 350, 475, 860, 1250, 2025, 3990}; + } else if (num == 3) { + prices = new double[]{340, 470, 625, 1140, 1650, 2675, 5250}; + } else if (num == 5) { + prices = new double[]{475, 650, 870, 1575, 2290, 3425, 6750}; + } else if (num == 6) { + prices = new double[]{600, 800, 1100, 1900, 2550, 4000, 7900}; + } else { + prices = new double[]{750, 950, 1300, 2500, 3450, 4900, 9400}; + } for (Product product : priceList) { - if (200 <= product.getCount() && product.getCount() <= 500) { - product.setPrice(Math.ceil(product.getPrice() * 3)); - } - if (500 < product.getCount() && product.getCount() <= 1000) { - product.setPrice(Math.ceil(product.getPrice() * 2.6)); - } - if (1000 < product.getCount() && product.getCount() <= 5000) { - product.setPrice(Math.ceil(product.getPrice() * 2.4)); - } - if (5000 < product.getCount() && product.getCount() <= 10000) { - product.setPrice(Math.ceil(product.getPrice() * 2)); + for (int i = 0; i < counts.length; i++) { + if (counts[i] == product.getCount()) { + product.setPrice(prices[i]); + + } } } + } if (craftList.contains("异形")) {// 广告扇工艺(选了异形,每把+3毛钱 for (Product product : priceList) { diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index 4ad7542..3881c83 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -460,62 +460,80 @@ <%-- title="双面覆哑膜">--%> <%-- --%>
- - - - - - - - - - - - - - -
+
+ 烫金工艺: -
- -
x -
- -
-
+
+ +
x +
+ +
+
+ 特殊工艺: @@ -653,42 +681,53 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - @@ -785,24 +824,30 @@ 工艺

- - diff --git a/src/main/webapp/views/product/stickers.jsp b/src/main/webapp/views/product/stickers.jsp index 67edb0f..4e5e0ee 100644 --- a/src/main/webapp/views/product/stickers.jsp +++ b/src/main/webapp/views/product/stickers.jsp @@ -64,6 +64,8 @@ + +
+
@@ -536,6 +557,8 @@ $(".ui_toothpick").hide(); $(".pf").hide(); $(".n_mq").hide(); + $(".ui_jb").hide() + $('.ui_jb').find("input").prop("disabled", true); $('.pf input').prop("checked", false); $('.n_mq input').prop("disabled", true); $(".caiqie").hide(); @@ -838,6 +861,8 @@ } } else if (kindvalue == "250克白卡纸对裱") { html += "广东:(3-4天发货) 中通 圆通 顺丰;" + } else if (kindvalue == "17" || kindvalue == "18") { + html += "河南: (4-5天发货) 中通 德邦 顺丰
河南: 加烫金/白墨工艺 (5-6天发货) 中通 德邦 顺丰" } } return html; @@ -906,6 +931,14 @@ $(".sjitu select").attr("disabled", true); $(".ystj").hide(); $(".ystj").find("input").attr("disabled", true); + $(".ui_jb").hide() + $('.ui_jb').find("input").prop("disabled", true); + $("#craftForm").show(); + $('#craftForm').find("input").prop("disabled", false); + $("#ui_normal").show(); + $("#ui_normal").find("input").prop("disabled", false); + $("#ui_print").hide(); + $("#ui_print").find("input").prop("disabled", true); let count_html = ` @@ -1098,6 +1131,16 @@ $(".n_mq").hide(); $('.n_mq input').prop("disabled", true); } + if (data.value == "17" || data.value == "18") { + $("#craftForm").hide(); + $('#craftForm').find("input").prop("disabled", true); + $(".ui_jb").show() + $('.ui_jb').find("input").prop("disabled", false); + $("#ui_print").show(); + $("#ui_print").find("input").prop("disabled", false); + $("#ui_normal").hide(); + $("#ui_normal").find("input").prop("disabled", true); + } $("#ui_normal #count").empty().append(count_html); form.render();//必须写 @@ -1250,6 +1293,13 @@ } else { TJValue = "" } + var moLen = $(".fm:checked").length; + if (moLen > 1) { + $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox"); + $(data.elem).prop("checked", false); + layer.msg('[覆膜 - 镭射膜]不能同时选择!', {offset: ['300px', '300px']}, {icon: 5}); + return false; + } var content = getContent(kindvalue, TJValue); @@ -1679,7 +1729,18 @@ return false; } } - + if (kindValue == "17" || kindValue == "18") { + if ((size.split("*")[0] > 42 || size.split("*")[1] > 38) && (size.split("*")[0] > 38 || size.split("*")[1] > 42)) { + layer.msg("卷装标签尺寸不能超过42*38 cm", {offset: ['300px', '300px']}, function () { + }); + return false; + } + if ((size.split("*")[0] < 2 || size.split("*")[1] < 2)) { + layer.msg("卷装标签尺寸小于2*2 cm 请单独报价!", {offset: ['300px', '300px']}, function () { + }); + return false; + } + } if (kindValue != 0 && kindValue != 1 && kindValue != 2 && kindValue != "拉丝金" && kindValue != "拉丝银" && kindValue != "格底珠光膜" && kindValue != "PP合成纸") { craftMo = "" @@ -1744,7 +1805,6 @@ } } - var kindData = { 0: "铜板纸不干胶", 1: "pvc不干胶", @@ -1760,7 +1820,9 @@ 12: "珠光超白", 13: "10C静电膜", 15: "树纹纸", - 16: "草香纸/大地纸" + 16: "草香纸/大地纸", + 17: "单防热敏纸(底纸白色)", + 18: "三防热敏纸(底纸蓝色)" }; var kind = kindData[kindValue]; if (!kind) {