From 0c51492dc6c3a043f495fbe614fb6a1595f332b5 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Thu, 28 May 2026 14:43:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A0=E7=89=A9=E5=A9=9A?= =?UTF-8?q?=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 44 ++++++++++++++++--- src/main/webapp/views/product/poster.jsp | 25 +++++++---- 2 files changed, 55 insertions(+), 14 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 033aede..cb4dacd 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -2765,10 +2765,40 @@ public class ProductService { } else if (dto.getProTypeLabel().equals("种子纸")) { int av_count = count; - double price = Math.ceil((length * width * count * 200) / 10000);//价格计算尺寸*数量*200/10000 - if ("4".equals(dto.getZ3type())) { - price = Math.ceil((length * width * count * 140) / 10000);//价格计算尺寸*数量*200/10000 + double unitPrice = 0; + if (count <= 50) { + unitPrice = 140; + } else if (count > 50 && count <= 100) { + unitPrice = 130; + } else if (count > 100 && count <= 200) { + unitPrice = 120; + } else if (count > 200 && count <= 500) { + unitPrice = 110; + } else if (count > 500 && count <= 1000) { + unitPrice = 100; + } else if (count > 1000 && count <= 2000) { + unitPrice = 95; + } else { + unitPrice = 90; } + if ("4".equals(dto.getZ3type())) { + if (count <= 50) { + unitPrice = 160; + } else if (count > 50 && count <= 100) { + unitPrice = 155; + } else if (count > 100 && count <= 200) { + unitPrice = 150; + } else if (count > 200 && count <= 500) { + unitPrice = 145; + } else if (count > 500 && count <= 1000) { + unitPrice = 140; + } else if (count > 1000 && count <= 2000) { + unitPrice = 135; + } else { + unitPrice = 130; + } + } + double price = Math.ceil((length * width * count * unitPrice) / 10000);//价格计算尺寸*数量*200/10000 if (!StringUtils.isEmpty(crafts) && Arrays.asList(crafts).contains("编码")) {//起步价10 price += Math.max(count * 0.5, 10); @@ -2784,7 +2814,7 @@ public class ProductService { } price = price * number;//款数翻倍 - price = Math.max(price, 60); + price = Math.max(price, 50); if (!StringUtils.isEmpty(crafts) && Arrays.asList(crafts).contains("装opp袋")) { price += Math.ceil(Math.max(count * 0.15 * number, 5)); @@ -3454,7 +3484,7 @@ public class ProductService { area = Double.valueOf(df.format(length * width * count)); } // 裱板 - if ("0".equals(kind)) { + if ("0".equals(kind) || "12".equals(kind)) { priceList = new PosterPrice().acountPrice00(kind2, area, count, number); for (Product product : priceList) { if (crafts_list.contains("铁架支架")) { @@ -3463,7 +3493,11 @@ public class ProductService { if (crafts_list.contains("伸缩支架")) { product.setPrice(Math.ceil(product.getPrice() + 10 * dto.getYaheng())); } + if ("12".equals(kind)) { + product.setPrice(Math.ceil(product.getPrice() * 1.2)); + } } + } else if ("1".equals(kind)) {// 室内写真 priceList = new PosterPrice().acountPrice01(kind2, area, count, number, width * 100, length * 100); } else if ("2".equals(kind)) {// 户外写真 diff --git a/src/main/webapp/views/product/poster.jsp b/src/main/webapp/views/product/poster.jsp index 2681548..e08c7f1 100644 --- a/src/main/webapp/views/product/poster.jsp +++ b/src/main/webapp/views/product/poster.jsp @@ -35,8 +35,9 @@ - + +

@@ -717,7 +718,7 @@ } // 切换类目的时候清空轮播图 - if (data.value == 5 || data.value == 6 || data.value == 7 || data.value == 8 || data.value == 9 || data.value == 10) { + if (data.value == 5 || data.value == 6 || data.value == 7 || data.value == 8 || data.value == 9 || data.value == 10|| data.value == 12) { // 轮播图 var html = " "; var remark = " "; @@ -937,9 +938,8 @@ $(".diy-size").show(); $(".normol-size").hide(); - form.render(); - if (data.value != 5 && data.value != 6 && data.value != 8 && data.value != 9 && data.value != 10 && data.value != 11) { + if (![5, 6, 8, 9, 10, 11].includes(data.value)) { // 切换按钮清空下拉框(防止一直重复加) $("#kind2Value").empty(); // 下拉框第一列添加空的option @@ -971,6 +971,13 @@ } }); } + if (12 == data.value) { + $("#kind2Value").empty(); + $('#kind2Value').append(new Option("KT版", 0)); + $(".zhiDuPai").show(); + $(".zhiDuPai").find(":input").attr("disabled", false); + } + form.render(); }); form.on('radio(dengxType)', function (data) { @@ -1555,7 +1562,7 @@ var kindData = { 0: "制度牌", 1: "室内写真", 2: "户外写真", 3: "布", 4: "展架", 5: "刻字", 6: "条幅", - 7: "贡缎布", 8: "锦旗", 9: "号码布", 10: "帆布", 11: "灯箱" + 7: "贡缎布", 8: "锦旗", 9: "号码布", 10: "帆布", 11: "灯箱", 12: "宠物婚礼KT版" }; // 获取选中单选框和下拉框的值 var kind = $('input[name="kindValue"]:checked').val(); @@ -1599,7 +1606,7 @@ } // 制度牌 var craftList = ""; - if (value == 0) { + if (value == 0 || value == 12) { if (kind2 != "背胶单裱3mmPVC(户内高清)") { var arr = []; $("input:checkbox[name='craft']:checked").each(function (i) { @@ -1818,9 +1825,9 @@ data[0].kindLabel = "帆布"; } 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);