新增抠图工艺
This commit is contained in:
@@ -124,6 +124,12 @@
|
||||
<input type="checkbox" name="craft" class="disab mq" lay-filter="switch" value="模切" title="异形模切">
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="craft" lay-filter="ui_craft" value="抠图" title="抠图">
|
||||
<div class="layui-inline crop" style="display:none;width: 80px">
|
||||
<input class="layui-input" type="text" name="cropNumber">
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="acount_btn">计算</button>
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user