diff --git a/src/main/java/lingtao/net/util/PriceUtils.java b/src/main/java/lingtao/net/util/PriceUtils.java index 6417bfe..7cb7751 100644 --- a/src/main/java/lingtao/net/util/PriceUtils.java +++ b/src/main/java/lingtao/net/util/PriceUtils.java @@ -40,18 +40,37 @@ public class PriceUtils { if ("10*2".equals(dto.getSize())) { prices = new double[]{220, 300, 337, 412, 600, 680, 1200, 1980}; } - for (int i = 0; i < counts.length; i++) { - if (counts[i] < dto.getCount()) { - continue; + double lastPrice = 0; + int lastCount = 0; + double price = 0; + int countItem = count; + do { + if (countItem > counts[counts.length - 1]) { + price += prices[prices.length - 1]; + countItem = countItem - counts[counts.length - 1]; + } else { + for (int i = 0; i < counts.length; i++) { + if (counts[i] < countItem) { + lastCount = counts[i]; + lastPrice = prices[i]; + continue; + } + + if (lastPrice == 0 && lastCount == 0) { + price += prices[i]; + } else { + price += lastPrice + (countItem - lastCount) * (prices[i] - lastPrice) / (counts[i] - lastCount); + } + break; + } + countItem = 0; } - if (list.size() > 2) { - break; - } - pro = new Product(); - pro.setCount(counts[i]); - pro.setPrice(prices[i] ); - list.add(pro); - } + } while (countItem != 0); + + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil(price)); + list.add(pro); return list; } // 最低收费 @@ -2179,7 +2198,12 @@ public class PriceUtils { // 第一张大纸价格 double price = 80; if (craft.size() > 0) {//工艺起步价120 - price = 120; + if (!craft.contains("内部模切")) { + price = 120; + } + if (craft.contains("内部模切") && craft.size() > 1) { + price = 120; + } } // 换成毫米每边+3 length = length * 10 + 2 * 1.5; @@ -2200,7 +2224,7 @@ public class PriceUtils { price = num * 25; } price += 10 * craft.size() * num; - if (dto.getN_mq_num() > 0) { + if (craft.contains("内部模切") && dto.getN_mq_num() > 0) { price += 10 * dto.getN_mq_num(); } price = Math.ceil(price + (number - 1) * 5); diff --git a/src/main/webapp/views/product/acidTags.jsp b/src/main/webapp/views/product/acidTags.jsp index c9419a3..414a563 100644 --- a/src/main/webapp/views/product/acidTags.jsp +++ b/src/main/webapp/views/product/acidTags.jsp @@ -1,187 +1,231 @@ <%@ 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/厘米) 输入格式: 长 * 宽 -

-
- 135克硫酸纸尺寸 - - 350克铜版纸尺寸 - -
-

- 数量(套) -

-
- -
-

款数

-
- -
-

- 客户旺旺 -

-
- -
-

- 工艺 -

-
- -
-
- - -
-

计算结果-

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

硫酸纸吊牌

+ +
+
+ +

+ 尺寸(CM/厘米) 输入格式: 长 * 宽 +

+
+ 135克硫酸纸尺寸 + + 350克铜版纸尺寸 + +
+

+ 数量(套) +

+
+ +
+

款数

+
+ +
+

+ 客户旺旺 +

+
+ +
+

+ 工艺 +

+
+ +
+
+ + +
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFee.jsp" %> +
+ +
+
+
+
+
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/angingCloth.jsp b/src/main/webapp/views/product/angingCloth.jsp index 8f0fa4b..1b97be5 100644 --- a/src/main/webapp/views/product/angingCloth.jsp +++ b/src/main/webapp/views/product/angingCloth.jsp @@ -64,6 +64,12 @@ +
+ + +

@@ -160,6 +166,26 @@ } getProductImage(data.elem.checked ? data.value : ''); }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { @@ -203,6 +229,10 @@ let craftys = $("input[name='craftys']:checked").val(); $("input[name='craft']:checked").each(function () { if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } arr.push($(this).val()) } }) diff --git a/src/main/webapp/views/product/antifake.jsp b/src/main/webapp/views/product/antifake.jsp index 7673ba0..7d53528 100644 --- a/src/main/webapp/views/product/antifake.jsp +++ b/src/main/webapp/views/product/antifake.jsp @@ -69,6 +69,12 @@
印白工艺:
+
+ + +

@@ -161,6 +167,26 @@ getProductImage(); form.render(); }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) form.on("checkbox(switch)", (data) => { let arr = [] $("input[name='craft']:checked").each(function () { @@ -210,6 +236,10 @@ let number = $("#number").val(); $("input[name='craft']:checked").each(function () { if (!$(this).prop("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } arr.push($(this).val()) } }) diff --git a/src/main/webapp/views/product/aromatherapyCard.jsp b/src/main/webapp/views/product/aromatherapyCard.jsp index ca940be..5c7defc 100644 --- a/src/main/webapp/views/product/aromatherapyCard.jsp +++ b/src/main/webapp/views/product/aromatherapyCard.jsp @@ -153,6 +153,12 @@
+
+ + +

@@ -273,6 +279,16 @@ form.render(); return false; } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + form.render(); + return false; + } }) form.on('checkbox(peijian)', function (data) { let craft_list = []; @@ -334,6 +350,9 @@ if (!$(this).is(':disabled')) { if (carft_list4.indexOf($(this).val()) > -1) { craft.push($(this).val() + $("#peijian_ui select[name='shen_color'] option:selected").val()); + } else if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; } else { craft.push($(this).val()); } @@ -387,9 +406,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/badge.jsp b/src/main/webapp/views/product/badge.jsp index d8eb96b..1837d0a 100644 --- a/src/main/webapp/views/product/badge.jsp +++ b/src/main/webapp/views/product/badge.jsp @@ -107,6 +107,12 @@ title="磁铁">
+
+ + +

@@ -279,6 +285,14 @@ if (craft_list.includes("PET印刷") > 0) { $("#size").val("3*3") } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } getImages(); form.render(); // changeRemark() @@ -313,6 +327,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/banqi.jsp b/src/main/webapp/views/product/banqi.jsp index ea9b673..855d91d 100644 --- a/src/main/webapp/views/product/banqi.jsp +++ b/src/main/webapp/views/product/banqi.jsp @@ -80,6 +80,12 @@
<%-- --%> +
+ + +

@@ -165,7 +171,7 @@ craft.push($(this).val()); } }); - if(craft.indexOf("旗杆") > -1 && craft.indexOf("伸缩旗杆") > -1){ + if (craft.indexOf("旗杆") > -1 && craft.indexOf("伸缩旗杆") > -1) { $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox"); $(data.elem).prop("checked", false); layer.msg('旗杆 - 伸缩旗杆只能选择一种!', {offset: ['300px', '300px']}, {icon: 5}); @@ -188,6 +194,27 @@ form.render(); }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var number = $("#number").val(); @@ -201,6 +228,9 @@ if (!$(this).is(':disabled')) { if ($(this).val() == "伸缩旗杆") { craft.push($(this).val() + $(".qigan input").val()); + } else if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; } else { craft.push($(this).val()); } @@ -241,9 +271,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/blackCard.jsp b/src/main/webapp/views/product/blackCard.jsp index b0b2542..9726308 100644 --- a/src/main/webapp/views/product/blackCard.jsp +++ b/src/main/webapp/views/product/blackCard.jsp @@ -94,6 +94,12 @@
+
+ + +

@@ -199,6 +205,26 @@ form.on('checkbox(switch)', function (data) { getProductImage() }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kind2Data = { @@ -213,6 +239,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } arr.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/canopy.jsp b/src/main/webapp/views/product/canopy.jsp index 860a6ca..43155d5 100644 --- a/src/main/webapp/views/product/canopy.jsp +++ b/src/main/webapp/views/product/canopy.jsp @@ -92,6 +92,12 @@
+
+ + +

@@ -238,6 +244,27 @@ getProductImage(data.elem.checked ? data.value : ''); }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { @@ -246,6 +273,10 @@ let craft_list = []; $("input[name='craft']:checked").each(function () { if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + craft_list.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft_list.push($(this).val()) } }) diff --git a/src/main/webapp/views/product/canvas.jsp b/src/main/webapp/views/product/canvas.jsp index 9b440b0..618eabe 100644 --- a/src/main/webapp/views/product/canvas.jsp +++ b/src/main/webapp/views/product/canvas.jsp @@ -95,6 +95,12 @@
+
+ + +

@@ -226,6 +232,27 @@ form.render('radio'); }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var number = $("#number").val(); @@ -251,6 +278,9 @@ if (!$(this).is(':disabled')) { if ($(this).val() == "伸缩杆70-120CM") { craft.push($("input[name='pcount']").val() + "个" + $(this).val()) + } else if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; } else { craft.push($(this).val()) } @@ -306,9 +336,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/canvasBag.jsp b/src/main/webapp/views/product/canvasBag.jsp index 42567ea..14927f2 100644 --- a/src/main/webapp/views/product/canvasBag.jsp +++ b/src/main/webapp/views/product/canvasBag.jsp @@ -113,6 +113,12 @@
+
+ + +

@@ -229,6 +235,16 @@ form.render(); return false; } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + form.render(); + return false; + } }) form.on('checkbox(peijian)', function (data) { @@ -276,6 +292,9 @@ if ($(this).val() == '织带绳') { craft.push($(this).val()); craft.push($("select[name='s_color'] option:selected").val() + $(this).val()); + } else if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; } else { craft.push($(this).val()); } @@ -335,9 +354,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/card.jsp b/src/main/webapp/views/product/card.jsp index c821ae4..e06e601 100644 --- a/src/main/webapp/views/product/card.jsp +++ b/src/main/webapp/views/product/card.jsp @@ -98,6 +98,12 @@
+
+ + +

@@ -309,6 +315,26 @@ } getProductImage(data.elem.checked ? data.value : "") }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var proTypeValue = $('input[name="kind"]:checked').val(); @@ -337,7 +363,7 @@ } var kind2Value = $("#kind2Value option:checked").text(); var craftMo = [$('input[name="craftMo"]:checked').val()]; - var craftJiao = [$('input[name="craftJiao"]:checked').val()]; + var craftJiao = [$('input[name="craftJiao"]:checked:not(:disabled)').val()]; var number = $("#number").val(); var count = $("select[name='count'] option:selected").text(); var proTypeValueData = { @@ -354,8 +380,20 @@ }); return false; } + let arr = [] + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + } + }) + arr.push(craftMo) + arr.push(craftJiao) var data = result.data.proList; - var span_result = proTypeValueData[proTypeValue] + ' - ' + kindValue + ' - ' + kind2Value + ' - ' + craftMo + ' - ' + craftJiao + ' -(同款内容)\n'; + var span_result = proTypeValueData[proTypeValue] + ' - ' + kindValue + ' - ' + kind2Value + ' -(同款内容)\n'; + span_result += "工艺 :" + arr.join(",") + "\n"; if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n' @@ -368,9 +406,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/chaqi.jsp b/src/main/webapp/views/product/chaqi.jsp index f57dfad..7b61774 100644 --- a/src/main/webapp/views/product/chaqi.jsp +++ b/src/main/webapp/views/product/chaqi.jsp @@ -145,6 +145,12 @@
+
+ + +
@@ -335,6 +341,10 @@ $("input:checkbox[name='" + name + "']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); @@ -360,6 +370,14 @@ if (craftCount.length > 0) { $(".ui_guaguasize").show(); } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } form.render(); }) diff --git a/src/main/webapp/views/product/chetie.jsp b/src/main/webapp/views/product/chetie.jsp index 6edc916..a3f5343 100644 --- a/src/main/webapp/views/product/chetie.jsp +++ b/src/main/webapp/views/product/chetie.jsp @@ -65,6 +65,12 @@
+
+ + +

@@ -168,7 +174,16 @@ form.render(); return false; } - + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + form.render(); + return false; + } }) // 点击计算,计算价格 @@ -196,6 +211,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); @@ -248,9 +267,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/chuanqi.jsp b/src/main/webapp/views/product/chuanqi.jsp index 95c4587..16b1e32 100644 --- a/src/main/webapp/views/product/chuanqi.jsp +++ b/src/main/webapp/views/product/chuanqi.jsp @@ -57,6 +57,12 @@
+
+ + +

