diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 50baf65..bbdd99c 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -898,12 +898,19 @@ public class ProductService { if (craft_list.contains("穿尼龙绳")) { carft_price += Math.max(0.2 * item_count, 40); } + if (craft_list.contains("配红白格丝带")) { + carft_price += Math.max(0.25 * item_count, 10); + } + if (craft_list.contains("穿红白格丝带")) { + carft_price += Math.max(0.3 * item_count, 10); + } if (craft_list.contains("配弹力绳")) { carft_price += Math.max(0.1 * item_count, 10); } if (craft_list.contains("配弹力绳捆")) { carft_price += 10 * Math.ceil(item_count * 20.0 / 5000); } + double tang_price = 0; if (craft_list.contains("单面烫金") || craft_list.contains("双面烫金")) { tang_price = new PriceUtils().TablePrice(area, tang_prices[count_index], tang_areas); @@ -1090,6 +1097,12 @@ public class ProductService { if (craft_list.contains("穿尼龙绳")) { carft_price += Math.max(0.2 * product.getCount(), 40); } + if (craft_list.contains("配红白格丝带")) { + carft_price += Math.max(0.25 * product.getCount(), 10); + } + if (craft_list.contains("穿红白格丝带")) { + carft_price += Math.max(0.3 * product.getCount(), 10); + } if (craft_list.contains("配弹力绳")) { carft_price += Math.max(0.1 * product.getCount(), 10); } @@ -9648,20 +9661,27 @@ public class ProductService { } } if ("特种纸名片".equals(dto.getProTypeValue()) && craftList.contains("异形模切")) {// 200-500张按照原有的价格乘以3倍 1000-5000张按照原有的价格乘以2.4倍 5000-10000张按照原有的价格乘以2倍 - double[] prices = {112, 152, 208, 376, 552, 888, 1328}; + double[] prices = {1560, 1720, 2320, 5840, 8520, 9680, 12900}; int[] counts = {200, 500, 1000, 2000, 3000, 5000, 10000}; int num = getNum(width, length); - if (num == 1) { - } else if (num == 2) { - prices = new double[]{200, 280, 380, 688, 1000, 1620, 2420}; - } else if (num == 3) { - prices = new double[]{272, 376, 500, 912, 1320, 2140, 3100}; - } else if (num == 5 || num == 4) { - prices = new double[]{380, 520, 696, 1260, 1832, 2740, 4100}; - } else if (num == 6) { - prices = new double[]{480, 640, 880, 1520, 2040, 3200, 4800}; - } else { - prices = new double[]{600, 760, 1040, 2000, 2760, 3920, 5700}; + double[][] prices_area = { + {112, 152, 208, 376, 552, 888, 1328}, + {200, 280, 380, 688, 1000, 1620, 2420}, + {272, 376, 500, 912, 1320, 2140, 3100}, + {328, 448, 600, 1088, 1576, 2440, 3600}, + {380, 520, 696, 1260, 1832, 2740, 4100}, + {480, 640, 880, 1520, 2040, 3200, 4800}, + {600, 760, 1040, 2000, 2760, 3920, 5700}, + {720, 880, 1200, 2480, 3480, 4640, 6600}, + {840, 1000, 1360, 2960, 4200, 5360, 7500}, + {960, 1120, 1520, 3440, 4920, 6080, 8400}, + {1080, 1240, 1680, 3920, 5640, 6800, 9300}, + {1200, 1360, 1840, 4400, 6360, 7520, 10200}, + {1320, 1480, 2000, 4880, 7080, 8240, 11100}, + {1440, 1600, 2160, 5360, 7800, 8960, 12000}, + }; + if (num < 15) { + prices = prices_area[num - 1]; } for (Product product : priceList) { for (int i = 0; i < counts.length; i++) { @@ -9703,6 +9723,7 @@ public class ProductService { } } } + } public List chucklePrice(String role, List list, Product dto) { diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index e4f52c7..22607f1 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -1007,6 +1007,14 @@ style="width: 70px"/> + + @@ -1405,6 +1413,8 @@ $("#peijian_ui .gscolor select").prop("disabled", true); $("#peijian_ui .select_nilongshen").hide(); $("#peijian_ui .select_nilongshen select").prop("disabled", true); + $("#peijian_ui .select_sidai").hide(); + $("#peijian_ui .select_sidai select").prop("disabled", true); $("#peijian_ui .select_liusu").hide(); $("#peijian_ui .select_liusu select").prop("disabled", true); $("#peijian_ui .opp").hide(); @@ -1527,6 +1537,17 @@ $("#peijian_ui .select_nilongshen select").prop("disabled", true); } } + if (data.value == "红白格丝带") { + if ($(data.elem).is(":checked")) { + $("#peijian_ui .select_sidai").show(); + $("#peijian_ui .select_sidai select").prop("disabled", false); + getProductImage('红白格丝带'); + } else { + $("#peijian_ui .select_sidai").hide(); + $("#peijian_ui .select_sidai select").prop("disabled", true); + getProductImage(''); + } + } if (data.value == "配弹力绳" || data.value == "配弹力绳捆") { if ($(data.elem).is(":checked")) { $("#peijian_ui .tscolor").show(); @@ -3626,6 +3647,10 @@ arr.push($(".select_nilongshen select[name='craft'] option:selected").val() + "-" + $("select[name='shen_color'] option:selected").val()) return; } + if ($(this).val() === '红白格丝带') { + arr.push($(".select_sidai select[name='craft'] option:selected").val()) + return; + } if ($(this).val() === '配尼龙绳' || $(this).val() === '穿尼龙绳') { let shenColor = $("select[name='shen_color'] option:selected").val(); if (couponKind == "少数量") {