From fc44f05cd6bbb3bcd974b99f26fa1477a9a7f88f Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Mon, 9 Mar 2026 08:44:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E5=95=86?= =?UTF-8?q?=E5=93=81=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 29 ++++++++++--------- src/main/webapp/views/product/poster.jsp | 2 ++ src/main/webapp/views/product/tagClothes.jsp | 19 +----------- 3 files changed, 18 insertions(+), 32 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index a80c724..77a89c3 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -1295,11 +1295,15 @@ public class ProductService { priceList = new PriceUtils().tags600Price(dto, kind, kind2, area, count); for (Product product : priceList) { + int num = getNum(width, length); // 服装吊牌里面的600克吊牌把价格*1.3倍 if (!("6".equals(kind) && "无".equals(kind2))) { - if (area <= 0.00486) { + if (num == 1) { product.setPrice(Math.floor(product.getPrice() * 1.3)); } + if (num == 2) { + product.setPrice(Math.floor(product.getPrice() * 1.2)); + } } if ("4".equals(kind)) { product.setPrice(Math.floor(product.getPrice() * 1.3)); @@ -1692,7 +1696,7 @@ public class ProductService { } double craft_price = 0; if (craft_list.contains("圆角")) { - craft_price += 4 * itemCount; + craft_price += 4 * itemCount / 100; } if ((craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) { double tangPrice = 45 + 0.1 * itemCount; @@ -1725,7 +1729,7 @@ public class ProductService { } dto2 = new Product(); dto2.setCount(count_list[i]); - dto2.setPrice(Math.ceil(prices[i] + craft_price)); + dto2.setPrice(Math.ceil((prices[i] + craft_price) * number)); priceList.add(dto2); } } @@ -5339,7 +5343,7 @@ public class ProductService { double basePrice = prices[base][prices[base].length - 1]; pro = new Product(); pro.setCount(count); - pro.setPrice(Math.ceil(basePrice / maxCount * count * number)); + pro.setPrice(Math.ceil(basePrice / maxCount * count * number * 1.2)); pro.setNumber(number); pro.setWeight(df.format(baseWeight * count)); priceList.add(pro); @@ -5641,6 +5645,7 @@ public class ProductService { double miniprice = 400; double mo_price = 300; double base_price = 3.5; + int mini_count = 30; if (width <= 3 && length <= 3) { } else if (width <= 4 && length <= 4) { @@ -5658,12 +5663,15 @@ public class ProductService { } else if (width <= 8 && length <= 8) { mo_price = 420; base_price = 7; + } else { + mo_price = 480; + base_price = 8; } Product pro = new Product(); pro.setCount(count); - pro.setWeight(df.format(0.005 * count * dto.getNumber())); - pro.setPrice(Math.max(Math.ceil(base_price * count * dto.getNumber() + mo_price * dto.getNumber()), miniprice)); + pro.setWeight(df.format(0.005 * dto.getNumber() * Math.max(mini_count, count))); + pro.setPrice(Math.max(Math.ceil(base_price * Math.max(mini_count, count) * dto.getNumber() + mo_price * dto.getNumber()), miniprice)); priceList.add(pro); for (int i = 0; i < count_list.length; i++) { int item_count = count_list[i]; @@ -5674,13 +5682,6 @@ public class ProductService { break; } pro = new Product(); - if (base_price < 4.5) { - if (item_count > 100 && item_count <= 500) { - base_price = 3.5; - } else if (item_count > 500) { - base_price = 3; - } - } pro = new Product(); pro.setCount(item_count); @@ -5836,7 +5837,7 @@ public class ProductService { Product pro = new Product(); pro.setCount(item_count); pro.setWeight(df.format(0.005 * item_count * dto.getNumber())); - pro.setPrice(Math.ceil(price * dto.getNumber() + craft_price)); + pro.setPrice(Math.ceil((price * dto.getNumber() + craft_price) * 1.2)); list.add(pro); } return list; diff --git a/src/main/webapp/views/product/poster.jsp b/src/main/webapp/views/product/poster.jsp index 51f5312..17e8a80 100644 --- a/src/main/webapp/views/product/poster.jsp +++ b/src/main/webapp/views/product/poster.jsp @@ -788,6 +788,8 @@ $(".banner").find(":input").attr("disabled", true); $(".ui_jq").hide(); $(".ui_jq").find(":input").attr("disabled", true); + $(".ui_cq").hide(); + $(".ui_cq").find(":input").attr("disabled", true); if (data.value == 6) {//条幅 $(".productName").show(); $(".banner").show(); diff --git a/src/main/webapp/views/product/tagClothes.jsp b/src/main/webapp/views/product/tagClothes.jsp index a1bf074..10e2d41 100644 --- a/src/main/webapp/views/product/tagClothes.jsp +++ b/src/main/webapp/views/product/tagClothes.jsp @@ -749,24 +749,7 @@ }); return false; } - $("#proTypeValue").val("服装吊牌"); - $("input[name='kindValue']:checked").val(3); - if ((size.split("*")[0] <= 9 && size.split("*")[1] <= 5.4) || (size.split("*")[0] <= 5.4 && size.split("*")[1] <= 9)) { - if (craftTang) { - if (craftTang == "单面烫金") { - $("#proTypeValue").val(3); - } - } else { - if ((size.split("*")[0] < 3 || size.split("*")[1] < 3)) { - $("#proTypeValue").val(3); - $("input[name='kindValue']:checked").val(0); - } - } - form.render(); - } - } else if (craftQie == "直角裁切") { - $("#proTypeValue").val("服装吊牌"); - $("input[name='kindValue']:checked").val(3); + } } if (kindValue == 3 && (craftTang === '单面烫金' || craftTang === '双面烫金')) {