فهرست منبع

新增印白工艺

zhuyiyi 3 ماه پیش
والد
کامیت
73eb1bc88a

+ 17 - 1
src/main/java/lingtao/net/service/ProductService.java

@@ -4816,6 +4816,7 @@ public class ProductService {
                 priceList.add(pro);
                 return priceList;
             case "防伪标":
+                carft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
                 int[][] prices = {
                         {176, 176, 176, 176, 176, 176, 176, 176, 180, 184, 192, 192, 202, 228, 228},
                         {180, 180, 182, 184, 186, 188, 196, 206, 240, 260, 274, 286, 306, 344, 360},
@@ -4833,6 +4834,9 @@ public class ProductService {
                 for (Product product : priceList) {
                     product.setPrice(Math.ceil(product.getPrice() * 1.3));
                 }
+                if (carft_list.contains("印白墨")) {
+                    priceList = PriceUtils.getYinBaiPrice(priceList, width, length);
+                }
                 return priceList;
             case "透卡":
                 return getPETPrice(dto, width, length);
@@ -5670,6 +5674,9 @@ public class ProductService {
                             product.setPrice(Math.ceil(product.getPrice() * 2.3));
                         }
                     }
+                    if ("印白墨".equals(dto.getYinbai())) {
+                        stickersList = PriceUtils.getYinBaiPrice(stickersList, width, length);
+                    }
                     /*
                      * if ("印2色+凹凸".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int priceArr1[] = { 280, 300, 350, 460, 520, 660, 1100 }; // 6*5cm-8*8cm;10-3cm - 10*6cm以内 int priceArr2[] = { 280, 320, 450, 660, 780, 900, 1500 }; // 11*11cm内;12*8cm内;20*4cm以内 int priceArr3[] = { 340, 500, 850, 1100, 1550, 1700, 2500 }; stickersList = new YaJinStickersPrice().accountPriceBySize(width, length, count, priceArr1, priceArr2, priceArr3); } else if ("加凹凸".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int
                      * priceArr1[] = { 170, 200, 230, 310, 360, 420, 710 }; // 6*5cm-8*8cm;10-3cm - 10*6cm以内 int priceArr2[] = { 200, 240, 350, 440, 560, 670, 1000 }; // 11*11cm内;12*8cm内;20*4cm以内 int priceArr3[] = { 240, 380, 620, 800, 940, 1050, 1960 }; stickersList = new YaJinStickersPrice().accountPriceBySize(width, length, count, priceArr1, priceArr2, priceArr3); } else if ("印2色".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int priceArr1[] = { 140, 170, 200, 280, 380, 420, 680 }; //
@@ -5728,6 +5735,9 @@ public class ProductService {
                             product.setPrice(Math.ceil(product.getPrice() + product.getPrice() * 1 / 10));
                         }
                     }
+                    if ("印白墨".equals(dto.getYinbai())) {
+                        stickersList = PriceUtils.getYinBaiPrice(stickersList, width, length);
+                    }
                     break;
                 case "格底珠光膜":
                     if ("覆亮膜".equals(dto.getCraftMo())) {
@@ -5952,6 +5962,9 @@ public class ProductService {
                                 }
                             });
                         }
+                        if ("印白墨".equals(dto.getYinbai())) {
+                            stickersList = PriceUtils.getYinBaiPrice(stickersList, width, length);
+                        }
                         break;
                     }
                     return null;
@@ -6004,6 +6017,9 @@ public class ProductService {
                             product.setPrice(Math.ceil(product.getPrice() + product.getPrice() * 1 / 10));
                         }
                     }
+                    if ("印白墨".equals(dto.getYinbai())) {
+                        stickersList = PriceUtils.getYinBaiPrice(stickersList, width, length);
+                    }
                     break;
                 case "格底珠光膜":
                     l = 42.0;
@@ -6108,7 +6124,7 @@ public class ProductService {
 //            }
 //        }
 
-        if ("印白墨".equals(dto.getYinbai())) {
+        if ("印白墨".equals(dto.getYinbai()) && !"6".equals(kind) && !"拉丝银".equals(kind)) {
             stickersList = new PVCStickersPrice().acountYinbaiPrice(length, width, stickersList);
         }
         // 价格*款数 铜版纸放到外面执行

+ 28 - 1
src/main/java/lingtao/net/util/PriceUtils.java

@@ -1619,7 +1619,7 @@ public class PriceUtils {
         }
 
         if (!StringUtils.isEmpty(zhuan)) {
-            if ("烫金".equals(zhuan[0]) || "烫哑金".equals(zhuan[0]) || "烫亮金".equals(zhuan[0]) || "烫银".equals(zhuan[0]) || "烫蓝".equals(zhuan[0]) || "烫红".equals(zhuan[0]) || "烫黑".equals(zhuan[0]) || "玫瑰金".equals(zhuan[0]) || "镭射银".equals(zhuan[0]) || "镭射金".equals(zhuan[0]) || "炫彩镭射".equals(zhuan[0])) {
+            if ("烫金".equals(zhuan[0]) || "烫哑金".equals(zhuan[0]) || "烫哑银".equals(zhuan[0]) || "烫亮金".equals(zhuan[0]) || "烫银".equals(zhuan[0]) || "烫蓝".equals(zhuan[0]) || "烫红".equals(zhuan[0]) || "烫黑".equals(zhuan[0]) || "玫瑰金".equals(zhuan[0]) || "镭射银".equals(zhuan[0]) || "镭射金".equals(zhuan[0]) || "炫彩镭射".equals(zhuan[0])) {
                 // 起步价+58元
                 price = price + (40 * area);
                 price = price > 80 ? price : 80;
@@ -3702,6 +3702,33 @@ public class PriceUtils {
         return price;
     }
 
+    public static List<Product> getYinBaiPrice(List<Product> productList, double width, double length) {
+        double miniprice = 50;
+        double miniarea = 9;
+        //cm
+        double[] prices = {7.2, 4.6, 4, 2.8, 2.5, 2.24, 2.02, 1.92, 1.63, 1.56, 1.34, 1.26, 1.25, 1.04, 0.86, 0.64};
+        double[] areas = {9, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 140, 210, 420};
+        double area = width * length;
+        double craft_price = 0;
+        if (area < miniarea) {
+            craft_price = miniprice;
+        } else {
+            for (int i = 1; i < areas.length; i++) {
+                if (area < areas[i]) {
+                    craft_price = prices[i - 1] * area;
+                    break;
+                }
+            }
+            if (craft_price == 0) {
+                craft_price = prices[prices.length - 1] * area;
+            }
+        }
+        for (Product pro : productList) {
+            pro.setPrice(Math.ceil(pro.getPrice() + craft_price));
+        }
+        return productList;
+    }
+
     public FunReturnVo getBagTagPrice(String kind2Value, String kindValue) {
         FunReturnVo vo = new FunReturnVo();
         if ("1".equals(kind2Value)) {

+ 11 - 1
src/main/webapp/views/product/antifake.jsp

@@ -66,6 +66,9 @@
             <div class="layui-input-block">覆膜工艺:
                 <input type="checkbox" name="craft" lay-filter="switch" value="亮膜" title="亮膜" checked>
             </div>
+            <div class="layui-input-block" id="yinbai">印白工艺:
+                <input type="checkbox" name="craft" lay-filter="switch" value="印白墨" title="印白墨">
+            </div>
             <hr>
             <div class="layui-form-item">
                 <button class="layui-btn" lay-submit="" lay-filter="acount_btn">计算</button>
@@ -149,7 +152,14 @@
         }
 
         form.on("select(kindValue)", (data) => {
+            $("#yinbai").hide();
+            $("#yinbai").find("input").prop("disabled", true)
+            if (data.value == "VOID哑银") {
+                $("#yinbai").show();
+                $("#yinbai input").prop("disabled", false)
+            }
             getProductImage();
+            form.render();
         })
         form.on("checkbox(switch)", (data) => {
             let arr = []
@@ -199,7 +209,7 @@
                     let kind = $("select[name='kindValue'] option:selected").val();
                     let number = $("#number").val();
                     $("input[name='craft']:checked").each(function () {
-                        if (!$(this).is("disabled")) {
+                        if (!$(this).prop("disabled")) {
                             arr.push($(this).val())
                         }
                     })

+ 3 - 3
src/main/webapp/views/product/handBag.jsp

@@ -97,7 +97,7 @@
                         <option value="大红色">大红色</option>
                         <option value="深蓝色">深蓝色</option>
                         <option value="浅蓝色">浅蓝色</option>
-                        <option value="黄色">黄色</option>
+                        <option value="黄色">黄色</option>
                     </select>
                 </div>
                 <p>
@@ -294,7 +294,7 @@
                         <option value="大红色">大红色</option>
                         <option value="深蓝色">深蓝色</option>
                         <option value="浅蓝色">浅蓝色</option>
-                        <option value="黄色">黄色</option>`
+                        <option value="黄色">黄色</option>`
             }
             if (data.value == 1) {
                 html = ` <option value="" selected></option>
@@ -395,7 +395,7 @@
                         <option value="大红色">大红色</option>
                         <option value="深蓝色">深蓝色</option>
                         <option value="浅蓝色">浅蓝色</option>
-                        <option value="黄色">黄色</option>`;
+                        <option value="黄色">黄色</option>`;
             $("#shen_color").empty().append(html);
             form.render();
         }

+ 1 - 0
src/main/webapp/views/product/metal.jsp

@@ -153,6 +153,7 @@
                         <select name="craft" class="layui-select" lay-filter="tjselect" disabled>
                             <option value="烫哑金">烫哑金</option>
                             <option value="烫亮金">烫亮金</option>
+                            <option value="烫哑银">烫哑银</option>
                             <option value="烫蓝">烫蓝</option>
                             <option value="烫红">烫红</option>
                             <option value="烫黑">烫黑</option>

+ 8 - 1
src/main/webapp/views/product/poster.jsp

@@ -250,7 +250,7 @@
                     <input type="checkbox" name="craft" lay-filter="switch" class="pvcHide tang" value="模切" title="模切">
                     <input type="checkbox" name="craft" lay-filter="switch" class="pvcHide tang" value="打孔" title="打孔">
                 </div>
-                <div class="layui-form-item">
+                <div class="layui-form-item" id="zhijia">
                     配件:
                     <input type="checkbox" name="craft" lay-filter="switch" value="铁架支架" title="铁架支架">
                     <div class="layui-inline zheye-lay" style="width: 50px;display: none">
@@ -1097,6 +1097,7 @@
                 $(".redNo").attr("disabled", false);
                 $("#width").find("option[value = 50]").attr("selected", false);
             }
+
             let kindValue = $("input[name='kindValue']:checked").val();
             $(".dengx-type").hide()
             $(".switchSizeCoupon").hide()
@@ -1126,6 +1127,12 @@
             if (kindValue == 1 && data.value == 8) {
                 $(".zdt_xiezhen").show();
             }
+            $("#zhijia").hide();
+            $("#zhijia").find(":input").attr("disabled", true);
+            if (kindValue == 0 && data.value == "0") {
+                $("#zhijia").show();
+                $("#zhijia").find(":input").attr("disabled", false);
+            }
             form.render();
             setSelectOption()
 

+ 25 - 12
src/main/webapp/views/product/stickers.jsp

@@ -285,9 +285,9 @@
                 <span class="caiqie">
                     <input type="radio" name="craftQie" calss="moqie" value="裁切" lay-skin="primary" title="裁切"/>
                 </span>
-                <span class="meiwenzhiQie" style="display:none"><input type="radio" name="craftQie" class="bumoqie"
-                                                                       value="不模切" lay-skin="primary"
-                                                                       title="不模切"></span>
+                <span class="meiwenzhiQie" style="display:none">
+                    <input type="radio" name="craftQie" class="bumoqie" value="不模切" lay-skin="primary" title="不模切">
+                </span>
                 <span class="cha_fm">
 				    	|&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" name="craftMo" lay-filter="craftMo" value="覆哑膜" title="覆哑膜" checked="checked">
@@ -952,15 +952,13 @@
                 $('.at').prop('disabled', 'disabled');
             }
             // 透明不干胶带白墨工艺
-            if (data.value == 2 || data.value == 13) {
+            if (data.value == 2 || data.value == 13 || data.value == 6 || data.value == "拉丝银") {
                 // 复选框的disabled
                 $(".yb").show();
                 $(".yb").find(":input").attr("disabled", false);
-                /* $('.yb').removeAttr('disabled'); */
             } else {
                 $(".yb").hide();
                 $(".yb").find(":input").attr("disabled", true);
-                /* $('.yb').prop('disabled', 'disabled'); */
             }
             // 默认 禁用【彩色印刷+烫金/银】长短边输入框,禁止提交
             $(".sizeTang").find(":input").attr("disabled", true);
@@ -1262,13 +1260,18 @@
                 return false;
             }
             // 凹凸只能选1个
