From 91f5ddcf6f90b26721c31ce89d019bc309c771bd Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Sun, 21 Jun 2026 13:00:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=98=B2=E6=B0=B4=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 5 +++- src/main/webapp/views/product/canopy.jsp | 24 ++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index bbee454..4792e51 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -5284,7 +5284,7 @@ public class ProductService { if ("黑胶涤纶布".equals(dto.getKindValue())) { basePrice = basePrice + 1; } - price = Math.ceil(basePrice * area * count * number); + price = Math.ceil(Math.max(basePrice * area * count, 50) * number); } pro.setPrice(Math.ceil(price)); @@ -5297,6 +5297,9 @@ public class ProductService { if (craft_list.contains("防风绳")) { product.setPrice(Math.floor(product.getPrice() + dto.getPcount() * 2)); } + if (craft_list.contains("圆盘")) { + product.setPrice(Math.floor(product.getPrice() + dto.getStickNum() * 8)); + } product.setWeight(String.valueOf(area * count * number * 0.08 + dto.getShuliang() * 3.3)); } diff --git a/src/main/webapp/views/product/canopy.jsp b/src/main/webapp/views/product/canopy.jsp index 43155d5..6c3efe7 100644 --- a/src/main/webapp/views/product/canopy.jsp +++ b/src/main/webapp/views/product/canopy.jsp @@ -26,6 +26,7 @@ + @@ -76,6 +77,11 @@ + + <%--

--%> <%-- 印刷 @@ -230,6 +236,15 @@ $("#shuliang").hide() } + } + if (data.value == '圆盘') { + if (data.elem.checked) { + $("#yuanpan").css("display", "flex"); + } else { + $("input[name='stickNum']").val(0) + $("#yuanpan").hide() + } + } if (data.value == '防风绳') { if (data.elem.checked) { @@ -324,12 +339,15 @@ let number = $("#number").val(); let shuliang = $("input[name='shuliang']").val() || 0; let pcount = $("input[name='pcount']").val() || 0; + let stickNum = $("input[name='stickNum']").val() || 0; $("input[name='craft']:checked").each(function () { if (!$(this).is("disabled")) { if ($(this).val() == "安装包") { arr.push($(this).val() + shuliang) } else if ($(this).val() == "防风绳") { arr.push($(this).val() + pcount) + } else if ($(this).val() == "圆盘") { + arr.push($(this).val() + stickNum) } else { arr.push($(this).val()) } @@ -350,9 +368,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result);