Skip to content

Commit 873fc48

Browse files
author
deeper
committed
fix 审批结果显示 bug
1 parent 86d9f17 commit 873fc48

File tree

6 files changed

+120
-37
lines changed

6 files changed

+120
-37
lines changed

src/main/java/com/wenjun/oa/action/WorkflowAction.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@ public String approveUI(Long messageId,Map map) throws Exception {
147147
Long leaveId = message.getLeaveId();
148148
LeaveBean leaveBean = workflowService.getById(leaveId);
149149

150-
Long userId = message.getUserId();
151-
User leaveUser = userService.getById(userId);
150+
Long userId = leaveBean.getUserId();//请假人
151+
User approverUser= userService.getById(userId);
152152

153153

154154
map.put("message", message);
155155
map.put("leaveBean", leaveBean);
156-
map.put("leaveUser", leaveUser);
156+
map.put("approverUser", approverUser);
157157
return "flow/approveUI";
158158
}
159159

src/main/webapp/WEB-INF/jsp/department/list.jsp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@
6161

6262
<!--说明-->
6363
<div id="Description">
64-
说明:<br />
65-
1,列表页面只显示一层的(同级的)部门数据,默认显示最顶级的部门列表。<br />
66-
2,点击部门名称,可以查看此部门相应的下级部门列表。<br />
67-
3,删除部门时,同时删除此部门的所有下级部门。
6864
</div>
6965

7066
</body>
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2-
<%--
3-
Created by IntelliJ IDEA.
4-
User: Administrator
5-
Date: 2017/4/14
6-
Time: 21:03
7-
To change this template use File | Settings | File Templates.
8-
--%>
92
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
3+
<%@ include file="/WEB-INF/jsp/common/adminLTE.jspf" %>
104
<html>
115
<head>
126
<title>申请类型</title>
137
</head>
148
<body>
159

16-
17-
<c:forEach var="type" items="${applyTypeList}">
18-
<a href="${type.url}" >${type.name}</a>
19-
</c:forEach>
10+
<div class="wrapper">
11+
<div class="row">
12+
<div class="jumbotron text-center" style="background-color:transparent;">
13+
<h2>轻轻松松走完流程审核</h2>
14+
<br/><br/>
15+
<span>
16+
<c:forEach var="type" items="${applyTypeList}">
17+
<a href="${type.url}" >${type.name}</a>
18+
</c:forEach>
19+
</span>
20+
</div>
21+
</div>
22+
</div>
2023

2124
</body>
2225
</html>

src/main/webapp/WEB-INF/jsp/flow/approveUI.jsp

Lines changed: 77 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
12
<%--
23
Created by IntelliJ IDEA.
34
User: Administrator
@@ -9,37 +10,95 @@
910
<html>
1011
<head>
1112
<title>审批页面</title>
13+
<%@ include file="/WEB-INF/jsp/common/adminLTE.jspf" %>
14+
1215
</head>
1316
<body>
1417

15-
<div>
18+
<div class="wrapper">
19+
<div class="row">
20+
<div class="col-sm-12">
21+
<section class="panel">
22+
<header class="panel-heading"> 请假审批<span class="tools pull-right"><a href="javascript:;" class="fa fa-chevron-down"></a> </span> </header>
23+
<div class="panel-body">
24+
<table class="table table-hover general-table">
25+
<thead>
26+
<tr>
27+
<th> 类型</th>
28+
<th> 申请人</th>
29+
<th class="hidden-phone hidden-xs">请假日期</th>
30+
<th>天数</th>
31+
<th>原因</th>
32+
<th>结果</th>
33+
</tr>
34+
</thead>
35+
<tbody>
1636

17-
<%--类型 申请人 请假日期 天数 结果 进度 操作--%>
1837

19-
<span>${message.title}</span>
20-
<span>${message.type}</span>
21-
<span>${message.watch}</span>
22-
<span>${message.createTime}</span>
23-
<span>${message.userId}</span>
38+
<tr>
39+
<td colspan="1">${message.type==1?"请假":"其他"}</td>
40+
<td colspan="1">${approverUser.name}</td>
41+
<td colspan="1">${leaveBean.createTime}</td>
42+
<td colspan="1">${leaveBean.days}</td>
43+
<td colspan="1">${leaveBean.reason}</td>
44+
<td colspan="1">${leaveBean.result==2?"拒绝":(leaveBean.result==1?"同意":"处理中")}</td>
45+
</tr>
2446

