zhuyiyi 3 месяцев назад
Родитель
Сommit
4b0e45b1c6

+ 9 - 0
src/main/java/lingtao/net/service/ProductService.java

@@ -4149,15 +4149,18 @@ public class ProductService {
                     double[] jitu_add = {};
                     double[] tang = {};
                     double[] yaao = {};
+                    double[] tanglei = {};
                     if ("10".equals(kind)) {
                         jitu = new double[]{267, 317, 450, 733, 1200};
                         jitu_add = new double[]{190, 210, 250, 320, 440};
                         tang = new double[]{250, 283, 383, 650, 980};
+                        tanglei = new double[]{300, 340, 460, 780, 1176};
                         yaao = new double[]{250, 267, 383, 617, 950};
                     } else if ("11".equals(kind)) {
                         jitu = new double[]{267, 317, 417, 667, 1080};
                         jitu_add = new double[]{95, 105, 125, 160, 220};
                         tang = new double[]{250, 300, 350, 583, 930};
+                        tanglei = new double[]{300, 360, 420, 700, 1116};
                         yaao = new double[]{250, 283, 317, 533, 900};
                     }
                     craft_list = Arrays.asList(dto.getCraft());
@@ -4180,6 +4183,12 @@ public class ProductService {
                         if (craft_list.contains("烫金")) {
                             product.setPrice(tang[i]);
                         }
+                        if (craft_list.contains("烫镭射银")) {
+                            product.setPrice(tanglei[i]);
+                            if (dto.getTcolor().contains("双面烫镭射银")) {
+                                product.setPrice(Math.ceil(tanglei[i] * 1.5));
+                            }
+                        }
                         if (craft_list.contains("无色压凹")) {
                             product.setPrice(yaao[i]);
                         }

+ 30 - 0
src/main/java/lingtao/net/util/PriceUtils.java

@@ -973,15 +973,27 @@ public class PriceUtils {
             } else if ("单面烫黄金".equals(kind2)) {
                 double priceArr[] = {68, 48, 37, 36, 35, 34};
                 list = acountTag600Price(area, count, priceArr, shengzi, flag, list);
+            } else if ("单面烫镭射银".equals(kind2)) {
+                double priceArr[] = {82, 58, 45, 43, 42, 41};
+                list = acountTag600Price(area, count, priceArr, shengzi, flag, list);
             } else if ("双面烫黄金".equals(kind2)) {
                 double priceArr[] = {108, 72, 56, 54, 52, 50};
                 list = acountTag600Price(area, count, priceArr, shengzi, flag, list);
+            } else if ("双面烫镭射银".equals(kind2)) {
+                double priceArr[] = {123, 87, 68, 65, 63, 60};
+                list = acountTag600Price(area, count, priceArr, shengzi, flag, list);
             } else if ("击凸".equals(kind2) || "压凹".equals(kind2)) {
                 double priceArr[] = {75, 50, 40, 40, 39, 38};
                 list = acountTag600Price(area, count, priceArr, shengzi, flag, list);
             } else if ("单面烫黄金+凹凸".equals(kind2)) {
                 double priceArr[] = {93, 63, 48, 48, 47, 46};
                 list = acountTag600Price(area, count, priceArr, shengzi, flag, list);
+            } else if ("单面烫金+压凹".equals(kind2)) {
+                double priceArr[] = {93, 63, 48, 48, 47, 46};
+                list = acountTag600Price(area, count, priceArr, shengzi, flag, list);
+            } else if ("单面烫金+击凸".equals(kind2)) {
+                double priceArr[] = {93, 63, 48, 48, 47, 46};
+                list = acountTag600Price(area, count, priceArr, shengzi, flag, list);
             }
         }
         if ("6".equals(kind)) {
@@ -1052,6 +1064,24 @@ public class PriceUtils {
                         {959, 959, 1111, 1264, 1294, 1417, 1570, 1680, 1692, 1844, 2150, 2670, 3165, 3250, 4625, 7069, 12415},
                         {1885, 1885, 2184, 2483, 2542, 2782, 3081, 3296, 3320, 3619, 4217, 5233, 6203, 6370, 9061, 13845, 24310}
                 };
+            } else if ("单面烫金+压凹".equals(kind2)) {
+                prices = new int[][]{
+                        {239, 239, 279, 321, 329, 361, 403, 433, 435, 477, 559, 698, 830, 853, 1222, 1877, 3310},
+                        {244, 244, 284, 326, 334, 366, 408, 438, 440, 482, 564, 703, 835, 858, 1227, 1882, 3315},
+                        {397, 430, 460, 524, 537, 588, 651, 697, 702, 766, 894, 1110, 1316, 1352, 1925, 2943, 5174},
+                        {585, 585, 678, 772, 791, 865, 959, 1027, 1034, 1128, 1315, 1634, 1937, 1989, 2831, 4329, 7605},
+                        {959, 959, 1111, 1264, 1294, 1417, 1570, 1680, 1692, 1844, 2150, 2670, 3165, 3250, 4625, 7069, 12415},
+                        {1885, 1885, 2184, 2483, 2542, 2782, 3081, 3296, 3320, 3619, 4217, 5233, 6203, 6370, 9061, 13845, 24310}
+                };
+            } else if ("单面烫金+击凸".equals(kind2)) {
+                prices = new int[][]{
+                        {239, 239, 279, 321, 329, 361, 403, 433, 435, 477, 559, 698, 830, 853, 1222, 1877, 3310},
+                        {244, 244, 284, 326, 334, 366, 408, 438, 440, 482, 564, 703, 835, 858, 1227, 1882, 3315},
+                        {397, 430, 460, 524, 537, 588, 651, 697, 702, 766, 894, 1110, 1316, 1352, 1925, 2943, 5174},
+                        {585, 585, 678, 772, 791, 865, 959, 1027, 1034, 1128, 1315, 1634, 1937, 1989, 2831, 4329, 7605},
+                        {959, 959, 1111, 1264, 1294, 1417, 1570, 1680, 1692, 1844, 2150, 2670, 3165, 3250, 4625, 7069, 12415},
+                        {1885, 1885, 2184, 2483, 2542, 2782, 3081, 3296, 3320, 3619, 4217, 5233, 6203, 6370, 9061, 13845, 24310}
+                };
             }
 
             for (int i = 0; i < count_list.length; i++) {

+ 32 - 7
src/main/webapp/views/product/coaster.jsp

@@ -151,7 +151,10 @@
                             </span>
                             <input type="radio" name="kind2Value" lay-filter="kind2Value" value="击凸" title="击凸">
                             <input type="radio" name="kind2Value" lay-filter="kind2Value" value="压凹" title="压凹">
-                            <input type="radio" name="kind2Value" value="单面烫黄金+凹凸" title="单面烫黄金+凹凸">
+                            <input type="radio" name="kind2Value" lay-filter="kind2Value" value="单面烫金+压凹"
+                                   title="单面烫金+压凹">
+                            <input type="radio" name="kind2Value" lay-filter="kind2Value" value="单面烫金+击凸"
+                                   title="单面烫金+击凸">
                             <span id="color_type" class="layui-inline" style="display: none;width: 100px">
                                 <select name="craft" class="select" disabled>
                                     <option value="无色" selected>无色</option>
@@ -188,11 +191,16 @@
                     <div class="layui-input-block">
                         <span style="float:left;margin-top:10px">烫金 : </span>
                         <input type="radio" name="craft" lay-filter="switch" value="烫金" title="烫金">
+                        <input type="radio" name="craft" lay-filter="switch" value="烫镭射银" title="烫镭射银">
                         <div style="display: none" id="tangcolor">
                             <input type="radio" name="tcolor" value="黑色" title="黑色" checked>
                             <input type="radio" name="tcolor" value="金色" title="金色">
                             <input type="radio" name="tcolor" value="红色" title="红色">
                         </div>
+                        <div style="display: none" id="tangtype">
+                            <input type="radio" name="tcolor" value="单面烫镭射银" title="单面烫镭射银" checked>
+                            <input type="radio" name="tcolor" value="双面烫镭射银" title="双面烫镭射银">
+                        </div>
                     </div>
 
                 </div>
@@ -259,6 +267,7 @@
             $(".pvcCraft").find("select").attr("disabled", true);
             $("#jtcolor").hide();
             $("#tangcolor").hide();
+            $("#tangtype").hide();
             $("#yaao").prop("checked", true);
             $("#size").val("").prop("readonly", false);
             $("#leishe_layout").hide();
@@ -296,6 +305,9 @@
                         $('#non').prop('checked', true);
                         $("#double").parent('span').hide();
                         $('#non').parent('span').show();
+                        $("#leishe_layout").show();
+                        $("#leishe_layout").find(":input").attr("disabled", false);
+                        $("#leishe_layout").find("select").attr("disabled", false);
                     }
                     if (kindValueData.value == '6') {
                         $('#double').prop('checked', true);
@@ -317,14 +329,23 @@
             $("#jtcolor").hide();
             $("#jtcolor").find(":input").attr("disabled", true);
             $("#tangcolor").hide();
+            $("#tangtype").hide();
             $("#tangcolor").find(":input").attr("disabled", true);
+            $("#tangtype").find(":input").attr("disabled", true);
             if ($(data.elem).is(":checked") && data.value == "击凸") {
                 $("#jtcolor").show();
                 $("#jtcolor").find(":input").attr("disabled", false);
             }
+            $("input[name='tcolor']").prop("checked", false);
             if ($(data.elem).is(":checked") && data.value == "烫金") {
                 $("#tangcolor").show();
                 $("#tangcolor").find(":input").attr("disabled", false);
+                $("#tangcolor input[name='tcolor']")[0].checked = true;
+            }
+            if ($(data.elem).is(":checked") && data.value == "烫镭射银") {
+                $("#tangtype").show();
+                $("#tangtype").find(":input").attr("disabled", false);
+                $("#tangtype input[name='tcolor']")[0].checked = true;
             }
             form.render();
         });
