diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index e93efe0..97b6aa7 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -2393,6 +2393,8 @@ public class ProductService { } return priceList; case "金属标": + craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); + if ("金属标".equals(dto.getKind())) { priceList = new PriceUtils().getMetalPrice(priceList, width, length, count, number); // 根据款数重新算价格 @@ -2409,7 +2411,6 @@ public class ProductService { } } } else if ("UV转印贴".equals(dto.getKind())) { - craft_list = dto.getCraft() == null ? null : Arrays.asList(dto.getCraft()); if (dto.getCraft() != null && craft_list.size() > 0 && (craft_list.contains("冷转印") || craft_list.contains("烫画"))) { int[] quantitySteps = {10, 20, 30, 50, 100, 200, 300, 400, 500, 800, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000}; double paperLength = 0, paperWidth = 0; @@ -2507,6 +2508,12 @@ public class ProductService { product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5)); } } + if (craft_list.contains("刮板")) { + dto.setPcount(dto.getPcount() == null ? 1 : dto.getPcount()); + for (Product product : priceList) { + product.setPrice(product.getPrice() + 2 * Math.max(dto.getPcount(), 1)); + } + } // double base = number < 6 && number > 1 ? 5 : 0; double apprise = 0; for (Product product : priceList) { @@ -4648,12 +4655,43 @@ public class ProductService { return getCheTiePrice(dto, length, width); case "胶带": return getJiadaoPrice(dto, length, width); + case "特光不干胶": + return getLightPrice(dto, length, width); default: break; } return null; } + private List getLightPrice(Product dto, Double width, Double length) { + List carftList = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()); + double[][] prices = new double[][]{ + {403, 503, 503, 503, 543, 582, 582, 582, 620, 620, 660, 698, 775, 775, 852.5, 853, 853}, + {520, 520, 520, 520, 560, 600, 600, 600, 640, 640, 680, 720, 800, 800, 880, 880, 880}, + {600, 600, 600, 600, 637.5, 675, 675, 675, 750, 750, 825, 862.5, 975, 975, 1050, 1050, 1125}, + {625, 625, 625, 625, 662.5, 700, 700, 700, 775, 775, 850, 887.5, 1000, 1000, 1075, 1075, 1150}, + {652, 652, 652, 652, 725, 762, 762, 762, 870, 870, 942, 978, 1051, 1051, 1087, 1087, 1196}, + {798, 798, 798, 798, 943, 1015, 1015, 1015, 1087, 1087, 1196, 1196, 1341, 1341, 1450, 1450, 1631}, + {910, 910, 910, 910, 1120, 1155, 1225, 1225, 1400, 1470, 1575, 1575, 1680, 1680, 1855, 1925, 2100}, + }; + if (carftList.contains("烫金+激凸")) { + prices = new double[][]{ + {620, 620, 620, 698, 698, 852, 852, 980, 1127, 1285, 1465, 1656, 1871, 2095, 2346, 2605, 2892}, + {640, 640, 640, 720, 720, 880, 880, 1012, 1164, 1327, 1512, 1709, 1931, 2163, 2422, 2689, 2984}, + {713, 713, 713, 788, 788, 938, 938, 1078, 1240, 1413, 1611, 1821, 2057, 2304, 2581, 2864, 3197}, + {863, 863, 863, 1050, 1050, 1125, 1125, 1294, 1488, 1696, 1934, 2185, 2469, 2765, 3097, 3437, 3815}, + {979, 943, 1015, 1160, 1160, 1341, 1341, 1542, 1774, 2022, 2305, 2605, 2944, 3297, 3692, 4098, 4549}, + {1124, 1160, 1160, 1450, 1595, 1740, 1885, 2168, 2493, 2842, 3240, 3661, 4137, 4633, 5189, 5760, 6393}, + {1365, 1575, 2135, 2345, 2800, 3150, 3220, 3703, 4258, 4855, 5534, 6254, 7067, 7915, 8864, 9840, 10921}, + }; + } + int[] count_list = new int[]{200, 500, 1000, 2000, 3000, 5000, 10000}; + double[] areas = new double[]{9, 12.25, 16, 20.25, 25, 30.25, 36, 42.25, 49, 56.25, 64, 72.25, 81, 90.25, 100, 110.25, 121}; + double area = (length + 0.4) * (width + 0.4);//加上4毫出血 + + return getAreaNextPrice(count_list, dto.getCount(), area, prices, areas, dto.getNumber()); + } + private List getDalanPrice(Product dto, Double width, Double length) { //铜版纸200g (售价) int[][] prices = new int[][]{ @@ -4963,6 +5001,29 @@ public class ProductService { return new ArrayList<>(); } + private List getAreaNextPrice(int[] count_list, int count, double area, double[][] prices, double[] areas, int number) { + List priceList = new ArrayList<>(); + for (int i = 0; i < count_list.length; i++) { + int count_item = count_list[i]; + if (priceList.size() > 2) { + break; + } + if (count > count_item) { + continue; + } + int count_index = Arrays.binarySearch(count_list, count_item); + double price = 0; + if (count_index >= 0) { + price = new PriceUtils().TableNextPrice(area, prices[count_index], areas); + } + Product product = new Product(); + product.setCount(count_item); + product.setPrice(Math.ceil(price * number)); + priceList.add(product); + } + return priceList; + } + private List getAreaCenterPrice(int[] count_list, int count, double area, int[][] prices, double[] areas, int number) { List priceList = new ArrayList<>(); diff --git a/src/main/java/lingtao/net/util/PriceUtils.java b/src/main/java/lingtao/net/util/PriceUtils.java index 04e8cff..f3e7c38 100644 --- a/src/main/java/lingtao/net/util/PriceUtils.java +++ b/src/main/java/lingtao/net/util/PriceUtils.java @@ -3544,6 +3544,20 @@ public class PriceUtils { return list; } + public double TableNextPrice(double area, double[] price_list, double[] areas) { + double price = 0; + double last_price = 0; + for (int i = 0; i < areas.length; i++) { + if (area <= areas[i]) { + price = price_list[i]; + break; + } + last_price = price_list[i]; + } + + return price == 0 ? last_price : price; + } + public double TablePrice(double area, int[] price_list, double[] areas) { double price = 0; int startIndex = 0; diff --git a/src/main/webapp/views/product/light.jsp b/src/main/webapp/views/product/light.jsp new file mode 100644 index 0000000..d8b6981 --- /dev/null +++ b/src/main/webapp/views/product/light.jsp @@ -0,0 +1,305 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + +
+
+

特光不干胶

+
+
+ +

+ 材质 +

+
+ +
+

+ 尺寸(CM/厘米) +

+ +

+ 数量(张) +

+
+
+ +
+
+ +

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+

工艺

+
+
+ 覆膜工艺: + +
+
+ 裁切工艺: + +
+
+ 特殊工艺: + + + +
+
+
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFee.jsp" %> +
+
+
+
+
+
+
+ +
+
+ +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/metal.jsp b/src/main/webapp/views/product/metal.jsp index ae52b6c..d48eb9c 100644 --- a/src/main/webapp/views/product/metal.jsp +++ b/src/main/webapp/views/product/metal.jsp @@ -168,6 +168,14 @@ class="craftZhuan"> + +
-1 && (craft_list.indexOf("烫画") > -1 || craft_list.indexOf("冷转印") > -1)) { + $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox"); + $(data.elem).prop("checked", false); + layer.msg('[烫画,冷转印]不能选择刮板配件!', {offset: ['300px', '300px']}, {icon: 5}); + return false; + } + let most = 1; + if (craft_list.indexOf("刮板") > -1) { + most = 2; + $("#guaban").show(); + } else { + $("#guaban").hide(); + } + var craftZhuan = $(".craftZhuan:checked").length; - if (craftZhuan > 1) { + if (craftZhuan > most) { $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox"); $(data.elem).prop("checked", false); layer.msg('[专金 - 专银]不能同时选择!', {offset: ['300px', '300px']}, {icon: 5}); return false; } + if (data.value == "冷转印") { if ($(data.elem).is(":checked")) { $("#sehu_number").show(); @@ -366,7 +396,18 @@ } else { var size = $("#UVSize").val(); var craftMo = $('input[name="craftMo"]:checked').val(); - var craftShua = [$('input[name="craft"]:checked').val()]; + var craftShua = []; + + $("input:checkbox[name='craft']:checked").each(function (i) { + if (!$(this).is(':disabled')) { + if ($(this).val() == "刮板") { + let co_count = $("input[name='pcount']").val(); + craftShua.push($(this).val() + co_count + "个"); + } else { + craftShua.push($(this).val()); + } + } + }); } if (!kind) { layer.msg("请选择产品种类!", {offset: ['300px', '300px']}, function () { @@ -452,6 +493,7 @@ let co_count = $("select[name='co_number'] option:selected").val(); craftShua.push(co_count + "色数"); } + craftShua = craftShua.filter(item => item !== null && item != ""); var span_result = 'UV转印贴 - ' + craftShua.join(" - ") + ' - ' + size + '厘米 -(同款内容) - ' + [data[0].msg] + '\n'; if (number > 1) { diff --git a/src/main/webapp/views/system/instructions/manage/printing.jsp b/src/main/webapp/views/system/instructions/manage/printing.jsp index cb7e005..aa7e136 100644 --- a/src/main/webapp/views/system/instructions/manage/printing.jsp +++ b/src/main/webapp/views/system/instructions/manage/printing.jsp @@ -34,6 +34,7 @@ 新增内容
+ 未经注册商标所有人许可,在同一种商品上使用与其注册商标相同的商标,情节严重的,处三年以下有期徒刑或拘役并处罚金。情节特别严重的,处三年以上七年以下有期徒刑并处罚金。