@@ -90,7 +96,26 @@ layui.use(['table','form'], function(){ var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功 var table = layui.table; - + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function(data) { var number= $("#number").val(); @@ -101,6 +126,10 @@ layui.use(['table','form'], function(){ $("input:checkbox[name='craft']:checked").each(function(i) { // 没有被禁用的工艺加到arr中 if(!$(this).is(':disabled')){ + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } arr.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/clothes.jsp b/src/main/webapp/views/product/clothes.jsp index d4a43e4..a6579d3 100644 --- a/src/main/webapp/views/product/clothes.jsp +++ b/src/main/webapp/views/product/clothes.jsp @@ -154,6 +154,12 @@
+
+ + +

@@ -534,7 +540,26 @@ getProductImage(data.elem.checked ? data.value : "") form.render(); }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { @@ -550,6 +575,10 @@ let arr = []; $("input[name='craft']:checked").each(function () { if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } arr.push($(this).val()) } }) diff --git a/src/main/webapp/views/product/coaster.jsp b/src/main/webapp/views/product/coaster.jsp index cc9605a..e2c2dce 100644 --- a/src/main/webapp/views/product/coaster.jsp +++ b/src/main/webapp/views/product/coaster.jsp @@ -329,6 +329,12 @@
+
+ + +

@@ -524,7 +530,7 @@ } data.kindValue = kindValue; } - if(kindValue == 13){ + if (kindValue == 13) { data.proTypeValue = "香薰卡"; delete data.kindValue; } @@ -605,6 +611,17 @@ form.render(); return false; } + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + form.render(); + return false; + } }) form.on('checkbox(peijian)', function (data) { let craft_list = []; @@ -728,6 +745,9 @@ if (!$(this).is(':disabled')) { if (carft_list4.indexOf($(this).val()) > -1) { arr.push($(this).val() + $("#peijian_ui select[name='shen_color'] option:selected").val()); + } else if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; } else { arr.push($(this).val()); } @@ -829,9 +849,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/colorEnvelope.jsp b/src/main/webapp/views/product/colorEnvelope.jsp index 7776829..614671b 100644 --- a/src/main/webapp/views/product/colorEnvelope.jsp +++ b/src/main/webapp/views/product/colorEnvelope.jsp @@ -171,6 +171,12 @@ 覆膜工艺:
+
+ + +

@@ -238,7 +244,26 @@ } }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 隐藏的默认禁用 $(".color2").hide(); $(".second").find(":input").attr("disabled", true); @@ -416,6 +441,9 @@ if (!$(this).is(':disabled')) { if ($(this).val() == "烫金") { craft_list.push($(this).val() + $("#craftNum option:selected").val() + $("#craftColor option:selected").val()); + } else if ($(this).val() == "抠图") { + craft_list.push($(this).val() + $("input[name='cropNumber']").val()); + return; } else { craft_list.push($(this).val()); } @@ -440,11 +468,11 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" } addLog(span_result); - $("#span_result").val(span_result); + $("#span_result").val(span_result); var count = ""; if ($("#otherCount").css("display") == "none") { diff --git a/src/main/webapp/views/product/copyPaper.jsp b/src/main/webapp/views/product/copyPaper.jsp index fef63c6..4148543 100644 --- a/src/main/webapp/views/product/copyPaper.jsp +++ b/src/main/webapp/views/product/copyPaper.jsp @@ -1,283 +1,325 @@ <%@ 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="../acountExpressFeeTooWeight.jsp"%> -
- -
-
-
- -
-
- -
-
+
+
+

复印纸 -自来稿件

+
+
+ +

+ 印色 +

+
+
+ + +
+
+

+ 材料 +

+
+ +
+ +

+ 尺寸(CM/厘米) 输入格式: 长 * 宽 +

+
+ +
+ +

+ 数量(本) +

+
+ + +
+

+ 印面 +

+
+
+ + +
+
+

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+

+ 工艺 +

+
+ + +
+ +
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFeeTooWeight.jsp" %> +
+ +
+
+
+
+
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/credentials.jsp b/src/main/webapp/views/product/credentials.jsp index fa131da..869642c 100644 --- a/src/main/webapp/views/product/credentials.jsp +++ b/src/main/webapp/views/product/credentials.jsp @@ -87,6 +87,12 @@
+
+ + +

@@ -214,6 +220,28 @@ } } }); + + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kindValue = $("#kindValue option:checked").text(); @@ -227,7 +255,6 @@ var count = $("#count").val(); var size = $("#size").val(); var shua = $("input[name='craftShua']:checked").val(); - var craft = $("input[name='craft']:checked").val(); var dk = $("input[name='ui_dk']:checked").val(); var sheng = $("input[name='craftSheng']:checked").val(); var kindValueData = { @@ -250,17 +277,28 @@ return false; } var data = result.data.proList; - if (craft != null) { - shua += craft; - } + let arr = [] if (sheng != null) { - shua += $("#color option:checked").text() + sheng; + arr.push($("#color option:checked").text() + sheng) } if (dk != null) { - shua += dk; + arr.push(dk) } + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + arr.push($(this).val()) + } + }) + arr.push(shua) - var span_result = "PVC证件" + ' - ' + kindValue + '-' + size + 'mm' + '-' + shua + ' -(同款内容)\n'; + var span_result = "PVC证件" + ' - ' + kindValue + '-' + size + 'mm' + ' -(同款内容)\n'; + if (arr.length > 0) { + span_result += '工艺:' + arr.join(",") + "\n"; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n' @@ -273,9 +311,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/cupHolder.jsp b/src/main/webapp/views/product/cupHolder.jsp index 6154aa0..6c27d79 100644 --- a/src/main/webapp/views/product/cupHolder.jsp +++ b/src/main/webapp/views/product/cupHolder.jsp @@ -86,6 +86,12 @@
+
+ + +

@@ -183,6 +189,26 @@ getImage(); }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) function getImage() { var html = " "; @@ -255,7 +281,20 @@ return false; } var data = result.data.proList; - var span_result = size + "cm-" + $("input[name='kind']:checked").val() + $("input[name='kindValue']:checked").attr("title") + ' - 模切 (同款内容)\n'; + var span_result = size + "cm-" + $("input[name='kind']:checked").val() + $("input[name='kindValue']:checked").attr("title") + '(同款内容)\n'; + let arr = []; + arr.push("模切") + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + } + }) + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n' @@ -268,9 +307,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/cupSet.jsp b/src/main/webapp/views/product/cupSet.jsp index 7a9126a..4195f6b 100644 --- a/src/main/webapp/views/product/cupSet.jsp +++ b/src/main/webapp/views/product/cupSet.jsp @@ -242,6 +242,12 @@
+
+ + +

@@ -435,6 +441,27 @@ } }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kindData = { @@ -467,6 +494,14 @@ }); return false; } + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + } + }) var data = result.data.proList; if (kind == "300克异形杯套(不限形状)") { var span_result = '杯套 - ' + kind + ' - ' + size + 'cm\n'; @@ -504,11 +539,14 @@ if ($("input[name='craftTang']").is(":checked")) { size = $("select[name='width'] option:selected").val() + '*' + $("#ui_size").val() } - var span_result = '杯套 - ' + kind + '-' + arr + ' - ' + size + 'cm\n'; + var span_result = '杯套 - ' + kind + ' - ' + size + 'cm\n'; } else { var span_result = '杯套 - ' + kind + ' - ' + [size] + '\n'; //var span_result ='杯套 - ' + kind +'\n'; } + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (kind == "盲盒杯套") { if (number > 1) { span_result += number + '款 各5个内容' + data[0].count + "个,共" + data[0].price + "元" + '\n'; @@ -529,9 +567,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/deckChair.jsp b/src/main/webapp/views/product/deckChair.jsp index 1b3616a..1b58a90 100644 --- a/src/main/webapp/views/product/deckChair.jsp +++ b/src/main/webapp/views/product/deckChair.jsp @@ -66,6 +66,12 @@
+
+ + +

@@ -161,6 +167,17 @@ form.render(); return false; } + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + form.render(); + return false; + } }) // 点击计算,计算价格 @@ -174,6 +191,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); @@ -214,9 +235,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/deskSticker.jsp b/src/main/webapp/views/product/deskSticker.jsp index 00be83c..c65db06 100644 --- a/src/main/webapp/views/product/deskSticker.jsp +++ b/src/main/webapp/views/product/deskSticker.jsp @@ -101,6 +101,12 @@
+
+ + +

@@ -133,6 +139,7 @@ <%@include file="/views/copyResult.jsp" %> -<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/disu.jsp b/src/main/webapp/views/product/disu.jsp index c9b65c2..cd905cc 100644 --- a/src/main/webapp/views/product/disu.jsp +++ b/src/main/webapp/views/product/disu.jsp @@ -66,7 +66,7 @@
- +
+
+ + +

@@ -138,6 +144,7 @@ delete data.kindValue; data.craftValue = craft; } + let html = ""; $.ajax({ url: "${pageContext.request.contextPath}/getImgs", @@ -167,7 +174,26 @@ form.on('checkbox(craft)', (data) => { getProductImage(data.elem.checked ? data.value : '') }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) form.on('select(kindValue)', (data) => { let kindvalue = data.value; $('input[name="craft"]').prop("checked", false); @@ -197,21 +223,25 @@ let n_moq_num = $('input[name="n_mq_num"]').val() let n_moq_size = $("input[name='n_mq_size']").val() let nmq = $("#nmq:checked").val(); - if (nmq == '内部模切' && n_moq_num == 0) { - layer.msg('请输入内模切个数!', {offset: ['300px', '300px']}, function () { - }); - return false; - } - if (n_moq_num > 0 && n_moq_size == "") { - layer.msg('请输入内模切尺寸!', {offset: ['300px', '300px']}, function () { - }); - return false; - } - if (n_moq_num > 0 && n_moq_size.indexOf("*") == -1) { - layer.msg('请输入内模切正确尺寸!', {offset: ['300px', '300px']}, function () { - }); - return false; + if (nmq == '内部模切') { + + if (n_moq_num == 0) { + layer.msg('请输入内模切个数!', {offset: ['300px', '300px']}, function () { + }); + return false; + } + if (n_moq_num > 0 && n_moq_size == "") { + layer.msg('请输入内模切尺寸!', {offset: ['300px', '300px']}, function () { + }); + return false; + } + if (n_moq_num > 0 && n_moq_size.indexOf("*") == -1) { + layer.msg('请输入内模切正确尺寸!', {offset: ['300px', '300px']}, function () { + }); + return false; + } } + if (n_moq_num > 0) { let main_size = size.split("*"); let moq_size = n_moq_size.split("*"); @@ -222,6 +252,22 @@ return false; } } + let arr = []; + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + if ($(this).val() == "内部模切") { + return; + } + arr.push($(this).val()) + } + }) + if (!$("#nmq").is(':disabled') && nmq == '内部模切' && n_moq_num > 0) { + arr.push("内部模切:" + n_moq_num + "/" + n_moq_size) + } $.ajax({ url: "${path}/getThanSum", type: "GET", @@ -235,6 +281,9 @@ var data = result.data.proList; var span_result = '滴塑 - ' + kind + '-' + size + ' CM (同款内容)\n'; + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n' @@ -247,9 +296,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/envelope.jsp b/src/main/webapp/views/product/envelope.jsp index efd13ea..e2ef7e7 100644 --- a/src/main/webapp/views/product/envelope.jsp +++ b/src/main/webapp/views/product/envelope.jsp @@ -1,318 +1,354 @@ <%@ 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" %> -
-
-

合版封套

-
-
-
- - -
-
-
- - - -

- 款数 -

-
- -
-

- 客户旺旺 -

-
- -
-

- 工艺 -

- -
-
- - -
-

计算结果-

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

合版封套

+
+
+
+ + +
+
+
+ + + +

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+

+ 工艺 +

+
+ +
+
+ + +
+
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFeeTooWeight.jsp" %> +
+ +
+
+
+
+
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/fan.jsp b/src/main/webapp/views/product/fan.jsp index bd8f20f..f05bd01 100644 --- a/src/main/webapp/views/product/fan.jsp +++ b/src/main/webapp/views/product/fan.jsp @@ -26,7 +26,7 @@ 款式

<%-- --%> - + @@ -122,6 +122,12 @@
+
+ + +
@@ -279,6 +285,26 @@ }); } + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var fanKind = $('input[name="kindValue"]:checked').val(); @@ -368,7 +394,20 @@ } else if (kind2 == "21.5*34") { kind = "芭蕉扇"; } - var span_result = '扇子 - ' + kind + "-" + kind2 + 'cm - ' + craft + '(同款内容)\n'; + let arr = []; + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + arr.push($(this).val()) + } + }) + var span_result = '扇子 - ' + kind + "-" + kind2 + 'cm - ' + '(同款内容)\n'; + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n' @@ -381,9 +420,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/fgq.jsp b/src/main/webapp/views/product/fgq.jsp index da78e16..c58bf90 100644 --- a/src/main/webapp/views/product/fgq.jsp +++ b/src/main/webapp/views/product/fgq.jsp @@ -1,235 +1,278 @@ <%@ 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 diff --git a/src/main/webapp/views/product/fileCover.jsp b/src/main/webapp/views/product/fileCover.jsp index c509cc8..bdefc3c 100644 --- a/src/main/webapp/views/product/fileCover.jsp +++ b/src/main/webapp/views/product/fileCover.jsp @@ -1,275 +1,319 @@ <%@ 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" %> -
-
-

档案袋

-
-
- -

- 材质 -

-
- -
-

- 规格 -

-
- -
-

- 数量(个) -

-
- -
-

- 款数 -

-
- -
-

- 客户旺旺 -

-
- -
-
-
- - -
-

计算结果-

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

档案袋

+
+
+ +

+ 材质 +

+
+ +
+

+ 规格 +

+
+ +
+

+ 数量(个) +

+
+ +
+

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+
+ + +
+
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFee.jsp" %> +
+ +
+
+
+
+
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/flags.jsp b/src/main/webapp/views/product/flags.jsp index 2623a61..ae33b85 100644 --- a/src/main/webapp/views/product/flags.jsp +++ b/src/main/webapp/views/product/flags.jsp @@ -1,337 +1,382 @@ <%@ 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/厘米) 输入格式: 长 * 宽 - -

-
- -
-
- - - -
-

- 数量(个) -

-
- -
-
- -
-

提示:数量超过500个请以 [ 宣传单 - 商务200克铜版纸 - 异形模切 ] 报价

-

- 款数 -

-
- -
-

- 客户旺旺 -

-
- -
-

- 形状 (吊旗 - 数量50个以内不限形状;50个及以上默认[ U型 ]) -

-
- -
-

- 工艺 -

-
- - +
+
+

吊旗

+
+ + +

材质

+
+ + + +
+

+ 尺寸(CM/厘米) 输入格式: 长 * 宽 + +

+
+ +
+
+ + + +
+

+ 数量(个) +

+
+ +
+
+ +
+

提示:数量超过500个请以 [ 宣传单 - 商务200克铜版纸 - 异形模切 ] 报价

+

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+

+ 形状 (吊旗 - 数量50个以内不限形状;50个及以上默认[ U型 ]) +

+
+ +
+

+ 工艺 +

+
+ + -
-
-
- - -
-

计算结果-

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

计算结果- + +

+
+ + <%@include file="../acountExpressFeeTooWeight.jsp" %> +
+ +
+
+
+ +
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/flyer.jsp b/src/main/webapp/views/product/flyer.jsp index 0409f68..8dd733c 100644 --- a/src/main/webapp/views/product/flyer.jsp +++ b/src/main/webapp/views/product/flyer.jsp @@ -124,6 +124,12 @@
+
+ + +

