Merge remote-tracking branch 'origin/master'

master
xxssyyyyssxx 2021-11-22 10:32:52 +08:00
commit 599aa85ca5
3 changed files with 104 additions and 18 deletions

View File

@ -111,6 +111,9 @@ public class ProjectInstanceService {
*/
public void updateApprover(int projectId, int adminId){
Project project = projectRepository.findOne(projectId);
if (project == null) {
return;
}
if (adminId == 0) {
project.setApproveName("");
}else {

View File

@ -1,6 +1,19 @@
<#assign base=request.contextPath />
<#import "../common/defaultLayout.ftl" as defaultLayout>
<@defaultLayout.layout>
<style type="text/css">
/**让所有的模态对话框都居中*/
.am-modal.am-modal-prompt.am-modal-active {
transform: translate(-50%, -50%) scale(1);
left: 50%;
top: 50%;
margin-left: 0;
margin-top: 0 !important;
}
</style>
<link rel="stylesheet" href="${base}/assets/css/amazeui.switch.css"/>
<div class="admin-content">
<div class="am-cf am-padding" style="padding:1rem 1.6rem 1.6rem 1rem;margin:0px;">
@ -13,7 +26,7 @@
<div class="am-tabs am-margin" data-am-tabs>
<ul class="am-tabs-nav am-nav am-nav-tabs">
<li class="am-active" ><a href="#tab2">审批过程</a></li>
<li class="am-active"><a href="#tab2">审批过程</a></li>
<li><a href="#tab3">流程图</a></li>
</ul>
@ -53,32 +66,27 @@
<#if !list.endTime??>
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="completeTask('${list.procInsId}', '${list.taskId}', 2)">
onclick="toHandle('${list.procInsId}', '${list.taskId}')">
<span class="am-icon-pencil-square-o"></span>
审批通过
</button>
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="completeTask('${list.procInsId}', '${list.taskId}', 3)">
<span class="am-icon-pencil-square-o"></span>
驳回
审批
</button>
</#if>
</td>
</tr>
</#list>
</#if>
</tbody>
</table>
</div>
</div>
</div>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in" id="tab3">
<img id="img" name="img" style="width: 950px" src="${base}/actProcIns/procInsPng/${procInsId}">
<img id="img" name="img" style="width: 950px" src="${base}/actProcIns/procInsPng/${procInsId}">
</div>
</div>
@ -92,6 +100,58 @@
</div>
</div>
<div class="am-modal am-modal-prompt" style="width: 600px;z-index: 1111;max-height:600px;overflow-y:auto;"
tabindex="-1" id="my-approve">
<div class="am-modal-dialog">
<div class="am-modal-hd">管理员审核</div>
<div class="am-modal-bd">
<form method="post" class="am-form" id="tmpForm" action="">
<div class="am-tabs am-margin" data-am-tabs>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in am-active" id="tab1">
<div class="am-g am-form-group am-margin-top">
<div class="am-u-sm-4 am-u-md-2 am-text-right">审核</div>
<input type="hidden" id="handleProcInsId" value="">
<input type="hidden" id="handleTaskId" value="">
<div class="am-u-sm-6 am-u-md-8 switch-button"
style="height: 25px;">
<label class="am-radio-inline">
<input type="radio" value="2" checked="checked"
name="docVlGender" required> 审核通过
</label>
<label class="am-radio-inline">
<input type="radio" value="3" name="docVlGender"> 审核不通过
</label>
</div>
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>
<div class="am-g am-form-group am-margin-top" style="display: flex;">
<div class="am-u-sm-4 am-u-md-2 am-text-right">
<span style="color: red;">*</span>意见
</div>
<div class="am-u-sm-8 am-u-md-10">
<textarea id="doc-vld-ta-2" minlength="10"
maxlength="100"></textarea>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="am-modal-footer">
<span class="am-modal-btn" data-am-modal-cancel>取消</span>
<span class="am-modal-btn" data-am-modal-confirm onclick="handleTask()">确定</span>
</div>
</div>
</div>
</@defaultLayout.layout>
<script src="${base}/assets/js/amazeui.switch.js"></script>
@ -99,13 +159,35 @@
var urlBase = "${base}";
var url;
var completeTask = function (procInsId, taskId, type) {
var toHandle = function (procInsId, taskId) {
$('#my-approve').modal({
relatedTarget: this,
onConfirm: function (e) {
},
onCancel: function (e) {
}
});
$("#handleProcInsId").val(procInsId);
$("#handleTaskId").val(taskId);
};
var handleTask = function () {
var message = $("#doc-vld-ta-2").val();
var type = $("input[name='docVlGender']:checked").val();
if (message == '') {
message = "系统管理员审核";
}
var params = {
procInsId: procInsId,
taskId: taskId,
procInsId: $("#handleProcInsId").val(),
taskId: $("#handleTaskId").val(),
type: type,
message: '管理员审批'
message: message
};
$.ajax({
url: '${base}/actTaskDef/completeTask',
data: JSON.stringify(params),
@ -118,5 +200,6 @@
location.reload();
}
});
}
};
</script>

View File

@ -43,7 +43,7 @@
<#if !list.endTime??>
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="deleteProcIns('${list.procInsId}', '管理员撤销')">
onclick="deleteProcIns('${list.procInsId}', '系统管理员撤销')">
<span class="am-icon-pencil-square-o"></span>
撤销流程
</button>