This commit is contained in:
2025-04-02 18:09:49 +08:00
parent 4334abb10e
commit 1dd5eed7a5
4 changed files with 142 additions and 20 deletions
+38 -5
View File
@@ -670,7 +670,9 @@
</select>
</div>
<input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配弹力绳"
title="配弹力绳(20cm">
title="配弹力绳(15cm">
<input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配弹力绳捆"
title="配弹力绳(捆)">
<div class="layui-inline shengz tscolor" style="width: 110px;display: none">
<select class="select">
<option value="金色绳子">金色绳子</option>
@@ -1017,7 +1019,7 @@
$("#z4_craft .shengz").prop("disabled", true);
}
}
if (data.value == "配弹力绳" ) {
if (data.value == "配弹力绳" || data.value == "配弹力绳捆") {
if ($(data.elem).is(":checked")) {
$("#z4_craft .tscolor").show();
$("#z4_craft .tscolor").prop("disabled", false);
@@ -2688,6 +2690,14 @@
arr.push($(this).val() + "-" + $("select[name='shen_color'] option:selected").val())
return;
}
if ($(this).val() == "配弹力绳捆") {
arr.push("配弹力绳(捆)");
return;
}
if ($(this).val() == "配弹力绳") {
arr.push("配弹力绳(15CM)");
return;
}
}
arr.push($(this).val());
@@ -3135,7 +3145,13 @@
$("input:checkbox[name='craft']:checked").each(function (i) {
if (!$(this).is(':disabled')) {
if ($(this).val() != "双面覆哑膜") {
arr.push($(this).val());
if ($(this).val() == "配弹力绳捆") {
arr.push("配弹力绳(捆)");
} else if ($(this).val() == "配弹力绳") {
arr.push("配弹力绳(15CM)");
} else {
arr.push($(this).val());
}
}
}
});
@@ -3240,6 +3256,7 @@
+ "厘米-(" + same + ") \n" + "工艺 :" + arr + "\n";
}
let count_price = {200: 1, 500: 2, 1000: 4, 2000: 8, 3000: 12, 4000: 16, 5000: 20, 10000: 40};
if (number > 1) {
if (couponKind == "少数量") {
let numberType = $("#desType option:selected").text();
@@ -3247,12 +3264,28 @@
}
for (let i = 0; i < data.length; i++) {
span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n'
let price_text = "";
if (arr.indexOf("配弹力绳(捆)") > -1) {
let price_count = count_price[data[i].count];
if (price_count) {
price_text = "," + price_count + "捆";
}
}
span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + price_text + '\n'
data[i].number = number;
}
} else {
for (let i = 0; i < data.length; i++) {
span_result += number + '款 ' + data[i].count + "个,共" + data[i].price + "元" + '\n'
let price_text = "";
if (arr.indexOf("配弹力绳(捆)") > -1) {
let price_count = count_price[data[i].count];
if (price_count) {
price_text = "," + price_count + "捆";
}
}
span_result += number + '款 ' + data[i].count + "个,共" + data[i].price + "元" + price_text + '\n'
data[i].number = number;
}
}
+3 -1
View File
@@ -46,7 +46,9 @@ class="layui-input" value="吊牌"> -->
<span class="craftSheng">
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="棉绳" title="棉绳"
lay-skin="primary">
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="配弹力绳" title="配弹力绳(20cm"
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="配弹力绳" title="配弹力绳(15cm"
lay-skin="primary">
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="配弹力绳捆" title="配弹力绳(捆)"
lay-skin="primary">
<div class="shengz tscolor" style="width: 150px;display: none">
<select class="select">
+73 -9
View File
@@ -160,7 +160,9 @@
</select>
</div>
<input type="checkbox" class="tshengz" name="craft" lay-filter="ui_lius" value="弹力绳"
title="弹力绳(20cm">
title="弹力绳(15cm">
<input type="checkbox" class="tshengz" name="craft" lay-filter="ui_lius" value="弹力绳捆"
title="弹力绳(捆)">
<div class="shengz tscolor" style="width: 150px;display: none">
<select class="select">
<option value="金色绳子">金色绳子</option>
@@ -385,12 +387,18 @@
getProductImage()
let shengz = $(".shengz:checked").length;
let tshengz = $(".tshengz:checked").length;
if(shengz == 1 && tshengz == 1){
if (shengz == 1 && tshengz == 1) {
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
$(data.elem).prop("checked", false);
layer.msg('棉绳和弹力绳不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
return false;
}
if (tshengz > 1) {
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
$(data.elem).prop("checked", false);
layer.msg('弹力绳不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
return false;
}
if (shengz == 1) {
$(".scolor").css("display", "inline-block")
} else {
@@ -446,7 +454,7 @@
layer.msg('棉绳和弹力绳不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
return false;
}
if (data.value == "配弹力绳") {
if (data.value == "配弹力绳" || data.value == "配弹力绳捆") {
if ($(data.elem).is(":checked")) {
$(".craftSheng .tscolor").show();
$(".craftSheng .tscolor").prop("disabled", false);
@@ -711,6 +719,12 @@
arr = []
//arr = $('input[name="kind2Value"]:checked').val();
// arr.push("双面哑膜");
let shengcraft = $("input[name='craftSheng']:checked").val();
if (shengcraft == "配弹力绳") {
arr.push("配弹力绳(15CM)")
} else if (shengcraft == "配弹力绳捆") {
arr.push("配弹力绳(捆)")
}
arr.push($('input[name="kind2Value"]:checked').val());
} else if ($('input[name="kindValue"]:checked').val() == "6") {
craftQie = ""
@@ -733,6 +747,12 @@
arr = []
//arr = $('input[name="kind2Value"]:checked').val();
// arr.push("双面哑膜");
let shengcraft = $("input[name='craftSheng']:checked").val();
if (shengcraft == "配弹力绳") {
arr.push("配弹力绳(15CM)")
} else if (shengcraft == "配弹力绳捆") {
arr.push("配弹力绳(捆)")
}
arr.push($('input[name="kind2Value"]:checked').val());
} else if ($('input[name="kindValue"]:checked').val() == "3") { // && craftQie == "异形模切"
var size2 = $(".size2").val();
@@ -743,7 +763,15 @@
$("input:checkbox[name='craft']:checked").each(function (i) {
if (!$(this).is(':disabled')) {
if ($(this).val() != "双面覆哑膜") {
arr.push($(this).val());
if ($(this).val() == "弹力绳") {
arr.push("配弹力绳(15cm");
} else if ($(this).val() == "弹力绳捆") {
arr.push("配弹力绳(捆)");
} else {
arr.push($(this).val());
}
}
}
});
@@ -770,16 +798,33 @@
}
}
let count_price = {200: 1, 500: 2, 1000: 4, 2000: 8, 3000: 12, 4000: 16, 5000: 20, 10000: 40};
if (kindValue == 3) {
if (number > 1) {
for (let i = 0; i < data.length; i++) {
span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n'
let price_text = "";
if (arr.indexOf("配弹力绳(捆)") > -1) {
let price_count = count_price[data[i].count];
if (price_count) {
price_text = "," + price_count + "捆";
}
}
span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + price_text + '\n'
data[i].number = number;
}
} else {
for (let i = 0; i < data.length; i++) {
span_result += data[i].count + "张" + data[i].price + "元" + '\n'
let price_text = "";
if (arr.indexOf("配弹力绳(捆)") > -1) {
let price_count = count_price[data[i].count];
if (price_count) {
price_text = "," + price_count + "捆";
}
}
span_result += data[i].count + "张" + data[i].price + "元" + price_text + '\n'
data[i].number = number;
}
}
@@ -791,13 +836,32 @@
}
} else {
if (number > 1) {
for (let i = 0; i < data.length; i++) {
span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n'
let price_text = "";
if (arr.indexOf("配弹力绳(捆)") > -1) {
let price_count = count_price[data[i].count];
if (price_count) {
price_text = "," + price_count + "捆";
}
}
span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + price_text + '\n'
data[i].number = number;
}
} else {
for (let i = 0; i < data.length; i++) {
span_result += number + '款 ' + data[i].count + "张,共" + data[i].price + "元" + '\n'
let price_text = "";
if (arr.indexOf("配弹力绳(捆)") > -1) {
let price_count = count_price[data[i].count];
if (price_count) {
price_text = "," + price_count + "捆";
}
}
span_result += number + '款 ' + data[i].count + "张,共" + data[i].price + "元" + price_text + '\n'
data[i].number = number;
}
}