调整弹窗关闭

dev_aliyun
杨树明 6 years ago
parent 9f815e4977
commit 8be3d1afdc

@ -84,7 +84,6 @@
var error = modal.find(".error"); var error = modal.find(".error");
modal.on("click", "input[name='reasons[]']", function(){ modal.on("click", "input[name='reasons[]']", function(){
debugger
var checkbox = $(this); var checkbox = $(this);
if (checkbox.data("type") != "other") { return; } if (checkbox.data("type") != "other") { return; }
@ -98,13 +97,11 @@
}); });
modal.on('click', '.submit-btn', function(){ modal.on('click', '.submit-btn', function(){
debugger
if (!formValid()) { return; } if (!formValid()) { return; }
form.submit(); form.submit();
}); });
var formValid = function () { var formValid = function () {
debugger
error.html("").hide(); error.html("").hide();
if (form.find("input[name='reasons[]']:checked").length == 0) { if (form.find("input[name='reasons[]']:checked").length == 0) {
error.html("撤销原因不能为空,请完善后再确认提交").show(); error.html("撤销原因不能为空,请完善后再确认提交").show();
@ -120,7 +117,6 @@
}; };
var hideRejectModalFunc = function(){ var hideRejectModalFunc = function(){
debugger
applyIdInput.val(''); applyIdInput.val('');
form.find("textarea[name='reject_description']").val(''); form.find("textarea[name='reject_description']").val('');
form.find("input[name='reasons[]']").each(function(){this.checked=false;}) form.find("input[name='reasons[]']").each(function(){this.checked=false;})
@ -129,7 +125,7 @@
modal.hide(); modal.hide();
}; };
// 隐藏弹窗 // 隐藏弹窗
modal.on("click", '.mask', hideRejectModalFunc); // modal.on("click", '.mask', hideRejectModalFunc);
modal.on("click", '.cancel-btn', hideRejectModalFunc); modal.on("click", '.cancel-btn', hideRejectModalFunc);
}) })
</script> </script>

Loading…
Cancel
Save