From 7b2f033fe6641d99b0a5bbadb4f6abda101e6285 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Sat, 28 Mar 2026 11:47:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BC=B8=E7=BC=A9=E6=89=8B?= =?UTF-8?q?=E6=8B=89=E6=97=97=EF=BC=8C=E6=96=B0=E5=A2=9E=E7=86=A8=E6=96=97?= =?UTF-8?q?=EF=BC=8C=E9=99=90=E5=88=B6=E9=BC=A0=E6=A0=87=E5=9E=AB=E5=B0=BA?= =?UTF-8?q?=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net/controller/ProductController.java | 2 +- .../lingtao/net/service/ProductService.java | 46 +- src/main/webapp/views/product/metal.jsp | 42 ++ src/main/webapp/views/product/mousePad.jsp | 5 + src/main/webapp/views/product/slq.jsp | 574 +++++++++++------- 5 files changed, 440 insertions(+), 229 deletions(-) diff --git a/src/main/java/lingtao/net/controller/ProductController.java b/src/main/java/lingtao/net/controller/ProductController.java index dba3822..6b246bf 100644 --- a/src/main/java/lingtao/net/controller/ProductController.java +++ b/src/main/java/lingtao/net/controller/ProductController.java @@ -357,7 +357,7 @@ public class ProductController { } String size = product.getSize(); - if (("17".equals(product.getProTypeValue()) && "6".equals(product.getKindValue())) || "手拉旗".equals(product.getProTypeValue())) { + if (("17".equals(product.getProTypeValue()) && "6".equals(product.getKindValue())) || ("手拉旗".equals(product.getProTypeValue()) && "常规".equals(product.getStickerKind()))) { if (!StringUtils.isEmpty(size)) { String sizeList[] = size.split(","); size = sizeList[0]; diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index fc2859e..81d01e2 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -251,7 +251,7 @@ public class ProductService { String sizeList[] = size.split(","); size = sizeList[0]; } - } else if ("手拉旗".equals(proType)) { + } else if (("手拉旗".equals(dto.getProTypeValue()) && "常规".equals(dto.getStickerKind()))) { size += "*" + dto.getWidth(); } int count = dto.getCount(); @@ -2690,7 +2690,12 @@ public class ProductService { } apprise = product.getPrice(); } - + if (craft_list.contains("熨斗")) { + dto.setPo_number(dto.getPo_number() == null ? 1 : dto.getPo_number()); + for (Product product : priceList) { + product.setPrice(product.getPrice() + 40 * Math.max(dto.getPo_number(), 1)); + } + } return priceList; } if (length <= 2) { @@ -2705,6 +2710,7 @@ public class ProductService { // 1006 1003 1005 1037 1058 1002 1033 1045 卓盛 航和 米笛儿 竹范 领淘文具 榆家 涛莱 拼多多uv单独报价 List crafts = new ArrayList<>(dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft())); crafts.remove("刮板"); + crafts.remove("熨斗"); crafts.remove("哑光"); if (crafts.size() > 0 && "烫金".equals(crafts.get(0))) { crafts.remove(0); @@ -2729,6 +2735,7 @@ public class ProductService { product.setPrice(product.getPrice() + 2 * Math.max(dto.getPcount(), 1)); } } + if ("宠物转印贴".equals(dto.getKind())) { for (Product product : priceList) { product.setPrice(Math.ceil(product.getPrice() == 50 ? product.getPrice() : product.getPrice() * 1.3)); @@ -4483,11 +4490,39 @@ public class ProductService { /* * if(kind.equals("1")) { if(length == 70 && width == 24) { priceList = new FgqPrice().getSlqSpeicPrice(count, priceList, 1); }else if(length == 50 && width == 17) { priceList = new FgqPrice().getSlqSpeicPrice(count, priceList, 2); }else { priceList = new FgqPrice().getSlqPrice(count, priceList); } }else { */ - priceList = new FgqPrice().getSlqPrice(count, priceList); + if ("常规".equals(dto.getStickerKind())) { + priceList = new FgqPrice().getSlqPrice(count, priceList); + } + if ("伸缩手拉旗".equals(dto.getStickerKind())) { + double base_price = 0; + if ((length == 24 && width == 70) || (length == 70 && width == 24)) { + base_price = 30; + } + if ((length == 24 && width == 50) || (length == 50 && width == 24)) { + base_price = 30; + } + if ((length == 24 && width == 100) || (length == 100 && width == 24)) { + base_price = 35; + } + if ((length == 17 && width == 70) || (length == 70 && width == 17)) { + base_price = 30; + } + if ((length == 17 && width == 50) || (length == 50 && width == 17)) { + base_price = 30; + } + if ((length == 17 && width == 100) || (length == 100 && width == 17)) { + base_price = 35; + } + Product product = new Product(); + product.setCount(dto.getCount()); + product.setNumber(number); + product.setPrice(Math.ceil(base_price * dto.getCount())); + priceList.add(product); + + } /* } */ for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); - product.setWeight(df.format(length * width * product.getCount() / 10000 * number * 0.075)); } return priceList; @@ -5398,6 +5433,9 @@ public class ProductService { pro.setWeight(df.format(width * length * 1.2 * count * 0.1 / 1000 * Double.parseDouble(kind))); priceList.add(pro); } + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * number)); + } return priceList; } diff --git a/src/main/webapp/views/product/metal.jsp b/src/main/webapp/views/product/metal.jsp index 2f539b3..acb6b16 100644 --- a/src/main/webapp/views/product/metal.jsp +++ b/src/main/webapp/views/product/metal.jsp @@ -180,6 +180,16 @@ + + + +
其他工艺: @@ -336,6 +346,11 @@ $("#sehu_number").hide(); $(".tjselect select").prop("disabled", true); $("#sehu_number select").prop("disabled", true); + $("#guaban").hide(); + $("#guaban").find(":input").attr("disabled", true); + $("#yundou").hide(); + $("#yundouNumber").hide(); + $("#yundou").find(":input").attr("disabled", true); if (kindData.value == "金属标") { // 切换为品种单选框 $(".metal").show(); @@ -368,10 +383,15 @@ if (craftChecked) { $(`input[name='craft'][value='冷转印']+div`).click(); } + craftChecked = $(`input[name='craft'][value='熨斗']`).is(":checked"); + if (craftChecked) { + $(`input[name='craft'][value='熨斗']+div`).click(); + } if (kindData.value == "UV转印贴") { $(".zhuanuv").show(); $(".zhuanuv").find(":input").attr("disabled", false); + } } form.render();//必须写 @@ -415,12 +435,31 @@ layer.msg('[烫画,冷转印]不能选择刮板配件!', {offset: ['300px', '300px']}, {icon: 5}); return false; } + if (craft_list.indexOf("烫画") > -1) { + $("#yundou").show(); + } else { + $("#yundou").hide(); + let craftChecked = $(`input[name='craft'][value='熨斗']`).is(":checked"); + if (craftChecked) { + $(`input[name='craft'][value='熨斗']+div`).click(); + } + } let most = 1; if (craft_list.indexOf("刮板") > -1) { most = 2; $("#guaban").show(); + $("#guaban").find(":input").attr("disabled", false); } else { $("#guaban").hide(); + $("#guaban").find(":input").attr("disabled", true); + } + if (craft_list.indexOf("熨斗") > -1) { + most = 2; + $("#yundouNumber").show(); + $("#yundouNumber").find(":input").attr("disabled", false); + } else { + $("#yundouNumber").hide(); + $("#yundouNumber").find(":input").attr("disabled", true); } if (craftZhuan > most) { @@ -470,6 +509,9 @@ } else if ($(this).val() == "刮板") { let co_count = $("input[name='pcount']").val(); craftShua.push($(this).val() + co_count + "个"); + } else if ($(this).val() == "熨斗") { + let co_count = $("input[name='po_number']").val(); + craftShua.push($(this).val() + co_count + "个"); } else { craftShua.push($(this).val()); } diff --git a/src/main/webapp/views/product/mousePad.jsp b/src/main/webapp/views/product/mousePad.jsp index 3a32ae4..6f2f79f 100644 --- a/src/main/webapp/views/product/mousePad.jsp +++ b/src/main/webapp/views/product/mousePad.jsp @@ -259,6 +259,11 @@ }); return false; } + if (Number.parseFloat(size.split("*")[0]) % 1 !== 0 || Number.parseFloat(size.split("*")[1]) % 1 !== 0) { + layer.msg('尺寸不能存在小数点!', {offset: ['300px', '300px']}, function () { + }); + return false; + } $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { diff --git a/src/main/webapp/views/product/slq.jsp b/src/main/webapp/views/product/slq.jsp index 61cdcef..8b3af46 100644 --- a/src/main/webapp/views/product/slq.jsp +++ b/src/main/webapp/views/product/slq.jsp @@ -1,234 +1,360 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> - -Insert title here - <%@include file="/views/common.jsp"%> + + Insert title here + <%@include file="/views/common.jsp" %> + -
-
-

手拉旗

-
-
- -

- 材质 -

-
- -
-

- 宽度 -

-
- -
-

- 长度(CM/厘米) -

-
- -
-

- 数量(个) -

-
- -
-

- 款数 -

-
- -
-

- 客户旺旺 -

-
- -
-
-
- - -
-

计算结果-

-
- - <%@include file="../acountExpressFee.jsp"%> -
-
-
-
-
-
-
- -
-
+
+
+

手拉旗

+
+
+ + +
+ + +
+

+ 材质 +

+
+ +
+
+

+ 宽度 +

+
+ +
+

+ 长度(CM/厘米) +

+
+ +
+
+ +

+ 数量(个) +

+
+ +
+

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+ +
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFee.jsp" %> +
+
+
+
+
+
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file