@@ -243,6 +249,26 @@ form.render('checkbox'); setRemark() }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kindData = { @@ -281,10 +307,13 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } arr.push($(this).val()); } }); - console.log('-----选中的值-----', arr); if ($("#kindValue").val() == 1 || $("#kindValue").val() == 2) { if (arr[0] == '折页' && arr[1] != '压痕') { layer.msg("200克以上材质折页必须选压痕", {offset: ['300px', '300px']}, function () { diff --git a/src/main/webapp/views/product/freehand.jsp b/src/main/webapp/views/product/freehand.jsp index d47273e..bb31ee1 100644 --- a/src/main/webapp/views/product/freehand.jsp +++ b/src/main/webapp/views/product/freehand.jsp @@ -30,7 +30,7 @@ -<%-- --%> + <%-- --%> @@ -63,6 +63,12 @@
+
+ + +

@@ -165,6 +171,26 @@ "婚礼", "班旗", ] + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var number = $("#number").val(); @@ -193,8 +219,21 @@ type += kind1Value == 1 ? "半身" : "全身" } } - - var span_result = '手绘 - ' + kind_name[kind] + type + ' (同款内容)\n'; + let arr = [] + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + arr.push($(this).val()) + } + }) + arr.push(type) + var span_result = '手绘 - ' + kind_name[kind] + ' (同款内容)\n'; + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n' @@ -207,9 +246,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/handBag.jsp b/src/main/webapp/views/product/handBag.jsp index 2b8b794..4a78c52 100644 --- a/src/main/webapp/views/product/handBag.jsp +++ b/src/main/webapp/views/product/handBag.jsp @@ -96,7 +96,7 @@ -<%-- --%> + <%-- --%>
@@ -133,6 +133,12 @@
+
+ + +

@@ -400,6 +406,26 @@ form.render(); } + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 自定义数量 form.on('checkbox(diyCount)', function (data) { //判断当前多选框是选中还是取消选中 @@ -598,6 +624,11 @@ if ($(this).val() == "烫金") { arr.push($("#tang_type select option:selected").val() + $(this).val()); } + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + arr.push($(this).val()); } }); var data = result.data.proList; @@ -725,11 +756,11 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" } addLog(span_result); - $("#span_result").val(span_result); + $("#span_result").val(span_result); var size = ""; if (level == 0) { diff --git a/src/main/webapp/views/product/handkerchiefPaper.jsp b/src/main/webapp/views/product/handkerchiefPaper.jsp index 0091d95..c5322a0 100644 --- a/src/main/webapp/views/product/handkerchiefPaper.jsp +++ b/src/main/webapp/views/product/handkerchiefPaper.jsp @@ -118,6 +118,12 @@
+
+ + +

@@ -244,11 +250,7 @@ }) form.on('checkbox(ui_craft)', function (data) { let craft_list = []; - $(data.elem).prop("checked", true); - layer.msg("工艺不能取消", {offset: ['300px', '300px']}, function () { - }); - form.render(); - return false; + craft_list.push($("select[name='craft'] option:selected").val()); $("input[name='craft']:checked").each(function () { if (!$(this).is(':disabled')) { @@ -256,6 +258,22 @@ } } ); + if (!craft_list.includes("单面") || !craft_list.includes("方形")) { + layer.msg("工艺不能取消", {offset: ['300px', '300px']}, function () { + }); + form.render(); + return false; + } + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) // 点击计算,计算价格 @@ -280,7 +298,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { - + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); @@ -312,7 +333,7 @@ }); return false; } - if(colorType == "彩色"){ + if (colorType == "彩色") { craft.push($("input[name='sku']:checked").val()); } $.ajax({ @@ -344,9 +365,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/hykkt.jsp b/src/main/webapp/views/product/hykkt.jsp index 8bd60b6..b2a5fa5 100644 --- a/src/main/webapp/views/product/hykkt.jsp +++ b/src/main/webapp/views/product/hykkt.jsp @@ -82,6 +82,12 @@
+
+ + +

@@ -174,7 +180,26 @@ form.on('radio(craftTang)', function (data) { getProductImage() }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kind = [$('input[name="kind"]:checked').val()]; @@ -214,9 +239,20 @@ return false; } var data = result.data.proList; - - var span_result = '会员卡卡套 - ' + kindValue + '-' + size + 'cm - ' + tangjin; - span_result += '\n'; + let arr = [] + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + } + }) + arr.push(tangjin) + var span_result = '会员卡卡套 - ' + kindValue + '-' + size + 'cm \n'; + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n' @@ -229,9 +265,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); @@ -293,7 +329,8 @@ } }); return false; - }); + }) + ; }); \ No newline at end of file diff --git a/src/main/webapp/views/product/insertCard.jsp b/src/main/webapp/views/product/insertCard.jsp index cb1d8f4..86c0189 100644 --- a/src/main/webapp/views/product/insertCard.jsp +++ b/src/main/webapp/views/product/insertCard.jsp @@ -129,6 +129,12 @@
+
+ + +

@@ -300,7 +306,26 @@ } form.render(); }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) //点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kind = $("#kindValue").val(); @@ -370,17 +395,25 @@ } if (kind == 0) { $("input[name='craft']:checked").each(function () { - if (!$(this).is(':disabled')) { - if ($(this).val() == '击凸' || $(this).val() == '压凹') { - craftList.push($("select[name='ji_color'] option:selected").val() + $(this).val()); - } else { - craftList.push($(this).val()); - } + if (!$(this).is(':disabled')) { + if ($(this).val() == '击凸' || $(this).val() == '压凹') { + craftList.push($("select[name='ji_color'] option:selected").val() + $(this).val()); + } else if ($(this).val() == "抠图") { + return; + } else { + craftList.push($(this).val()); } } - ) - ; + }); } + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + craftList.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + } + }) var span_result = '插卡 - ' + kindValue + ' - ' + size + "厘米 - (同款内容) " + '\n'; span_result += '工艺:' + craftList.join(",") + '\n'; if (number > 1) { @@ -395,9 +428,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/katie.jsp b/src/main/webapp/views/product/katie.jsp index ee9331e..87b9c53 100644 --- a/src/main/webapp/views/product/katie.jsp +++ b/src/main/webapp/views/product/katie.jsp @@ -74,6 +74,12 @@
+
+ + +

@@ -225,6 +231,27 @@ } }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { // 选中‘自定义数量’ @@ -240,6 +267,10 @@ var arr = [] $("input:checkbox[name='craft']:checked").each(function (i) { if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } arr.push($(this).val()); } }); @@ -259,7 +290,10 @@ return false; } var data = result.data.proList; - var span_result = '卡贴 - 300克铜版纸 - 配双面胶 -' + arr + ' -(同款内容)\n'; + var span_result = '卡贴 - 300克铜版纸 - 配双面胶 -(同款内容)\n'; + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n' diff --git a/src/main/webapp/views/product/kzt.jsp b/src/main/webapp/views/product/kzt.jsp index 0e26f67..a3dcf2f 100644 --- a/src/main/webapp/views/product/kzt.jsp +++ b/src/main/webapp/views/product/kzt.jsp @@ -1,174 +1,216 @@ <%@ 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" %> -
-
-

筷子套

-
-
-

- 材质 -

-
- -
- -

- 规格 -

-
- -
-

- 数量(张) -

-
- -
-

- 款数 -

-
- -
-

- 客户旺旺 -

-
- -
-
-
- - -
-

计算结果-

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

下单备注-

-
- -
-
-
-
-
-
-
- -
-
+
+
+

筷子套

+
+
+

+ 材质 +

+
+ +
+ +

+ 规格 +

+
+ +
+

+ 数量(张) +

+
+ +
+

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+
+ + +
+
+
+ + +
+

计算结果- + +

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

下单备注- + +

+
+ +
+
+
+
+
+
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/landa.jsp b/src/main/webapp/views/product/landa.jsp index b10de4a..807afad 100644 --- a/src/main/webapp/views/product/landa.jsp +++ b/src/main/webapp/views/product/landa.jsp @@ -86,6 +86,12 @@
+
+ + +

@@ -200,6 +206,16 @@ form.render(); return false; } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + form.render(); + return false; + } }) // 点击计算,计算价格 @@ -227,6 +243,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/leiTag.jsp b/src/main/webapp/views/product/leiTag.jsp index f82d65c..ad09ae4 100644 --- a/src/main/webapp/views/product/leiTag.jsp +++ b/src/main/webapp/views/product/leiTag.jsp @@ -109,6 +109,12 @@
+
+ + +

@@ -217,6 +223,15 @@ $("#z4_craft .shuangmian").prop("disabled", true); } } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) form.on('checkbox(peijian)', function (data) { let peijiansize = $(".peijian:checked").length; @@ -267,6 +282,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); @@ -312,9 +331,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/light.jsp b/src/main/webapp/views/product/light.jsp index c4da451..eeeeb51 100644 --- a/src/main/webapp/views/product/light.jsp +++ b/src/main/webapp/views/product/light.jsp @@ -94,6 +94,12 @@
+
+ + +

@@ -213,6 +219,15 @@ } else { $(".tangj.scolor").hide(); } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) // 点击计算,计算价格 @@ -234,10 +249,15 @@ } $("input:checkbox[name='craft']:checked").each(function (i) { if (!$(this).is(':disabled')) { - arr.push($(this).val()); if ($(this).val() == "烫金+激凸") { arr.push($(".tangj select option:selected").val()); + return; } + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + arr.push($(this).val()); } }); if (arr.indexOf("印刷+激凸") == -1 && arr.indexOf("烫金+激凸") == -1) { diff --git a/src/main/webapp/views/product/lingmo.jsp b/src/main/webapp/views/product/lingmo.jsp index 1a6f30c..a97de8c 100644 --- a/src/main/webapp/views/product/lingmo.jsp +++ b/src/main/webapp/views/product/lingmo.jsp @@ -99,6 +99,12 @@
+
+ + +

@@ -197,6 +203,15 @@ form.render(); return false; } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) form.on('checkbox(switchSize)', function (data) { $("#diySize").parent().hide() @@ -224,7 +239,7 @@ if ($("input[name='switchSize']").is(":checked")) { size = $("#diySize").val(); } - if(coNumber == ""){ + if (coNumber == "") { layer.msg("请选择印色数量", {offset: ['300px', '300px']}, function () { }); return false; @@ -239,7 +254,7 @@ }); return false; } - if ((size.split("*")[0] < 9 || size.split("*")[1] < 5.4)&&(size.split("*")[0] < 5.4 || size.split("*")[1] < 9)) { + if ((size.split("*")[0] < 9 || size.split("*")[1] < 5.4) && (size.split("*")[0] < 5.4 || size.split("*")[1] < 9)) { layer.msg('最小尺寸9*5.4cm!', {offset: ['300px', '300px']}, function () { }); return false; @@ -247,6 +262,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); @@ -280,9 +299,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/lsz.jsp b/src/main/webapp/views/product/lsz.jsp index d085e3c..3ece15c 100644 --- a/src/main/webapp/views/product/lsz.jsp +++ b/src/main/webapp/views/product/lsz.jsp @@ -97,6 +97,12 @@
+
+ + +

@@ -257,6 +263,26 @@ } }); }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { @@ -315,23 +341,35 @@ } var data = result.data.proList; var span_result = '硫酸纸 - ' + kindValue + '-' + size + ' CM'; + let arr = [] + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + } + }) if (stickerKind == "专版打印") { kindValue = "135克硫酸纸"; - span_result += " - 直角 - " + $("input[name='yinbai']:checked").val(); + arr.push('直角') + arr.push($("input[name='yinbai']:checked").val()) } else { if (kindValue != "80克硫酸纸") { - span_result += craft; + arr.push(craft) if (tangjin != "") { - span_result += ' - ' + tangjin; + arr.push(tangjin) } if (kind != "") { - span_result += " - " + kind; + arr.push(kind) } } else { - span_result += " - " + $("input[name='craftQie']:checked").val(); + arr.push($("input[name='craftQie']:checked").val()) } } - span_result += '\n'; + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n' @@ -344,9 +382,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/medal.jsp b/src/main/webapp/views/product/medal.jsp index 32a782d..e058929 100644 --- a/src/main/webapp/views/product/medal.jsp +++ b/src/main/webapp/views/product/medal.jsp @@ -93,6 +93,12 @@
+
+ + +

@@ -458,6 +464,26 @@ $("#size_tip").text(text); } }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var number = $("#number").val(); @@ -488,6 +514,10 @@ $("input:radio[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craftList.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craftList.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/mousePad.jsp b/src/main/webapp/views/product/mousePad.jsp index ce347af..114aa74 100644 --- a/src/main/webapp/views/product/mousePad.jsp +++ b/src/main/webapp/views/product/mousePad.jsp @@ -92,6 +92,12 @@
+
+ + +

@@ -231,6 +237,14 @@ $("input[name='craft'][value='锁边']").parent().hide(); $("input[name='craft'][value='锁边']").attr("disabled", true) } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } form.render(); }) @@ -267,6 +281,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/msd.jsp b/src/main/webapp/views/product/msd.jsp index af6920b..0f8a625 100644 --- a/src/main/webapp/views/product/msd.jsp +++ b/src/main/webapp/views/product/msd.jsp @@ -64,6 +64,12 @@
+
+ + +

客户旺旺

@@ -163,6 +169,28 @@ form.on("radio(switch)", function () { getProductImage() }) + + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + //点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kind = $("#kindValue option:selected").text(); @@ -170,9 +198,17 @@ var craftQie = $("input[name='craftQie']:checked").val(); var number = $("#number").val(); var arr = []; - arr.push($('input[name="craft"]:checked').val()); - craft += craftQie; - craft += arr; + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + arr.push($(this).val()) + } + }) + arr.push(craftQie) + arr.push(craft) $.ajax({ url: "${pageContext.request.contextPath}/getThanSum", type: "GET", @@ -185,7 +221,10 @@ } var data = result.data.proList; - var span_result = '900克慕斯垫 - ' + kind + "-" + craft + "(同款内容) " + '\n'; + var span_result = '900克慕斯垫 - ' + kind + "(同款内容) " + '\n'; + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n' @@ -198,9 +237,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/notePaper.jsp b/src/main/webapp/views/product/notePaper.jsp index 630e7f0..3e6f37b 100644 --- a/src/main/webapp/views/product/notePaper.jsp +++ b/src/main/webapp/views/product/notePaper.jsp @@ -129,6 +129,12 @@ +
+ + +


@@ -348,6 +354,26 @@ } }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) //点击计算,计算价格 form.on('submit(acount_btn)', function(data) { var notePaperKind = $('input[name="notePaperKind"]:checked').val(); @@ -426,6 +452,14 @@ }); return false; } + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + } + }) $.ajax({ url : "${path}/getThanSum", type : "GET", @@ -436,7 +470,6 @@ return false; } var data = result.data.proList; - console.log(craft); var span_result = notePaperKind + ' - ' + kind +'-' + [kind1Data[kind1Value]] +' -' + craft +'- ' + color + size +' 厘米 -(同款内容)\n' + '款数 : ' + number + '\n'; if(notePaperKind == "红头文件" || notePaperKind == "彩胶纸"){ if(number > 1){ diff --git a/src/main/webapp/views/product/orders.jsp b/src/main/webapp/views/product/orders.jsp index 3efff9b..660c616 100644 --- a/src/main/webapp/views/product/orders.jsp +++ b/src/main/webapp/views/product/orders.jsp @@ -121,6 +121,12 @@ disabled>
+
+ + +

@@ -230,6 +236,26 @@ form.render('checkbox'); setRemark() }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kindData = { @@ -268,10 +294,13 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } arr.push($(this).val()); } }); - console.log('-----选中的值-----', arr); if ($("#kindValue").val() == 1 || $("#kindValue").val() == 2) { if (arr[0] == '折页' && arr[1] != '压痕') { layer.msg("200克以上材质折页必须选压痕", {offset: ['300px', '300px']}, function () { @@ -304,9 +333,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/packingBox.jsp b/src/main/webapp/views/product/packingBox.jsp index 6540f71..809b446 100644 --- a/src/main/webapp/views/product/packingBox.jsp +++ b/src/main/webapp/views/product/packingBox.jsp @@ -1,248 +1,293 @@ <%@ 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" %> -
-
-

包装盒

(500个起做) -
-
- -

- 材质 -

-
- -
-

- 种类 -

-
-
- - -
-
-

- 尺寸(CM/厘米) 输入格式: 长 * 宽 * 高 (请按格式输入)

-

-
- -
-

- 数量(个) -

-
- -
-

- 款数 -

-
- -
-

- 客户旺旺 -

-
- -
-
-
- - -
-

计算结果-

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

包装盒

(500个起做) +
+
+ +

+ 材质 +

+
+ +
+

+ 种类 +

+
+
+ + +
+
+

+ 尺寸(CM/厘米) 输入格式: 长 * 宽 * 高 (请按格式输入)

+

+
+ +
+

+ 数量(个) +

+
+ +
+

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+
+ + +
+
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFee.jsp" %> +
+ +
+
+
+
+
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/paperBowl.jsp b/src/main/webapp/views/product/paperBowl.jsp index f3e5f5b..4aa49cd 100644 --- a/src/main/webapp/views/product/paperBowl.jsp +++ b/src/main/webapp/views/product/paperBowl.jsp @@ -99,6 +99,12 @@
+
+ + +

@@ -214,7 +220,15 @@ form.render(); return false; } - + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) // 点击计算,计算价格 @@ -229,6 +243,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/paperCup.jsp b/src/main/webapp/views/product/paperCup.jsp index a10551d..1096ef9 100644 --- a/src/main/webapp/views/product/paperCup.jsp +++ b/src/main/webapp/views/product/paperCup.jsp @@ -1,179 +1,221 @@ <%@ 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" %> -
-
-

一次性纸杯

-
-
-

- 材质 -

-
- -
-

- 规格 -

-
- -
- -

- 数量(个) -

-
- -
-

- 款数 -

-
- -
-

- 客户旺旺 -

-
- -
-
-
- - -
-

计算结果-

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

下单备注-

-
- -
-
-
-
-
-
-
- -
-
+
+
+

一次性纸杯

+
+
+

+ 材质 +

+
+ +
+

+ 规格 +

+
+ +
+ +

+ 数量(个) +

+
+ +
+

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+
+ + +
+
+
+ + +
+

计算结果- + +

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

下单备注- + +

+
+ +
+
+
+
+
+
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/pet.jsp b/src/main/webapp/views/product/pet.jsp index f054fde..c33b45a 100644 --- a/src/main/webapp/views/product/pet.jsp +++ b/src/main/webapp/views/product/pet.jsp @@ -85,6 +85,12 @@
+
+ + +

@@ -194,6 +200,15 @@ form.render(); return false; } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) // 点击计算,计算价格 @@ -221,6 +236,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); @@ -261,9 +280,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/pictureAlbum.jsp b/src/main/webapp/views/product/pictureAlbum.jsp index af44cd6..fe4e5a9 100644 --- a/src/main/webapp/views/product/pictureAlbum.jsp +++ b/src/main/webapp/views/product/pictureAlbum.jsp @@ -1,416 +1,446 @@ <%@ 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/厘米) 输入格式: 长 * 宽 - -

