From 9218055d64d515d83312f15d7bbe0fa5bd22eee5 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Sat, 18 Jul 2026 17:11:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A7=8D=E5=AD=90=E7=BA=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 27 ++++++++-- src/main/webapp/views/product/coupon.jsp | 49 ++++++++++++------- src/main/webapp/views/product/keychain.jsp | 8 +-- 3 files changed, 58 insertions(+), 26 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 7aa20a1..9883ff9 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -2791,7 +2791,7 @@ public class ProductService { price += Math.ceil(Math.max(count * 0.3 * number, 5)); } } else { - + double maxPrice = 50; if (count <= 50) { unitPrice = 140; } else if (count > 50 && count <= 100) { @@ -2807,7 +2807,7 @@ public class ProductService { } else { unitPrice = 90; } - if ("4".equals(dto.getZ3type())) { + if ("4".equals(dto.getZ3type()) && "400".equals(dto.getKindLabel())) { if (count <= 50) { unitPrice = 160; } else if (count > 50 && count <= 100) { @@ -2824,7 +2824,25 @@ public class ProductService { unitPrice = 130; } } - price = Math.ceil((length * width * count * unitPrice) / 10000);//价格计算尺寸*数量*200/10000 + if ("4".equals(dto.getZ3type()) && "1000".equals(dto.getKindLabel())) { + if (count <= 50) { + unitPrice = 400; + } else if (count > 50 && count <= 100) { + unitPrice = 380; + } else if (count > 100 && count <= 200) { + unitPrice = 360; + } else if (count > 200 && count <= 500) { + unitPrice = 340; + } else if (count > 500 && count <= 1000) { + unitPrice = 300; + } else if (count > 1000 && count <= 2000) { + unitPrice = 280; + } else { + unitPrice = 260; + } + maxPrice = 60; + } + price = Math.max(Math.ceil((length * width * count * unitPrice) / 10000), maxPrice);//价格计算尺寸*数量*200/10000 if (!StringUtils.isEmpty(crafts) && Arrays.asList(crafts).contains("编码")) {//起步价10 price += Math.max(count * 0.5, 10); @@ -2856,6 +2874,9 @@ public class ProductService { if (craft_list.size() > 0 && craft_list.contains("棉绳")) { price += Math.max(Math.ceil(0.1 * number * count), 5); } + if ("4".equals(dto.getZ3type()) && craft_list.size() > 0 && craft_list.contains("挂绳")) { + price += Math.max(Math.ceil(0.6 * number * count), 5); + } } Product dto2 = new Product(); diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index 03df172..6d6cf08 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -169,13 +169,13 @@ - +<%-- --%>

材质

- +
@@ -478,10 +478,8 @@
裁切工艺: - - + +
@@ -1136,10 +1134,7 @@ } if (kind == "种子纸") { let z3type = $("input[name='z3type']:checked").val() - data.kind2Value = 400 - if(z3type == 5){ - data.kind2Value = 1000 - } + data.kind2Value = $("#material option:selected").val() } $("#carousel").empty(); $("#remark").empty(); @@ -1251,7 +1246,7 @@ $("#size").val($('select[name="z3size1"]:not(:disabled) option:checked').val());//尺寸重新赋值 $(".qt").hide() $("#3zValueForm").show(); - let html = ``; + let html = ``; if (val == 0) { let menpiao_size = $("#3z_menpiao_size select option:selected").val(); @@ -1314,6 +1309,8 @@ $(".z3_craft_yh").show(); $(".z3_craft_bm").show(); $(".z3_craft_mq").show(); + html = ` + `; } if (val == 5) { $("#3z_jiangpai_size").show(); @@ -1333,7 +1330,7 @@ $(".gscolor").css("display", "inline-block") $(".gscolor select").prop("disabled", false); z3Craft($("#size").val()) - html = ``; + html = ``; } $("#material").empty().append(html); getProductImage() @@ -1406,11 +1403,11 @@ $('input[class = mq]').prop('checked', false); } } - if (type == "少数量") { + if (type == "少数量" && type1 != "种子纸") { $("#lesspeijian").show(); $("#lesspeijian").find(":input").attr("disabled", false); } - if (type == "少数量" && (s.split("*")[0] > 42 || s.split("*")[1] > 28.5) && (s.split("*")[0] > 28.5 || s.split("*")[1] > 42)) { + if (type == "少数量" && type1 != "种子纸" && (s.split("*")[0] > 42 || s.split("*")[1] > 28.5) && (s.split("*")[0] > 28.5 || s.split("*")[1] > 42)) { $("#lesspeijian input").prop("checked", false); $("#lesspeijian").hide(); $("#lesspeijian").find(":input").attr("disabled", true); @@ -1421,6 +1418,19 @@ form.render(); }); }); + form.on("select(kindLabel)", function (data) { + $(".z3_craft_yh").show(); + $(".z3_craft_yh").find("input").attr("disabled", false); + $(".z3_craft_ssx").show(); + $(".z3_craft_ssx").find("input").attr("disabled", false); + if (data.value == "1000") { + $(".z3_craft_yh").hide(); + $(".z3_craft_yh").find("input").attr("disabled", true); + $(".z3_craft_ssx").hide(); + $(".z3_craft_ssx").find("input").attr("disabled", true); + } + form.render(); + }) form.on("select(oppSelect)", function (data) { if (data.value == "装opp袋") { $("#peijian_ui .opp").hide(); @@ -3853,8 +3863,8 @@ if (kind == "种子纸") { let type = $('input[name="z3type"]:checked').val(); let switchz3Size = $('input[name="switchz3Size"]:checked').val() - if ((size.split("*")[0] < 8 || size.split("*")[1] < 5) && (size.split("*")[0] < 5 || size.split("*")[1] < 8)) { - layer.msg("尺寸小于 8*5cm 无法报价", {offset: ['300px', '300px']}, function () { + if ((size.split("*")[0] < 3 || size.split("*")[1] < 3)) { + layer.msg("尺寸小于 3*3cm 无法报价", {offset: ['300px', '300px']}, function () { }); return false; } @@ -4173,8 +4183,9 @@ } span_result += "\n"; } else if (kindData[kind] == "种子纸") { - let switchz3Size = $('input[name="switchz3Size"]:checked').val() - var span_result = kindData[kind] + " -" + size + "厘米-(" + same + ")" + let switchz3Size = $('input[name="switchz3Size"]:checked').val(); + let material = $("#material option:selected").text() + var span_result = kindData[kind] + " - " + material + " -" + size + "厘米-(" + same + ")" if (($('input[name="z3type"]:checked').val() == 0 || $('input[name="z3type"]:checked').val() == 3) && !switchz3Size) { span_result = span_result + " - " + $('input[name="3z_vice"]:checked')[0].title } diff --git a/src/main/webapp/views/product/keychain.jsp b/src/main/webapp/views/product/keychain.jsp index 7e2fe2a..649fde0 100644 --- a/src/main/webapp/views/product/keychain.jsp +++ b/src/main/webapp/views/product/keychain.jsp @@ -83,7 +83,7 @@ - +<%-- --%> @@ -92,11 +92,11 @@ - +<%-- --%> - - +<%-- --%> +<%-- --%>