From 6b9c9feefb8f4f3b1197296440f9ad1ea2456fa8 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Wed, 8 Apr 2026 15:36:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B5=81=E8=8B=8F=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 | 7 ++++++ .../java/lingtao/net/util/PosterPrice.java | 2 +- src/main/webapp/views/product/coupon.jsp | 23 +++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 2cdc3e7..5980fff 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -3136,12 +3136,19 @@ public class ProductService { if (Arrays.binarySearch(dto.getCraft(), "配弹力绳") > -1) { peijianPrice = 0.05; } + for (Product product : priceList) { if (peijianPrice > 0) { product.setPrice(Math.ceil(product.getPrice() + peijianPrice * dto.getCount() * dto.getNumber() + 5)); } } + if (Arrays.binarySearch(dto.getCraft(), "配流苏") > -1) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + Math.max(5, 3 * dto.getCo_number()))); + } + } } + if (!role.contains("1045") && !role.contains("1054") && !role.contains("1029")) { if (number > 1) { double designFee = 0; diff --git a/src/main/java/lingtao/net/util/PosterPrice.java b/src/main/java/lingtao/net/util/PosterPrice.java index 2f83974..ceabee7 100644 --- a/src/main/java/lingtao/net/util/PosterPrice.java +++ b/src/main/java/lingtao/net/util/PosterPrice.java @@ -364,7 +364,7 @@ public class PosterPrice { areas = new double[]{2, 5, 7, 8, 10, 20, 50}; prices = new double[]{50, 40, 35, 32, 26, 24, 22}; last_price = 26; - min_price += 50 -5; + min_price += 50 - 5; // 根据面积得到单价 weight = String.valueOf(DecimalFormat.format(area * 0.24 * number)); break; diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index 5da3e38..3936d40 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -898,6 +898,11 @@ + +
@@ -1234,6 +1239,7 @@ $("#lesspeijian").find(":input").attr("disabled", true); $(".scolor").hide(); $(".tscolor").hide(); + $(".liusu").hide(); } form.render(); }); @@ -1357,6 +1363,15 @@ $("#lesspeijian .tscolor").prop("disabled", true); } } + if (data.value == "配流苏") { + if ($(data.elem).is(":checked")) { + $("#lesspeijian .liusu").css("display","flex"); + $("#lesspeijian .liusu").prop("disabled", false); + } else { + $("#lesspeijian .liusu").hide(); + $("#lesspeijian .liusu").prop("disabled", true); + } + } }); form.on("radio(kindValue2)", function (data) { peijianuiHide(); @@ -2083,6 +2098,7 @@ // 上面的else 已经有这个效果了 $(".scolor").hide() $(".tscolor").hide() + $(".liusu").hide(); $("#kindValueForm").show(); if (couponKind == "少数量") { $(".ui_shk_size").hide(); @@ -3209,6 +3225,13 @@ arr.push($(this).val() + "-" + shenColor) return; } + if ($(this).val() === '配流苏') { + if (couponKind == "少数量") { + let coNumber = $("#lesspeijian input[name='co_number']").val(); + arr.push(coNumber + "包" + $(this).val()) + } + return; + } if ($(this).val() === '流苏') { arr.push($(".select_liusu select[name='craft'] option:selected").val()) return;