-
- -
-

- 封面P数 (固定P数) -

-
- -
-

- 内页P数 请输入4的整数倍 -

-
- -
-

- 数量(本) -

-
- -
-
- -

- 款数 -

-
- -
-

- 客户旺旺 -

-
- -
-
-
- - -
-

计算结果-

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

画册

+
+
+ +
+ + +
+
+

+ 封面 +

+
+ +
+

+ 内页 +

+
+
+ + + +
+
+

+ 装订 +

+
+ + +
+

+ 尺寸(CM/厘米) 输入格式: 长 * 宽 + +

+
+ +
+

+ 封面P数 (固定P数) +

+
+ +
+

+ 内页P数 请输入4的整数倍 +

+
+ +
+

+ 数量(本) +

+
+ +
+
+ +

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+
+ + +
+
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFee.jsp" %> +
+ +
+
+
+
+
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/placeMat.jsp b/src/main/webapp/views/product/placeMat.jsp index a554a56..54aaee2 100644 --- a/src/main/webapp/views/product/placeMat.jsp +++ b/src/main/webapp/views/product/placeMat.jsp @@ -81,6 +81,12 @@
+
+ + +

@@ -141,7 +147,26 @@ return false; } }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kindData = { @@ -155,6 +180,10 @@ let craft_list = []; $("input:checkbox[name='craft']:checked").each(function (i) { if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft_list.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft_list.push($(this).val()); } }); @@ -194,9 +223,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/plasticHandbag.jsp b/src/main/webapp/views/product/plasticHandbag.jsp index d62dee5..568beb5 100644 --- a/src/main/webapp/views/product/plasticHandbag.jsp +++ b/src/main/webapp/views/product/plasticHandbag.jsp @@ -97,6 +97,12 @@
+
+ + +

@@ -194,6 +200,15 @@ form.render(); return false; } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) // 点击计算,计算价格 @@ -213,6 +228,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); @@ -253,9 +272,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/poster.jsp b/src/main/webapp/views/product/poster.jsp index e08c7f1..63fdc64 100644 --- a/src/main/webapp/views/product/poster.jsp +++ b/src/main/webapp/views/product/poster.jsp @@ -522,6 +522,12 @@
+
+ + +

@@ -718,7 +724,7 @@ } // 切换类目的时候清空轮播图 - if (data.value == 5 || data.value == 6 || data.value == 7 || data.value == 8 || data.value == 9 || data.value == 10|| data.value == 12) { + if (data.value == 5 || data.value == 6 || data.value == 7 || data.value == 8 || data.value == 9 || data.value == 10 || data.value == 12) { // 轮播图 var html = " "; var remark = " "; @@ -1327,7 +1333,26 @@ } form.render(); }) + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var value = $('input[name="kindValue"]:checked').val(); @@ -1578,6 +1603,15 @@ return false; } var data = result.data.proList; + let arr = [] + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + } + }) // !条幅 && !贡缎布 if (value != 6 && value != 7) { if (value != 4 && value != 5) { @@ -1608,7 +1642,6 @@ var craftList = ""; if (value == 0 || value == 12) { if (kind2 != "背胶单裱3mmPVC(户内高清)") { - var arr = []; $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { @@ -1616,13 +1649,15 @@ arr.push($("input[name='zheye']").val() + "个" + $(this).val()); } else if ($(this).val() == "伸缩支架") { arr.push($("input[name='yaheng']").val() + "个" + $(this).val()); + } else if ($(this).val() == "抠图") { + return; } else { arr.push($(this).val()); } } }); var craftBu = [$('input[name="craftBu"]:checked').val()]; - var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n' + "工艺 :" + arr + "\n"; + var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n'; craftList = craftBu + arr; } else { var span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'cm(同款内容)\n'; @@ -1630,28 +1665,34 @@ } else if (value == 1) { //室内写真 if (kind2 == "pp纸(室内)") { var craftBu = [$('input[name="craftPPZhi"]:checked').val()]; + arr.push($('input[name="craftPPZhi"]:checked').val()); craftList = craftBu; var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n'; } else if (kind2 == "直喷PVC") { var craftBu = [$('input[name="craftPPZhi"]:checked').val()]; + arr.push($('input[name="craftPPZhi"]:checked').val()); craftList = craftBu; var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n'; } else if (kind2 == "软膜") { // 软膜 var craftBu = [$('input[name="craftRuanMo"]:checked').val()]; + arr.push($('input[name="craftRuanMo"]:checked').val()); craftList = craftBu - var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n'; + var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } else if (kind2 == "静电贴") { - var span_result = kindData[kind] + ' - ' + kind2 + ' - 模切 -' + $(".zdt_yin input:checked").val() + ' - ' + size + 'cm(同款内容)\n'; + arr.push("模切"); + arr.push($(".zdt_yin input:checked").val()); + var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } else { var span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } } else if (value == 2) { //户外写真 - arr = []; $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { if ($(this).val() == "刮板") { arr.push($("input[name='pcount']").val() + "个" + $(this).val()); + } else if ($(this).val() == "抠图") { + return; } else { arr.push($(this).val()); } @@ -1667,39 +1708,46 @@ } else { var span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } - span_result += "工艺 :" + arr + "\n"; } else if (value == 3) { //布 if (kind2 == "喷绘布") { var craftBu = [$('input[name="craftPenHuiBu"]:checked').val()]; + arr.push($('input[name="craftPenHuiBu"]:checked').val()); craftList = craftBu; - var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n'; + var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } else if (kind2 == "写真布") { var craftBu = [$('input[name="craftJingcai"]:checked').val()]; + arr.push($('input[name="craftJingcai"]:checked').val()); craftList = craftBu; - var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n'; + var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } else if (kind2 == "双喷布") { var craftBu = [$('input[name="craftBu"]:checked').val()]; + arr.push($('input[name="craftBu"]:checked').val()); craftList = craftBu; - var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n'; + var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } else if (kind2 == "油画布") { var craftBu = [$('input[name="craftJingcai"]:checked').val()]; + arr.push($('input[name="craftJingcai"]:checked').val()); craftList = craftBu; - var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n'; + var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } else if (kind2 == "旗帜布") { var craftBu = [$('input[name="craftqz"]:checked').val()]; + arr.push($('input[name="craftqz"]:checked').val()); craftList = craftBu; if ($("input[name='craftBu']:checked").val() == "双喷") { craftBu += "双喷"; + arr.push("双喷"); } if ($("input[name='ui_qzb_qg']:checked").val() == "旗杆") { craftBu += ",旗杆(" + $("input[name='zheye']").val() + "根)"; + arr.push("旗杆(" + $("input[name='zheye']").val() + "根)"); } - var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n'; + var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } else if (kind2 == "桌布") { var craftBu = [$('input[name="craftZb"]:checked').val()]; + arr.push($('input[name="craftZb"]:checked').val()); kind2 = $("#zbKind option:checked").val() + kind2; craftList = craftBu - var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n'; + var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } else { var span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'cm(同款内容)\n'; } @@ -1732,13 +1780,19 @@ // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { craft.push($(this).val()); + if ($(this).val() == "抠图") { + return; + } else { + arr.push($(this).val()); + } } }); if (craft == "封边" || craft == "打孔") { craft = craft + "绳子"; + arr.push("绳子"); } - span_result = kindData[kind] + '-' + fb_name + '-' + craft + ' - ' + size + 'cm(同款内容)\n'; + span_result = kindData[kind] + '-' + fb_name + ' - ' + size + 'cm(同款内容)\n'; if ($("input[name='switchSize']:checked").val() != "on") { span_result += "(特惠款)"; } @@ -1750,7 +1804,9 @@ if (dengxType == 1 && value == 2 && kind2 == "摆摊软膜灯箱") { unit = "套" } - + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { if ($("#ui_des").css("display") != "none") { @@ -1774,9 +1830,10 @@ width = $("#diySizeCoupon").val() + "cm宽幅"; } var kind2 = $("#bannerKind option:checked").text(); - var craftTiao = [$('input[name="craftTiao"]:checked').val()]; + var craftTiao = ""; + arr.push($('input[name="craftTiao"]:checked').val()) if ($("input[name='ui_tf_qg']:checked").val() == "旗杆") { - craftTiao += ",旗杆(" + $("input[name='zheye']").val() + "根)" + craftTiao += "旗杆(" + $("input[name='zheye']").val() + "根)" } if (width == "50cm宽幅") { if (size <= 300 && size > 200) { @@ -1785,7 +1842,11 @@ craftTiao += "(特惠款)"; } } - var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm * ' + width + ' - ' + craftTiao + '\n'; + arr.push(craftTiao) + var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm * ' + width + '\n'; + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "条,共" + data[i].price + "元" + '\n' @@ -1806,6 +1867,10 @@ kind2 += ",旗杆(" + $("input[name='yaheng']").val() + "根)" } var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm' + '\n'; + + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "条,共" + data[i].price + "元" + '\n' diff --git a/src/main/webapp/views/product/printedAcrylic.jsp b/src/main/webapp/views/product/printedAcrylic.jsp index 20819d8..742243f 100644 --- a/src/main/webapp/views/product/printedAcrylic.jsp +++ b/src/main/webapp/views/product/printedAcrylic.jsp @@ -96,6 +96,12 @@
+
+ + +

@@ -241,6 +247,15 @@ $(".dakong").find(":input").attr("disabled", true); } } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) // 点击计算,计算价格 @@ -263,6 +278,8 @@ if (!$(this).is(':disabled')) { if ($(this).val() == "打孔") { craft.push($(this).val() + $("input[name='pcount']").val()) + } else if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); } else { craft.push($(this).val()); } @@ -323,9 +340,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/programCard.jsp b/src/main/webapp/views/product/programCard.jsp index 8c242c4..830345d 100644 --- a/src/main/webapp/views/product/programCard.jsp +++ b/src/main/webapp/views/product/programCard.jsp @@ -78,6 +78,12 @@
+
+ + +

@@ -116,6 +122,28 @@ layui.use(['table','form','carousel'], function(){ //建造实例 ins = carousel.render({}); + + + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) // 点击计算,计算价格 form.on('submit(acount_btn)', function(data) { @@ -136,10 +164,13 @@ layui.use(['table','form','carousel'], function(){ $("input:checkbox[name='craft']:checked").each(function(i) { // 没有被禁用的工艺加到arr中 if(!$(this).is(':disabled')){ + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } arr.push($(this).val()); } }); - console.log('-----选中的值-----', arr); $.ajax({ url : "${path}/getThanSum", type : "GET", diff --git a/src/main/webapp/views/product/pvcCard.jsp b/src/main/webapp/views/product/pvcCard.jsp index 09b62e7..40d2ef2 100644 --- a/src/main/webapp/views/product/pvcCard.jsp +++ b/src/main/webapp/views/product/pvcCard.jsp @@ -100,6 +100,12 @@
+
+ + +

@@ -250,6 +256,27 @@ }); }); + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { layer.msg("温馨提示:因工艺产品问题某些小尺寸可能报价会超过大尺寸,属于正常现象!", {offset: ['300px', '300px']}, function () { @@ -261,19 +288,30 @@ 4: "0.84PVC哑光异形卡片", 5: "0.84PVC亮光异性卡片" }; - var craft = $('input[name="craft"]:checked').val() var craftShua = $('input[name="craftShua"]:checked').val() var craftJiao = [$('input[name="craftJiao"]:checked').val()] var kind = kindData[$('select[name="kindValue"] option:selected').val()]; var number = $("#number").val(); var switchSize = [$('input[name="switchSize"]:checked').val()]; var size = ""; - console.log(switchSize); if (switchSize == "") { size = $("#fixedSizeCoupon").val(); } else { size = $("#diySizeCoupon").val(); } + let arr = [] + + arr.push(craftShua) + arr.push(craftJiao) + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + arr.push($(this).val()) + } + }) var count = $("#count").val(); if (!size) { layer.msg('请填写尺寸!', {offset: ['300px', '300px']}, function () { @@ -308,7 +346,10 @@ } var data = result.data.proList; - var span_result = 'PVC异形卡片 - ' + kind + ' - ' + size + ' CM' + ' - ' + craft + ' - ' + craftShua + ' - ' + craftJiao + '\n'; + var span_result = 'PVC异形卡片 - ' + kind + ' - ' + size + ' CM' + '\n'; + if (arr.length > 0) { + span_result += "工艺:" + arr.join(",") + '\n'; + } if (number > 1) { for (let i = 0; i < data.length; i++) { span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n' @@ -321,9 +362,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/pvcfigure.jsp b/src/main/webapp/views/product/pvcfigure.jsp index 3add28d..cb1a702 100644 --- a/src/main/webapp/views/product/pvcfigure.jsp +++ b/src/main/webapp/views/product/pvcfigure.jsp @@ -103,6 +103,12 @@
+
+ + +

@@ -302,6 +308,28 @@ } form.render(); }) + + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kindValue = $("#kindValue option:checked").text(); @@ -324,6 +352,9 @@ if (!$(this).is(':disabled')) { if ($(this).val() == "菜品夹") { craft_list.push($("input[name='stickNum']").val() + $(this).val()); + } else if ($(this).val() == "抠图") { + craft_list.push($(this).val() + $("input[name='cropNumber']").val()); + return; } else { craft_list.push($(this).val()); } @@ -396,9 +427,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/rollLabel.jsp b/src/main/webapp/views/product/rollLabel.jsp index 71a2155..6b2231e 100644 --- a/src/main/webapp/views/product/rollLabel.jsp +++ b/src/main/webapp/views/product/rollLabel.jsp @@ -57,23 +57,11 @@

数量(个)

-
+
-
- -

款数

@@ -285,6 +273,11 @@ }); if (type == "封口贴") { size = $("select[name='size'] option:selected").val() + if (count % 500 != 0) { + layer.msg("封口贴数量只能是500的倍数", {offset: ['300px', '300px']}, function () { + }); + return false; + } } if (type == "卷标") { if ((size.split("*")[0] > 42 || size.split("*")[1] > 38) && (size.split("*")[0] > 38 || size.split("*")[1] > 42)) { diff --git a/src/main/webapp/views/product/roomCard.jsp b/src/main/webapp/views/product/roomCard.jsp index 33fe939..89f2061 100644 --- a/src/main/webapp/views/product/roomCard.jsp +++ b/src/main/webapp/views/product/roomCard.jsp @@ -50,6 +50,12 @@ 工艺

+
+ + +

@@ -151,6 +157,28 @@ layui.use(['table','form','carousel'], function(){ $(".zdy").find(":input").attr("disabled", false); $(".cg").find(":input").attr("disabled", true); } + + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function(data) { var number= $("#number").val(); @@ -174,6 +202,10 @@ layui.use(['table','form','carousel'], function(){ $("input:checkbox[name='craft']:checked").each(function(i) { // 没有被禁用的工艺加到arr中 if(!$(this).is(':disabled')){ + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } arr.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/slq.jsp b/src/main/webapp/views/product/slq.jsp index 879275d..14fb196 100644 --- a/src/main/webapp/views/product/slq.jsp +++ b/src/main/webapp/views/product/slq.jsp @@ -107,6 +107,12 @@
+
+ + +

@@ -220,11 +226,35 @@ }) form.on("checkbox(ui_craft)", function (data) { - $(data.elem).prop("checked", true); - layer.msg("工艺无法取消", {offset: ['300px', '300px']}, function () { + let craft_list = []; + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } }); + let stickerKind = $("input[name='stickerKind']:checked").val(); + if (stickerKind == "伸缩手拉旗") { + + if (!craft_list.includes("单面印刷") || !craft_list.includes("手柄")) { + + $(data.elem).prop("checked", true); + layer.msg("工艺无法取消", {offset: ['300px', '300px']}, function () { + }); + form.render(); + return false; + } + } + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } form.render(); - return false; }) // 点击计算,计算价格 @@ -259,6 +289,9 @@ if (!$(this).is(':disabled')) { if ($(this).val() == "手柄") { craft_list.push($("#ccolor option:selected").val() + $(this).val()); + } else if ($(this).val() == "抠图") { + craft_list.push($(this).val() + $("input[name='cropNumber']").val()); + return; } else { craft_list.push($(this).val()); } @@ -300,9 +333,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/specialCard2.jsp b/src/main/webapp/views/product/specialCard2.jsp index 77fa6af..62236e0 100644 --- a/src/main/webapp/views/product/specialCard2.jsp +++ b/src/main/webapp/views/product/specialCard2.jsp @@ -271,6 +271,12 @@
+
+ + +
-
-
-

吊牌

- -
-
- -

材质

-
- - - -
-
-

- 尺寸(CM/厘米) 输入格式: 长 * 宽 - +

+
+

吊牌

+ +
+ + +

材质

+
+ + + +
+
+

+ 尺寸(CM/厘米) 输入格式: 长 * 宽 + <%-- --%> - + -

-
-
- -
-
-

- 数量(张) +

+
+
+ +
+
+

+ 数量(张) -

-
-
- -
-
- - -

款数

-
- -
-

- 客户旺旺 -

-
- -
-

- 工艺 -

-
- - - |    - - - |    - - -
-
- - -
-
- - -
-

计算结果-

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

+
+
+ +
+
+ + +

款数

+
+ +
+

+ 客户旺旺 +

+
+ +
+

+ 工艺 +

+
+ + + |    + + + |    + + +
+
+ + +
+ + +
+
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFee.jsp" %> +
+ +
+
+
+ +
+
+ +
+
-<%@include file="/views/copyResult.jsp"%> +<%@include file="/views/copyResult.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/views/product/takeoutBox.jsp b/src/main/webapp/views/product/takeoutBox.jsp index a51134b..a08e79e 100644 --- a/src/main/webapp/views/product/takeoutBox.jsp +++ b/src/main/webapp/views/product/takeoutBox.jsp @@ -77,16 +77,21 @@
印面工艺: - +
印刷工艺: - +
内部工艺: - + +
+
+
+ +

@@ -181,11 +186,7 @@ }) form.on('checkbox(ui_craft)', function (data) { let craft_list = []; - $(data.elem).prop("checked", true); - layer.msg("工艺不能取消", {offset: ['300px', '300px']}, function () { - }); - form.render(); - return false; + craft_list.push($("select[name='craft'] option:selected").val()); $("input[name='craft']:checked").each(function () { if (!$(this).is(':disabled')) { @@ -193,6 +194,22 @@ } } ); + if (!craft_list.includes("单面") || !craft_list.includes("彩色印刷") || !craft_list.includes("淋膜")) { + $(data.elem).prop("checked", true); + layer.msg("工艺不能取消", {offset: ['300px', '300px']}, function () { + }); + form.render(); + return false; + } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) // 点击计算,计算价格 @@ -210,7 +227,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { - + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); @@ -251,9 +271,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/tape.jsp b/src/main/webapp/views/product/tape.jsp index d9c1e93..e486bdd 100644 --- a/src/main/webapp/views/product/tape.jsp +++ b/src/main/webapp/views/product/tape.jsp @@ -108,6 +108,13 @@ + +
+ + +

@@ -314,6 +321,15 @@ } else { $(".qiege").hide(); } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) // 点击计算,计算价格 @@ -329,6 +345,10 @@ if ($(this).val() == "切割机") { craft.push($(this).attr("title") + $("input[name='stickNum']").val() + "个"); } + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } } } ); @@ -362,9 +382,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/tearingJoy.jsp b/src/main/webapp/views/product/tearingJoy.jsp index 4e1f21f..eabb6bb 100644 --- a/src/main/webapp/views/product/tearingJoy.jsp +++ b/src/main/webapp/views/product/tearingJoy.jsp @@ -103,6 +103,12 @@
+
+ + +

@@ -227,6 +233,14 @@ return false; } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } form.render(); }) @@ -258,6 +272,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/wallPainting.jsp b/src/main/webapp/views/product/wallPainting.jsp index b6fef40..382722f 100644 --- a/src/main/webapp/views/product/wallPainting.jsp +++ b/src/main/webapp/views/product/wallPainting.jsp @@ -93,7 +93,12 @@
- + +
+ +

