新增抠图工艺
This commit is contained in:
@@ -78,6 +78,12 @@
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="craft" lay-filter="switch" value="双面覆哑膜" title="双面覆哑膜" checked>
|
||||
</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>
|
||||
@@ -116,6 +122,28 @@ layui.use(['table','form','carousel'], function(){
|
||||
|
||||
//建造实例
|
||||
ins = carousel.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) {
|
||||
@@ -136,10 +164,13 @@ layui.use(['table','form','carousel'], function(){
|
||||
$("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);
|
||||
$.ajax({
|
||||
url : "${path}/getThanSum",
|
||||
type : "GET",
|
||||
|
||||
Reference in New Issue
Block a user