@@ -338,7 +359,7 @@
         });
         form.on('radio(kind2Value)', function (data) {
             let at = data.value;
-            if (at == '击凸' || at == '压凹') {
+            if (at == '击凸' || at == '压凹' || at == '单面烫金+压凹' || at == '单面烫金+击凸') {
                 if (at.indexOf("击凸") > -1) {
                     $("#color_type select").empty().append(` <option value="无色" selected>无色</option>
                     <option value="有色">有色</option>
@@ -515,8 +536,8 @@
                     var data = result.data.proList;
                     if ("无" != kind2Value) {
 
-                        if (kind2Value == "击凸" || kind2Value == "压凹") {
-                            arr.push($("#color_type select[name='craft'] option:selected").val())
+                        if (kind2Value == "击凸" || kind2Value == "压凹" || kind2Value == "单面烫金+压凹" || kind2Value == "单面烫金+击凸") {
+                            arr.push(kind2Value + $("#color_type select[name='craft'] option:selected").val())
                         } else if (kind2Value == '烫镭射银') {
                             arr.push($("#leishe_type select[name='craft'] option:selected").val())
                         } else if (kind2Value == '烫黄金') {
@@ -537,17 +558,21 @@
                     } else {
                         let aotu = $("input[name='aotu']:checked").val();
                         let craft = $("input[name='craft']:checked").val();
-                        let craft_list = [aotu, craft];
+                        let craft_list = [aotu];
 
                         if (craft == "击凸") {
                             let ys = $("input[name='jtcolor']:checked");
                             ys.each(item => {
                                 craft_list.push($(ys[item]).val());
                             })
-                        }
-                        if (craft == "烫金") {
+                        } else if (craft == "烫金") {
+                            let ys = $("input[name='tcolor']:checked").val();
+                            craft_list.push(ys);
+                        } else if (craft == "烫镭射银") {
                             let ys = $("input[name='tcolor']:checked").val();
                             craft_list.push(ys);
+                        }else{
+                            craft_list.push(craft);
                         }
                         span_result += "工艺: " + craft_list.join(",") + "\n";
                     }