|
@@ -52,8 +52,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start" name="stage-start"
|
|
|
- onsubmit="return checkAuditorFrom()">
|
|
|
+ <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start" name="stage-start">
|
|
|
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
<input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
|
|
|
<button class="btn btn-primary btn-sm" type="submit">确认上报</button>
|
|
@@ -241,8 +240,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start" name="stage-start"
|
|
|
- onsubmit="return checkAuditorFrom()">
|
|
|
+ <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start" name="stage-start">
|
|
|
<input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
|
|
|
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
|
|
|
<% if(ctx.stage.status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === ctx.stage.user_id) { %>
|
|
@@ -258,7 +256,7 @@
|
|
|
<!--审批通过-->
|
|
|
<div class="modal fade sp-location-list" id="sp-done" data-backdrop="static">
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
|
- <form class="modal-content" action="<%- preUrl %>/audit/check" method="post" onsubmit="return auditCheck(0);">
|
|
|
+ <form class="modal-content" action="<%- preUrl %>/audit/check" method="post" id="audit-check0">
|
|
|
<div class="modal-header">
|
|
|
<h5 class="modal-title">审批通过</h5>
|
|
|
</div>
|
|
@@ -449,8 +447,7 @@
|
|
|
<!--审批退回-->
|
|
|
<div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
|
- <form class="modal-content modal-lg" action="<%- preUrl %>/audit/check" method="post"
|
|
|
- onsubmit="return auditCheck(1);">
|
|
|
+ <form class="modal-content modal-lg" action="<%- preUrl %>/audit/check" method="post" id="audit-check1">
|
|
|
<div class="modal-header">
|
|
|
<h5 class="modal-title">审批退回</h5>
|
|
|
</div>
|
|
@@ -819,94 +816,34 @@
|
|
|
}
|
|
|
return false;
|
|
|
});
|
|
|
- // $('#audit-check0').submit(function (e) {
|
|
|
- // $(this).parent().parent().modal('hide');
|
|
|
- // const data = {
|
|
|
- // opinion: $('[name=opinion]', this).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '),
|
|
|
- // checkType: parseInt($('[name=checkType]', this).val()),
|
|
|
- // };
|
|
|
- // dataChecker.checkAndPost(this.action, data);
|
|
|
- // $('#hide-all').hide();
|
|
|
- // return false;
|
|
|
- // });
|
|
|
- // $('#audit-check2').submit(function (e) {
|
|
|
- // $(this).parent().parent().modal('hide');
|
|
|
- // const data = {
|
|
|
- // opinion: $('[name=opinion]', this).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '),
|
|
|
- // checkType: parseInt($('[name=checkType]', this).val()),
|
|
|
- // };
|
|
|
- // dataChecker.checkAndPost(this.action, data);
|
|
|
- // $('#hide-all').hide();
|
|
|
- // return false;
|
|
|
- // });
|
|
|
- <% } %>
|
|
|
- // 审批通过
|
|
|
- // $('#audit-check1').submit(function (e) {
|
|
|
- // const data = {
|
|
|
- // opinion: $('[name=opinion]', this).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '),
|
|
|
- // checkType: parseInt($('[name=checkType]', this).val()),
|
|
|
- // };
|
|
|
- // postData(this.action, data, function () {
|
|
|
- // window.location.reload();
|
|
|
- // })
|
|
|
- // return false
|
|
|
- // });
|
|
|
- // 审批
|
|
|
- function auditCheck(i) {
|
|
|
- const checkType = parseInt($(i === 0 ? '[name=checkType]' : '[name=checkType]:checked').val())
|
|
|
- const data = {
|
|
|
- opinion: $(`${i === 0 ? '#sp-done' : '#sp-back'}`).find('[name=opinion]').val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '),
|
|
|
- checkType,
|
|
|
- }
|
|
|
- if (i === 1) {
|
|
|
- if ($('#warning-text').length) $('#warning-text').remove()
|
|
|
- if (!checkType && !$('#warning-text').length) {
|
|
|
- $('#reject-process').prepend('<p id="warning-text" style="color: red; margin: 0;">请选择退回流程</p>');
|
|
|
- return false
|
|
|
- }
|
|
|
- }
|
|
|
- checkType && postData(preUrl + '/audit/check', data, function () {
|
|
|
- window.location.reload();
|
|
|
- })
|
|
|
+ $('#audit-check0').submit(function (e) {
|
|
|
+ const checkType = parseInt($('[name=checkType]').val());
|
|
|
+ const data = {
|
|
|
+ opinion: $(`${'#sp-done'}`).find('[name=opinion]').val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '),
|
|
|
+ checkType,
|
|
|
+ };
|
|
|
+ $('#sp-done').modal('hide');
|
|
|
+ checkType && dataChecker.checkAndPost(this.action, data);
|
|
|
+ $('#hide-all').hide();
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ $('#audit-check1').submit(function (e) {
|
|
|
+ const checkType = parseInt($('[name=checkType]:checked').val());
|
|
|
+ const data = {
|
|
|
+ opinion: $(`${'#sp-back'}`).find('[name=opinion]').val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '),
|
|
|
+ checkType,
|
|
|
+ };
|
|
|
+ if ($('#warning-text').length) $('#warning-text').remove()
|
|
|
+ if (!checkType && !$('#warning-text').length) {
|
|
|
+ $('#reject-process').prepend('<p id="warning-text" style="color: red; margin: 0;">请选择退回流程</p>');
|
|
|
return false
|
|
|
}
|
|
|
- // $('#audit-check2').submit(function (e) {
|
|
|
- // debugger
|
|
|
- // // $(this).parent().parent().modal('hide');
|
|
|
- // const data = {
|
|
|
- // opinion: $('[name=opinion]', this).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '),
|
|
|
- // checkType: parseInt($('[name=checkType]:checked', this).val()),
|
|
|
- // };
|
|
|
- // if (!$('[name=checkType]:checked', this).val()) {
|
|
|
- // if (!$('#warning-text').length) {
|
|
|
- // $('#reject-process').prepend('<p id="warning-text" style="color: red; margin: 0;">请选择退回流程</p>');
|
|
|
- // }
|
|
|
- // return false
|
|
|
- // } else {
|
|
|
- // postData(this.action, data, function () {
|
|
|
- // window.location.reload();
|
|
|
- // })
|
|
|
- // }
|
|
|
- // return false
|
|
|
- // });
|
|
|
- // $('#audit-check3').submit(function (e) {
|
|
|
- // // $(this).parent().parent().modal('hide');
|
|
|
- // const data = {
|
|
|
- // opinion: $('[name=opinion]', this).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '),
|
|
|
- // checkType: parseInt($('[name=checkType]:checked', this).val()),
|
|
|
- // };
|
|
|
- // if (!parseInt($('[name=checkType]:checked', this).val())) {
|
|
|
- // if (!$('#warning-text').length) {
|
|
|
- // $('.reject-process').prepend('<p id="warning-text" style="color: red; margin: 0;">请选择退回流程</p>');
|
|
|
- // }
|
|
|
- // return false;
|
|
|
- // } else {
|
|
|
- // postData(this.action, data, function () {
|
|
|
- // window.location.reload();
|
|
|
- // });
|
|
|
- // }
|
|
|
- // return false
|
|
|
- // });
|
|
|
+ $('#sp-back').modal('hide');
|
|
|
+ checkType && dataChecker.checkAndPost(this.action, data);
|
|
|
+ $('#hide-all').hide();
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ <% } %>
|
|
|
|
|
|
$('.sp-location-list').on('shown.bs.modal', function () {
|
|
|
const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
|