25-
<span>${leaveUser.name}</span>
26-
<span>${leaveBean.reason}</span>
47+
</tbody>
2748

49+
</table>
2850

29-
<form action="flow_approve.action" method="post">
51+
</div>
52+
</section>
53+
</div>
54+
</div>
55+
</div>
3056

31-
<input type="hidden" name="messageId" value="${message.id}"/>修改Message表为disable <br/>
57+
<div class="content">
3258

33-
<input type="hidden" name="leaveId" value="${leaveBean.id}"/>请假表ID <br/>
34-
<input type="radio" name="status" value="1" checked/>同意 <br/>
35-
<input type="radio" name="status" value="2"/>拒绝<br/>
36-
<input type="text" name="summary" /><br/>
37-
<input type="submit" value="提交"/>
59+
<div class="row">
60+
<!-- left column -->
61+
<div class="col-md-12">
62+
<!-- general form elements -->
63+
<div class="box box-primary">
64+
<div class="box-header with-border">
65+
<h3 class="box-title">审批意见</h3>
66+
</div>
67+
<!-- /.box-header -->
68+
<!-- form start -->
69+
<form role="form" action="flow_approve.action" method="post">
70+
<div class="box-body">
3871

39-
</form>
72+
<div class="form-group">
73+
<input type="hidden" name="messageId" value="${message.id}"/>
74+
<input type="hidden" name="leaveId" value="${leaveBean.id}"/>
75+
</div>
4076

41-
</div>
77+
<div class="form-group">
78+
<label for="summary">说明</label>
79+
<textarea name="summary" id="summary"></textarea>
80+
<p class="help-block">你将同意此申请,请确认信息后提交.</p>
81+
</div>
4282

83+
<div class="form-group">
84+
<input type="radio" name="status" value="1" checked/>同意 <br/>
85+
</div>
86+
<div class="form-group">
87+
<input type="radio" name="status" value="2"/>拒绝<br/>
88+
</div>
89+
</div>
90+
<!-- /.box-body -->
91+
92+
<div class="box-footer">
93+
<button type="submit" class="btn btn-primary">Submit</button>
94+
</div>
95+
</form>
96+
</div>
97+
<!-- /.box -->
98+
99+
</div>
100+
</div>
101+
</div>
43102

44103

45104

src/main/webapp/WEB-INF/jsp/flow/myMessageList.jsp

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2+
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
23
<%--
34
Created by IntelliJ IDEA.
45
User: Administrator
@@ -10,12 +11,32 @@
1011
<html>
1112
<head>
1213
<title>我的消息列表</title>
14+
<%@ include file="/WEB-INF/jsp/common/adminLTE.jspf" %>
15+
1316
</head>
1417
<body>
18+
19+
20+
<div class="box box-default">
21+
<div class="box-header with-border">
22+
<h3 class="box-title">消息提醒</h3>
23+
</div>
24+
<c:if test="${fn:length(messageList) == 0 }">
25+
<div class="box-body">
26+
<a href="#"> 暂无消息 </a>
27+
</div>
28+
</c:if>
29+
1530
<c:forEach var="message" items="${messageList}">
16-
<a href="flow_approveUI.action?messageId=${message.id}">${message.title}</a>
31+
<div class="box-body">
32+
<a href="flow_approveUI.action?messageId=${message.id}">${message.title}</a>
33+
</div>
1734
</c:forEach>
1835

36+
<!-- /.box-body -->
37+
</div>
38+
39+
1940

2041
</body>
2142
</html>

src/main/webapp/WEB-INF/jsp/home/top.jsp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
<!-- Navbar Right Menu -->
4343
<div class="navbar-custom-menu">
4444
<ul class="nav navbar-nav">
45+
46+
<li>
47+
<a href="#" >欢迎你 &nbsp;&nbsp;${user.loginName}</a>
48+
</li>
4549
<!-- Messages: style can be found in dropdown.less-->
4650
<li class="messages-menu">
4751
<!-- Menu toggle button -->

0 commit comments

Comments
 (0)