@@ -227,6 +232,14 @@ form.render(); return false; } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } form.render(); }) @@ -248,6 +261,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/warmSticker.jsp b/src/main/webapp/views/product/warmSticker.jsp index 3b482ce..fae9be9 100644 --- a/src/main/webapp/views/product/warmSticker.jsp +++ b/src/main/webapp/views/product/warmSticker.jsp @@ -126,6 +126,12 @@
+
+ + +

@@ -204,6 +210,28 @@ } form.render();//必须写 }); + + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { kindValueData = { @@ -226,6 +254,10 @@ $("select[name='craft'] option:selected").each(function (i) { if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft_list.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft_list.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/waterGauge.jsp b/src/main/webapp/views/product/waterGauge.jsp index f39f339..9d75613 100644 --- a/src/main/webapp/views/product/waterGauge.jsp +++ b/src/main/webapp/views/product/waterGauge.jsp @@ -78,6 +78,12 @@
+
+ + +

@@ -191,7 +197,15 @@ form.render(); return false; } - + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) // 点击计算,计算价格 @@ -219,6 +233,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/weddingCard.jsp b/src/main/webapp/views/product/weddingCard.jsp index fce8cdf..3f725f2 100644 --- a/src/main/webapp/views/product/weddingCard.jsp +++ b/src/main/webapp/views/product/weddingCard.jsp @@ -62,6 +62,12 @@
+
+ + +

@@ -191,6 +197,28 @@ } }) + + form.on('checkbox(ui_craft)', function (data) { + let craft_list = []; + let kindValue = $('input[name="kindValue"]:checked').val(); + craft_list.push($("select[name='craft'] option:selected").val()); + $("input[name='craft']:checked").each(function () { + if (!$(this).is(':disabled')) { + craft_list.push($(this).val()); + } + }); + + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); + }) + // 点击计算,计算价格 form.on('submit(acount_btn)', function (data) { var kindData = { @@ -207,6 +235,18 @@ }); return false; } + let arr = [] + arr.push(craftShua); + arr.push(craftMo); + $("input[name='craft']:checked").each(function () { + if (!$(this).is("disabled")) { + if ($(this).val() == "抠图") { + arr.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } + arr.push($(this).val()) + } + }) $.ajax({ url: "${path}/getThanSum", type: "GET", @@ -219,7 +259,7 @@ } var data = result.data.proList; - var span_result = "婚礼卡 - " + kindData[kindValue] + ' - ' + size + ' 厘米(同款内容)\n' + "工艺 : " + craftShua + ',' + craftMo + "\n"; + var span_result = "婚礼卡 - " + kindData[kindValue] + ' - ' + size + ' 厘米(同款内容)\n' + "工艺 : " + arr.join(",") + "\n"; craft += craftShua + craftMo; if (number > 1) { for (let i = 0; i < data.length; i++) { @@ -233,9 +273,9 @@ } } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/wireTape.jsp b/src/main/webapp/views/product/wireTape.jsp index 5074baa..108c545 100644 --- a/src/main/webapp/views/product/wireTape.jsp +++ b/src/main/webapp/views/product/wireTape.jsp @@ -77,6 +77,12 @@
+
+ + +

@@ -184,6 +190,15 @@ form.render(); return false; } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) @@ -212,6 +227,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); @@ -229,7 +248,7 @@ } var data = result.data.proList; - var span_result = kind + '电线胶 - ' + size + ' CM (同款内容)\n'; + var span_result = kind + '电线胶 - ' + size + ' CM (同款内容)\n'; span_result += `工艺:` + craft.join(",") + '\n'; @@ -246,9 +265,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/wrappingPaper.jsp b/src/main/webapp/views/product/wrappingPaper.jsp index 566d7a8..2e7e49d 100644 --- a/src/main/webapp/views/product/wrappingPaper.jsp +++ b/src/main/webapp/views/product/wrappingPaper.jsp @@ -81,14 +81,20 @@ 配件:
+
+ + +

@@ -229,6 +235,14 @@ } else { $(".sidai").hide(); } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } form.render(); }) @@ -247,6 +261,9 @@ craft.push($("input[name='maxian']").val() + "个" + $(this).val()); } else if ($(this).val() == "丝带") { craft.push($("input[name='pcount']").val() + "个" + $(this).val()); + } else if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; } else { craft.push($(this).val()); } @@ -282,9 +299,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/wristBand.jsp b/src/main/webapp/views/product/wristBand.jsp index 7cd7c62..d975b2d 100644 --- a/src/main/webapp/views/product/wristBand.jsp +++ b/src/main/webapp/views/product/wristBand.jsp @@ -100,6 +100,12 @@
+
+ + +

@@ -246,6 +252,15 @@ form.render(); return false; } + if (data.value == '抠图') { + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) + if (data.elem.checked) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + } + form.render(); }) // 点击计算,计算价格 @@ -261,6 +276,10 @@ $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) { + if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; + } craft.push($(this).val()); } }); diff --git a/src/main/webapp/views/product/yafen.jsp b/src/main/webapp/views/product/yafen.jsp index 9f98aef..68c8e72 100644 --- a/src/main/webapp/views/product/yafen.jsp +++ b/src/main/webapp/views/product/yafen.jsp @@ -123,6 +123,12 @@
+
+ + +

@@ -258,6 +264,8 @@ $(".yhselect").hide(); $(".ydxselect").hide(); $(".zyselect").hide(); + $(".crop").hide(); + $(".crop").find("input").prop("disabled", true) if (craft_list.includes("压痕")) { $(".yhselect").show(); } @@ -267,6 +275,11 @@ if (craft_list.includes("折页")) { $(".zyselect").show(); } + if (craft_list.includes("抠图")) { + $(".crop").show(); + $(".crop").find("input").prop("disabled", false) + } + form.render(); }) // 点击计算,计算价格 @@ -294,6 +307,9 @@ } else if ($(this).val() == "折页") { craft.push($(this).val()); craft.push($(".zyselect select option:selected").val()); + } else if ($(this).val() == "抠图") { + craft.push($(this).val() + $("input[name='cropNumber']").val()); + return; } else { craft.push($(this).val()); } @@ -356,9 +372,9 @@ } span_result += '包邮,免费设计呢~(偏远地区需补邮费)' - if(window.parent.system_isGai){ - span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" - } + if (window.parent.system_isGai) { + span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!" + } addLog(span_result); $("#span_result").val(span_result); diff --git a/src/main/webapp/views/product/ykl.jsp b/src/main/webapp/views/product/ykl.jsp index 8c26a19..5589a9d 100644 --- a/src/main/webapp/views/product/ykl.jsp +++ b/src/main/webapp/views/product/ykl.jsp @@ -1,265 +1,311 @@ <%@ 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" %> - - <%@include file="/views/common.jsp"%> + + <%@include file="/views/common.jsp" %> -
-
-

亚克力

-
-
- -

- 产品名称 -

-
- -
-

- 尺寸(CM/厘米) 输入格式: 长 * 宽 -

-
- -
-

- 数量(个) -

-
- -
-

- 款数 -

-
- -
-

- 客户旺旺 -

-
- -
-

- 工艺 -

-
- -
+
+ + +
+
+
+ + +
+

计算结果- + +

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