新增抠图工艺
This commit is contained in:
@@ -154,6 +154,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
@@ -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())
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user