+            let ybvalue = $("input[name='yinbai']:checked").val();
             var aotu = $(".aotu:checked").length;
+            if (aotu > 0 && ybvalue == "印白墨") {
+                $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
+                $(data.elem).prop("checked", false);
+                layer.msg('凹凸-印白只能选1项!', {offset: ['300px', '300px']}, {icon: 5});
+                return false;
+            }
             if (aotu > 1) {
                 $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                 $(data.elem).prop("checked", false);
-                layer.msg('凹凸只能选1项!', {
-                    offset: ['300px', '300px']
-                }, {icon: 5});
+                layer.msg('凹凸只能选1项!', {offset: ['300px', '300px']}, {icon: 5});
                 return false;
             }
             // 印白只能选1个
@@ -1276,11 +1279,10 @@
             if (yinbai > 1) {
                 $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                 $(data.elem).prop("checked", false);
-                layer.msg('印白只能选1项!', {
-                    offset: ['300px', '300px']
-                }, {icon: 5});
+                layer.msg('印白只能选1项!', {offset: ['300px', '300px']}, {icon: 5});
                 return false;
             }
+
         })
         form.on('radio(ui_type)', function (data) {
             if (data.elem.checked) {
@@ -1291,6 +1293,13 @@
                     return false;
                 }
             }
+            var aotu = $(".aotu:checked").length;
+            if (data.value == '印白墨' && aotu > 0) {
+                $(".yinbai_un").click();
+                form.render()
+                layer.msg('凹凸-印白只能选1项!', {offset: ['300px', '300px']}, {icon: 5});
+                return false;
+            }
             getProductImage(kValue);
         });
         form.on('radio(craftMo)', function (data) {
@@ -1756,6 +1765,7 @@
                                 craft_list.push($("input[name='craftTang']:checked").val());
                             }
                         }
+
                     } else if (stickerKind == "双面印刷不干胶") {
                         span_result = "";
                         if ($(".ui_sm input[name='craftQie']:checked").val() != "") {
@@ -1791,6 +1801,9 @@
                         var yaqian = ''
                         if ($("input[name='yinbai']:checked").val() != "") {
                             yaqian = $("input[name='yinbai']:checked").val();
+                            if (kindValue == 6 || kindValue == "拉丝银") {
+                                craft_list.push(yaqian)
+                            }
                         }
                         if (stickerKind == "插旗") {
                             if ($("input[name='craft']:checked").val() != null) {