Enford 5 anos atrás
pai
commit
8b6adf76cb
89 arquivos alterados com 16116 adições e 0 exclusões
  1. 25 0
      src/main/webapp/webpage/modules/echarts/bar.jsp
  2. 100 0
      src/main/webapp/webpage/modules/echarts/chinaWeatherDataBeanForm.jsp
  3. 185 0
      src/main/webapp/webpage/modules/echarts/chinaWeatherDataBeanList.jsp
  4. 26 0
      src/main/webapp/webpage/modules/echarts/line.jsp
  5. 14 0
      src/main/webapp/webpage/modules/echarts/lineDoubleNum.jsp
  6. 31 0
      src/main/webapp/webpage/modules/echarts/lineTimeLine.jsp
  7. 10 0
      src/main/webapp/webpage/modules/echarts/pie.jsp
  8. 65 0
      src/main/webapp/webpage/modules/echarts/pieClassForm.jsp
  9. 140 0
      src/main/webapp/webpage/modules/echarts/pieClassList.jsp
  10. 21 0
      src/main/webapp/webpage/modules/echarts/radar.jsp
  11. 97 0
      src/main/webapp/webpage/modules/exampleeconomics/exampleEconomicsForm.jsp
  12. 164 0
      src/main/webapp/webpage/modules/exampleeconomics/exampleEconomicsList.jsp
  13. 97 0
      src/main/webapp/webpage/modules/exampleexpend/exampleExpendForm.jsp
  14. 164 0
      src/main/webapp/webpage/modules/exampleexpend/exampleExpendList.jsp
  15. 95 0
      src/main/webapp/webpage/modules/exampleproject/exampleProjectForm.jsp
  16. 160 0
      src/main/webapp/webpage/modules/exampleproject/exampleProjectList.jsp
  17. 97 0
      src/main/webapp/webpage/modules/examplesingle/exampleSingleForm.jsp
  18. 164 0
      src/main/webapp/webpage/modules/examplesingle/exampleSingleList.jsp
  19. 171 0
      src/main/webapp/webpage/modules/goout/goOutAudit.jsp
  20. 268 0
      src/main/webapp/webpage/modules/goout/goOutForm.jsp
  21. 109 0
      src/main/webapp/webpage/modules/goout/goOutHistoricList.jsp
  22. 222 0
      src/main/webapp/webpage/modules/goout/goOutList.jsp
  23. 178 0
      src/main/webapp/webpage/modules/goout/goOutTodoList.jsp
  24. 149 0
      src/main/webapp/webpage/modules/hr/certificateAdd.jsp
  25. 207 0
      src/main/webapp/webpage/modules/hr/certificateForm.jsp
  26. 150 0
      src/main/webapp/webpage/modules/hr/certificateList.jsp
  27. 133 0
      src/main/webapp/webpage/modules/hr/certificateListSimple.jsp
  28. 116 0
      src/main/webapp/webpage/modules/hr/certificateView.jsp
  29. 260 0
      src/main/webapp/webpage/modules/hr/evaluationForm.jsp
  30. 248 0
      src/main/webapp/webpage/modules/hr/evaluationList.jsp
  31. 143 0
      src/main/webapp/webpage/modules/hr/evaluationListSimple.jsp
  32. 172 0
      src/main/webapp/webpage/modules/hr/evaluationView.jsp
  33. 171 0
      src/main/webapp/webpage/modules/hr/jobResumeForm.jsp
  34. 245 0
      src/main/webapp/webpage/modules/hr/jobResumeList.jsp
  35. 143 0
      src/main/webapp/webpage/modules/hr/jobResumeListSimple.jsp
  36. 126 0
      src/main/webapp/webpage/modules/hr/jobResumeView.jsp
  37. 278 0
      src/main/webapp/webpage/modules/hr/userInfoForm.jsp
  38. 188 0
      src/main/webapp/webpage/modules/hr/userInfoList.jsp
  39. 141 0
      src/main/webapp/webpage/modules/hr/userInfoListSimple.jsp
  40. 204 0
      src/main/webapp/webpage/modules/hr/userInfoView.jsp
  41. 187 0
      src/main/webapp/webpage/modules/iim/chatHistoryList.jsp
  42. 195 0
      src/main/webapp/webpage/modules/iim/contacts.jsp
  43. 232 0
      src/main/webapp/webpage/modules/iim/layGroupForm.jsp
  44. 166 0
      src/main/webapp/webpage/modules/iim/layGroupList.jsp
  45. 175 0
      src/main/webapp/webpage/modules/iim/mailBoxDetail.jsp
  46. 243 0
      src/main/webapp/webpage/modules/iim/mailBoxList.jsp
  47. 171 0
      src/main/webapp/webpage/modules/iim/mailComposeDetail.jsp
  48. 206 0
      src/main/webapp/webpage/modules/iim/mailComposeList.jsp
  49. 233 0
      src/main/webapp/webpage/modules/iim/mailDraftDetail.jsp
  50. 222 0
      src/main/webapp/webpage/modules/iim/mailDraftList.jsp
  51. 33 0
      src/main/webapp/webpage/modules/iim/mail_compose_success.jsp
  52. 242 0
      src/main/webapp/webpage/modules/iim/mail_reply.jsp
  53. 234 0
      src/main/webapp/webpage/modules/iim/mail_send.jsp
  54. 139 0
      src/main/webapp/webpage/modules/iim/myCalendar.jsp
  55. 210 0
      src/main/webapp/webpage/modules/iim/myCalendarForm-add.jsp
  56. 229 0
      src/main/webapp/webpage/modules/iim/myCalendarForm-edit.jsp
  57. 222 0
      src/main/webapp/webpage/modules/iim/myFriends.jsp
  58. 123 0
      src/main/webapp/webpage/modules/iim/search_user.jsp
  59. 420 0
      src/main/webapp/webpage/modules/isignature/DocumentEdit.jsp
  60. 140 0
      src/main/webapp/webpage/modules/isignature/DocumentList.jsp
  61. 65 0
      src/main/webapp/webpage/modules/isignature/DocumentSave.jsp
  62. 347 0
      src/main/webapp/webpage/modules/isignature/PDFServer.jsp
  63. 29 0
      src/main/webapp/webpage/modules/isignature/UserExplain.html
  64. 14 0
      src/main/webapp/webpage/modules/isignature/iSignatureDocumentForm.jsp
  65. 149 0
      src/main/webapp/webpage/modules/isignature/iSignatureDocumentList.jsp
  66. BIN
      src/main/webapp/webpage/modules/isignature/iWebPDF2018DB.Mysql.txt
  67. 365 0
      src/main/webapp/webpage/modules/leaveapply/leaveApplyAudit.jsp
  68. 409 0
      src/main/webapp/webpage/modules/leaveapply/leaveApplyBackModifyApply.jsp
  69. 637 0
      src/main/webapp/webpage/modules/leaveapply/leaveApplyExtendForm.jsp
  70. 646 0
      src/main/webapp/webpage/modules/leaveapply/leaveApplyExtendModifyApply.jsp
  71. 623 0
      src/main/webapp/webpage/modules/leaveapply/leaveApplyForm.jsp
  72. 366 0
      src/main/webapp/webpage/modules/leaveapply/leaveApplyList.jsp
  73. 555 0
      src/main/webapp/webpage/modules/leaveapply/leaveApplyModifyApply.jsp
  74. 15 0
      src/main/webapp/webpage/modules/leaveapply/leaveApplyTask.jsp
  75. 375 0
      src/main/webapp/webpage/modules/leaveapply/leaveApplyView.jsp
  76. 75 0
      src/main/webapp/webpage/modules/leaveapply/leaveDetailForm.jsp
  77. 140 0
      src/main/webapp/webpage/modules/leaveapply/leaveDetailList.jsp
  78. 188 0
      src/main/webapp/webpage/modules/leaveapply/leaveMangeList.jsp
  79. 129 0
      src/main/webapp/webpage/modules/leaveapply/leaveMangeView.jsp
  80. 191 0
      src/main/webapp/webpage/modules/leavetype/leaveTypeForm.jsp
  81. 160 0
      src/main/webapp/webpage/modules/leavetype/leaveTypeFormView.jsp
  82. 225 0
      src/main/webapp/webpage/modules/leavetype/leaveTypeList.jsp
  83. 165 0
      src/main/webapp/webpage/modules/leavetype/leaveTypeSysList.jsp
  84. 160 0
      src/main/webapp/webpage/modules/leavetype/leaveTypeView.jsp
  85. 47 0
      src/main/webapp/webpage/modules/modules/moduleChooseForm.jsp
  86. 126 0
      src/main/webapp/webpage/modules/modules/moduleChooseList.jsp
  87. 159 0
      src/main/webapp/webpage/modules/monitor/info.jsp
  88. 2 0
      src/main/webapp/webpage/modules/monitor/monitor.jsp
  89. 55 0
      src/main/webapp/webpage/modules/monitor/systemInfo.jsp

+ 25 - 0
src/main/webapp/webpage/modules/echarts/bar.jsp

@@ -0,0 +1,25 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ include file="/webpage/include/echarts.jsp"%>
+	单轴:
+	<div id="line_normal"  class="main000"></div>
+	<echarts:bar 
+	  	id="line_normal"
+		title="短期预测数据对比曲线" 
+		subtitle="短期预测数据对比曲线"
+		xAxisData="${xAxisData}" 
+		yAxisData="${yAxisData}" 
+		xAxisName="预测时间"
+		yAxisName="实际电量(MW)" 
+		/>
+	双轴:
+	<div id="line_yAxisIndex"  class="main000"></div>
+	<echarts:bar
+		id="line_yAxisIndex"
+		title="短期预测数据对比曲线" 
+		subtitle="短期预测数据对比曲线"
+		xAxisData="${xAxisData}" 
+		yAxisData="${yAxisData}" 
+		xAxisName="预测时间"
+		yAxisName="实际电量(MW),实际总辐射(w/㎡)" 
+		yAxisIndex="${yAxisIndex}"/>

+ 100 - 0
src/main/webapp/webpage/modules/echarts/chinaWeatherDataBeanForm.jsp

@@ -0,0 +1,100 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>城市气温管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			
+					laydate({
+			            elem: '#datestr', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+			        });
+		});
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="chinaWeatherDataBean" action="${ctx}/echarts/chinaWeatherDataBean/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>	
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">日期:</label></td>
+					<td class="width-35">
+						<input id="datestr" name="datestr" type="text" maxlength="20" class="laydate-icon form-control layer-date "
+							value="<fmt:formatDate value="${chinaWeatherDataBean.datestr}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">北京最高气温:</label></td>
+					<td class="width-35">
+						<form:input path="beijingMaxTemp" htmlEscape="false" class="form-control  number"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">北京最低气温:</label></td>
+					<td class="width-35">
+						<form:input path="beijingMinTemp" htmlEscape="false" class="form-control  number"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">长春最高气温:</label></td>
+					<td class="width-35">
+						<form:input path="changchunMaxTemp" htmlEscape="false" class="form-control  number"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">长春最低气温:</label></td>
+					<td class="width-35">
+						<form:input path="changchunMinTemp" htmlEscape="false" class="form-control  number"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">沈阳最高气温:</label></td>
+					<td class="width-35">
+						<form:input path="shenyangMaxTemp" htmlEscape="false" class="form-control  number"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">沈阳最低气温:</label></td>
+					<td class="width-35">
+						<form:input path="shenyangMinTemp" htmlEscape="false" class="form-control  number"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">哈尔滨最高气温:</label></td>
+					<td class="width-35">
+						<form:input path="haerbinMaxTemp" htmlEscape="false" class="form-control  number"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">哈尔滨最低气温:</label></td>
+					<td class="width-35">
+						<form:input path="haerbinMinTemp" htmlEscape="false" class="form-control  number"/>
+					</td>
+					<td class="width-15 active"></td>
+		   			<td class="width-35" ></td>
+		  		</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 185 - 0
src/main/webapp/webpage/modules/echarts/chinaWeatherDataBeanList.jsp

@@ -0,0 +1,185 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ include file="/webpage/include/echarts.jsp"%>
+<meta name="decorator" content="default"/>
+ <div class="tabs-container">
+                    <ul class="nav nav-tabs">
+                        <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">统计图表</a>
+                        </li>
+                        <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">数据列表</a>
+                        </li>
+                    </ul>
+                    <div class="tab-content">
+                        <div id="tab-1" class="tab-pane active">
+                            <div class="panel-body">
+							                单轴:
+								<div id="line_normal"  class="main000"></div>
+							    <echarts:line 
+							        id="line_normal"
+									title="2011年温度对比曲线" 
+									subtitle="主要城市的温度对比曲线"
+									xAxisData="${xAxisData}" 
+									yAxisData="${yAxisData}" 
+									xAxisName="预测时间"
+									yAxisName="温度(℃)" />
+									
+								双轴:
+								<div id="line_yAxisIndex"  class="main000"></div>
+								<echarts:line 
+								    id="line_yAxisIndex"
+									title="2011年温度对比曲线" 
+									subtitle="主要城市的温度对比曲线"
+									xAxisData="${xAxisData}" 
+									yAxisData="${yAxisData}" 
+									xAxisName="预测时间"
+									yAxisName="最高温度(℃),最低温度(℃)" 
+									yAxisIndex="${yAxisIndex}"/>
+
+                            </div>
+                        </div>
+                        <div id="tab-2" class="tab-pane">
+                            <div class="panel-body">
+							   <div class="wrapper wrapper-content">
+								<div class="ibox">
+								<div class="ibox-title">
+									<h5>城市气温列表 </h5>
+									<div class="ibox-tools">
+										<a class="collapse-link">
+											<i class="fa fa-chevron-up"></i>
+										</a>
+										<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+											<i class="fa fa-wrench"></i>
+										</a>
+										<ul class="dropdown-menu dropdown-user">
+											<li><a href="javascript:void(0)">选项1</a>
+											</li>
+											<li><a href="javascript:void(0)">选项2</a>
+											</li>
+										</ul>
+										<a class="close-link">
+											<i class="fa fa-times"></i>
+										</a>
+									</div>
+								</div>
+							    
+							    <div class="ibox-content">
+								<sys:message content="${message}"/>
+								
+								<!--查询条件-->
+								<div class="row">
+								<div class="col-sm-12">
+								<form:form id="searchForm" modelAttribute="chinaWeatherDataBean" action="${ctx}/echarts/chinaWeatherDataBean/" method="post" class="form-inline">
+									<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+									<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+									<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+									<div class="form-group">
+									 </div>	
+								</form:form>
+								<br/>
+								</div>
+								</div>
+								
+								<!-- 工具栏 -->
+								<div class="row">
+								<div class="col-sm-12">
+									<div class="pull-left">
+										<shiro:hasPermission name="echarts:chinaWeatherDataBean:add">
+											<table:addRow url="${ctx}/echarts/chinaWeatherDataBean/form" title="城市气温"></table:addRow><!-- 增加按钮 -->
+										</shiro:hasPermission>
+										<shiro:hasPermission name="echarts:chinaWeatherDataBean:edit">
+										    <table:editRow url="${ctx}/echarts/chinaWeatherDataBean/form" title="城市气温" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+										</shiro:hasPermission>
+										<shiro:hasPermission name="echarts:chinaWeatherDataBean:del">
+											<table:delRow url="${ctx}/echarts/chinaWeatherDataBean/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+										</shiro:hasPermission>
+										<shiro:hasPermission name="echarts:chinaWeatherDataBean:import">
+											<table:importExcel url="${ctx}/echarts/chinaWeatherDataBean/import"></table:importExcel><!-- 导入按钮 -->
+										</shiro:hasPermission>
+										<shiro:hasPermission name="echarts:chinaWeatherDataBean:export">
+								       		<table:exportExcel url="${ctx}/echarts/chinaWeatherDataBean/export"></table:exportExcel><!-- 导出按钮 -->
+								       	</shiro:hasPermission>
+								       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+									
+										</div>
+									<div class="pull-right">
+										<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+										<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+									</div>
+								</div>
+								</div>
+								
+								<!-- 表格 -->
+								<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+									<thead>
+										<tr>
+											<th> <input type="checkbox" class="i-checks"></th>
+											<th  class="sort-column datestr">日期</th>
+											<th  class="sort-column beijingMaxTemp">北京最高气温</th>
+											<th  class="sort-column beijingMinTemp">北京最低气温</th>
+											<th  class="sort-column changchunMaxTemp">长春最高气温</th>
+											<th  class="sort-column changchunMinTemp">长春最低气温</th>
+											<th  class="sort-column shenyangMaxTemp">沈阳最高气温</th>
+											<th  class="sort-column shenyangMinTemp">沈阳最低气温</th>
+											<th  class="sort-column haerbinMaxTemp">哈尔滨最高气温</th>
+											<th  class="sort-column haerbinMinTemp">哈尔滨最低气温</th>
+											<th>操作</th>
+										</tr>
+									</thead>
+									<tbody>
+									<c:forEach items="${page.list}" var="chinaWeatherDataBean">
+										<tr>
+											<td> <input type="checkbox" id="${chinaWeatherDataBean.id}" class="i-checks"></td>
+											<td><a  href="javascript:void(0)" onclick="openDialogView('查看城市气温', '${ctx}/echarts/chinaWeatherDataBean/form?id=${chinaWeatherDataBean.id}','80%','80%')">
+												<fmt:formatDate value="${chinaWeatherDataBean.datestr}" pattern="yyyy-MM-dd "/>
+											</a></td>
+											<td>
+												${chinaWeatherDataBean.beijingMaxTemp}
+											</td>
+											<td>
+												${chinaWeatherDataBean.beijingMinTemp}
+											</td>
+											<td>
+												${chinaWeatherDataBean.changchunMaxTemp}
+											</td>
+											<td>
+												${chinaWeatherDataBean.changchunMinTemp}
+											</td>
+											<td>
+												${chinaWeatherDataBean.shenyangMaxTemp}
+											</td>
+											<td>
+												${chinaWeatherDataBean.shenyangMinTemp}
+											</td>
+											<td>
+												${chinaWeatherDataBean.haerbinMaxTemp}
+											</td>
+											<td>
+												${chinaWeatherDataBean.haerbinMinTemp}
+											</td>
+											<td>
+												<shiro:hasPermission name="echarts:chinaWeatherDataBean:view">
+													<a href="javascript:void(0)" onclick="openDialogView('查看城市气温', '${ctx}/echarts/chinaWeatherDataBean/form?id=${chinaWeatherDataBean.id}','80%','80%')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+												</shiro:hasPermission>
+												<shiro:hasPermission name="echarts:chinaWeatherDataBean:edit">
+							    					<a href="javascript:void(0)" onclick="openDialog('修改城市气温', '${ctx}/echarts/chinaWeatherDataBean/form?id=${chinaWeatherDataBean.id}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+							    				</shiro:hasPermission>
+							    				<shiro:hasPermission name="echarts:chinaWeatherDataBean:del">
+													<a href="${ctx}/echarts/chinaWeatherDataBean/delete?id=${chinaWeatherDataBean.id}" onclick="return confirmx('确认要删除该城市气温吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+												</shiro:hasPermission>
+											</td>
+										</tr>
+									</c:forEach>
+									</tbody>
+								</table>
+								
+									<!-- 分页代码 -->
+								<table:page page="${page}"></table:page>
+								<br/>
+								<br/>
+								</div>
+								</div>
+							</div>
+                            </div>
+                        </div>
+                    </div>
+                </div>

+ 26 - 0
src/main/webapp/webpage/modules/echarts/line.jsp

@@ -0,0 +1,26 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ include file="/webpage/include/echarts.jsp"%>
+<meta name="decorator" content="default"/>
+	单轴:
+	<div id="line_normal"  class="main000"></div>
+    <echarts:line 
+        id="line_normal"
+		title="2011年温度对比曲线" 
+		subtitle="主要城市的温度对比曲线"
+		xAxisData="${xAxisData}" 
+		yAxisData="${yAxisData}" 
+		xAxisName="预测时间"
+		yAxisName="温度(℃)" />
+		
+	双轴:
+	<div id="line_yAxisIndex"  class="main000"></div>
+	<echarts:line 
+	    id="line_yAxisIndex"
+		title="2011年温度对比曲线" 
+		subtitle="主要城市的温度对比曲线"
+		xAxisData="${xAxisData}" 
+		yAxisData="${yAxisData}" 
+		xAxisName="预测时间"
+		yAxisName="最高温度(℃),最低温度(℃)" 
+		yAxisIndex="${yAxisIndex}"/>

+ 14 - 0
src/main/webapp/webpage/modules/echarts/lineDoubleNum.jsp

@@ -0,0 +1,14 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ include file="/webpage/include/echarts.jsp"%>
+<meta name="decorator" content="default"/>
+
+	双数值轴折线:
+	<div id="line_doubleNum"  class="main000"></div>
+	<echarts:lineDoubleNum 
+	    id="line_doubleNum"
+		title="双数值轴折线" 
+		subtitle="短期预测数据对比曲线"
+		xAxisName="预测时间"
+		yAxisName="实际电量(MW)" 
+		axisDataArr="${axisDataArr}"/>

+ 31 - 0
src/main/webapp/webpage/modules/echarts/lineTimeLine.jsp

@@ -0,0 +1,31 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ include file="/webpage/include/echarts.jsp"%>
+<meta name="decorator" content="default"/>
+
+	单轴:
+	<div id=line_normal  class="main000"></div>
+	<echarts:lineTimeLine
+	    id="line_normal"
+		title="2011年温度对比曲线" 
+		subtitle="主要城市的温度对比曲线"
+		xAxisName="预测时间"
+		yAxisName="温度(℃)" 
+		xAxisData="${xAxisData}" 
+		yAxisData="${yAxisData}" 
+		timelineData="${timelineData}"
+		timelineAxisData="${timelineAxisData}"
+		/>
+	双轴:
+	<div id="line_yAxisIndex"  class="main000"></div>
+	<echarts:lineTimeLine
+		id="line_yAxisIndex"
+		title="2011年温度对比曲线" 
+		subtitle="主要城市的温度对比曲线"
+		xAxisName="预测时间"
+		yAxisName="最高温度(℃),最低温度(℃)" 
+		xAxisData="${xAxisData}" 
+		yAxisData="${yAxisData}"
+		timelineData="${timelineData}"
+		timelineAxisData="${timelineAxisData}"
+		yAxisIndex="${yAxisIndex}"/>

+ 10 - 0
src/main/webapp/webpage/modules/echarts/pie.jsp

@@ -0,0 +1,10 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ include file="/webpage/include/echarts.jsp"%>
+
+	<div id="pie"  class="main000"></div>
+	<echarts:pie
+	    id="pie"
+		title="某站点用户访问来源" 
+		subtitle="纯属虚构"
+		orientData="${orientData}"/>

+ 65 - 0
src/main/webapp/webpage/modules/echarts/pieClassForm.jsp

@@ -0,0 +1,65 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>班级管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			
+		});
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="pieClass" action="${ctx}/echarts/pieClass/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>	
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">班级:</label></td>
+					<td class="width-35">
+						<form:input path="className" htmlEscape="false" maxlength="64" class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">人数:</label></td>
+					<td class="width-35">
+						<form:input path="num" htmlEscape="false" class="form-control  digits"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+					<td class="width-35">
+						<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="form-control "/>
+					</td>
+					<td class="width-15 active"></td>
+		   			<td class="width-35" ></td>
+		  		</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 140 - 0
src/main/webapp/webpage/modules/echarts/pieClassList.jsp

@@ -0,0 +1,140 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+<html>
+<head>
+	<title>班级管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+<%@ include file="/webpage/include/echarts.jsp"%>
+	<div class="wrapper wrapper-content">
+	<div id="pie"  class="main000"></div>
+	<echarts:pie
+	    id="pie"
+		title="班级统计" 
+		subtitle="人数统计"
+		orientData="${orientData}"/>
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>班级列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="pieClass" action="${ctx}/echarts/pieClass/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+			<span>班级:</span>
+				<form:input path="className" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+		 </div>	
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+			<shiro:hasPermission name="echarts:pieClass:add">
+				<table:addRow url="${ctx}/echarts/pieClass/form" title="班级"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="echarts:pieClass:edit">
+			    <table:editRow url="${ctx}/echarts/pieClass/form" title="班级" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="echarts:pieClass:del">
+				<table:delRow url="${ctx}/echarts/pieClass/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="echarts:pieClass:import">
+				<table:importExcel url="${ctx}/echarts/pieClass/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="echarts:pieClass:export">
+	       		<table:exportExcel url="${ctx}/echarts/pieClass/export"></table:exportExcel><!-- 导出按钮 -->
+	       	</shiro:hasPermission>
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		
+			</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th> <input type="checkbox" class="i-checks"></th>
+				<th  class="sort-column className">班级</th>
+				<th  class="sort-column num">人数</th>
+				<th  class="sort-column remarks">备注信息</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="pieClass">
+			<tr>
+				<td> <input type="checkbox" id="${pieClass.id}" class="i-checks"></td>
+				<td><a  href="javascript:void(0)" onclick="openDialogView('查看班级', '${ctx}/echarts/pieClass/form?id=${pieClass.id}','80%','80%')">
+					${pieClass.className}
+				</a></td>
+				<td>
+					${pieClass.num}
+				</td>
+				<td>
+					${pieClass.remarks}
+				</td>
+				<td>
+					<shiro:hasPermission name="echarts:pieClass:view">
+						<a href="javascript:void(0)" onclick="openDialogView('查看班级', '${ctx}/echarts/pieClass/form?id=${pieClass.id}','80%','80%')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="echarts:pieClass:edit">
+    					<a href="javascript:void(0)" onclick="openDialog('修改班级', '${ctx}/echarts/pieClass/form?id=${pieClass.id}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+    				<shiro:hasPermission name="echarts:pieClass:del">
+						<a href="${ctx}/echarts/pieClass/delete?id=${pieClass.id}" onclick="return confirmx('确认要删除该班级吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+					</shiro:hasPermission>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 21 - 0
src/main/webapp/webpage/modules/echarts/radar.jsp

@@ -0,0 +1,21 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ include file="/webpage/include/echarts.jsp"%>
+<meta name="decorator" content="default"/>
+
+	8方位:
+	<div id="radar8"  class="main000"></div>
+	<echarts:radar
+	    id="radar8"
+		title="气象预测风向玫瑰图8方位" 
+		subtitle="预测时间"
+		orientData="${orientData}"
+		polarType="8"/>
+	16方位:
+	<div id="radar16"  class="main000"></div>
+	<echarts:radar 
+		id="radar16"
+		title="气象预测风向玫瑰图16方位" 
+		subtitle="预测时间"
+		orientData="${orientData}"
+		polarType="16"/>

+ 97 - 0
src/main/webapp/webpage/modules/exampleeconomics/exampleEconomicsForm.jsp

@@ -0,0 +1,97 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>经济指标管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			
+		});
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="exampleEconomics" action="${ctx}/exampleeconomics/exampleEconomics/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>	
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+					<td class="width-35">
+						<form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">概况id:</label></td>
+					<td class="width-35">
+						<form:input path="exampleId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">项id:</label></td>
+					<td class="width-35">
+						<form:input path="exampleindicesId" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">指标id:</label></td>
+					<td class="width-35">
+						<form:input path="indexId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">项单位:</label></td>
+					<td class="width-35">
+						<form:input path="unit" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">位数:</label></td>
+					<td class="width-35">
+						<form:input path="digits" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">主要分项工程:</label></td>
+					<td class="width-35">
+						<form:input path="name" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">工程造价:</label></td>
+					<td class="width-35">
+						<form:input path="money" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">单位造价:</label></td>
+					<td class="width-35">
+						<form:input path="cost" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">占造价比例:</label></td>
+					<td class="width-35">
+						<form:input path="proportion" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 164 - 0
src/main/webapp/webpage/modules/exampleeconomics/exampleEconomicsList.jsp

@@ -0,0 +1,164 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>经济指标管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>经济指标列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="#">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="#">选项1</a>
+				</li>
+				<li><a href="#">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="exampleEconomics" action="${ctx}/exampleeconomics/exampleEconomics/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+			<span>概况id:</span>
+				<form:input path="exampleId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>项id:</span>
+				<form:input path="exampleindicesId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>指标id:</span>
+				<form:input path="indexId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+		 </div>	
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+			<shiro:hasPermission name="exampleeconomics:exampleEconomics:add">
+				<table:addRow url="${ctx}/exampleeconomics/exampleEconomics/form" title="经济指标"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleeconomics:exampleEconomics:edit">
+			    <table:editRow url="${ctx}/exampleeconomics/exampleEconomics/form" title="经济指标" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleeconomics:exampleEconomics:del">
+				<table:delRow url="${ctx}/exampleeconomics/exampleEconomics/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleeconomics:exampleEconomics:import">
+				<table:importExcel url="${ctx}/exampleeconomics/exampleEconomics/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleeconomics:exampleEconomics:export">
+	       		<table:exportExcel url="${ctx}/exampleeconomics/exampleEconomics/export"></table:exportExcel><!-- 导出按钮 -->
+	       	</shiro:hasPermission>
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		
+			</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th> <input type="checkbox" class="i-checks"></th>
+				<th  class="sort-column remarks">备注信息</th>
+				<th  class="sort-column exampleId">概况id</th>
+				<th  class="sort-column exampleindicesId">项id</th>
+				<th  class="sort-column indexId">指标id</th>
+				<th  class="sort-column unit">项单位</th>
+				<th  class="sort-column digits">位数</th>
+				<th  class="sort-column name">主要分项工程</th>
+				<th  class="sort-column money">工程造价</th>
+				<th  class="sort-column cost">单位造价</th>
+				<th  class="sort-column proportion">占造价比例</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="exampleEconomics">
+			<tr>
+				<td> <input type="checkbox" id="${exampleEconomics.id}" class="i-checks"></td>
+				<td><a  href="#" onclick="openDialogView('查看经济指标', '${ctx}/exampleeconomics/exampleEconomics/form?id=${exampleEconomics.id}','800px', '500px')">
+					${exampleEconomics.remarks}
+				</a></td>
+				<td>
+					${exampleEconomics.exampleId}
+				</td>
+				<td>
+					${exampleEconomics.exampleindicesId}
+				</td>
+				<td>
+					${exampleEconomics.indexId}
+				</td>
+				<td>
+					${exampleEconomics.unit}
+				</td>
+				<td>
+					${exampleEconomics.digits}
+				</td>
+				<td>
+					${exampleEconomics.name}
+				</td>
+				<td>
+					${exampleEconomics.money}
+				</td>
+				<td>
+					${exampleEconomics.cost}
+				</td>
+				<td>
+					${exampleEconomics.proportion}
+				</td>
+				<td>
+					<shiro:hasPermission name="exampleeconomics:exampleEconomics:view">
+						<a href="#" onclick="openDialogView('查看经济指标', '${ctx}/exampleeconomics/exampleEconomics/form?id=${exampleEconomics.id}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="exampleeconomics:exampleEconomics:edit">
+    					<a href="#" onclick="openDialog('修改经济指标', '${ctx}/exampleeconomics/exampleEconomics/form?id=${exampleEconomics.id}','800px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+    				<shiro:hasPermission name="exampleeconomics:exampleEconomics:del">
+						<a href="${ctx}/exampleeconomics/exampleEconomics/delete?id=${exampleEconomics.id}" onclick="return confirmx('确认要删除该经济指标吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+					</shiro:hasPermission>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 97 - 0
src/main/webapp/webpage/modules/exampleexpend/exampleExpendForm.jsp

@@ -0,0 +1,97 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>主要工料价格及消耗量指标管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			
+		});
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="exampleExpend" action="${ctx}/exampleexpend/exampleExpend/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>	
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+					<td class="width-35">
+						<form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">概况id:</label></td>
+					<td class="width-35">
+						<form:input path="exampleId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">项id:</label></td>
+					<td class="width-35">
+						<form:input path="exampleindicesId" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">指标id:</label></td>
+					<td class="width-35">
+						<form:input path="indexId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">单位:</label></td>
+					<td class="width-35">
+						<form:input path="unit" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">位数:</label></td>
+					<td class="width-35">
+						<form:input path="digits" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">工料名称:</label></td>
+					<td class="width-35">
+						<form:input path="name" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">数量:</label></td>
+					<td class="width-35">
+						<form:input path="count" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">单价:</label></td>
+					<td class="width-35">
+						<form:input path="price" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">单位指标:</label></td>
+					<td class="width-35">
+						<form:input path="quota" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 164 - 0
src/main/webapp/webpage/modules/exampleexpend/exampleExpendList.jsp

@@ -0,0 +1,164 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>主要工料价格及消耗量指标管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>主要工料价格及消耗量指标列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="#">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="#">选项1</a>
+				</li>
+				<li><a href="#">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="exampleExpend" action="${ctx}/exampleexpend/exampleExpend/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+			<span>概况id:</span>
+				<form:input path="exampleId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>项id:</span>
+				<form:input path="exampleindicesId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>指标id:</span>
+				<form:input path="indexId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+		 </div>	
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+			<shiro:hasPermission name="exampleexpend:exampleExpend:add">
+				<table:addRow url="${ctx}/exampleexpend/exampleExpend/form" title="主要工料价格及消耗量指标"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleexpend:exampleExpend:edit">
+			    <table:editRow url="${ctx}/exampleexpend/exampleExpend/form" title="主要工料价格及消耗量指标" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleexpend:exampleExpend:del">
+				<table:delRow url="${ctx}/exampleexpend/exampleExpend/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleexpend:exampleExpend:import">
+				<table:importExcel url="${ctx}/exampleexpend/exampleExpend/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleexpend:exampleExpend:export">
+	       		<table:exportExcel url="${ctx}/exampleexpend/exampleExpend/export"></table:exportExcel><!-- 导出按钮 -->
+	       	</shiro:hasPermission>
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		
+			</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th> <input type="checkbox" class="i-checks"></th>
+				<th  class="sort-column remarks">备注信息</th>
+				<th  class="sort-column exampleId">概况id</th>
+				<th  class="sort-column exampleindicesId">项id</th>
+				<th  class="sort-column indexId">指标id</th>
+				<th  class="sort-column unit">单位</th>
+				<th  class="sort-column digits">位数</th>
+				<th  class="sort-column name">工料名称</th>
+				<th  class="sort-column count">数量</th>
+				<th  class="sort-column price">单价</th>
+				<th  class="sort-column quota">单位指标</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="exampleExpend">
+			<tr>
+				<td> <input type="checkbox" id="${exampleExpend.id}" class="i-checks"></td>
+				<td><a  href="#" onclick="openDialogView('查看主要工料价格及消耗量指标', '${ctx}/exampleexpend/exampleExpend/form?id=${exampleExpend.id}','800px', '500px')">
+					${exampleExpend.remarks}
+				</a></td>
+				<td>
+					${exampleExpend.exampleId}
+				</td>
+				<td>
+					${exampleExpend.exampleindicesId}
+				</td>
+				<td>
+					${exampleExpend.indexId}
+				</td>
+				<td>
+					${exampleExpend.unit}
+				</td>
+				<td>
+					${exampleExpend.digits}
+				</td>
+				<td>
+					${exampleExpend.name}
+				</td>
+				<td>
+					${exampleExpend.count}
+				</td>
+				<td>
+					${exampleExpend.price}
+				</td>
+				<td>
+					${exampleExpend.quota}
+				</td>
+				<td>
+					<shiro:hasPermission name="exampleexpend:exampleExpend:view">
+						<a href="#" onclick="openDialogView('查看主要工料价格及消耗量指标', '${ctx}/exampleexpend/exampleExpend/form?id=${exampleExpend.id}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="exampleexpend:exampleExpend:edit">
+    					<a href="#" onclick="openDialog('修改主要工料价格及消耗量指标', '${ctx}/exampleexpend/exampleExpend/form?id=${exampleExpend.id}','800px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+    				<shiro:hasPermission name="exampleexpend:exampleExpend:del">
+						<a href="${ctx}/exampleexpend/exampleExpend/delete?id=${exampleExpend.id}" onclick="return confirmx('确认要删除该主要工料价格及消耗量指标吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+					</shiro:hasPermission>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 95 - 0
src/main/webapp/webpage/modules/exampleproject/exampleProjectForm.jsp

@@ -0,0 +1,95 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>主要工程量指标管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			
+		});
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="exampleProject" action="${ctx}/exampleproject/exampleProject/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>	
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+					<td class="width-35">
+						<form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">概况id:</label></td>
+					<td class="width-35">
+						<form:input path="exampleId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">项id:</label></td>
+					<td class="width-35">
+						<form:input path="exampleindicesId" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">指标id:</label></td>
+					<td class="width-35">
+						<form:input path="indexId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">单位:</label></td>
+					<td class="width-35">
+						<form:input path="unit" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">位数:</label></td>
+					<td class="width-35">
+						<form:input path="digits" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">工料名称:</label></td>
+					<td class="width-35">
+						<form:input path="name" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">数量:</label></td>
+					<td class="width-35">
+						<form:input path="count" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">单位指标:</label></td>
+					<td class="width-35">
+						<form:input path="quota" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"></td>
+		   			<td class="width-35" ></td>
+		  		</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 160 - 0
src/main/webapp/webpage/modules/exampleproject/exampleProjectList.jsp

@@ -0,0 +1,160 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>主要工程量指标管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>主要工程量指标列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="#">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="#">选项1</a>
+				</li>
+				<li><a href="#">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="exampleProject" action="${ctx}/exampleproject/exampleProject/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+			<span>概况id:</span>
+				<form:input path="exampleId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>项id:</span>
+				<form:input path="exampleindicesId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>指标id:</span>
+				<form:input path="indexId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+		 </div>	
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+			<shiro:hasPermission name="exampleproject:exampleProject:add">
+				<table:addRow url="${ctx}/exampleproject/exampleProject/form" title="主要工程量指标"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleproject:exampleProject:edit">
+			    <table:editRow url="${ctx}/exampleproject/exampleProject/form" title="主要工程量指标" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleproject:exampleProject:del">
+				<table:delRow url="${ctx}/exampleproject/exampleProject/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleproject:exampleProject:import">
+				<table:importExcel url="${ctx}/exampleproject/exampleProject/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="exampleproject:exampleProject:export">
+	       		<table:exportExcel url="${ctx}/exampleproject/exampleProject/export"></table:exportExcel><!-- 导出按钮 -->
+	       	</shiro:hasPermission>
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		
+			</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th> <input type="checkbox" class="i-checks"></th>
+				<th  class="sort-column remarks">备注信息</th>
+				<th  class="sort-column exampleId">概况id</th>
+				<th  class="sort-column exampleindicesId">项id</th>
+				<th  class="sort-column indexId">指标id</th>
+				<th  class="sort-column unit">单位</th>
+				<th  class="sort-column digits">位数</th>
+				<th  class="sort-column name">工料名称</th>
+				<th  class="sort-column count">数量</th>
+				<th  class="sort-column quota">单位指标</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="exampleProject">
+			<tr>
+				<td> <input type="checkbox" id="${exampleProject.id}" class="i-checks"></td>
+				<td><a  href="#" onclick="openDialogView('查看主要工程量指标', '${ctx}/exampleproject/exampleProject/form?id=${exampleProject.id}','800px', '500px')">
+					${exampleProject.remarks}
+				</a></td>
+				<td>
+					${exampleProject.exampleId}
+				</td>
+				<td>
+					${exampleProject.exampleindicesId}
+				</td>
+				<td>
+					${exampleProject.indexId}
+				</td>
+				<td>
+					${exampleProject.unit}
+				</td>
+				<td>
+					${exampleProject.digits}
+				</td>
+				<td>
+					${exampleProject.name}
+				</td>
+				<td>
+					${exampleProject.count}
+				</td>
+				<td>
+					${exampleProject.quota}
+				</td>
+				<td>
+					<shiro:hasPermission name="exampleproject:exampleProject:view">
+						<a href="#" onclick="openDialogView('查看主要工程量指标', '${ctx}/exampleproject/exampleProject/form?id=${exampleProject.id}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="exampleproject:exampleProject:edit">
+    					<a href="#" onclick="openDialog('修改主要工程量指标', '${ctx}/exampleproject/exampleProject/form?id=${exampleProject.id}','800px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+    				<shiro:hasPermission name="exampleproject:exampleProject:del">
+						<a href="${ctx}/exampleproject/exampleProject/delete?id=${exampleProject.id}" onclick="return confirmx('确认要删除该主要工程量指标吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+					</shiro:hasPermission>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 97 - 0
src/main/webapp/webpage/modules/examplesingle/exampleSingleForm.jsp

@@ -0,0 +1,97 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>单项工程造价指标管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			
+		});
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="exampleSingle" action="${ctx}/examplesingle/exampleSingle/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>	
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+					<td class="width-35">
+						<form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">概况id:</label></td>
+					<td class="width-35">
+						<form:input path="exampleId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">项id:</label></td>
+					<td class="width-35">
+						<form:input path="exampleIndicesId" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">指标id:</label></td>
+					<td class="width-35">
+						<form:input path="indexId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">项单位:</label></td>
+					<td class="width-35">
+						<form:input path="unit" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">位数:</label></td>
+					<td class="width-35">
+						<form:input path="digits" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">费用名称:</label></td>
+					<td class="width-35">
+						<form:input path="name" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">金额:</label></td>
+					<td class="width-35">
+						<form:input path="money" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">单位造价:</label></td>
+					<td class="width-35">
+						<form:input path="cost" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">占造价比例:</label></td>
+					<td class="width-35">
+						<form:input path="proportion" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 164 - 0
src/main/webapp/webpage/modules/examplesingle/exampleSingleList.jsp

@@ -0,0 +1,164 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>单项工程造价指标管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>单项工程造价指标列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="#">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="#">选项1</a>
+				</li>
+				<li><a href="#">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="exampleSingle" action="${ctx}/examplesingle/exampleSingle/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+			<span>概况id:</span>
+				<form:input path="exampleId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>项id:</span>
+				<form:input path="exampleIndicesId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>指标id:</span>
+				<form:input path="indexId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+		 </div>	
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+			<shiro:hasPermission name="examplesingle:exampleSingle:add">
+				<table:addRow url="${ctx}/examplesingle/exampleSingle/form" title="单项工程造价指标"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="examplesingle:exampleSingle:edit">
+			    <table:editRow url="${ctx}/examplesingle/exampleSingle/form" title="单项工程造价指标" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="examplesingle:exampleSingle:del">
+				<table:delRow url="${ctx}/examplesingle/exampleSingle/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="examplesingle:exampleSingle:import">
+				<table:importExcel url="${ctx}/examplesingle/exampleSingle/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="examplesingle:exampleSingle:export">
+	       		<table:exportExcel url="${ctx}/examplesingle/exampleSingle/export"></table:exportExcel><!-- 导出按钮 -->
+	       	</shiro:hasPermission>
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		
+			</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th> <input type="checkbox" class="i-checks"></th>
+				<th  class="sort-column remarks">备注信息</th>
+				<th  class="sort-column exampleId">概况id</th>
+				<th  class="sort-column exampleIndicesId">项id</th>
+				<th  class="sort-column indexId">指标id</th>
+				<th  class="sort-column unit">项单位</th>
+				<th  class="sort-column digits">位数</th>
+				<th  class="sort-column name">费用名称</th>
+				<th  class="sort-column money">金额</th>
+				<th  class="sort-column cost">单位造价</th>
+				<th  class="sort-column proportion">占造价比例</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="exampleSingle">
+			<tr>
+				<td> <input type="checkbox" id="${exampleSingle.id}" class="i-checks"></td>
+				<td><a  href="#" onclick="openDialogView('查看单项工程造价指标', '${ctx}/examplesingle/exampleSingle/form?id=${exampleSingle.id}','800px', '500px')">
+					${exampleSingle.remarks}
+				</a></td>
+				<td>
+					${exampleSingle.exampleId}
+				</td>
+				<td>
+					${exampleSingle.exampleIndicesId}
+				</td>
+				<td>
+					${exampleSingle.indexId}
+				</td>
+				<td>
+					${exampleSingle.unit}
+				</td>
+				<td>
+					${exampleSingle.digits}
+				</td>
+				<td>
+					${exampleSingle.name}
+				</td>
+				<td>
+					${exampleSingle.money}
+				</td>
+				<td>
+					${exampleSingle.cost}
+				</td>
+				<td>
+					${exampleSingle.proportion}
+				</td>
+				<td>
+					<shiro:hasPermission name="examplesingle:exampleSingle:view">
+						<a href="#" onclick="openDialogView('查看单项工程造价指标', '${ctx}/examplesingle/exampleSingle/form?id=${exampleSingle.id}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="examplesingle:exampleSingle:edit">
+    					<a href="#" onclick="openDialog('修改单项工程造价指标', '${ctx}/examplesingle/exampleSingle/form?id=${exampleSingle.id}','800px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+    				<shiro:hasPermission name="examplesingle:exampleSingle:del">
+						<a href="${ctx}/examplesingle/exampleSingle/delete?id=${exampleSingle.id}" onclick="return confirmx('确认要删除该单项工程造价指标吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+					</shiro:hasPermission>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 171 - 0
src/main/webapp/webpage/modules/goout/goOutAudit.jsp

@@ -0,0 +1,171 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>出差流程管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+              if(obj == 1){
+                  $('#flag').val('yes');
+              }else{
+                  $('#flag').val('no');
+              }
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		
+		$('#btnPresent').click(function () { 
+
+			$.ajax({
+	             url:"${ctx}/goout/goOut/present",
+	             data:$('#loginForm').serialize(),
+	             type:"post",
+	             success:function(data){
+	        
+	             }					
+		});
+		});	
+			
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+
+            $('input,textarea,select').attr('disabled',<%=request.getAttribute("disabled")%>);
+            if (${requestScope.disabled eq 'false'}) {
+                $("#startTime").attr('disabled',true);
+                $("#endTime").attr('disabled',true);
+                $("#gooutReason").attr('disabled',true);
+            }
+		});
+	</script>
+</head>
+
+<body class="gray-bg">
+
+  <div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>外出详情</h5>
+	</div>
+		<div class="ibox-content">
+		<form:form id="inputForm" modelAttribute="goOut" action="${ctx}/goout/goOut/saveAudit" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+			<form:hidden path="home"/>
+		<form:hidden path="act.taskId"/>
+		<form:hidden path="act.taskName"/>
+		<form:hidden path="act.taskDefKey"/>
+		<form:hidden path="act.procInsId"/>
+		<form:hidden path="act.procDefId"/>
+		<form:hidden id="flag" path="act.flag"/>
+		<sys:message content="${message}"/>
+			<c:set var="status" value="${goOut.act.status}" />
+			<div class="control-group">
+			<label class="control-label">开始时间:</label>
+			<div class="controls" style="margin-top: 8px">
+				<c:choose>
+					<c:when test="${!disabled}">
+						<input id="startTime" name="startTime" type="text" disabled="true" maxlength="20" class="laydate-icon form-control layer-date required"
+							   value="${goOut.startTime}"/></c:when>
+					<c:otherwise>
+						${goOut.startTime}
+					</c:otherwise>
+				</c:choose>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">结束时间:</label>
+			<div class="controls" style="margin-top: 8px">
+				<c:choose>
+					<c:when test="${!disabled}">
+						<input id="endTime" name="endTime" type="text" disabled="true" maxlength="20" class="laydate-icon form-control layer-date required"
+							   value="${goOut.endTime}"/></c:when>
+					<c:otherwise>
+						${goOut.endTime}
+					</c:otherwise>
+				</c:choose>
+			</div>
+		</div>
+            <div class="control-group">
+                <label class="control-label">外出事由:</label>
+                <div class="controls" style="margin-top: 8px">
+                   <c:choose>
+						<c:when test="${!disabled}">
+							<form:textarea id="gooutReason" path="gooutReason" readonly="readonly" class="form-control required" rows="3" maxlength="20"/>
+						</c:when>
+						<c:otherwise>
+							${goOut.gooutReason}
+						</c:otherwise>
+					</c:choose>
+                </div>
+            </div>
+			<div class="control-group">
+				<label class="control-label">图片:</label>
+				<div class="controls">
+					<table style="text-align: center;width: 100%;margin-top:10px;" class="table table-striped table-bordered table-condensed" >
+						<tr>
+							<%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
+						</tr>
+						<c:if test="${not empty goOut.workattachmentList}">
+							<c:forEach items="${goOut.workattachmentList}" var="attachment" varStatus="varStatus">
+								<tr>
+									<%--<td>${varStatus.index+1}</td>--%>
+									<c:if test="${fn:containsIgnoreCase(attachment.attachmentName,'jpg')
+												   or fn:containsIgnoreCase(attachment.attachmentName,'png')
+												   or fn:containsIgnoreCase(attachment.attachmentName,'gif')
+												   or fn:containsIgnoreCase(attachment.attachmentName,'jpeg')}">
+										<td><img src="${attachment.url}" onclick="openDialogView(' ','${ctx}/sys/picturepreview/picturePreview?url=${attachment.url}','860px','600px')" width="50" height="50" alt="${attachment.attachmentName}"/></td>
+									</c:if>
+									<td>${fns:getUserById(attachment.attachmentUser).name}</td>
+									<td><fmt:formatDate value="${attachment.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+										<td>
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${attachment.url}');" class="btn btn-success btn-xs">下载</a>
+											<%--<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${attachment.url}" class="btn btn-success btn-xs">下载</a>
+										--%></td>
+								</tr>
+							</c:forEach>
+						</c:if>
+					</table>
+				</div>
+			</div>
+			<c:if test="${not empty status}">
+				<div class="control-group">
+					<label class="control-label">审批意见:</label>
+					<div class="controls">
+						<form:textarea path="act.comment" class="form-control" rows="3" maxlength="127"/>
+					</div>
+				</div>
+				<%--<div class="form-actions">
+				<c:if test="${goOut.act.taskDefKey ne 'apply_end'}">
+						<input id="btnSubmit" class="btn btn-primary" type="submit" value="同 意" onclick="$('#flag').val('yes')"/>&nbsp;
+						<input id="btnSubmit" class="btn btn-inverse" type="submit" value="驳 回" onclick="$('#flag').val('no')"/>&nbsp;
+					</c:if>
+				<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+				</div>--%>
+			</c:if>
+			<act:flowChart procInsId="${goOut.act.procInsId}"/>
+			<act:histoicFlow procInsId="${goOut.act.procInsId}"/>
+	</form:form>
+	</div>
+	</div>
+	</div>
+</body>
+</html>

+ 268 - 0
src/main/webapp/webpage/modules/goout/goOutForm.jsp

@@ -0,0 +1,268 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>加班申请</title>
+	<meta name="decorator" content="default"/>
+	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+	<style type="text/css">
+		img{width: 50px;height: 50px;}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            $("#name").focus();
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    var len = $("#showPeo span").length;
+                    if(len<=0){
+                        parent.layer.msg("请选择审批人!",{icon:5});
+                        return false;
+                    }
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+			//只做查看时,禁用掉以下标签
+            if('${sessionScope.state}' =='disabled'){
+                $('input,textarea,select').attr('disabled','<%=session.getAttribute("state")%>');
+            }else if('${sessionScope.state}' !='disabled'){
+                $('input,textarea,select').removeAttr('disabled');
+            }
+        });
+        function selectPeople(objId,objName){
+            var showPeo = $("#showPeo").html();
+            var len = $("#showPeo span").length;
+            if(len > 4){
+                parent.layer.msg("最多添加5个审批人",{icon:5})
+                return;
+            }
+            var arr = [];
+            var a = $("#showPeo span").each(function(){
+                var dataId = $(this).attr("data-id");
+                arr.push(dataId)
+            })
+            if(arr.indexOf(objId) != -1){
+                parent.layer.msg("该审批人已被选择,不能重复选择!!!",{icon:5})
+                return ;
+            }
+            showPeo = showPeo + '<span class="badge badge-success fontSpan" data-id="'+objId+'">'+objName+'&nbsp;&nbsp;&nbsp;' +
+                '<i onclick=deletePeo(this) class="fa fa-close"></i><input type="hidden" name=adds['+len+'] value="'+objId+'"></span>';
+            $("#showPeo").html(showPeo)
+        }
+        //删除选择的人员
+        function deletePeo(obj){
+            $(obj).parent().remove()
+        }
+	</script>
+	<script type="text/javascript">
+        //上传图片
+        function this_upload_image_button(index){
+            var length = $("#this_upload_image_div :file").length;
+            var this_item_id = 'this_upload_image_'+index;
+            var last_item_id = $('img[id^=this_upload_image_]:last').attr('id');
+            if(length==6 && this_item_id==last_item_id){
+                top.layer.alert('最多上传5张图片',{icon:0,title:'系统提示'});
+                return;
+            }
+            $("#this_upload_file_"+index).click();
+        }
+        function this_upload_show_image(index){
+            var obj =$("#this_upload_file_"+index)[0].files[0];
+            var fileType = obj.type;
+            var url ;
+            if(fileType.endsWith("png")||fileType.endsWith("bmp")||fileType.endsWith("jpg")||fileType.endsWith("jpeg")){
+                url = window.URL.createObjectURL(obj);
+            }else {
+                //需要置空
+                var file = $("#this_upload_file_"+index);
+                file.after(file.clone().val(""));
+                file.remove();
+                top.layer.alert('请上传*.png,*.bmp,*.jpg/jpeg格式的图片',{icon:0,title:'系统提示'});
+                return false ;
+            }
+            $("#this_upload_image_"+index).attr("src",url);
+            var length = $("#this_upload_image_div :file").length;
+            var this_item_id = 'this_upload_image_'+index;
+            var last_item_id = $('img[id^=this_upload_image_]:last').attr('id');
+            if( this_item_id==last_item_id &&  length < 6 ){
+                this_upload_image_append(index);
+                this_add_x(index);
+            }
+        }
+        function this_upload_image_append(index){
+            var div1 = "<div id='this_upload_div_"+(index+1)+"' style='float:left;position:relative;width: 57px;height: 57px;'>";
+            var img = '<img  id="this_upload_image_'+(index+1)+'" class="upload_ico" width="50px" height="50px"  onclick="this_upload_image_button('+(index+1)+')" src = "${pageContext.request.contextPath}/static/uploadify/upload_ico.png" style="cursor:pointer;"/>';
+            var input = '<input id="this_upload_file_'+(index+1)+'" type="file" style="display:none;" name="this_upload_files" onChange="this_upload_show_image('+(index+1)+')" /><br>';
+            var div2 = "</div>";
+
+            $("#this_upload_image_div").append(div1+img+input+div2);
+        }
+        function this_close_img(index) {
+            $("#this_upload_div_"+index).remove();
+            var length = $("#this_upload_image_div :file").length;
+            if(length == 0){
+                this_add_div();
+            }else if(length == 1){
+                var x = $("#this_upload_image_div").find("span").text();
+                if("x" != x){
+                    this_add_div();
+                }
+            }
+        }
+        function this_add_x(index) {
+            var span = '<span id="this_upload_close_'+index+'" class="close_ico" style="cursor:pointer; position: absolute;top:-1px;right: -1px; display:inline-block;z-index:1;color: red;" onclick="this_close_img('+index+');">x</span>';
+            $("#this_upload_image_div").find("img:eq(-2)").before(span);
+        }
+        function this_add_div() {
+            var this_upload_div_1 =
+                '<div id="this_upload_div_1" style="float: left;position:relative;width: 57px;height: 57px;" >'+
+                '<img  id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/uploadify/upload_ico.png"  onclick="this_upload_image_button(1)"/>'+
+                '<input id="this_upload_file_1" type="file" style="display:none"  name="this_upload_files"  onchange="this_upload_show_image(1)" /><br>'+
+                '</div>';
+            $("#this_upload_image_div").html("").append(this_upload_div_1);
+        }
+
+
+	</script>
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+	<div class="ibox">
+		<c:if test="${sessionScope.state!='disabled'}">
+		<div class="ibox-title" style="height: 70px;">
+			<h5>
+				<ul class="nav nav-tabs">
+					<li><a href="${ctx}/goout/goOut/list">外出信息</a></li>
+					<li><a href="${ctx}/goout/goOut/goOutTodoList">待办任务</a></li>
+					<li><a href="${ctx}/goout/goOut/goOutHistoricList">已办任务</a></li>
+					<shiro:hasPermission name="goout:goOut:edit"><li class="active"><a href="${ctx}/goout/goOut/form?ids=0">外出申请</a></li></shiro:hasPermission>
+				</ul>
+			</h5>
+			<%--<div class="ibox-tools">
+				<a class="collapse-link">
+					<i class="fa fa-chevron-up"></i>
+				</a>
+				<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+					<i class="fa fa-wrench"></i>
+				</a>
+				<ul class="dropdown-menu dropdown-user">
+					<li><a href="javascript:void(0)">选项1</a>
+					</li>
+					<li><a href="javascript:void(0)">选项2</a>
+					</li>
+				</ul>
+				<a class="close-link">
+					<i class="fa fa-times"></i>
+				</a>
+			</div>--%>
+		</div>
+		</c:if>
+		<div class="ibox-content">
+			<form:form id="inputForm" modelAttribute="goOut" action="${ctx}/goout/goOut/save" enctype="multipart/form-data" method="post" class="form-horizontal">
+				<form:hidden path="id"/>
+				<c:set var="id" value="${goOut.id}" />
+				<c:set var="ids" value="${goOut.ids}" />
+				<sys:message content="${message}"/>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>开始时间:</label>
+					<div class="controls">
+						<input class="form-control layer-date laydate-icon required" id="startTime" name="startTime" readonly="readonly" value="<fmt:formatDate value="${goOut.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>结束时间:</label>
+					<div class="controls">
+						<input class="form-control layer-date laydate-icon required" id="endTime" name="endTime" readonly="readonly" value="<fmt:formatDate value="${goOut.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>外出天数:</label>
+					<div class="controls">
+						<input id="gooutDay" name="gooutDay" type="text" class="form-control required" value="${goOut.gooutDay}"/>
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>外出时长:</label>
+					<div class="controls">
+						<input id="gooutTime" name="gooutTime" type="text" class="form-control required" value="${goOut.gooutTime}"/>
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>外出事由:</label>
+					<div class="controls">
+						<form:textarea path="gooutReason" class="form-control required" rows="3" maxlength="20"/>
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label">图片:</label>
+					<div class="controls">
+						<span id="this_upload_msg">请上传*.png,*.bmp,*.jpg/jpeg格式的图片</span><br>
+						<div id="this_upload_image_div">
+							<div id="this_upload_div_1" style="float: left;position:relative;width: 57px;height: 57px;">
+								<img alt="_blank" id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/uploadify/upload_ico.png"  onclick="this_upload_image_button(1)"/>
+								<input id="this_upload_file_1" type="file" style="display:none"  name="this_upload_files"  onchange="this_upload_show_image(1)"  class="form-control required"/><br>
+							</div>
+						</div>
+
+
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<c:if test="${empty id}">
+					<div class="control-group">
+						<label class="control-label">抄送人:</label>
+						<div id="CCId" class="controls">
+							<sys:treeselect id="CCId" name="CCId" value="${goOut.CCId}" labelName="idNames" labelValue="${goOut.idNames}"
+											title="用户" url="/sys/office/treeDataAll?type=3&isAll=false" cssClass="form-control" allowClear="true" checked="true" notAllowSelectParent="true"/>
+							<span class="help-inline"></span>
+						</div>
+					</div>
+					<div class="control-group">
+						<label class="control-label"><font color="red">*</font>审批人:</label>
+						<div id="addida" class="controls">
+							<sys:treeselectleave id="ida" name="ida" value="${goOut.ida}" labelName="idNamea" labelValue="${goOut.idNamea}"
+											title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required" allowClear="true" notAllowSelectParent="true"/>
+							<span class="help-inline"></span>
+						</div>
+						<div id="showPeo" class="controls">
+						</div>
+					</div>
+					<c:if test="${not empty ids}">
+						<div class="form-actions">
+							<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+							<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+						</div>
+					</c:if>
+				</c:if>
+
+			</form:form>
+		</div>
+	</div>
+</div>
+<%
+	session.removeAttribute("state");
+%>
+</body>
+</html>
+

+ 109 - 0
src/main/webapp/webpage/modules/goout/goOutHistoricList.jsp

@@ -0,0 +1,109 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>已审核请假信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+	<div class="ibox">
+		<div class="ibox-title" style="height: 70px;">
+			<h5>
+				<ul class="nav nav-tabs">
+					<li><a href="${ctx}/goout/goOut/list">外出信息</a></li>
+					<li><a href="${ctx}/goout/goOut/goOutTodoList">待办任务</a></li>
+					<li class="active"><a href="${ctx}/goout/goOut/goOutHistoricList">已办任务</a></li>
+					<shiro:hasPermission name="goout:goOut:edit"><li><a href="${ctx}/goout/goOut/form?ids=0">外出申请</a></li></shiro:hasPermission>
+				</ul>
+			</h5>
+			<%--<div class="ibox-tools">
+				<a class="collapse-link">
+					<i class="fa fa-chevron-up"></i>
+				</a>
+				<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+					<i class="fa fa-wrench"></i>
+				</a>
+
+			</div>--%>
+		</div>
+
+		<div class="ibox-content">
+			<sys:message content="${message}"/>
+			<!--查询条件-->
+			<div class="row">
+				<div class="col-sm-12">
+					<form:form id="searchForm" modelAttribute="act" action="${ctx}/goout/goOut/goOutHistoricList" method="get" class="form-inline">
+						<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+						<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+						<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+						<div class="form-group">
+							<label>创建时间:</label>
+							<input class="form-control layer-date laydate-icon required" id="beginDate" name="beginDate" readonly="readonly" value="<fmt:formatDate value="${act.beginDate}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+							 -- 
+							<input class="form-control layer-date laydate-icon required" id="endDate" name="endDate" readonly="readonly" value="<fmt:formatDate value="${act.endDate}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+						</div>
+					</form:form>
+					<br/>
+				</div>
+			</div>
+			<!-- 工具栏 -->
+			<div class="row">
+				<div class="col-sm-12">
+					<div class="pull-left">
+						<button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+					</div>
+					<div class="pull-right">
+						<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+						<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+					</div>
+				</div>
+			</div>
+			<!-- 表格 -->
+			<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+				<thead>
+				<tr>
+					<th style="text-align: center;">流程发起人</th>
+					<th style="text-align: center;">流程名称</th>
+					<th style="text-align: center;">流程版本</th>
+					<th style="text-align: center;">开始时间</th>
+					<th style="text-align: center;">结束时间</th>
+					<th style="text-align: center;">外出天数</th>
+					<th style="text-align: center;">外出时长</th>
+					<th style="text-align: center;">外出原因</th>
+					<th style="text-align: center;">创建时间</th>
+					<%--<th style="text-align: center;">操作</th>--%>
+				</tr>
+				</thead>
+				<tbody>
+				<c:forEach items="${list}" var="goOut">
+					<c:set var="task" value="${goOut.act.task}" />
+					<c:set var="vars" value="${goOut.act.vars}" />
+					<c:set var="procDef" value="${goOut.act.procDef}" /><%--
+				<c:set var="procExecUrl" value="${act.procExecUrl}" /> --%>
+					<c:set var="status" value="${agoOut.ct.status}" />
+					<tr>
+						<td>${goOut.act.vars.map.applyUserId}</td>
+						<td>${procDef.name}</td>
+						<td><b title='流程版本号'>V: ${procDef.version}</b></td>
+						<td>${goOut.startTime}</td>
+						<td>${goOut.endTime}</td>
+						<td>${goOut.gooutDay}</td>
+						<td>${goOut.gooutTime}</td>
+						<td><%--${goOut.gooutReason}--%>
+							<span title="${goOut.gooutReason}">${fns:abbr(goOut.gooutReason, 30)}</span></td>
+						<td><fmt:formatDate value="${goOut.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+					</tr>
+				</c:forEach>
+				</tbody>
+			</table>
+			<!-- 分页代码 -->
+			<table:page page="${page}"></table:page>
+			<br/>
+			<br/>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 222 - 0
src/main/webapp/webpage/modules/goout/goOutList.jsp

@@ -0,0 +1,222 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>外出一览</title>
+	<meta name="decorator" content="default"/>
+	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+	<script type="text/javascript">
+        function page(n,s){
+            location = '${ctx}/goout/goOut/list/?pageNo='+n+'&pageSize='+s;
+        }
+        function openDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['同意','驳回','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn3: function(index){
+                }
+            });
+        }
+	</script>
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+	<div class="ibox">
+		<div class="ibox-title" style="height: 70px;">
+			<h5>
+				<ul class="nav nav-tabs">
+					<li class="active"><a href="${ctx}/goout/goOut/list">外出信息</a></li>
+					<li><a href="${ctx}/goout/goOut/goOutTodoList">待办任务</a></li>
+					<li><a href="${ctx}/goout/goOut/goOutHistoricList">已办任务</a></li>
+					<shiro:hasPermission name="goout:goOut:edit"><li><a href="${ctx}/goout/goOut/form?ids=0">外出申请</a></li></shiro:hasPermission>
+				</ul>
+			</h5>
+			<%--<div class="ibox-tools">
+				<a class="collapse-link">
+					<i class="fa fa-chevron-up"></i>
+				</a>
+				<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+					<i class="fa fa-wrench"></i>
+				</a>
+
+			</div>--%>
+		</div>
+
+		<div class="ibox-content">
+			<sys:message content="${message}"/>
+			<!--查询条件-->
+			<div class="row">
+				<div class="col-sm-12">
+					<form:form id="searchForm" modelAttribute="goOut" action="${ctx}/goout/goOut/list" method="get" class="form-inline">
+						<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+						<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+						<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+						<a href="#" id="moresee" class="fa fa-chevron-down" style="float: right;">更多</a>
+						<div class="form-group">
+							<label>创建时间:</label>
+							<input class="form-control layer-date laydate-icon required" id="createDateStart" name="createDateStart" readonly="readonly" value="<fmt:formatDate value="${goOut.createDateStart}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+							 -- 
+							<input class="form-control layer-date laydate-icon required" id="createDateEnd" name="createDateEnd" readonly="readonly" value="<fmt:formatDate value="${goOut.createDateEnd}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+							&nbsp;&nbsp;
+							<label>审核状态:</label>
+							<form:select path="status"  class="form-control m-b">
+								<form:option value="" label=""/>
+								<form:options items="${fns:getDictList('act_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+						</div>
+					</form:form>
+					<br/>
+				</div>
+			</div>
+
+			<!-- 工具栏 -->
+			<div class="row">
+				<div class="col-sm-12">
+					<div class="pull-left">
+<%--
+						<shiro:hasPermission name="goout:goOut:add">
+							<table:addRow url="${ctx}/goout/goOut/form" title="出差信息"></table:addRow><!-- 增加按钮 -->
+						</shiro:hasPermission>
+						<shiro:hasPermission name="goout:goOut:edit">
+							<table:editRow url="${ctx}/goout/goOut/form" title="出差信息" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+						</shiro:hasPermission>
+--%>
+
+						<shiro:hasPermission name="goout:goOut:import">
+							<table:importExcel url="${ctx}/goout/goOut/import"></table:importExcel><!-- 导入按钮 -->
+						</shiro:hasPermission>
+						<shiro:hasPermission name="goout:goOut:export">
+							<table:exportExcel url="${ctx}/goout/goOut/export"></table:exportExcel><!-- 导出按钮 -->
+						</shiro:hasPermission>
+						<button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+					</div>
+					<div class="pull-right">
+						<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+						<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+					</div>
+				</div>
+			</div>
+			<!-- 表格 -->
+			<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+				<thead>
+				<tr>
+					<th style="text-align: center;"> 序号</th>
+					<th style="text-align: center;">创建人</th>
+					<th style="text-align: center;">开始时间</th>
+					<th style="text-align: center;">结束时间</th>
+					<th style="text-align: center;">外出天数</th>
+					<th style="text-align: center;">外出时长</th>
+					<th style="text-align: center;">外出原因</th>
+					<th style="text-align: center;">审批状态</th>
+					<th style="text-align: center;">创建时间</th>
+					<th style="text-align: center;">操作</th>
+				</tr>
+				</thead>
+				<tbody>
+				<tbody>
+				<c:forEach items="${page.list}" var="goOut" varStatus="status">
+					<c:set var="task" value="${goOut.task }" />
+					<c:set var="pi" value="${goOut.processInstance }" />
+					<c:set var="hpi" value="${goOut.historicProcessInstance }" />
+					<tr>
+						<td> ${status.index+1}</td>
+						<td>${goOut.createBy.name}</td>
+						<td>${goOut.startTime}</td>
+						<td>${goOut.endTime}</td>
+						<td>${goOut.gooutDay}</td>
+						<td>${goOut.gooutTime}</td>
+						<td><%--${goOut.gooutReason}--%>
+							<span title="${goOut.gooutReason}">${fns:abbr(goOut.gooutReason, 30)}</span>
+						</td>
+						<c:if test="${not empty task}">
+							<td>${fns:getDictLabel(goOut.status, 'act_status', '')}</td>
+							<td><fmt:formatDate value="${goOut.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+							<td>
+								<div style="text-align: center">
+								<shiro:hasPermission name="goout:goOut:view">
+									<a href="javascript:void(0)" onclick="openDialogView('详情', '${ctx}/goout/goOut/form?id=${goOut.id}&readAttr=disabled&name=view','80%','80%')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+								</shiro:hasPermission>&nbsp;&nbsp;
+								<c:if test="${goOut.createBy.id eq fns:getUser().id}">
+									<c:if test="${goOut.status!=3 && goOut.status!=4 && goOut.status!=5}">
+										<a href="${ctx}/goout/goOut/revoke?id=${goOut.id}&processInstanceId=${goOut.processInstanceId}&reason=${goOut.gooutReason}" onclick="return confirmx('确认要撤回该信息吗?', this.href)" class="btn btn-warning btn-xs"><i class="glyphicon glyphicon-share-alt"></i> 撤回</a>
+									</c:if>
+								</c:if>
+								<c:if test="${not empty task.assignee}">
+									<a href="javascript:void(0)" onclick="openDialogre('任务办理', '${ctx}/goout/goOut/applyOnGoOut?taskId=${task.id}&taskName=${fns:urlEncode(task.name)}&taskDefKey=${task.taskDefinitionKey}&procInsId=${task.processInstanceId}&procDefId=${task.processDefinitionId}&status=${status}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 任务办理</a>
+
+								<%--	<a href="${ctx}/goout/goOut/applyOnGoOut?taskId=${task.id}&taskName=${fns:urlEncode(task.name)}&taskDefKey=${task.taskDefinitionKey}&procInsId=${task.processInstanceId}&procDefId=${task.processDefinitionId}&status=1" class="btn btn-success btn-xs">任务办理</a>
+								--%></c:if>
+								</div>
+							</td>
+						</c:if>
+						<c:if test="${empty task}">
+							<td>${fns:getDictLabel(goOut.status, 'act_status', '')}</td>
+							<td><fmt:formatDate value="${goOut.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+							<td>
+								<div style="text-align: center">
+								<shiro:hasPermission name="goout:goOut:view">
+									<a href="javascript:void(0)" onclick="openDialogView('详情', '${ctx}/goout/goOut/form?id=${goOut.id}&readAttr=disabled&name=view','80%','80%')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+								</shiro:hasPermission>
+								<c:if test="${goOut.createBy.id eq fns:getUser().id}">
+									<c:if test="${goOut.status!=3 && goOut.status!=4 && goOut.status!=5}">
+										<a href="${ctx}/goout/goOut/revoke?id=${goOut.id}&processInstanceId=${goOut.processInstanceId}&reason=${goOut.gooutReason}" onclick="return confirmx('确认要撤回该信息吗?', this.href)" class="btn btn-warning btn-xs"><i class="glyphicon glyphicon-share-alt"></i> 撤回</a>
+									</c:if>
+								</c:if>
+								</div>
+							</td>
+						</c:if>
+					</tr>
+				</c:forEach>
+				</tbody>
+			</table>
+			<!-- 分页代码 -->
+			<table:page page="${page}"></table:page>
+			<br/>
+			<br/>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 178 - 0
src/main/webapp/webpage/modules/goout/goOutTodoList.jsp

@@ -0,0 +1,178 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>待审核请假信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+	<script type="text/javascript">
+        function page(n,s){
+            location = '${ctx}/goout/goOut/list/?pageNo='+n+'&pageSize='+s;
+        }
+        function openDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['同意','驳回','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn3: function(index){
+                }
+            });
+        }
+	</script>
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+	<div class="ibox">
+		<div class="ibox-title" style="height: 70px;">
+			<h5>
+				<ul class="nav nav-tabs">
+					<li><a href="${ctx}/goout/goOut/list">外出信息</a></li>
+					<li class="active"><a href="${ctx}/goout/goOut/goOutTodoList">待办任务</a></li>
+					<li><a href="${ctx}/goout/goOut/goOutHistoricList">已办任务</a></li>
+					<shiro:hasPermission name="goout:goOut:edit"><li><a href="${ctx}/goout/goOut/form?ids=0">外出申请</a></li></shiro:hasPermission>
+				</ul>
+			</h5>
+			<%--<div class="ibox-tools">
+				<a class="collapse-link">
+					<i class="fa fa-chevron-up"></i>
+				</a>
+				<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+					<i class="fa fa-wrench"></i>
+				</a>
+
+			</div>--%>
+		</div>
+
+		<div class="ibox-content">
+			<sys:message content="${message}"/>
+			<!--查询条件-->
+			<div class="row">
+				<div class="col-sm-12">
+					<form:form id="searchForm" modelAttribute="act" action="${ctx}/goout/goOut/goOutTodoList" method="get" class="form-inline">
+						<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+						<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+						<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+						<div class="form-group">
+							<label>创建时间:</label>
+							<input class="form-control layer-date laydate-icon required" id="beginDate" name="beginDate" readonly="readonly" value="<fmt:formatDate value="${act.beginDate}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+							 -- 
+							<input class="form-control layer-date laydate-icon required" id="endDate" name="endDate" readonly="readonly" value="<fmt:formatDate value="${act.endDate}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+						</div>
+					</form:form>
+					<br/>
+				</div>
+			</div>
+
+			<!-- 工具栏 -->
+			<div class="row">
+				<div class="col-sm-12">
+					<div class="pull-left">
+						<button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+					</div>
+					<div class="pull-right">
+						<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+						<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+					</div>
+				</div>
+			</div>
+			<!-- 表格 -->
+			<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+				<thead>
+				<tr>
+					<th>流程发起人</th>
+					<th>当前环节</th>
+					<th>流程名称</th>
+					<th>流程版本</th>
+					<th>开始时间</th>
+					<th>结束时间</th>
+					<th>外出天数</th>
+					<th>外出时长</th>
+					<th>外出原因</th>
+					<th>创建时间</th>
+					<th>操作</th>
+				</tr>
+				</thead>
+				<tbody>
+				<c:forEach items="${list}" var="goOut">
+					<c:set var="task" value="${goOut.act.task}" />
+					<c:set var="vars" value="${goOut.act.vars}" />
+					<c:set var="procDef" value="${goOut.act.procDef}" /><%--
+				<c:set var="procExecUrl" value="${act.procExecUrl}" /> --%>
+					<c:set var="status" value="${goOut.act.status}" />
+					<tr>
+						<td>${goOut.act.vars.map.applyUserId}</td>
+						<td>${task.name}
+						</td>
+						</td>
+					<%--<td>${task.description}</td>--%>
+						<td>${procDef.name}</td>
+						<td>${procDef.version}</td>
+						<td>${goOut.startTime}</td>
+						<td>${goOut.endTime}</td>
+						<td>${goOut.gooutDay}</td>
+						<td>${goOut.gooutTime}</td>
+						<td><%--${goOut.gooutReason}--%>
+							<span title="${goOut.gooutReason}">${fns:abbr(goOut.gooutReason, 30)}</span>
+						</td>
+						<td><fmt:formatDate value="${goOut.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+						<td>
+							<c:if test="${not empty task.assignee}">
+								<%--<a href="${ctx}/goout/goOut/applyOnGoOut?taskId=${task.id}&taskName=${fns:urlEncode(task.name)}&taskDefKey=${task.taskDefinitionKey}&procInsId=${task.processInstanceId}&procDefId=${task.processDefinitionId}&status=${status}" class="btn btn-success btn-xs">任务办理</a>
+								--%><a href="javascript:void(0)" onclick="openDialogre('任务办理', '${ctx}/goout/goOut/applyOnGoOut?taskId=${task.id}&taskName=${fns:urlEncode(task.name)}&taskDefKey=${task.taskDefinitionKey}&procInsId=${task.processInstanceId}&procDefId=${task.processDefinitionId}&status=${status}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 任务办理</a>
+
+							</c:if>
+						</td>
+					</tr>
+				</c:forEach>
+				</tbody>
+			</table>
+			<!-- 分页代码 -->
+			<table:page page="${page}"></table:page>
+			<br/>
+			<br/>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 149 - 0
src/main/webapp/webpage/modules/hr/certificateAdd.jsp

@@ -0,0 +1,149 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员证书信息管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		img{width: 50px;height: 50px;}
+	</style>
+	<script type="text/javascript">
+		$(function () {
+            laydate.render({
+                elem: '#getDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+        })
+
+
+        //上传证书
+        function this_upload_image_button(index){
+            $("#this_upload_file_"+index).click();
+        }
+        function this_upload_show_image(index){
+            var obj =$("#this_upload_file_"+index)[0].files[0];
+            var fileType = obj.type;
+            var url ;
+            if(fileType.endsWith("png")||fileType.endsWith("bmp")||fileType.endsWith("jpg")||fileType.endsWith("jpeg")||fileType.endsWith("gif")){
+                url = window.URL.createObjectURL(obj);
+            }else {
+                //需要置空
+                var file = $("#this_upload_file_"+index);
+                file.after(file.clone().val(""));
+                file.remove();
+                top.layer.alert('请上传*.png,*.bmp,*.jpg/jpeg格式的图片',{icon:0,title:'系统提示'});
+                return false ;
+            }
+            $("#this_upload_image_"+index).attr("src",url);
+            var length = $("#this_upload_image_div :file").length;
+            if( index == length &&  length < 1 ){
+                this_upload_image_append(index);
+                this_add_x(index);
+            }else if(index == length && length ==1){
+                var span = '<span id="this_upload_close_'+index+'" class="close_ico" style="cursor:pointer; position: absolute;top:-1px;right: -1px; display:inline-block;z-index:1;color: red;" onclick="this_close_img('+index+');">x</span>';
+                $("#this_upload_image_1").before(span);
+
+                //由于限制了只上传一张图片,此时在替换图片操作后会出现多个"id=this_upload_close_1"的"x"
+				$("span[id^=this_upload_close_1]").each(function (i,n) {
+					if(i>0){
+					    $(n).remove();
+					}
+                })
+            }
+        }
+        function this_upload_image_append(index){
+            var div1 = "<div id='this_upload_div_"+(index+1)+"' style='float:left;position:relative;width: 57px;height: 57px;'>";
+            var img = '<img  id="this_upload_image_'+(index+1)+'" class="upload_ico" width="50px" height="50px"  onclick="this_upload_image_button('+(index+1)+')" src = "${pageContext.request.contextPath}/static/uploadify/upload_ico.png" style="cursor:pointer;"/>';
+            var input = '<input id="this_upload_file_'+(index+1)+'" type="file" style="display:none;" name="this_upload_files" onChange="this_upload_show_image('+(index+1)+')" /><br>';
+            var div2 = "</div>";
+
+            $("#this_upload_image_div").append(div1+img+input+div2);
+        }
+        function this_close_img(index) {
+            $("#this_upload_div_"+index).remove();
+            var length = $("#this_upload_image_div :file").length;
+            if(length == 0){
+                this_add_div();
+            }else if(length == 1){
+                var x = $("#this_upload_image_div").find("span").text();
+                if("x" != x){
+                    this_add_div();
+                }
+            }
+        }
+        function this_add_x(index) {
+            var span = '<span id="this_upload_close_'+index+'" class="close_ico" style="cursor:pointer; position: absolute;top:-1px;right: -1px; display:inline-block;z-index:1;color: red;" onclick="this_close_img('+index+');">x</span>';
+            $("#this_upload_image_div").find("img:eq(-2)").before(span);
+        }
+        function this_add_div() {
+            var this_upload_div_1 =
+                '<div id="this_upload_div_1" style="float: left;position:relative;width: 57px;height: 57px;" >'+
+                '<img  id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/uploadify/upload_ico.png"  onclick="this_upload_image_button(1)"/>'+
+                '<input id="this_upload_file_1" type="file" style="display:none"  name="this_upload_files"  onchange="this_upload_show_image(1)" /><br>'+
+                '</div>';
+            $("#this_upload_image_div").html("").append(this_upload_div_1);
+        }
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="certificate" enctype="multipart/form-data" class="form-horizontal">
+			<input type="hidden" name="userInfoId" value="${requestScope.userInfoId}"/>
+			<input type="hidden" name="userId" value="${requestScope.userId}"/>
+			<sys:message content="${message}"/>
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right"><font color="red">*</font>证书名称:</label></td>
+				   <td class="width-35">
+					   <form:input path="name" htmlEscape="false"    class="form-control required"/>
+				   </td>
+				   <td class="width-15 active"><label class="pull-right"><font color="red">*</font>证书编号:</label></td>
+				   <td class="width-35">
+					   <form:input path="number" htmlEscape="false"    class="form-control required"/>
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right"><font color="red">*</font>证书专业:</label></td>
+				   <td class="width-35">
+					   <form:input path="profession" htmlEscape="false"    class="form-control required"/>
+				   </td>
+				   <td class="width-15 active"><label class="pull-right"><font color="red">*</font>证书等级:</label></td>
+				   <td class="width-35">
+					   <form:input path="level" htmlEscape="false"    class="form-control required"/>
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right"><font color="red">*</font>取得日期:</label></td>
+				   <td class="width-35">
+					   <input id="getDate" name="getDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date required"
+							  value="<fmt:formatDate value="${certificate.getDate}" pattern="yyyy-MM-dd"/>"/>
+				   </td>
+				   <td class="width-15 active"><label class="pull-right"><font color="red">*</font>证书有效期:</label></td>
+				   <td class="width-35">
+					   <input id="endDate" name="endDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date required"
+							  value="<fmt:formatDate value="${certificate.endDate}" pattern="yyyy-MM-dd"/>"/>
+				   </td>
+			   </tr>
+		   		<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>上传证书:</label></td>
+					<td class="width-35" colspan="3">
+						<div style="float: right">
+							<span id="this_upload_msg">请上传*.png,*.bmp,*.jpg/jpeg,*.gif格式的图片</span><br>
+							<div id="this_upload_image_div">
+								<div id="this_upload_div_1" style="float: left;position:relative;width: 57px;height: 57px;">
+									<img alt="_blank" id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/uploadify/upload_ico.png"  onclick="this_upload_image_button(1)"/>
+									<input id="this_upload_file_1" type="file" style="display:none"  name="this_upload_files"  onchange="this_upload_show_image(1)" class="form-control required" /><br>
+								</div>
+							</div>
+						</div>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 207 - 0
src/main/webapp/webpage/modules/hr/certificateForm.jsp

@@ -0,0 +1,207 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员证书信息管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		img{width: 50px;height: 50px;}
+	</style>
+	<script type="text/javascript">
+        $(function(){
+//            $("img").not(".upload_ico").each(function () {
+//                var num = 1 ;
+//                $(this).click(function () {
+//                    var flag = num%2;
+//                    if(flag == 1){
+//                        $(this).css("width","90%");
+//                        $(this).css("height","90%");
+//                        num++;
+//                    }else if(flag ==0){
+//                        $(this).css("width","50px");
+//                        $(this).css("height","50px");
+//                        num++;
+//                    }
+//                })
+//            });
+        });
+	</script>
+	<script type="text/javascript">
+        function openDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['确定','关闭'],
+                yes: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var formId = inputForm.attr("id");
+                    if(formId){
+                        var $document = iframeWin.contentWindow.document;
+
+                        var fileInput = $document.getElementById("this_upload_file_1").files[0];
+						var fileSize = $(fileInput).size();
+						if(fileSize<1){
+						    top.layer.alert('请上传证书文件',{icon:0,title:'系统提示'});
+						    return ;
+						}
+
+                        $document.getElementById(formId).setAttribute("action","${ctx}/hr/certificate/save");
+                        formSubmit($document,formId,index);
+                    }
+                },
+                cancel: function(index){
+                }
+            });
+        }
+        function formSubmit($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+
+                //必须添加证书文件才能提交
+                //var obj =$($document.getElementById(inputForm));
+
+                var loadingMessage = parent.layer.load(0, {shade: false,opacity:0.1});
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        top.layer.close(index);
+                        history.go(0);
+                        parent.layer.msg("保存成功!!!",{icon:6});
+                        parent.layer.close(loadingMessage);
+                    }
+                });
+            }
+        }
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputFormCertificate" modelAttribute="userInfo"  class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="userOffice.userId"/>
+		<form:hidden path="userOffice.companyId"/>
+		<form:hidden path="userOffice.id"/>
+		<form:hidden path="userId"/>
+		<form:hidden path="companyId"/>
+		<sys:message content="${message}"/>
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">姓名:</label></td>
+				   <td class="width-35">
+						   ${userInfo.name}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">性别:</label></td>
+				   <td class="width-35">
+						   ${fns:getDictLabel(userInfo.gender,'sex' ,'' )}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">昵称:</label></td>
+				   <td class="width-35">
+						   ${userInfo.nickName}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">工号:</label></td>
+				   <td class="width-35">
+						   ${userInfo.jobNumber}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">联系电话:</label></td>
+				   <td class="width-35">
+						   ${userInfo.mobilePhone}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">电子邮件:</label></td>
+				   <td class="width-35">
+						   ${userInfo.email}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">个人简介:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.personalProfile}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.remarks}
+				   </td>
+			   </tr>
+		   		<tr>
+					<td class="width-15 active"><label class="pull-right"></label></td>
+					<td class="width-35" colspan="3">
+						<div style="float:left; height: 100%; width: 100%; ">
+							<div style="display: inline-block">
+								<a  onclick="openDialogre('新增证书','${ctx}/hr/certificate/certificateAdd?id=${userInfo.id}&userOfficeId=${userInfo.userOffice.id}&userId=${userInfo.userOffice.userId}&companyId=${userInfo.userOffice.companyId}&dialog=add','80%','80%')" id="add_certificate" class="btn btn-info btn-xs" >
+									<i class="fa fa-plus"></i> 添加证书
+								</a>
+							</div>
+							<table id="certificate_list"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+								<tr>
+									<td>序号</td><td>证书名称</td><td>证书编号</td>
+									<td>证书专业</td><td>证书等级</td><td>取得日期</td><td>到期日期</td>
+									<td>操作</td>
+								</tr>
+								<c:forEach items="${userInfo.certificateList}" var="cer" varStatus="index">
+									<tr>
+										<td>${index.index + 1}</td>
+										<td>${cer.name}</td>
+										<td>${cer.number}</td>
+										<td>${cer.profession}</td>
+										<td>${cer.level}</td>
+										<td><fmt:formatDate value="${cer.getDate}" pattern="yyyy-MM-dd"/></td>
+										<td><fmt:formatDate value="${cer.endDate}" pattern="yyyy-MM-dd"/></td>
+										<td>
+											<div>
+												<div style="float: right;margin: 5px;">
+													<%--<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${cer.certificate.url}" class="btn btn-success btn-xs">下载</a>--%>
+														<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${cer.certificate.url}');" class="btn btn-success btn-xs">下载</a>
+
+												</div>
+												<div style="float: right;margin: 5px;">
+													<img alt="" src="${cer.certificate.url}" onclick="openDialogView(' ','${ctx}/sys/picturepreview/picturePreview?url=${cer.certificate.url}','80%','80%')" height="50px;" width="50px;">
+												</div>
+											</div>
+										</td>
+									</tr>
+								</c:forEach>
+							</table>
+						</div>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 150 - 0
src/main/webapp/webpage/modules/hr/certificateList.jsp

@@ -0,0 +1,150 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员证书信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<%--<div class="ibox-title">
+		<h5>人员证书信息列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>--%>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="userInfo" action="${ctx}/hr/certificate/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<a href="#" id="moresee" class="fa fa-chevron-down" style="float: right;">更多</a>
+		<div class="form-group">
+			<span>姓名:</span>
+			<form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<%--<span>证书编号:</span>--%>
+			<%--<form:input path="mobilePhone" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>--%>
+			<%--<span>证书名称:</span>--%>
+			<%--<form:input path="idCard" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>--%>
+		</div>
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th style="text-align: center;"> 序号 </th>
+				<th style="text-align: center;"  class="sort-column name">姓名</th>
+				<th style="text-align: center;"  class="sort-column gender">性别</th>
+				<th style="text-align: center;"  class="sort-column mobilePhone">联系电话</th>
+				<th style="text-align: center;"  class="sort-column officeId">部门</th>
+				<th style="text-align: center;"  class="sort-column workstartDate">报到日期</th>
+				<th style="text-align: center;">操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="userInfo" varStatus="userInfoStatus">
+			<tr>
+				<td>
+					${userInfoStatus.index + 1}
+				</td>
+				<td>
+					<c:if test="${empty userInfo.name}">
+						${userInfo.user.name}
+					</c:if>
+					<c:if test="${not empty userInfo.name}">
+						${userInfo.name}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.user.sex, 'sex', '')}
+					</c:if>
+					<c:if test="${!empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.gender, 'sex', '')}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.mobilePhone}">
+						${userInfo.user.mobile}
+					</c:if>
+					<c:if test="${!empty userInfo.mobilePhone}">
+						${userInfo.mobilePhone}
+					</c:if>
+				</td>
+				<td>
+					${userInfo.office.name}
+				</td>
+				<td>
+					<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd"/>
+				</td>
+				<td>
+					<div style="text-align: center">
+					<shiro:hasPermission name="hr:certificate:view">
+						<a href="javascript:void(0)" onclick="openDialogView('查看人员证书信息', '${ctx}/hr/certificate/form?dialog=certificateView&id=${userInfo.id}&userOfficeId=${userInfo.userOffice.id}&userId=${userInfo.userOffice.userId}&companyId=${userInfo.userOffice.companyId}','80%', '80%')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="hr:certificate:edit">
+						<c:if test="${!empty userInfo.id}">
+							<a href="javascript:void(0)" onclick="openDialogView('修改人员证书信息', '${ctx}/hr/certificate/form?dialog=certificateEdit&id=${userInfo.id}&userOfficeId=${userInfo.userOffice.id}&userId=${userInfo.userOffice.userId}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+						</c:if>
+						<c:if test="${empty userInfo.id}">
+							<a href="javascript:void(0)" onclick="javascript:parent.layer.msg('请先完善人员基本信息',{icon:2})" class="btn btn-default btn-xs"><i class="fa fa-edit"></i>修改</a>
+						</c:if>
+					</shiro:hasPermission>
+					</div>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 133 - 0
src/main/webapp/webpage/modules/hr/certificateListSimple.jsp

@@ -0,0 +1,133 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员证书信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>人员证书信息列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="userInfo" action="${ctx}/hr/certificate/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+			<span>姓名:</span>
+			<form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>证书编号:</span>
+			<form:input path="mobilePhone" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>证书名称:</span>
+			<form:input path="idCard" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+		</div>
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th style="text-align: center;"> 序号 </th>
+				<th style="text-align: center;"  class="sort-column name">姓名</th>
+				<th style="text-align: center;"  class="sort-column gender">性别</th>
+				<th style="text-align: center;"  class="sort-column mobilePhone">联系电话</th>
+				<th style="text-align: center;"  class="sort-column officeId">部门</th>
+				<th style="text-align: center;"  class="sort-column workstartDate">报到日期</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="userInfo" varStatus="userInfoStatus">
+			<tr>
+				<td>
+					${userInfoStatus.index + 1}
+				</td>
+				<td>
+					<c:if test="${empty userInfo.name}">
+						${userInfo.user.name}
+					</c:if>
+					<c:if test="${not empty userInfo.name}">
+						${userInfo.name}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.user.sex, 'sex', '')}
+					</c:if>
+					<c:if test="${!empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.gender, 'sex', '')}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.mobilePhone}">
+						${userInfo.user.mobile}
+					</c:if>
+					<c:if test="${!empty userInfo.mobilePhone}">
+						${userInfo.mobilePhone}
+					</c:if>
+				</td>
+				<td>
+					${userInfo.office.name}
+				</td>
+				<td>
+					<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd"/>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 116 - 0
src/main/webapp/webpage/modules/hr/certificateView.jsp

@@ -0,0 +1,116 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员证书信息管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		img{width: 50px;height: 50px;}
+	</style>
+	<script type="text/javascript">
+        $(function(){
+//            $("img").not(".upload_ico").each(function () {
+//                var num = 1 ;
+//                $(this).click(function () {
+//                    var flag = num%2;
+//                    if(flag == 1){
+//                        $(this).css("width","90%");
+//                        $(this).css("height","90%");
+//                        num++;
+//                    }else if(flag ==0){
+//                        $(this).css("width","50px");
+//                        $(this).css("height","50px");
+//                        num++;
+//                    }
+//                })
+//            });
+        });
+
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="userInfo" class="form-horizontal">
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">姓名:</label></td>
+				   <td class="width-35">
+						   ${userInfo.name}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">性别:</label></td>
+				   <td class="width-35">
+						   ${fns:getDictLabel(userInfo.gender,'sex' ,'' )}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">昵称:</label></td>
+				   <td class="width-35">
+						   ${userInfo.nickName}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">工号:</label></td>
+				   <td class="width-35">
+						   ${userInfo.jobNumber}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">联系电话:</label></td>
+				   <td class="width-35">
+						   ${userInfo.mobilePhone}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">电子邮件:</label></td>
+				   <td class="width-35">
+						   ${userInfo.email}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">个人简介:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.personalProfile}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.remarks}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">证书信息:</label></td>
+				   <td class="width-35" colspan="3">
+					   <table id="certificate_list"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+						   <tr>
+							   <td>序号</td><td>证书名称</td><td>证书编号</td>
+							   <td>证书专业</td><td>证书等级</td><td>取得日期</td><td>到期日期</td>
+							   <td>操作</td>
+						   </tr>
+						   <c:forEach items="${userInfo.certificateList}" var="cer" varStatus="index">
+							   <tr>
+								   <td>${index.index + 1}</td>
+								   <td>${cer.name}</td>
+								   <td>${cer.number}</td>
+								   <td>${cer.profession}</td>
+								   <td>${cer.level}</td>
+								   <td><fmt:formatDate value="${cer.getDate}" pattern="yyyy-MM-dd"/></td>
+								   <td><fmt:formatDate value="${cer.endDate}" pattern="yyyy-MM-dd"/></td>
+								   <td>
+									   <div>
+										   <div style="float: right;margin: 5px;">
+											   <%--<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${cer.certificate.url}" class="btn btn-success btn-xs">下载</a>--%>
+												   <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${cer.certificate.url}');" class="btn btn-success btn-xs">下载</a>
+										   </div>
+										   <div style="float: right;margin: 5px;">
+											   <img alt="" src="${cer.certificate.url}" onclick="openDialogView(' ','${ctx}/sys/picturepreview/picturePreview?url=${cer.certificate.url}','80%','80%')" height="50px;" width="50px;">
+										   </div>
+									   </div>
+								   </td>
+							   </tr>
+						   </c:forEach>
+					   </table>
+
+				   </td>
+			   </tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 260 - 0
src/main/webapp/webpage/modules/hr/evaluationForm.jsp

@@ -0,0 +1,260 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员评价表及客户满意表信息管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		img{width: 50px;height: 50px;}
+	</style>
+	<script type="text/javascript">
+        $(function(){
+//            $("img").not(".upload_ico").each(function () {
+//                var num = 1 ;
+//                $(this).click(function () {
+//                    var flag = num%2;
+//                    if(flag == 1){
+//                        $(this).css("width","90%");
+//                        $(this).css("height","90%");
+//                        num++;
+//                    }else if(flag ==0){
+//                        $(this).css("width","50px");
+//                        $(this).css("height","50px");
+//                        num++;
+//                    }
+//                })
+//            });
+        });
+
+        var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+	</script>
+	<script type="text/javascript">
+        $(function () {
+            ;$("#execute_btn").click(function () {
+                $("#execute_file").click();
+            })
+            ;$("#manuscript_btn").click(function () {
+                $("#manuscript_file").click();
+            })
+        })
+
+
+        function execute_insertTitle(tValue){
+            $("#execute_title_div").remove();
+            var t1 = tValue.lastIndexOf("\\");
+            if(t1 >= 0 && t1 < tValue.length){
+                $("#execute_title").text(tValue.substring(t1+1));
+                $("#execute_title").after("<div id='execute_title_div' style='float: right'>&nbsp;&nbsp;<span id='execute_delete' onclick='execute_del()'style='color: red ; cursor: pointer;'>x</span></div>");
+            }
+        }
+        function execute_del() {
+            $("#execute_file").val("");
+            $("#execute_title").text("");
+            $("#execute_delete").remove();
+            $("#execute_title_div").remove();
+        }
+        function manuscript_insertTitle(tValue){
+            $("#manuscript_title_div").remove();
+            var t1 = tValue.lastIndexOf("\\");
+            if(t1 >= 0 && t1 < tValue.length){
+                $("#manuscript_title").text(tValue.substring(t1+1));
+                $("#manuscript_title").after("<div id='manuscript_title_div' style='float: right'>&nbsp;&nbsp;<span id='execute_delete' onclick='manuscript_del()'style='color: red ; cursor: pointer;'>x</span></div>");
+            }
+        }
+        function manuscript_del() {
+            $("#manuscript_file").val("");
+            $("#manuscript_title").text("");
+            $("#manuscript_delete").remove();
+            $("#manuscript_title_div").remove();
+        }
+	</script>
+</head>
+<body class="hideScroll">
+									<%--action="${ctx}/hr/evaluation/save"--%>
+<form:form id="inputForm" modelAttribute="userInfo" method="post" enctype="multipart/form-data" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="userOffice.userId"/>
+		<form:hidden path="userOffice.companyId"/>
+		<form:hidden path="userOffice.id"/>
+		<form:hidden path="userId"/>
+		<form:hidden path="companyId"/>
+		<sys:message content="${message}"/>
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">姓名:</label></td>
+				   <td class="width-35">
+						   ${userInfo.name}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">性别:</label></td>
+				   <td class="width-35">
+						   ${fns:getDictLabel(userInfo.gender,'sex' ,'' )}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">昵称:</label></td>
+				   <td class="width-35">
+						   ${userInfo.nickName}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">工号:</label></td>
+				   <td class="width-35">
+						   ${userInfo.jobNumber}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">联系电话:</label></td>
+				   <td class="width-35">
+						   ${userInfo.mobilePhone}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">电子邮件:</label></td>
+				   <td class="width-35">
+						   ${userInfo.email}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">个人简介:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.personalProfile}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.remarks}
+				   </td>
+			   </tr>
+		   		<tr>
+					<td class="width-15 active"><label class="pull-right">人员评价信息:</label></td>
+					<td class="width-35" colspan="3">
+						<div>
+							<div style="float:left; height: 100%; width: 100%; ">
+								<div style="display: inline-block">
+									<input id="execute_file" type="file" name="execute_file" multiple="multiple" style="display: none;" onChange="if(this.value)execute_insertTitle(this.value);"/>
+									<a id="execute_btn" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>
+									<span id="execute_title"></span>
+								</div>
+								<table id="listExecuteFile"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+									<tr>
+										<%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
+									</tr>
+									<tr>
+										<c:if test="${not empty userInfo.user.workattachment.id}">
+											<%--<td>1</td>--%>
+												<%--<span title="${userInfo.user.workattachment.attachmentName}">${fns:abbr(userInfo.user.workattachment.attachmentName, 30)}</span>--%>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(userInfo.user.workattachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(userInfo.user.workattachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(userInfo.user.workattachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(userInfo.user.workattachment.attachmentName,'jpeg')}">
+													<td><img src="${userInfo.user.workattachment.url}" onclick="openDialogView(' ','${ctx}/sys/picturepreview/picturePreview?url=${userInfo.user.workattachment.url}','860px','600px')" width="50" height="50" alt="${userInfo.user.workattachment.attachmentName}"/></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(userInfo.user.workattachment.attachmentName,'pdf')}">
+															<td><a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.workattachment.url}','80%','80%','1')">
+																<span title="${userInfo.user.workattachment.attachmentName}">${fns:abbr(userInfo.user.workattachment.attachmentName, 30)}</span></a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.workattachment.url}','80%','80%')">
+																<span title="${userInfo.user.workattachment.attachmentName}">${fns:abbr(userInfo.user.workattachment.attachmentName, 30)}</span></a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+											<td>${userInfo.user.workattachment.attachmentUser}</td>
+											<td><fmt:formatDate value="${userInfo.user.workattachment.createDate}" pattern="yyyy-MM-dd"/></td>
+											<td>
+												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${userInfo.user.workattachment.url}');" class="btn btn-success btn-xs">下载</a>
+												<%--<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${userInfo.user.workattachment.url}" class="btn btn-success btn-xs">下载</a>--%>
+											</td>
+										</c:if>
+									</tr>
+								</table>
+							</div>
+						</div>
+					</td>
+				</tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">客户满意信息:</label></td>
+				   <td class="width-35" colspan="3">
+					   <div>
+						   <div style="float:left; height: 100%; width: 100%; ">
+							   <div style="display: inline-block">
+								   <input id="manuscript_file" type="file" name="manuscript_file" multiple="multiple" style="display: none;" onChange="if(this.value)manuscript_insertTitle(this.value);"/>
+								   <a id="manuscript_btn" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>
+								   <span id="manuscript_title"></span>
+							   </div>
+							   <table id="listManuscriptFile"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+								   <tr>
+									  <%-- <td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
+								   </tr>
+								   <tr>
+									   <c:if test="${not empty userInfo.user.satisfaction.id}">
+										  <%-- <td>${index.index + 1}</td>--%>
+
+											   <%--<span title="${userInfo.user.satisfaction.attachmentName}">${fns:abbr(userInfo.user.satisfaction.attachmentName, 30)}</span>--%>
+										   <c:choose>
+											   <c:when test="${fn:containsIgnoreCase(userInfo.user.satisfaction.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(userInfo.user.satisfaction.attachmentName,'png')
+															   or fn:containsIgnoreCase(userInfo.user.satisfaction.attachmentName,'gif')
+															   or fn:containsIgnoreCase(userInfo.user.satisfaction.attachmentName,'jpeg')}">
+												   <td><img src="${userInfo.user.satisfaction.url}" onclick="openDialogView(' ','${ctx}/sys/picturepreview/picturePreview?url=${userInfo.user.satisfaction.url}','860px','600px')" width="50" height="50" alt="${userInfo.user.satisfaction.attachmentName}"/></td>
+											   </c:when>
+											   <c:otherwise>
+												   <c:choose>
+													   <c:when test="${fn:containsIgnoreCase(userInfo.user.satisfaction.attachmentName,'pdf')}">
+														   <td><a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.satisfaction.url}','80%','80%','1')">
+															   <span title="${userInfo.user.satisfaction.attachmentName}">${fns:abbr(userInfo.user.satisfaction.attachmentName, 30)}</span></a></td>
+													   </c:when>
+													   <c:otherwise>
+														   <td><a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.satisfaction.url}','80%','80%')">
+															   <span title="${userInfo.user.satisfaction.attachmentName}">${fns:abbr(userInfo.user.satisfaction.attachmentName, 30)}</span></a></td>
+													   </c:otherwise>
+												   </c:choose>
+											   </c:otherwise>
+										   </c:choose>
+
+										   <td>${userInfo.user.satisfaction.attachmentUser}</td>
+										   <td><fmt:formatDate value="${userInfo.user.satisfaction.createDate}" pattern="yyyy-MM-dd"/></td>
+										   <td>
+											  <%-- <a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${userInfo.user.satisfaction.url}" class="btn btn-success btn-xs">下载</a>--%>
+											   <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${userInfo.user.satisfaction.url}');" class="btn btn-success btn-xs">下载</a>
+
+										   </td>
+									   </c:if>
+								   </tr>
+							   </table>
+						   </div>
+					   </div>
+				   </td>
+			   </tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 248 - 0
src/main/webapp/webpage/modules/hr/evaluationList.jsp

@@ -0,0 +1,248 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员评价及客户满意信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp('slow');
+                    $(this).text("更多").removeClass("fa fa-chevron-up").addClass("fa fa-chevron-down");
+                    //document.getElementById("moresees").style.visibility = "hidden";
+                }else{
+                    $('#moresees').slideDown('slow');
+                    $(this).text("收起").removeClass("fa fa-chevron-down").addClass("fa fa-chevron-up");
+                    //document.getElementById("moresees").style.visibility = "visible";
+                }
+            });
+		});
+        function openDialogre(title,url,width,height,target) {
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                btn: ['确定', '关闭'],
+                yes: function (index, layero) {
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if (target) {
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    } else {
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var formId = inputForm.attr("id");
+                    if(formId){
+                        var $document = iframeWin.contentWindow.document;
+                        $document.getElementById(formId).setAttribute("action","${ctx}/hr/evaluation/save");
+
+                        var executeFile = $document.getElementById("execute_file").files[0];
+                        var executeFileSize = $(executeFile).size();
+                        var manuscriptFile = $document.getElementById("manuscript_file").files[0];
+                        var manuscriptFileSize = $(manuscriptFile).size();
+                        if(executeFileSize==0 && manuscriptFileSize==0){
+                            top.layer.alert('请至少上传一个附件!', {icon: 0, title:'警告'});
+                            return ;
+                        }
+                        formSubmit($document,formId,index);
+                    }
+                },
+                no: function (index) {
+                }
+            });
+        }
+        function formSubmit($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        top.layer.close(index);
+                        parent.layer.msg("保存成功!!!",{icon:6});
+                        parent.layer.close(loadingMessage);
+                        window.location.reload();
+                    }
+                });
+            }
+        }
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<%--<div class="ibox-title">
+		<h5>人员评价及客户满意信息列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>--%>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="userInfo" action="${ctx}/hr/evaluation/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<a href="#" id="moresee" class="fa fa-chevron-down" style="float: right;">更多</a>
+		<div class="form-group">
+			<span>姓名:</span>
+			<form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>性别:</span>
+			<form:select path="gender" class="form-control m-b">
+				<form:option label="" value="" />
+				<form:options items="${fns:getDictList('sex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+			</form:select>
+			<span>电话:</span>
+			<form:input path="mobilePhone" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>身份证号:</span>
+			<form:input path="idCard" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<br>
+
+		</div>
+		<div style="display:none;margin-top: 15px" id="moresees">
+			<span>部门:</span>
+			<sys:treeselect id="office" name="officeId" value="${userInfo.office.id}" labelName="office.name" labelValue="${userInfo.office.name}"
+							title="部门" url="/sys/office/treeData?type=2" cssClass=" form-control input-sm" allowClear="true" />
+		</div>
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th style="text-align: center;"> 序号 </th>
+				<th style="text-align: center;"  class="sort-column name">姓名</th>
+				<th style="text-align: center;"  class="sort-column gender">性别</th>
+				<th style="text-align: center;"  class="sort-column mobilePhone">联系电话</th>
+				<th style="text-align: center;"  class="sort-column officeId">部门</th>
+				<th style="text-align: center;"  class="sort-column workstartDate">报到日期</th>
+				<th style="text-align: center;">操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="userInfo" varStatus="userInfoStatus">
+			<tr>
+				<td>
+					${userInfoStatus.index + 1}
+				</td>
+				<td>
+					<c:if test="${empty userInfo.name}">
+						${userInfo.user.name}
+					</c:if>
+					<c:if test="${not empty userInfo.name}">
+						${userInfo.name}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.user.sex, 'sex', '')}
+					</c:if>
+					<c:if test="${!empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.gender, 'sex', '')}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.mobilePhone}">
+						${userInfo.user.mobile}
+					</c:if>
+					<c:if test="${!empty userInfo.mobilePhone}">
+						${userInfo.mobilePhone}
+					</c:if>
+				</td>
+				<td>
+					${userInfo.office.name}
+				</td>
+				<td>
+					<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd"/>
+				</td>
+				<td>
+					<div style="text-align: center">
+					<shiro:hasPermission name="hr:evaluation:view">
+						<a href="javascript:void(0)" onclick="openDialogView('查看人员评价及客户满意信息', '${ctx}/hr/evaluation/form?dialog=evaluationView&id=${userInfo.id}&userOfficeId=${userInfo.userOffice.id}&userId=${userInfo.userOffice.userId}','80%','80%')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="hr:evaluation:edit">
+						<c:if test="${! empty userInfo.id}">
+							<a href="javascript:void(0)" onclick="openDialogre('修改人员评价及客户满意信息', '${ctx}/hr/evaluation/form?dialog=evaluationEdit&id=${userInfo.id}&userOfficeId=${userInfo.userOffice.id}&userId=${userInfo.userOffice.userId}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+						</c:if>
+						<c:if test="${empty userInfo.id}">
+							<a href="javascript:void(0)" onclick="javascript:parent.layer.msg('请先完善人员基本信息',{icon:2})" class="btn btn-default btn-xs"><i class="fa fa-edit"></i>修改</a>
+						</c:if>
+    				</shiro:hasPermission>
+					</div>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 143 - 0
src/main/webapp/webpage/modules/hr/evaluationListSimple.jsp

@@ -0,0 +1,143 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员评价及客户满意信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>人员评价及客户满意信息列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="userInfo" action="${ctx}/hr/evaluation/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+			<span>姓名:</span>
+			<form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>性别:</span>
+			<form:select path="gender" class="form-control m-b">
+				<form:option label="" value="" />
+				<form:options items="${fns:getDictList('sex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+			</form:select>
+			<span>电话:</span>
+			<form:input path="mobilePhone" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>身份证号:</span>
+			<form:input path="idCard" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<br>
+			<span>部门:</span>
+			<sys:treeselect id="office" name="officeId" value="${userInfo.office.id}" labelName="office.name" labelValue="${userInfo.office.name}"
+				title="部门" url="/sys/office/treeData?type=2" cssClass=" form-control input-sm" allowClear="true" />
+
+		</div>
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th style="text-align: center;"> 序号 </th>
+				<th style="text-align: center;"  class="sort-column name">姓名</th>
+				<th style="text-align: center;"  class="sort-column gender">性别</th>
+				<th style="text-align: center;"  class="sort-column mobilePhone">联系电话</th>
+				<th style="text-align: center;"  class="sort-column officeId">部门</th>
+				<th style="text-align: center;"  class="sort-column workstartDate">报到日期</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="userInfo" varStatus="userInfoStatus">
+			<tr>
+				<td>
+					${userInfoStatus.index + 1}
+				</td>
+				<td>
+					<c:if test="${empty userInfo.name}">
+						${userInfo.user.name}
+					</c:if>
+					<c:if test="${not empty userInfo.name}">
+						${userInfo.name}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.user.sex, 'sex', '')}
+					</c:if>
+					<c:if test="${!empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.gender, 'sex', '')}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.mobilePhone}">
+						${userInfo.user.mobile}
+					</c:if>
+					<c:if test="${!empty userInfo.mobilePhone}">
+						${userInfo.mobilePhone}
+					</c:if>
+				</td>
+				<td>
+					${userInfo.office.name}
+				</td>
+				<td>
+					<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd"/>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 172 - 0
src/main/webapp/webpage/modules/hr/evaluationView.jsp

@@ -0,0 +1,172 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员评价表及客户满意表信息管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		img{width: 50px;height: 50px;}
+	</style>
+	<script type="text/javascript">
+        $(function(){
+//            $("img").not(".upload_ico").each(function () {
+//                var num = 1 ;
+//                $(this).click(function () {
+//                    var flag = num%2;
+//                    if(flag == 1){
+//                        $(this).css("width","90%");
+//                        $(this).css("height","90%");
+//                        num++;
+//                    }else if(flag ==0){
+//                        $(this).css("width","50px");
+//                        $(this).css("height","50px");
+//                        num++;
+//                    }
+//                })
+//            });
+        });
+
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="userInfo" class="form-horizontal">
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">姓名:</label></td>
+				   <td class="width-35">
+						   ${userInfo.name}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">性别:</label></td>
+				   <td class="width-35">
+						   ${fns:getDictLabel(userInfo.gender,'sex' ,'' )}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">昵称:</label></td>
+				   <td class="width-35">
+						   ${userInfo.nickName}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">工号:</label></td>
+				   <td class="width-35">
+						   ${userInfo.jobNumber}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">联系电话:</label></td>
+				   <td class="width-35">
+						   ${userInfo.mobilePhone}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">电子邮件:</label></td>
+				   <td class="width-35">
+						   ${userInfo.email}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">个人简介:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.personalProfile}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.remarks}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">人员评价信息:</label></td>
+				   <td class="width-35" colspan="3">
+					   <div>
+						   <div style="float:left; height: 100%; width: 100%; ">
+							   <table id="listAttachmentFile"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+								   <tr>
+									  <%-- <td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
+								   </tr>
+								   <tr>
+									   <c:if test="${not empty userInfo.user.workattachment.id}">
+										 <%--  <td>1</td>--%>
+										   <c:choose>
+											   <c:when test="${fn:containsIgnoreCase(userInfo.user.workattachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(userInfo.user.workattachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(userInfo.user.workattachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(userInfo.user.workattachment.attachmentName,'jpeg')}">
+												   <td><img src="${userInfo.user.workattachment.url}" onclick="openDialogView(' ','${ctx}/sys/picturepreview/picturePreview?url=${userInfo.user.workattachment.url}','860px','600px')" width="50" height="50" alt="${userInfo.user.workattachment.attachmentName}"/></td>
+											   </c:when>
+											   <c:otherwise>
+												   <c:choose>
+													   <c:when test="${fn:containsIgnoreCase(userInfo.user.workattachment.attachmentName,'pdf')}">
+														   <td><a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.workattachment.url}','80%','80%','1')">
+															   <span title="${userInfo.user.workattachment.attachmentName}">${fns:abbr(userInfo.user.workattachment.attachmentName, 30)}</span></a></td>
+													   </c:when>
+													   <c:otherwise>
+														   <td><a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.workattachment.url}','80%','80%')">
+															   <span title="${userInfo.user.workattachment.attachmentName}">${fns:abbr(userInfo.user.workattachment.attachmentName, 30)}</span></a></td>
+													   </c:otherwise>
+												   </c:choose>
+											   </c:otherwise>
+										   </c:choose>
+										   <td>${userInfo.user.workattachment.attachmentUser}</td>
+										   <td><fmt:formatDate value="${userInfo.user.workattachment.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+										   <td>
+											   <%--<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${userInfo.user.workattachment.url}" class="btn btn-success btn-xs">下载</a>--%>
+												   <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${userInfo.user.workattachment.url}');" class="btn btn-success btn-xs">下载</a>
+										   </td>
+									   </c:if>
+								   </tr>
+							   </table>
+						   </div>
+					   </div>
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">客户满意信息:</label></td>
+				   <td class="width-35" colspan="3">
+					   <div>
+						   <div style="float:left; height: 100%; width: 100%; ">
+							   <table id="listSatisfactionFile"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+								   <tr>
+									 <%--  <td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
+								   </tr>
+								   <tr>
+									   <c:if test="${not empty userInfo.user.satisfaction.id}">
+										  <%-- <td>1</td>--%>
+										   <c:choose>
+											   <c:when test="${fn:containsIgnoreCase(userInfo.user.satisfaction.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(userInfo.user.satisfaction.attachmentName,'png')
+															   or fn:containsIgnoreCase(userInfo.user.satisfaction.attachmentName,'gif')
+															   or fn:containsIgnoreCase(userInfo.user.satisfaction.attachmentName,'jpeg')}">
+												   <td><img src="${userInfo.user.satisfaction.url}" onclick="openDialogView(' ','${ctx}/sys/picturepreview/picturePreview?url=${userInfo.user.satisfaction.url}','860px','600px')" width="50" height="50" alt="${userInfo.user.satisfaction.attachmentName}"/></td>
+											   </c:when>
+											   <c:otherwise>
+												   <c:choose>
+													   <c:when test="${fn:containsIgnoreCase(userInfo.user.satisfaction.attachmentName,'pdf')}">
+														   <td><a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.satisfaction.url}','80%','80%','1')">
+															   <span title="${userInfo.user.satisfaction.attachmentName}">${fns:abbr(userInfo.user.satisfaction.attachmentName, 30)}</span></a></td>
+													   </c:when>
+													   <c:otherwise>
+														   <td><a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.satisfaction.url}','80%','80%')">
+															   <span title="${userInfo.user.satisfaction.attachmentName}">${fns:abbr(userInfo.user.satisfaction.attachmentName, 30)}</span></a></td>
+													   </c:otherwise>
+												   </c:choose>
+											   </c:otherwise>
+										   </c:choose>
+										   <td>${userInfo.user.satisfaction.attachmentUser}</td>
+										   <td><fmt:formatDate value="${userInfo.user.satisfaction.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+										   <td>
+											   <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${userInfo.user.satisfaction.url}');" class="btn btn-success btn-xs">下载</a>
+
+											  <%-- <a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${userInfo.user.satisfaction.url}" class="btn btn-success btn-xs">下载</a>
+										   --%></td>
+									   </c:if>
+								   </tr>
+							   </table>
+						   </div>
+					   </div>
+				   </td>
+			   </tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 171 - 0
src/main/webapp/webpage/modules/hr/jobResumeForm.jsp

@@ -0,0 +1,171 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员简历信息管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		img{width: 50px;height: 50px;}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+		//上传简历
+        $(function () {
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+        })
+        function attachment_insertTitle(tValue){
+            $("#attachment_title_div").remove();
+            var t1 = tValue.lastIndexOf("\\");
+            if(t1 >= 0 && t1 < tValue.length){
+                $("#attachment_title").text(tValue.substring(t1+1));
+                $("#attachment_title").after("<div id='attachment_title_div' style='float: right'>&nbsp;&nbsp;<span id='attachment_delete' onclick='attachment_del()'style='color: red ; cursor: pointer;'>x</span></div>");
+            }
+        }
+        function attachment_del() {
+            $("#attachment_file").val("");
+            $("#attachment_title").text("");
+            $("#attachment_delete").remove();
+            $("#attachment_title_div").remove();
+        }
+	</script>
+</head>
+<body class="hideScroll">
+									<%--action="${ctx}/hr/jobResume/save"--%>
+<form:form id="inputForm" modelAttribute="userInfo" method="post" enctype="multipart/form-data" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="userOffice.userId"/>
+		<form:hidden path="userOffice.companyId"/>
+		<form:hidden path="userOffice.id"/>
+		<form:hidden path="userId"/>
+		<form:hidden path="companyId"/>
+		<sys:message content="${message}"/>
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">姓名:</label></td>
+				   <td class="width-35">
+						   ${userInfo.name}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">性别:</label></td>
+				   <td class="width-35">
+						   ${fns:getDictLabel(userInfo.gender,'sex' ,'' )}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">昵称:</label></td>
+				   <td class="width-35">
+						   ${userInfo.nickName}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">工号:</label></td>
+				   <td class="width-35">
+						   ${userInfo.jobNumber}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">联系电话:</label></td>
+				   <td class="width-35">
+						   ${userInfo.mobilePhone}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">电子邮件:</label></td>
+				   <td class="width-35">
+						   ${userInfo.email}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">个人简介:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.personalProfile}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.remarks}
+				   </td>
+			   </tr>
+		   		<tr>
+					<td class="width-15 active"><label class="pull-right">上传简历:</label></td>
+					<td class="width-35" colspan="3">
+						<div>
+							<div style="float:left; height: 100%; width: 100%; ">
+								<div style="display: inline-block">
+									<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)attachment_insertTitle(this.value);"/>
+									<a id="attachment_btn" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 上传</a>
+									<span id="attachment_title"></span>
+								</div>
+								<table id="listManuscriptFile"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+									<tr>
+										<%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
+									</tr>
+									<tr>
+										<c:if test="${not empty userInfo.user.jobResume.id}">
+											<%--<td>1</td>--%>
+											<td>
+												<%--<span title="${userInfo.user.jobResume.attachmentName}">${fns:abbr(userInfo.user.jobResume.attachmentName, 30)}</span>--%>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(userInfo.user.jobResume.attachmentName,'jpg')
+															or fn:containsIgnoreCase(userInfo.user.jobResume.attachmentName,'png')
+															or fn:containsIgnoreCase(userInfo.user.jobResume.attachmentName,'gif')
+															or fn:containsIgnoreCase(userInfo.user.jobResume.attachmentName,'jpeg')}">
+														<img src="${userInfo.user.jobResume.url}" onclick="openDialogView(' ','${ctx}/sys/picturepreview/picturePreview?url=${userInfo.user.jobResume.url}','860px','600px')" width="50" height="50" alt="${userInfo.user.jobResume.attachmentName}"/>
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(userInfo.user.jobResume.attachmentName,'pdf')}">
+																<a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.jobResume.url}','80%','80%','1')">
+																	<span title="${userInfo.user.jobResume.attachmentName}">${fns:abbr(userInfo.user.jobResume.attachmentName, 30)}</span></a>
+															</c:when>
+															<c:otherwise>
+																<a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.jobResume.url}','80%','80%')">
+																	<span title="${userInfo.user.jobResume.attachmentName}">${fns:abbr(userInfo.user.jobResume.attachmentName, 30)}</span>
+																</a>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</td>
+											<td>${userInfo.user.jobResume.attachmentUser}</td>
+											<td><fmt:formatDate value="${userInfo.user.jobResume.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+											<td>
+												<%--<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${userInfo.user.jobResume.url}" class="btn btn-success btn-xs">下载</a>--%>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${userInfo.user.jobResume.url}');" class="btn btn-success btn-xs">下载</a>
+											</td>
+										</c:if>
+									</tr>
+								</table>
+							</div>
+						</div>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 245 - 0
src/main/webapp/webpage/modules/hr/jobResumeList.jsp

@@ -0,0 +1,245 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员简历信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp('slow');
+                    $(this).text("更多").removeClass("fa fa-chevron-up").addClass("fa fa-chevron-down");
+                    //document.getElementById("moresees").style.visibility = "hidden";
+                }else{
+                    $('#moresees').slideDown('slow');
+                    $(this).text("收起").removeClass("fa fa-chevron-down").addClass("fa fa-chevron-up");
+                    //document.getElementById("moresees").style.visibility = "visible";
+                }
+            });
+		});
+        function openDialogre(title,url,width,height,target) {
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                btn: ['确定', '关闭'],
+                yes: function (index, layero) {
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if (target) {
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    } else {
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var formId = inputForm.attr("id");
+                    if(formId){
+                        var $document = iframeWin.contentWindow.document;
+                        $document.getElementById(formId).setAttribute("action","${ctx}/hr/jobResume/save");
+                        var fileInput = $document.getElementById("attachment_file").files[0];
+                        var fileSize = $(fileInput).size();
+                        if(fileSize==0){
+                            top.layer.alert('请至少上传一个附件!', {icon: 0, title:'警告'});
+							return ;
+                        }
+                        formSubmit($document,formId,index);
+                    }
+                },
+                no: function (index) {
+                }
+            });
+        }
+        function formSubmit($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        top.layer.close(index);
+                        parent.layer.msg("保存成功!!!",{icon:6});
+                        parent.layer.close(loadingMessage);
+                        window.location.reload();
+                    }
+                });
+            }
+        }
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<%--<div class="ibox-title">
+		<h5>人员简历信息列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>--%>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="userInfo" action="${ctx}/hr/jobResume/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<a href="#" id="moresee" class="fa fa-chevron-down" style="float: right;">更多</a>
+		<div class="form-group">
+			<span>姓名:</span>
+			<form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>性别:</span>
+			<form:select path="gender" class="form-control m-b">
+				<form:option label="" value="" />
+				<form:options items="${fns:getDictList('sex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+			</form:select>
+			<span>电话:</span>
+			<form:input path="mobilePhone" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>身份证号:</span>
+			<form:input path="idCard" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<br>
+
+		</div>
+		<div style="display:none;margin-top: 15px" id="moresees">
+		<span>部门:</span>
+		<sys:treeselect id="office" name="officeId" value="${userInfo.office.id}" labelName="office.name" labelValue="${userInfo.office.name}"
+						title="部门" url="/sys/office/treeData?type=2" cssClass=" form-control input-sm" allowClear="true" />
+		</div>
+	</form:form>
+		<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th style="text-align: center;"> 序号 </th>
+				<th style="text-align: center;"  class="sort-column name">姓名</th>
+				<th style="text-align: center;"  class="sort-column gender">性别</th>
+				<th style="text-align: center;"  class="sort-column mobilePhone">联系电话</th>
+				<th style="text-align: center;"  class="sort-column officeId">部门</th>
+				<th style="text-align: center;"  class="sort-column workstartDate">报到日期</th>
+				<th style="text-align: center;">操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="userInfo" varStatus="userInfoStatus">
+			<tr>
+				<td>
+					${userInfoStatus.index + 1}
+				</td>
+				<td>
+					<c:if test="${empty userInfo.name}">
+						${userInfo.user.name}
+					</c:if>
+					<c:if test="${not empty userInfo.name}">
+						${userInfo.name}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.user.sex, 'sex', '')}
+					</c:if>
+					<c:if test="${!empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.gender, 'sex', '')}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.mobilePhone}">
+						${userInfo.user.mobile}
+					</c:if>
+					<c:if test="${!empty userInfo.mobilePhone}">
+						${userInfo.mobilePhone}
+					</c:if>
+				</td>
+				<td>
+					${userInfo.office.name}
+				</td>
+				<td>
+					<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd"/>
+				</td>
+				<td>
+					<div style="text-align: center">
+					<shiro:hasPermission name="hr:jobResume:view">
+						<a href="javascript:void(0)" onclick="openDialogView('查看人员简历信息', '${ctx}/hr/jobResume/form?dialog=jobResumeView&id=${userInfo.id}&userOfficeId=${userInfo.userOffice.id}&userId=${userInfo.userOffice.userId}','80%','80%')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="hr:jobResume:edit">
+						<c:if test="${! empty userInfo.id}">
+							<a href="javascript:void(0)" onclick="openDialogre('修改人员简历信息', '${ctx}/hr/jobResume/form?dialog=jobResumeEdit&id=${userInfo.id}&userOfficeId=${userInfo.userOffice.id}&userId=${userInfo.userOffice.userId}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+						</c:if>
+						<c:if test="${empty userInfo.id}">
+							<a href="javascript:void(0)" onclick="javascript:parent.layer.msg('请先完善人员基本信息',{icon:2})" class="btn btn-default btn-xs"><i class="fa fa-edit"></i>修改</a>
+						</c:if>
+    				</shiro:hasPermission>
+					</div>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 143 - 0
src/main/webapp/webpage/modules/hr/jobResumeListSimple.jsp

@@ -0,0 +1,143 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员简历信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>人员简历信息列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="userInfo" action="${ctx}/hr/jobResume/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+			<span>姓名:</span>
+			<form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>性别:</span>
+			<form:select path="gender" class="form-control m-b">
+				<form:option label="" value="" />
+				<form:options items="${fns:getDictList('sex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+			</form:select>
+			<span>电话:</span>
+			<form:input path="mobilePhone" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>身份证号:</span>
+			<form:input path="idCard" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<br>
+			<span>部门:</span>
+			<sys:treeselect id="office" name="officeId" value="${userInfo.office.id}" labelName="office.name" labelValue="${userInfo.office.name}"
+				title="部门" url="/sys/office/treeData?type=2" cssClass=" form-control input-sm" allowClear="true" />
+
+		</div>
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th style="text-align: center;"> 序号 </th>
+				<th style="text-align: center;"  class="sort-column name">姓名</th>
+				<th style="text-align: center;"  class="sort-column gender">性别</th>
+				<th style="text-align: center;"  class="sort-column mobilePhone">联系电话</th>
+				<th style="text-align: center;"  class="sort-column officeId">部门</th>
+				<th style="text-align: center;"  class="sort-column workstartDate">报到日期</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="userInfo" varStatus="userInfoStatus">
+			<tr>
+				<td>
+					${userInfoStatus.index + 1}
+				</td>
+				<td>
+					<c:if test="${empty userInfo.name}">
+						${userInfo.user.name}
+					</c:if>
+					<c:if test="${not empty userInfo.name}">
+						${userInfo.name}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.user.sex, 'sex', '')}
+					</c:if>
+					<c:if test="${!empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.gender, 'sex', '')}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.mobilePhone}">
+						${userInfo.user.mobile}
+					</c:if>
+					<c:if test="${!empty userInfo.mobilePhone}">
+						${userInfo.mobilePhone}
+					</c:if>
+				</td>
+				<td>
+					${userInfo.office.name}
+				</td>
+				<td>
+					<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd"/>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 126 - 0
src/main/webapp/webpage/modules/hr/jobResumeView.jsp

@@ -0,0 +1,126 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员简历信息管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		img{width: 50px;height: 50px;}
+	</style>
+	<script type="text/javascript">
+        $(function(){
+//            $("img").not(".upload_ico").each(function () {
+//                var num = 1 ;
+//                $(this).click(function () {
+//                    var flag = num%2;
+//                    if(flag == 1){
+//                        $(this).css("width","90%");
+//                        $(this).css("height","90%");
+//                        num++;
+//                    }else if(flag ==0){
+//                        $(this).css("width","50px");
+//                        $(this).css("height","50px");
+//                        num++;
+//                    }
+//                })
+//            });
+        });
+
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="userInfo" class="form-horizontal">
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">姓名:</label></td>
+				   <td class="width-35">
+						   ${userInfo.name}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">性别:</label></td>
+				   <td class="width-35">
+						   ${fns:getDictLabel(userInfo.gender,'sex' ,'' )}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">昵称:</label></td>
+				   <td class="width-35">
+						   ${userInfo.nickName}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">工号:</label></td>
+				   <td class="width-35">
+						   ${userInfo.jobNumber}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">联系电话:</label></td>
+				   <td class="width-35">
+						   ${userInfo.mobilePhone}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">电子邮件:</label></td>
+				   <td class="width-35">
+						   ${userInfo.email}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">个人简介:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.personalProfile}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+				   <td class="width-35" colspan="3">
+						   ${userInfo.remarks}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">简历:</label></td>
+				   <td class="width-35" colspan="3">
+					   <div>
+						   <div style="float:left; height: 100%; width: 100%; ">
+							   <table id="listFile"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+								   <tr>
+									   <%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
+								   </tr>
+								   <tr>
+									   <c:if test="${not empty userInfo.user.jobResume.id}">
+										 <%--  <td>1</td>--%>
+										   <c:choose>
+											   <c:when test="${fn:containsIgnoreCase(userInfo.user.jobResume.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(userInfo.user.jobResume.attachmentName,'png')
+															   or fn:containsIgnoreCase(userInfo.user.jobResume.attachmentName,'gif')
+															   or fn:containsIgnoreCase(userInfo.user.jobResume.attachmentName,'jpeg')}">
+												   <td><img src="${userInfo.user.jobResume.url}" onclick="openDialogView(' ','${ctx}/sys/picturepreview/picturePreview?url=${userInfo.user.jobResume.url}','860px','600px')" width="50" height="50" alt="${userInfo.user.jobResume.attachmentName}"/></td>
+											   </c:when>
+											   <c:otherwise>
+												   <c:choose>
+													   <c:when test="${fn:containsIgnoreCase(userInfo.user.jobResume.attachmentName,'pdf')}">
+														   <td><a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.jobResume.url}','80%','80%','1')">
+															   <span title="${userInfo.user.jobResume.attachmentName}">${fns:abbr(userInfo.user.jobResume.attachmentName, 30)}</span></a></td>
+													   </c:when>
+													   <c:otherwise>
+														   <td><a href="javascript:void(0)" onclick="preview('预览','${userInfo.user.jobResume.url}','80%','80%')">
+															   <span title="${userInfo.user.jobResume.attachmentName}">${fns:abbr(userInfo.user.jobResume.attachmentName, 30)}</span></a></td>
+													   </c:otherwise>
+												   </c:choose>
+											   </c:otherwise>
+										   </c:choose>
+										   <td>${userInfo.user.jobResume.attachmentUser}</td>
+										   <td><fmt:formatDate value="${userInfo.user.jobResume.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+										   <td>
+											   <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${userInfo.user.jobResume.url}');" class="btn btn-success btn-xs">下载</a>
+											   <%--<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${userInfo.user.jobResume.url}" class="btn btn-success btn-xs">下载</a>--%>
+										   </td>
+									   </c:if>
+								   </tr>
+							   </table>
+						   </div>
+					   </div>
+				   </td>
+			   </tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 278 - 0
src/main/webapp/webpage/modules/hr/userInfoForm.jsp

@@ -0,0 +1,278 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员基本信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+
+					laydate.render({
+			            elem: '#highestGraduationTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+			        });
+					laydate.render({
+			            elem: '#firstGraduationTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+			        });
+					laydate.render({
+			            elem: '#birthday', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+			        });
+					laydate.render({
+			            elem: '#professionalGetdate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+			        });
+					laydate.render({
+			            elem: '#costengineerGetdate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+			        });
+					laydate.render({
+			            elem: '#workstartDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+			        });
+					laydate.render({
+			            elem: '#probationEnddate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+			        });
+		});
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="userInfo" action="${ctx}/hr/userInfo/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="userOffice.userId"/>
+		<form:hidden path="userOffice.companyId"/>
+		<form:hidden path="userOffice.id"/>
+		<form:hidden path="userId"/>
+		<form:hidden path="companyId"/>
+			<%-- 以上参数都必须 --%>
+		<sys:message content="${message}"/>
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>姓名:</label></td>
+					<td class="width-35">
+						<form:input path="name" htmlEscape="false"    class="form-control required"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>性别:</label></td>
+					<td class="width-35">
+						<form:select path="gender" class="form-control required">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('sex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">昵称:</label></td>
+					<td class="width-35">
+						<form:input path="nickName" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">工号:</label></td>
+					<td class="width-35">
+						<form:input path="jobNumber" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">最高学历:</label></td>
+					<td class="width-35">
+						<form:select path="highestDegree" class="form-control ">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('education_level')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</td>
+					<td class="width-15 active"><label class="pull-right">最高学历院校:</label></td>
+					<td class="width-35">
+						<form:input path="highestSchool" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">最高学历专业:</label></td>
+					<td class="width-35">
+						<form:input path="highestProfession" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">最高学历毕业时间:</label></td>
+					<td class="width-35">
+						<input id="highestGraduationTime" name="highestGraduationTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
+							value="<fmt:formatDate value="${userInfo.highestGraduationTime}" pattern="yyyy-MM-dd"/>"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">第一学历:</label></td>
+					<td class="width-35">
+						<form:select path="firstDegree" class="form-control ">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('education_level')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</td>
+					<td class="width-15 active"><label class="pull-right">第一学历院校:</label></td>
+					<td class="width-35">
+						<form:input path="firstSchool" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">第一学历专业:</label></td>
+					<td class="width-35">
+						<form:input path="firstProfession" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">第一学历毕业时间:</label></td>
+					<td class="width-35">
+						<input id="firstGraduationTime" name="firstGraduationTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
+							value="<fmt:formatDate value="${userInfo.firstGraduationTime}" pattern="yyyy-MM-dd"/>"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">出生日期:</label></td>
+					<td class="width-35">
+						<input id="birthday" name="birthday" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
+							value="<fmt:formatDate value="${userInfo.birthday}" pattern="yyyy-MM-dd"/>"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">身份证号:</label></td>
+					<td class="width-35">
+						<form:input path="idCard" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">职称:</label></td>
+					<td class="width-35">
+						<form:input path="professionalTitle" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">获取职称日期:</label></td>
+					<td class="width-35">
+						<input id="professionalGetdate" name="professionalGetdate" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
+							value="<fmt:formatDate value="${userInfo.professionalGetdate}" pattern="yyyy-MM-dd"/>"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">社保账号:</label></td>
+					<td class="width-35">
+						<form:input path="socialInsuranceAccount" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">医保账号:</label></td>
+					<td class="width-35">
+						<form:input path="medicalInsuranceAccount" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">银行账号:</label></td>
+					<td class="width-35">
+						<form:input path="bankAccount" htmlEscape="false"    class="form-control  number"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">公积金账号:</label></td>
+					<td class="width-35">
+						<form:input path="providentFundAccount" htmlEscape="false"    class="form-control  number"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">QQ号:</label></td>
+					<td class="width-35">
+						<form:input path="qq" htmlEscape="false"    class="form-control  number"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">微信号:</label></td>
+					<td class="width-35">
+						<form:input path="weixin" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>联系电话:</label></td>
+					<td class="width-35">
+						<form:input path="mobilePhone" htmlEscape="false"    class="form-control required number"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">电子邮件:</label></td>
+					<td class="width-35">
+						<form:input path="email" htmlEscape="false"    class="form-control  email"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">是否造价师(0否,1是):</label></td>
+					<td class="width-35">
+						<form:select path="isCostengineer" class="form-control ">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('is_costEngineer')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</td>
+					<td class="width-15 active"><label class="pull-right">造价师取得日期:</label></td>
+					<td class="width-35">
+						<input id="costengineerGetdate" name="costengineerGetdate" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
+							value="<fmt:formatDate value="${userInfo.costengineerGetdate}" pattern="yyyy-MM-dd"/>"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">报到日期:</label></td>
+					<td class="width-35">
+						<input id="workstartDate" name="workstartDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
+							value="<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd"/>"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">试用岗位:</label></td>
+					<td class="width-35">
+						<form:input path="probationPosition" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">试用期(n个月):</label></td>
+					<td class="width-35">
+						<form:input path="probationDuration" htmlEscape="false"    class="form-control  number"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">试用结束日期:</label></td>
+					<td class="width-35">
+						<input id="probationEnddate" name="probationEnddate" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
+							value="<fmt:formatDate value="${userInfo.probationEnddate}" pattern="yyyy-MM-dd"/>"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">职业资格:</label></td>
+					<td class="width-35">
+						<form:input path="professionalQualification" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">从事专业:</label></td>
+					<td class="width-35">
+						<form:input path="engagedJob" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">其他资质:</label></td>
+					<td class="width-35" colspan="3">
+						<form:input path="otherQualification" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">个人简介:</label></td>
+					<td class="width-35" colspan="3">
+						<form:textarea path="personalProfile" htmlEscape="false"  rows="2"  class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+					<td class="width-35" colspan="3">
+						<form:textarea path="remarks" htmlEscape="false" rows="2"    class="form-control "/>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 188 - 0
src/main/webapp/webpage/modules/hr/userInfoList.jsp

@@ -0,0 +1,188 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员基本信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp('slow');
+                    $(this).text("更多").removeClass("fa fa-chevron-up").addClass("fa fa-chevron-down");
+                    //document.getElementById("moresees").style.visibility = "hidden";
+                }else{
+                    $('#moresees').slideDown('slow');
+                    $(this).text("收起").removeClass("fa fa-chevron-down").addClass("fa fa-chevron-up");
+                    //document.getElementById("moresees").style.visibility = "visible";
+                }
+            });
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<%--<div class="ibox-title">
+		<h5>人员基本信息列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>--%>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="userInfo" action="${ctx}/hr/userInfo/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<a href="#" id="moresee" class="fa fa-chevron-down" style="float: right;">更多</a>
+		<div class="form-group">
+			<span>姓名:</span>
+			<form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>性别:</span>
+			<form:select path="gender" class="form-control m-b">
+				<form:option label="" value="" />
+				<form:options items="${fns:getDictList('sex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+			</form:select>
+			<span>电话:</span>
+			<form:input path="mobilePhone" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>身份证号:</span>
+			<form:input path="idCard" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<br>
+
+		</div>
+		<div style="display:none;margin-top: 15px" id="moresees">
+			<span>部门:</span>
+			<sys:treeselect id="office" name="officeId" value="${userInfo.office.id}" labelName="office.name" labelValue="${userInfo.office.name}"
+							title="部门" url="/sys/office/treeData?type=2" cssClass=" form-control input-sm" allowClear="true" />
+		</div>
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+<%--
+			<shiro:hasPermission name="hr:userInfo:add">
+				<table:addRow url="${ctx}/hr/userInfo/form" title="人员基本信息"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="hr:userInfo:edit">
+			    <table:editRow url="${ctx}/hr/userInfo/form" title="人员基本信息" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="hr:userInfo:del">
+				<table:delRow url="${ctx}/hr/userInfo/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="hr:userInfo:import">
+				<table:importExcel url="${ctx}/hr/userInfo/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="hr:userInfo:export">
+	       		<table:exportExcel url="${ctx}/hr/userInfo/export"></table:exportExcel><!-- 导出按钮 -->
+	       	</shiro:hasPermission>
+--%>
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		
+			</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th style="text-align: center;"> 序号 </th>
+				<th style="text-align: center;"  class="sort-column name">姓名</th>
+				<th style="text-align: center;"  class="sort-column gender">性别</th>
+				<th style="text-align: center;"  class="sort-column mobilePhone">联系电话</th>
+				<th style="text-align: center;"  class="sort-column officeId">部门</th>
+				<th style="text-align: center;"  class="sort-column workstartDate">报到日期</th>
+				<th style="text-align: center;">操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="userInfo" varStatus="userInfoStatus">
+			<tr>
+				<td>
+					${userInfoStatus.index + 1}
+				</td>
+				<td>
+					<c:if test="${empty userInfo.name}">
+						${userInfo.user.name}
+					</c:if>
+					<c:if test="${not empty userInfo.name}">
+						${userInfo.name}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.user.sex, 'sex', '')}
+					</c:if>
+					<c:if test="${!empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.gender, 'sex', '')}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.mobilePhone}">
+						${userInfo.user.mobile}
+					</c:if>
+					<c:if test="${!empty userInfo.mobilePhone}">
+						${userInfo.mobilePhone}
+					</c:if>
+				</td>
+				<td>
+					${userInfo.office.name}
+				</td>
+				<td>
+					<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd"/>
+				</td>
+				<td>
+					<div style="text-align: center">
+					<shiro:hasPermission name="hr:userInfo:view">
+						<a href="javascript:void(0)" onclick="openDialogView('查看人员基本信息', '${ctx}/hr/userInfo/form?dialog=view&id=${userInfo.id}&userOfficeId=${userInfo.userOffice.id}&userId=${userInfo.userOffice.userId}&companyId=${userInfo.userOffice.companyId}','80%','80%')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="hr:userInfo:edit">
+    					<a href="javascript:void(0)" onclick="openDialog('修改人员基本信息', '${ctx}/hr/userInfo/form?dialog=edit&id=${userInfo.id}&userOfficeId=${userInfo.userOffice.id}&userId=${userInfo.userOffice.userId}&companyId=${userInfo.userOffice.companyId}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+					</div>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 141 - 0
src/main/webapp/webpage/modules/hr/userInfoListSimple.jsp

@@ -0,0 +1,141 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员基本信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>人员基本信息列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="userInfo" action="${ctx}/hr/userInfo/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+			<span>姓名:</span>
+			<form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<span>性别:</span>
+			<form:select path="gender" class="form-control m-b">
+				<form:option label="" value="" />
+				<form:options items="${fns:getDictList('sex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+			</form:select>
+			<span>电话:</span>
+			<form:input path="mobilePhone" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+			<br>
+			<span>部门:</span>
+			<sys:treeselect id="office" name="officeId" value="${userInfo.office.id}" labelName="office.name" labelValue="${userInfo.office.name}"
+				title="部门" url="/sys/office/treeData?type=2" cssClass=" form-control input-sm" allowClear="true" />
+
+		</div>
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th style="text-align: center;"> 序号 </th>
+				<th style="text-align: center;"  class="sort-column name">姓名</th>
+				<th style="text-align: center;"  class="sort-column gender">性别</th>
+				<th style="text-align: center;"  class="sort-column mobilePhone">联系电话</th>
+				<th style="text-align: center;"  class="sort-column officeId">部门</th>
+				<th style="text-align: center;"  class="sort-column workstartDate">报到日期</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="userInfo" varStatus="userInfoStatus">
+			<tr>
+				<td>
+					${userInfoStatus.index + 1}
+				</td>
+				<td>
+					<c:if test="${empty userInfo.name}">
+						${userInfo.user.name}
+					</c:if>
+					<c:if test="${not empty userInfo.name}">
+						${userInfo.name}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.user.sex, 'sex', '')}
+					</c:if>
+					<c:if test="${!empty userInfo.gender}">
+						${fns:getDictLabel(userInfo.gender, 'sex', '')}
+					</c:if>
+				</td>
+				<td>
+					<c:if test="${empty userInfo.mobilePhone}">
+						${userInfo.user.mobile}
+					</c:if>
+					<c:if test="${!empty userInfo.mobilePhone}">
+						${userInfo.mobilePhone}
+					</c:if>
+				</td>
+				<td>
+					${userInfo.office.name}
+				</td>
+				<td>
+					<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 204 - 0
src/main/webapp/webpage/modules/hr/userInfoView.jsp

@@ -0,0 +1,204 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>人员基本信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="userInfo" class="form-horizontal">
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">姓名:</label></td>
+					<td class="width-35">
+						<c:if test="${not empty userInfo.name}">${userInfo.name}</c:if>
+						<c:if test="${empty userInfo.name}">${userInfo.user.name}</c:if>
+					</td>
+					<td class="width-15 active"><label class="pull-right">性别:</label></td>
+					<td class="width-35">
+						<c:if test="${not empty userInfo.gender}">
+							${fns:getDictLabel(userInfo.gender,'sex' ,'' )}
+						</c:if>
+						<c:if test="${empty userInfo.gender}">
+							${fns:getDictLabel(userInfo.user.sex,'sex' ,'' )}
+						</c:if>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">昵称:</label></td>
+					<td class="width-35">
+						${userInfo.nickName}
+					</td>
+					<td class="width-15 active"><label class="pull-right">工号:</label></td>
+					<td class="width-35">
+						${userInfo.jobNumber}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">最高学历:</label></td>
+					<td class="width-35">
+						${fns:getDictLabel(userInfo.highestDegree,'education_level','')}
+					</td>
+					<td class="width-15 active"><label class="pull-right">最高学历院校:</label></td>
+					<td class="width-35">
+						${userInfo.highestSchool}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">最高学历专业:</label></td>
+					<td class="width-35">
+						${userInfo.highestProfession}
+					</td>
+					<td class="width-15 active"><label class="pull-right">最高学历毕业时间:</label></td>
+					<td class="width-35">
+						<fmt:formatDate value="${userInfo.highestGraduationTime}" pattern="yyyy-MM-dd"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">第一学历:</label></td>
+					<td class="width-35">
+						${fns:getDictLabel(userInfo.firstDegree,'education_level','')}
+					</td>
+					<td class="width-15 active"><label class="pull-right">第一学历院校:</label></td>
+					<td class="width-35">
+						${userInfo.firstSchool}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">第一学历专业:</label></td>
+					<td class="width-35">
+						${userInfo.firstProfession}
+					</td>
+					<td class="width-15 active"><label class="pull-right">第一学历毕业时间:</label></td>
+					<td class="width-35">
+						<fmt:formatDate value="${userInfo.firstGraduationTime}" pattern="yyyy-MM-dd"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">出生日期:</label></td>
+					<td class="width-35">
+						<fmt:formatDate value="${userInfo.birthday}" pattern="yyyy-MM-dd"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">身份证号:</label></td>
+					<td class="width-35">
+						${userInfo.idCard}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">职称:</label></td>
+					<td class="width-35">
+						${userInfo.professionalTitle}
+					</td>
+					<td class="width-15 active"><label class="pull-right">获取职称日期:</label></td>
+					<td class="width-35">
+						<fmt:formatDate value="${userInfo.professionalGetdate}" pattern="yyyy-MM-dd"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">社保账号:</label></td>
+					<td class="width-35">
+						${userInfo.socialInsuranceAccount}
+					</td>
+					<td class="width-15 active"><label class="pull-right">医保账号:</label></td>
+					<td class="width-35">
+						${userInfo.medicalInsuranceAccount}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">银行账号:</label></td>
+					<td class="width-35">
+						${userInfo.bankAccount}
+					</td>
+					<td class="width-15 active"><label class="pull-right">公积金账号:</label></td>
+					<td class="width-35">
+						${userInfo.providentFundAccount}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">QQ号:</label></td>
+					<td class="width-35">
+						${userInfo.qq}
+					</td>
+					<td class="width-15 active"><label class="pull-right">微信号:</label></td>
+					<td class="width-35">
+						${userInfo.weixin}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">联系电话:</label></td>
+					<td class="width-35">
+						<c:if test="${not empty userInfo.mobilePhone}">${userInfo.mobilePhone}</c:if>
+						<c:if test="${empty userInfo.mobilePhone}">${userInfo.user.mobile}</c:if>
+					</td>
+					<td class="width-15 active"><label class="pull-right">电子邮件:</label></td>
+					<td class="width-35">
+						${userInfo.email}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">是否造价师(0否,1是):</label></td>
+					<td class="width-35">
+						${fns:getDictLabel(userInfo.isCostengineer,'is_costEngineer','')}
+
+					</td>
+					<td class="width-15 active"><label class="pull-right">造价师取得日期:</label></td>
+					<td class="width-35">
+						<fmt:formatDate value="${userInfo.costengineerGetdate}" pattern="yyyy-MM-dd"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">报到日期:</label></td>
+					<td class="width-35">
+						<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">试用岗位:</label></td>
+					<td class="width-35">
+						${userInfo.probationPosition}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">试用期(n个月):</label></td>
+					<td class="width-35">
+						${userInfo.probationDuration}
+					</td>
+					<td class="width-15 active"><label class="pull-right">试用结束日期:</label></td>
+					<td class="width-35">
+						<fmt:formatDate value="${userInfo.probationEnddate}" pattern="yyyy-MM-dd"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">职业资格:</label></td>
+					<td class="width-35">
+						${userInfo.professionalQualification}
+					</td>
+					<td class="width-15 active"><label class="pull-right">从事专业:</label></td>
+					<td class="width-35">
+						${userInfo.engagedJob}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">其他资质:</label></td>
+					<td class="width-35" colspan="3">
+						${userInfo.otherQualification}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">个人简介:</label></td>
+					<td class="width-35" colspan="3">
+						${userInfo.personalProfile}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+					<td class="width-35" colspan="3">
+						${userInfo.remarks}
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 187 - 0
src/main/webapp/webpage/modules/iim/chatHistoryList.jsp

@@ -0,0 +1,187 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>聊天管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			laydate({
+	            elem: '#createDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+	            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+	        });
+		});
+	   function search(){//查询,页码清零
+			$("#pageNo").val(0);
+			$("#searchForm").submit();
+	   		return false;
+	   }
+
+		function reset(){//重置,页码清零
+			$("#pageNo").val(0);
+			$("#searchForm div.form-group input").val("");
+			$("#searchForm div.form-group select").val("");
+			$("#searchForm").submit();
+	  		return false;
+	 	 }
+		function sortOrRefresh(){//刷新或者排序,页码不清零
+			
+			$("#searchForm").submit();
+	 		return false;
+	 	}
+		function page(n,s){//翻页
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+			$("span.page-size").text(s);
+			return false;
+		}
+	</script>
+</head>
+<body>
+
+<div class="wrapper wrapper-content">
+
+         <div class="contentShadow layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="chatHistory" action="${ctx}/iim/chatHistory/" method="post" class="form-inline">
+					<input type="hidden" name="userid1" value="${chatHistory.userid1 }"/>
+					<input type="hidden" name="userid2" value="${chatHistory.userid2 }"/>
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+                    <div style="width: 100%;height:60px;">
+                        <label class="layui-form-label" style="margin-top:5px;">消息内容:</label>
+                        <div class="layui-input-block">
+                            <form:input path="msg" htmlEscape="false" maxlength="64" cssStyle="width: 250px;margin-top: 10px;"  class=" form-control layui-input"/>
+                        </div>
+                        <div class="layui-input-block">
+                        <button id="searchQuery" class="fixed-btn searchQuery fr" style="margin-top: -30px;" onclick="search()">查询</button>
+                        </div>
+                    </div>
+				</form:form>
+         </div>
+
+                <div class="ibox chat-view">
+                    <div class="ibox-content">
+                        <div class="row">
+
+                            <div class="col-md-12 ">
+                                <div class="chat-discussion">
+								<c:forEach items="${page.list}" var="chatHistory">
+									<c:if test="${fn:contains(chatHistory.userid1, '_msg_')}"><!-- 如果是群组信息,取出实际的发送者信息 -->
+										<c:set var="userid1" value="${fn:substringAfter(chatHistory.userid1, '_msg_')}"/>
+									</c:if>
+									<c:if test="${fn:contains(chatHistory.userid1, '_msg_') == false}"><!-- 如果是群组信息,取出实际的发送者信息 -->
+										<c:set var="userid1" value="${chatHistory.userid1}"/>
+									</c:if>
+									<c:if test="${fns:getUser().id != userid1}">
+									<div class="chat-message chat-message-left">
+                                        <img class="message-avatar" src="${fns:getUserById(userid1).photo}" alt="">
+                                        <div class="message">
+                                            <a class="message-author" href="javascript:void(0)"> ${fns:getUserById(userid1).name}</a>
+                                            <span class="message-date"> <fmt:formatDate value="${chatHistory.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/> </span>
+                                            <span class="message-content">
+                                            
+                                            <c:if test="${fn:contains(chatHistory.msg, 'img[')}">
+											   <img src="${fn:substring(chatHistory.msg, 4, fn:length(chatHistory.msg)-1)}"/>
+											</c:if>
+											<c:if test="${fn:contains(chatHistory.msg, 'img[')==false}">
+											${chatHistory.msg}
+                                            </c:if>
+                                        </div>
+                                    </div>
+                                    </c:if>
+                                    <c:if test="${fns:getUser().id == userid1}">
+									<div class="chat-message chat-message-right">
+                                        <img class="message-avatar" src="${fns:getUserById(userid1).photo}" alt="">
+                                        <div class="message">
+                                            <a class="message-author" href="javascript:void(0)"> ${fns:getUserById(userid1).name}</a>
+                                            <span class="message-date"> <fmt:formatDate value="${chatHistory.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/> </span>
+                                            <span class="message-content">
+											<c:if test="${fn:contains(chatHistory.msg, 'img[')}">
+											   <img src="${fn:substring(chatHistory.msg, 4, fn:length(chatHistory.msg)-1)}"/>
+											</c:if>
+											<c:if test="${fn:contains(chatHistory.msg, 'img[')==false}">
+											${chatHistory.msg}
+                                            </c:if>
+                                            </span>
+                                        </div>
+                                    </div>
+                                    </c:if>
+									</c:forEach>
+                         
+                                </div>
+
+                            </div>
+                            <!-- 
+                            <div class="col-md-3">
+                                <div class="chat-users">
+
+
+                                    <div class="users-list">
+                                        <div class="chat-user">
+                                            <img class="chat-avatar" src="img/a4.jpg" alt="">
+                                            <div class="chat-user-name">
+                                                <a href="javascript:void(0)">伤城Simple</a>
+                                            </div>
+                                        </div>
+                                        <div class="chat-user">
+                                            <img class="chat-avatar" src="img/a1.jpg" alt="">
+                                            <div class="chat-user-name">
+                                                <a href="javascript:void(0)">从未出现过的风景__</a>
+                                            </div>
+                                        </div>
+                                        <div class="chat-user">
+                                            <span class="pull-right label label-primary">在线</span>
+                                            <img class="chat-avatar" src="img/a2.jpg" alt="">
+                                            <div class="chat-user-name">
+                                                <a href="javascript:void(0)">冬伴花暖</a>
+                                            </div>
+                                        </div>
+                                        <div class="chat-user">
+                                            <span class="pull-right label label-primary">在线</span>
+                                            <img class="chat-avatar" src="img/a3.jpg" alt="">
+                                            <div class="chat-user-name">
+                                                <a href="javascript:void(0)">ZM敏姑娘	</a>
+                                            </div>
+                                        </div>
+                                        <div class="chat-user">
+                                            <img class="chat-avatar" src="img/a5.jpg" alt="">
+                                            <div class="chat-user-name">
+                                                <a href="javascript:void(0)">才越越</a>
+                                            </div>
+                                        </div>
+                                        <div class="chat-user">
+                                            <img class="chat-avatar" src="img/a6.jpg" alt="">
+                                            <div class="chat-user-name">
+                                                <a href="javascript:void(0)">时光十年TENSHI</a>
+                                            </div>
+                                        </div>
+                                        <div class="chat-user">
+                                            <img class="chat-avatar" src="img/a2.jpg" alt="">
+                                            <div class="chat-user-name">
+                                                <a href="javascript:void(0)">刘顰颖</a>
+                                            </div>
+                                        </div>
+                                        <div class="chat-user">
+                                            <span class="pull-right label label-primary">在线</span>
+                                            <img class="chat-avatar" src="img/a3.jpg" alt="">
+                                            <div class="chat-user-name">
+                                                <a href="javascript:void(0)">陈泳儿SccBaby</a>
+                                            </div>
+                                        </div>
+
+
+                                    </div>
+
+                                </div>
+                            </div>
+							-->
+                        </div>
+
+                    </div>
+        	</div>
+		 	<table:page page="${page}"></table:page>
+    </div>
+</body>
+</html>

+ 195 - 0
src/main/webapp/webpage/modules/iim/contacts.jsp

@@ -0,0 +1,195 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+
+<head>
+
+    <title>通讯录</title>
+    <meta name="decorator" content="default"/>
+
+
+	<script type="text/javascript">
+	
+		function search(n,s){
+			$("#searchForm").attr("action","${ctx}/iim/contact/index");
+			$("#searchForm").submit();
+	    	return false;
+	    }
+	</script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+</head>
+
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="contentShadow layui-row" id="queryDiv">
+                <div class="commonQuery">
+                    <form:form id="searchForm" modelAttribute="user" action="${ctx}/iim/contact/index" method="post" class="input-group">
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">查找联系人:</label>
+                        <div class="layui-input-block">
+                            <form:input path="name" htmlEscape="false" maxlength="50" placeholder="请输入联系人" class="layui-input form-control"/>
+                        </div>
+                    </div>
+                        <div class="layui-item athird fr">
+                            <div class="input-group">
+                                <button id="searchReset" style="margin-right: 0px;" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+                                <button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+                            </div>
+                        </div>
+                    <div style="    clear:both;"></div>
+                    </form:form>
+                </div>
+
+            </div>
+        </div>
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <span style="margin-bottom: 5px;" class="pull-right small text-muted">${fn:length(list)} 个联系人</span>
+                <table class="oa-table layui-table" id="contentTable" lay-filter="contentTableFilter"></table>
+
+                <!-- 分页代码 -->
+                <%--<table:page page="${page}"></table:page>--%>
+                <div style="clear: both;"></div>
+
+                        <%--<div class="clients-list">--%>
+                            <%--<ul class="nav nav-tabs">--%>
+                                <%--<span class="pull-right small text-muted">${fn:length(list)} 个联系人</span>--%>
+                            <%--</ul>--%>
+                            <%--<div class="tab-content">--%>
+                                <%--<div id="tab-1" class="tab-pane active">--%>
+                                    <%--<div class="full-height-scroll">--%>
+                                        <%--<div class="table-responsive">--%>
+                                            <%--<table class="table table-striped table-hover">--%>
+                                                <%--<tbody>--%>
+                                              <%----%>
+                                               <%--<c:forEach items="${list}" var="user">--%>
+													<%--<tr>--%>
+														<%--<td class="client-avatar"><img alt="image" src="${user.photo}"> </td>--%>
+														<%--<td><a data-toggle="tab" href="#contact-1" class="client-link">${user.name}</a>--%>
+														<%--<td>${user.office.name}</td>--%>
+														<%--<td class="contact-type"><i class="fa fa-envelope"> </i>--%>
+                                                        <%--</td>--%>
+                                                        <%--<td> ${user.email}</td>--%>
+                                                        <%--<td class="contact-type"><i class="fa fa-mobile"> </i>--%>
+                                                        <%--</td>--%>
+                                                        <%--<td>${user.mobile}</td>--%>
+                                                        <%--<td class="contact-type"><i class="fa fa-phone"> </i>--%>
+                                                        <%--</td>--%>
+                                                        <%--<td>${user.phone}</td>--%>
+                                                         <%--<td class="contact-type">--%>
+                                                        <%--</td>--%>
+                                                          <%--<td class="contact-type">--%>
+                                                        <%--</td>--%>
+                                                         <%--<td class="client-status">--%>
+                                                         <%--<c:if test="${user.loginFlag == '1'}">--%>
+                                                         	<%--<span class="label label-primary">激活</span>--%>
+                                                         <%--</c:if>--%>
+                                                          <%--<c:if test="${user.loginFlag == '0'}">--%>
+                                                         	<%--<span class="label label-error">未激活</span>--%>
+                                                         <%--</c:if>--%>
+                                                        <%----%>
+                                                        <%--</td>--%>
+													<%--</tr>--%>
+												<%--</c:forEach>--%>
+                                                <%--</tbody>--%>
+                                            <%--</table>--%>
+                                        <%--</div>--%>
+                                    <%--</div>--%>
+                                <%--</div>--%>
+                   <%----%>
+                            <%--</div>--%>
+
+                        <%--</div>--%>
+            </div>
+        </div>
+    </div>
+    <div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${fn:length(list)}
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                // {title:"头像",align:'center', width:50,templet:function(d){
+                //         return "<img alt=\"image\" width=\"40px\" height=\"40px\" src=\""+d.photo+"\">";
+                //     }}
+                // ,
+                {field:'name',align:'center', title: '姓名',width:150,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"#\" >" +
+                            d.name +
+                            "</a>";
+                        return xml;
+                    }}
+                ,{field:'depart',align:'center', title: '部门',minWidth:150}
+                ,{field:'email',align:'center', title: '电子信箱', minWidth:150}
+                ,{field:'phone', align:'center',title: '手机号',width:150}
+                ,{field:'tel', align:'center',title: '固定电话',width:150}
+                ,{field:'op',align:'center',title:"操作",width:250,templet:function(d){
+                        ////对操作进行初始化
+                        var xml = "<a href=\"${ctx}/iim/mailCompose/sendLetter?id="+ d.id +"\" class=\"op-btn op-btn-view\"><i class=\"fa fa-envelope\"> 站内信</i></a>";
+                        xml+="<a class=\"op-btn op-btn-add\"><i class=\"fa fa-qq\"> 即时聊天</i></a>";
+                        if(d.active != undefined && d.active == "1")
+                            xml +="<a href=\"javascript:void(0);\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 激活</a>"
+                        else
+                            xml +="<a href=\"javascript:void(0);\"  class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 未激活</a>";
+                        return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty list}">
+                <c:forEach items="${list}" var="user" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${user.id}"
+                    ,"photo":"${user.photo}"
+                    ,"name":"${user.name}"
+                    ,"depart":"${user.office.name}"
+                    ,"email":"${user.email}"
+                    ,"phone":"${user.mobile}"
+                    ,"tel":"${user.phone}"
+                    <c:if test="${user.loginFlag == '1'}">,"active":"1"</c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+    })
+
+    resizeListTable(250);/*消除由于有竖向滚动条造成table出现横向滚动条*/
+</script>
+
+
+    <!-- 全局js -->
+
+    <script>
+        $(function () {
+            $('.full-height-scroll').slimScroll({
+                height: '100%'
+            });
+        });
+    </script>
+
+<script type="text/javascript">
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+
+</body>
+
+</html>

+ 232 - 0
src/main/webapp/webpage/modules/iim/layGroupForm.jsp

@@ -0,0 +1,232 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>群组管理</title>
+	<meta name="decorator" content="default"/>
+	<%--<style type="text/css">--%>
+		<%--img {width:50px; height:50px;}--%>
+	<%--</style>--%>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			
+		});
+        //上传图片
+        function this_upload_image_button(index){
+            // var length = $("#this_upload_image_div :file").length;
+            // var this_item_id = 'this_upload_image_'+index;
+            // var last_item_id = $('img[id^=this_upload_image_]:last').attr('id');
+            // if(length==6 && this_item_id==last_item_id){
+            //     top.layer.alert('最多上传5张图片',{icon:0,title:'系统提示'});
+            //     return;
+            // }
+            $("#this_upload_file_"+index).click();
+        }
+        function this_upload_show_image(index){
+            var obj =$("#this_upload_file_"+index)[0].files[0];
+            var fileType = obj.type;
+            var url ;
+            if(fileType.endsWith("png")||fileType.endsWith("bmp")||fileType.endsWith("jpg")||fileType.endsWith("jpeg")){
+                url = window.URL.createObjectURL(obj);
+            }else {
+                //需要置空
+                // var file = $("#this_upload_file_"+index);
+                // file.after(file.clone().val(""));
+                // file.remove();
+                // top.layer.alert('请上传*.png,*.bmp,*.jpg/jpeg格式的图片',{icon:0,title:'系统提示'});
+                // return false ;
+                $("#this_upload_msg").css({"color":"red"});
+                this_close_img(index);
+                return false ;
+            }
+            // $("#this_upload_image_"+index).attr("src",url);
+            // var length = $("#this_upload_image_div :file").length;
+            // var this_item_id = 'this_upload_image_'+index;
+            // var last_item_id = $('img[id^=this_upload_image_]:last').attr('id');
+            // if( this_item_id==last_item_id &&  length < 6 ){
+            //     this_upload_image_append(index);
+            //     this_add_x(index);
+            // }
+            $("#this_upload_msg").removeAttr("style");
+            $("#this_upload_image_"+index).attr("src",url);
+            var length = $("#this_upload_image_div :file").length;
+            if( index == length &&  length < 1 ){
+                this_upload_image_append(index);
+                this_add_x(index);
+            }else if(index == length && length ==1){
+                var span = '<span id="this_upload_close_'+index+'" class="close_ico" style="cursor:pointer; position: absolute;top:-1px;right: -1px; display:inline-block;height:20px;line-height:20px;font-size:20px;z-index:1;color: red;" onclick="this_close_img('+index+');">x</span>';
+                $("#this_upload_image_1").before(span);
+            }
+        }
+        function this_upload_image_append(index){
+            var div1 = "<div id='this_upload_div_"+(index+1)+"'>";
+            var img = '<img  id="this_upload_image_'+(index+1)+'" class="upload_ico" onclick="this_upload_image_button('+(index+1)+')" src = "${pageContext.request.contextPath}/static/uploadify/upload_ico.png" style="cursor:pointer;"/>';
+            var input = '<input id="this_upload_file_'+(index+1)+'" type="file" style="display:none;" name="this_upload_files" onChange="this_upload_show_image('+(index+1)+')" /><br>';
+            var div2 = "</div>";
+
+            $("#this_upload_image_div").append(div1+img+input+div2);
+        }
+        function this_close_img(index) {
+            $("#this_upload_div_"+index).remove();
+            var length = $("#this_upload_image_div :file").length;
+            if(length == 0){
+                this_add_div();
+            }else if(length == 1){
+                var x = $("#this_upload_image_div").find("span").text();
+                if("x" != x){
+                    this_add_div();
+                }
+            }
+        }
+        function this_add_x(index) {
+            // var span = '<span id="this_upload_close_'+index+'" class="close_ico" style="cursor:pointer; position: absolute;top:-1px;right: -1px; display:inline-block;z-index:1;color: red;" onclick="this_close_img('+index+');">x</span>';
+            // $("#this_upload_image_div").find("img:eq(-2)").before(span);
+            var span = '<span id="this_upload_close_'+index+'" class="close_ico" style="cursor:pointer; position: absolute;top:-1px;right: -1px; display:inline-block;height:20px;line-height:20px;font-size:20px;z-index:1;color: red;" onclick="this_close_img('+index+');">x</span>';
+            $("#this_upload_image_div").find("img:eq(-2)").before(span);
+        }
+        function this_add_div() {
+            <%--var this_upload_div_1 =--%>
+                <%--'<div id="this_upload_div_1" style="float: left;position:relative;width: 57px;height: 57px;" >'+--%>
+                <%--'<img  id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/uploadify/upload_ico.png"  onclick="this_upload_image_button(1)"/>'+--%>
+                <%--'<input id="this_upload_file_1" type="file" style="display:none"  name="this_upload_files"  onchange="this_upload_show_image(1)" /><br>'+--%>
+                <%--'</div>';--%>
+            <%--$("#this_upload_image_div").html("").append(this_upload_div_1);--%>
+            var this_upload_div_1 =
+                '<div id="this_upload_div_1" style="position:relative;">'+
+                '<img  id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png"  onclick="this_upload_image_button(1)"/>'+
+                '<input id="this_upload_file_1" type="file" style="display:none"  name="this_upload_files"  onchange="this_upload_show_image(1)" /><br>'+
+                '</div>';
+            $("#this_upload_image_div").html("").append(this_upload_div_1);
+        }
+
+        <%--//删除附件--%>
+        <%--function delFile(id,attaId,attachmentUrl,obj) {--%>
+            <%--var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});--%>
+            <%--var tr = $(obj).parent().parent();--%>
+            <%--$.ajax({--%>
+                <%--type:'POST',--%>
+                <%--dataType:'json',--%>
+                <%--url:'${ctx}/work/report/workReport/delFile',--%>
+                <%--data:{"id":id,"attaId":attaId,"attachmentUrl":attachmentUrl},--%>
+                <%--cache:false,--%>
+                <%--success: function() {--%>
+                    <%--//先修改序号,再删除--%>
+                    <%--$(tr).nextAll().each(function (i,n) {--%>
+                        <%--var num = $(n).find("td:first").text().trim();--%>
+                        <%--$(n).find("td:first").text(parseInt(num)-1);--%>
+                    <%--});--%>
+                    <%--tr.remove();--%>
+                    <%--parent.layer.msg("删除成功!!!",{icon:6});--%>
+                    <%--parent.layer.close(loadingMessage);--%>
+                <%--},--%>
+                <%--error:function () {--%>
+                    <%--parent.layer.msg("删除失败!!!",{icon:3});--%>
+                    <%--parent.layer.close(loadingMessage);--%>
+                <%--}--%>
+            <%--});--%>
+        <%--}--%>
+		<%--function addRow(list, idx, tpl, row){--%>
+			<%--$(list).append(Mustache.render(tpl, {--%>
+				<%--idx: idx, delBtn: true, row: row--%>
+			<%--}));--%>
+			<%--$(list+idx).find("select").each(function(){--%>
+				<%--$(this).val($(this).attr("data-value"));--%>
+			<%--});--%>
+			<%--$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){--%>
+				<%--var ss = $(this).attr("data-value").split(',');--%>
+				<%--for (var i=0; i<ss.length; i++){--%>
+					<%--if($(this).val() == ss[i]){--%>
+						<%--$(this).attr("checked","checked");--%>
+					<%--}--%>
+				<%--}--%>
+			<%--});--%>
+		<%--}--%>
+		<%--function delRow(obj, prefix){--%>
+			<%--var id = $(prefix+"_id");--%>
+			<%--var delFlag = $(prefix+"_delFlag");--%>
+			<%--if (id.val() == ""){--%>
+				<%--$(obj).parent().parent().remove();--%>
+			<%--}else if(delFlag.val() == "0"){--%>
+				<%--delFlag.val("1");--%>
+				<%--$(obj).html("&divide;").attr("title", "撤回删除");--%>
+				<%--$(obj).parent().parent().addClass("error");--%>
+			<%--}else if(delFlag.val() == "1"){--%>
+				<%--delFlag.val("0");--%>
+				<%--$(obj).html("&times;").attr("title", "删除");--%>
+				<%--$(obj).parent().parent().removeClass("error");--%>
+			<%--}--%>
+		<%--}--%>
+	</script>
+	<style>
+		.form-top{
+			padding-top: 40px;
+			margin-left: 15px;
+			margin-right: 15px;
+		}
+	</style>
+</head>
+<body>
+	<form:form id="inputForm" modelAttribute="layGroup" enctype="multipart/form-data" action="${ctx}/iim/layGroup/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>
+		<div class="container1">
+			<div class="form-top">
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">群组名:</label>
+					<div class="layui-input-block">
+						<form:input path="groupname" htmlEscape="false" maxlength="64" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12" style="height:180px;">
+					<label class="layui-form-label">群头像:</label>
+					<div class="layui-input-block">
+						<div class="pic_box_wrapper">
+							<div class="pic_box">
+								<div id="this_upload_image_div">
+									<div id="this_upload_div_1" style="position:relative;">
+										<img alt="_blank" id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png"  onclick="this_upload_image_button(1)"/>
+										<input id="this_upload_file_1" type="file" style="display:none"  name="this_upload_files"  onchange="this_upload_show_image(1)"  class="form-control required"/>
+									</div>
+								</div>
+							</div>
+						</div>
+						<span id="this_upload_msg">请上传*.png,*.bmp,*.jpg/jpeg格式的图片</span>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12 with-textarea">
+					<label class="layui-form-label">备注信息:</label>
+					<div class="layui-input-block">
+						<form:textarea path="remarks" htmlEscape="false" rows="4" style="resize:none;" maxlength="255" class="form-control "/>
+					</div>
+				</div>
+
+			</div>
+		</div>
+	</form:form>
+</body>
+</html>

+ 166 - 0
src/main/webapp/webpage/modules/iim/layGroupList.jsp

@@ -0,0 +1,166 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>群组管理</title>
+	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/common/css/animate.css" rel="stylesheet">
+	<script type="text/javascript">
+		$(document).ready(function() {
+			top.$.jBox.closeTip();
+		});
+	    function searchFriend(layGroupId){
+			top.layer.open({
+			    type: 2,  
+			    area: ['80%','80%'],
+			    title:"添加群组成员",
+			    name:'friend',
+			    content: "${ctx}/iim/contact/searchUsers?comId=comId" ,
+			    btn: ['确定', '关闭'],
+			    yes: function(index, layero){
+			    	 var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+			    	 var ids = iframeWin.getSelectedIds();
+
+			    	 if(ids == "-1"){
+				    	 return;
+			    	 }
+			    	 window.location = "${ctx}/iim/layGroup/addUser?ids="+ids+"&groupid="+layGroupId+"&comId=comId";
+					 top.layer.close(index);//关闭对话框。
+				  },
+				  cancel: function(index){ 
+	    	       }
+			}); 
+		};
+
+		function addGroup(){
+			openDialog("创建群组","${ctx}/iim/layGroup/form","800px", "500px");
+
+		}
+	</script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+        .contact-box a,
+        .contact-box a:hover{
+            color:#333333;
+        }
+        .contact-box a.white,
+        .contact-box a.white:hover{
+            color:#ffffff;
+        }
+    </style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div id="queryDiv">
+            </div>
+        </div>
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+
+                <br class="row">
+            
+                <c:forEach items="${layGrouplist}" var="layGroup">
+                        <div class="col-sm-4" style="padding: 0">
+                            <div style="padding: 0 15px 15px 15px;">
+                        <div class="contact-box">
+                            <div class="ibox-title">
+                                 <a href="javascript:void(0)"><img alt="member" class="img-circle" src="${layGroup.avatar}" width="50px" height="50px">
+                                    ${layGroup.groupname}</a>
+
+                                <span class=" pull-right">
+                                <c:if test="${layGroup.createBy.name == fns:getUser().name}">
+                                    <a href="${ctx}/iim/layGroup/delete?id=${layGroup.id}" onclick="return confirmx('确认要解散该群组吗?', this.href)"   class="btn btn-danger white btn-xs"> 解散</a>
+                                </c:if>
+                                 <c:if test="${layGroup.createBy.name != fns:getUser().name}">
+                                        <a href="${ctx}/iim/layGroup/logout?user.id=${fns:getUser().id}&group.id=${layGroup.id}" onclick="return confirmx('确认要退出该群组吗?', this.href)"   class="btn btn-danger btn-xs white"> 退出</a>
+                                </c:if>
+                                </span>
+                            </div>
+                            <div class="ibox-content">
+                                <div class="team-members">
+
+                                        <%--<a href="javascript:void(0)" style="float:left"><img  class="img-circle" src="${layGroup.createBy.photo}">
+                                        ${layGroup.createBy.name}(群主)</a>--%>
+                                     <c:forEach items="${layGroup.layGroupUserList}" var="layGroupUser">
+
+                                        <c:if test="${layGroup.createBy.id == fns:getUser().id}">
+                                            <c:choose>
+                                                <c:when test="${layGroup.createBy.id != layGroupUser.user.id}">
+                                                    <div class="ibox-tools" style="float:left">
+                                                        <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)"><img  class="img-circle" src="${layGroupUser.user.photo}">
+                                                                ${layGroupUser.user.name}</a>
+                                                        <ul class="dropdown-menu dropdown-user">
+                                                            <li>
+                                                                <a href="${ctx}/iim/layGroup/logout?user.id=${layGroupUser.user.id}&group.id=${layGroup.id}" onclick="return confirmx('确认要删除该成员吗?', this.href)" > 删除</a>
+                                                            </li>
+                                                        </ul>
+                                                    </div>
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <div class="ibox-tools" style="float:left">
+                                                        <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)"><img  class="img-circle" src="${layGroupUser.user.photo}">
+                                                                ${layGroupUser.user.name}(群主)</a>
+                                                    </div>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:if>
+                                        <c:if test="${layGroup.createBy.id != fns:getUser().id}">
+                                                <a href="javascript:void(0)"><img  class="img-circle" src="${layGroupUser.user.photo}">
+                                                ${layGroupUser.user.name}</a>
+                                        </c:if>
+                                      </c:forEach>
+                                     <c:if test="${layGroup.createBy.name == fns:getUser().name}">
+                                        <a href="javascript:void(0)" onclick="searchFriend('${layGroup.id}')"><img  class="img-circle" src="${ctxStatic}/images/add_user.jpg">
+                                            添加</a>
+                                    </c:if>
+                                </div>
+                                <h4>群组简介</h4>
+                                <p>
+                                        ${layGroup.remarks}
+                                </p>
+
+                            </div>
+                        </div>
+                            </div>
+                        </div>
+                </c:forEach>
+                 <div class="col-sm-4" style="padding: 0">
+                         <div style="padding: 0 15px 15px 15px;">
+                            <div class="contact-box">
+                                <a href="javascript:void(0)" onclick="addGroup()">
+                                    <div class="col-sm-4">
+                                        <div class="text-center">
+                                            <img alt="image" style="height:140px;width:140px" class="img-circle m-t-xs img-responsive" src="${ctxStatic}/images/add_user.jpg">
+                                            <div class="m-t-xs font-bold"></div>
+                                        </div>
+                                    </div>
+                                    <div class="col-sm-8">
+                                        <br/>
+                                        <h1><strong>创建群组</strong></h1>
+                                    </div>
+                                    <div class="clearfix"></div>
+                                </a>
+                            </div>
+                         </div>
+                </div>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+    resizeListWindow3();
+    $(window).resize(function(){
+        resizeListWindow3();
+    });
+</script>
+</body>
+</html>

+ 175 - 0
src/main/webapp/webpage/modules/iim/mailBoxDetail.jsp

@@ -0,0 +1,175 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<!DOCTYPE html>
+<html>
+
+<head>
+
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+
+    <title>查看邮件</title>
+   	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+        .content-height{
+            height:calc(100% - 8px);
+        }
+        /*.note-editable{*/
+            /*min-height: 200px;*/
+        /*}*/
+    </style>
+</head>
+
+<body>
+<div class="wrapper wrapper-content full-width">
+    <sys:message content="${message}"/>
+    <div  class="pr full-height full-width">
+        <div class="fl contents col-sm-3 full-height" style="padding: 0px;">
+            <div class="layui-row  contentShadow content-height">
+                <div class="ibox-content mailbox-content">
+                    <div class="file-manager">
+                        <a style="width:inherit;" class="btn btn-block btn-primary compose-mail" href="${ctx}/iim/mailCompose/sendLetter">写信</a>
+                        <div class="space-25"></div>
+                        <h5>文件夹</h5>
+                         <ul class="folder-list m-b-md" style="padding: 0">
+                            <li>
+                                <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc"> <i class="fa fa-inbox "></i> 收件箱 <span class="label label-warning pull-right">${noReadCount}/${mailBoxCount}</span>
+                                </a>
+                            </li>
+                            <li>
+                                <a href="${ctx}/iim/mailCompose/list?status=1&orderBy=sendtime desc"> <i class="fa fa-envelope-o"></i> 已发送 <span class="label label-info pull-right">${mailComposeCount}</span></a>
+                            </li>
+                            <!--  等待下个版本升级
+                            <li>
+                                <a href="mailbox.html"> <i class="fa fa-envelope"></i> 群邮件</a>
+                            </li>
+                            -->
+                            <li>
+                                <a href="${ctx}/iim/mailCompose/list?status=0&orderBy=sendtime desc"> <i class="fa fa-file-text-o"></i> 草稿箱 <span class="label label-danger pull-right">${mailDraftCount}</span>
+                                </a>
+                            </li>
+                            <!-- 等待下个版本升级 by刘高峰
+                            <li>
+                                <a href="mailbox.html"> <i class="fa fa-trash-o"></i> 垃圾箱</a>
+                            </li>
+                            -->
+                        </ul>
+                        <h5>分类</h5>
+                        <ul class="category-list" style="padding: 0">
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-navy"></i> 工作</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-danger"></i> 文档</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-primary"></i> 社交</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-info"></i> 广告</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-warning"></i> 客户端</a>
+                            </li>
+                        </ul>
+
+                        <h5 class="tag-title">标签</h5>
+                        <ul class="tag-list" style="padding: 0">
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 朋友</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 工作</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 家庭</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 孩子</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 假期</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 音乐</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 照片</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 电影</a>
+                            </li>
+                        </ul>
+                        <div class="clearfix"></div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div  class="fl contents col-sm-9 full-height" style="padding: 0px;">
+            <div class="layui-row contentShadow content-height" style="overflow-y: auto;">
+                <div>
+                    <div style="height:30px;padding: 16px;">
+                        <div class="pull-right tooltip-demo">
+                            <a href="${ctx}/iim/mailCompose/replyLetter?id=${mailBox.id}" class="nav-btn nav-btn-add" data-toggle="tooltip" data-placement="top" title="回复"><i class="fa fa-reply"></i> 回复</a>
+                            <a href="javascript:void(0)" class="nav-btn nav-btn-export" data-toggle="tooltip" data-placement="top" title="打印邮件"><i class="fa fa-print"></i> </a>
+                            <a href="javascript:void(0)" class="nav-btn nav-btn-delete" data-toggle="tooltip" data-placement="top" title="标为垃圾邮件"><i class="fa fa-trash-o"></i> </a>
+                            <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc" style="margin-right:0px;" class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="top" title="返回"><i class="fa fa-backward"></i> 返回</a>
+                        </div>
+                        <h2>
+                            查看邮件
+                        </h2>
+                    </div>
+                </div>
+                <div class="mail-tools tooltip-demo" style="padding: 0 16px 10px 16px;">
+
+
+                    <h3>
+                        <span class="font-noraml">主题: </span>${mailBox.mail.title }
+                    </h3>
+                    <h5>
+                        <span class="pull-right font-noraml"><fmt:formatDate value="${mailBox.sendtime}" pattern="yyyy-MM-dd HH:mm:ss"/></span>
+                        <span class="font-noraml">发件人: </span>${(fns:getUserById(mailBox.sender)).name}
+                    </h5>
+                    <h5>
+                        <span class="font-noraml">收件人: </span>${(fns:getUserById(mailBox.receiver)).name}
+                    </h5>
+                </div>
+
+                <div class="mail-box" style="margin:0 16px;">
+
+
+                    <div id="content" class="mail-body">
+                       ${fns:unescapeHtml(mailBox.mail.content)}
+                    </div>
+                    <%--<div class="mail-attachment">--%>
+
+                    <%--</div>--%>
+                    <div style="clear: both;"></div>
+                </div>
+                <div class="mail-body text-right tooltip-demo" style="border:none;float: right;padding: 16px;">
+                    <a class="nav-btn nav-btn-add" href="${ctx}/iim/mailCompose/replyLetter?id=${mailBox.id}"><i class="fa fa-reply"></i> 回复</a>
+                    <!--   <a class="btn btn-sm btn-white" href="javascript:void(0)"><i class="fa fa-arrow-right"></i> 下一封</a>
+                     <button title="" data-placement="top" data-toggle="tooltip" type="button" data-original-title="打印这封邮件" class="btn btn-sm btn-white"><i class="fa fa-print"></i> 打印</button>-->
+                    <button title="" style="margin:0px;" onclick="return confirmx('确认要删除该站内信吗?', '${ctx}/iim/mailBox/delete?id=${mailBox.id}')"  data-placement="top" data-toggle="tooltip" data-original-title="删除邮件" class="nav-btn nav-btn-delete"><i class="fa fa-trash-o"></i> 删除</button>
+                    <div style="clear: both;"></div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+   
+    <script>
+        $(document).ready(function () {
+            $('.i-checks').iCheck({
+                checkboxClass: 'icheckbox_square-green',
+                radioClass: 'iradio_square-green',
+            });
+        });
+    </script>
+
+ 
+
+</body>
+
+</html>

+ 243 - 0
src/main/webapp/webpage/modules/iim/mailBoxList.jsp

@@ -0,0 +1,243 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<!DOCTYPE html>
+<html>
+
+<head>
+
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+
+    <title>收件箱</title>
+   	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+        .content-height{
+            height:calc(100% - 8px);
+        }
+    </style>
+</head>
+
+<body >
+<div class="wrapper wrapper-content full-width">
+    <sys:message content="${message}"/>
+    <div class="pr full-height full-width">
+        <div class="fl contents col-sm-3 full-height" style="padding: 0px;">
+            <div class="layui-row  contentShadow content-height">
+                <div class="ibox-content mailbox-content">
+                    <div class="file-manager">
+                        <a style="width:inherit;" class="btn btn-block btn-primary compose-mail" href="${ctx}/iim/mailCompose/sendLetter">写信</a>
+                        <div class="space-25"></div>
+                        <h5>文件夹</h5>
+                        <ul class="folder-list m-b-md" style="padding: 0">
+                            <li>
+                                <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc"> <i class="fa fa-inbox "></i> 收件箱 <span class="label label-warning pull-right">${noReadCount}/${mailBoxCount}</span>
+                                </a>
+                            </li>
+                            <li>
+                                <a href="${ctx}/iim/mailCompose/list?status=1&orderBy=sendtime desc"> <i class="fa fa-envelope-o"></i> 已发送 <span class="label label-info pull-right">${mailComposeCount}</span></a>
+                            </li>
+                            <!--  等待下个版本升级
+                            <li>
+                                <a href="mailbox.html"> <i class="fa fa-envelope"></i> 群邮件</a>
+                            </li>
+                            -->
+                            <li>
+                                <a href="${ctx}/iim/mailCompose/list?status=0&orderBy=sendtime desc"> <i class="fa fa-file-text-o"></i> 草稿箱 <span class="label label-danger pull-right">${mailDraftCount}</span>
+                                </a>
+                            </li>
+                            <!-- 等待下个版本升级 by刘高峰
+                            <li>
+                                <a href="mailbox.html"> <i class="fa fa-trash-o"></i> 垃圾箱</a>
+                            </li>
+                            -->
+                        </ul>
+                        <h5>分类</h5>
+                        <ul class="category-list" style="padding: 0">
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-navy"></i> 工作</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-danger"></i> 文档</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-primary"></i> 社交</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-info"></i> 广告</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-warning"></i> 客户端</a>
+                            </li>
+                        </ul>
+
+                        <h5 class="tag-title">标签</h5>
+                        <ul class="tag-list" style="padding: 0">
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 朋友</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 工作</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 家庭</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 孩子</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 假期</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 音乐</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 照片</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 电影</a>
+                            </li>
+                        </ul>
+                        <div class="clearfix"></div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div  class="fl contents col-sm-9 full-height" style="padding: 0px;">
+            <div class="layui-row contentShadow content-height">
+                <div style="overflow-y: auto;height:calc(100% - 8px);">
+                    <div style="height:80px;padding: 16px;">
+
+                        <form:form  id="searchForm" modelAttribute="mailBox" action="${ctx}/iim/mailBox/" method="post" class="pull-right mail-search">
+                            <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+                            <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+                            <table:sortColumn  id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"></table:sortColumn><!-- 支持排序 -->
+
+                            <div class="with-icon">
+                                <div class="input-group">
+                                    <form:input path="mail.title" style="height:30px;line-height:30px;" htmlEscape="false" maxlength="128"  class=" form-control layui-input" placeholder="搜索邮件标题,正文等"/>
+                                    <span class="input-group-btn">
+                                        <button id="btnSubmit" type="submit" class="btn btn-sm btn-primary" style="height:30px;line-height:30px;">
+                                            搜索
+                                        </button>
+                                    </span>
+                                </div>
+                            </div>
+
+                        </form:form>
+                        <h2>
+                            收件箱 (总计${mailBoxCount},未读${noReadCount })
+                        </h2>
+                        <div class="mail-tools tooltip-demo m-t-md">
+                            <div class="btn-group pull-right">
+                                ${page }
+                            </div>
+
+                            </button>
+                            <table:delRow url="${ctx}/iim/mailBox/deleteAll" id="contentTable"></table:delRow>
+                            <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新邮件列表"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+                            <button class="nav-btn nav-btn-edit" data-toggle="tooltip" data-placement="top" title="标为已读"><i class="fa fa-eye"></i></button>
+                            <button class="nav-btn nav-btn-query" data-toggle="tooltip" data-placement="top" title="标为重要"><i class="fa fa-exclamation"></i></button>
+
+                        </div>
+                    </div>
+                    <div class="mail-box" style="margin: 0 16px;border:none;">
+                        <div style="margin: 0 16px;">
+                            <table id="contentTable" class="table table-hover table-mail details" style="margin-bottom: 0px;">
+                                <thead>
+                                <tr>
+                                    <th style="padding: 0 8px;" width="30" class="check-mail">
+                                        <input type="checkbox" class="i-checks">
+                                    </th>
+                                    <th width="80" class="sort-column readstatus">状态</th>
+                                    <th width="100" class="sort-column sender.name">发件人</th>
+                                    <th  class="sort-column title">标题</th>
+                                    <th  class="sort-column overview">内容</th>
+                                    <th width="160" class="sort-column sendtime">时间</th>
+                                    <th width="70">操作</th>
+                                </tr>
+                                </thead>
+                                <tbody style="border-bottom: solid 1px #e7eaec;">
+
+                                <c:forEach items="${page.list}" var="mailBox">
+                                    <tr>
+                                        <td class="check-mail">
+                                            <input type="checkbox" id="${mailBox.id}" class="i-checks">
+                                        </td>
+                                        <td>
+                                            <a href="${ctx}/iim/mailBox/detail?id=${mailBox.id}">
+                                                <c:if test="${mailBox.readstatus =='0'}">
+                                                    <i class=" fa fa-envelope"> 未读</i>
+                                                </c:if>
+                                                <c:if test="${mailBox.readstatus =='1'}">
+                                                    <i class="fa fa fa-envelope-o btn-white "> 已读 </i>
+                                                </c:if>
+                                            </a>
+                                        </td>
+                                        <td class=""><a href="${ctx}/iim/mailBox/detail?id=${mailBox.id}">
+                                                ${(fns:getUserById(mailBox.sender)).name}
+                                        </a></td>
+                                        <td class=""><a href="${ctx}/iim/mailBox/detail?id=${mailBox.id}">
+
+                                                ${mailBox.mail.title}
+                                        </a></td>
+                                        <td class=""><a href="${ctx}/iim/mailBox/detail?id=${mailBox.id}">
+                                                ${mailBox.mail.overview}
+                                        </a>
+                                        </td>
+                                        <td>${fns:formatDateTime(mailBox.sendtime)}</td>
+
+                                        <td class="op-td text-center">
+                                            <a href="${ctx}/iim/mailBox/delete?id=${mailBox.id}" onclick="return confirmx('确认要删除该站内信吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
+                                        </td>
+                                    </tr>
+                                </c:forEach>
+
+                                </tbody>
+                            </table>
+                        </div>
+
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
+
+
+
+    <script>
+      
+        
+	   function search(){//查询,页码清零
+			$("#pageNo").val(0);
+			$("#searchForm").submit();
+	   		return false;
+	   }
+
+		function reset(){//重置,页码清零
+			$("#pageNo").val(0);
+			$("#searchForm div.form-group input").val("");
+			$("#searchForm div.form-group select").val("");
+			$("#searchForm").submit();
+	  		return false;
+	 	 }
+		function sortOrRefresh(){//刷新或者排序,页码不清零
+			
+			$("#searchForm").submit();
+	 		return false;
+	 	}
+		function page(n,s){//翻页
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+			$("span.page-size").text(s);
+			return false;
+		}
+    </script>
+
+
+</body>
+
+</html>

+ 171 - 0
src/main/webapp/webpage/modules/iim/mailComposeDetail.jsp

@@ -0,0 +1,171 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<!DOCTYPE html>
+<html>
+
+<head>
+
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+
+    <title>查看邮件</title>
+   	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+        .content-height{
+            height:calc(100% - 8px);
+        }
+    </style>
+</head>
+
+<body>
+<div class="wrapper wrapper-content full-width">
+    <sys:message content="${message}"/>
+    <div  class="pr full-height full-width">
+        <div class="fl contents col-sm-3 full-height" style="padding: 0px;">
+            <div class="layui-row  contentShadow content-height">
+                <div class="ibox-content mailbox-content">
+                    <div class="file-manager">
+                        <a style="width:inherit;" class="btn btn-block btn-primary compose-mail" href="${ctx}/iim/mailCompose/sendLetter">写信</a>
+                        <div class="space-25"></div>
+                        <h5>文件夹</h5>
+                         <ul class="folder-list m-b-md" style="padding: 0">
+                            <li>
+                                <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc"> <i class="fa fa-inbox "></i> 收件箱 <span class="label label-warning pull-right">${noReadCount}/${mailBoxCount}</span>
+                                </a>
+                            </li>
+                            <li>
+                                <a href="${ctx}/iim/mailCompose/list?status=1&orderBy=sendtime desc"> <i class="fa fa-envelope-o"></i> 已发送 <span class="label label-info pull-right">${mailComposeCount}</span></a>
+                            </li>
+                            <!--  等待下个版本升级
+                            <li>
+                                <a href="mailbox.html"> <i class="fa fa-envelope"></i> 群邮件</a>
+                            </li>
+                            -->
+                            <li>
+                                <a href="${ctx}/iim/mailCompose/list?status=0&orderBy=sendtime desc"> <i class="fa fa-file-text-o"></i> 草稿箱 <span class="label label-danger pull-right">${mailDraftCount}</span>
+                                </a>
+                            </li>
+                            <!-- 等待下个版本升级 by刘高峰
+                            <li>
+                                <a href="mailbox.html"> <i class="fa fa-trash-o"></i> 垃圾箱</a>
+                            </li>
+                            -->
+                        </ul>
+                        <h5>分类</h5>
+                        <ul class="category-list" style="padding: 0">
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-navy"></i> 工作</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-danger"></i> 文档</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-primary"></i> 社交</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-info"></i> 广告</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-warning"></i> 客户端</a>
+                            </li>
+                        </ul>
+
+                        <h5 class="tag-title">标签</h5>
+                        <ul class="tag-list" style="padding: 0">
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 朋友</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 工作</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 家庭</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 孩子</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 假期</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 音乐</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 照片</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 电影</a>
+                            </li>
+                        </ul>
+                        <div class="clearfix"></div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div  class="fl contents col-sm-9 full-height" style="padding: 0px;">
+            <div class="layui-row contentShadow content-height" style="overflow-y: auto;">
+                <div>
+                    <div style="height:30px;padding: 16px;">
+                        <div class="pull-right tooltip-demo">
+                            <a href="${ctx}/iim/mailCompose/replyLetter?id=${mailBox.id}" class="nav-btn nav-btn-add" data-toggle="tooltip" data-placement="top" title="回复"><i class="fa fa-reply"></i> 回复</a>
+                            <a href="javascript:void(0)" class="nav-btn nav-btn-export" data-toggle="tooltip" data-placement="top" title="打印邮件"><i class="fa fa-print"></i> </a>
+                            <a href="javascript:void(0)" class="nav-btn nav-btn-delete" data-toggle="tooltip" data-placement="top" title="标为垃圾邮件"><i class="fa fa-trash-o"></i> </a>
+                            <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc" style="margin-right:0px;" class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="top" title="返回"><i class="fa fa-backward"></i> 返回</a>
+                        </div>
+                        <h2>
+                            查看邮件
+                        </h2>
+                    </div>
+                </div>
+                <div class="mail-tools tooltip-demo" style="padding: 0 16px 10px 16px;">
+                    <h3>
+                        <span class="font-noraml">主题: </span>${mailCompose.mail.title }
+                    </h3>
+                    <h5>
+                        <span class="pull-right font-noraml"><fmt:formatDate value="${mailCompose.sendtime}" pattern="yyyy-MM-dd HH:mm:ss"/></span>
+                        <span class="font-noraml">发件人: </span>${(fns:getUserById(mailCompose.sender)).name}
+                    </h5>
+                    <h5>
+                        <span class="font-noraml">收件人: </span>${(fns:getUserById(mailCompose.receiver)).name}
+                    </h5>
+                </div>
+                <div class="mail-box" style="margin:0 16px;">
+
+
+                    <div id="content" class="mail-body">
+                        ${fns:unescapeHtml(mailCompose.mail.content)}
+                    </div>
+                    <%--<div class="mail-attachment">--%>
+                     <%----%>
+                    <%--</div>--%>
+                    <div style="clear: both;"></div>
+                </div>
+                <div class="mail-body text-right tooltip-demo" style="border:none;float: right;padding: 16px;">
+                    <a class="nav-btn nav-btn-add" href="${ctx}/iim/mailCompose/replyLetter?id=${mailBox.id}"><i class="fa fa-reply"></i> 回复</a>
+                   <!--   <a class="btn btn-sm btn-white" href="javascript:void(0)"><i class="fa fa-arrow-right"></i> 下一封</a>
+                    <button title="" data-placement="top" data-toggle="tooltip" type="button" data-original-title="打印这封邮件" class="btn btn-sm btn-white"><i class="fa fa-print"></i> 打印</button>-->
+                    <button title="" style="margin:0px;"  onclick="return confirmx('确认要删除该站内信吗?', '${ctx}/iim/mailBox/delete?id=${mailBox.id}')"  data-placement="top" data-toggle="tooltip" data-original-title="删除邮件" class="nav-btn nav-btn-delete"><i class="fa fa-trash-o"></i> 删除</button>
+                    <div style="clear: both;"></div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
+
+   
+    <script>
+        $(document).ready(function () {
+            $('.i-checks').iCheck({
+                checkboxClass: 'icheckbox_square-green',
+                radioClass: 'iradio_square-green',
+            });
+        });
+    </script>
+
+ 
+
+</body>
+
+</html>

+ 206 - 0
src/main/webapp/webpage/modules/iim/mailComposeList.jsp

@@ -0,0 +1,206 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<!DOCTYPE html>
+<html>
+
+<head>
+
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+
+    <title>已发送</title>
+   	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+        .content-height{
+            height:calc(100% - 8px);
+        }
+    </style>
+</head>
+
+<body>
+<div class="wrapper wrapper-content full-width">
+    <sys:message content="${message}"/>
+    <div class="pr full-height full-width">
+        <div class="fl contents col-sm-3 full-height" style="padding: 0px;">
+            <div class="layui-row contentShadow content-height">
+                <div class="ibox-content mailbox-content">
+                    <div class="file-manager">
+                        <a style="width:inherit;" class="btn btn-block btn-primary compose-mail" href="${ctx}/iim/mailCompose/sendLetter">写信</a>
+                        <div class="space-25"></div>
+                        <h5>文件夹</h5>
+                        <ul class="folder-list m-b-md" style="padding: 0">
+                            <li>
+                                <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc"> <i class="fa fa-inbox "></i> 收件箱 <span class="label label-warning pull-right">${noReadCount}/${mailBoxCount}</span>
+                                </a>
+                            </li>
+                            <li>
+                                <a href="${ctx}/iim/mailCompose/list?status=1&orderBy=sendtime desc"> <i class="fa fa-envelope-o"></i> 已发送<span class="label label-info pull-right">${mailComposeCount}</span></a>
+                            </li>
+                            <!--
+                            <li>
+                                <a href="${ctx}/iim/mailBox/list"> <i class="fa fa-envelope"></i> 群邮件</a>
+                            </li>
+                             -->
+                            <li>
+                                <a href="${ctx}/iim/mailCompose/list?status=0&orderBy=sendtime desc"> <i class="fa fa-file-text-o"></i> 草稿箱 <span class="label label-danger pull-right">${mailDraftCount}</span>
+                                </a>
+                            </li>
+                             <!-- 等待下个版本升级 by刘高峰
+                            <li>
+                                <a href="mailbox.html"> <i class="fa fa-trash-o"></i> 垃圾箱</a>
+                            </li>
+                            -->
+                        </ul>
+                        <h5>分类</h5>
+                        <ul class="category-list" style="padding: 0">
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-navy"></i> 工作</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-danger"></i> 文档</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-primary"></i> 社交</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-info"></i> 广告</a>
+                            </li>
+                            <li>
+                                <a href="##"> <i class="fa fa-circle text-warning"></i> 客户端</a>
+                            </li>
+                        </ul>
+
+                        <h5 class="tag-title">标签</h5>
+                        <ul class="tag-list" style="padding: 0">
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 朋友</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 工作</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 家庭</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 孩子</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 假期</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 音乐</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 照片</a>
+                            </li>
+                            <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 电影</a>
+                            </li>
+                        </ul>
+                        <div class="clearfix"></div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div  class="fl contents col-sm-9 full-height" style="padding: 0px;">
+            <div class="layui-row contentShadow content-height">
+                <div style="overflow-y: auto;height:calc(100% - 8px);">
+                <div class="" style="height:80px;padding: 16px;">
+                    <form:form  id="searchForm" modelAttribute="mailCompose" action="${ctx}/iim/mailCompose/?status=1" method="post" class="pull-right mail-search">
+                    		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+						<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+						<table:sortColumn  id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"></table:sortColumn><!-- 支持排序 -->
+
+                        <div class="with-icon">
+                            <div class="input-group">
+                                <form:input path="mail.title" style="height:30px;line-height:30px;" htmlEscape="false" maxlength="128"  class=" form-control layui-input" placeholder="搜索邮件标题,正文等"/>
+                                <div class="input-group-btn">
+                                    <button id="btnSubmit" type="submit" class="btn btn-sm btn-primary" style="height:30px;line-height:30px;">
+                                        搜索
+                                    </button>
+                                </div>
+                            </div>
+                        </div>
+                    </form:form>
+                    <h2>
+                        已发送(${mailComposeCount})
+                    </h2>
+                    <div class="mail-tools tooltip-demo m-t-md">
+                        <div class="btn-group pull-right">
+                        	${page }
+
+                        </div>
+                        <table:delRow url="${ctx}/iim/mailCompose/deleteAllCompose" id="contentTable"></table:delRow><!-- 删除按钮 -->
+                        <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新邮件列表"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+                        <button class="nav-btn nav-btn-edit" data-toggle="tooltip" data-placement="top" title="标为已读"><i class="fa fa-eye"></i></button>
+                        <button class="nav-btn nav-btn-query" data-toggle="tooltip" data-placement="top" title="标为重要"><i class="fa fa-exclamation"></i></button>
+                    </div>
+                </div>
+                <div class="mail-box" style="margin-bottom:0;border:none;">
+                    <div style="margin: 0 16px;">
+
+                        <table id="contentTable" class="table table-hover table-mail details" style="margin-bottom: 0px;">
+                            <thead>
+                                <tr>
+                                    <th style="padding: 0 8px;" width="30" class="check-mail">
+                                        <input type="checkbox" class="i-checks">
+                                    </th>
+                                    <th width="100" class="sort-column receiver.name">收件人</th>
+                                    <th  class="sort-column title">标题</th>
+                                    <th  class="sort-column overview">内容</th>
+                                    <th width="160" class="sort-column sendtime">时间</th>
+                                    <th width="70">操作</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <c:forEach items="${page.list}" var="mailCompose">
+                                    <tr>
+                                        <td class="check-mail">
+                                            <input id="${mailCompose.id}" type="checkbox" class="i-checks">
+                                        </td>
+                                        <td class=""><a href="${ctx}/iim/mailCompose/detail?id=${mailCompose.id}">
+                                            ${mailCompose.receiver.name}
+                                        </a></td>
+                                        <td class=""><a href="${ctx}/iim/mailCompose/detail?id=${mailCompose.id}">
+
+                                            ${mailCompose.mail.title}
+                                        </a></td>
+                                        <td class=""><a href="${ctx}/iim/mailCompose/detail?id=${mailCompose.id}">
+                                            ${mailCompose.mail.overview}
+                                        </a>
+                                        </td>
+                                        <td class="">${fns:formatDateTime(mailCompose.sendtime)}</td>
+
+                                        <td class="op-td text-center">
+                                            <a href="${ctx}/iim/mailCompose/delete?id=${mailCompose.id}" onclick="return confirmx('确认要删除该站内信吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
+                                        </td>
+                                    </tr>
+                                </c:forEach>
+
+                            </tbody>
+                        </table>
+
+                    </div>
+                </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
+
+    <script>
+
+        function page(n,s){
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+        	return false;
+        }
+    </script>
+
+
+</body>
+
+</html>

+ 233 - 0
src/main/webapp/webpage/modules/iim/mailDraftDetail.jsp

@@ -0,0 +1,233 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<!DOCTYPE html>
+<html>
+
+<head>
+	 <title>查看草稿</title>
+    <meta charset="utf-8">
+    <meta name="decorator" content="default"/>
+      <!-- SUMMERNOTE -->
+	 <link href="${ctxStatic}/summernote/summernote.css" rel="stylesheet">
+	 <link href="${ctxStatic}/summernote/summernote-bs3.css" rel="stylesheet">
+	 <script src="${ctxStatic}/summernote/summernote.min.js"></script>
+	 <script src="${ctxStatic}/summernote/summernote-zh-CN.js"></script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+        .content-height{
+            height:calc(100% - 8px);
+        }
+        .note-editable{
+            min-height: 200px;
+        }
+    </style>
+</head>
+
+<body>
+    <div class="wrapper wrapper-content">
+        <div class="row">
+            <div class="col-sm-3">
+                <div class="ibox float-e-margins">
+                    <div class="ibox-content mailbox-content">
+                        <div class="file-manager">
+                            <a style="width:inherit;" class="btn btn-block btn-primary compose-mail" href="${ctx}/iim/mailCompose/sendLetter">写信</a>
+                            <div class="space-25"></div>
+                            <h5>文件夹</h5>
+                             <ul class="folder-list m-b-md" style="padding: 0">
+                                <li>
+                                    <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc"> <i class="fa fa-inbox "></i> 收件箱 <span class="label label-warning pull-right">${noReadCount}/${mailBoxCount}</span>
+                                    </a>
+                                </li>
+                                <li>
+                                    <a href="${ctx}/iim/mailCompose/list?status=1&orderBy=sendtime desc"> <i class="fa fa-envelope-o"></i> 已发送 <span class="label label-info pull-right">${mailComposeCount}</span></a>
+                                </li>
+                                <!--  等待下个版本升级
+                                <li>
+                                    <a href="mailbox.html"> <i class="fa fa-envelope"></i> 群邮件</a>
+                                </li>
+                                -->
+                                <li>
+                                    <a href="${ctx}/iim/mailCompose/list?status=0&orderBy=sendtime desc"> <i class="fa fa-file-text-o"></i> 草稿箱 <span class="label label-danger pull-right">${mailDraftCount}</span>
+                                    </a>
+                                </li>
+                                <!-- 等待下个版本升级 by刘高峰 
+                                <li>
+                                    <a href="mailbox.html"> <i class="fa fa-trash-o"></i> 垃圾箱</a>
+                                </li>
+                                -->
+                            </ul>
+                            <h5>分类</h5>
+                            <ul class="category-list" style="padding: 0">
+                                <li>
+                                    <a href="##"> <i class="fa fa-circle text-navy"></i> 工作</a>
+                                </li>
+                                <li>
+                                    <a href="##"> <i class="fa fa-circle text-danger"></i> 文档</a>
+                                </li>
+                                <li>
+                                    <a href="##"> <i class="fa fa-circle text-primary"></i> 社交</a>
+                                </li>
+                                <li>
+                                    <a href="##"> <i class="fa fa-circle text-info"></i> 广告</a>
+                                </li>
+                                <li>
+                                    <a href="##"> <i class="fa fa-circle text-warning"></i> 客户端</a>
+                                </li>
+                            </ul>
+
+                            <h5 class="tag-title">标签</h5>
+                            <ul class="tag-list" style="padding: 0">
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 朋友</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 工作</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 家庭</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 孩子</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 假期</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 音乐</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 照片</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 电影</a>
+                                </li>
+                            </ul>
+                            <div class="clearfix"></div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div  class="fl contents col-sm-9 full-height" style="padding: 0px;">
+                <div class="layui-row contentShadow content-height">
+                    <div>
+                        <div style="height:30px;padding: 16px;">
+                            <div class="pull-right tooltip-demo">
+                                <button type="button" class="nav-btn nav-btn-add" onclick="saveLetter()"> <i class="fa fa-pencil"></i> 存为草稿</button>
+                                <a href="${ctx}/iim/mailBox/list" class="nav-btn nav-btn-delete" data-toggle="tooltip" data-placement="top" title="放弃"><i class="fa fa-times"></i> 放弃</a>
+                                <input id="btnCancel" class="nav-btn nav-btn-refresh" style="margin-right:0px;" type="button" value="返 回" onclick="history.go(-1)">
+                            </div>
+                            <h2>
+                                写信
+                            </h2>
+                        </div>
+                    </div>
+                    <div style="height:calc(100% - 62px);overflow-y: auto;">
+                        <div class="mail-body" style="padding: 6px 16px;">
+                        <form:form id="inputForm" modelAttribute="mailCompose" action="${ctx}/iim/mailCompose/save" method="post" >
+                            <div id="queryDiv" class="commonQuery">
+                                <div class="layui-item query athird" style="width:50%;padding-right: 0;">
+                                    <label class="layui-form-label"><span class="require-item">*</span>发送到:</label>
+                                    <div class="layui-input-block with-icon">
+                                        <sys:treeselect id="receiver" name="receiverIds" value="${receiverIds}" labelName="receiverNames" labelValue="${receiverNames}"
+                                                        title="用户" url="/sys/office/treeData?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true" checked="true"/>
+                                    </div>
+                                </div>
+                                <div class="layui-item query athird" style="width:50%;padding-right: 0;">
+                                    <label class="layui-form-label">主题:</label>
+                                    <div class="layui-input-block with-icon">
+                                        <input type="text" id="title" name="mail.title"  class="form-control layui-input" value="${mailCompose.mail.title }">
+                                    </div>
+                                </div>
+                                <div style="clear: both;"></div>
+                            </div>
+                              <input type="hidden" id="id" name="id" value="${mailCompose.id}"><!-- id -->
+                              <input type="hidden" id="status" name="status" value="0"><!-- 0 草稿  1 已发送 -->
+                              <input type="hidden" id="overview" name="mail.overview"><!-- 内容简介 -->
+                              <input type="hidden" id="content" name="mail.content"><!-- 内容 -->
+                        </form:form>
+                        </div>
+
+                        <div style="padding: 0 16px;">
+
+                            <div class="summernote">
+
+
+                            </div>
+                            <div style="clear: both"></div>
+                        </div>
+                        <div class="mail-body text-right tooltip-demo" style="border:none;float: right;padding: 16px;">
+                             <button type="button" class="nav-btn nav-btn-edit" onclick="sendLetter()"> <i class="fa fa-reply"></i> 发送</button>
+                            <a href="${ctx}/iim/mailBox/list" class="nav-btn nav-btn-delete" data-toggle="tooltip" data-placement="top" title="Discard email"><i class="fa fa-times"></i> 放弃</a>
+                             <button type="button" class="nav-btn nav-btn-add" onclick="saveLetter()"> <i class="fa fa-pencil"></i> 存为草稿</button>
+                            <div style="clear: both;"></div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+ <div style="display:none" id="contentView">
+   
+   ${mailCompose.mail.content}
+   </div>
+
+    <script>
+        $(document).ready(function () {
+          
+            $('.i-checks').iCheck({
+                checkboxClass: 'icheckbox_square-green',
+                radioClass: 'iradio_square-green',
+            });
+
+
+            $('.summernote').summernote({
+                lang: 'zh-CN'
+            });
+
+            $(".note-editable").html($("#contentView").text());
+
+        });
+        var edit = function () {
+            $('.click2edit').summernote({
+                focus: true
+            });
+        };
+        var save = function () {
+            var aHTML = $('.click2edit').code(); //save HTML If you need(aHTML: array).
+            $('.click2edit').destroy();
+        };
+
+        function sendLetter(){
+            if($("#receiverRecordId").val()==''){
+            	top.layer.alert('收件人不能为空!', {icon: 0});
+            	return;
+            }
+            if($("#title").val()==''){
+              	top.layer.alert('标题不能为空!', {icon: 0});
+              	return;
+              }
+            $("#status").val("1");
+			$("#content").val($(".note-editable").html());
+			$("#overview").val($(".note-editable").text().substring(0,20));
+			var index = layer.load(1, {
+			    shade: [0.3,'#fff'] //0.1透明度的白色背景
+			});
+			$("#inputForm").submit();
+	    }
+        function saveLetter(){
+        	if($("#title").val()==''){
+              	top.layer.alert('标题不能为空!', {icon: 0});
+              	return;
+              }
+            $("#status").val("0");
+			$("#content").val($(".note-editable").html());
+			$("#overview").val($(".note-editable").text().substring(0,20));
+			var index = layer.load(1, {
+			    shade: [0.3,'#fff'] //0.1透明度的白色背景
+			});
+			$("#inputForm").submit();
+	    }
+    </script>
+
+</body>
+
+</html>

+ 222 - 0
src/main/webapp/webpage/modules/iim/mailDraftList.jsp

@@ -0,0 +1,222 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<!DOCTYPE html>
+<html>
+
+<head>
+
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+
+    <title>草稿箱</title>
+   	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+        .content-height{
+            height:calc(100% - 8px);
+        }
+    </style>
+</head>
+
+<body>
+<div class="wrapper wrapper-content full-width">
+    <sys:message content="${message}"/>
+    <div class="pr full-height full-width">
+        <div class="fl contents col-sm-3 full-height" style="padding: 0px;">
+            <div class="layui-row contentShadow content-height">
+                <div class="ibox-content mailbox-content">
+                    <div class="file-manager">
+                            <a style="width:inherit;" class="btn btn-block btn-primary compose-mail" href="${ctx}/iim/mailCompose/sendLetter">写信</a>
+                            <div class="space-25"></div>
+                            <h5>文件夹</h5>
+                            <ul class="folder-list m-b-md" style="padding: 0">
+                                <li>
+                                    <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc"> <i class="fa fa-inbox "></i> 收件箱 <span class="label label-warning pull-right">${noReadCount}/${mailBoxCount}</span>
+                                    </a>
+                                </li>
+                                <li>
+                                    <a href="${ctx}/iim/mailCompose/list?status=1&orderBy=sendtime desc"> <i class="fa fa-envelope-o"></i> 已发送 <span class="label label-info pull-right">${mailComposeCount}</span></a>
+                                </li>
+                                <!-- 
+                                <li>
+                                    <a href="${ctx}/iim/mailBox/list"> <i class="fa fa-envelope"></i> 群邮件</a>
+                                </li>
+                                 -->
+                                <li>
+                                    <a href="${ctx}/iim/mailCompose/list?status=0&orderBy=sendtime desc"> <i class="fa fa-file-text-o"></i> 草稿箱 <span class="label label-danger pull-right">${mailDraftCount}</span>
+                                    </a>
+                                </li>
+                                <!-- 预留 下期开发
+                                <li>
+                                    <a href="${ctx}/iim/mailBox/list"> <i class="fa fa-trash-o"></i> 垃圾箱</a>
+                                </li>
+                                 -->
+                            </ul>
+                            <h5>分类</h5>
+                            <ul class="category-list" style="padding: 0">
+                                <li>
+                                    <a href="##"> <i class="fa fa-circle text-navy"></i> 工作</a>
+                                </li>
+                                <li>
+                                    <a href="##"> <i class="fa fa-circle text-danger"></i> 文档</a>
+                                </li>
+                                <li>
+                                    <a href="##"> <i class="fa fa-circle text-primary"></i> 社交</a>
+                                </li>
+                                <li>
+                                    <a href="##"> <i class="fa fa-circle text-info"></i> 广告</a>
+                                </li>
+                                <li>
+                                    <a href="##"> <i class="fa fa-circle text-warning"></i> 客户端</a>
+                                </li>
+                            </ul>
+
+                            <h5 class="tag-title">标签</h5>
+                            <ul class="tag-list" style="padding: 0">
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 朋友</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 工作</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 家庭</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 孩子</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 假期</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 音乐</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 照片</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 电影</a>
+                                </li>
+                            </ul>
+                            <div class="clearfix"></div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="fl contents col-sm-9 full-height"  style="padding: 0px;">
+                <div class="layui-row contentShadow content-height">
+                    <div style="overflow-y: auto;height:calc(100% - 8px);">
+                        <div class="" style="height:80px;padding: 16px;">
+                            <form:form  id="searchForm" modelAttribute="mailCompose" action="${ctx}/iim/mailCompose/?status=0" method="post" class="pull-right mail-search">
+                                <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+                                <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+                                <table:sortColumn  id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"></table:sortColumn><!-- 支持排序 -->
+
+                                <div class="with-icon">
+                                    <div class="input-group">
+                                        <form:input path="mail.title" style="height:30px;line-height:30px;" htmlEscape="false" maxlength="128"  class=" form-control layui-input" placeholder="搜索邮件标题,正文等"/>
+                                        <div class="input-group-btn">
+                                            <button id="btnSubmit" type="submit" style="height:30px;line-height:30px;" class="btn btn-sm btn-primary">
+                                                搜索
+                                            </button>
+                                        </div>
+                                    </div>
+                                </div>
+                            </form:form>
+                            <h2>
+                                草稿箱 (${mailDraftCount})
+                            </h2>
+                            <div class="mail-tools tooltip-demo m-t-md">
+                                <div class="btn-group pull-right">
+                                    ${page }
+                                </div>
+
+                                <table:delRow url="${ctx}/iim/mailCompose/deleteAllDraft" id="contentTable"></table:delRow>
+                                <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新邮件列表"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+                                <button class="nav-btn nav-btn-edit" data-toggle="tooltip" data-placement="top" title="标为已读"><i class="fa fa-eye"></i></button>
+                                <button class="nav-btn nav-btn-query" data-toggle="tooltip" data-placement="top" title="标为重要"><i class="fa fa-exclamation"></i></button>
+                            </div>
+                        </div>
+                        <div class="mail-box"  style="margin-bottom:0;border:none;">
+                            <div style="margin: 0 16px;">
+                                <table id="contentTable" class="table table-hover table-mail details"  style="margin-bottom: 0px;">
+                                    <thead>
+                                        <tr>
+                                            <th style="padding: 0 8px;" width="30" class="check-mail">
+                                                    <input type="checkbox" class="i-checks">
+                                                </th>
+                                            <th width="100" class="sort-column receiver.name">收件人</th>
+                                            <th  class="sort-column title">标题</th>
+                                            <th  class="sort-column overview">内容</th>
+                                            <th  width="160" class="sort-column sendtime">时间</th>
+                                            <th width="70">操作</th>
+                                        </tr>
+                                    </thead>
+                                    <tbody>
+
+                                        <c:forEach items="${page.list}" var="mailCompose">
+                                            <tr>
+                                                <td class="check-mail">
+                                                    <input id="${mailCompose.id}" type="checkbox" class="i-checks">
+                                                </td>
+                                                <td class=""><a href="${ctx}/iim/mailCompose/draftDetail?id=${mailCompose.id}">
+                                                ${mailCompose.receiver.name}
+                                                </a></td>
+                                                <td class=""><a href="${ctx}/iim/mailCompose/draftDetail?id=${mailCompose.id}">
+
+                                                    ${mailCompose.mail.title}
+                                                </a></td>
+                                                <td class=""><a href="${ctx}/iim/mailCompose/draftDetail?id=${mailCompose.id}">
+                                                    ${mailCompose.mail.overview}
+                                                </a>
+                                                </td>
+                                                <td class="">${fns:formatDateTime(mailCompose.sendtime)}</td>
+
+                                                <td class="op-td text-center">
+                                                    <a href="${ctx}/iim/mailCompose/delete?id=${mailCompose.id}" onclick="return confirmx('确认要删除该站内信吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
+                                                </td>
+                                            </tr>
+                                        </c:forEach>
+
+                                    </tbody>
+                                </table>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+    </div>
+</div>
+
+
+    <script>
+
+        
+	   function search(){//查询,页码清零
+			$("#pageNo").val(0);
+			$("#searchForm").submit();
+	   		return false;
+	   }
+
+		function reset(){//重置,页码清零
+			$("#pageNo").val(0);
+			$("#searchForm div.form-group input").val("");
+			$("#searchForm div.form-group select").val("");
+			$("#searchForm").submit();
+	  		return false;
+	 	 }
+		function sortOrRefresh(){//刷新或者排序,页码不清零
+			
+			$("#searchForm").submit();
+	 		return false;
+	 	}
+		function page(n,s){//翻页
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+			$("span.page-size").text(s);
+			return false;
+		}
+    </script>
+
+</body>
+</html>

+ 33 - 0
src/main/webapp/webpage/modules/iim/mail_compose_success.jsp

@@ -0,0 +1,33 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-31j">
+    <meta name="decorator" content="default"/>
+
+<title>邮件结果</title>
+</head>
+<body class="gray-bg">
+
+    <div class="lock-word animated fadeInDown">
+    </div>
+    <div class="middle-box text-center lockscreen animated fadeInDown">
+        <div>
+            <div class="m-b-md">
+                <img alt="image" style="width:150px;"class="img-circle circle-border" src="${ctxStatic}/images/success.jpg">
+            </div>
+            <c:if test="${mailCompose.status == '0'}">
+            <p>邮件已经保存到草稿箱!</p>
+            </c:if>
+            <c:if test="${mailCompose.status == '1'}">
+            <p>邮件发送成功!</p>
+            </c:if>
+            
+            <form class="m-t" role="form" action="index.html">
+                <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc" class="btn btn-primary block full-width">返回</a>
+            </form>
+        </div>
+    </div>
+</body>
+</html>

+ 242 - 0
src/main/webapp/webpage/modules/iim/mail_reply.jsp

@@ -0,0 +1,242 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<!DOCTYPE html>
+<html>
+
+<head>
+
+    <meta charset="utf-8">
+    <meta name="decorator" content="default"/>
+      <!-- SUMMERNOTE -->
+	 <link href="${ctxStatic}/summernote/summernote.css" rel="stylesheet">
+	 <link href="${ctxStatic}/summernote/summernote-bs3.css" rel="stylesheet">
+	 <script src="${ctxStatic}/summernote/summernote.min.js"></script>
+	 <script src="${ctxStatic}/summernote/summernote-zh-CN.js"></script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+        .content-height{
+            height:calc(100% - 8px);
+        }
+        .note-editable{
+            min-height: 200px;
+        }
+    </style>
+</head>
+
+<body>
+    <div class="wrapper wrapper-content full-width">
+        <sys:message content="${message}"/>
+        <div class="pr full-height full-width">
+            <div class="fl contents col-sm-3 full-height" style="padding: 0px;">
+                <div class="layui-row  contentShadow content-height">
+                    <div class="ibox-content mailbox-content">
+                        <div class="file-manager">
+                            <a style="width:inherit;" class="btn btn-block btn-primary compose-mail" href="${ctx}/iim/mailCompose/sendLetter">写信</a>
+                            <div class="space-25"></div>
+                            <h5>文件夹</h5>
+                            <ul class="folder-list m-b-md" style="padding: 0">
+                                <li>
+                                    <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc"> <i class="fa fa-inbox "></i> 收件箱 <span class="label label-warning pull-right">${noReadCount}/${mailBoxCount}</span>
+                                    </a>
+                                </li>
+                                <li>
+                                    <a href="${ctx}/iim/mailCompose/list?status=1&orderBy=sendtime desc"> <i class="fa fa-envelope-o"></i> 已发送<span class="label label-info pull-right">${mailComposeCount}</span></a>
+                                </li>
+                                <!--
+                                <li>
+                                    <a href="${ctx}/iim/mailBox/list"> <i class="fa fa-envelope"></i> 群邮件</a>
+                                </li>
+                                 -->
+                                <li>
+                                    <a href="${ctx}/iim/mailCompose/list?status=0&orderBy=sendtime desc"> <i class="fa fa-file-text-o"></i> 草稿箱 <span class="label label-danger pull-right">${mailDraftCount}</span>
+                                    </a>
+                                </li>
+                                 <!-- 等待下个版本升级 by刘高峰
+                                <li>
+                                    <a href="mailbox.html"> <i class="fa fa-trash-o"></i> 垃圾箱</a>
+                                </li>
+                                -->
+                            </ul>
+                            <h5>分类</h5>
+                            <ul class="category-list" style="padding: 0">
+                                <li>
+                                    <a href="javascript:void(0)"> <i class="fa fa-circle text-navy"></i> 工作</a>
+                                </li>
+                                <li>
+                                    <a href="javascript:void(0)"> <i class="fa fa-circle text-danger"></i> 文档</a>
+                                </li>
+                                <li>
+                                    <a href="javascript:void(0)"> <i class="fa fa-circle text-primary"></i> 社交</a>
+                                </li>
+                                <li>
+                                    <a href="javascript:void(0)"> <i class="fa fa-circle text-info"></i> 广告</a>
+                                </li>
+                                <li>
+                                    <a href="javascript:void(0)"> <i class="fa fa-circle text-warning"></i> 客户端</a>
+                                </li>
+                            </ul>
+
+                            <h5 class="tag-title">标签</h5>
+                            <ul class="tag-list" style="padding: 0">
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 朋友</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 工作</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 家庭</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 孩子</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 假期</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 音乐</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 照片</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 电影</a>
+                                </li>
+                            </ul>
+                            <div class="clearfix"></div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div  class="fl contents col-sm-9 full-height" style="padding: 0px;">
+                <div class="layui-row contentShadow content-height">
+                    <div>
+                        <div style="height:30px;padding: 16px;">
+                            <div class="pull-right tooltip-demo">
+                               <button type="button" class="nav-btn nav-btn-add" onclick="saveLetter()"> <i class="fa fa-pencil"></i> 存为草稿</button>
+                                <a href="${ctx}/iim/mailBox/list" class="nav-btn nav-btn-delete" data-toggle="tooltip" data-placement="top" title="放弃"><i class="fa fa-times"></i> 放弃</a>
+                                <input id="btnCancel" class="nav-btn nav-btn-refresh" style="margin-right:0px;" type="button" value="返 回" onclick="history.go(-1)">
+                            </div>
+                            <h2>
+                                写信
+                            </h2>
+                        </div>
+                    </div>
+
+                    <div style="height:calc(100% - 62px);overflow-y: auto;">
+                        <div class="mail-body" style="padding: 6px 16px;">
+                            <form:form id="inputForm" modelAttribute="mailBox" action="${ctx}/iim/mailCompose/save" method="post">
+                                <div id="queryDiv" class="commonQuery">
+                                    <div class="layui-item query athird" style="width:50%;padding-right: 0;">
+                                        <label class="layui-form-label"><span class="require-item">*</span>发送到:</label>
+                                        <div class="layui-input-block with-icon">
+                                            <sys:treeselect id="receiver" name="receiverIds" value="${mailBox.sender.id}" labelName="receiverNames" labelValue="${mailBox.sender.name}"
+                                                            title="用户" url="/sys/office/treeData?type=3" cssClass="form-control layui-input required" notAllowSelectParent="true" checked="true"/>
+                                        </div>
+                                    </div>
+                                    <div class="layui-item query athird" style="width:50%;padding-right: 0;">
+                                        <label class="layui-form-label">主题:</label>
+                                        <div class="layui-input-block with-icon">
+                                            <input type="text" id="title" name="mail.title"  class="form-control layui-input" value="回复:${mailBox.mail.title }">
+                                        </div>
+                                    </div>
+                                    <div style="clear: both;"></div>
+                                </div>
+                                  <input type="hidden" id="status" name="status" value="1"><!-- 0 草稿  1 已发送 -->
+                                  <input type="hidden" id="overview" name="mail.overview"><!-- 内容简介 -->
+                                  <input type="hidden" id="content" name="mail.content"><!-- 内容 -->
+                            </form:form>
+                        </div>
+
+                        <div style="padding: 0 16px;">
+
+                            <div class="summernote">
+
+
+                            </div>
+                            <div style="clear: both"></div>
+                        </div>
+                        <div class="mail-body text-right tooltip-demo" style="border:none;float: right;padding: 16px;">
+                    	
+                             <button type="button" class="nav-btn nav-btn-edit" onclick="sendLetter()"> <i class="fa fa-reply"></i> 发送</button>
+                            <a href="${ctx}/iim/mailBox/list" class="nav-btn nav-btn-delete" data-toggle="tooltip" data-placement="top" title="Discard email"><i class="fa fa-times"></i> 放弃</a>
+                             <button type="button" class="nav-btn nav-btn-add" onclick="saveLetter()"> <i class="fa fa-pencil"></i> 存为草稿</button>
+                            <div style="clear: both;"></div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+   <div style="display:none" id="contentView">
+   	  ${mailBox.mail.content}
+   </div>
+
+    <script>
+        $(document).ready(function () {
+            $('.i-checks').iCheck({
+                checkboxClass: 'icheckbox_square-green',
+                radioClass: 'iradio_square-green',
+            });
+
+
+            $('.summernote').summernote({
+                lang: 'zh-CN'
+            });
+           
+
+            var receiverEmail = "<br/><br/><br/>------------------ 原始邮件 ------------------<br/>";
+            receiverEmail += "发件人:${(fns:getUserById(mailBox.sender.id)).name}<br/>";
+            receiverEmail += '发送时间:<fmt:formatDate value="${mailBox.sendtime}" pattern="yyyy-MM-dd HH:mm:ss"/><br/>';
+            receiverEmail += "收件人:${(fns:getUserById(mailBox.receiver.id)).name}<br/>";
+            receiverEmail += "主题:${mailBox.mail.title}<br/>";
+            receiverEmail += $("#contentView").text();
+            $(".note-editable").html(receiverEmail);
+
+            
+
+        });
+        var edit = function () {
+            $('.click2edit').summernote({
+                focus: true
+            });
+        };
+        var save = function () {
+            var aHTML = $('.click2edit').code(); //save HTML If you need(aHTML: array).
+            $('.click2edit').destroy();
+        };
+
+        function sendLetter(){
+            if($("#receiverRecordId").val()==''){
+            	top.layer.alert('收件人不能为空!', {icon: 0});
+            	return;
+            }
+            if($("#title").val()==''){
+              	top.layer.alert('标题不能为空!', {icon: 0});
+              	return;
+              }
+            $("#status").val("1");
+			$("#content").val($(".note-editable").html());
+			$("#overview").val($(".note-editable").text().substring(0,20));
+			var index = layer.load(1, {
+			    shade: [0.3,'#fff'] //0.1透明度的白色背景
+			});
+			$("#inputForm").submit();
+	    }
+        function saveLetter(){
+        	if($("#title").val()==''){
+              	top.layer.alert('标题不能为空!', {icon: 0});
+              	return;
+              }
+            $("#status").val("0");
+			$("#content").val($(".note-editable").html());
+			$("#overview").val($(".note-editable").text().substring(0,20));
+			var index = layer.load(1, {
+			    shade: [0.3,'#fff'] //0.1透明度的白色背景
+			});
+			$("#inputForm").submit();
+	    }
+    </script>
+
+</body>
+
+</html>

+ 234 - 0
src/main/webapp/webpage/modules/iim/mail_send.jsp

@@ -0,0 +1,234 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<!DOCTYPE html>
+<html>
+
+<head>
+
+    <meta charset="utf-8">
+    <meta name="decorator" content="default"/>
+      <!-- SUMMERNOTE -->
+	 <link href="${ctxStatic}/summernote/summernote.css" rel="stylesheet">
+	 <link href="${ctxStatic}/summernote/summernote-bs3.css" rel="stylesheet">
+	 <script src="${ctxStatic}/summernote/summernote.min.js"></script>
+	 <script src="${ctxStatic}/summernote/summernote-zh-CN.js"></script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+        .content-height{
+            height:calc(100% - 8px);
+        }
+        .note-editable{
+            min-height: 200px;
+        }
+    </style>
+</head>
+
+<body >
+    <div class="wrapper wrapper-content full-width">
+        <sys:message content="${message}"/>
+        <div class="pr full-height full-width">
+            <div class="fl contents col-sm-3 full-height" style="padding: 0px;">
+                <div class="layui-row  contentShadow content-height">
+                    <div class="ibox-content mailbox-content">
+                        <div class="file-manager">
+                            <a style="width:inherit;" class="btn btn-block btn-primary compose-mail" href="${ctx}/iim/mailCompose/sendLetter">写信</a>
+                            <div class="space-25"></div>
+                            <h5>文件夹</h5>
+                            <ul class="folder-list m-b-md" style="padding: 0">
+                                <li>
+                                    <a href="${ctx}/iim/mailBox/list?orderBy=sendtime desc"> <i class="fa fa-inbox "></i> 收件箱 <span class="label label-warning pull-right">${noReadCount}/${mailBoxCount}</span>
+                                    </a>
+                                </li>
+                                <li>
+                                    <a href="${ctx}/iim/mailCompose/list?status=1&orderBy=sendtime desc"> <i class="fa fa-envelope-o"></i> 已发送<span class="label label-info pull-right">${mailComposeCount}</span></a>
+                                </li>
+                                <!-- 
+                                <li>
+                                    <a href="${ctx}/iim/mailBox/list"> <i class="fa fa-envelope"></i> 群邮件</a>
+                                </li>
+                                 -->
+                                <li>
+                                    <a href="${ctx}/iim/mailCompose/list?status=0&orderBy=sendtime desc"> <i class="fa fa-file-text-o"></i> 草稿箱 <span class="label label-danger pull-right">${mailDraftCount}</span>
+                                    </a>
+                                </li>
+                                 <!-- 等待下个版本升级 by刘高峰 
+                                <li>
+                                    <a href="mailbox.html"> <i class="fa fa-trash-o"></i> 垃圾箱</a>
+                                </li>
+                                -->
+                            </ul>
+                            <h5>分类</h5>
+                            <ul class="category-list" style="padding: 0">
+                                <li>
+                                    <a href="javascript:void(0)"> <i class="fa fa-circle text-navy"></i> 工作</a>
+                                </li>
+                                <li>
+                                    <a href="javascript:void(0)"> <i class="fa fa-circle text-danger"></i> 文档</a>
+                                </li>
+                                <li>
+                                    <a href="javascript:void(0)"> <i class="fa fa-circle text-primary"></i> 社交</a>
+                                </li>
+                                <li>
+                                    <a href="javascript:void(0)"> <i class="fa fa-circle text-info"></i> 广告</a>
+                                </li>
+                                <li>
+                                    <a href="javascript:void(0)"> <i class="fa fa-circle text-warning"></i> 客户端</a>
+                                </li>
+                            </ul>
+
+                            <h5 class="tag-title">标签</h5>
+                            <ul class="tag-list" style="padding: 0">
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 朋友</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 工作</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 家庭</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 孩子</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 假期</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 音乐</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 照片</a>
+                                </li>
+                                <li><a href="javascript:void(0)"><i class="fa fa-tag"></i> 电影</a>
+                                </li>
+                            </ul>
+                            <div class="clearfix"></div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div  class="fl contents col-sm-9 full-height" style="padding: 0px;">
+                <div class="layui-row contentShadow content-height">
+                    <div>
+                        <div style="height:30px;padding: 16px;">
+                            <div class="pull-right tooltip-demo">
+                               <button type="button" class="nav-btn nav-btn-add" onclick="saveLetter()"> <i class="fa fa-pencil"></i> 存为草稿</button>
+                                <a href="${ctx}/iim/mailBox/list" class="nav-btn nav-btn-delete" data-toggle="tooltip" data-placement="top" title="放弃"><i class="fa fa-times"></i> 放弃</a>
+                                <input id="btnCancel" style="margin-right:0px;" class="nav-btn nav-btn-refresh"  type="button" value="返 回" onclick="history.go(-1)">
+                            </div>
+                            <h2>
+                                写信
+                            </h2>
+                        </div>
+                    </div>
+
+                    <div style="height:calc(100% - 62px);overflow-y: auto;">
+
+
+                        <div class="mail-body" style="padding: 6px 16px;">
+                        <form:form id="inputForm" modelAttribute="mailBox" action="${ctx}/iim/mailCompose/save" method="post">
+                            <div id="queryDiv" class="commonQuery">
+                                <div class="layui-item query athird" style="width:50%;padding-right: 0;">
+                                    <label class="layui-form-label"><span class="require-item">*</span>发送到:</label>
+                                    <div class="layui-input-block with-icon">
+                                        <sys:treeselect id="receiver" name="receiverIds" value="${receiver.id}" labelName="receiverNames" labelValue="${receiver.name}"
+                                                        title="用户" url="/sys/office/treeData?type=3" cssClass="form-control layui-input required" notAllowSelectParent="true" checked="true"/>
+                                    </div>
+                                </div>
+                                <div class="layui-item query athird" style="width:50%;padding-right: 0;">
+                                    <label class="layui-form-label">主题:</label>
+                                    <div class="layui-input-block with-icon">
+                                        <input type="text" id="title" name="mail.title"  class="form-control layui-input" value="">
+                                    </div>
+                                </div>
+                                <div style="clear: both;"></div>
+                            </div>
+                            <input type="hidden" id="status" name="status" value="1"><!-- 0 草稿  1 已发送 -->
+                            <input type="hidden" id="overview" name="mail.overview"><!-- 内容简介 -->
+                            <input type="hidden" id="content" name="mail.content"><!-- 内容 -->
+                        </form:form>
+                        </div>
+                        <div style="padding: 0 16px;">
+                            <div class="mail-text">
+
+                                <div class="summernote">
+
+
+                                </div>
+                                <div class="clearfix"></div>
+                            </div>
+                        </div>
+                        <div class="mail-body text-right tooltip-demo" style="border:none;float: right;padding: 16px;">
+
+                             <button type="button" class="nav-btn nav-btn-edit" onclick="sendLetter()"> <i class="fa fa-reply"></i> 发送</button>
+                            <a href="${ctx}/iim/mailBox/list" class="nav-btn nav-btn-delete" data-toggle="tooltip" data-placement="top" title="Discard email"><i class="fa fa-times"></i> 放弃</a>
+                             <button type="button" style="margin-right: 0px;" class="nav-btn nav-btn-add" onclick="saveLetter()"> <i class="fa fa-pencil"></i> 存为草稿</button>
+                            <div style="clear: both;"></div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+
+
+    <script>
+        $(document).ready(function () {
+            $('.i-checks').iCheck({
+                checkboxClass: 'icheckbox_square-green',
+                radioClass: 'iradio_square-green',
+            });
+
+
+            $('.summernote').summernote({
+                lang: 'zh-CN'
+            });
+
+            
+
+        });
+        var edit = function () {
+            $('.click2edit').summernote({
+                focus: true
+            });
+        };
+        var save = function () {
+            var aHTML = $('.click2edit').code(); //save HTML If you need(aHTML: array).
+            $('.click2edit').destroy();
+        };
+
+        function sendLetter(){
+            if($("#receiverRecordId").val()==''){
+            	top.layer.alert('收件人不能为空!', {icon: 0});
+            	return;
+            }
+            if($("#title").val()==''){
+              	top.layer.alert('标题不能为空!', {icon: 0});
+              	return;
+              }
+            $("#status").val("1");
+			$("#content").val($(".note-editable").html());
+			$("#overview").val($(".note-editable").text().substring(0,20));
+			var index = layer.load(1, {
+			    shade: [0.3,'#fff'] //0.1透明度的白色背景
+			});
+			$("#inputForm").submit();
+	    }
+        function saveLetter(){
+        	if($("#title").val()==''){
+              	top.layer.alert('标题不能为空!', {icon: 0});
+              	return;
+              }
+            $("#status").val("0");
+			$("#content").val($(".note-editable").html());
+			$("#overview").val($(".note-editable").text().substring(0,20));
+			var index = layer.load(1, {
+			    shade: [0.3,'#fff'] //0.1透明度的白色背景
+			});
+			$("#inputForm").submit();
+	    }
+    </script>
+
+</body>
+
+</html>

+ 139 - 0
src/main/webapp/webpage/modules/iim/myCalendar.jsp

@@ -0,0 +1,139 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>我的日程</title>
+    
+    
+<style type="text/css">
+	#calendar{ margin:40px auto 10px auto;width:70%;height:50%;}
+	.fancy{width:450px; height:200px}
+	.fancy h3{height:30px; line-height:30px; border-bottom:1px solid #d3d3d3; font-size:14px}
+	.fancy form{padding:10px}
+	.fancy p{height:28px; line-height:28px; padding:4px; color:#999}
+	.input{height:20px; line-height:20px; padding:2px; border:1px solid #d3d3d3; width:100px}
+	.btn{-webkit-border-radius: 3px;-moz-border-radius:3px;padding:5px 12px; cursor:pointer}
+	.btn_ok{background: #360;border: 1px solid #390;color:#fff}
+	.btn_cancel{background:#f0f0f0;border: 1px solid #d3d3d3; color:#666 }
+	.btn_del{background:#f90;border: 1px solid #f80; color:#fff }
+	.sub_btn{height:32px; line-height:32px; padding-top:6px; border-top:1px solid #f0f0f0; text-align:right; position:relative}
+	.sub_btn .del{position:absolute; left:2px}
+    .ibox{margin-bottom: 0px;}
+    .fancy .btn.btn_del,.fancy .btn.btn_ok{color:#ffffff;}
+</style>
+
+<script src='${ctxStatic}/fullcalendar/js/jquery-1.9.1.js'></script>
+<script src='${ctxStatic}/fullcalendar/js/jquery-ui.js'></script>
+    <script src='${ctxStatic}/fullcalendar/js/jquery.form.min.js'></script>
+<link rel="stylesheet" type="text/css" href="${ctxStatic}/fullcalendar/css/main.css">
+<link rel="stylesheet" type="text/css" href="${ctxStatic}/fullcalendar/css/fancybox.css">
+<script src='${ctxStatic}/fullcalendar/js/jquery.fancybox-1.3.1.pack.js'></script>
+<link href="${ctxStatic}/fullcalendar/css/fullcalendar.css" rel="stylesheet">
+<link href="${ctxStatic}/fullcalendar/fullcalendar.print.css" rel="stylesheet">
+<script src="${ctxStatic}/fullcalendar/js/fullcalendar.min.js"></script>
+<meta name="decorator" content="default"/>
+
+
+
+
+<!--
+	说明:需要整合农历节气和节日,引入fullcalendar.js fullcalendar2.css
+	不需要则引入:fullcalendar.min.js fullcalendar.css
+-->
+
+<script type="text/javascript">
+$(function() {
+	//页面加载完初始化日历 
+	$('#calendar').fullCalendar({
+		//设置日历头部信息
+		header: {
+			left: 'prev,next today',
+			center: 'title',
+			right: 'month,agendaWeek,agendaDay'
+		},
+		firstDay:1,//每行第一天为周一 
+        editable: true,//启用拖动 
+		events: '${ctx}/iim/myCalendar/findList',
+		//点击某一天时促发,单击某天的空白区域
+		dayClick: function(date,allDay, jsEvent, view) {
+			var selDate =$.fullCalendar.formatDate(date,'MM/dd/yyyy');
+            $.fancybox({
+				'type':'ajax',
+				'href':'${ctx}/iim/myCalendar/addform?date='+selDate
+			});
+    	},
+		//单击事件项时触发 ,单击某个日程
+        eventClick: function(calEvent, jsEvent, view) {
+           $.fancybox({ 
+                'type':'ajax', 
+                'href':'${ctx}/iim/myCalendar/editform?id='+calEvent.id 
+           }); 
+        },
+		
+		//拖动事件 
+		eventDrop: function(event,dayDelta,minuteDelta,allDay,revertFunc) { 
+        	$.post("${ctx}/iim/myCalendar/drag",{id:event.id,daydiff:dayDelta, minudiff:minuteDelta,allday:allDay},function(msg){ 
+            	if(msg!=1){ 
+                	alert(msg); 
+                	revertFunc(); //恢复原状 
+            	} 
+        	}); 
+    	},
+		
+		//日程事件的缩放
+		eventResize: function(event,dayDelta,minuteDelta,revertFunc) { 
+    		$.post("${ctx}/iim/myCalendar/resize",{id:event.id,daydiff:dayDelta,minudiff:minuteDelta},function(msg){ 
+        		if(msg!=1){ 
+            		alert(msg); 
+            		revertFunc(); 
+        		} 
+    		}); 
+		},
+		
+		selectable: true, //允许用户拖动 
+		select: function( startDate, endDate, allDay, jsEvent, view ){
+	    	var start =$.fullCalendar.formatDate(startDate,'MM/dd/yyyy');
+	    	var end =$.fullCalendar.formatDate(endDate,'MM/dd/yyyy');
+	    	$.fancybox({ 
+	        	'type':'ajax', 
+	        	'href':'${ctx}/iim/myCalendar/addform?date='+start+'&end='+end 
+	    	}); 
+		} 
+	});
+});
+</script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+</head>
+
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row  contentShadow">
+        <div class="full-width fl">
+                <div class="ibox float-e-margins ">
+                    <%--<div class="ibox-title">--%>
+                        <%--<h5>我的日程 </h5>--%>
+                    <%--</div>--%>
+                    <div class="ibox-content">
+                        <div id="calendar"></div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+</body>
+
+
+</html>

+ 210 - 0
src/main/webapp/webpage/modules/iim/myCalendarForm-add.jsp

@@ -0,0 +1,210 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+<link rel="stylesheet" type="text/css" href="${ctxStatic}/fullcalendar/css/jquery-ui.css">
+<div class="fancy" style="width: 460px; height:300px;">
+	<h3>新建日程</h3>
+    <form id="add_form" action="${ctx }/iim/myCalendar/add" method="post">
+    <p>日程内容:<input type="text" class="input" name="event" id="event" style="width:320px" placeholder="简述日程主题..."></p>
+    <p>日程地点:<input type="text" class="input" name="location" id="location" style="width:320px" placeholder="输入日程地点..."></p>
+    <p id="p_start">开始时间:<input type="text" class="input datepicker" name="startdate" id="startdate" value="${date}" readonly>
+    <span id="sel_start">
+     <select name="s_hour">
+    	<option value="00">00</option>
+        <option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08" selected>08</option>
+        <option value="09">09</option>
+        <option value="10">10</option>
+        <option value="11">11</option>
+        <option value="12">12</option>
+        <option value="13">13</option>
+        <option value="14">14</option>
+        <option value="15">15</option>
+        <option value="16">16</option>
+        <option value="17">17</option>
+        <option value="18">18</option>
+        <option value="19">19</option>
+        <option value="20">20</option>
+        <option value="21">21</option>
+        <option value="22">22</option>
+        <option value="23">23</option>
+    </select>:
+    <select name="s_minute">
+    	<option value="00" selected>00</option>
+        <option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08">08</option>
+        <option value="09">09</option>
+        <c:forEach begin="10" end="59" step="1" var="minute">
+            <option value="${minute}">${minute}</option>
+        </c:forEach>
+    </select>
+    </span>
+    </p>
+    <p id="p_end">结束时间:<input type="text" class="input datepicker" name="enddate" id="enddate" value="${enddate}" readonly>
+       <span id="sel_end">
+       <select name="e_hour">
+    	<option value="00">00</option>
+    	<option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08">08</option>
+        <option value="09">09</option>
+        <option value="10">10</option>
+        <option value="11">11</option>
+        <option value="12">12</option>
+        <option value="13">13</option>
+        <option value="14">14</option>
+        <option value="15">15</option>
+        <option value="16">16</option>
+        <option value="17">17</option>
+        <option value="18" selected>18</option>
+        <option value="19">19</option>
+        <option value="20">20</option>
+        <option value="21">21</option>
+        <option value="22">22</option>
+        <option value="23">23</option>
+    </select>:
+    <select name="e_minute">
+    	<option value="00" selected>00</option>
+        <option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08">08</option>
+        <option value="09">09</option>
+        <c:forEach begin="10" end="59" step="1" var="minute">
+            <option value="${minute}">${minute}</option>
+        </c:forEach>
+    </select>
+    </span>
+    </p>
+    <p id="p_notice">提醒时间:<input type="text" class="input datepicker" name="noticedate" id="noticedate" value="${noticedate}" readonly>
+      <span id="sel_notice">
+      <select name="n_hour">
+    	<option value="00">00</option>
+    	<option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08" selected>08</option>
+        <option value="09">09</option>
+        <option value="10">10</option>
+        <option value="11">11</option>
+        <option value="12">12</option>
+        <option value="13">13</option>
+        <option value="14">14</option>
+        <option value="15">15</option>
+        <option value="16">16</option>
+        <option value="17">17</option>
+        <option value="18">18</option>
+        <option value="19">19</option>
+        <option value="20">20</option>
+        <option value="21">21</option>
+        <option value="22">22</option>
+        <option value="23">23</option>
+    </select>:
+    <select name="n_minute">
+    	<option value="00" selected>00</option>
+        <option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08">08</option>
+        <option value="09">09</option>
+        <c:forEach begin="10" end="59" step="1" var="minute">
+            <option value="${minute}">${minute}</option>
+        </c:forEach>
+    </select>
+    </span>
+<%--
+    </p>
+    <label><input type="checkbox" value="0" id="allDay" name="allDay"> 全天</label>
+    </p>
+--%>
+    <div class="sub_btn">
+    <span class="del"><input type="button" class="btn btn_del" id="del_event" value="删除"></span>
+    <input type="submit" class="btn btn_ok" value="确定"> 
+    <input type="button" class="btn btn_cancel" value="取消" onClick="$.fancybox.close()"></div>
+    </form>
+</div>
+
+<script type="text/javascript" src="${ctxStatic}/fullcalendar/js/jquery.form.min.js"></script>
+<script type="text/javascript">
+$(function(){
+
+	$(".datepicker").datepicker();
+
+	//提交表单
+	$('#add_form').ajaxForm({
+		beforeSubmit: showRequest, //表单验证
+        success: showResponse //成功返回
+    }); 
+	
+	//删除事件
+	$("#del_event").click(function(){
+		if(confirm("您确定要删除吗?")){
+			var eventid = $("#eventid").val();
+			$.post("${ctx }/iim/evolution.do?del",{id:eventid},function(msg){
+				if(msg==1){//删除成功
+					$.fancybox.close();
+					$('#calendar').fullCalendar('refetchEvents'); //重新获取所有事件数据
+				}else{
+					alert(msg);	
+				}
+			});
+		}
+	});
+});
+
+function showRequest(){
+	var events = $("#event").val();
+	var location = $("#location").val();
+	if(events==''){
+		alert("请输入日程内容!");
+		$("#event").focus();
+		return false;
+	}else if(location==''){
+	    alert("请输入日程地点!");
+	    $("#location").focus();
+	    return false ;
+    }
+}
+
+function showResponse(responseText, statusText, xhr, $form){
+	if(statusText=="success"){	
+		if(responseText==1){
+			$.fancybox.close();
+			$('#calendar').fullCalendar('refetchEvents'); //重新获取所有事件数据
+		}else{
+			alert(responseText);
+		}
+	}else{
+		alert(statusText);
+	}
+}
+</script>

+ 229 - 0
src/main/webapp/webpage/modules/iim/myCalendarForm-edit.jsp

@@ -0,0 +1,229 @@
+
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+<link rel="stylesheet" type="text/css" href="${ctxStatic}/fullcalendar/css/jquery-ui.css">
+<div class="fancy" style="width:460px; height:300px;">
+	<h3>编辑事件</h3>
+    <form id="add_form" action="${ctx }/iim/myCalendar/edit" method="post">
+    <input type="hidden" name="id" id="eventid" value="${myCalendar.id}">
+    <p>日程内容:<input type="text" class="input" name="event" id="event" value="${title }" style="width:320px" placeholder="简述日程主题..." ></p>
+    <p>日程地点:<input type="text" class="input" name="location" id="location" value="${location}" style="width:320px" placeholder="输入日程地点..."></p>
+    <p>开始时间:<input type="text" class="input datepicker" name="startdate" id="startdate" value="${start_d}" readonly>
+    <span id="sel_start">
+    <select name="s_hour">
+            <c:if test="${not empty start_h}">
+                <option value="${start_h}" selected>${start_h }</option>
+            </c:if>
+    	<option value="00">00</option>
+        <option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08">08</option>
+        <option value="09">09</option>
+        <option value="10">10</option>
+        <option value="11">11</option>
+        <option value="12">12</option>
+        <option value="13">13</option>
+        <option value="14">14</option>
+        <option value="15">15</option>
+        <option value="16">16</option>
+        <option value="17">17</option>
+        <option value="18">18</option>
+        <option value="19">19</option>
+        <option value="20">20</option>
+        <option value="21">21</option>
+        <option value="22">22</option>
+        <option value="23">23</option>
+    </select>:
+    <select name="s_minute">
+            <c:if test="${not empty start_m}">
+                <option value="${start_m}" selected>${start_m }</option>
+              </c:if>
+    	<option value="00">00</option>
+        <option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08">08</option>
+        <option value="09">09</option>
+        <c:forEach begin="10" end="59" step="1" var="minute">
+            <option value="${minute}">${minute}</option>
+        </c:forEach>
+    </select>
+    </span>
+    </p>
+    <p id="p_endtime">结束时间:<input type="text" class="input datepicker" name="enddate" id="enddate" value="${end_d}" readonly>
+    <span id="sel_end">
+        <select name="e_hour">
+            <c:if test="${not empty end_h}">
+                <option value="${end_h}" selected>${end_h}</option>
+            </c:if>
+    	<option value="00">00</option>
+    	<option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08">08</option>
+        <option value="09">09</option>
+        <option value="10">10</option>
+        <option value="11">11</option>
+        <option value="12">12</option>
+        <option value="13">13</option>
+        <option value="14">14</option>
+        <option value="15">15</option>
+        <option value="16">16</option>
+        <option value="17">17</option>
+        <option value="18">18</option>
+        <option value="19">19</option>
+        <option value="20">20</option>
+        <option value="21">21</option>
+        <option value="22">22</option>
+        <option value="23">23</option>
+    </select>:
+    <select name="e_minute">
+            <c:if test="${not empty end_m}">
+                <option value="${end_m}" selected>${end_m }</option>
+            </c:if>
+    	<option value="00">00</option>
+        <option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08">08</option>
+        <option value="09">09</option>
+        <c:forEach begin="10" end="59" step="1" var="minute">
+            <option value="${minute}">${minute}</option>
+        </c:forEach>
+    </select>
+    </span>
+    </p>
+    <p id="p_noticetime">提醒时间:<input type="text" class="input datepicker" name="noticedate" id="noticedate" value="${notice_d}" readonly>
+        <span id="sel_notice">
+        <select name="n_hour">
+            <c:if test="${not empty notice_h}">
+                <option value="${notice_h }" selected>${notice_h }</option>
+            </c:if>
+    	<option value="00">00</option>
+    	<option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="09">09</option>
+        <option value="10">10</option>
+        <option value="11">11</option>
+        <option value="12">12</option>
+        <option value="13">13</option>
+        <option value="14">14</option>
+        <option value="15">15</option>
+        <option value="16">16</option>
+        <option value="17">17</option>
+        <option value="18">18</option>
+        <option value="19">19</option>
+        <option value="20">20</option>
+        <option value="21">21</option>
+        <option value="22">22</option>
+        <option value="23">23</option>
+    </select>:
+    <select name="n_minute" >
+            <c:if test="${not empty notice_m}">
+                <option value="${notice_m}" selected>${notice_m}</option>
+            </c:if>
+    	<option value="00">00</option>
+        <option value="01">01</option>
+        <option value="02">02</option>
+        <option value="03">03</option>
+        <option value="04">04</option>
+        <option value="05">05</option>
+        <option value="06">06</option>
+        <option value="07">07</option>
+        <option value="08">08</option>
+        <option value="09">09</option>
+        <c:forEach begin="10" end="59" step="1" var="minute">
+            <option value="${minute}">${minute}</option>
+        </c:forEach>
+    </select>
+    </span>
+    </p>
+<%--
+    <p>
+    <label><input type="checkbox" value="1" id="allDay" name="allDay"<c:if test="${'1' == allDay }">checked="checked"</c:if>> 全天</label>
+    </p>
+  --%>
+    <div class="sub_btn">
+    <span class="del"><input type="button" class="btn btn_del" id="del_event" value="删除"></span>
+    <input type="submit" class="btn btn_ok" value="确定"> 
+    <input type="button" class="btn btn_cancel" value="取消" onClick="$.fancybox.close()"></div>
+    </form>
+</div>
+
+<script type="text/javascript" src="${ctxStatic}/fullcalendar/js/jquery.form.min.js"></script>
+<script type="text/javascript">
+$(function(){
+	$(".datepicker").datepicker();
+
+	//提交表单
+	$('#add_form').ajaxForm({
+		beforeSubmit: showRequest, //表单验证
+        success: showResponse //成功返回
+    }); 
+	
+	//删除事件
+	$("#del_event").click(function(){
+		if(confirm("您确定要删除吗?")){
+			var eventid = $("#eventid").val();
+			$.post("${ctx }/iim/myCalendar/del",{id:eventid},function(msg){
+				if(msg==1){//删除成功
+					$.fancybox.close();
+					$('#calendar').fullCalendar('refetchEvents'); //重新获取所有事件数据
+				}else{
+					alert(msg);	
+				}
+			});
+		}
+	});
+});
+
+function showRequest(){
+	var events = $("#event").val();
+	var location = $("#location").val();
+	if(events==''){
+		alert("请输入日程内容!");
+		$("#event").focus();
+		return false;
+	}else if(location == ''){
+        alert("请输入日程地点!");
+        $("#location").focus();
+        return false;
+    }
+}
+
+function showResponse(responseText, statusText, xhr, $form){
+	if(statusText=="success"){	
+		if(responseText==1){
+			$.fancybox.close();
+			$('#calendar').fullCalendar('refetchEvents'); //重新获取所有事件数据
+		}else{
+			alert(responseText);
+		}
+	}else{
+		alert(statusText);
+	}
+}
+</script>

+ 222 - 0
src/main/webapp/webpage/modules/iim/myFriends.jsp

@@ -0,0 +1,222 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+
+<head>
+
+    <title>通讯录</title>
+    <meta name="decorator" content="default"/>
+    
+     <link href="${ctxStatic}/common/css/animate.css" rel="stylesheet">
+
+
+	<script type="text/javascript">
+	
+		function search(n,s){
+			$("#searchForm").attr("action","${ctx}/iim/contact/index");
+			$("#searchForm").submit();
+	    	return false;
+	    }
+
+	    function deleteFriend(id){
+            top.layer.confirm('确认要删除好友吗?', {icon: 3, title:'系统提示'}, function(index){
+                window.location = "${ctx}/iim/contact/delFriend?id="+id;
+                top.layer.close(index);
+            });
+	    }
+	    function friendAudit(id){
+            top.layer.confirm('确认要添加好友吗?', {icon: 1, title:'系统提示'}, function(index){
+                window.location = "${ctx}/iim/contact/friendAudit?id="+id;
+                top.layer.close(index);
+            });
+	    }
+	    function friendAuditNo(id){
+            top.layer.confirm('确认要拒绝好友吗?', {icon: 1, title:'系统提示'}, function(index){
+                window.location = "${ctx}/iim/contact/friendAuditNo?id="+id;
+                top.layer.close(index);
+            });
+	    }
+	</script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+        .contact-box{
+            padding-left:35px;
+            padding-right:35px;
+            height:260px;
+        }
+        .contact-box a,
+        .contact-box a:hover{
+            color:#333333;
+        }
+        address{
+            margin-top: 10px;
+            margin-bottom: 0px;
+        }
+        .edit-friend{
+            position: absolute;
+            top:130px;
+            right:50px;
+            width:30px;
+        }
+
+    </style>
+</head>
+
+<body>
+<div class="wrapper wrapper-content">
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div id="queryDiv">
+            </div>
+        </div>
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+
+            <br class="row">
+            <c:forEach var="user" items="${listAudit}">
+
+               <div class="col-sm-4" style="padding: 0">
+                   <div style="padding: 0 15px 15px 15px;">
+                       <div class="contact-box">
+                           <a href="javascript:void(0)">
+                               <div style="height:100px;">
+                                   <div class="text-center" style="width:100px;height: 100%;">
+                                       <img alt="image" class="img-circle" style="max-height: 100%;max-width: 100%;height:100%;" src="<c:out value="${user.photo}" />">
+                                   </div>
+                               </div>
+                               <div>
+                                   <address>
+                                       <span>姓名:</span><c:out value="${user.name}" /><br>
+                                       <span>状态:</span>[待审批]<br>
+                                       <span>公司:</span><c:out value="${user.company.name}" /><br>
+                                       <span>部门:</span><c:out value="${user.office.name}" /><br>
+                                       <span>电子邮件:</span><c:out value="${user.email}" /><br>
+                                       <span>固定电话:</span><c:out value="${user.phone}" /><br>
+                                       <span title="Phone">手机:</span> <c:out value="${user.mobile}" />
+                                   </address>
+                               </div>
+                               <div class="edit-friend">
+                                   <c:if test="${user.friendType == 1}">
+                                       <a class="hidden pull-right close-link btn btn-outline  btn-default btn-circle"   onclick="friendAudit('${user.id}')"><i class="fa fa-edit"></i>
+                                       </a>
+                                       <a class="hidden pull-right close-link btn btn-outline  btn-default btn-circle"   onclick="friendAuditNo('${user.id}')"><i class="fa fa-times"></i>
+                                       </a>
+                                   </c:if>
+                               </div>
+                               <div class="clearfix"></div>
+                           </a>
+                       </div>
+                   </div>
+               </div>
+            </c:forEach>
+
+            <c:forEach var="user" items="${list}">
+     		
+                <div class="col-sm-4" style="padding: 0">
+                    <div style="padding: 0 15px 15px 15px;">
+                        <div class="contact-box">
+                            <a href="javascript:void(0)">
+                                <div style="height:100px;">
+                                    <div class="text-center" style="width:100px;height: 100%;">
+                                        <img alt="image" class="img-circle" style="max-height: 100%;max-width: 100%;height:100%;" src="<c:out value="${user.photo}" />">
+                                    </div>
+                                </div>
+                                <div>
+                                    <address>
+                                        <span>姓名:</span><c:out value="${user.name}" /><br>
+                                        <span>状态:</span>好友<br>
+                                        <span>公司:</span><c:out value="${user.company.name}" /><br>
+                                        <span>部门:</span><c:out value="${user.office.name}" /><br>
+                                        <span>电子邮件:</span><c:out value="${user.email}" /><br>
+                                        <span>固定电话:</span><c:out value="${user.phone}" /><br>
+                                        <span title="Phone">手机:</span> <c:out value="${user.mobile}" />
+                                    </address>
+                                </div>
+                                  <div class="edit-friend">
+                                    <a class="hidden pull-right close-link btn btn-outline  btn-default btn-circle"   onclick="deleteFriend('${user.id}')"><i class="fa fa-times"></i>
+                                    </a>
+                                  </div>
+                                <div class="clearfix"></div>
+                            </a>
+                        </div>
+                    </div>
+                </div>
+            </c:forEach>
+            <div class="col-sm-4"  style="padding: 0">
+                <div style="padding: 0 15px 15px 15px;">
+                    <div class="contact-box">
+                        <a href="javascript:void(0)" onclick="searchFriend()">
+                            <div class="">
+                                <div class="text-center">
+                                    <img alt="image" style="height:140px;width:140px" class="img-circle" src="${ctxStatic}/images/add_user.jpg">
+                                    <div class="m-t-xs font-bold"></div>
+                                </div>
+                            </div>
+                            <div class="">
+                                <br/>
+                                <br/>
+                                <h1 class="text-center"><strong>添加好友</strong></h1>
+                            </div>
+                            <div class="clearfix"></div>
+                        </a>
+                    </div>
+                </div>
+            </div>
+                <div style="clear: both;"></div>
+        </div>
+        </div>
+    </div>
+</div>
+<script>
+    resizeListWindow3();
+    $(window).resize(function(){
+        resizeListWindow3();
+    });
+</script>
+    <!-- 全局js -->
+
+    <script>
+	    $(document).ready(function () {
+	        $('.contact-box').each(function () {
+	            animationHover(this, 'pulse');
+	        });
+
+	    });
+
+	    function searchFriend(){
+			top.layer.open({
+			    type: 2,  
+			    area: ['95%','95%'],
+			    title:"添加好友",
+			    name:'friend',
+                skin:"two-btns",
+			    content: "${ctx}/iim/contact/searchUsers" ,
+			    btn: ['确定', '关闭'],
+			    yes: function(index, layero){
+			    	 var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+			    	 var ids = iframeWin.getSelectedIds();
+
+			    	 if(ids == "-1"){
+				    	 return;
+			    	 }
+			    	 window.location = "${ctx}/iim/contact/addFriend?ids="+ids;
+					 top.layer.close(index);//关闭对话框。
+				  },
+				  cancel: function(index){ 
+	    	       }
+			}); 
+		};
+	</script>
+
+    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
+    <!--统计代码,可删除-->
+
+</body>
+
+</html>

+ 123 - 0
src/main/webapp/webpage/modules/iim/search_user.jsp

@@ -0,0 +1,123 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>用户管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+
+
+
+			    $('#contentTable thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
+			    	  $('#contentTable tbody tr td input.i-checks').iCheck('check');
+			    	});
+
+			    $('#contentTable thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
+			    	  $('#contentTable tbody tr td input.i-checks').iCheck('uncheck');
+			    	});
+
+
+		});
+
+		function getSelectedIds(){
+
+			  var str="";
+			  var ids="";
+			  $("#contentTable tbody tr td input.i-checks:checkbox").each(function(){
+			    if(true == $(this).is(':checked')){
+			      str+=$(this).attr("id")+",";
+			    }
+			  });
+
+			  if(str.substr(str.length-1)== ','){
+			    ids = str.substr(0,str.length-1);
+			  }
+			  if(ids == ""){
+				top.layer.alert('请至少选择一条数据!', {icon: 0, title:'警告'});
+				return '-1';
+			  }
+
+			  return ids;
+
+		}
+		function page(n,s){
+			if(n) $("#pageNo").val(n);
+			if(s) $("#pageSize").val(s);
+			$("#searchForm").attr("action","${ctx}/iim/contact/searchUsers");
+			$("#searchForm").submit();
+	    	return false;
+	    }
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="user" action="${ctx}/iim/contact/searchUsers" method="post" class="form-inline">
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn  id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"></table:sortColumn><!-- 支持排序 -->
+
+					<div class="commonQuery">
+						<div class="layui-item query athird">
+							<span class="layui-form-label">手机号:</span>
+							<div class="layui-input-block">
+								<form:input path="mobile" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<span class="layui-form-label">姓名:</span>
+							<div class="layui-input-block">
+								<form:input path="name" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird fr">
+							<div class="input-group">
+								<button id="searchReset" class="fixed-btn searchReset fr" style="margin-right: 0px;" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="layui-item layui-col-xs12 form-table-container">
+				<table id="contentTable" class="table details table-bordered table-condensed">
+					<thead>
+						<tr>
+							<th width="50"> <input type="checkbox" class="i-checks"></th>
+							<th>公司</th>
+							<th>部门</th>
+							<th>登录名</th>
+							<th>姓名</th>
+							<th>电话</th>
+							<th>手机</th>
+							<%--<th>岗位</th> --%>
+						</tr>
+					</thead>
+					<tbody>
+					<c:forEach items="${list}" var="user">
+						<tr>
+							<td width="50"> <input type="checkbox" id="${user.id}" class="i-checks"></td>
+							<td>${user.company.name}</td>
+							<td>${user.office.name}</td>
+							<td>${user.loginName}</td>
+							<td>${user.name}</td>
+							<td>${user.phone}</td>
+							<td>${user.mobile}</td><%--
+							<td>${user.roleNames}</td> --%>
+						</tr>
+					</c:forEach>
+					</tbody>
+				</table>
+			</div>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 420 - 0
src/main/webapp/webpage/modules/isignature/DocumentEdit.jsp

@@ -0,0 +1,420 @@
+<%@ page contentType="text/html;charset=UTF-8"%>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+<%
+    String path = request.getContextPath();
+    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/a";
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <title>电子签章</title>
+    <%--<meta http-equiv="X-UA-Compatible" content="IE=9" />--%>
+    <script src="${ctxStatic}/iSignature/js/jquery-1.4.2.min.js"></script>
+    <link rel='stylesheet' type='text/css' href='${ctxStatic}/iSignature/css/iWebProduct.css' />
+    <script type="text/javascript">
+
+        var url = getRootPath_dc();
+        var mRecordID = "${iSignatureDocument.id}";
+        var mFilePath = "${iSignatureDocument.filePath}";
+        var mFileName = "${iSignatureDocument.fileName}";
+
+        var mIsExsitRId = true;
+
+        function getRootPath_dc() {
+            var pathName = window.location.pathname.substring(1);
+            var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
+            if (webName == "") {
+                return window.location.protocol + '//' + window.location.host;
+            }
+            else {
+                return window.location.protocol + '//' + window.location.host + '/' + webName;
+            }
+        }
+    </script>
+    <script language="javascript">
+        var nClick = 1;//鼠标点击次数
+        var ToolBarId;
+        var MenuId;
+        function init(){
+            /*iWebPDF2018.COMAddins("KingGrid.ComControl").Object.Copyright = "";  //设置授权码*/
+            document.getElementById('activeBox').style.height = document.documentElement.clientHeight- 10 +"px";
+            document.getElementById('activeTable').style.height = getHeight('activeBox')- 15  +"px";
+            document.getElementById('iWebPDF2018').style.height = getHeight('activeTd') +"px";
+            /*getRealSysTime();*/
+        }
+        //获取id的高度
+        function  getHeight(id){
+            return document.getElementById(id).offsetHeight;
+        }
+        //状态信息
+        function addState(value){
+            $("#state").html(value);
+        }
+        //清空批注
+        function DelAllAnnots(){
+            try{
+                if ( 0 == iWebPDF2018.Documents.Count ){
+                    alert("没有已打开文档");
+                    return;
+                }
+
+                var nPage = iWebPDF2018.Documents.ActiveDocument.Pages.Count;
+                for(var i=0; i < nPage; i++)
+                {
+                    var nAnnot = iWebPDF2018.Documents.ActiveDocument.Pages(i).Annots.Count;
+                    for(var j = nAnnot-1;j >= 0;j--)
+                    {
+//				iWebPDF2018.Documents.ActiveDocument.pages(i).Annots(j).Delete();
+                        var annot = iWebPDF2018.Documents.ActiveDocument.pages(i).Annots(j);
+
+                        if( annot.Subtype != "Widget")      //批注对象为构件类型时不能删除,会崩溃
+                        {
+                            annot.Delete();
+                        }
+//如果是要指定删除的可以==“Text”  Text为文字批注  Line为线 Square为矩形 Circle为圆形批注 Stamp为图章批注
+                    }
+                    iWebPDF2018.Documents.ActiveDocument.Pages(i).Refresh();
+                }
+                iWebPDF2018.Documents.ActiveDocument.Views.ActiveView.Refresh();
+            }catch(e){
+                alert(e.description);
+            }
+        }
+        //锁定批注
+        function LockAnnots(){
+            try{
+                if ( 0 == iWebPDF2018.Documents.Count ){
+                    alert("没有已打开文档");
+                    return;
+                }
+                var nAnnot = iWebPDF2018.Documents.ActiveDocument.Pages.Item(0).Annots.Count;
+                for(var i=0; i<nAnnot; i++)
+                {
+                    iWebPDF2018.Documents.ActiveDocument.Pages.Item(0).Annots.item(i).Locked = true;
+
+                }
+
+            }catch(e){
+                alert(e.description);
+            }
+        }
+
+        //解除锁定批注
+        function UnlockAnnots(){
+            try{
+                if ( 0 == iWebPDF2018.Documents.Count ){
+                    alert("没有已打开文档");
+                    return;
+                }
+                var nAnnot = iWebPDF2018.Documents.ActiveDocument.Pages.Item(0).Annots.Count;
+                for(var i=0; i<nAnnot; i++)
+                {
+                    iWebPDF2018.Documents.ActiveDocument.Pages.Item(0).Annots.item(i).Locked = false;
+                }
+
+            }catch(e){
+                alert(e.description);
+            }
+        }
+
+        //普通模式
+        function NormalMode(){
+            try{
+
+                var n = iWebPDF2018.CommandBars.Count;
+
+                for(var i=0; i<n; i++)
+                {
+                    var CommandBar = iWebPDF2018.CommandBars.item(i);
+                    CommandBar.Visible = true;
+                }
+
+                addState("普通模式。");
+            }catch(e){
+                addState("普通模式进入失败。");
+                alert(e.description);
+            }
+        }
+
+        //批注模式
+        function AnnotMode(){
+            try{
+
+                var n = iWebPDF2018.CommandBars.Count;
+
+                for(var i=0; i<n; i++)
+                {
+                    var CommandBar = iWebPDF2018.CommandBars.item(i);
+
+                    var name = CommandBar.Name;
+                    if(name == "MenuBar" ||name == "Rotate" ||name == "Zoom" ||name == "Find" ||name == "DigitalSignature")
+                    {
+                        CommandBar.Visible = false;
+                    }
+                    else
+                    {
+                        CommandBar.Visible = true;
+                    }
+                }
+
+                addState("批注模式设置成功。");
+            }catch(e){
+                addState("批注模式设置失败。");
+                alert(e.description);
+            }
+        }
+
+        //盖章模式
+        function SigMode(){
+            try{
+
+                var n = iWebPDF2018.CommandBars.Count;
+
+                for(var i=0; i<n; i++)
+                {
+                    var CommandBar = iWebPDF2018.CommandBars.item(i);
+
+                    var name = CommandBar.Name;
+                    if(name == "MenuBar" ||name == "File" ||name == "Rotate" ||name == "Zoom" ||name == "Standard" ||name == "Find" ||name == "Annots" ||name == "Comments")
+                    {
+                        CommandBar.Visible = false;
+                    }
+                    else
+                    {
+                        CommandBar.Visible = true;
+                    }
+                }
+
+                addState("盖章模式设置成功。");
+            }catch(e){
+                addState("盖章模式设置失败。");
+                alert(e.description);
+            }
+        }
+
+        //添加文本域
+        function addTextField(){
+            try{
+                if ( 0 == iWebPDF2018.Documents.Count )
+                {
+                    alert("没有已打开文档");
+                    return;
+                }
+
+                var nCount = iWebPDF2018.Documents.ActiveDocument.Fields.Count;
+                var field =iWebPDF2018.Documents.ActiveDocument.Fields.Add(3);
+
+                var widget = field.AddToPage(0);
+                widget.FromUserRect(100, 750, 250, 780);
+                widget.UpdateAppearance();
+
+                field.Name = "TextField";
+                field.Value = "KingGrid";
+                field.Visible = true;
+
+                iWebPDF2018.Documents.ActiveDocument.Views.ActiveView.Refresh();
+
+                addState("添加文本域成功。");
+            }catch(e){
+                addState("添加文本域失败。");
+                alert(e.description);
+            }
+
+        }
+
+
+        //跳转到第一个域
+        function gotoFields(){
+            try{
+                if ( 0 == iWebPDF2018.Documents.Count ){
+                    alert("没有已打开文档");
+                    return;
+                }
+                var fields = iWebPDF2018.Documents.ActiveDocument.Fields;
+                if(fields.Count != 0){
+                    fields(0).Goto();
+                }else{
+                    alert("文档中不存在域");
+                }
+                addState("跳转至第一个域成功。");
+            }catch(e){
+                addState("跳转至第一个域失败。");
+                alert(e.description);
+            }
+        }
+
+        //获取域个数
+        function GetFileds(){
+
+            try{
+                if ( 0 == iWebPDF2018.Documents.Count )
+                {
+                    alert("没有已打开文档");
+                    retrun;
+                }
+                var fields = iWebPDF2018.Documents.ActiveDocument.Fields;
+                var count=fields.Count;
+                alert("域的个数" + count);
+
+                addState("获取域个数成功。");
+            }catch(e){
+                addState("获取域个数失败。");
+                alert(e.description);
+            }
+
+
+        }
+
+        //删除所有域
+        function delAllFields(){
+            try{
+                if ( 0 == iWebPDF2018.Documents.Count )
+                {
+                    alert("没有已打开文档");
+                    return;
+                }
+                var fields = iWebPDF2018.Documents.ActiveDocument.Fields;
+                var count = fields.Count;
+
+                for(var i=0; i<count; i++)
+                {
+                    var sigfield = fields(0);
+                    sigfield.Delete();
+                }
+                iWebPDF2018.Documents.ActiveDocument.Views.ActiveView.Refresh();
+                addState("删除成功");
+            }catch(e){
+                addState("删除失败");
+                alert(e.description);
+            }
+        }
+
+        //是否允许文本域输入 (域交互)
+        function IsAllowInteraction(){
+            try{
+                if ( 0 == iWebPDF2018.Documents.Count ){
+                    alert("没有已打开文档");
+                    return;
+                }
+
+                var Res = false;
+                var document = iWebPDF2018.Documents.ActiveDocument;
+                var fields = document.Fields;
+                var cnt = fields.Count;
+                if (cnt)
+                {
+                    nClick++;
+                    if(nClick%2)
+                    {
+                        Res = false;
+                        alert("禁止文本域输入!");
+                    }
+                    else
+                    {
+                        Res = true;
+                        alert("允许文本域输入!");
+                    }
+                    for(var i = 0 ;i < cnt; i++)
+                    {
+                        fields.Item(i).AllowInteraction = Res;
+                    }
+                    addState("域交互控制成功!");
+                }
+            }catch(e){
+                addState("域交互控制失败");
+                alert(e.description);
+            }
+        }
+
+        //文档转图片
+        function FileToPic(){
+            try{
+                var picPath = "c:\\p1.png";
+                var res = iWebPDF2018.Documents.ActiveDocument.Pages.Item(0).ExportPNG(picPath);
+                if (!res)
+                {
+                    alert("首页图片保存为:"+picPath);
+                }
+                addState("图片转文档成功!");
+            }catch(e){
+                addState("图片转文档失败!");
+                alert(e.description);
+            }
+        }
+        function insertImage(url)
+
+        {
+            if ( 0 == iWebPDF2018.Documents.Count )
+            {
+                alert("没有已打开文档");
+                retrun;
+            }
+            var annot = iWebPDF2018.Documents.ActiveDocument.Pages(0).Annots.Add(12);
+            annot.FromDeviceRect(100,100,200,40);
+            annot.BlendMode = "Multiply";
+            annot.Title = "Admin";
+            annot.Color = 255;
+            annot.ImageAppearance(url);
+            iWebPDF2018.Documents.ActiveDocument.Views.ActiveView.Refresh();
+        }
+    </script>
+</head>
+<body onload="init()" onresize="init()" style="overflow-y:hidden;overflow-x:hidden">
+<table id="maintable"  cellspacing='0' cellpadding='0' >
+    <!-- head -->
+    <tr><td height="34px" class="title" width="80%">
+        <span>主题:${iSignatureDocument.subject}</span>
+        <span style="display: none">编号:${iSignatureDocument.recordId}</span>
+        <span style="margin-left: 50px;">
+            <c:if test="${ not empty contractNumPath}">
+            <span>编号:${contractNum}</span>
+            <span><button href="javascript:void(0)" class="nav-btn nav-btn-add" onclick="insertImage('${contractNumPath}');">生成编号图片</button></span>
+            </c:if>
+		<%--作者:--%>
+		<%--<c:if test="${empty iSignatureDocument.id}">--%>
+            <%--${fns:getUser().name}--%>
+        <%--</c:if>--%>
+		<%--<c:if test="${not empty iSignatureDocument.id}">--%>
+            <%--${fns:getUserById(iSignatureDocument.updateBy.id).name}--%>
+        <%--</c:if>--%>
+	</span>
+    </td>
+        <td class="title"><span><a href="#" id="saveFile" >保存文档</a></span>
+            <span><a href="#" onclick="return window.close();">返回</a></span>
+        </td>
+
+    </tr>
+    <!-- end head -->
+
+    <!-- showList -->
+    <tr><td id="showtr" colspan="2" >
+        <table id="functionBox" border="0">
+            <tr>
+
+                <td id="activeBox">
+                    <form id="iWebPDF"   method="post" action="${ctx}/isignature/iSignatureDocument/saveP" onSubmit="return window.close();">
+                    </form>
+                    <table id="activeTable" >
+                        <tr>
+                            <td colspan="2" id="activeTd"><script src="${ctxStatic}/iSignature/js/iWebPDF2018.js"></script></td>
+                        </tr>
+
+                        <%--<tr>
+                            <td height="10px" align="left" class="statue">状态:<span id="state"></span></td>
+                            <td align="right" id="systime">时间:</td>
+                        </tr>--%>
+                    </table>
+                </td>
+            </tr>
+        </table>
+    </td></tr>
+    <!-- end showList -->
+
+    <!-- footer -->
+    <tr ><td colspan="2" height="30px"  class="footer"><table><tr><td align="center">江西金格科技股份有限公司 版权所有</td></tr></table></td></tr>
+    <!-- end footer -->
+</table>
+<script src="${ctxStatic}/iSignature/js/iWebProduct.js"></script>
+</body>
+</html>

+ 140 - 0
src/main/webapp/webpage/modules/isignature/DocumentList.jsp

@@ -0,0 +1,140 @@
+<%@ page contentType="text/html;charset=utf-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=8">
+ <link rel='stylesheet' type='text/css' href='${ctxStatic}/iSignature/css/iWebProduct.css' />
+ <script language="javascript">
+  function CheckActiveX(){
+    var mObject=true;
+    try{
+      var newAct = iWebPDF2018.Documents;
+      if(newAct == undefined ){
+       mObject=false;
+      }
+    }catch(e){
+      mObject=false;
+    }
+    newAct = null;
+    if(mObject){
+	  activex_install.innerHTML = "已经安装iWebPDF2018中间件!";
+	  activex_install.style.color="#FFFFFF";
+    }else{
+      //控件无法加载
+      activex_install.innerHTML = "请注意,未检测到iWebPDF2018中间件!请查看说明,并按说明的要求检查您使用的环境。";
+	  activex_install.style.color="#FF0000";
+    }
+    return mObject;
+  }
+
+  function init(){
+    document.getElementById('showtr').style.height = getHeight('maintable')- 100 +"px";
+    document.getElementById('showlist').style.height = getHeight('showtr')- 120 +"px";
+    document.getElementById('showlist').style.width = document.getElementById('titleTable').offsetWidth;
+  }
+  //获取id的高度
+  function  getHeight(id){
+    return document.getElementById(id).offsetHeight;
+  }
+
+  function ShowExplain(){
+    window.showModalDialog("${ctxStatic}/iSignature/UserExplain.html",window,"dialogWidth=780px;dialogHeight=300px");
+  }
+
+
+  function ShowNewPage(){
+
+     window.location.href='${ctx}/isignature/iSignatureDocument/edit?subject=&recordId=';
+
+  }
+  function isEmpty(obj) {
+      if(obj==null || obj==undefined || obj=="" || obj.length ==0){
+          return true;
+      }
+      return false ;
+  }
+ </script>
+</head>
+<body onload="init()" onresize="init()" style="overflow-y:hidden;overflow-x:hidden">
+<table id="maintable"  cellspacing='0' cellpadding='0' >
+ <!-- head -->
+ <tr><td height="34px" class="title" ><span id="activex_install" style="color: #FF0000">请注意,未检测到iWebPDF2018中间件!请查看说明,并按说明的要求检查您使用的环境。</span>
+    <a href="#" onclick="ShowExplain()">[说明]</a>
+    <div id="obj" style="display:none">
+		<table width="100%"><tr><td id="addPDF" height="22"><script src="${ctxStatic}/iSignature/js/iWebPDF2018.js"></script></td></tr></table>
+   </div>
+
+ </td></tr>
+ <!-- end head -->
+
+ <!-- showList -->
+ <tr><td id="showtr" >
+  <table><tr><td valign="top" align="center" >
+    <img id="loading" src="${ctxStatic}/iSignature/css/load.gif" alt="" />
+    <div style="display: none;" id="loaded">
+    <table id="innerTable" border=0  cellspacing='0' cellpadding='0'>
+     <tr>
+       <td align="left" style="border: 0" height="50px" colspan="6">
+           <span>请输入主题:<input type=text id="subject" name=subject value="" class="InputLine" /></span>
+	       <span style="padding-left: 30px;">当前用户:${fns:getUser().name}</span>
+       </td>
+       <td style="border: 0"><a href="#" onclick="ShowNewPage()">新建文档</a></td>
+     </tr>   
+    </table>
+   <table id="titleTable" cellspacing='0' cellpadding='0' align="center"  style="height: 42px;">
+	 <tr>
+	  <td width="20%">编号</td>
+	  <td width="20%">主题</td>
+	  <td width="10%">作者</td>
+	  <td width="10%">类型</td>
+	  <td width="20%">保存时间</td>
+	  <td width="10%">操作</td>
+	
+	</tr> 
+   </table>
+   <div id="showlist" style="vertical-align: top;">
+	    <table align="center"  cellspacing='0' cellpadding='0' width="20px">
+            <c:if test="${empty iSignatureDocumentList}">
+                <tr>
+                    <h3 align="center">暂无数据</h3>
+                </tr>
+            </c:if>
+            <c:if test="${not empty iSignatureDocumentList}">
+                <c:forEach items="${iSignatureDocumentList}" var="iSignatureDocument" varStatus="varStatus">
+                    <tr>
+                        <td width="20%" class="TD0">${iSignatureDocument.recordId}</td>
+                        <td width="20%" class="TD0">${iSignatureDocument.subject}</td>
+                        <td width="10%" class="TD0">${fns:getUserById(iSignatureDocument.createBy.id).name}</td>
+                        <td width="10%" class="TD0">${iSignatureDocument.type}</td>
+                        <td width="20%" class="TD0">
+                            <fmt:formatDate value="${iSignatureDocument.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+                        </td>
+                        <td width="10%"  align=center class="TD0">
+                            <a href="${ctx}/isignature/iSignatureDocument/edit?id=${iSignatureDocument.id}">阅读</a>
+                        </td>
+                    </tr>
+                </c:forEach>
+            </c:if>
+		    <tr><td style='border:none;'></td><tr>
+	  </table>
+   </div>   
+    </div>
+ </td></tr></table>
+ 
+ </td></tr>
+
+</table>
+</body> 
+</html>
+<script language="javascript" type="text/javascript">
+ var checkActiveX  = CheckActiveX();
+ if(checkActiveX){
+ document.getElementById('loading').style.display = "none";
+ document.getElementById('loaded').style.display = "";
+ }else{
+  document.getElementById('loading').style.display = "none";
+  document.getElementById('loaded').style.display = "";
+ }
+
+ 
+</script>

+ 65 - 0
src/main/webapp/webpage/modules/isignature/DocumentSave.jsp

@@ -0,0 +1,65 @@
+<%@ page contentType="text/html;charset=gb2312" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ page import="com.jeeplus.modules.isignature.entity.iDBManager2000,java.sql.ResultSet" %>
+<%
+  String mRecordID=request.getParameter("RecordID");
+  if (mRecordID==null) mRecordID="";
+  String mSubject=new String(request.getParameter("Subject").getBytes("8859_1"));
+  String mAuthor=new String(request.getParameter("Author").getBytes("8859_1"));
+  String mFileDate=new String(request.getParameter("FileDate").getBytes("8859_1"));
+  String mFileType="pdf";
+  String mStatus="READ";
+
+    iDBManager2000 DbaObj=new iDBManager2000();
+if (DbaObj.OpenConnection())
+{
+  String mysql="SELECT RecordID from  Document Where RecordID='" + mRecordID + "'";
+  try
+  {
+    ResultSet result=DbaObj.ExecuteQuery(mysql) ;
+    if (result.next())
+    {
+      mysql="update Document set RecordID=?,Subject=?,Author=?,FileDate=?,FileType=?,Status=? where RecordID='"+mRecordID+"'";
+    }
+    else
+    {
+      mysql="insert into Document (RecordID,Subject,Author,FileDate,FileType,Status) values (?,?,?,?,?,?)";
+    }
+    result.close();
+  }
+  catch(Exception e)
+  {
+      System.out.println(e.toString());
+  }
+  java.sql.PreparedStatement prestmt=null;
+  try
+  {
+      prestmt=DbaObj.Conn.prepareStatement(mysql);
+      prestmt.setString(1,mRecordID);
+      prestmt.setString(2,mSubject);
+      prestmt.setString(3,mAuthor);
+      prestmt.setString(4,mFileDate);
+      prestmt.setString(5,mFileType);
+      prestmt.setString(6,"READ");
+      
+      DbaObj.Conn.setAutoCommit(false) ;
+      prestmt.executeUpdate();
+      DbaObj.Conn.commit();
+
+  }
+  catch(Exception e)
+  {
+      System.out.println(e.toString());
+  }
+  finally
+  {
+      prestmt.close();
+  }
+  DbaObj.CloseConnection() ;
+}
+else
+{
+  out.println("OpenDatabase Error") ;
+}
+response.sendRedirect("${ctx}/isignature/iSignatureDocumente/edit");
+%>

+ 347 - 0
src/main/webapp/webpage/modules/isignature/PDFServer.jsp

@@ -0,0 +1,347 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ page import="java.io.*" %>
+<%@ page import="java.text.*" %>
+<%@ page import="java.util.*" %>
+<%@ page import="java.sql.*" %>
+<%@ page import="DBstep.iMsgServer2000.*" %>
+<%@ page import="com.jeeplus.modules.isignature.entity.iDBManager2000" %>
+<%!
+public class iWebOffice {
+  private int mFileSize;
+  private byte[] mFileBody;
+  private String mFileName;
+  private String mFileType;
+  private String mFileDate;
+  private String mFileID;
+
+  private String mRecordID;
+  private String mTemplate;
+  private String mDateTime;
+  private String mOption;
+  private String mMarkName;
+  private String mPassword;
+  private String mMarkList;
+  private String mBookmark;
+  private String mDescript;
+  private String mHostName;
+  private String mMarkGuid;
+  private String mCommand;
+  private String mContent;
+  private String mHtmlName;
+  private String mDirectory;
+  private String mFilePath;
+
+  private String mUserName;
+  private int mColumns;
+  private int mCells;
+  private String mMyDefine1;
+  private String mLocalFile;
+  private String mRemoteFile;
+  private String mLabelName;
+  private String mImageName;
+  private String mTableContent;
+
+  private String Sql;
+
+  //打印控制
+  private String mOfficePrints;
+  private int mCopies;
+
+  //自定义信息传递
+  private String mInfo;
+
+  private DBstep.iMsgServer2000 MsgObj;
+  private iDBManager2000 DbaObj;
+
+  // ************* 文档、模板管理代码    开始  *******************************
+
+  //调出文档,将文档内容保存在mFileBody里,以便进行打包
+  private boolean LoadFile() {
+    boolean mResult = false;
+    String Sql = "SELECT FileBody,FileSize FROM Document_File WHERE RecordID='" +
+        mRecordID + "'";
+    try {
+      if (DbaObj.OpenConnection()) {
+        try {
+          ResultSet result = DbaObj.ExecuteQuery(Sql);
+          if (result.next()) {
+            try {
+              mFileBody = result.getBytes("FileBody");
+              if (result.wasNull()) {
+                mFileBody = null;
+              }
+              mResult = true;
+            }
+            catch (Exception ex) {
+              System.out.println(ex.toString());
+            }
+          }
+          result.close();
+        }
+        catch (SQLException e) {
+          System.out.println(e.getMessage());
+          mResult = false;
+        }
+      }
+    }
+    finally {
+      DbaObj.CloseConnection();
+    }
+    return (mResult);
+  }
+
+  //保存文档,如果文档存在,则覆盖,不存在,则添加
+  private boolean SaveFile() {
+    boolean mResult = false;
+    int iFileId = -1;
+    String Sql = "SELECT * FROM Document_File WHERE RecordID='" + mRecordID +
+        "'";
+
+    try {
+      if (DbaObj.OpenConnection()) {
+        try {
+          ResultSet result = DbaObj.ExecuteQuery(Sql);
+          if (result.next()) {
+            System.out.println("sdfd");
+            Sql = "update Document_File set RecordID=?,FileName=?,FileType=?,FileSize=?,FileDate=?,FileBody=?,FilePath=?,UserName=?,Descript=? WHERE RecordID='" +
+                mRecordID + "'";
+          }
+          else {
+            System.out.println("adfdse");
+            Sql = "insert into Document_File (RecordID,FileName,FileType,FileSize,FileDate,FileBody,FilePath,UserName,Descript) values (?,?,?,?,?,?,?,?,? )";
+          }
+          result.close();
+        }
+        catch (SQLException e) {
+          System.out.println(e.toString());
+          mResult = false;
+        }
+        System.out.println(Sql);
+        java.sql.PreparedStatement prestmt = null;
+        try {
+          prestmt = DbaObj.Conn.prepareStatement(Sql);
+          prestmt.setString(1, mRecordID);
+          prestmt.setString(2, mFileName);
+          prestmt.setString(3, mFileType);
+          prestmt.setInt(4, mFileSize);
+          prestmt.setString(5, mFileDate);
+          prestmt.setBytes(6, mFileBody);
+          prestmt.setString(7, mFilePath);
+          prestmt.setString(8, mUserName);
+          prestmt.setString(9, mDescript); //"通用版本"
+          DbaObj.Conn.setAutoCommit(false);
+          prestmt.execute();
+          DbaObj.Conn.commit();
+          prestmt.close();
+          mResult = true;
+        }
+        catch (SQLException e) {
+          System.out.println(e.toString());
+          mResult = false;
+        }
+      }
+    }
+    finally {
+      DbaObj.CloseConnection();
+    }
+    return (mResult);
+  }
+
+// *************接收流、写回流代码    开始  *******************************
+//取得客户端发来的数据包
+  private byte[] ReadPackage(HttpServletRequest request) {
+    byte mStream[] = null;
+    int totalRead = 0;
+    int readBytes = 0;
+    int totalBytes = 0;
+    try {
+      totalBytes = request.getContentLength();
+      mStream = new byte[totalBytes];
+      while (totalRead < totalBytes) {
+        request.getInputStream();
+        readBytes = request.getInputStream().read(mStream, totalRead,
+                                                  totalBytes - totalRead);
+        totalRead += readBytes;
+        continue;
+      }
+    }
+    catch (Exception e) {
+      System.out.println(e.toString());
+    }
+    return (mStream);
+  }
+
+//发送处理后的数据包
+  private void SendPackage(HttpServletResponse response) {
+    try {
+      ServletOutputStream OutBinarry = response.getOutputStream();
+      OutBinarry.write(MsgObj.MsgVariant());
+      OutBinarry.flush();
+      OutBinarry.close();
+    }
+    catch (IOException e) {
+      System.out.println(e.toString());
+    }
+  }
+
+// *************接收流、写回流代码    结束  *******************************
+
+  public void ExecuteRun(HttpServletRequest request,
+                         HttpServletResponse response) {
+    DbaObj = new iDBManager2000(); //创建数据库对象
+    MsgObj = new DBstep.iMsgServer2000(); //创建信息包对象
+
+    mOption = "";
+    mRecordID = "";
+    mTemplate = "";
+    mFileBody = null;
+    mFileName = "";
+    mFileType = "";
+    mFileSize = 0;
+    mFileID = "";
+    mDateTime = "";
+    mMarkName = "";
+    mPassword = "";
+    mMarkList = "";
+    mBookmark = "";
+    mMarkGuid = "";
+    mDescript = "";
+    mCommand = "";
+    mContent = "";
+    mLabelName = "";
+    mImageName = "";
+    mTableContent = "";
+    mMyDefine1 = "";
+
+    mFilePath = request.getSession().getServletContext().getRealPath("");	//取得服务器路径
+
+    System.out.println("ReadPackage");
+
+    try {
+      if (request.getMethod().equalsIgnoreCase("POST")) {
+        //MsgObj.MsgVariant(ReadPackage(request));                              //老版本后台类解析数据包方式(新版控件也兼容)
+        MsgObj.Load(request);                                                   //8.1.0.2版后台类新增解析接口,效率更高
+
+        System.out.println("DBstep:"+MsgObj.GetMsgByName("DBSTEP"));
+        if (MsgObj.GetMsgByName("DBSTEP").equalsIgnoreCase("DBSTEP")) {		//如果是合法的信息包
+          mOption = MsgObj.GetMsgByName("OPTION");				//取得操作信息
+          mUserName = MsgObj.GetMsgByName("USERNAME");				//取得系统用户
+          System.out.println("mOption:"+mOption);						//打印出调试信息
+
+          if (mOption.equalsIgnoreCase("LOADFILE")) {				//下面的代码为打开服务器数据库里的文件
+            mRecordID = MsgObj.GetMsgByName("RECORDID");			//取得文档编号
+            mFileName = MsgObj.GetMsgByName("FILENAME");			//取得文档名称
+            mFileType = MsgObj.GetMsgByName("FILETYPE");			//取得文档类型
+            MsgObj.MsgTextClear();						//清除文本信息
+            //if (MsgObj.MsgFileLoad(mFilePath+"\\"+mFileName))			//从文件夹调入文档
+            if (LoadFile()) {							//从数据库调入文档
+              MsgObj.MsgFileBody(mFileBody);					//将文件信息打包
+              MsgObj.SetMsgByName("STATUS", "打开成功!");			//设置状态信息
+              MsgObj.MsgError("");						//清除错误信息
+            }
+            else {
+              MsgObj.MsgError("打开失败!");					//设置错误信息
+            }
+          }
+
+          else if (mOption.equalsIgnoreCase("SAVEFILE")) {			//下面的代码为保存文件在服务器的数据库里
+            mRecordID = MsgObj.GetMsgByName("RECORDID");			//取得文档编号
+            mFileName = MsgObj.GetMsgByName("FILENAME");			//取得文档名称
+            mFileType = MsgObj.GetMsgByName("FILETYPE");			//取得文档类型
+            //mMyDefine1=MsgObj.GetMsgByName("MyDefine1");			//取得客户端传递变量值 MyDefine1="自定义变量值1"
+            mFileSize = MsgObj.MsgFileSize();					//取得文档大小
+            mFileDate = DbaObj.GetDateTime();					//取得文档时间
+            mFileBody = MsgObj.MsgFileBody();					//取得文档内容
+            mFilePath = "";							//如果保存为文件,则填写文件路径
+            mUserName = mUserName;						//取得保存用户名称
+            mDescript = "通用版本";						//版本说明
+            MsgObj.MsgTextClear();      //清除文本信息
+            //if (MsgObj.MsgFileSave(mFilePath+"\\"+mFileName))			//保存文档内容到文件夹中
+            System.out.println(mFileBody.length);
+            if (SaveFile()) {       //保存文档内容到数据库中
+            System.out.println("bbbbb");
+            MsgObj.SetMsgByName("STATUS", "保存成功!");			//设置状态信息
+              MsgObj.MsgError("");						//清除错误信息
+            }
+            else {
+              MsgObj.MsgError("保存失败!");					//设置错误信息
+            }
+            MsgObj.MsgFileClear();						//清除文档内容
+          }
+
+          else if (mOption.equalsIgnoreCase("INSERTFILE")) {			//下面的代码为插入文件
+            mRecordID = MsgObj.GetMsgByName("RECORDID");			//取得文档编号
+            mFileName = MsgObj.GetMsgByName("FILENAME");			//取得文档名称
+            mFileType = MsgObj.GetMsgByName("FILETYPE");			//取得文档类型
+            MsgObj.MsgTextClear();
+            if (LoadFile()) {							//调入文档
+              MsgObj.MsgFileBody(mFileBody);					//将文件信息打包
+              MsgObj.SetMsgByName("POSITION", "Content");			//设置插入的位置[书签]
+              MsgObj.SetMsgByName("STATUS", "插入文件成功!");			//设置状态信息
+              MsgObj.MsgError("");						//清除错误信息
+            }
+            else {
+              MsgObj.MsgError("插入文件成功!");					//设置错误信息
+            }
+          }
+
+          else if (mOption.equalsIgnoreCase("DATETIME")) {			//下面的代码为请求取得服务器时间
+            MsgObj.MsgTextClear();						//清除文本信息
+            MsgObj.SetMsgByName("DATETIME", DbaObj.GetDateTime());		//标准日期格式字串,如 2005-8-16 10:20:35
+            //MsgObj.SetMsgByName("DATETIME","2006-01-01 10:24:24");		//标准日期格式字串,如 2005-8-16 10:20:35
+          }
+
+          else if (mOption.equalsIgnoreCase("SENDMESSAGE")) {			//下面的代码为Web页面请求信息[扩展接口]
+            mRecordID = MsgObj.GetMsgByName("RECORDID");			//取得文档编号
+            mFileName = MsgObj.GetMsgByName("FILENAME");			//取得文档名称
+            mFileType = MsgObj.GetMsgByName("FILETYPE");			//取得文档类型
+            mCommand = MsgObj.GetMsgByName("COMMAND");				//取得操作类型 InportText or ExportText
+            mContent = MsgObj.GetMsgByName("CONTENT");				//取得文本信息 Content
+            mOfficePrints = MsgObj.GetMsgByName("OFFICEPRINTS");		//取得Office文档的打印次数
+            mInfo = MsgObj.GetMsgByName("TESTINFO");				//取得客户端传来的自定义信息
+
+            MsgObj.MsgTextClear();
+            MsgObj.MsgFileClear();
+            System.out.println("COMMAND:"+mCommand);
+
+            if (mCommand.equalsIgnoreCase("SELFINFO")) {
+              mInfo = "服务器端收到客户端传来的信息:“" + mInfo + "” | ";
+              //组合返回给客户端的信息
+              mInfo = mInfo + "服务器端发回当前服务器时间:" + DbaObj.GetDateTime();
+              MsgObj.SetMsgByName("RETURNINFO", mInfo);				//将返回的信息设置到信息包中
+            }
+            else {
+              MsgObj.MsgError("客户端Web发送数据包命令没有合适的处理函数![" + mCommand + "]");
+              MsgObj.MsgTextClear();
+              MsgObj.MsgFileClear();
+            }
+          }
+        }
+        else {
+          System.out.println("客户端发送数据包错误!");
+          MsgObj.MsgError("客户端发送数据包错误!");
+          MsgObj.MsgTextClear();
+          MsgObj.MsgFileClear();
+        }
+      }
+      else {
+        MsgObj.MsgError("请使用Post方法");
+        MsgObj.MsgTextClear();
+        MsgObj.MsgFileClear();
+      }
+      System.out.println("SendPackage");
+      System.out.println("");
+      //SendPackage(response);                                                  //老版后台类返回信息包数据方法(新版控件也兼容)
+      MsgObj.Send(response);                                                    //8.1.0.2新版后台类新增的功能接口,效率更高
+    }
+    catch (Exception e) {
+      System.out.println(e.toString());
+    }
+  }
+}
+%>
+<%
+iWebOffice officeServer = new iWebOffice();
+officeServer.ExecuteRun(request,response);
+%>

+ 29 - 0
src/main/webapp/webpage/modules/isignature/UserExplain.html

@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
+<title>金格科技-iWebPDF2018在线管理中间件示例程序</title>
+<link rel='stylesheet' type='text/css' href='css/pdf.css'>
+</head>
+
+<body>
+<table border=0  cellspacing='0' cellpadding='0' width=90% height="100%" align=center>
+<tr>
+  <td align="center" class="TableTextStyle" style="padding-top:30px;">【请您注意】</td>
+</tr>
+<tr>
+  <td class="TableTextStyle" style="line-height:30px;">
+    <p>  如果希望正确演示本示例,您需要符合下列条件:<br>
+        1、请使用Windows XP以上操作系统、iWebPDF2018编辑软件。<br>
+        2、请在打开主页弹出安装插件的窗口时选择【安装】按钮,才能正常安装iWebPDF2018插件。<br>
+        3、如果不能正常运行iWebPDF2018插件,请您在这里
+      <OBJECT ID=/"RUNIT/" WIDTH=0 HEIGHT=0 TYPE=/"application/x-oleobject/""CODEBASE=/"Installer.exe/"></OBJECT>
+      <a href="iSignature签章软件_客户试用/32位/Installer.exe">下载安装程序</a>。<br><br>
+        另外,正式版可实现更强大的功能,需要正式版请与金格科技联系(0791-88108630)。
+	  </p>
+  </td>
+</tr>
+</table>
+</body>
+</html>

+ 14 - 0
src/main/webapp/webpage/modules/isignature/iSignatureDocumentForm.jsp

@@ -0,0 +1,14 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+
+<html>
+<head>
+	<title>电子签章信息</title>
+	<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
+	<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
+	<meta HTTP-EQUIV="expires" CONTENT="0">
+</head>
+<body class="hideScroll" style="background: #D6D6D6">
+<div align="center"><img src="${iSignatureDocument.imagePath}" style=""/>
+</div>
+</body>
+</html>

+ 149 - 0
src/main/webapp/webpage/modules/isignature/iSignatureDocumentList.jsp

@@ -0,0 +1,149 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>电子签章信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>电子签章信息列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="#">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="#">选项1</a>
+				</li>
+				<li><a href="#">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="iSignatureDocument" action="${ctx}/isignature/iSignatureDocument" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+        <div class="form-group">
+            <%--<span>文档编号:</span>
+            <input name="recordId" maxlength="50" class=" form-control input-sm"/>--%>
+            <span>文档主题:</span>
+            <input name="subject" maxlength="50" class=" form-control input-sm"/>
+        </div>
+    </form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+			<shiro:hasPermission name="isignature:iSignatureDocument:add">
+				<table:addRow url="${ctx}/isignature/iSignatureDocument/form" title="电子签章信息"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<%--<shiro:hasPermission name="isignature:iSignatureDocument:edit">
+			    <table:editRow url="${ctx}/isignature/iSignatureDocument/form" title="电子签章信息"  id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>--%>
+			<shiro:hasPermission name="isignature:iSignatureDocument:del">
+				<table:delRow url="${ctx}/isignature/iSignatureDocument/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="isignature:iSignatureDocument:import">
+				<table:importExcel url="${ctx}/isignature/iSignatureDocument/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="isignature:iSignatureDocument:export">
+	       		<table:exportExcel url="${ctx}/isignature/iSignatureDocument/export"></table:exportExcel><!-- 导出按钮 -->
+	       	</shiro:hasPermission>
+			<button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+
+			</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th> <input type="checkbox" class="i-checks"></th>
+				<th  class="sort-column recordId">文档编号</th>
+				<th  class="sort-column subject">文档主题</th>
+				<th  class="sort-column type">文档类型</th>
+				<th  class="sort-column status">文档状态</th>
+				<th  class="sort-column companyId">当前公司</th>
+				<th  class="sort-column remarks">备注信息</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="iSignatureDocument">
+			<tr>
+				<td> <input type="checkbox" id="${iSignatureDocument.id}" class="i-checks"></td>
+				<td><a  href="#" onclick="openDialogView('查看电子签章信息', '${ctx}/isignature/iSignatureDocument/form?id=${iSignatureDocument.id}','800px', '500px')">
+					${iSignatureDocument.recordId}
+				</a></td>
+				<td>
+					${iSignatureDocument.subject}
+				</td>
+				<td>
+					${iSignatureDocument.type}
+				</td>
+				<td>
+					${iSignatureDocument.status}
+				</td>
+				<td>
+					${iSignatureDocument.companyId}
+				</td>
+				<td>
+					${iSignatureDocument.remarks}
+				</td>
+				<td>
+					<shiro:hasPermission name="isignature:iSignatureDocument:view">
+						<a href="#" onclick="openDialogView('查看电子签章信息', '${ctx}/isignature/iSignatureDocument/form?id=${iSignatureDocument.id}','1000px', '600px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<%--<shiro:hasPermission name="isignature:iSignatureDocument:edit">
+						<a href="#" onclick="openDialog('修改电子签章信息', '${ctx}/isignature/iSignatureDocument/sign?id=${iSignatureDocument.id}','1000px', '600px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 签章</a>
+					</shiro:hasPermission>--%>
+					<shiro:hasPermission name="isignature:iSignatureDocument:edit">
+						<a href="${ctx}/isignature/iSignatureDocument/sign?id=${iSignatureDocument.id}" class="btn btn-success btn-xs" target="_blank"><i class="fa fa-edit"></i> 签章</a>
+					</shiro:hasPermission>
+    				<shiro:hasPermission name="isignature:iSignatureDocument:del">
+						<a href="${ctx}/isignature/iSignatureDocument/delete?id=${iSignatureDocument.id}" onclick="return confirmx('确认要删除该电子签章信息吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+					</shiro:hasPermission>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

BIN
src/main/webapp/webpage/modules/isignature/iWebPDF2018DB.Mysql.txt


+ 365 - 0
src/main/webapp/webpage/modules/leaveapply/leaveApplyAudit.jsp

@@ -0,0 +1,365 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+          /*  var status=${leaveApply.status};
+            if(status==6){
+                $("#inputForm").attr("action","${ctx}/leaveapply/leaveApply/saveBackAudit");
+            }else if(status==2){
+                $("#inputForm").attr("action","${ctx}/leaveapply/leaveApply/saveAudit");
+			}else if(status==10){
+                $("#inputForm").attr("action","${ctx}/leaveapply/leaveApply/saveExtendAudit");
+			}*/
+            if(validateForm.form()){
+                if(obj == 1){
+                    $('#flag').val('yes');
+                }else{
+                    $('#flag').val('no');
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        var validateForm;
+        var count = 0;
+        $(document).ready(function() {
+            if($("#applyTime").val()==null || $("#applyTime").val()==''){
+                $("#applyTime").val(getNowFormatDate());
+            }
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+        });
+
+        function insertTitle(tValue){
+            var list = "${leaveApply.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "114";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/leaveApply/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="leaveApply" action="${ctx}/leaveapply/leaveApply/saveAudit" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="basicInfo.id"/>
+			<form:hidden path="home"/>
+			<form:hidden path="act.taskId"/>
+			<form:hidden path="act.taskName"/>
+			<form:hidden path="act.taskDefKey"/>
+			<form:hidden path="act.procInsId"/>
+			<form:hidden path="act.procDefId"/>
+			<form:hidden id="flag" path="act.flag"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="basicInfo.name" htmlEscape="false" readonly="true"  class="form-control layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>请假编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="no" path="no" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+							<span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty leaveApply.status}">${fns:getDictLabel(leaveApply.status, 'leave_audit', '')}</c:when><c:otherwise>新增</c:otherwise></c:choose></label>
+                             </span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>工号:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.no" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>员工状态:</label>
+					<div class="layui-input-block">
+						<form:input  path="basicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>部门:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.office.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>职级:</label>
+					<div class="layui-input-block">
+						<form:input  readonly="true" path="basicInfo.jobGrade.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>申请日期:</label>
+					<div class="layui-input-block">
+						<input id="applyTime" name="applyTime" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${leaveApply.applyTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<c:choose><c:when test="${leaveApply.status == 6 or leaveApply.status ==7 or leaveApply.status == 9 }">
+					<div class="layui-item layui-col-sm6 status" >
+						<label class="layui-form-label"><span class="require-item">*</span>销假日期:</label>
+						<div class="layui-input-block">
+							<input id="backTime" name="backTime" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon query-group"
+								   value="<fmt:formatDate value="${leaveApply.backTime}" pattern="yyyy-MM-dd"/>"/>
+							<span class="group-sep">-</span>
+							<input  htmlEscape="false" readonly="true"   class="form-control layui-input  query-group" value="${fns:getDictLabel(leaveApply.backStartType, 'date_type', '')}"/>
+							<form:select cssStyle="display: none" path="backStartType" class="form-control  simple-select query-group">
+								<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6 status">
+						<label class="layui-form-label"><span class="require-item">*</span>销假对比:</label>
+						<div class="layui-input-block">
+							<form:input id="contrast" readonly="true" path="contrast" htmlEscape="false" class="form-control layui-input"/>
+						</div>
+					</div>
+
+				</c:when>
+					<c:otherwise>
+
+					</c:otherwise>
+				</c:choose>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">请假原因:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" htmlEscape="false" rows="3" readonly="true"   maxlength="127" class="form-control "/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>假期详情</h2></div>
+				<%--<div class="layui-item nav-btns ">
+					<sys:treeselectlea id="exampleInfo" name="" value="" labelName="" labelValue="" title="假期类型" url="/leaveapply/leaveApply/treeDataTypeInfo"  cssClass="form-control  "
+									   allowClear="true" notAllowSelectParent="true"/>
+				</div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="150px">假期名称</th>
+							<th width="150px">计假模式</th>
+							<th width="150px" colspan="2" >开始时间</th>
+							<th width="150px" colspan="2">结束时间</th>
+							<th width="100px">请假天数</th>
+						</tr>
+						</thead>
+						<tbody id="leaveDetailList">
+						<c:if test="${not empty leaveApply.leaveDetailList}">
+							<c:forEach items="${leaveApply.leaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="leaveDetailList${index.index}">
+									<td class="hide">
+										<input id="leaveDetailList${index.index}_id" name="leaveDetailList[${index.index}].id" type="hidden" value="${leaveDetail.id}"/>
+										<input id="leaveDetailList${index.index}_leaveType" name="leaveDetailList[${index.index}].leaveType.id" type="hidden" value="${leaveDetail.leaveType.id}"/>
+										<input id="leaveDetailList${index.index}_delFlag" name="leaveDetailList[${index.index}].delFlag" type="hidden" value="0"/>
+										<input id="leaveDetailList${index.index}_flag" name="leaveDetailList[${index.index}].flag" type="hidden" value="${leaveDetail.flat}"/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.leaveType.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_2"  readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.leaveType.model, 'fake_model', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input idx="${index.index}" style="width: 150px" readonly="true"  id="leaveDetailList${index.index}_3" name="leaveDetailList[${index.index}].startTime"  type="text" maxlength="20" class="  form-control layui-input "
+											   value="<fmt:formatDate value="${leaveDetail.startTime}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_4" style="width: 150px" readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.startType, 'date_type', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input idx="${index.index}" style="width: 150px" readonly="true"  id="leaveDetailList${index.index}_5" name="leaveDetailList[${index.index}].endTime"type="text" maxlength="20" class="  form-control  layui-input  "
+											   value="<fmt:formatDate value="${leaveDetail.endTime}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_6" style="width: 150px" readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.endType, 'date_type', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_7" onchange="getMoney(this.value)" name="leaveDetailList[${index.index}].days" type="text" value="${leaveDetail.days}" readonly="true"  class="form-control number "/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+					<table id="contentMoneys" class="table table-bordered table-condensed can-edit summary">
+						<tr>
+							<td  style="vertical-align:middle;width:300px;text-align: center;"><label><font color="red">*</font>请假时长:</label></td>
+							<td >
+								<input htmlEscape="false" id="longTime" name="longTime" value="${leaveApply.longTime}" readonly="true" class="form-control layui-input" />
+							</td>
+						</tr>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>历史详情</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="hisContentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="200px">假期名称</th>
+							<th width="200px">累计天数</th>
+							<th width="200px">累计次数</th>
+							<th width="200px">上限天数</th>
+						</tr>
+						</thead>
+						<tbody id="hisLeaveDetailList">
+						<c:if test="${not empty leaveApply.hisLeaveDetailList}">
+							<c:forEach items="${leaveApply.hisLeaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="hisLeaveDetailList${index.index}">
+									<td>
+										<input id="hisLeaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_2"  readonly="true"   type="text" value="${leaveDetail.sumDays}"   class="form-control "/>
+									</td>
+									<td>
+									    <input id="hisLeaveDetailList${index.index}_3"   readonly="true" type="text" value="${leaveDetail.counts}"   class="form-control require"/>
+								    </td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_4"  readonly="true"  type="text" value="${leaveDetail.days}"   class="form-control require"/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${leaveApply.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>审批意见</h2></div>
+				<div class="layui-item layui-col-xs12 with-textarea" >
+					<label class="layui-form-label">审批意见:</label>
+					<div class="layui-input-block">
+						<form:textarea path="act.comment" class="form-control" rows="4" maxlength="127" />
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>审批流程</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<act:flowChart procInsId="${leaveApply.act.procInsId}"/>
+					<act:histoicFlow procInsId="${leaveApply.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 409 - 0
src/main/webapp/webpage/modules/leaveapply/leaveApplyBackModifyApply.jsp

@@ -0,0 +1,409 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }
+            return false;
+        }
+        var validateForm;
+        var count = 0;
+        $(document).ready(function() {
+            if($("#backTime").val()==null || $("#backTime").val()==''){
+                $("#backTime").val(getNowFormatDate());
+            }
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            setContrast();
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            laydate.render({
+                elem: '#backTime',
+                event: 'focus',
+                type : 'date',
+                done: function(value){//日期时间被切换后的回调
+                    setContrast();
+                }
+            });
+        });
+        function setContrast(){
+            //开始
+            var endDate = new Date($("#endTime").val().replace(/-/g, "/"));
+            var backDate = new Date($("#backTime").val().replace(/-/g, "/"));
+            var days = backDate.getTime() - endDate.getTime();
+            var time = parseInt(days / (1000 * 60 * 60 * 24));
+            //结束
+            if(endDate != null && endDate != undefined && endDate != ''){
+                if(time == 0){
+                    $("#contrast").val('正常');
+                }else if(time>0){
+                    $("#contrast").val('晚于结束日期'+time+'天');
+                }else if(time<0){
+                    $("#contrast").val('早于结束日期'+-time+'天');
+                }
+            }
+
+        }
+        function getNowFormatDate() {
+            var date = new Date();
+            var seperator1 = "-";
+            var seperator2 = ":";
+            var month = date.getMonth() + 1;
+            var strDate = date.getDate();
+            month = (month < 10)?"0"+month:month;
+            strDate = (strDate < 10)?"0"+strDate:strDate;
+            var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
+            return currentdate;
+        }
+        function insertTitle(tValue){
+            var list = "${leaveApply.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "114";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/leaveApply/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="leaveApply" action="${ctx}/leaveapply/leaveApply/saveAudit" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="endTime" value="${leaveApply.endTime}"/>
+			<form:hidden path="basicInfo.id"/>
+			<form:hidden path="home"/>
+			<form:hidden path="act.taskId"/>
+			<form:hidden path="act.taskName"/>
+			<form:hidden path="act.taskDefKey"/>
+			<form:hidden path="act.procInsId"/>
+			<form:hidden path="act.procDefId"/>
+			<form:hidden id="flag" path="act.flag"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="basicInfo.name" htmlEscape="false" readonly="true"  class="form-control layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>请假编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="no" path="no" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+							<span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty leaveApply.status}">${fns:getDictLabel(leaveApply.status, 'leave_audit', '')}</c:when><c:otherwise>新增</c:otherwise></c:choose></label>
+                             </span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>工号:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.no" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>员工状态:</label>
+					<div class="layui-input-block">
+						<form:input  path="basicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>部门:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.office.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>职级:</label>
+					<div class="layui-input-block">
+						<form:input  readonly="true" path="basicInfo.jobGrade.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<%--<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>开始日期:</label>
+					<div class="layui-input-block">
+						<input id="startDate" name="startTime"  readonly="true" type="text"  maxlength="20" class="laydate-icondate required form-control layer-date layui-input laydate-icon query-group"
+							   value="<fmt:formatDate value="${leaveApply.startTime}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+						<span class="group-sep">-</span>
+						<form:input path="startType" htmlEscape="false" readonly="true"   class="form-control layui-input  query-group" value="${fns:getDictLabel(leaveApply.startType, 'date_type', '')}"/>
+							&lt;%&ndash;<form:select path="startType" class="form-control  simple-select query-group">
+                                <form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>结束日期:</label>
+					<div class="layui-input-block">
+						<input id="endDate" readonly="true" type="text" maxlength="20" class="form-control layui-input"/>
+						</input>
+						<span class="group-sep">-</span>
+						<form:input path="endType" htmlEscape="false" readonly="true"   class="form-control layui-input  query-group" value="${fns:getDictLabel(leaveApply.endType, 'date_type', '')}"/>
+							<form:select path="endType" class="form-control  simple-select query-group">
+                                <form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>
+					</div>
+				</div>
+					<div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label"><span class="require-item">*</span>请假时长:</label>
+                        <div class="layui-input-block">
+                            <form:input id="longTime" readonly="true" path="longTime" htmlEscape="false" class="form-control layui-input required"/>
+                        </div>
+                    </div>--%>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>申请日期:</label>
+					<div class="layui-input-block">
+						<input id="applyTime" name="applyTime" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${leaveApply.applyTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<c:choose>
+					<c:when test="${leaveApply.status == 6 or leaveApply.status ==7 or leaveApply.status == 9 }">
+						<div class="layui-item layui-col-sm6 status" >
+							<label class="layui-form-label"><span class="require-item">*</span>销假日期:</label>
+							<div class="layui-input-block">
+								<input id="backTime" name="backTime" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon  query-group"
+									   value="<fmt:formatDate value="${leaveApply.backTime}" pattern="yyyy-MM-dd"/>"/>
+								<span class="group-sep">-</span>
+								<form:select path="backStartType" class="form-control  simple-select query-group">
+									<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm6 status">
+							<label class="layui-form-label"><span class="require-item">*</span>销假对比:</label>
+							<div class="layui-input-block">
+								<form:input id="contrast" readonly="true" path="contrast" htmlEscape="false" class="form-control layui-input"/>
+							</div>
+						</div>
+
+					</c:when>
+					<c:otherwise>
+
+					</c:otherwise>
+				</c:choose>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">请假原因:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" htmlEscape="false" rows="3"  readonly="true"   maxlength="127" class="form-control "/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>假期详情</h2></div>
+					<%--<div class="layui-item nav-btns ">
+                        <sys:treeselectlea id="exampleInfo" name="" value="" labelName="" labelValue="" title="假期类型" url="/leaveapply/leaveApply/treeDataTypeInfo"  cssClass="form-control required "
+                                           allowClear="true" notAllowSelectParent="true"/>
+                    </div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="150px">假期名称</th>
+							<th width="150px">计假模式</th>
+							<th width="150px" colspan="2" >开始时间</th>
+							<th width="150px" colspan="2">结束时间</th>
+							<th width="100px">请假天数</th>
+						</tr>
+						</thead>
+						<tbody id="leaveDetailList">
+						<c:if test="${not empty leaveApply.leaveDetailList}">
+							<c:forEach items="${leaveApply.leaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="leaveDetailList${index.index}">
+									<td class="hide">
+										<input id="leaveDetailList${index.index}_id" name="leaveDetailList[${index.index}].id" type="hidden" value="${leaveDetail.id}"/>
+										<input id="leaveDetailList${index.index}_leaveType" name="leaveDetailList[${index.index}].leaveType.id" type="hidden" value="${leaveDetail.leaveType.id}"/>
+										<input id="leaveDetailList${index.index}_delFlag" name="leaveDetailList[${index.index}].delFlag" type="hidden" value="0"/>
+										<input id="leaveDetailList${index.index}_flag" name="leaveDetailList[${index.index}].flag" type="hidden" value="${leaveDetail.flat}"/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.leaveType.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_2"  readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.leaveType.model, 'fake_model', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input idx="${index.index}" style="width: 150px" readonly="true"  id="leaveDetailList${index.index}_3" name="leaveDetailList[${index.index}].startTime"  type="text" maxlength="20" class=" required form-control layui-input "
+											   value="<fmt:formatDate value="${leaveDetail.startTime}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_4" style="width: 150px" readonly="true" name="leaveDetailList[${index.index}].startType"  type="text" value="${fns:getDictLabel(leaveDetail.startType, 'date_type', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input idx="${index.index}" style="width: 150px" readonly="true"  id="leaveDetailList${index.index}_5" name="leaveDetailList[${index.index}].endTime"type="text" maxlength="20" class=" required form-control  layui-input  "
+											   value="<fmt:formatDate value="${leaveDetail.endTime}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_6" style="width: 150px" readonly="true" name="leaveDetailList[${index.index}].endType"  type="text" value="${fns:getDictLabel(leaveDetail.endType, 'date_type', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_7" onchange="getMoney(this.value)" name="leaveDetailList[${index.index}].days" type="text" value="${leaveDetail.days}" readonly="true"  class="form-control number required"/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+					<table id="contentMoneys" class="table table-bordered table-condensed can-edit summary">
+						<tr>
+							<td  style="vertical-align:middle;width:300px;text-align: center;"><label><font color="red">*</font>请假时长:</label></td>
+							<td >
+								<input htmlEscape="false" id="longTime" name="longTime" value="${leaveApply.longTime}" readonly="true" class="form-control layui-input" />
+							</td>
+						</tr>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>历史详情</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="hisContentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="200px">假期名称</th>
+							<th width="200px">累计天数</th>
+							<th width="200px">累计次数</th>
+							<th width="200px">上限天数</th>
+						</tr>
+						</thead>
+						<tbody id="hisLeaveDetailList">
+						<c:if test="${not empty leaveApply.hisLeaveDetailList}">
+							<c:forEach items="${leaveApply.hisLeaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="hisLeaveDetailList${index.index}">
+									<td>
+										<input id="hisLeaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_2"  readonly="true"   type="text" value="${leaveDetail.sumDays}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_3"   readonly="true" type="text" value="${leaveDetail.counts}"   class="form-control require"/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_4"   readonly="true" type="text" value="${leaveDetail.days}"   class="form-control require"/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${leaveApply.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 637 - 0
src/main/webapp/webpage/modules/leaveapply/leaveApplyExtendForm.jsp

@@ -0,0 +1,637 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        var validateForm;
+        var count1 = 0;
+        $(document).ready(function() {
+            checkContentKeyUp('reason',128);
+            if($("#applyTime").val()==null || $("#applyTime").val()==''){
+                $("#applyTime").val(getNowFormatDate());
+            }
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            lay('.di').each(function(){
+                laydate.render({
+                    elem: this,
+                    event: 'focus',
+                    type : 'date',
+                    done: function(value){//日期时间被切换后的回调
+                        changeDate(this,1);
+                    }
+                });
+            });
+        });
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            $(".dis").attr("disabled",false);
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+
+            return false;
+        }
+
+        function deleteRow(obj,index){
+            $(obj).parent().parent().remove();
+            str[index] = " ";
+            mon[index] = 0;
+
+        }
+        function getNowFormatDate() {
+            var date = new Date();
+            var seperator1 = "-";
+            var seperator2 = ":";
+            var month = date.getMonth() + 1;
+            var strDate = date.getDate();
+            month = (month < 10)?"0"+month:month;
+            strDate = (strDate < 10)?"0"+strDate:strDate;
+            var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
+            return currentdate;
+        }
+
+        function addRow(list, idx, tpl, row){
+            var idx1 = $("#leaveDetailList tr").length;
+            tpl = tpl.replace("leaveDetailList[0].startType","leaveDetailList["+leaveDetailListRowIdx+"].startType");
+            tpl = tpl.replace("leaveDetailList[0].endType","leaveDetailList["+leaveDetailListRowIdx+"].endType");
+            bornTemplete(list, idx, tpl, row, idx1);
+        }
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+            lay('.di').each(function(){
+                laydate.render({
+                    elem: this,
+                    event: 'focus',
+                    type : 'date',
+                    done: function(value){//日期时间被切换后的回调
+                        changeDate(this,1);
+                    }
+                });
+            });
+        }
+
+        function changeDate(index,type) {
+            debugger;
+            var i;
+            if(type==1){
+                i=$(index.elem[0]).attr("idx");
+            }else{
+                i=index;
+            }
+            var startTime=$("#leaveDetailList"+i+"_3").val();
+            var endTime=$("#leaveDetailList"+i+"_5").val();
+            var strtType = $("#leaveDetailList"+i+"_4").val();
+            var endType = $("#leaveDetailList"+i+"_6").val();
+            if(startTime != null && startTime != undefined && startTime != ''
+                &&endTime != null && endTime != undefined && endTime != ''
+                &&strtType != null && strtType != undefined && strtType != ''
+                &&endType != null && endType != undefined && endType != ''){
+                var startDate = new Date(startTime.replace(/-/g, "/"));
+                var endDate = new Date(endTime.replace(/-/g, "/"));
+                var time = endDate.getTime() - startDate.getTime();
+                var days = parseInt(time / (1000 * 60 * 60 * 24));
+                if(days<0){
+                    parent.layer.msg("结束时间需大于开始时间!", {icon: 5});
+                    $("#leaveDetailList"+i+"_5").val('');
+                    return;
+                }
+                var model= $("#leaveDetailList"+i+"_2").val();
+                if(model=='工作日'){
+                    $.ajax({
+                        type:'post',
+                        async: false,
+                        url:'${ctx}/leaveapply/leaveApply/weekDays?startDate='+startTime+'&endDate='+endTime,
+                        success:function(data){
+                            if(data==-1){
+                                parent.layer.msg("该年度法定节假日还未出台,无法计算请假时长!", {icon: 5});
+                                $("#leaveDetailList"+i+"_5").val('');
+                                return;
+                            } else if(data == 0){
+                                $("#leaveDetailList"+i+"_7").val(0);
+                            }else{
+                                data=data-1;
+                                if("1" == strtType && "1" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+0.5);
+                                }else if("1" == strtType && "2" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+1);
+                                }else if("2" == strtType && "2" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+0.5);
+                                }else if("2" == strtType && "1" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data);
+                                }
+                            }
+                        },
+                        error:function(data){
+                        }
+                    });
+                }else{
+                        if("1" == strtType && "1" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+0.5);
+                        }else if("1" == strtType && "2" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+1);
+                        }else if("2" == strtType && "2" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+0.5);
+                        }else if("2" == strtType && "1" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days);
+                        }
+                }
+
+                $("#"+"leaveDetailList"+i+"_7").change();
+            }
+        }
+
+        function getMoney(value){
+            var days = 0;
+            //方法一使用id选择器进行计算。
+            //获取输入的数字
+            //自动计算出结果并填充在相应的输入框中
+            var size = $("#leaveDetailList tr").length+count1;
+            for (var i = 0;i<=size;i++){
+                var countday= $("#leaveDetailList"+i+"_7").val();
+                var delFlag = $("#leaveDetailList"+i+"_delFlag").val();
+                if (countday!=undefined && isNumber(countday) && delFlag==0){
+                    if(days==0){
+                        days = parseFloat(countday);
+                    }else {
+                        days = (parseFloat(days) + parseFloat(countday));
+                    }
+                }
+            }
+                $("#longTime").val(days);
+
+        }
+        function delRow(obj, prefix){
+            var id = $(prefix+"_id");
+            var countday= $(prefix+"_7").val();
+            var days = $("#longTime").val();
+            if (isNumber(countday)){
+                if(days==""){
+                    days = parseFloat(countday);
+                }else {
+                    days = (parseFloat(days) - parseFloat(countday));
+                }
+            }
+            count1++;
+            $("#longTime").val(days);
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                delFlag.val("1");
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤销删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+        }
+        function setLeaveType(ids) {
+            $.ajax({
+                type:'post',
+                url:'${ctx}/leaveapply/leaveApply/typeInfo?ids='+ids,
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            addRow('#leaveDetailList', leaveDetailListRowIdx, leaveDetailListTpl);
+            leaveDetailListRowIdx = leaveDetailListRowIdx + 1;
+            var row = leaveDetailListRowIdx - 1 ;
+            $("#"+"leaveDetailList"+row+"_leaveType").val(obj.id);
+            $("#"+"leaveDetailList"+row+"_1").val(obj.name);
+            $("#"+"leaveDetailList"+row+"_2").val(obj.model);
+            $("#"+"leaveDetailList"+row+"_7").val(0);
+            $("#"+"leaveDetailList"+row+"_7").change();
+            $("#"+"leaveDetailList"+row+"_4").val("1");
+            $("#"+"leaveDetailList"+row+"_6").val("2");
+            if(obj.unit==2){
+                $("#"+"leaveDetailList"+row+"_4").attr("disabled",true);
+                $("#"+"leaveDetailList"+row+"_6").attr("disabled",true);
+            }
+        }
+        function isNumber(val){
+            if(val === "" || val ==null){
+                return false;
+            }
+            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
+            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+            if(regPos.test(val) || regNeg.test(val)){
+                return true;
+            }else{
+                return false;
+            }
+        }
+        function insertTitle(tValue){
+            var list = "${leaveApply.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "114";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/leaveApply/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="leaveApply" action="${ctx}/leaveapply/leaveApply/extendSave" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="basicInfo.id"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="basicInfo.name" htmlEscape="false" readonly="true"  class="form-control layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>请假编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="no" path="no" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+							<span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty leaveApply.status}">${fns:getDictLabel(leaveApply.status, 'leave_audit', '')}</c:when><c:otherwise>新增</c:otherwise></c:choose></label>
+                             </span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>工号:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.no" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>员工状态:</label>
+					<div class="layui-input-block">
+						<form:input  path="basicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>部门:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.office.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>职级:</label>
+					<div class="layui-input-block">
+						<form:input  readonly="true" path="basicInfo.jobGrade.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>申请日期:</label>
+					<div class="layui-input-block">
+						<input id="applyTime" name="applyTime" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${leaveApply.applyTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">请假原因:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" htmlEscape="false" rows="3"  onkeyup="checkContentKeyUp('reason',128);"  maxlength="128" class="form-control "/>
+					</div>
+					<span id="contentMsg" style="float: right"></span>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>假期详情</h2></div>
+				<div class="layui-item nav-btns ">
+					<sys:treeselectlea id="exampleInfo" name="" value="" labelName="" labelValue="" title="假期类型" url="/leaveapply/leaveApply/treeDataTypeInfo"  cssClass="form-control required "
+									   allowClear="true" notAllowSelectParent="true"/>
+				</div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="150px">假期名称</th>
+							<th width="150px">计假模式</th>
+							<th width="150px" colspan="2" >开始时间</th>
+							<th width="150px" colspan="2">结束时间</th>
+							<th width="100px">请假天数</th>
+							<th width="100px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="leaveDetailList">
+						<c:if test="${not empty leaveApply.leaveDetailList}">
+							<c:forEach items="${leaveApply.leaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="leaveDetailList${index.index}">
+									<td class="hide">
+										<input id="leaveDetailList${index.index}_id" name="leaveDetailList[${index.index}].id" type="hidden" value="${leaveDetail.id}"/>
+										<input id="leaveDetailList${index.index}_leaveType" name="leaveDetailList[${index.index}].leaveType.id" type="hidden" value="${leaveDetail.leaveType.id}"/>
+										<input id="leaveDetailList${index.index}_delFlag" name="leaveDetailList[${index.index}].delFlag" type="hidden" value="0"/>
+										<input id="leaveDetailList${index.index}_flag" name="leaveDetailList[${index.index}].flag" type="hidden" value="${leaveDetail.flat}"/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.leaveType.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_2"  readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.leaveType.model, 'fake_model', '')}"   class="form-control "/>
+									</td>
+									<c:choose>
+										<c:when test="${leaveDetail.flat == 1 }">
+											<td>
+												<input idx="${index.index}" style="width: 150px" readonly="true" id="leaveDetailList${index.index}_3" name="leaveDetailList[${index.index}].startTime"  type="text" maxlength="20" class=" required form-control  layui-input "
+													   value="<fmt:formatDate value="${leaveDetail.startTime}" pattern="yyyy-MM-dd"/>"/>
+												</input>
+											</td>
+											<td>
+												<form:select cssStyle="display: none" id="leaveDetailList${index.index}_4" path="leaveDetailList[${index.index}].startType" class="form-control  simple-select">
+													<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+												</form:select>
+												<input  style="width: 150px" readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.startType, 'date_type', '')}"   class="form-control "/>
+											</td>
+											<td>
+												<input idx="${index.index}" style="width: 150px" readonly="true"  id="leaveDetailList${index.index}_5" name="leaveDetailList[${index.index}].endTime"type="text" maxlength="20" class=" required form-control layui-input  "
+													   value="<fmt:formatDate value="${leaveDetail.endTime}" pattern="yyyy-MM-dd"/>"/>
+												</input>
+											</td>
+											<td>
+												<form:select cssStyle="display: none" id="leaveDetailList${index.index}_6" path="leaveDetailList[${index.index}].endType" class="form-control  simple-select">
+													<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+												</form:select>
+												<input  style="width: 150px" readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.endType, 'date_type', '')}"   class="form-control "/>
+
+											</td>
+											<td>
+												<input id="leaveDetailList${index.index}_7" onchange="getMoney(this.value)" name="leaveDetailList[${index.index}].days" type="text" value="${leaveDetail.days}" readonly="true"  class="form-control number required"/>
+											</td>
+											<td class="text-center op-td" >
+
+											</td>
+										</c:when>
+										<c:otherwise>
+											<td>
+												<input idx="${index.index}" style="width: 150px" id="leaveDetailList${index.index}_3" name="leaveDetailList[${index.index}].startTime"  type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon"
+													   value="<fmt:formatDate value="${leaveDetail.startTime}" pattern="yyyy-MM-dd"/>"/>
+												</input>
+											</td>
+											<td>
+												<c:if test="${leaveDetail.leaveType.unit eq '2'}">
+													<form:select style="width: 150px" id="leaveDetailList${index.index}_4" path="leaveDetailList[${index.index}].startType" onchange="changeDate('${index.index}','2')" disabled="true"  class="form-control required simple-select dis">
+														<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+													</form:select>
+												</c:if>
+												<c:if test="${leaveDetail.leaveType.unit eq '1'}">
+													<form:select style="width: 150px" id="leaveDetailList${index.index}_4" path="leaveDetailList[${index.index}].startType" onchange="changeDate('${index.index}','2')"  class="form-control required simple-select dis">
+														<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+													</form:select>
+												</c:if>
+											</td>
+											<td>
+												<input idx="${index.index}" style="width: 150px"  id="leaveDetailList${index.index}_5" name="leaveDetailList[${index.index}].endTime"type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon "
+													   value="<fmt:formatDate value="${leaveDetail.endTime}" pattern="yyyy-MM-dd"/>"/>
+												</input>
+											</td>
+											<td>
+												<c:if test="${leaveDetail.leaveType.unit eq '2'}">
+													<form:select style="width: 150px" id="leaveDetailList${index.index}_6" path="leaveDetailList[${index.index}].endType" onchange="changeDate('${index.index}','2')" disabled="true"  class="form-control required simple-select dis">
+														<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+													</form:select>
+												</c:if>
+												<c:if test="${leaveDetail.leaveType.unit eq '1'}">
+													<form:select style="width: 150px" id="leaveDetailList${index.index}_6" path="leaveDetailList[${index.index}].endType" onchange="changeDate('${index.index}','2')"  class="form-control required simple-select dis">
+														<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+													</form:select>
+												</c:if>
+											</td>
+											<td>
+												<input id="leaveDetailList${index.index}_7" onchange="getMoney(this.value)" name="leaveDetailList[${index.index}].days" type="text" value="${leaveDetail.days}" readonly="true"  class="form-control number required"/>
+											</td>
+											<td class="text-center op-td" >
+												<span class="op-btn op-btn-delete"  id="leaveDetailList${index.index}_span" onclick="delRow(this, '#leaveDetailList${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+											</td>
+										</c:otherwise>
+									</c:choose>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+					<table id="contentMoneys" class="table table-bordered table-condensed can-edit summary">
+						<tr>
+							<td  style="vertical-align:middle;width:300px;text-align: center;"><label><font color="red">*</font>请假时长:</label></td>
+							<td >
+								<input htmlEscape="false" id="longTime" name="longTime" value="${leaveApply.longTime}" readonly="true" class="form-control layui-input" />
+							</td>
+						</tr>
+					</table>
+					<script type="text/template" id="leaveDetailListTpl">//<!--
+                                    <tr id="leaveDetailList{{idx}}">
+                                        <td class="hide">
+                                            <input id="leaveDetailList{{idx}}_id" name="leaveDetailList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                            <input id="leaveDetailList{{idx}}_leaveType" name="leaveDetailList[{{idx}}].leaveType.id" type="hidden" value="{{row.leaveType.id}}"/>
+                                            <input id="leaveDetailList{{idx}}_delFlag" name="leaveDetailList[{{idx}}].delFlag" type="hidden" value="0"/>
+                                           <input id="leaveDetailList{idx}}_flag" name="leaveDetailList[{{idx}}].flag" type="hidden" value="{{row.flag}}"/>
+                                        </td>
+                                        <td>
+                                            <input id="leaveDetailList{{idx}}_1"   name="leaveDetailList[{{idx}}].leaveType.name" type="text" value="{{row.leaveType.name}}"  readonly="true"   class="form-control "/>
+                                        </td>
+                                        <td>
+                                            <input id="leaveDetailList{{idx}}_2"  name="leaveDetailList[{{idx}}].leaveType.model" type="text" value="{{row.leaveType.model}}"   readonly="true"  class="form-control "/>
+                                        </td>
+                                        <td>
+										<input idx="{{idx}}" style="width: 150px" id="leaveDetailList{{idx}}_3" name="leaveDetailList[{{idx}}].startTime" type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon "/>
+										</input>
+										</td>
+										<td>
+										<form:select style="width: 150px" id="leaveDetailList{{idx}}_4" path="leaveDetailList[0].startType" onchange="changeDate('{{idx}}','2')"  class="form-control required simple-select dis">
+											<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</td>
+									 <td>
+										<input idx="{{idx}}" style="width: 150px"  id="leaveDetailList{{idx}}_5" name="leaveDetailList[{{idx}}].endTime" type="text" maxlength="20" class=" di laydate-icondate required form-control layer-date layui-input laydate-icon "/>
+										</input>
+										</td>
+										<td>
+										<form:select style="width: 150px" id="leaveDetailList{{idx}}_6" path="leaveDetailList[0].endType" onchange="changeDate('{{idx}}','2')" class="form-control required simple-select dis">
+											<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</td>
+                                         <td>
+                                            <input id="leaveDetailList{{idx}}_7" onchange="getMoney(this.value)" name="leaveDetailList[{{idx}}].days" type="text" value="{{row.days}}"   readonly="true" class="form-control number required"/>
+                                        </td>
+                                        <td class="text-center op-td" >
+                                            {{#delBtn}}<span class="op-btn op-btn-delete" id="leaveDetailList{{idx}}_span" onclick="delRow(this, '#leaveDetailList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                                        </td>
+                                    </tr>//-->
+					</script>
+					<script type="text/javascript">
+                        var leaveDetailListRowIdx = 0, leaveDetailListTpl = $("#leaveDetailListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        if($("#id").val()){
+                            leaveDetailListRowIdx = ${fn:length(leaveApply.leaveDetailList)};
+                        }
+                        $(document).ready(function() {
+                        });
+					</script>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>历史详情</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="hisContentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="200px">假期名称</th>
+							<th width="200px">累计天数</th>
+							<th width="200px">累计次数</th>
+							<th width="200px">上限天数</th>
+						</tr>
+						</thead>
+						<tbody id="hisLeaveDetailList">
+						<c:if test="${not empty leaveApply.hisLeaveDetailList}">
+							<c:forEach items="${leaveApply.hisLeaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="hisLeaveDetailList${index.index}">
+									<td>
+										<input id="hisLeaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_2"  readonly="true"   type="text" value="${leaveDetail.sumDays}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_3"   readonly="true" type="text" value="${leaveDetail.counts}"   class="form-control require"/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_4"  readonly="true"  type="text" value="${leaveDetail.days}"   class="form-control require"/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${leaveApply.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 646 - 0
src/main/webapp/webpage/modules/leaveapply/leaveApplyExtendModifyApply.jsp

@@ -0,0 +1,646 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        var validateForm;
+        var count1 = 0;
+        $(document).ready(function() {
+            checkContentKeyUp('reason',128);
+            if($("#applyTime").val()==null || $("#applyTime").val()==''){
+                $("#applyTime").val(getNowFormatDate());
+            }
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            lay('.di').each(function(){
+                laydate.render({
+                    elem: this,
+                    event: 'focus',
+                    type : 'date',
+                    done: function(value){//日期时间被切换后的回调
+                        changeDate(this,1);
+                    }
+                });
+            });
+        });
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            $(".dis").attr("disabled",false);
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+
+            return false;
+        }
+
+        function deleteRow(obj,index){
+            $(obj).parent().parent().remove();
+            str[index] = " ";
+            mon[index] = 0;
+
+        }
+        function getNowFormatDate() {
+            var date = new Date();
+            var seperator1 = "-";
+            var seperator2 = ":";
+            var month = date.getMonth() + 1;
+            var strDate = date.getDate();
+            month = (month < 10)?"0"+month:month;
+            strDate = (strDate < 10)?"0"+strDate:strDate;
+            var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
+            return currentdate;
+        }
+
+        function addRow(list, idx, tpl, row){
+            var idx1 = $("#leaveDetailList tr").length;
+            tpl = tpl.replace("leaveDetailList[0].startType","leaveDetailList["+leaveDetailListRowIdx+"].startType");
+            tpl = tpl.replace("leaveDetailList[0].endType","leaveDetailList["+leaveDetailListRowIdx+"].endType");
+            bornTemplete(list, idx, tpl, row, idx1);
+        }
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+            lay('.di').each(function(){
+                laydate.render({
+                    elem: this,
+                    event: 'focus',
+                    type : 'date',
+                    done: function(value){//日期时间被切换后的回调
+                        changeDate(this,1);
+                    }
+                });
+            });
+        }
+
+        function changeDate(index,type) {
+            debugger;
+            var i;
+            if(type==1){
+                i=$(index.elem[0]).attr("idx");
+            }else{
+                i=index;
+            }
+            var startTime=$("#leaveDetailList"+i+"_3").val();
+            var endTime=$("#leaveDetailList"+i+"_5").val();
+            var strtType = $("#leaveDetailList"+i+"_4").val();
+            var endType = $("#leaveDetailList"+i+"_6").val();
+            if(startTime != null && startTime != undefined && startTime != ''
+                &&endTime != null && endTime != undefined && endTime != ''
+                &&strtType != null && strtType != undefined && strtType != ''
+                &&endType != null && endType != undefined && endType != ''){
+                var startDate = new Date(startTime.replace(/-/g, "/"));
+                var endDate = new Date(endTime.replace(/-/g, "/"));
+                var time = endDate.getTime() - startDate.getTime();
+                var days = parseInt(time / (1000 * 60 * 60 * 24));
+                if(days<0){
+                    parent.layer.msg("结束时间需大于开始时间!", {icon: 5});
+                    $("#leaveDetailList"+i+"_5").val('');
+                    return;
+                }
+                var model= $("#leaveDetailList"+i+"_2").val();
+                if(model=='工作日'){
+                    $.ajax({
+                        type:'post',
+                        async: false,
+                        url:'${ctx}/leaveapply/leaveApply/weekDays?startDate='+startTime+'&endDate='+endTime,
+                        success:function(data){
+                            if(data==-1){
+                                parent.layer.msg("该年度法定节假日还未出台,无法计算请假时长!", {icon: 5});
+                                $("#leaveDetailList"+i+"_5").val('');
+                                return;
+                            } else if(data == 0){
+                                $("#leaveDetailList"+i+"_7").val(0);
+                            }else{
+                                data=data-1;
+                                if("1" == strtType && "1" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+0.5);
+                                }else if("1" == strtType && "2" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+1);
+                                }else if("2" == strtType && "2" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+0.5);
+                                }else if("2" == strtType && "1" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data);
+                                }
+                            }
+                        },
+                        error:function(data){
+                        }
+                    });
+                }else{
+                        if("1" == strtType && "1" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+0.5);
+                        }else if("1" == strtType && "2" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+1);
+                        }else if("2" == strtType && "2" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+0.5);
+                        }else if("2" == strtType && "1" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days);
+                        }
+                }
+
+                $("#"+"leaveDetailList"+i+"_7").change();
+            }
+        }
+
+        function getMoney(value){
+            var days = 0;
+            //方法一使用id选择器进行计算。
+            //获取输入的数字
+            //自动计算出结果并填充在相应的输入框中
+            var size = $("#leaveDetailList tr").length+count1;
+            for (var i = 0;i<=size;i++){
+                var countday= $("#leaveDetailList"+i+"_7").val();
+                var delFlag = $("#leaveDetailList"+i+"_delFlag").val();
+                if (countday!=undefined && isNumber(countday) && delFlag==0){
+                    if(days==0){
+                        days = parseFloat(countday);
+                    }else {
+                        days = (parseFloat(days) + parseFloat(countday));
+                    }
+                }
+            }
+                $("#longTime").val(days);
+
+        }
+        function delRow(obj, prefix){
+            var id = $(prefix+"_id");
+            var countday= $(prefix+"_7").val();
+            var days = $("#longTime").val();
+            if (isNumber(countday)){
+                if(days==""){
+                    days = parseFloat(countday);
+                }else {
+                    days = (parseFloat(days) - parseFloat(countday));
+                }
+            }
+            count1++;
+            $("#longTime").val(days);
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                delFlag.val("1");
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤销删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+        }
+        function setLeaveType(ids) {
+            $.ajax({
+                type:'post',
+                url:'${ctx}/leaveapply/leaveApply/typeInfo?ids='+ids,
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            addRow('#leaveDetailList', leaveDetailListRowIdx, leaveDetailListTpl);
+            leaveDetailListRowIdx = leaveDetailListRowIdx + 1;
+            var row = leaveDetailListRowIdx - 1 ;
+            $("#"+"leaveDetailList"+row+"_leaveType").val(obj.id);
+            $("#"+"leaveDetailList"+row+"_1").val(obj.name);
+            $("#"+"leaveDetailList"+row+"_2").val(obj.model);
+            $("#"+"leaveDetailList"+row+"_7").val(0);
+            $("#"+"leaveDetailList"+row+"_7").change();
+            $("#"+"leaveDetailList"+row+"_4").val("1");
+            $("#"+"leaveDetailList"+row+"_6").val("2");
+            if(obj.unit==2){
+                $("#"+"leaveDetailList"+row+"_4").attr("disabled",true);
+                $("#"+"leaveDetailList"+row+"_6").attr("disabled",true);
+            }
+        }
+        function isNumber(val){
+            if(val === "" || val ==null){
+                return false;
+            }
+            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
+            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+            if(regPos.test(val) || regNeg.test(val)){
+                return true;
+            }else{
+                return false;
+            }
+        }
+        function insertTitle(tValue){
+            var list = "${leaveApply.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "114";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/leaveApply/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="leaveApply" action="${ctx}/leaveapply/leaveApply/saveAudit" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="basicInfo.id"/>
+			<form:hidden path="home"/>
+			<form:hidden path="act.taskId"/>
+			<form:hidden path="act.taskName"/>
+			<form:hidden path="act.taskDefKey"/>
+			<form:hidden path="act.procInsId"/>
+			<form:hidden path="act.procDefId"/>
+			<form:hidden id="flag" path="act.flag"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="basicInfo.name" htmlEscape="false" readonly="true"  class="form-control layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>请假编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="no" path="no" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+							<span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty leaveApply.status}">${fns:getDictLabel(leaveApply.status, 'leave_audit', '')}</c:when><c:otherwise>新增</c:otherwise></c:choose></label>
+                             </span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>工号:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.no" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>员工状态:</label>
+					<div class="layui-input-block">
+						<form:input  path="basicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>部门:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.office.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>职级:</label>
+					<div class="layui-input-block">
+						<form:input  readonly="true" path="basicInfo.jobGrade.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>申请日期:</label>
+					<div class="layui-input-block">
+						<input id="applyTime" name="applyTime" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${leaveApply.applyTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">请假原因:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" htmlEscape="false" rows="3" onkeyup="checkContentKeyUp('reason',128);"   maxlength="128" class="form-control "/>
+					</div>
+					<span id="contentMsg" style="float: right"></span>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>假期详情</h2></div>
+				<div class="layui-item nav-btns ">
+					<sys:treeselectlea id="exampleInfo" name="" value="" labelName="" labelValue="" title="假期类型" url="/leaveapply/leaveApply/treeDataTypeInfo"  cssClass="form-control required "
+									   allowClear="true" notAllowSelectParent="true"/>
+				</div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="150px">假期名称</th>
+							<th width="150px">计假模式</th>
+							<th width="150px" colspan="2" >开始时间</th>
+							<th width="150px" colspan="2">结束时间</th>
+							<th width="100px">请假天数</th>
+							<th width="100px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="leaveDetailList">
+						<c:if test="${not empty leaveApply.leaveDetailList}">
+							<c:forEach items="${leaveApply.leaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="leaveDetailList${index.index}">
+									<td class="hide">
+										<input id="leaveDetailList${index.index}_id" name="leaveDetailList[${index.index}].id" type="hidden" value="${leaveDetail.id}"/>
+										<input id="leaveDetailList${index.index}_leaveType" name="leaveDetailList[${index.index}].leaveType.id" type="hidden" value="${leaveDetail.leaveType.id}"/>
+										<input id="leaveDetailList${index.index}_delFlag" name="leaveDetailList[${index.index}].delFlag" type="hidden" value="0"/>
+										<input id="leaveDetailList${index.index}_flag" name="leaveDetailList[${index.index}].flag" type="hidden" value="${leaveDetail.flat}"/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.leaveType.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_2"  readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.leaveType.model, 'fake_model', '')}"   class="form-control "/>
+									</td>
+										<c:choose>
+										<c:when test="${leaveDetail.flat == 1 }">
+											<td>
+												<input idx="${index.index}" style="width: 150px" readonly="true" id="leaveDetailList${index.index}_3" name="leaveDetailList[${index.index}].startTime"  type="text" maxlength="20" class=" required form-control  layui-input "
+													   value="<fmt:formatDate value="${leaveDetail.startTime}" pattern="yyyy-MM-dd"/>"/>
+												</input>
+											</td>
+											<td>
+												<form:select cssStyle="display: none" id="leaveDetailList${index.index}_4" path="leaveDetailList[${index.index}].startType" class="form-control  simple-select">
+													<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+												</form:select>
+												<input  style="width: 150px" readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.startType, 'date_type', '')}"   class="form-control "/>
+											</td>
+											<td>
+												<input idx="${index.index}" style="width: 150px" readonly="true"  id="leaveDetailList${index.index}_5" name="leaveDetailList[${index.index}].endTime"type="text" maxlength="20" class=" required form-control layui-input  "
+													   value="<fmt:formatDate value="${leaveDetail.endTime}" pattern="yyyy-MM-dd"/>"/>
+												</input>
+											</td>
+											<td>
+												<form:select cssStyle="display: none" id="leaveDetailList${index.index}_6" path="leaveDetailList[${index.index}].endType" class="form-control  simple-select">
+													<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+												</form:select>
+												<input  style="width: 150px" readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.endType, 'date_type', '')}"   class="form-control "/>
+
+											</td>
+									<td>
+										<input id="leaveDetailList${index.index}_7" onchange="getMoney(this.value)" name="leaveDetailList[${index.index}].days" type="text" value="${leaveDetail.days}" readonly="true"  class="form-control number required"/>
+									</td>
+									<td class="text-center op-td" >
+
+									</td>
+										</c:when>
+											<c:otherwise>
+												<td>
+													<input idx="${index.index}" style="width: 150px" id="leaveDetailList${index.index}_3" name="leaveDetailList[${index.index}].startTime"  type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon"
+														   value="<fmt:formatDate value="${leaveDetail.startTime}" pattern="yyyy-MM-dd"/>"/>
+													</input>
+												</td>
+												<td>
+													<c:if test="${leaveDetail.leaveType.unit eq '2'}">
+														<form:select style="width: 150px" id="leaveDetailList${index.index}_4" path="leaveDetailList[${index.index}].startType" onchange="changeDate('${index.index}','2')" disabled="true"  class="form-control required simple-select dis">
+															<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+													</c:if>
+													<c:if test="${leaveDetail.leaveType.unit eq '1'}">
+														<form:select style="width: 150px" id="leaveDetailList${index.index}_4" path="leaveDetailList[${index.index}].startType" onchange="changeDate('${index.index}','2')"  class="form-control required simple-select dis">
+															<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+													</c:if>
+												</td>
+												<td>
+													<input idx="${index.index}" style="width: 150px"  id="leaveDetailList${index.index}_5" name="leaveDetailList[${index.index}].endTime"type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon "
+														   value="<fmt:formatDate value="${leaveDetail.endTime}" pattern="yyyy-MM-dd"/>"/>
+													</input>
+												</td>
+												<td>
+													<c:if test="${leaveDetail.leaveType.unit eq '2'}">
+														<form:select style="width: 150px" id="leaveDetailList${index.index}_6" path="leaveDetailList[${index.index}].endType" onchange="changeDate('${index.index}','2')" disabled="true"  class="form-control required simple-select dis">
+															<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+													</c:if>
+													<c:if test="${leaveDetail.leaveType.unit eq '1'}">
+														<form:select style="width: 150px" id="leaveDetailList${index.index}_6" path="leaveDetailList[${index.index}].endType" onchange="changeDate('${index.index}','2')"  class="form-control required simple-select dis">
+															<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+													</c:if>
+												</td>
+												<td>
+													<input id="leaveDetailList${index.index}_7" onchange="getMoney(this.value)" name="leaveDetailList[${index.index}].days" type="text" value="${leaveDetail.days}" readonly="true"  class="form-control number required"/>
+												</td>
+												<td class="text-center op-td" >
+													<span class="op-btn op-btn-delete"  id="leaveDetailList${index.index}_span" onclick="delRow(this, '#leaveDetailList${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+												</td>
+											</c:otherwise>
+										</c:choose>
+
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+					<table id="contentMoneys" class="table table-bordered table-condensed can-edit summary">
+						<tr>
+							<td  style="vertical-align:middle;width:300px;text-align: center;"><label><font color="red">*</font>请假时长:</label></td>
+							<td >
+								<input htmlEscape="false" id="longTime" name="longTime" value="${leaveApply.longTime}" readonly="true" class="form-control layui-input" />
+							</td>
+						</tr>
+					</table>
+					<script type="text/template" id="leaveDetailListTpl">//<!--
+                                    <tr id="leaveDetailList{{idx}}">
+                                        <td class="hide">
+                                            <input id="leaveDetailList{{idx}}_id" name="leaveDetailList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                            <input id="leaveDetailList{{idx}}_leaveType" name="leaveDetailList[{{idx}}].leaveType.id" type="hidden" value="{{row.leaveType.id}}"/>
+                                            <input id="leaveDetailList{{idx}}_delFlag" name="leaveDetailList[{{idx}}].delFlag" type="hidden" value="0"/>
+                                            <input id="leaveDetailList{idx}}_flag" name="leaveDetailList[{{idx}}].flag" type="hidden" value="{{row.flag}}"/>
+                                        </td>
+                                        <td>
+                                            <input id="leaveDetailList{{idx}}_1"   name="leaveDetailList[{{idx}}].leaveType.name" type="text" value="{{row.leaveType.name}}"  readonly="true"   class="form-control "/>
+                                        </td>
+                                        <td>
+                                            <input id="leaveDetailList{{idx}}_2"  name="leaveDetailList[{{idx}}].leaveType.model" type="text" value="{{row.leaveType.model}}"   readonly="true"  class="form-control "/>
+                                        </td>
+                                        <td>
+										<input idx="{{idx}}" style="width: 150px" id="leaveDetailList{{idx}}_3" name="leaveDetailList[{{idx}}].startTime" type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon "/>
+										</input>
+										</td>
+										<td>
+										<form:select style="width: 150px" id="leaveDetailList{{idx}}_4" path="leaveDetailList[0].startType" onchange="changeDate('{{idx}}','2')"  class="form-control required simple-select dis">
+											<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</td>
+									 <td>
+										<input idx="{{idx}}" style="width: 150px"  id="leaveDetailList{{idx}}_5" name="leaveDetailList[{{idx}}].endTime" type="text" maxlength="20" class=" di laydate-icondate required form-control layer-date layui-input laydate-icon "/>
+										</input>
+										</td>
+										<td>
+										<form:select style="width: 150px" id="leaveDetailList{{idx}}_6" path="leaveDetailList[0].endType" onchange="changeDate('{{idx}}','2')" class="form-control required simple-select dis">
+											<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</td>
+                                         <td>
+                                            <input id="leaveDetailList{{idx}}_7" onchange="getMoney(this.value)" name="leaveDetailList[{{idx}}].days" type="text" value="{{row.days}}"   readonly="true" class="form-control number required"/>
+                                        </td>
+                                        <td class="text-center op-td" >
+                                            {{#delBtn}}<span class="op-btn op-btn-delete" id="leaveDetailList{{idx}}_span" onclick="delRow(this, '#leaveDetailList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                                        </td>
+                                    </tr>//-->
+					</script>
+					<script type="text/javascript">
+                        var leaveDetailListRowIdx = 0, leaveDetailListTpl = $("#leaveDetailListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        if($("#id").val()){
+                            leaveDetailListRowIdx = ${fn:length(leaveApply.leaveDetailList)};
+                        }
+                        $(document).ready(function() {
+                        });
+					</script>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>历史详情</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="hisContentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="200px">假期名称</th>
+							<th width="200px">累计天数</th>
+							<th width="200px">累计次数</th>
+							<th width="200px">上限天数</th>
+						</tr>
+						</thead>
+						<tbody id="hisLeaveDetailList">
+						<c:if test="${not empty leaveApply.hisLeaveDetailList}">
+							<c:forEach items="${leaveApply.hisLeaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="hisLeaveDetailList${index.index}">
+									<td>
+										<input id="hisLeaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_2"  readonly="true"   type="text" value="${leaveDetail.sumDays}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_3"   readonly="true" type="text" value="${leaveDetail.counts}"   class="form-control require"/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_4"  readonly="true"  type="text" value="${leaveDetail.days}"   class="form-control require"/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${leaveApply.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 623 - 0
src/main/webapp/webpage/modules/leaveapply/leaveApplyForm.jsp

@@ -0,0 +1,623 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假管理</title>
+	<meta name="decorator" content="default"/>
+	<script src="${ctx}/act/rest/js/common/common.js" charset="UTF-8"></script>
+	<script type="text/javascript">
+        var validateForm;
+        var count1 = 0;
+        $(document).ready(function() {
+            checkContentKeyUp('reason',128);
+            if($("#applyTime").val()==null || $("#applyTime").val()==''){
+                $("#applyTime").val(getNowFormatDate());
+            }
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+           //alert(leaveDetailListRowIdx = ${fn:length(leaveApply.leaveDetailList)};)
+
+
+            lay('.di').each(function(){
+                laydate.render({
+                    elem: this,
+                    event: 'focus',
+                    type : 'date',
+                    done: function(value){//日期时间被切换后的回调
+                        changeDate(this,1);
+                    }
+                });
+            });
+
+        });
+
+
+
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            var idArr = $("#leaveDetailList tr:visible");
+            if(idArr.length<1){
+                parent.layer.msg("请添加请假详情!", {icon: 5});
+                return false;
+			}
+            $(".dis").attr("disabled",false);
+            if(obj == 2){
+                $("#inputForm").attr("action","${ctx}/leaveapply/leaveApply/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/leaveapply/leaveApply/save");
+            }
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+
+            return false;
+        }
+
+        function deleteRow(obj,index){
+            $(obj).parent().parent().remove();
+            str[index] = " ";
+            mon[index] = 0;
+
+        }
+        function getNowFormatDate() {
+            var date = new Date();
+            var seperator1 = "-";
+            var seperator2 = ":";
+            var month = date.getMonth() + 1;
+            var strDate = date.getDate();
+            month = (month < 10)?"0"+month:month;
+            strDate = (strDate < 10)?"0"+strDate:strDate;
+            var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
+            return currentdate;
+        }
+
+        function addRow(list, idx, tpl, row){
+            var idx1 = $("#leaveDetailList tr").length;
+            tpl = tpl.replace("leaveDetailList[0].startType","leaveDetailList["+leaveDetailListRowIdx+"].startType");
+            tpl = tpl.replace("leaveDetailList[0].endType","leaveDetailList["+leaveDetailListRowIdx+"].endType");
+            bornTemplete(list, idx, tpl, row, idx1);
+        }
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+            lay('.di').each(function(){
+                laydate.render({
+                    elem: this,
+                    event: 'focus',
+                    type : 'date',
+                    done: function(value){//日期时间被切换后的回调
+                        changeDate(this,1);
+                    }
+                });
+            });
+        }
+
+        function changeDate(index,type) {
+            var i;
+            if(type==1){
+                i=$(index.elem[0]).attr("idx");
+			}else{
+                i=index;
+			}
+            var startTime=$("#leaveDetailList"+i+"_3").val();
+            var endTime=$("#leaveDetailList"+i+"_5").val();
+            var strtType = $("#leaveDetailList"+i+"_4").val();
+            var endType = $("#leaveDetailList"+i+"_6").val();
+            if(startTime != null && startTime != undefined && startTime != ''
+                &&endTime != null && endTime != undefined && endTime != ''
+                &&strtType != null && strtType != undefined && strtType != ''
+                &&endType != null && endType != undefined && endType != ''){
+                var startDate = new Date(startTime.replace(/-/g, "/"));
+                var endDate = new Date(endTime.replace(/-/g, "/"));
+                var time = endDate.getTime() - startDate.getTime();
+                var days = parseInt(time / (1000 * 60 * 60 * 24));
+                if(days<0){
+                    parent.layer.msg("结束时间需大于开始时间!", {icon: 5});
+                   $("#leaveDetailList"+i+"_5").val('');
+                    return;
+				}
+				var model= $("#leaveDetailList"+i+"_2").val();
+                if(model=='工作日'){
+                    $.ajax({
+                        type:'post',
+                        async: false,
+                        url:'${ctx}/leaveapply/leaveApply/weekDays?startDate='+startTime+'&endDate='+endTime,
+                        success:function(data){
+                            if(data==-1){
+                                parent.layer.msg("该年度法定节假日还未出台,无法计算请假时长!", {icon: 5});
+                                $("#leaveDetailList"+i+"_5").val('');
+                                return;
+							} else if(data == 0){
+                                $("#leaveDetailList"+i+"_7").val(0);
+                            }else{
+                                data=data-1;
+                                if("1" == strtType && "1" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+0.5);
+                                }else if("1" == strtType && "2" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+1);
+                                }else if("2" == strtType && "2" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+0.5);
+                                }else if("2" == strtType && "1" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data);
+                                }
+                            }
+						},
+						error:function(data){
+                        }
+                    });
+				}else{
+                        if("1" == strtType && "1" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+0.5);
+                        }else if("1" == strtType && "2" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+1);
+                        }else if("2" == strtType && "2" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+0.5);
+                        }else if("2" == strtType && "1" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days);
+                        }
+				}
+
+                $("#"+"leaveDetailList"+i+"_7").change();
+            }
+        }
+
+        function getMoney(value){
+            var days = 0;
+            //方法一使用id选择器进行计算。
+            //获取输入的数字
+            //自动计算出结果并填充在相应的输入框中
+            var size = $("#leaveDetailList tr").length+count1;
+            for (var i = 0;i<=size;i++){
+                var countday= $("#leaveDetailList"+i+"_7").val();
+                var delFlag = $("#leaveDetailList"+i+"_delFlag").val();
+                if (countday!=undefined && isNumber(countday) && delFlag==0){
+                    if(days==0){
+                        days = parseFloat(countday);
+                    }else {
+                        days = (parseFloat(days) + parseFloat(countday));
+                    }
+                }
+            }
+                $("#longTime").val(days);
+
+        }
+        function delRow(obj, prefix){
+            var id = $(prefix+"_id");
+            var countday= $(prefix+"_7").val();
+            var days = $("#longTime").val();
+            if (isNumber(countday)){
+                if(days==""){
+                    days = parseFloat(countday);
+                }else {
+                    days = (parseFloat(days) - parseFloat(countday));
+                }
+            }
+            count1++;
+            $("#longTime").val(days);
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                delFlag.val("1");
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤销删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+        }
+        function setLeaveType(ids) {
+            $.ajax({
+                type:'post',
+                url:'${ctx}/leaveapply/leaveApply/typeInfo?ids='+ids,
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            addRow('#leaveDetailList', leaveDetailListRowIdx, leaveDetailListTpl);
+            leaveDetailListRowIdx = leaveDetailListRowIdx + 1;
+            var row = leaveDetailListRowIdx - 1 ;
+            $("#"+"leaveDetailList"+row+"_leaveType").val(obj.id);
+            $("#"+"leaveDetailList"+row+"_1").val(obj.name);
+            $("#"+"leaveDetailList"+row+"_2").val(obj.model);
+            $("#"+"leaveDetailList"+row+"_7").val(0);
+            $("#"+"leaveDetailList"+row+"_7").change();
+            $("#"+"leaveDetailList"+row+"_4").val("1").css('width','100%');
+            $("#"+"leaveDetailList"+row+"_6").val("2").css('width','100%');
+            if(obj.unit==2){
+                $("#"+"leaveDetailList"+row+"_4").attr("disabled",true);
+                $("#"+"leaveDetailList"+row+"_6").attr("disabled",true);
+			}
+
+        }
+        function isNumber(val){
+            if(val === "" || val ==null){
+                return false;
+            }
+            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
+            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+            if(regPos.test(val) || regNeg.test(val)){
+                return true;
+            }else{
+                return false;
+            }
+        }
+        function insertTitle(tValue){
+            var list = "${leaveApply.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "114";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/leaveApply/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="leaveApply" action="${ctx}/leaveapply/leaveApply/save" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="basicInfo.id"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="basicInfo.name" htmlEscape="false" readonly="true"  class="form-control layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>请假编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="no" path="no" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+							<span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty leaveApply.status}">${fns:getDictLabel(leaveApply.status, 'leave_audit', '')}</c:when><c:otherwise>新增</c:otherwise></c:choose></label>
+                             </span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>工号:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.no" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>员工状态:</label>
+					<div class="layui-input-block">
+						<form:input  path="basicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>部门:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.office.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>职级:</label>
+					<div class="layui-input-block">
+						<form:input  readonly="true" path="basicInfo.jobGrade.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>申请日期:</label>
+					<div class="layui-input-block">
+						<input id="applyTime" name="applyTime" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${leaveApply.applyTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">请假原因:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" htmlEscape="false" rows="3" onkeyup="checkContentKeyUp('reason',128);"   maxlength="128" class="form-control "/>
+					</div>
+					<span id="contentMsg" style="float: right"></span>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>假期详情</h2></div>
+				<div class="layui-item nav-btns ">
+					<sys:treeselectlea id="exampleInfo" name="" value="" labelName="" labelValue="" title="假期类型" url="/leaveapply/leaveApply/treeDataTypeInfo"  cssClass="form-control required "
+									   allowClear="true" notAllowSelectParent="true"/>
+				</div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="150px">假期名称</th>
+							<th width="150px">计假模式</th>
+							<th width="150px" colspan="2" >开始时间</th>
+							<th width="150px" colspan="2">结束时间</th>
+							<th width="100px">请假天数</th>
+							<th width="100px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="leaveDetailList">
+						<c:if test="${not empty leaveApply.leaveDetailList}">
+							<c:forEach items="${leaveApply.leaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="leaveDetailList${index.index}">
+									<td class="hide">
+										<input id="leaveDetailList${index.index}_id" name="leaveDetailList[${index.index}].id" type="hidden" value="${leaveDetail.id}"/>
+										<input id="leaveDetailList${index.index}_leaveType" name="leaveDetailList[${index.index}].leaveType.id" type="hidden" value="${leaveDetail.leaveType.id}"/>
+										<input id="leaveDetailList${index.index}_delFlag" name="leaveDetailList[${index.index}].delFlag" type="hidden" value="0"/>
+                                        <input id="leaveDetailList${index.index}_flag" name="leaveDetailList[${index.index}].flag" type="hidden" value="${leaveDetail.flat}"/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.leaveType.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_2"  readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.leaveType.model, 'fake_model', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input idx="${index.index}" style="width: 150px" id="leaveDetailList${index.index}_3" name="leaveDetailList[${index.index}].startTime"  type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon"
+                                    value="<fmt:formatDate value="${leaveDetail.startTime}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</td>
+									<td>
+										<c:if test="${leaveDetail.leaveType.unit eq '2'}">
+											<form:select style="width: 150px" id="leaveDetailList${index.index}_4" path="leaveDetailList[${index.index}].startType" onchange="changeDate('${index.index}','2')" disabled="true"  class="form-control required simple-select dis">
+											<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+										</c:if>
+										<c:if test="${leaveDetail.leaveType.unit eq '1'}">
+											<form:select style="width: 150px" id="leaveDetailList${index.index}_4" path="leaveDetailList[${index.index}].startType" onchange="changeDate('${index.index}','2')"  class="form-control required simple-select dis">
+											<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+										</c:if>
+									</td>
+									<td>
+										<input idx="${index.index}" style="width: 150px"  id="leaveDetailList${index.index}_5" name="leaveDetailList[${index.index}].endTime"type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon "
+											   value="<fmt:formatDate value="${leaveDetail.endTime}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</td>
+									<td>
+										<c:if test="${leaveDetail.leaveType.unit eq '2'}">
+											<form:select style="width: 150px" id="leaveDetailList${index.index}_6" path="leaveDetailList[${index.index}].endType" onchange="changeDate('${index.index}','2')" disabled="true"  class="form-control required simple-select dis">
+												<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+											</form:select>
+										</c:if>
+										<c:if test="${leaveDetail.leaveType.unit eq '1'}">
+											<form:select style="width: 150px" id="leaveDetailList${index.index}_6" path="leaveDetailList[${index.index}].endType" onchange="changeDate('${index.index}','2')"  class="form-control required simple-select dis">
+												<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+											</form:select>
+										</c:if>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_7" onchange="getMoney(this.value)" name="leaveDetailList[${index.index}].days" type="text" value="${leaveDetail.days}" readonly="true"  class="form-control number required"/>
+									</td>
+									<td class="text-center op-td" >
+										<span class="op-btn op-btn-delete"  id="leaveDetailList${index.index}_span" onclick="delRow(this, '#leaveDetailList${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+					<table id="contentMoneys" class="table table-bordered table-condensed can-edit summary">
+						<tr>
+							<td  style="vertical-align:middle;width:300px;text-align: center;"><label><font color="red">*</font>请假时长:</label></td>
+							<td >
+								<input htmlEscape="false" id="longTime" name="longTime" value="${leaveApply.longTime}" readonly="true" class="form-control layui-input" />
+							</td>
+						</tr>
+					</table>
+					<script type="text/template" id="leaveDetailListTpl">//<!--
+                                    <tr id="leaveDetailList{{idx}}">
+                                        <td class="hide">
+                                            <input id="leaveDetailList{{idx}}_id" name="leaveDetailList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                            <input id="leaveDetailList{{idx}}_leaveType" name="leaveDetailList[{{idx}}].leaveType.id" type="hidden" value="{{row.leaveType.id}}"/>
+                                            <input id="leaveDetailList{{idx}}_delFlag" name="leaveDetailList[{{idx}}].delFlag" type="hidden" value="0"/>
+                                            <input id="leaveDetailList{idx}}_flag" name="leaveDetailList[{{idx}}].flag" type="hidden" value="{{row.flag}}"/>
+                                        </td>
+                                        <td>
+                                            <input id="leaveDetailList{{idx}}_1"   name="leaveDetailList[{{idx}}].leaveType.name" type="text" value="{{row.leaveType.name}}"  readonly="true"   class="form-control "/>
+                                        </td>
+                                        <td>
+                                            <input id="leaveDetailList{{idx}}_2"  name="leaveDetailList[{{idx}}].leaveType.model" type="text" value="{{row.leaveType.model}}"   readonly="true"  class="form-control "/>
+                                        </td>
+                                        <td>
+										<input idx="{{idx}}" style="width: 150px" id="leaveDetailList{{idx}}_3" name="leaveDetailList[{{idx}}].startTime" type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon "/>
+										</input>
+										</td>
+										<td>
+										<form:select style="width: 150px" id="leaveDetailList{{idx}}_4" path="leaveDetailList[0].startType" onchange="changeDate('{{idx}}','2')"  class="form-control required simple-select dis">
+						                <form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</td>
+									 <td>
+										<input idx="{{idx}}" style="width: 150px"  id="leaveDetailList{{idx}}_5" name="leaveDetailList[{{idx}}].endTime" type="text" maxlength="20" class=" di laydate-icondate required form-control layer-date layui-input laydate-icon "/>
+										</input>
+										</td>
+										<td>
+										<form:select style="width: 150px" id="leaveDetailList{{idx}}_6" path="leaveDetailList[0].endType" onchange="changeDate('{{idx}}','2')" class="form-control required simple-select dis">
+                                          <form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</td>
+                                         <td>
+                                            <input id="leaveDetailList{{idx}}_7" onchange="getMoney(this.value)" name="leaveDetailList[{{idx}}].days" type="text" value="{{row.days}}"   readonly="true" class="form-control number required"/>
+                                        </td>
+                                        <td class="text-center op-td" >
+                                            {{#delBtn}}<span class="op-btn op-btn-delete" id="leaveDetailList{{idx}}_span" onclick="delRow(this, '#leaveDetailList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                                        </td>
+                                    </tr>//-->
+					</script>
+					<script type="text/javascript">
+                        var leaveDetailListRowIdx = 0, leaveDetailListTpl = $("#leaveDetailListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        if($("#id").val()){
+                            leaveDetailListRowIdx = ${fn:length(leaveApply.leaveDetailList)};
+                        }
+                        $(document).ready(function() {
+                        });
+					</script>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>历史详情</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="hisContentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="200px">假期名称</th>
+							<th width="200px">累计天数</th>
+							<th width="200px">累计次数</th>
+							<th width="200px">上限天数</th>
+						</tr>
+						</thead>
+						<tbody id="hisLeaveDetailList">
+						<c:if test="${not empty leaveApply.hisLeaveDetailList}">
+							<c:forEach items="${leaveApply.hisLeaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="hisLeaveDetailList${index.index}">
+									<td>
+										<input id="hisLeaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_2"  readonly="true"   type="text" value="${leaveDetail.sumDays}"   class="form-control "/>
+									</td>
+									<td>
+									    <input id="hisLeaveDetailList${index.index}_3"   readonly="true" type="text" value="${leaveDetail.counts}"   class="form-control require"/>
+								    </td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_4"  readonly="true"  type="text" value="${leaveDetail.days}"   class="form-control require"/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${leaveApply.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 366 - 0
src/main/webapp/webpage/modules/leaveapply/leaveApplyList.jsp

@@ -0,0 +1,366 @@
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		.widthClass{
+			display: inline-block;
+		}
+		.shows .input-group{
+			width: 48%!important;
+		}
+	</style>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="leaveApply" action="${ctx}/leaveapply/leaveApply/" method="post" class="form-inline">
+					<%--以下三行照抄--%>
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="commonQuery">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">姓名:</label>
+							<div class="layui-input-block">
+								<input  name="basicInfo.name" type="text"  maxlength="64" class=" form-control  layui-input laydate-icon"  />
+								</input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">申请日期:</label>
+							<div class="layui-input-block">
+								<input id="beginDate" placeholder="开始时间" name="beginApplyTime" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${leaveApply.beginApplyTime}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endDate" placeholder="结束时间" name="endApplyTime" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${leaveApply.endApplyTime}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" style="clear:both;display:none;">
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">状态:</label>
+							<div class="layui-input-block">
+								<form:select path="status" class=" form-control  simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('leave_audit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
+						<div style="clear:both;"></div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<%--此处按钮样式包括 nav-btn-add nav-btn-refresh nav-btn-import nav-btn-export nav-btn-query nav-btn-reset--%>
+					<shiro:hasPermission name="leaveapply:leaveApply:add">
+						<a href="javascript:void(0)" onclick="openDialogAdd('新增请假', '${ctx}/leaveapply/leaveApply/form?tabId=1','95%','95%')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i>&nbsp;添加</a>
+					</shiro:hasPermission>
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'no',align:'center',sort: true, minWidth:120,title: '请假编号', templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看请假', '${ctx}/leaveapply/leaveApply/view?id=" + d.id + "','95%','95%')\">" +
+                            "<span title=" + d.no + ">" + d.no + "</span></a>";
+                        return xml;
+                    }},
+                {field:'name',align:'center', width:120, title: '姓名',templet:function(d){
+                        return "<span title='"+ d.name +"'>" + d.name + "</span>";
+                    }}
+                ,{field:'number',align:'center',width:120, title: '工号',templet:function(d){
+                        return "<span title='"+ d.number +"'>" + d.number + "</span>";
+                    }}
+                ,{field:'office',align:'center',width:200, title: '部门',templet:function(d){
+                        return "<span title='"+ d.office +"'>" + d.office + "</span>";
+                    }}
+                ,{field:'job',align:'center',width:150, title: '职级',templet:function(d){
+                        return "<span title='"+ d.job +"'>" + d.job + "</span>";
+                    }}
+                ,{field:'applyTime', align:'center',width:100,title: '申请日期'}
+                ,{field:'longTime',align:'center',width:100, title: '请假时长',templet:function(d){
+                        return "<span title='"+ d.longTime +"'>" + d.longTime + "</span>";
+                    }}
+                ,{field:'status',align:'center',width:100, title: '申请状态',templet:function(d){
+                        var st = getAuditLeaveState(d.status);
+                        if(st.action)
+                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/leaveapply/leaveApply/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        else
+                            var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        return xml;
+                    }}
+                ,{align:'caozuo',align:'center',title:"操作",width:160,templet:function(d){
+                        var xml = "";
+                        if(d.canedit != undefined && d.canedit == "1"){
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改请假', '${ctx}/leaveapply/leaveApply/form?id=" + d.id+"','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>修改</a>"
+                        }
+                        if(d.canmodify != undefined && d.canmodify =="1"){
+                            xml+="<a href=\"#\" onclick=\"openDialog('修改请假', '${ctx}/leaveapply/leaveApply/modify?id=" + d.id + "','95%', '95%','','重新申请,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        }
+                        if(d.candelete != undefined && d.candelete == "1"){
+                            xml +="<a href=\"${ctx}/leaveapply/leaveApply/delete?id=" + d.id+"\" onclick=\"return confirmx('确认要删除该请假吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+                        }
+                        if(d.cancancel != undefined && d.cancancel =="1"){
+                            xml+="<a href=\"${ctx}/leaveapply/leaveApply/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该请假申请吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
+                        }
+                        if(d.canback != undefined && d.canback =="1"){
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('续假申请', '${ctx}/leaveapply/leaveApply/form?id=" + d.id+"&tabId=2','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>续假</a>";
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('销假申请', '${ctx}/leaveapply/leaveApply/view?id=" + d.id+"&flat=1','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>销假</a>"
+                        }
+                        if(d.xiaojiazhong != undefined && d.xiaojiazhong =="1"){
+                            xml+="<a href=\"${ctx}/leaveapply/leaveApply/revokeBack?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该销假申请吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 销假撤回</a>";
+                        }
+                        if(d.canedit1 != undefined && d.canedit1 =="1"){
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('续假申请', '${ctx}/leaveapply/leaveApply/form?id=" + d.id+"&tabId=2','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>续假</a>";
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改销假', '${ctx}/leaveapply/leaveApply/view?id=" + d.id+"&flat=1','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>销假</a>"
+                        }
+                        if(d.canmodify1 != undefined && d.canmodify1 =="1"){
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('续假申请', '${ctx}/leaveapply/leaveApply/form?id=" + d.id+"&tabId=2','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>续假</a>";
+                            xml+="<a href=\"#\" onclick=\"openDialog('修改销假', '${ctx}/leaveapply/leaveApply/modify?id=" + d.id + "','95%', '95%','','重新申请,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 销假</a>";
+                        }
+                        if(d.xujiazhong != undefined && d.xujiazhong =="1"){
+                            xml+="<a href=\"${ctx}/leaveapply/leaveApply/revokeExtend?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该续假申请吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 续假撤回</a>";
+                        }
+                        if(d.canedit2 != undefined && d.canedit2 =="1"){
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改续假', '${ctx}/leaveapply/leaveApply/form?id=" + d.id+"&tabId=2','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>续假</a>"
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('销假申请', '${ctx}/leaveapply/leaveApply/view?id=" + d.id+"&flat=1','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>销假</a>"
+                        }
+                        if(d.canmodify2 != undefined && d.canmodify2 =="1"){
+                            xml+="<a href=\"#\" onclick=\"openDialog('修改续假', '${ctx}/leaveapply/leaveApply/modify?id=" + d.id + "','95%', '95%','','重新申请,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 续假</a>";
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('销假申请', '${ctx}/leaveapply/leaveApply/view?id=" + d.id+"&flat=1','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>销假</a>"
+                        }
+                        return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="leaveApply" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}",
+                    "id":"${leaveApply.id}"
+                    ,"no":"${leaveApply.no}"
+                    ,"name":"${leaveApply.basicInfo.name}"
+                    ,"number":"${leaveApply.basicInfo.no}"
+                    ,"office":"${leaveApply.basicInfo.office.name}"
+                    ,"job":"${leaveApply.basicInfo.jobGrade.name}"
+                    ,"applyTime":"<fmt:formatDate value="${leaveApply.applyTime}" pattern="yyyy-MM-dd"/>"
+                    ,"longTime":"${leaveApply.longTime}"
+                    ,"status":"${leaveApply.status}"
+                    ,"procId":"${leaveApply.processInstanceId}"
+                    <c:if test="${flag == '1' or fns:getUser().id == leaveApply.createBy.id}">
+                    ,"canedit":<c:choose><c:when test="${leaveApply.status == 1 or leaveApply.status == 3}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canmodify":<c:choose><c:when test="${leaveApply.status == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"candelete":<c:choose><c:when test="${leaveApply.status == 1 or leaveApply.status == 3 or leaveApply.status == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"cancancel":<c:choose><c:when test="${leaveApply.status == 2}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canback":<c:choose><c:when test="${leaveApply.status == 5 }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"xiaojiazhong":<c:choose><c:when test="${leaveApply.status == 6 }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canedit1":<c:choose><c:when test="${leaveApply.status == 7 }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canmodify1":<c:choose><c:when test="${leaveApply.status == 9 }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"xujiazhong":<c:choose><c:when test="${leaveApply.status == 10 }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canedit2":<c:choose><c:when test="${leaveApply.status == 11 }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canmodify2":<c:choose><c:when test="${leaveApply.status == 12 }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#cus_name").show();
+        $("#cus_name").siblings().hide();
+        //搜索框收放
+        $('#moresee').click(function(){
+            if($('#moresees').is(':visible'))
+            {
+                $('#moresees').slideUp(0,resizeListWindow1);
+                $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+            }else{
+                $('#moresees').slideDown(0,resizeListWindow1);
+                $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+            }
+        });
+
+        laydate.render({
+            elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            format: 'yyyy-MM-dd',
+            type : 'date'
+        });
+
+        laydate.render({
+            elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            format: 'yyyy-MM-dd',
+            type : 'date'
+        });
+
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+    function openDialogremodify(title,url,width,height,target){
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: 'two-btns',
+            maxmin: true, //开启最大化最小化按钮
+            content: url ,
+            btn: ['重新申请','关闭'],
+            yes: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                if(iframeWin.contentWindow.doSubmit() ){
+                    top.layer.close(index);//关闭对话框。
+                    //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+
+            }
+
+        });
+    }
+    function openDialogAdd(title,url,width,height,target) {
+        $.ajax({
+            type:'post',
+            url:'${ctx}/leaveapply/leaveApply/addApply',
+            success:function(data){
+                if(data==0){
+
+                    if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                        width = 'auto';
+                        height = 'auto';
+                    } else {//如果是PC端,根据用户设置的width和height显示。
+                    }
+                    top.layer.open({
+                        type: 2,
+                        area: [width, height],
+                        title: title,
+                        maxmin: true, //开启最大化最小化按钮
+                        content: url,
+                        skin: 'three-btns',
+                        btn: ['送审', '暂存', '关闭'],
+                        btn1: function(index, layero){
+                            var body = top.layer.getChildFrame('body', index);
+                            var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                            var inputForm = body.find('#inputForm');
+                            var top_iframe;
+                            if(target){
+                                top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                            }else{
+                                top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                            }
+                            inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                            if(iframeWin.contentWindow.doSubmit(1) ){
+                                // top.layer.close(index);//关闭对话框。
+                                setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                            }
+                        },
+                        btn2:function(index,layero){
+                            var body = top.layer.getChildFrame('body', index);
+                            var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                            var inputForm = body.find('#inputForm');
+                            var top_iframe;
+                            if(target){
+                                top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                            }else{
+                                top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                            }
+                            inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                            if(iframeWin.contentWindow.doSubmit(2) ){
+                                // top.layer.close(index);//关闭对话框。
+                                setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                            }else {
+                                return false;
+                            }
+                        },
+                        btn3: function (index) {
+                        }
+                    });
+                }else if(data==1){
+                    parent.layer.msg("存在未销假的请假记录,销假后才能添加!",{icon:1});
+				}else if(data==-1){
+                    parent.layer.msg("人员档案信息不存在无操作权限!",{icon:1});
+                }
+           }
+        })
+    }
+
+</script>
+</body>
+</html>

+ 555 - 0
src/main/webapp/webpage/modules/leaveapply/leaveApplyModifyApply.jsp

@@ -0,0 +1,555 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        var validateForm;
+        var count1 = 0;
+        $(document).ready(function() {
+            checkContentKeyUp('reason',128);
+            if($("#applyTime").val()==null || $("#applyTime").val()==''){
+                $("#applyTime").val(getNowFormatDate());
+            }
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            //alert(leaveDetailListRowIdx = ${fn:length(leaveApply.leaveDetailList)};)
+
+
+            lay('.di').each(function(){
+                laydate.render({
+                    elem: this,
+                    event: 'focus',
+                    type : 'date',
+                    done: function(value){//日期时间被切换后的回调
+                        changeDate(this,1);
+                    }
+                });
+            });
+
+        });
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            var idArr = $("#leaveDetailList tr:visible");
+            if(idArr.length<1){
+                parent.layer.msg("请添加请假详情!", {icon: 5});
+                return false;
+            }
+            $(".dis").attr("disabled",false);
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+
+            return false;
+        }
+
+        function deleteRow(obj,index){
+            $(obj).parent().parent().remove();
+            str[index] = " ";
+            mon[index] = 0;
+
+        }
+        function getNowFormatDate() {
+            var date = new Date();
+            var seperator1 = "-";
+            var seperator2 = ":";
+            var month = date.getMonth() + 1;
+            var strDate = date.getDate();
+            month = (month < 10)?"0"+month:month;
+            strDate = (strDate < 10)?"0"+strDate:strDate;
+            var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
+            return currentdate;
+        }
+
+        function addRow(list, idx, tpl, row){
+            var idx1 = $("#leaveDetailList tr").length;
+            tpl = tpl.replace("leaveDetailList[0].startType","leaveDetailList["+leaveDetailListRowIdx+"].startType");
+            tpl = tpl.replace("leaveDetailList[0].endType","leaveDetailList["+leaveDetailListRowIdx+"].endType");
+            bornTemplete(list, idx, tpl, row, idx1);
+        }
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+
+            lay('.di').each(function(){
+                laydate.render({
+                    elem: this,
+                    event: 'focus',
+                    type : 'date',
+                    done: function(value){//日期时间被切换后的回调
+                        changeDate(this,1);
+                    }
+                });
+            });
+        }
+
+        function changeDate(index,type) {
+            debugger;
+            var i;
+            if(type==1){
+                i=$(index.elem[0]).attr("idx");
+            }else{
+                i=index;
+            }
+            var startTime=$("#leaveDetailList"+i+"_3").val();
+            var endTime=$("#leaveDetailList"+i+"_5").val();
+            var strtType = $("#leaveDetailList"+i+"_4").val();
+            var endType = $("#leaveDetailList"+i+"_6").val();
+            if(startTime != null && startTime != undefined && startTime != ''
+                &&endTime != null && endTime != undefined && endTime != ''
+                &&strtType != null && strtType != undefined && strtType != ''
+                &&endType != null && endType != undefined && endType != ''){
+                var startDate = new Date(startTime.replace(/-/g, "/"));
+                var endDate = new Date(endTime.replace(/-/g, "/"));
+                var time = endDate.getTime() - startDate.getTime();
+                var days = parseInt(time / (1000 * 60 * 60 * 24));
+                if(days<0){
+                    parent.layer.msg("结束时间需大于开始时间!", {icon: 5});
+                    $("#leaveDetailList"+i+"_5").val('');
+                    return;
+                }
+                var model= $("#leaveDetailList"+i+"_2").val();
+                if(model=='工作日'){
+                    $.ajax({
+                        type:'post',
+                        async: false,
+                        url:'${ctx}/leaveapply/leaveApply/weekDays?startDate='+startTime+'&endDate='+endTime,
+                        success:function(data){
+                            if(data==-1){
+                                parent.layer.msg("该年度法定节假日还未出台,无法计算请假时长!", {icon: 5});
+                                $("#leaveDetailList"+i+"_5").val('');
+                                return;
+                            } else if(data == 0){
+                                $("#leaveDetailList"+i+"_7").val(0);
+                            }else{
+                                data=data-1;
+                                if("1" == strtType && "1" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+0.5);
+                                }else if("1" == strtType && "2" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+1);
+                                }else if("2" == strtType && "2" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data+0.5);
+                                }else if("2" == strtType && "1" == endType){
+                                    $("#leaveDetailList"+i+"_7").val( data);
+                                }
+                            }
+                        },
+                        error:function(data){
+                        }
+                    });
+                }else{
+                        if("1" == strtType && "1" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+0.5);
+                        }else if("1" == strtType && "2" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+1);
+                        }else if("2" == strtType && "2" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days+0.5);
+                        }else if("2" == strtType && "1" == endType){
+                            $("#leaveDetailList"+i+"_7").val( days);
+                        }
+                }
+
+                $("#"+"leaveDetailList"+i+"_7").change();
+            }
+        }
+
+        function getMoney(value){
+            var days = 0;
+            //方法一使用id选择器进行计算。
+            //获取输入的数字
+            //自动计算出结果并填充在相应的输入框中
+            var size = $("#leaveDetailList tr").length+count1;
+            for (var i = 0;i<=size;i++){
+                var countday= $("#leaveDetailList"+i+"_7").val();
+                var delFlag = $("#leaveDetailList"+i+"_delFlag").val();
+                if (countday!=undefined && isNumber(countday) && delFlag==0){
+                    if(days==0){
+                        days = parseFloat(countday);
+                    }else {
+                        days = (parseFloat(days) + parseFloat(countday));
+                    }
+                }
+            }
+                $("#longTime").val(days);
+
+        }
+        function delRow(obj, prefix){
+            var id = $(prefix+"_id");
+            var countday= $(prefix+"_7").val();
+            var days = $("#longTime").val();
+            if (isNumber(countday)){
+                if(days==""){
+                    days = parseFloat(countday);
+                }else {
+                    days = (parseFloat(days) - parseFloat(countday));
+                }
+            }
+            count1++;
+            $("#longTime").val(days);
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                delFlag.val("1");
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤销删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+        }
+        function setLeaveType(ids) {
+            $.ajax({
+                type:'post',
+                url:'${ctx}/leaveapply/leaveApply/typeInfo?ids='+ids,
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            addRow('#leaveDetailList', leaveDetailListRowIdx, leaveDetailListTpl);
+            leaveDetailListRowIdx = leaveDetailListRowIdx + 1;
+            var row = leaveDetailListRowIdx - 1 ;
+            $("#"+"leaveDetailList"+row+"_leaveType").val(obj.id);
+            $("#"+"leaveDetailList"+row+"_1").val(obj.name);
+            $("#"+"leaveDetailList"+row+"_2").val(obj.model);
+            $("#"+"leaveDetailList"+row+"_7").val(0);
+            $("#"+"leaveDetailList"+row+"_7").change();
+            $("#"+"leaveDetailList"+row+"_4").val("1");
+            $("#"+"leaveDetailList"+row+"_6").val("2");
+            if(obj.unit==2){
+                $("#"+"leaveDetailList"+row+"_4").attr("disabled",true);
+                $("#"+"leaveDetailList"+row+"_6").attr("disabled",true);
+            }
+        }
+        function isNumber(val){
+            if(val === "" || val ==null){
+                return false;
+            }
+            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
+            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+            if(regPos.test(val) || regNeg.test(val)){
+                return true;
+            }else{
+                return false;
+            }
+
+        }
+        function insertTitle(tValue){
+            var list = "${leaveApply.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "114";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/leaveApply/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="leaveApply" action="${ctx}/leaveapply/leaveApply/saveAudit" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="basicInfo.id"/>
+			<form:hidden path="home"/>
+			<form:hidden path="act.taskId"/>
+			<form:hidden path="act.taskName"/>
+			<form:hidden path="act.taskDefKey"/>
+			<form:hidden path="act.procInsId"/>
+			<form:hidden path="act.procDefId"/>
+			<form:hidden id="flag" path="act.flag"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="basicInfo.name" htmlEscape="false" readonly="true"  class="form-control layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>请假编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="no" path="no" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+							<span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty leaveApply.status}">${fns:getDictLabel(leaveApply.status, 'leave_audit', '')}</c:when><c:otherwise>新增</c:otherwise></c:choose></label>
+                             </span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>工号:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.no" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>员工状态:</label>
+					<div class="layui-input-block">
+						<form:input  path="basicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>部门:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.office.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>职级:</label>
+					<div class="layui-input-block">
+						<form:input  readonly="true" path="basicInfo.jobGrade.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>申请日期:</label>
+					<div class="layui-input-block">
+						<input id="applyTime" name="applyTime" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${leaveApply.applyTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">请假原因:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" htmlEscape="false" rows="3" onkeyup="checkContentKeyUp('reason',128);"   maxlength="128" class="form-control "/>
+					</div>
+					<span id="contentMsg" style="float: right"></span>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>假期详情</h2></div>
+				<div class="layui-item nav-btns ">
+					<sys:treeselectlea id="exampleInfo" name="" value="" labelName="" labelValue="" title="假期类型" url="/leaveapply/leaveApply/treeDataTypeInfo"  cssClass="form-control required "
+									   allowClear="true" notAllowSelectParent="true"/>
+				</div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="150px">假期名称</th>
+							<th width="150px">计假模式</th>
+							<th width="150px" colspan="2" >开始时间</th>
+							<th width="150px" colspan="2">结束时间</th>
+							<th width="100px">请假天数</th>
+							<th width="100px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="leaveDetailList">
+						<c:if test="${not empty leaveApply.leaveDetailList}">
+							<c:forEach items="${leaveApply.leaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="leaveDetailList${index.index}">
+									<td class="hide">
+										<input id="leaveDetailList${index.index}_id" name="leaveDetailList[${index.index}].id" type="hidden" value="${leaveDetail.id}"/>
+										<input id="leaveDetailList${index.index}_leaveType" name="leaveDetailList[${index.index}].leaveType.id" type="hidden" value="${leaveDetail.leaveType.id}"/>
+										<input id="leaveDetailList${index.index}_delFlag" name="leaveDetailList[${index.index}].delFlag" type="hidden" value="0"/>
+										<input id="leaveDetailList${index.index}_flag" name="leaveDetailList[${index.index}].flag" type="hidden" value="${leaveDetail.flat}"/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.leaveType.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_2"  readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.leaveType.model, 'fake_model', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input idx="${index.index}" style="width: 150px" id="leaveDetailList${index.index}_3" name="leaveDetailList[${index.index}].startTime"  type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon"
+											   value="<fmt:formatDate value="${leaveDetail.startTime}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</td>
+									<td>
+										<c:if test="${leaveDetail.leaveType.unit eq '2'}">
+											<form:select style="width: 150px" id="leaveDetailList${index.index}_4" path="leaveDetailList[${index.index}].startType" onchange="changeDate('${index.index}','2')" disabled="true"  class="form-control required simple-select dis">
+												<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+											</form:select>
+										</c:if>
+										<c:if test="${leaveDetail.leaveType.unit eq '1'}">
+											<form:select style="width: 150px" id="leaveDetailList${index.index}_4" path="leaveDetailList[${index.index}].startType" onchange="changeDate('${index.index}','2')"  class="form-control required simple-select dis">
+												<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+											</form:select>
+										</c:if>
+									</td>
+									<td>
+										<input idx="${index.index}" style="width: 150px"  id="leaveDetailList${index.index}_5" name="leaveDetailList[${index.index}].endTime"type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon "
+											   value="<fmt:formatDate value="${leaveDetail.endTime}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</td>
+									<td>
+										<c:if test="${leaveDetail.leaveType.unit eq '2'}">
+											<form:select style="width: 150px" id="leaveDetailList${index.index}_6" path="leaveDetailList[${index.index}].endType" onchange="changeDate('${index.index}','2')" disabled="true"  class="form-control required simple-select dis">
+												<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+											</form:select>
+										</c:if>
+										<c:if test="${leaveDetail.leaveType.unit eq '1'}">
+											<form:select style="width: 150px" id="leaveDetailList${index.index}_6" path="leaveDetailList[${index.index}].endType" onchange="changeDate('${index.index}','2')"  class="form-control required simple-select dis">
+												<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+											</form:select>
+										</c:if>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_7" onchange="getMoney(this.value)" name="leaveDetailList[${index.index}].days" type="text" value="${leaveDetail.days}" readonly="true"  class="form-control number required"/>
+									</td>
+									<td class="text-center op-td" >
+										<span class="op-btn op-btn-delete"  id="leaveDetailList${index.index}_span" onclick="delRow(this, '#leaveDetailList${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+					<table id="contentMoneys" class="table table-bordered table-condensed can-edit summary">
+						<tr>
+							<td  style="vertical-align:middle;width:300px;text-align: center;"><label><font color="red">*</font>请假时长:</label></td>
+							<td >
+								<input htmlEscape="false" id="longTime" name="longTime" value="${leaveApply.longTime}" readonly="true" class="form-control layui-input" />
+							</td>
+						</tr>
+					</table>
+					<script type="text/template" id="leaveDetailListTpl">//<!--
+                                    <tr id="leaveDetailList{{idx}}">
+                                        <td class="hide">
+                                            <input id="leaveDetailList{{idx}}_id" name="leaveDetailList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                            <input id="leaveDetailList{{idx}}_leaveType" name="leaveDetailList[{{idx}}].leaveType.id" type="hidden" value="{{row.leaveType.id}}"/>
+                                            <input id="leaveDetailList{{idx}}_delFlag" name="leaveDetailList[{{idx}}].delFlag" type="hidden" value="0"/>
+                                            <input id="leaveDetailList{idx}}_flag" name="leaveDetailList[{{idx}}].flag" type="hidden" value="{{row.flag}}"/>
+                                        </td>
+                                        <td>
+                                            <input id="leaveDetailList{{idx}}_1"   name="leaveDetailList[{{idx}}].leaveType.name" type="text" value="{{row.leaveType.name}}"  readonly="true"   class="form-control "/>
+                                        </td>
+                                        <td>
+                                            <input id="leaveDetailList{{idx}}_2"  name="leaveDetailList[{{idx}}].leaveType.model" type="text" value="{{row.leaveType.model}}"   readonly="true"  class="form-control "/>
+                                        </td>
+                                        <td>
+										<input idx="{{idx}}" style="width: 150px" id="leaveDetailList{{idx}}_3" name="leaveDetailList[{{idx}}].startTime" type="text" maxlength="20" class="di laydate-icondate required form-control layer-date layui-input laydate-icon "/>
+										</input>
+										</td>
+										<td>
+										<form:select style="width: 150px" id="leaveDetailList{{idx}}_4" path="leaveDetailList[0].startType" onchange="changeDate('{{idx}}','2')"  class="form-control required simple-select dis">
+											<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</td>
+									 <td>
+										<input idx="{{idx}}" style="width: 150px"  id="leaveDetailList{{idx}}_5" name="leaveDetailList[{{idx}}].endTime" type="text" maxlength="20" class=" di laydate-icondate required form-control layer-date layui-input laydate-icon "/>
+										</input>
+										</td>
+										<td>
+										<form:select style="width: 150px" id="leaveDetailList{{idx}}_6" path="leaveDetailList[0].endType" onchange="changeDate('{{idx}}','2')" class="form-control required simple-select dis">
+											<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>
+									</td>
+                                         <td>
+                                            <input id="leaveDetailList{{idx}}_7" onchange="getMoney(this.value)" name="leaveDetailList[{{idx}}].days" type="text" value="{{row.days}}"   readonly="true" class="form-control number required"/>
+                                        </td>
+                                        <td class="text-center op-td" >
+                                            {{#delBtn}}<span class="op-btn op-btn-delete" id="leaveDetailList{{idx}}_span" onclick="delRow(this, '#leaveDetailList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                                        </td>
+                                    </tr>//-->
+					</script>
+					<script type="text/javascript">
+                        var leaveDetailListRowIdx = 0, leaveDetailListTpl = $("#leaveDetailListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        if($("#id").val()){
+                            leaveDetailListRowIdx = ${fn:length(leaveApply.leaveDetailList)};
+                        }
+                        $(document).ready(function() {
+                        });
+					</script>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>历史详情</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="hisContentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="200px">假期名称</th>
+							<th width="200px">累计天数</th>
+							<th width="200px">累计次数</th>
+							<th width="200px">上限天数</th>
+						</tr>
+						</thead>
+						<tbody id="hisLeaveDetailList">
+						<c:if test="${not empty leaveApply.hisLeaveDetailList}">
+							<c:forEach items="${leaveApply.hisLeaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="hisLeaveDetailList${index.index}">
+									<td>
+										<input id="hisLeaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_2"  readonly="true"   type="text" value="${leaveDetail.sumDays}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_3"   readonly="true" type="text" value="${leaveDetail.counts}"   class="form-control require"/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_4"  readonly="true"  type="text" value="${leaveDetail.days}"   class="form-control require"/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 15 - 0
src/main/webapp/webpage/modules/leaveapply/leaveApplyTask.jsp

@@ -0,0 +1,15 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>流程追踪</title>
+	<meta name="decorator" content="default"/>
+</head>
+<body class="gray-bg">
+<div class="container form layui-form">
+	<act:flowChart procInsId="${processInstanceId}"/>
+	<act:histoicFlow procInsId="${processInstanceId}"/>
+</div>
+</body>
+</html>
+

+ 375 - 0
src/main/webapp/webpage/modules/leaveapply/leaveApplyView.jsp

@@ -0,0 +1,375 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }
+            return false;
+        }
+        var validateForm;
+        var count = 0;
+        $(document).ready(function() {
+            if($("#backTime").val()==null || $("#backTime").val()==''){
+                $("#backTime").val(getNowFormatDate());
+            }
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            setContrast();
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            laydate.render({
+                elem: '#backTime',
+                event: 'focus',
+                type : 'date',
+                done: function(value){//日期时间被切换后的回调
+                    setContrast();
+                    }
+            });
+        });
+        function setContrast(){
+            //开始
+            var endDate = new Date($("#endTime").val().replace(/-/g, "/"));
+            var backDate = new Date($("#backTime").val().replace(/-/g, "/"));
+            var days = backDate.getTime() - endDate.getTime();
+            var time = parseInt(days / (1000 * 60 * 60 * 24));
+            //结束
+            if(endDate != null && endDate != undefined && endDate != ''){
+                if(time == 0){
+                    $("#contrast").val('正常');
+                }else if(time>0){
+                    $("#contrast").val('晚于结束日期'+time+'天');
+                }else if(time<0){
+                    $("#contrast").val('早于结束日期'+-time+'天');
+                }
+            }
+
+        }
+        function getNowFormatDate() {
+            var date = new Date();
+            var seperator1 = "-";
+            var seperator2 = ":";
+            var month = date.getMonth() + 1;
+            var strDate = date.getDate();
+            month = (month < 10)?"0"+month:month;
+            strDate = (strDate < 10)?"0"+strDate:strDate;
+            var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
+            return currentdate;
+        }
+        function insertTitle(tValue){
+            var list = "${leaveApply.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "114";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/leaveApply/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="leaveApply" action="${ctx}/leaveapply/leaveApply/backSave" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="endTime" value="${maxEndTime}"/>
+			<form:hidden path="basicInfo.id"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="basicInfo.name" htmlEscape="false" readonly="true"  class="form-control layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>请假编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="no" path="no" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+							<span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty leaveApply.status}">${fns:getDictLabel(leaveApply.status, 'leave_audit', '')}</c:when><c:otherwise>新增</c:otherwise></c:choose></label>
+                             </span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>工号:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.no" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>员工状态:</label>
+					<div class="layui-input-block">
+						<form:input  path="basicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>部门:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.office.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>职级:</label>
+					<div class="layui-input-block">
+						<form:input  readonly="true" path="basicInfo.jobGrade.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>申请日期:</label>
+					<div class="layui-input-block">
+						<input id="applyTime" name="applyTime" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${leaveApply.applyTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<c:choose>
+					<c:when test="${leaveApply.status == 6 or leaveApply.status ==7 or leaveApply.status == 9 or leaveApply.status == 8}">
+					<div class="layui-item layui-col-sm6" >
+					<label class="layui-form-label"><span class="require-item">*</span>销假日期:</label>
+					<div class="layui-input-block">
+						<input id="backTime" name="backTime" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon  query-group"
+							   value="<fmt:formatDate value="${leaveApply.backTime}" pattern="yyyy-MM-dd"/>"/>
+						<span class="group-sep">-</span>
+						<form:select path="backStartType" class="form-control  simple-select query-group">
+							<form:options items="${fns:getDictList('date_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+					<div class="layui-item layui-col-sm6 status">
+						<label class="layui-form-label"><span class="require-item">*</span>销假对比:</label>
+						<div class="layui-input-block">
+							<form:input id="contrast" readonly="true" path="contrast" htmlEscape="false" class="form-control layui-input"/>
+						</div>
+					</div>
+
+				</c:when>
+					<c:otherwise>
+
+					</c:otherwise>
+				</c:choose>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">请假原因:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" htmlEscape="false" rows="3"  readonly="true"   maxlength="127" class="form-control "/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>假期详情</h2></div>
+				<%--<div class="layui-item nav-btns ">
+					<sys:treeselectlea id="exampleInfo" name="" value="" labelName="" labelValue="" title="假期类型" url="/leaveapply/leaveApply/treeDataTypeInfo"  cssClass="form-control required "
+									   allowClear="true" notAllowSelectParent="true"/>
+				</div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="150px">假期名称</th>
+							<th width="150px">计假模式</th>
+							<th width="150px" colspan="2" >开始时间</th>
+							<th width="150px" colspan="2">结束时间</th>
+							<th width="100px">请假天数</th>
+						</tr>
+						</thead>
+						<tbody id="leaveDetailList">
+						<c:if test="${not empty leaveApply.leaveDetailList}">
+							<c:forEach items="${leaveApply.leaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="leaveDetailList${index.index}">
+									<td class="hide">
+										<input id="leaveDetailList${index.index}_id" name="leaveDetailList[${index.index}].id" type="hidden" value="${leaveDetail.id}"/>
+										<input id="leaveDetailList${index.index}_leaveType" name="leaveDetailList[${index.index}].leaveType.id" type="hidden" value="${leaveDetail.leaveType.id}"/>
+										<input id="leaveDetailList${index.index}_delFlag" name="leaveDetailList[${index.index}].delFlag" type="hidden" value="0"/>
+										<input id="leaveDetailList${index.index}_flag" name="leaveDetailList[${index.index}].flag" type="hidden" value="${leaveDetail.flat}"/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.leaveType.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_2"  readonly="true"   type="text" value="${fns:getDictLabel(leaveDetail.leaveType.model, 'fake_model', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input idx="${index.index}" style="width: 150px" readonly="true"  id="leaveDetailList${index.index}_3" name="leaveDetailList[${index.index}].startTime"  type="text" maxlength="20" class=" required form-control layui-input "
+											   value="<fmt:formatDate value="${leaveDetail.startTime}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_4" style="width: 150px" readonly="true" name="leaveDetailList[${index.index}].startType"  type="text" value="${fns:getDictLabel(leaveDetail.startType, 'date_type', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input idx="${index.index}" style="width: 150px" readonly="true"  id="leaveDetailList${index.index}_5" name="leaveDetailList[${index.index}].endTime"type="text" maxlength="20" class=" required form-control  layui-input  "
+											   value="<fmt:formatDate value="${leaveDetail.endTime}" pattern="yyyy-MM-dd"/>"/>
+										</input>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_6" style="width: 150px" readonly="true" name="leaveDetailList[${index.index}].endType"  type="text" value="${fns:getDictLabel(leaveDetail.endType, 'date_type', '')}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="leaveDetailList${index.index}_7" onchange="getMoney(this.value)" name="leaveDetailList[${index.index}].days" type="text" value="${leaveDetail.days}" readonly="true"  class="form-control number required"/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+					<table id="contentMoneys" class="table table-bordered table-condensed can-edit summary">
+						<tr>
+							<td  style="vertical-align:middle;width:300px;text-align: center;"><label><font color="red">*</font>请假时长:</label></td>
+							<td >
+								<input htmlEscape="false" id="longTime" name="longTime" value="${leaveApply.longTime}" readonly="true" class="form-control layui-input" />
+							</td>
+						</tr>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>历史详情</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="hisContentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="200px">假期名称</th>
+							<th width="200px">累计天数</th>
+							<th width="200px">累计次数</th>
+							<th width="200px">上限天数</th>
+						</tr>
+						</thead>
+						<tbody id="hisLeaveDetailList">
+						<c:if test="${not empty leaveApply.hisLeaveDetailList}">
+							<c:forEach items="${leaveApply.hisLeaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="hisLeaveDetailList${index.index}">
+									<td>
+										<input id="hisLeaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_2"  readonly="true"   type="text" value="${leaveDetail.sumDays}"   class="form-control "/>
+									</td>
+									<td>
+									    <input id="hisLeaveDetailList${index.index}_3"   readonly="true" type="text" value="${leaveDetail.counts}"   class="form-control require"/>
+								    </td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_4"   readonly="true" type="text" value="${leaveDetail.days}"   class="form-control require"/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<c:choose>
+				<c:when test="${leaveApply.status == 6 or leaveApply.status ==7 or leaveApply.status == 9 or leaveApply.status == 8}">
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				</c:when>
+				</c:choose>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${leaveApply.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 75 - 0
src/main/webapp/webpage/modules/leaveapply/leaveDetailForm.jsp

@@ -0,0 +1,75 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假申请管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			
+		});
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="leaveDetail" action="${ctx}/leaveapply/leaveDetail/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>	
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+					<td class="width-35">
+						<form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">请假id:</label></td>
+					<td class="width-35">
+						<form:input path="leaveId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">请假天数:</label></td>
+					<td class="width-35">
+						<form:input path="days" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">1请假2续假:</label></td>
+					<td class="width-35">
+						<form:input path="flat" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">请假类型:</label></td>
+					<td class="width-35">
+						<form:input path="leaveTypeId" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"></td>
+		   			<td class="width-35" ></td>
+		  		</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 140 - 0
src/main/webapp/webpage/modules/leaveapply/leaveDetailList.jsp

@@ -0,0 +1,140 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假申请管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>请假申请列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="#">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="#">选项1</a>
+				</li>
+				<li><a href="#">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="leaveDetail" action="${ctx}/leaveapply/leaveDetail/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+			<span>请假id:</span>
+				<form:input path="leaveId" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+		 </div>	
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+			<shiro:hasPermission name="leaveapply:leaveDetail:add">
+				<table:addRow url="${ctx}/leaveapply/leaveDetail/form" title="请假申请"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="leaveapply:leaveDetail:edit">
+			    <table:editRow url="${ctx}/leaveapply/leaveDetail/form" title="请假申请" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="leaveapply:leaveDetail:del">
+				<table:delRow url="${ctx}/leaveapply/leaveDetail/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="leaveapply:leaveDetail:import">
+				<table:importExcel url="${ctx}/leaveapply/leaveDetail/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="leaveapply:leaveDetail:export">
+	       		<table:exportExcel url="${ctx}/leaveapply/leaveDetail/export"></table:exportExcel><!-- 导出按钮 -->
+	       	</shiro:hasPermission>
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		
+			</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th> <input type="checkbox" class="i-checks"></th>
+				<th  class="sort-column remarks">备注信息</th>
+				<th  class="sort-column leaveId">请假id</th>
+				<th  class="sort-column days">请假天数</th>
+				<th  class="sort-column flat">1请假2续假</th>
+				<th  class="sort-column leaveTypeId">请假类型</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="leaveDetail">
+			<tr>
+				<td> <input type="checkbox" id="${leaveDetail.id}" class="i-checks"></td>
+				<td><a  href="#" onclick="openDialogView('查看请假申请', '${ctx}/leaveapply/leaveDetail/form?id=${leaveDetail.id}','800px', '500px')">
+					${leaveDetail.remarks}
+				</a></td>
+				<td>
+					${leaveDetail.leaveId}
+				</td>
+				<td>
+					${leaveDetail.days}
+				</td>
+				<td>
+					${leaveDetail.flat}
+				</td>
+				<td>
+					${leaveDetail.leaveTypeId}
+				</td>
+				<td>
+					<shiro:hasPermission name="leaveapply:leaveDetail:view">
+						<a href="#" onclick="openDialogView('查看请假申请', '${ctx}/leaveapply/leaveDetail/form?id=${leaveDetail.id}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="leaveapply:leaveDetail:edit">
+    					<a href="#" onclick="openDialog('修改请假申请', '${ctx}/leaveapply/leaveDetail/form?id=${leaveDetail.id}','800px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+    				<shiro:hasPermission name="leaveapply:leaveDetail:del">
+						<a href="${ctx}/leaveapply/leaveDetail/delete?id=${leaveDetail.id}" onclick="return confirmx('确认要删除该请假申请吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+					</shiro:hasPermission>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 188 - 0
src/main/webapp/webpage/modules/leaveapply/leaveMangeList.jsp

@@ -0,0 +1,188 @@
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		.widthClass{
+			display: inline-block;
+		}
+		.shows .input-group{
+			width: 48%!important;
+		}
+	</style>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="page" action="${ctx}/leaveapply/leaveManage" method="post" class="form-inline">
+					<%--以下三行照抄--%>
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="commonQuery">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">姓名:</label>
+							<div class="layui-input-block">
+								<input  name="basicInfo.name" type="text"  maxlength="64" class=" form-control  layui-input laydate-icon"  />
+								</input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">部门:</label>
+							<div class="layui-input-block with-icon">
+								<sys:treeselect id="id" name="basicInfo.office.id" value="${leaveApply.basicInfo.office.id}" labelName="basicInfo.office.name" labelValue="${leaveApply.basicInfo.office.name}"
+												title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+
+				</form:form>
+			</div>
+		</div>
+
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {field:'name',align:'center',sort: true, minWidth:120,title: '姓名', templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看请假', '${ctx}/leaveapply/leaveManage/view?basicInfoId=" + d.basicInfoId + "&sumDays="+d.sumDays+"','95%','95%')\">" +
+                            "<span title=" + d.name + ">" + d.name + "</span></a>";
+                        return xml;
+                    }},
+                {field:'number',align:'center',width:150, title: '工号',templet:function(d){
+                        return "<span title='"+ d.number +"'>" + d.number + "</span>";
+                    }}
+                ,{field:'office',align:'center',width:150, title: '部门',templet:function(d){
+                        return "<span title='"+ d.office +"'>" + d.office + "</span>";
+                    }}
+                ,{field:'job',align:'center',width:150, title: '职级',templet:function(d){
+                        return "<span title='"+ d.job +"'>" + d.job + "</span>";
+                    }}
+                ,{field:'sumDays',align:'center',width:150, title: '累计天数',templet:function(d){
+                        return "<span title='"+ d.sumDays +"'>" + d.sumDays + "</span>";
+                    }}
+                ,{field:'state',align:'center',width:100, title: '重置状态',templet:function(d){
+                        return "<span title='"+ d.state +"'>" + d.state + "</span>";
+                    }}
+                ,{align:'caozuo',align:'center',title:"操作",width:160,templet:function(d){
+                        var xml = "";
+                        if(d.canedit != undefined && d.canedit == "1"){
+                        xml +="<a href=\"${ctx}/leaveapply/leaveManage/reset?basicInfoId=" + d.basicInfoId+"\" onclick=\"return confirmx('确认要重置该人员请假吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 重置</a>";
+                        }
+                        return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="leaveApply" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${leaveApply.id}"
+                    ,"basicInfoId":"${leaveApply.basicInfo.id}"
+                    ,"name":"${leaveApply.basicInfo.name}"
+                    ,"number":"${leaveApply.basicInfo.no}"
+                    ,"office":"${leaveApply.basicInfo.office.name}"
+                    ,"job":"${leaveApply.basicInfo.jobGrade.name}"
+                    ,"sumDays":"${leaveApply.sumDays}"
+                    <shiro:hasPermission name="leaveapply:leaveMange:reset">
+                    ,"canedit":<c:if test="${leaveApply.state eq '0'}">"1"</c:if> <c:if test="${leaveApply.state eq '1'}">"0"</c:if>
+                    </shiro:hasPermission>
+                    ,"state":<c:if test="${leaveApply.state eq '0'}">"未重置"</c:if> <c:if test="${leaveApply.state eq '1'}">"已重置"</c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+
+    function reset(id){
+
+	}
+</script>
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#cus_name").show();
+        $("#cus_name").siblings().hide();
+        //搜索框收放
+        $('#moresee').click(function(){
+            if($('#moresees').is(':visible'))
+            {
+                $('#moresees').slideUp(0,resizeListWindow1);
+                $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+            }else{
+                $('#moresees').slideDown(0,resizeListWindow1);
+                $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+            }
+        });
+
+        laydate.render({
+            elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            format: 'yyyy-MM-dd',
+            type : 'date'
+        });
+
+        laydate.render({
+            elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            format: 'yyyy-MM-dd',
+            type : 'date'
+        });
+
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+</script>
+</body>
+</html>

+ 129 - 0
src/main/webapp/webpage/modules/leaveapply/leaveMangeView.jsp

@@ -0,0 +1,129 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>请假管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        var validateForm;
+        var count = 0;
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="leaveApply" action="${ctx}/leaveapply/leaveApply/backSave" method="post" class="form-horizontal" >
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="basicInfo.name" htmlEscape="false" readonly="true"  class="form-control layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>工号:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.no" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>部门:</label>
+					<div class="layui-input-block">
+						<form:input readonly="true" path="basicInfo.office.topCompany" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>职级:</label>
+					<div class="layui-input-block">
+						<form:input  readonly="true" path="basicInfo.jobGrade.name" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>累计天数:</label>
+					<div class="layui-input-block">
+						<form:input  readonly="true" path="sumDays" htmlEscape="false" class="form-control layui-input"/>
+					</div>
+				</div>
+			<%--	<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>重置状态:</label>
+					<div class="layui-input-block">
+						<form:input  path="basicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input" value="未重置"/>
+					</div>
+				</div>--%>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>请假详情</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="hisContentTable" class="table table-bordered table-condensed can-edit no-bottom-margin">
+						<thead>
+						<tr>
+							<th width="200px">假期名称</th>
+							<th width="200px">累计天数</th>
+							<th width="200px">累计次数</th>
+							<th width="200px">上限天数</th>
+						</tr>
+						</thead>
+						<tbody id="hisLeaveDetailList">
+						<c:if test="${not empty leaveApply.hisLeaveDetailList}">
+							<c:forEach items="${leaveApply.hisLeaveDetailList}" var="leaveDetail" varStatus="index">
+								<tr id="hisLeaveDetailList${index.index}">
+									<td>
+										<input id="hisLeaveDetailList${index.index}_1"  readonly="true"   type="text" value="${leaveDetail.name}"   class="form-control "/>
+									</td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_2"  readonly="true"   type="text" value="${leaveDetail.sumDays}"   class="form-control "/>
+									</td>
+									<td>
+									    <input id="hisLeaveDetailList${index.index}_3"   readonly="true" type="text" value="${leaveDetail.counts}"   class="form-control require"/>
+								    </td>
+									<td>
+										<input id="hisLeaveDetailList${index.index}_4"   readonly="true" type="text" value="${leaveDetail.days}"   class="form-control require"/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 191 - 0
src/main/webapp/webpage/modules/leavetype/leaveTypeForm.jsp

@@ -0,0 +1,191 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>物品目录</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		label.error{
+			top:40px;
+			left:0;
+		}
+		#setDays-error{
+			top:80px;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+        $(document).ready(function() {
+
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+
+        function isNumber(val){
+            if(val === "" || val ==null){
+                return false;
+            }
+            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
+            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+            if(regPos.test(val) || regNeg.test(val)){
+                return true;
+            }else{
+                return false;
+            }
+
+        }
+
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="leaveType" action="${ctx}/leavetype/leaveType/save" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>假期名称:</label>
+					<div class="layui-input-block">
+						<form:input path="name" htmlEscape="false"   id="name"  class="form-control required layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>假期编号:</label>
+					<div class="layui-input-block">
+						<form:input path="no" htmlEscape="false"   id="no"  class="form-control number required layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">父节点:</label>
+					<div class="layui-input-block with-icon">
+						<sys:treeLeave id="parentId" name="parentId" value="${leaveType.parentId}" labelName="parentName" labelValue="${leaveType.parentName}"
+										   title="字典明细" url="/leavetype/leaveType/treeData?typeId=1" isAll="true"  cssClass="form-control layui-input" notAllowSelectParent="false"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>状态:</label>
+					<div class="layui-input-block">
+						<form:input path="state" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.state, 'is_disable', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>计假模式:</label>
+					<div class="layui-input-block">
+						<form:select path="model" class="form-control required  simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('fake_model')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>计假单位:</label>
+					<div class="layui-input-block">
+						<form:select path="unit" class="form-control required  simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('false_unit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>累计方式:</label>
+					<div class="layui-input-block">
+						<form:select path="method" class="form-control required  simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('cumulative_way')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>清零阀值:</label>
+					<div class="layui-input-block">
+						<form:input path="zero" htmlEscape="false"   id="zero"  class="form-control number required layui-input" value="0"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>假期上限天数:</label>
+					<div class="layui-input-block">
+						<form:select path="maxDays" class="form-control required  simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('max_days')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>是否计算出勤:</label>
+					<div class="layui-input-block">
+						<form:select path="isAttendance" class="form-control required  simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>是否计算补助:</label>
+					<div class="layui-input-block">
+						<form:select path="isSubsidized" class="form-control required  simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>是否结转下年:</label>
+					<div class="layui-input-block">
+						<form:select path="isNext" class="form-control required  simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label"><span class="require-item">*</span>设置天数:</label>
+					<div class="layui-input-block">
+						<form:textarea path="setDays" htmlEscape="false" rows="4"    maxlength="255" class="form-control required"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 160 - 0
src/main/webapp/webpage/modules/leavetype/leaveTypeFormView.jsp

@@ -0,0 +1,160 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>物品目录</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        var validateForm;
+        $(document).ready(function() {
+
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+
+        function isNumber(val){
+            if(val === "" || val ==null){
+                return false;
+            }
+            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
+            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+            if(regPos.test(val) || regNeg.test(val)){
+                return true;
+            }else{
+                return false;
+            }
+
+        }
+
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="leaveType" action="${ctx}/leavetype/leaveType/save" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>假期名称:</label>
+					<div class="layui-input-block">
+						<form:input path="name" htmlEscape="false" readonly="true"  id="name"  class="form-control required layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>假期编号:</label>
+					<div class="layui-input-block">
+						<form:input path="no" htmlEscape="false" readonly="true"  id="no"  class="form-control number required layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">父节点:</label>
+					<div class="layui-input-block with-icon">
+						<form:input path="parentName" htmlEscape="false" readonly="true"  id="no"  class="form-control number required layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>状态:</label>
+					<div class="layui-input-block">
+						<form:input path="state" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.state, 'is_disable', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>计假模式:</label>
+					<div class="layui-input-block">
+						<form:input path="model" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.model, 'fake_model', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>计假单位:</label>
+					<div class="layui-input-block">
+						<form:input path="unit" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.unit, 'false_unit', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>累计方式:</label>
+					<div class="layui-input-block">
+						<form:input path="method" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.method, 'cumulative_way', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>清零阀值:</label>
+					<div class="layui-input-block">
+						<form:input path="zero" readonly="true"  htmlEscape="false"   id="zero"  class="form-control number required layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>假期上限天数:</label>
+					<div class="layui-input-block">
+						<form:input path="maxDays" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.maxDays, 'max_days', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>是否计算出勤:</label>
+					<div class="layui-input-block">
+						<form:input path="isAttendance" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.isAttendance, 'yes_no', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>是否计算补助:</label>
+					<div class="layui-input-block">
+						<form:input path="isSubsidized" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.isSubsidized, 'yes_no', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>是否结转下年:</label>
+					<div class="layui-input-block">
+						<form:input path="isNext" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.isNext, 'yes_no', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label"><span class="require-item">*</span>设置天数:</label>
+					<div class="layui-input-block">
+						<form:textarea path="setDays" readonly="true"  htmlEscape="false" rows="4"    maxlength="255" class="form-control required"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 225 - 0
src/main/webapp/webpage/modules/leavetype/leaveTypeList.jsp

@@ -0,0 +1,225 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>假期类型字典管理</title>
+	<meta name="decorator" content="default"/>
+	<%@include file="/webpage/include/treetable.jsp" %>
+	<script type="text/javascript">
+        $(document).ready(function() {
+            $("#treeTable").treeTable({expandLevel : 2},{ expandable: true });
+        });
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body >
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="leaveType" action="${ctx}/leavetype/leaveType/" method="post" class="form-inline">
+					<div class="commonQuery">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">假期名称:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="name" htmlEscape="false" class=" form-control layui-input"></form:input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">假期编号:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="no" htmlEscape="false" class=" form-control layui-input number"></form:input>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<button id="searchReset" style="margin-right: 10px;" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<shiro:hasPermission name="leavetype:leaveType:add">
+						<a href="javascript:void(0)" onclick="openDialogAdd('新增请假类型', '${ctx}/leavetype/leaveType/form?tabId=1','95%','95%')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i>&nbsp;添加</a>
+					</shiro:hasPermission>
+					<button class="nav-btn nav-btn-import" onclick="openDialogSys('系统默认类型', '${ctx}/leavetype/leaveType/sysList','95%','95%')"  ><i class="glyphicon glyphicon-v"></i>&nbsp;同步系统预制</button>
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+					<div style="clear: both;"></div>
+				</div>
+				<!-- 表格 -->
+				<table id="treeTable" class="table table-bordered table-hover list-table">
+					<thead>
+					<tr>
+						<th width="15%">假期编号</th>
+						<th  width="15%">假期名称</th>
+						<th  width="10%">计假模式</th>
+						<th  >计假单位</th>
+						<th  >累计方式</th>
+						<th  >是否计算出勤</th>
+						<th  >是否计算补助</th>
+						<th  width="6%">状态</th>
+						<th width="150px">操作</th>
+					</tr>
+					</thead>
+					<c:choose>
+						<c:when test="${not empty list}">
+							<c:forEach items="${list}" var="leaveType">
+								<tr id="${leaveType.id}" pid="${leaveType.parentId}">
+									<td><a  href="#" onclick="openDialogView('查看指标项目', '${ctx}/leavetype/leaveType/form?id=${leaveType.id}&view=view','95%', '95%')">
+											${leaveType.no}
+									</a></td>
+									<td style="text-align: center">
+											${leaveType.name}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.model, 'fake_model', '')}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.unit, 'false_unit', '')}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.method, 'cumulative_way', '')}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.isAttendance, 'yes_no', '')}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.isSubsidized, 'yes_no', '')}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.state, 'is_disable', '')}
+									</td>
+									<td class="op-td text-center">
+										<div class="op-btn-box">
+											<a href="javascript:void(0);" onclick="openDialog('修改', '${ctx}/leavetype/leaveType/form?id=${leaveType.id}&view=edit','95%','95%')" class="op-btn op-btn-edit"><i class="fa fa-edit"></i> 修改</a>
+											<c:choose>
+												<c:when test="${leaveType.state eq 1}">
+													<a href="${ctx}/leavetype/leaveType/updateDelFlag?id=${leaveType.id}&flat=0" onclick="return confirmx('确认要启用该请假类型吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 启用</a>
+												</c:when>
+												<c:otherwise>
+													<a href="${ctx}/leavetype/leaveType/updateDelFlag?id=${leaveType.id}&flat=1" onclick="return confirmx('确认要禁用该请假类型吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 禁用</a>
+												</c:otherwise>
+											</c:choose>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:when>
+						<c:otherwise>
+							<tr>
+								<td colspan="9" align="center">暂无数据</td>
+							</tr>
+						</c:otherwise>
+					</c:choose>
+
+					</tbody>
+				</table>
+
+				<!-- 分页代码 -->
+				<%--<table:page page="${page}"></table:page>--%>
+
+			</div>
+		</div>
+	</div>
+</div>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+    //打开对话框(添加修改)
+    function openDialogAdd(title,url,width,height,target){
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            maxmin: true, //开启最大化最小化按钮
+            content: url ,
+            skin: 'two-btns',
+            btn: ['提交', '关闭'],
+            yes: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                if(iframeWin.contentWindow.doSubmit() ){
+                    // top.layer.close(index);//关闭对话框。
+                    setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+
+            },
+            cancel: function(index){
+            }
+        });
+
+    }
+    function openDialogSys(title,url,width,height,target){
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: 'two-btns',
+            maxmin: true, //开启最大化最小化按钮
+            content: url ,
+            btn: ['同步系统预制','关闭'],
+            yes: function(index, layero){
+             $.ajax({
+                type:'post',
+                url:'${ctx}/leavetype/leaveType/syncDict',
+					success:function(data){
+                        if(data.flag){
+                            parent.layer.msg("同步成功",{icon:1});
+                        }else{
+                            parent.layer.msg("同步失败或者已经同步",{icon:1});
+                        }
+            }
+        })
+                setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                sortOrRefresh();
+              // window.location.href='${ctx}/leavetype/leaveType/syncDict';
+
+            }
+
+        });
+    }
+</script>
+</body>
+</html>

+ 165 - 0
src/main/webapp/webpage/modules/leavetype/leaveTypeSysList.jsp

@@ -0,0 +1,165 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>假期类型字典管理</title>
+	<meta name="decorator" content="default"/>
+	<%@include file="/webpage/include/treetable.jsp" %>
+	<script type="text/javascript">
+        $(document).ready(function() {
+            $("#treeTable").treeTable({expandLevel : 2},{ expandable: true });
+        });
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body >
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="leaveType" action="${ctx}/leavetype/leaveType/sysList" method="post" class="form-inline">
+					<div class="commonQuery">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">假期名称:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="name" htmlEscape="false" class=" form-control layui-input"></form:input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">假期编号:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="no" htmlEscape="false" class=" form-control layui-input number"></form:input>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<button id="searchReset" style="margin-right: 10px;" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<!-- 表格 -->
+				<table id="treeTable" class="table table-bordered table-hover list-table">
+					<thead>
+					<tr>
+						<th width="15%">假期编号</th>
+						<th  width="15%">假期名称</th>
+						<th  width="10%">计假模式</th>
+						<th  >计假单位</th>
+						<th  >累计方式</th>
+						<th  >是否计算出勤</th>
+						<th  >是否计算补助</th>
+						<th  width="6%">状态</th>
+					</tr>
+					</thead>
+					<c:choose>
+						<c:when test="${not empty list}">
+							<c:forEach items="${list}" var="leaveType">
+								<tr id="${leaveType.id}" pid="${leaveType.parentId}">
+									<td><a  href="#" onclick="openDialogView('查看指标项目', '${ctx}/leavetype/leaveType/form?id=${leaveType.id}&view=view','95%', '95%')">
+											${leaveType.no}
+									</a></td>
+									<td style="text-align: center">
+											${leaveType.name}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.model, 'fake_model', '')}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.unit, 'false_unit', '')}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.method, 'cumulative_way', '')}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.isAttendance, 'yes_no', '')}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.isSubsidized, 'yes_no', '')}
+									</td>
+									<td style="text-align: center">
+											${fns:getDictLabel(leaveType.state, 'is_disable', '')}
+									</td>
+
+								</tr>
+							</c:forEach>
+						</c:when>
+						<c:otherwise>
+							<tr>
+								<td colspan="9" align="center">暂无数据</td>
+							</tr>
+						</c:otherwise>
+					</c:choose>
+
+					</tbody>
+				</table>
+
+				<!-- 分页代码 -->
+				<%--<table:page page="${page}"></table:page>--%>
+
+			</div>
+		</div>
+	</div>
+</div>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+
+    function openDialogSys(title,url,width,height,target){
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: 'two-btns',
+            maxmin: true, //开启最大化最小化按钮
+            content: url ,
+            btn: ['同步系统预制','关闭'],
+            yes: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                if(iframeWin.contentWindow.doSubmit() ){
+                    top.layer.close(index);//关闭对话框。
+                    //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+
+            }
+
+        });
+    }
+</script>
+</body>
+</html>

+ 160 - 0
src/main/webapp/webpage/modules/leavetype/leaveTypeView.jsp

@@ -0,0 +1,160 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>物品目录</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        var validateForm;
+        $(document).ready(function() {
+
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+
+        function isNumber(val){
+            if(val === "" || val ==null){
+                return false;
+            }
+            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
+            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+            if(regPos.test(val) || regNeg.test(val)){
+                return true;
+            }else{
+                return false;
+            }
+
+        }
+
+	</script>
+	<style>
+		/*超过5个汉字,调整label的长度,以下是配套的*/
+		.layui-item .layui-form-label{
+			width:90px;
+		}
+		.form-group .layui-item .layui-input-block,
+		.query .layui-input-block {
+			margin-left: 116px;
+		}
+	</style>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="leaveType" action="${ctx}/leavetype/leaveType/save" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>假期名称:</label>
+					<div class="layui-input-block">
+						<form:input path="name" htmlEscape="false" readonly="true"  id="name"  class="form-control required layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>假期编号:</label>
+					<div class="layui-input-block">
+						<form:input path="no" htmlEscape="false" readonly="true"  id="no"  class="form-control number required layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">父节点:</label>
+					<div class="layui-input-block with-icon">
+						<form:input path="parentName" htmlEscape="false" readonly="true"  id="no"  class="form-control number required layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>状态:</label>
+					<div class="layui-input-block">
+						<form:input path="state" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.state, 'is_disable', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>计假模式:</label>
+					<div class="layui-input-block">
+						<form:input path="model" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.model, 'fake_model', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>计假单位:</label>
+					<div class="layui-input-block">
+						<form:input path="unit" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.unit, 'false_unit', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>累计方式:</label>
+					<div class="layui-input-block">
+						<form:input path="method" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.method, 'cumulative_way', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>清零阀值:</label>
+					<div class="layui-input-block">
+						<form:input path="zero" readonly="true"  htmlEscape="false"   id="zero"  class="form-control number required layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>假期上限天数:</label>
+					<div class="layui-input-block">
+						<form:input path="maxDays" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.maxDays, 'max_days', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>是否计算出勤:</label>
+					<div class="layui-input-block">
+						<form:input path="isAttendance" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.isAttendance, 'yes_no', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>是否计算补助:</label>
+					<div class="layui-input-block">
+						<form:input path="isSubsidized" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.isSubsidized, 'yes_no', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>是否结转下年:</label>
+					<div class="layui-input-block">
+						<form:input path="isNext" htmlEscape="false" readonly="true"   class="form-control layui-input" value="${fns:getDictLabel(leaveType.isNext, 'yes_no', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label"><span class="require-item">*</span>设置天数:</label>
+					<div class="layui-input-block">
+						<form:textarea path="setDays" readonly="true"  htmlEscape="false" rows="4"    maxlength="255" class="form-control required"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 47 - 0
src/main/webapp/webpage/modules/modules/moduleChooseForm.jsp

@@ -0,0 +1,47 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>模块管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			
+		});
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="moduleChoose" action="${ctx}/modules/moduleChoose/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>	
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 126 - 0
src/main/webapp/webpage/modules/modules/moduleChooseList.jsp

@@ -0,0 +1,126 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>模块管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>模块列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="moduleChoose" action="${ctx}/modules/moduleChoose/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<div class="form-group">
+		 </div>	
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+			<shiro:hasPermission name="modules:moduleChoose:add">
+				<table:addRow url="${ctx}/modules/moduleChoose/form" title="模块"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="modules:moduleChoose:edit">
+			    <table:editRow url="${ctx}/modules/moduleChoose/form" title="模块" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="modules:moduleChoose:del">
+				<table:delRow url="${ctx}/modules/moduleChoose/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="modules:moduleChoose:import">
+				<table:importExcel url="${ctx}/modules/moduleChoose/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="modules:moduleChoose:export">
+	       		<table:exportExcel url="${ctx}/modules/moduleChoose/export"></table:exportExcel><!-- 导出按钮 -->
+	       	</shiro:hasPermission>
+	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+		
+			</div>
+		<div class="pull-right">
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+			<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+		</div>
+	</div>
+	</div>
+	
+	<!-- 表格 -->
+	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<th> <input type="checkbox" class="i-checks"></th>
+				<th  class="sort-column updateDate">更新时间</th>
+				<th  class="sort-column remarks">备注信息</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="moduleChoose">
+			<tr>
+				<td> <input type="checkbox" id="${moduleChoose.id}" class="i-checks"></td>
+				<td><a  href="javascript:void(0)" onclick="openDialogView('查看模块', '${ctx}/modules/moduleChoose/form?id=${moduleChoose.id}','80%','80%')">
+					<fmt:formatDate value="${moduleChoose.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</a></td>
+				<td>
+					${moduleChoose.remarks}
+				</td>
+				<td>
+					<shiro:hasPermission name="modules:moduleChoose:view">
+						<a href="javascript:void(0)" onclick="openDialogView('查看模块', '${ctx}/modules/moduleChoose/form?id=${moduleChoose.id}','80%','80%')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="modules:moduleChoose:edit">
+    					<a href="javascript:void(0)" onclick="openDialog('修改模块', '${ctx}/modules/moduleChoose/form?id=${moduleChoose.id}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+    				<shiro:hasPermission name="modules:moduleChoose:del">
+						<a href="${ctx}/modules/moduleChoose/delete?id=${moduleChoose.id}" onclick="return confirmx('确认要删除该模块吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+					</shiro:hasPermission>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 159 - 0
src/main/webapp/webpage/modules/monitor/info.jsp

@@ -0,0 +1,159 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html lang="en"
+	class="app js no-touch no-android chrome no-firefox no-iemobile no-ie no-ie10 no-ie11 no-ios no-ios7 ipad">
+<head>
+<meta name="decorator" content="default"/>
+<script src="${ctxStatic}/echarts-2.2.7/build/dist/echarts-all.js"
+	type="text/javascript"></script>
+<script type="text/javascript"
+	src="${ctxStatic}/common/systemInfo.js"></script>
+	<script type="text/javascript">
+	function modifySer(key){
+		$.ajax({
+	        async: false,
+	        url: "${ctx}/monitor/modifySetting?"+key+"="+$("#"+key).val(),
+	        dataType: "json",
+	        success: function (data) {
+	    	    if(data.success){
+	    	    	alert("更新成功!");
+	    	    }else{
+	    	    	alert("更新失败!");
+	    	    }
+	        }
+		});
+	}
+	</script>
+</head>
+<body class="" style="">
+	<div class="wrapper wrapper-content">
+			<div class="row animated fadeInRight">
+				<div class="col-sm-12">
+					<div class="panel panel-primary">
+						<div class="panel-heading">
+							<i class="fa fa-rss-square"></i> 实时监控
+						</div>
+	
+						<div class="panel-body">
+							<table style="width: 100%;">
+								<tr>
+									<td width="33.3%"><div id="main_one" style="height: 240px;"></div></td>
+									<td width="33.3%"><div id="main_two" style="height: 240px;"></div></td>
+									<td width="33.3%"><div id="main_three"
+											style="height: 240px;"></div></td>
+								</tr>
+							</table>
+						</div>
+					</div>
+				</div>
+			</div>
+			<div class="row animated fadeInRight">
+				<div class="col-sm-12">
+				   <div class="panel panel-success">
+					<div class="panel-heading">
+						<i class="fa fa-briefcase"></i> 警告设置
+					</div>
+					<table class="table table-striped table-bordered table-hover"
+						width="100%" style="vertical-align: middle;">
+						<thead>
+							<tr style="background-color: #faebcc; text-align: center;">
+								<td width="100">名称</td>
+								<td width="100">参数</td>
+								<td width="205">预警设置</td>
+								<td width="375">邮箱设置</td>
+							</tr>
+						</thead>
+						<tbody id="tbody">
+							<tr>
+								<td style='padding-left: 10px; text-align: left;vertical-align: middle;'>CPU</td>
+								<td style='padding-left: 10px; text-align: left;vertical-align: middle;'>当前使用率:<span
+									id="td_cpuUsage" style="color: red;">50</span> %
+								</td>
+								<td align="center">
+									<table>
+										<tr>
+											<td>使用率超出</td>
+											<td><input class='inputclass' name='cpu' id='cpu'
+												type='text' value='${cpu}' /> %,</td>
+											<td>发送邮箱提示 <a class='btn btn-info'
+												href='javascript:void(0)' onclick='modifySer("cpu");'>
+													修改 </a></td>
+										</tr>
+									</table>
+								</td>
+								<td rowspan='3' align="center" style="vertical-align: middle;"><input
+									class='inputclass' style='width: 250px; height: 32px;'
+									name='toEmail' id='toEmail' type='text'
+									value='${toEmail}' /><a class='btn btn-info'
+									href='javascript:void(0)' onclick='modifySer("toEmail");'>
+										修改 </a></td>
+							</tr>
+							<tr>
+								<td style='padding-left: 10px; text-align: left;vertical-align: middle;'>服务器内存</td>
+								<td style='padding-left: 10px; text-align: left;vertical-align: middle;'>当前使用率:<span
+									id="td_serverUsage" style="color: blue;">50</span> %
+								</td>
+								<td align="center">
+									<table>
+										<tr>
+											<td>使用率超出</td>
+											<td><input class='inputclass' name='ram' id='ram'
+												type='text' value='${ram}' /> %,</td>
+											<td>发送邮箱提示 <a class='btn btn-info'
+												href='javascript:void(0)' onclick='modifySer("ram");'>
+													修改 </a></td>
+										</tr>
+									</table>
+
+								</td>
+							</tr>
+							<tr>
+								<td style='padding-left: 10px; text-align: left;vertical-align: middle;'>JVM内存</td>
+								<td style='padding-left: 10px; text-align: left;vertical-align: middle;'>当前使用率:<span
+									id="td_jvmUsage" style="color: green;">50</span> %
+								</td>
+								<td align="center">
+									<table>
+										<tr>
+											<td>使用率超出</td>
+											<td><input class='inputclass' name='jvm' id='jvm'
+												type='text' value='${jvm}' /> %,</td>
+											<td>发送邮箱提示 <a class='btn btn-info'
+												href='javascript:void(0)' onclick='modifySer("jvm");'>
+													修改 </a></td>
+										</tr>
+									</table>
+							</tr>
+						</tbody>
+					</table>
+				</div>
+				</div>
+			</div>
+			<div class="row animated fadeInRight">
+				<div class="col-sm-6">
+					<div class="panel panel-info">
+						<div class="panel-heading">
+							<i class="fa fa-th-list"></i> 服务器信息
+						</div>
+						<div class="panel-body" style="padding: 0px">
+							<div style="height: 370px;" class="embed-responsive embed-responsive-16by9">
+							  <iframe class="embed-responsive-item" src="${ctx}/monitor/systemInfo"></iframe>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="col-sm-6">
+				  <div class="panel panel-danger">
+					<div class="panel-heading">
+						<i class="fa fa-fire"></i> 实时监控
+					</div>
+
+					<div class="panel-body">
+						<div id="main" style="height: 370px;"></div>
+					</div>
+				 </div>
+				</div>
+			</div>
+	</div>
+</body>
+</html>

+ 2 - 0
src/main/webapp/webpage/modules/monitor/monitor.jsp

@@ -0,0 +1,2 @@
+<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
+<iframe id="ifm" src="${pageContext.request.contextPath}/monitor/info.shtml" width="100%" height="1300px" frameborder="no" border="0" marginwidth="0" marginheight="0" allowtransparency="yes"></iframe>

+ 55 - 0
src/main/webapp/webpage/modules/monitor/systemInfo.jsp

@@ -0,0 +1,55 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8"%>
+<table class="table table-striped table-bordered table-hover">
+	<tbody>
+		<tr>
+			<td class="left">ip地址</td>
+			<td id="hostIp" class="left">${systemInfo.hostIp}</td>
+		</tr>
+		<tr>
+			<td class="left">主机名</td>
+
+			<td class="left" id="hostName">${systemInfo.hostName}</td>
+		</tr>
+		<tr>
+			<td class="left">操作系统的名称</td>
+
+			<td class="left" id="osName">${systemInfo.osName}</td>
+		</tr>
+		<tr>
+			<td class="left">操作系统的构架</td>
+
+			<td class="left" id="arch">${systemInfo.arch}</td>
+		</tr>
+		<tr>
+			<td class="left">操作系统的版本</td>
+
+			<td class="left" id="osVersion">${systemInfo.osVersion}</td>
+		</tr>
+		<tr>
+			<td class="left">处理器个数</td>
+
+			<td class="left" id="processors">${systemInfo.processors}</td>
+		</tr>
+		<tr>
+			<td class="left">Java的运行环境版本</td>
+
+			<td class="left" id="javaVersion">${systemInfo.javaVersion}</td>
+		</tr>
+		<tr>
+			<td class="left">Java供应商的URL</td>
+
+			<td class="left" id="javaUrl">${systemInfo.javaUrl}</td>
+		</tr>
+		<tr>
+			<td class="left">Java的安装路径</td>
+
+			<td class="left" id="javaHome">${systemInfo.javaHome}</td>
+		</tr>
+		<tr>
+			<td class="left">临时文件路径</td>
+
+			<td class="left" id="tmpdir">${systemInfo.tmpdir}</td>
+		</tr>
+	</tbody>
+</table>