edit
This commit is contained in:
@@ -66,6 +66,15 @@
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="craft" lay-filter="craft" value="3m胶" title="3m胶">
|
||||
<input type="checkbox" name="craft" lay-filter="craft" class="yingbai" value="印白" title="印白">
|
||||
<input type="checkbox" value="内部模切" id="nmq" title="内部模切" lay-filter="nmq">
|
||||
<span class="n_mq_input" style="display: none">
|
||||
<span style="margin-top:12px;flex-shrink: 0">个数 : </span>
|
||||
<input type="text" placeholder="请输入整数" autocomplete="off" name="n_mq_num" value="0"
|
||||
class="layui-input" style="width: 70px">
|
||||
<span style="margin-top:12px;flex-shrink: 0">尺寸(CM/厘米) <span style="font-size:14px;color:red">输入格式: 长 * 宽</span> </span>
|
||||
<input type="text" placeholder="尺寸" autocomplete="off" name="n_mq_size"
|
||||
class="layui-input">
|
||||
</span>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="layui-form-item">
|
||||
@@ -109,6 +118,16 @@
|
||||
|
||||
ins = carousel.render({});
|
||||
|
||||
form.on('checkbox(nmq)', (data) => {
|
||||
if (data.elem.checked) {
|
||||
$(".n_mq_input").css("display", "flex")
|
||||
$(".n_mq_input input").prop("disabled", false);
|
||||
} else {
|
||||
$(".n_mq_input").hide()
|
||||
$(".n_mq_input input").prop("disabled", true);
|
||||
}
|
||||
getProductImage(kValue)
|
||||
})
|
||||
|
||||
function getProductImage(craft) {
|
||||
$("#carousel").empty();
|
||||
@@ -175,6 +194,34 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
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 (n_moq_num > 0) {
|
||||
let main_size = size.split("*");
|
||||
let moq_size = n_moq_size.split("*");
|
||||
|
||||
let max_number = Math.max(Math.floor(main_size[0] * 10 / (moq_size[0] * 10 + 3)) * Math.floor(main_size[1] * 10 / (moq_size[1] * 10 + 3)), Math.floor(main_size[1] * 10 / (moq_size[0] * 10 + 3)) * Math.floor(main_size[0] * 10 / (moq_size[1] * 10 + 3)))
|
||||
if (max_number < n_moq_num) {
|
||||
layer.msg('内模切尺寸超出范围!', {offset: ['300px', '300px']})
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$.ajax({
|
||||
url: "${path}/getThanSum",
|
||||
type: "GET",
|
||||
|
||||
Reference in New Issue
Block a user