|
|
@ -51,15 +51,15 @@
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span>
|
|
|
|
<span>
|
|
|
|
<input type="checkbox" name="reasons[]" value="其他" id="reject-reason-7" class="ml5 mr5 magic-checkbox" style="float:left; margin-top: 8px;"/>
|
|
|
|
<input type="checkbox" name="reasons[]" value="其他" id="reject-reason-7" data-type="other" class="ml5 mr5 magic-checkbox" style="float:left; margin-top: 8px;"/>
|
|
|
|
<label for="reject-reason-7" class="color4C4C4C">其他</label>
|
|
|
|
<label for="reject-reason-7" class="color4C4C4C">其他</label>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="clearfix mt10">
|
|
|
|
<li class="clearfix mt10">
|
|
|
|
<label class="panel-form-label fl">备注说明:</label>
|
|
|
|
<label class="panel-form-label fl reject-description-label">备注说明<span class="color-red" style="display: none;">*</span>:</label>
|
|
|
|
<textarea class="remarktextarea fl panel-box-sizing candiate_answer" name="reject_description" placeholder="为选择的撤销原因补充备注说明...."></textarea>
|
|
|
|
<textarea class="remarktextarea fl panel-box-sizing candiate_answer" name="reject_description" placeholder="为选择的撤销原因补充备注说明(当选择原因“其他”,备注说明必填)..."></textarea>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="ml20 error color-red" style="display: none;"></li>
|
|
|
|
<li class="ml20 error color-red" style="display: none;"></li>
|
|
|
@ -79,8 +79,23 @@
|
|
|
|
var modal = $(".modal.reject-auth-modal");
|
|
|
|
var modal = $(".modal.reject-auth-modal");
|
|
|
|
var form = modal.find("#reject-auth-form");
|
|
|
|
var form = modal.find("#reject-auth-form");
|
|
|
|
var applyIdInput = form.find("input[name='apply_id']");
|
|
|
|
var applyIdInput = form.find("input[name='apply_id']");
|
|
|
|
|
|
|
|
var rejectDescriptionSpan = form.find(".reject-description-label span");
|
|
|
|
|
|
|
|
var needRejectDescription = false;
|
|
|
|
var error = modal.find(".error");
|
|
|
|
var error = modal.find(".error");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modal.on("click", "input[name='reasons[]']", function(){
|
|
|
|
|
|
|
|
var checkbox = $(this);
|
|
|
|
|
|
|
|
if (checkbox.data("type") != "other") { return; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (checkbox.prop("checked")) {
|
|
|
|
|
|
|
|
needRejectDescription = true;
|
|
|
|
|
|
|
|
rejectDescriptionSpan.show();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
needRejectDescription = false;
|
|
|
|
|
|
|
|
rejectDescriptionSpan.hide();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
modal.on('click', '.submit-btn', function(){
|
|
|
|
modal.on('click', '.submit-btn', function(){
|
|
|
|
if (!formValid()) { return; }
|
|
|
|
if (!formValid()) { return; }
|
|
|
|
form.submit();
|
|
|
|
form.submit();
|
|
|
@ -88,8 +103,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
var formValid = function () {
|
|
|
|
var formValid = function () {
|
|
|
|
error.html("").hide();
|
|
|
|
error.html("").hide();
|
|
|
|
if (form.find("input[name='reasons[]']:checked").length == 0 || form.find("textarea[name='reject_description']").val() == '') {
|
|
|
|
if (form.find("input[name='reasons[]']:checked").length == 0) {
|
|
|
|
error.html("原因和说明不能为空,请完善后再确认提交").show();
|
|
|
|
error.html("撤销原因不能为空,请完善后再确认提交").show();
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (needRejectDescription && form.find("textarea[name='reject_description']").val() == '') {
|
|
|
|
|
|
|
|
error.html("备注说明不能为空,请完善后再确认提交").show();
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -100,6 +120,8 @@
|
|
|
|
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;})
|
|
|
|
|
|
|
|
needRejectDescription = false;
|
|
|
|
|
|
|
|
rejectDescriptionSpan.hide();
|
|
|
|
modal.hide();
|
|
|
|
modal.hide();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
// 隐藏弹窗
|
|
|
|
// 隐藏弹窗
|
|
|
|