From 73eb1bc88a9a24f46850cfdf6c074906a2abe225 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Sat, 1 Nov 2025 16:18:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8D=B0=E7=99=BD=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 | 18 ++++++++- .../java/lingtao/net/util/PriceUtils.java | 29 ++++++++++++++- src/main/webapp/views/product/antifake.jsp | 12 +++++- src/main/webapp/views/product/handBag.jsp | 6 +-- src/main/webapp/views/product/metal.jsp | 1 + src/main/webapp/views/product/poster.jsp | 9 ++++- src/main/webapp/views/product/stickers.jsp | 37 +++++++++++++------ 7 files changed, 93 insertions(+), 19 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 808a7f3..885fa7b 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -4816,6 +4816,7 @@ public class ProductService { priceList.add(pro); return priceList; case "防伪标": + carft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>(); int[][] prices = { {176, 176, 176, 176, 176, 176, 176, 176, 180, 184, 192, 192, 202, 228, 228}, {180, 180, 182, 184, 186, 188, 196, 206, 240, 260, 274, 286, 306, 344, 360}, @@ -4833,6 +4834,9 @@ public class ProductService { for (Product product : priceList) { product.setPrice(Math.ceil(product.getPrice() * 1.3)); } + if (carft_list.contains("印白墨")) { + priceList = PriceUtils.getYinBaiPrice(priceList, width, length); + } return priceList; case "透卡": return getPETPrice(dto, width, length); @@ -5670,6 +5674,9 @@ public class ProductService { product.setPrice(Math.ceil(product.getPrice() * 2.3)); } } + if ("印白墨".equals(dto.getYinbai())) { + stickersList = PriceUtils.getYinBaiPrice(stickersList, width, length); + } /* * if ("印2色+凹凸".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int priceArr1[] = { 280, 300, 350, 460, 520, 660, 1100 }; // 6*5cm-8*8cm;10-3cm - 10*6cm以内 int priceArr2[] = { 280, 320, 450, 660, 780, 900, 1500 }; // 11*11cm内;12*8cm内;20*4cm以内 int priceArr3[] = { 340, 500, 850, 1100, 1550, 1700, 2500 }; stickersList = new YaJinStickersPrice().accountPriceBySize(width, length, count, priceArr1, priceArr2, priceArr3); } else if ("加凹凸".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int * priceArr1[] = { 170, 200, 230, 310, 360, 420, 710 }; // 6*5cm-8*8cm;10-3cm - 10*6cm以内 int priceArr2[] = { 200, 240, 350, 440, 560, 670, 1000 }; // 11*11cm内;12*8cm内;20*4cm以内 int priceArr3[] = { 240, 380, 620, 800, 940, 1050, 1960 }; stickersList = new YaJinStickersPrice().accountPriceBySize(width, length, count, priceArr1, priceArr2, priceArr3); } else if ("印2色".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int priceArr1[] = { 140, 170, 200, 280, 380, 420, 680 }; // @@ -5728,6 +5735,9 @@ public class ProductService { product.setPrice(Math.ceil(product.getPrice() + product.getPrice() * 1 / 10)); } } + if ("印白墨".equals(dto.getYinbai())) { + stickersList = PriceUtils.getYinBaiPrice(stickersList, width, length); + } break; case "格底珠光膜": if ("覆亮膜".equals(dto.getCraftMo())) { @@ -5952,6 +5962,9 @@ public class ProductService { } }); } + if ("印白墨".equals(dto.getYinbai())) { + stickersList = PriceUtils.getYinBaiPrice(stickersList, width, length); + } break; } return null; @@ -6004,6 +6017,9 @@ public class ProductService { product.setPrice(Math.ceil(product.getPrice() + product.getPrice() * 1 / 10)); } } + if ("印白墨".equals(dto.getYinbai())) { + stickersList = PriceUtils.getYinBaiPrice(stickersList, width, length); + } break; case "格底珠光膜": l = 42.0; @@ -6108,7 +6124,7 @@ public class ProductService { // } // } - if ("印白墨".equals(dto.getYinbai())) { + if ("印白墨".equals(dto.getYinbai()) && !"6".equals(kind) && !"拉丝银".equals(kind)) { stickersList = new PVCStickersPrice().acountYinbaiPrice(length, width, stickersList); } // 价格*款数 铜版纸放到外面执行 diff --git a/src/main/java/lingtao/net/util/PriceUtils.java b/src/main/java/lingtao/net/util/PriceUtils.java index 0c8fddd..8fa9bb4 100644 --- a/src/main/java/lingtao/net/util/PriceUtils.java +++ b/src/main/java/lingtao/net/util/PriceUtils.java @@ -1619,7 +1619,7 @@ public class PriceUtils { } if (!StringUtils.isEmpty(zhuan)) { - if ("烫金".equals(zhuan[0]) || "烫哑金".equals(zhuan[0]) || "烫亮金".equals(zhuan[0]) || "烫银".equals(zhuan[0]) || "烫蓝".equals(zhuan[0]) || "烫红".equals(zhuan[0]) || "烫黑".equals(zhuan[0]) || "玫瑰金".equals(zhuan[0]) || "镭射银".equals(zhuan[0]) || "镭射金".equals(zhuan[0]) || "炫彩镭射".equals(zhuan[0])) { + if ("烫金".equals(zhuan[0]) || "烫哑金".equals(zhuan[0]) || "烫哑银".equals(zhuan[0]) || "烫亮金".equals(zhuan[0]) || "烫银".equals(zhuan[0]) || "烫蓝".equals(zhuan[0]) || "烫红".equals(zhuan[0]) || "烫黑".equals(zhuan[0]) || "玫瑰金".equals(zhuan[0]) || "镭射银".equals(zhuan[0]) || "镭射金".equals(zhuan[0]) || "炫彩镭射".equals(zhuan[0])) { // 起步价+58元 price = price + (40 * area); price = price > 80 ? price : 80; @@ -3702,6 +3702,33 @@ public class PriceUtils { return price; } + public static List getYinBaiPrice(List productList, double width, double length) { + double miniprice = 50; + double miniarea = 9; + //cm + double[] prices = {7.2, 4.6, 4, 2.8, 2.5, 2.24, 2.02, 1.92, 1.63, 1.56, 1.34, 1.26, 1.25, 1.04, 0.86, 0.64}; + double[] areas = {9, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 140, 210, 420}; + double area = width * length; + double craft_price = 0; + if (area < miniarea) { + craft_price = miniprice; + } else { + for (int i = 1; i < areas.length; i++) { + if (area < areas[i]) { + craft_price = prices[i - 1] * area; + break; + } + } + if (craft_price == 0) { + craft_price = prices[prices.length - 1] * area; + } + } + for (Product pro : productList) { + pro.setPrice(Math.ceil(pro.getPrice() + craft_price)); + } + return productList; + } + public FunReturnVo getBagTagPrice(String kind2Value, String kindValue) { FunReturnVo vo = new FunReturnVo(); if ("1".equals(kind2Value)) { diff --git a/src/main/webapp/views/product/antifake.jsp b/src/main/webapp/views/product/antifake.jsp index de7037d..20730cc 100644 --- a/src/main/webapp/views/product/antifake.jsp +++ b/src/main/webapp/views/product/antifake.jsp @@ -66,6 +66,9 @@
覆膜工艺:
+
印白工艺: + +

@@ -149,7 +152,14 @@ } form.on("select(kindValue)", (data) => { + $("#yinbai").hide(); + $("#yinbai").find("input").prop("disabled", true) + if (data.value == "VOID哑银") { + $("#yinbai").show(); + $("#yinbai input").prop("disabled", false) + } getProductImage(); + form.render(); }) form.on("checkbox(switch)", (data) => { let arr = [] @@ -199,7 +209,7 @@ let kind = $("select[name='kindValue'] option:selected").val(); let number = $("#number").val(); $("input[name='craft']:checked").each(function () { - if (!$(this).is("disabled")) { + if (!$(this).prop("disabled")) { arr.push($(this).val()) } }) diff --git a/src/main/webapp/views/product/handBag.jsp b/src/main/webapp/views/product/handBag.jsp index d13d100..5bb8b33 100644 --- a/src/main/webapp/views/product/handBag.jsp +++ b/src/main/webapp/views/product/handBag.jsp @@ -97,7 +97,7 @@ - +

@@ -294,7 +294,7 @@ - ` + ` } if (data.value == 1) { html = ` @@ -395,7 +395,7 @@ - `; + `; $("#shen_color").empty().append(html); form.render(); } diff --git a/src/main/webapp/views/product/metal.jsp b/src/main/webapp/views/product/metal.jsp index f2434ac..722ce49 100644 --- a/src/main/webapp/views/product/metal.jsp +++ b/src/main/webapp/views/product/metal.jsp @@ -153,6 +153,7 @@ -

+
配件: