审核完成调整列表页
parent
89c81f2af3
commit
7af95900cc
|
@ -372,9 +372,10 @@ public class ProjectController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/approve")
|
@RequestMapping("/approve")
|
||||||
public String approve(@RequestParam(value = KEYWORDS, required = false) String keywords,
|
public String approve(@RequestParam(value = KEYWORDS, required = false) String keywords,
|
||||||
@RequestParam("id") int id, @RequestParam String listFrom,
|
@RequestParam("id") int id, @RequestParam("type") int type,@RequestParam String listFrom,
|
||||||
Map<String, Object> model) {
|
Map<String, Object> model) {
|
||||||
Project project = projectService.getProject(id);
|
Project project = projectService.getProject(id);
|
||||||
|
model.put("type",type);
|
||||||
|
|
||||||
//项目信息
|
//项目信息
|
||||||
model.put("adminId", InterfaceUtil.getAdminId());
|
model.put("adminId", InterfaceUtil.getAdminId());
|
||||||
|
@ -445,9 +446,9 @@ public class ProjectController extends BaseController {
|
||||||
* 审批完成任务
|
* 审批完成任务
|
||||||
*/
|
*/
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping("/completeTask/{projectId}")
|
@RequestMapping("/completeTask/{projectId}/{approvetype}")
|
||||||
public ResponseMsg completeTask(@PathVariable int projectId, @RequestBody String json) {
|
public ResponseMsg completeTask(@PathVariable int projectId,@PathVariable int approvetype, @RequestBody String json) {
|
||||||
return projectService.completeTask(projectId, json);
|
return projectService.completeTask(projectId, json,approvetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ public class ProjectService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ResponseMsg completeTask(int projectId, String json) {
|
public ResponseMsg completeTask(int projectId, String json,int approvetype) {
|
||||||
List<ProjectInstanceRelation> relationList = projectInstanceRelationRepository.findByProjectIdOrderByCreateTimeDesc(projectId);
|
List<ProjectInstanceRelation> relationList = projectInstanceRelationRepository.findByProjectIdOrderByCreateTimeDesc(projectId);
|
||||||
if (relationList == null || relationList.isEmpty()) {
|
if (relationList == null || relationList.isEmpty()) {
|
||||||
return ResponseMsg.buildFailedMsg("审核失败");
|
return ResponseMsg.buildFailedMsg("审核失败");
|
||||||
|
@ -215,7 +215,7 @@ public class ProjectService {
|
||||||
actTaskDefService.completeTaskByProcInsId(projectInstanceRelation.getProcessInsId(),
|
actTaskDefService.completeTaskByProcInsId(projectInstanceRelation.getProcessInsId(),
|
||||||
obj.getIntValue("type"), obj.getString("message"));
|
obj.getIntValue("type"), obj.getString("message"));
|
||||||
|
|
||||||
return ResponseMsg.buildSuccessMsg("审核成功");
|
return ResponseMsg.buildSuccessMsg("审核成功",approvetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,7 @@
|
||||||
<div class="am-tabs-bd">
|
<div class="am-tabs-bd">
|
||||||
<div <#if check==1>class="am-tab-panel am-fade am-in am-active" <#else> class="am-tab-panel am-fade am-in"</#if> id="tab1">
|
<div <#if check==1>class="am-tab-panel am-fade am-in am-active" <#else> class="am-tab-panel am-fade am-in"</#if> id="tab1">
|
||||||
<input name="id" id="id" type="hidden" value="${project.id}" />
|
<input name="id" id="id" type="hidden" value="${project.id}" />
|
||||||
|
<input name="type" id="type" type="hidden" value="${type}"/>
|
||||||
<input name="projectContributionProfitRateThreshold" id="projectContributionProfitRateThreshold" type="hidden" value="${project.projectContributionProfitRateThreshold}" />
|
<input name="projectContributionProfitRateThreshold" id="projectContributionProfitRateThreshold" type="hidden" value="${project.projectContributionProfitRateThreshold}" />
|
||||||
<!--验证表单元素(validate) begin-->
|
<!--验证表单元素(validate) begin-->
|
||||||
|
|
||||||
|
@ -2448,6 +2449,7 @@
|
||||||
|
|
||||||
var completeTask = function (projectId) {
|
var completeTask = function (projectId) {
|
||||||
var message = $("#doc-vld-ta-2").val();
|
var message = $("#doc-vld-ta-2").val();
|
||||||
|
var approvetype = $("#type").val();
|
||||||
if (message == '') {
|
if (message == '') {
|
||||||
alert("请填写审核意见");
|
alert("请填写审核意见");
|
||||||
return;
|
return;
|
||||||
|
@ -2459,7 +2461,7 @@
|
||||||
message: message
|
message: message
|
||||||
};
|
};
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '${base}/project/completeTask/' + projectId,
|
url: '${base}/project/completeTask/' + projectId + "/" + approvetype,
|
||||||
data: JSON.stringify(params),
|
data: JSON.stringify(params),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
|
@ -2468,8 +2470,14 @@
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.status == 0) {
|
if (data.status == 0) {
|
||||||
alert(data.msg);
|
alert(data.msg);
|
||||||
window.location.href = window.location.href;
|
|
||||||
refreshMyApproveMsg();
|
refreshMyApproveMsg();
|
||||||
|
var urlType = data.data;
|
||||||
|
if(urlType == 1){
|
||||||
|
location.href = "${base}/project/list";
|
||||||
|
}else {
|
||||||
|
location.href = "${base}/project/listApprove";
|
||||||
|
}
|
||||||
|
|
||||||
} else if (data.status == 1) {
|
} else if (data.status == 1) {
|
||||||
alert(data.msg);
|
alert(data.msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
<#list pager.list as list>
|
<#list pager.list as list>
|
||||||
<tr>
|
<tr>
|
||||||
<td>${list.id!}</td>
|
<td>${list.id!}</td>
|
||||||
<td><a style="cursor: pointer;text-decoration:none" onclick="location.href='${base}/project/approve?listFrom=list&id=${list.id}'">${list.name!}</a></td>
|
<td><a style="cursor: pointer;text-decoration:none" onclick="location.href='${base}/project/approve?listFrom=list&type=1&id=${list.id}'">${list.name!}</a></td>
|
||||||
<td>${list.typeDesc!}</td>
|
<td>${list.typeDesc!}</td>
|
||||||
<td>${list.statusDesc!}</td>
|
<td>${list.statusDesc!}</td>
|
||||||
<td>${list.approveStatusDesc!}</td>
|
<td>${list.approveStatusDesc!}</td>
|
||||||
|
@ -290,7 +290,7 @@
|
||||||
<#if adminId==list.approveId>
|
<#if adminId==list.approveId>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||||
onclick="location.href='${base}/project/approve?listFrom=list&id=${list.id}'"><span
|
onclick="location.href='${base}/project/approve?listFrom=list&type=1&id=${list.id}'"><span
|
||||||
class="am-icon-pencil-square-o"></span>审核
|
class="am-icon-pencil-square-o"></span>审核
|
||||||
</button>
|
</button>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
|
@ -183,7 +183,7 @@
|
||||||
<#list pager.list as list>
|
<#list pager.list as list>
|
||||||
<tr>
|
<tr>
|
||||||
<td>${list.id!}</td>
|
<td>${list.id!}</td>
|
||||||
<td><a style="cursor: pointer;text-decoration:none" onclick="location.href='${base}/project/approve?listFrom=list&id=${list.id}'">${list.name!}</a></td>
|
<td><a style="cursor: pointer;text-decoration:none" onclick="location.href='${base}/project/approve?listFrom=list&type=1&id=${list.id}'">${list.name!}</a></td>
|
||||||
<td>${list.typeDesc!}</td>
|
<td>${list.typeDesc!}</td>
|
||||||
<td>${list.statusDesc!}</td>
|
<td>${list.statusDesc!}</td>
|
||||||
<td>${list.approveStatusDesc!}</td>
|
<td>${list.approveStatusDesc!}</td>
|
||||||
|
@ -203,7 +203,7 @@
|
||||||
|
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||||
onclick="location.href='${base}/project/approve?listFrom=list&id=${list.id}'"><span
|
onclick="location.href='${base}/project/approve?listFrom=list&type=2&id=${list.id}'"><span
|
||||||
class="am-icon-pencil-square-o"></span>审核
|
class="am-icon-pencil-square-o"></span>审核
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue