Этот коммит содержится в:
2025-09-20 17:27:04 +08:00
родитель 84970ee98f
Коммит b0f83939d6
3 изменённых файлов: 51 добавлений и 7 удалений
+38 -4
Просмотреть файл
@@ -26,7 +26,7 @@
<form class="layui-form">
<div class="layui-input-block">
<input type="radio" name="k" class="k" lay-filter="k" value="0" title="常规牛皮纸">
<input type="radio" name="k" class="k" lay-filter="k" value="1" title="自定义尺寸">
<input type="radio" name="k" class="k" lay-filter="k" value="1" title="白卡纸手提袋">
<input type="radio" name="k" class="k" lay-filter="k" value="2" title="礼品袋 / 福袋">
<!-- <input type="radio" name="k" class="k" lay-filter="k" value="3" title="特价白卡手提袋"> -->
<input type="radio" name="k" class="k" lay-filter="k" value="4" title="牛皮纸手提袋">
@@ -74,7 +74,7 @@
<div class="layui-form-item npzd count">
<select name="count" class="select countCG" id="npzd_count">
<option value=""></option>
<%-- <option value="100">100</option>--%>
<%-- <option value="100">100</option>--%>
<option value="500">500</option>
<option value="1000">1000</option>
<option value="2000">2000</option>
@@ -123,6 +123,16 @@
<input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang"
class="layui-input">
</div>
<div id="craft_layout" style="display: none">
<p>工艺</p>
<input type="checkbox" name="craft" lay-filter="craft" value="烫金" title="烫金"/>
<div id="tang_type" class="layui-inline" style="display: none;width: 200px">
<select name="craft" class="select" disabled>
<option value="单面">单面</option>
<option value="双面">双面</option>
</select>
</div>
</div>
<hr>
<div class="layui-form-item">
<button class="layui-btn" lay-submit="" lay-filter="acount_btn" id="queryCondBtn">计算</button>
@@ -240,6 +250,15 @@
$("#price").val(expressPrice)
}
});
form.on("checkbox(craft)", function (data) {
$("#tang_type").hide();
$("#tang_type select").prop("disabled", true);
if (data.value == "烫金" && data.elem.checked) {
$("#tang_type").show();
$("#tang_type select").prop("disabled", false);
}
form.render();
})
form.on("select(expressFee)", function (selectedData) {
// 获取选中下拉框的价格(格式:首重,续重)
price = selectedData.value
@@ -352,7 +371,7 @@
let spec = $("#spec").val();
let kindValue = $(".npzd select[name='kindValue']").val();
let count_html = `<option value=""></option>`;
if (spec <= 10 && kindValue == 0) {
if (spec <= 10 && kindValue == 0) {
// count_html +=
// `<option value="100">100</option>`;
}
@@ -439,9 +458,12 @@
}
}
});
$("#tang_type").hide();
$("#tang_type select").prop("disabled", true);
$("#bagForm")[0].reset();
var level = data.value;//被点击的radio的value值
$("#craft_layout").hide();
$("#craft_layout").find(":input").attr("disabled", true);
if (level == 0) {
$(".cg").show();
$(".zdy").hide();
@@ -462,6 +484,8 @@
$(".tj").find(":input").attr("disabled", true);
$(".dz").find(":input").attr("disabled", true);
$(".npzd").find(":input").attr("disabled", true);
$("#craft_layout").show();
$("#craft_layout").find(":input").attr("disabled", false);
} else if (level == 2) {
$(".cg").hide();
$(".tj").hide();
@@ -568,6 +592,14 @@
layer.msg(result.msg, {offset: ['300px', '300px']}, {icon: 5, time: 1000});
return false;
}
let arr = [];
$("input:checkbox[name='craft']:checked").each(function (i) {
if (!$(this).is(':disabled')) {
if ($(this).val() == "烫金") {
arr.push($("#tang_type select option:selected").val() + $(this).val());
}
}
});
var data = result.data.proList;
var number = $("#number").val();
if (level == 0) {
@@ -586,6 +618,7 @@
// textarea
var span_result = "手提袋- " + kind + ' - ' + kind2 + '\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'
@@ -636,6 +669,7 @@
var count = $(".countZDY").val();
// textarea
var span_result = "手提袋--" + kind + '--' + size + 'CM\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'