Enford 5 роки тому
батько
коміт
9869056024
84 змінених файлів з 22496 додано та 0 видалено
  1. 465 0
      src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsDetailForm.jsp
  2. 225 0
      src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsDetailView.jsp
  3. 96 0
      src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsImportView.jsp
  4. 260 0
      src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsRegisterCompany.jsp
  5. 221 0
      src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsRegisterForm.jsp
  6. 171 0
      src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsRegisterInfo.jsp
  7. 284 0
      src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsRegisterList.jsp
  8. 258 0
      src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsRegisterOffice.jsp
  9. 136 0
      src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseAudit.jsp
  10. 163 0
      src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseForm.jsp
  11. 136 0
      src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseInvalidAudit.jsp
  12. 325 0
      src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseInvalidList.jsp
  13. 126 0
      src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseInvalidModify.jsp
  14. 335 0
      src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseList.jsp
  15. 165 0
      src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseModify.jsp
  16. 15 0
      src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseTrack.jsp
  17. 112 0
      src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseView.jsp
  18. 286 0
      src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleAudit.jsp
  19. 365 0
      src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleCNAudit.jsp
  20. 322 0
      src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleForm.jsp
  21. 404 0
      src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleKPAudit.jsp
  22. 276 0
      src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleList.jsp
  23. 329 0
      src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleModifyApply.jsp
  24. 15 0
      src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleTask.jsp
  25. 226 0
      src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleView.jsp
  26. 439 0
      src/main/webapp/webpage/modules/workregularapply/workRegularApplyAudit.jsp
  27. 357 0
      src/main/webapp/webpage/modules/workregularapply/workRegularApplyForm.jsp
  28. 329 0
      src/main/webapp/webpage/modules/workregularapply/workRegularApplyList.jsp
  29. 303 0
      src/main/webapp/webpage/modules/workregularapply/workRegularApplyModifyApply.jsp
  30. 15 0
      src/main/webapp/webpage/modules/workregularapply/workRegularApplyTask.jsp
  31. 186 0
      src/main/webapp/webpage/modules/workregularapply/workRegularApplyView.jsp
  32. 108 0
      src/main/webapp/webpage/modules/workregularapply/workRegularContentForm.jsp
  33. 208 0
      src/main/webapp/webpage/modules/workregularapply/workRegularContentList.jsp
  34. 87 0
      src/main/webapp/webpage/modules/workregularapply/workRegularContentview.jsp
  35. 77 0
      src/main/webapp/webpage/modules/workregularapply/workRegularScoreForm.jsp
  36. 142 0
      src/main/webapp/webpage/modules/workregularapply/workRegularScoreList.jsp
  37. 152 0
      src/main/webapp/webpage/modules/workreimbur/workReimburAudit.jsp
  38. 296 0
      src/main/webapp/webpage/modules/workreimbur/workReimburForm.jsp
  39. 117 0
      src/main/webapp/webpage/modules/workreimbur/workReimburHistoricList.jsp
  40. 218 0
      src/main/webapp/webpage/modules/workreimbur/workReimburList.jsp
  41. 185 0
      src/main/webapp/webpage/modules/workreimbur/workReimburTodoList.jsp
  42. 142 0
      src/main/webapp/webpage/modules/workreimbursement/reimbursementHistoricList.jsp
  43. 225 0
      src/main/webapp/webpage/modules/workreimbursement/reimbursementTodoList.jsp
  44. 422 0
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementAudit.jsp
  45. 679 0
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementCWAudit.jsp
  46. 1000 0
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormAdd.jsp
  47. 492 0
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormDetail.jsp
  48. 385 0
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementList.jsp
  49. 1009 0
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementModifyApply.jsp
  50. 20 0
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementTrack.jsp
  51. 300 0
      src/main/webapp/webpage/modules/workreimbursementcount/workInvoiceCompany.jsp
  52. 210 0
      src/main/webapp/webpage/modules/workreimbursementcount/workInvoiceInfo.jsp
  53. 297 0
      src/main/webapp/webpage/modules/workreimbursementcount/workInvoiceOffice.jsp
  54. 290 0
      src/main/webapp/webpage/modules/workreimbursementcount/workReimbursementCompany.jsp
  55. 203 0
      src/main/webapp/webpage/modules/workreimbursementcount/workReimbursementInfo.jsp
  56. 306 0
      src/main/webapp/webpage/modules/workreimbursementcount/workReimbursementOffice.jsp
  57. 20 0
      src/main/webapp/webpage/modules/workrelationship/Track.jsp
  58. 460 0
      src/main/webapp/webpage/modules/workrelationship/workRelationshipAudit.jsp
  59. 451 0
      src/main/webapp/webpage/modules/workrelationship/workRelationshipAuditFirst.jsp
  60. 564 0
      src/main/webapp/webpage/modules/workrelationship/workRelationshipForm.jsp
  61. 369 0
      src/main/webapp/webpage/modules/workrelationship/workRelationshipList.jsp
  62. 543 0
      src/main/webapp/webpage/modules/workrelationship/workRelationshipModify.jsp
  63. 426 0
      src/main/webapp/webpage/modules/workrelationship/workRelationshipView.jsp
  64. 463 0
      src/main/webapp/webpage/modules/workrelationship/workRelationshipqyrAudit.jsp
  65. 549 0
      src/main/webapp/webpage/modules/workrelationship/workRelationshiprlzyAudit.jsp
  66. 168 0
      src/main/webapp/webpage/modules/workrepay/workRepayAudit.jsp
  67. 141 0
      src/main/webapp/webpage/modules/workrepay/workRepayForm.jsp
  68. 154 0
      src/main/webapp/webpage/modules/workrepay/workRepayList.jsp
  69. 151 0
      src/main/webapp/webpage/modules/workrepay/workRepayView.jsp
  70. 195 0
      src/main/webapp/webpage/modules/workresignation/workResignationAudit.jsp
  71. 244 0
      src/main/webapp/webpage/modules/workresignation/workResignationAudits.jsp
  72. 225 0
      src/main/webapp/webpage/modules/workresignation/workResignationForm.jsp
  73. 229 0
      src/main/webapp/webpage/modules/workresignation/workResignationForms.jsp
  74. 394 0
      src/main/webapp/webpage/modules/workresignation/workResignationList.jsp
  75. 394 0
      src/main/webapp/webpage/modules/workresignation/workResignationLists.jsp
  76. 225 0
      src/main/webapp/webpage/modules/workresignation/workResignationModify.jsp
  77. 224 0
      src/main/webapp/webpage/modules/workresignation/workResignationModifys.jsp
  78. 218 0
      src/main/webapp/webpage/modules/workresignation/workResignationView.jsp
  79. 255 0
      src/main/webapp/webpage/modules/workresignation/workResignationrlzyAudit.jsp
  80. 77 0
      src/main/webapp/webpage/modules/workresignationtemplate/workResignationTemplateForm.jsp
  81. 142 0
      src/main/webapp/webpage/modules/workresignationtemplate/workResignationTemplateList.jsp
  82. 102 0
      src/main/webapp/webpage/modules/workreview/workReviewStandardForm.jsp
  83. 122 0
      src/main/webapp/webpage/modules/workreview/workReviewStandardList.jsp
  84. 76 0
      src/main/webapp/webpage/modules/workreview/workReviewStandardView.jsp

+ 465 - 0
src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsDetailForm.jsp

@@ -0,0 +1,465 @@
+<%@ 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">
+		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 formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+	</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="workReceiptsRegister" action="${ctx}/workreceiptsregister/workReceiptsRegister/saveDetail" 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">
+						<input id="arrivalDate" name="arrivalDate" type="text" readonly="true" maxlength="20" class="form-control required layui-input"
+							   value="<fmt:formatDate value="${workReceiptsRegister.arrivalDate}" pattern="yyyy-MM-dd"/>"  readonly="true"/>
+					</div>
+				</div>
+                <div class="layui-item layui-col-sm6 td1">
+                    <label class="layui-form-label"><span class="require-item">*</span>到账金额:</label>
+                    <div class="layui-input-block">
+                        <input id="arrivalAmt" htmlEscape="false"  readonly="true" value="<fmt:formatNumber value="${workReceiptsRegister.arrivalAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);" class="form-control required number layui-input"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label"><span class="require-item">*</span>对方户名:</label>
+					<div class="layui-input-block">
+						<form:input path="clientAccname" htmlEscape="false" readonly="true"  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="clientAccno" htmlEscape="false" readonly="true" class="form-control required layui-input"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label">登记金额:</label>
+					<div class="layui-input-block">
+						<input id="registerAmt" name="registerAmt" htmlEscape="false"  readonly="true" value="<fmt:formatNumber pattern="#,##0.00#" value="${workReceiptsRegister.registerAmt}"/>" onchange="formatNum(this);" class="form-control number layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label">收入状态:</label>
+					<div class="layui-input-block">
+						<input path="statuStr" htmlEscape="false" readonly="true" class="form-control layui-input"  <c:if test="${workReceiptsRegister.status eq '0'}">value="未登记"</c:if> <c:if test="${workReceiptsRegister.status eq '1'}">value="已登记"</c:if>/>
+						<form:hidden path="status" htmlEscape="false" readonly="true"  class="form-control " />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label">所属分公司:</label>
+					<div class="layui-input-block">
+						<input type="hidden" value="${workReceiptsRegister.company.id}" name="company.id">
+						<form:input path="company.name" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>发票明细</h2></div>
+				<div class="layui-item nav-btns">
+					<a class="nav-btn nav-btn-add" onclick="addRow('#registerDetailList', registerDetailIdx, registerDetailTpl,'1');"><i class="fa fa-plus"></i>&nbsp;新增</a>
+				</div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable" class="table table-bordered table-condensed no-bottom-margin can-edit">
+						<thead>
+						<tr>
+							<th class="hide"></th>
+							<th><font style="color: red">*</font>所属部门</th>
+							<th><font style="color: red">*</font>发票号</th>
+							<th>发票金额</th>
+							<th>累计登记金额</th>
+							<th>开票时间</th>
+							<th><font style="color: red">*</font>登记金额</th>
+							<th><font style="color: red">*</font>登记日期</th>
+							<th width="90px">登记状态</th>
+							<th width="90px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="registerDetailList">
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+        <script type="text/template" id="registerDetailTpl">//<!--
+					<tr id="registerDetailList{{idx}}">
+					<td class="hide">
+                    <input id="registerDetailList{{idx}}_id" name="registerDetailList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                    <input id="registerDetailList{{idx}}_delFlag" name="registerDetailList[{{idx}}].delFlag" type="hidden" value="0"/>
+                </td>
+                <td>
+                    <sys:treeselect id="registerDetailList{{idx}}_office" name="registerDetailList[{{idx}}].office.id" value="{{row.office.id}}" labelName="office.name" labelValue="{{row.office.name}}"
+					title="部门" url="/sys/office/treeDataBranchOffice?type=2" cssClass="form-control required" notAllowSelectParent="true"/>
+                </td>
+                <td>
+                    <sys:gridselectInvoice url="${ctx}/workreceiptsregister/workReceiptsRegister/selectinvoice" type="" isTotal="1" id="registerDetailList{{idx}}_invoice" name="registerDetailList[{{idx}}].invoice.id"  value="{{row.invoice.id}}"  title="选择发票" labelName="registerDetailList[{{idx}}].invoice.number"
+											idx="{{idx}}"	labelValue="{{row.invoice.number}}" cssClass="form-control required" fieldLabels="发票编号" fieldKeys="number" searchLabel="发票编号" searchKey="number" ></sys:gridselectInvoice>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_invoiceAmt" name="registerDetailList[{{idx}}].invoice.totalMoney" type="text" value="{{row.invoice.totalMoney}}" onchange="formatNum(this);" readOnly="true"  class="form-control money"/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_incomeAmt" name="registerDetailList[{{idx}}].invoice.incomeMoney" type="text" value="{{row.invoice.incomeMoney}}" onchange="formatNum(this);" readOnly="true"  class="form-control required money"/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_invoiceDate" name="registerDetailList[{{idx}}].invoice.date" type="text" value="<fmt:formatDate value="${row.invoice.date}" pattern="yyyy-MM-dd"/>"  readOnly="true"  class="form-control "/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_registerAmt" name="registerDetailList[{{idx}}].registerAmt" type="text" value="{{row.registerAmt}}" onchange="caculateAmt(this,{{idx}})"  class="form-control number required"/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_registerDate" name="registerDetailList[{{idx}}].registerDate" type="text" maxlength="20" class="laydate-icon form-control layer-date required layui-input laydate-icondate"
+							value="<fmt:formatDate value="${row.registerDate}" pattern="yyyy-MM-dd"/>" readOnly="true" />
+
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_statusStr" name="registerDetailList[{{idx}}].statusStr" type="text" value="${fns:getDictLabel(row.status, 'register_type', '正常登记')}"  readOnly="true" class="form-control required"/>
+                    <input type="hidden" id="registerDetailList{{idx}}_status" name="registerDetailList[{{idx}}].status" type="text" value="{{row.status}}" readOnly="true" class="form-control"/>
+                </td>
+
+                <td class="text-center op-td">
+                <span class="op-btn op-btn-delete" onclick="delRow(this, '#registerDetailList{{idx}}')" ><i class="fa fa-trash"></i> 取消</span>
+                </td>
+				</tr>//-->
+        </script>
+            <script type="text/template" id="registerDetailTpl2">//<!--
+					<tr id="registerDetailList{{idx}}">
+					<td class="hide">
+                    <input id="registerDetailList{{idx}}_id" name="registerDetailList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                    <input id="registerDetailList{{idx}}_delFlag" name="registerDetailList[{{idx}}].delFlag" type="hidden" value="0"/>
+                </td>
+                <td>
+                    <input type="hidden" id="registerDetailList{{idx}}_officeId" name="registerDetailList[{{idx}}].office.id" type="text" value="{{row.office.id}}"  readOnly="true"  class="form-control "/>
+                    <input id="registerDetailList{{idx}}_officeName" name="registerDetailList[{{idx}}].office.name" type="text" value="{{row.office.name}}"  readOnly="true"  class="form-control "/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_invoiceId" name="registerDetailList[{{idx}}].invoice.id"  type="hidden" value="{{row.invoice.id}}"/>
+                    <input id="registerDetailList{{idx}}_invoiceName" name="registerDetailList[{{idx}}].invoice.number" type="text" value="{{row.invoice.number}}"  readOnly="true"  class="form-control "/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_invoiceAmt" name="registerDetailList[{{idx}}].invoice.totalMoney" type="text" value="{{row.invoice.totalMoney}}"  onchange="formatNum(this);" readOnly="true"  class="form-control money"/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_incomeAmt" name="registerDetailList[{{idx}}].invoice.incomeMoney" type="text" value="{{row.invoice.incomeMoney}}" onchange="formatNum(this);" readOnly="true"  class="form-control required money"/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_invoiceDate" name="registerDetailList[{{idx}}].invoice.date" type="text" value="{{row.invoice.date}}"  readOnly="true"  class="form-control "/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_registerAmt" name="registerDetailList[{{idx}}].registerAmt" type="text" readOnly="true" value="{{row.registerAmt}}" onchange="formatNum(this);"  class="form-control required money"/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_registerDate" name="registerDetailList[{{idx}}].registerDate" type="text" class="form-control required"
+							value="{{row.registerDate}}" readOnly="true"/>
+                </td>
+                <td>
+                    <input id="registerDetailList{{idx}}_statusStr" name="registerDetailList[{{idx}}].statusStr" type="text" value="{{row.statusStr}}"  readOnly="true" class="form-control required"/>
+                    <input type="hidden" id="registerDetailList{{idx}}_status" name="registerDetailList[{{idx}}].status" type="text" value="{{row.status}}" readOnly="true" class="form-control"/>
+                </td>
+
+                <td class="text-center op-td">
+                <span id="registerDetailList{{idx}}_button" class="op-btn op-btn-delete" onclick="delRow(this, '#registerDetailList{{idx}}','{{idx}}')" ><i class="fa fa-trash"></i> 取消</span>
+                </td>
+				</tr>//-->
+            </script>
+        <script type="text/javascript">
+            var registerDetailIdx = 0, registerDetailTpl = $("#registerDetailTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+            var registerDetailTpl2 = $("#registerDetailTpl2").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+            var data;
+            $(document).ready(function() {
+                data = ${fns:toJson(workReceiptsRegister.registerDetailList)};
+                    for (var i=0; i<data.length; i++){
+                        addRow('#registerDetailList', registerDetailIdx, registerDetailTpl2,'2',data[i]);
+                        if(data[i].status != '1'){
+                            $("#registerDetailList"+i+"_button").hide();
+                            $("#registerDetailList"+i+"_invoiceAmt").val(parseFloat($("#registerDetailList"+i+"_invoiceAmt").val()).toFixed(2));
+                            $("#registerDetailList"+i+"_incomeAmt").val(parseFloat($("#registerDetailList"+i+"_incomeAmt").val()).toFixed(2));
+                            $("#registerDetailList"+i+"_registerAmt").val(parseFloat($("#registerDetailList"+i+"_registerAmt").val()).toFixed(2));
+                            $("#registerDetailList"+i+"_invoiceDate").val(new Date(data[i].invoice.date).format("yyyy-MM-dd"));
+                        }
+                        $("#registerDetailList"+i+"_invoiceDate").val(new Date(data[i].invoice.date).format("yyyy-MM-dd"));
+                        $(":input.money").change();
+                    }
+            });
+
+            Date.prototype.format = function(fmt) {
+                var o = {
+                    "M+" : this.getMonth()+1,                 //月份
+                    "d+" : this.getDate(),                    //日
+                    "h+" : this.getHours(),                   //小时
+                    "m+" : this.getMinutes(),                 //分
+                    "s+" : this.getSeconds(),                 //秒
+                    "q+" : Math.floor((this.getMonth()+3)/3), //季度
+                    "S"  : this.getMilliseconds()             //毫秒
+                };
+                if(/(y+)/.test(fmt)) {
+                    fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
+                }
+                for(var k in o) {
+                    if(new RegExp("("+ k +")").test(fmt)){
+                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
+                    }
+                }
+                return fmt;
+            }
+
+            function addRow(list, idx, tpl,isNew, row){
+                bornTemplete(list, idx, tpl, row, idx);
+                registerDetailIdx +=1;
+                if(isNew=="1") {
+                    var dateId = "#registerDetailList"+idx+"_registerDate";
+                    var stausId = "#registerDetailList"+idx+"_status";
+                    laydate.render({
+                        elem: dateId, //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                        event: 'click', //响应事件。如果没有传入event,则按照默认的click
+                        value:new Date(),
+                        done:function(value,date){
+                            validateTime(value,dateId);
+                        }
+                    });
+                    $(stausId).val(1);
+                }
+            }
+
+            function bornTemplete(list, idx, tpl, row, idx1){
+                var idx1 = $("#registerDetailList tr").length +1;
+                $(list).append(Mustache.render(tpl, {
+                    idx: idx, delBtn: true, row: row,
+                    order:idx1 + 1, idx1:idx1
+                }));
+                $(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,idx){
+                //请求服务器判断是否已经付款
+                var invoiceId = $(prefix+"_invoiceId").val();
+                var id = $(prefix+"_id");
+                var delFlag = $(prefix+"_delFlag");
+                var status = $(prefix+"_status");
+                if (id.val() == ""){
+                    $(obj).parent().parent().remove();
+                    totalRgAmt(obj);
+                }else {
+                    $.ajax({
+                        url:"${ctx}/workreceiptsregister/workReceiptsRegister/checkpaystatus",
+                        data:{"invoiceId":invoiceId},
+                        type:"post",
+                        success:function(result){
+                            if(result.success ){
+                                if(result.body.payFlag){
+                                    top.layer.msg("发票已经结算付款,不能取消登记");
+                                }else {
+                                    delFlag.val("1");
+                                    var today = new Date();
+                                    var rgDate = strToDate($(prefix+"_registerDate").val());
+                                    if(today.getFullYear() > rgDate.getFullYear()||(today.getFullYear() == rgDate.getFullYear() && today.getMonth()>rgDate.getMonth())){
+                                        addRow('#registerDetailList', registerDetailIdx, registerDetailTpl2,'2',data[idx]);
+                                        $(":input.money").change();
+                                        $("#registerDetailList"+idx+"_statusStr").val("取消登记");
+                                        status.val("2");
+                                        $("#registerDetailList"+idx+"_button").hide();
+                                        var newIdx = registerDetailIdx-1;
+                                        $("#registerDetailList"+newIdx+"_statusStr").val("冲销登记");
+                                        $("#registerDetailList"+newIdx+"_status").val("3");
+                                        var rgAmt = $("#registerDetailList"+newIdx+"_registerAmt").val();
+                                        $("#registerDetailList"+newIdx+"_registerAmt").val(("-"+rgAmt));
+                                        $("#registerDetailList"+newIdx+"_registerAmt").change();
+                                        $("#registerDetailList"+newIdx+"_registerDate").val(new Date().format("yyyy-MM-dd"));
+                                        $("#registerDetailList"+newIdx+"_button").hide();
+                                        $("#registerDetailList"+newIdx+"_id").val("");
+                                        console.log(new Date(data[idx].invoice.date).format("yyyy-MM-dd"));
+                                        $("#registerDetailList"+newIdx+"_invoiceDate").val(new Date(data[idx].invoice.date).format("yyyy-MM-dd"));
+                                        totalRgAmt($("#registerDetailList"+newIdx+"_registerAmt"));
+                                    }else {
+                                        delFlag.val("1");
+                                        status.val("2");
+                                        $(obj).parent().parent().hide();
+                                        totalRgAmt(obj)
+                                    }
+                                }
+                            }else {
+                                top.layer.msg("取消登记失败,查询发票结算付款状态异常:"+result.msg);
+                            }
+                        }
+                    })
+                }
+
+            }
+
+            function setInvoiceValue(obj,idx) {
+                var pref = "#registerDetailList"+idx+"_";
+                var amtId = pref+"invoiceAmt";
+                var dateId = pref+"invoiceDate";
+                var incomeId = pref+"incomeAmt"
+                $(amtId).val(parseFloat(obj.invoiceAmt).toFixed(2));
+                $(dateId).val(obj.invoiceDate);
+                $(incomeId).val(parseFloat(obj.incomeMoney).toFixed(2));
+
+                var ivcAmt = parseFloat(obj.invoiceAmt-obj.incomeMoney);
+                $(amtId).change();
+                $(incomeId).change();
+                var exAmt = $(pref+"registerAmt").val()
+                if(exAmt==null||exAmt==''){
+                    exAmt = 0
+                }else {
+                    exAmt = parseFloat(exAmt.replace(/[^\d\.-]/g, ""));
+                }
+                var rgstAmt = parseFloat($("#arrivalAmt").val().replace(/[^\d\.-]/g, "")) - (parseFloat($("#registerAmt").val().replace(/[^\d\.-]/g, ""))-exAmt);
+                rgstAmt = parseFloat(rgstAmt);
+
+                var resAmt = (ivcAmt>=rgstAmt?rgstAmt:ivcAmt);
+                if(exAmt == 0){
+                    $(pref+"registerAmt").val(resAmt.toFixed(2));
+                    $(pref+"registerAmt").change();
+                }else {
+                    $(pref+"registerAmt").val((resAmt>exAmt?exAmt:resAmt).toFixed(2));
+                    $(pref+"registerAmt").change();
+                }
+                totalRgAmt($(pref+"registerAmt"));
+            }
+
+            function caculateAmt(obj,idx) {
+                formatNum(obj);
+                var pref = "#registerDetailList"+idx+"_";
+                var invoiceAmtId = pref+"invoiceAmt";
+                var incomeId = pref + "incomeAmt";
+                var val = parseFloat(obj.value.replace(/[^\d\.-]/g, ""));
+                var amt = (parseFloat($(invoiceAmtId).val().replace(/[^\d\.-]/g, "")) - parseFloat($(incomeId).val().replace(/[^\d\.-]/g, "")));
+                if (amt<val){
+                    parent.layer.msg("登记金额不能大于发票余额", {icon: 5});
+                    $(obj).val(amt.toFixed(2));
+                    $(obj).change();
+                    return false;
+                }
+                totalRgAmt(obj);
+            }
+            
+            function validateTime(val,dateId) {
+                var regDate = strToDate(val);
+                var now = new Date();
+                var days = Math.ceil(Math.abs(regDate.getTime()-now.getTime())/(24*60*60*1000))
+                if(days>10){
+                    parent.layer.msg("登记日期与当前时间差不能超过10天", {icon: 5});
+                    $(dateId).val(new Date().format("yyyy-MM-dd"));
+                    return false;
+                }
+                var arrDate = strToDate($("#arrivalDate").val());
+                if(regDate.getTime()<arrDate.getTime()){
+                    parent.layer.msg("登记日期不能早于到账日期", {icon: 5});
+                    $(dateId).val(new Date().format("yyyy-MM-dd"));
+                    return false;
+                }
+            }
+
+            function strToDate(dateStr){
+                var dateStr = dateStr.replace(/-/g, "/");//现将yyyy-MM-dd类型转换为yyyy/MM/dd
+                var dateTime = Date.parse(dateStr);//将日期字符串转换为表示日期的秒数
+                //注意:Date.parse(dateStr)默认情况下只能转换:月/日/年 格式的字符串,但是经测试年/月/日格式的字符串也能被解析
+                var data = new Date(dateTime);//将日期秒数转换为日期格式
+                return data;
+            }
+            
+            function getAllInvoice() {
+                var invoices = $("#registerDetailList tr:visible .invoiceId");
+                var invoiceIds ="";
+                for (var i=0;i<invoices.length;i++){
+                    if($(invoices[i]).val()!=null&&$(invoices[i]).val()!=''){
+                        invoiceIds+=$(invoices[i]).val();
+                        invoiceIds+=",";
+                    }
+                }
+                invoiceIds = invoiceIds.slice(0,invoiceIds.length-1);
+                return invoiceIds;
+            }
+
+            function totalRgAmt(obj) {
+                var rgs = $("#registerDetailList tr:visible td:nth-child(7) :input");
+                var totalAmt = 0;
+                for (var i=0;i<rgs.length;i++){
+                    totalAmt += parseFloat($(rgs[i]).val().replace(/[^\d\.-]/g, ""));
+                }
+
+                var amt = parseFloat($("#arrivalAmt").val().replace(/[^\d\.-]/g, ""));
+                if(amt<(totalAmt)){
+                    parent.layer.msg("收入登记金额不能大于到账金额", {icon: 5});
+                    $(obj).val(0);
+                    return false;
+                }else {
+                    $("#registerAmt").val((totalAmt).toFixed(2))
+                    $("#registerAmt").change();
+                }
+                return true;
+            }
+        </script>
+	</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 225 - 0
src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsDetailView.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"/>
+    <%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+	<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);
+					}
+				}
+			});
+
+			if("${workReceiptsRegister.ext}" == "1"){
+				$("#ext1").iCheck('check')
+				$("#divv").hide();
+			}else{
+				$("#ext").iCheck('check')
+				$("#divv").show();
+			}
+			
+		});
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+	</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="workReceiptsRegister" action="${ctx}/workreceiptsregister/workReceiptsRegister/saveDetail" 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">
+						<input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
+						<label for="ext">项目收入</label>
+						<input type="radio" class="i-checks" name="ext" id="ext1" value="1">
+						<label for="ext1">非项目收入</label>
+							<%--<input type="text" name="title" lay-verify="title" autocomplete="off" readonly="true" placeholder="" class="layui-input" value="全过程管理用户01">--%>
+					</div>
+				</div>
+				<div id="divv">
+					<div class="layui-item layui-col-sm6 td1">
+						<label class="layui-form-label"><span class="require-item">*</span>收入项目:</label>
+						<div class="layui-input-block with-icon">
+							<%--<sys:gridselectcallprojectt url="${ctx}/workinvoice/workInvoice/selectproject" id="project" name="project.id"  value="${workReceiptsRegister.project.id}"  title="选择所属项目" labelName="workInvoice.project.projectName"--%>
+														<%--labelValue="${workReceiptsRegister.project.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>--%>
+							<form:input path="project.projectName" 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 id ="pNumber" path="project.projectId" 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 id ="cInfoName" path="project.workContractInfo.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 id ="cName" path="project.workContractInfo.client.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">
+							<input id ="cMoney"  value="<fmt:formatNumber value="${workReceiptsRegister.project.workContractInfo.contractPrice}" pattern="#,##0.00#"/>" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+			</div>
+			<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">
+						<input id="arrivalDate" name="arrivalDate" type="text" readonly="true" maxlength="20" class=" form-control required layui-input"
+							   value="<fmt:formatDate value="${workReceiptsRegister.arrivalDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+                <div class="layui-item layui-col-sm6 td1">
+                    <label class="layui-form-label"><span class="require-item">*</span>到账金额:</label>
+                    <div class="layui-input-block">
+                        <input name="arrivalAmt" htmlEscape="false" value="<fmt:formatNumber value="${workReceiptsRegister.arrivalAmt}" pattern="#,##0.00#"/>"  readonly="true" class="form-control required number layui-input"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label"><span class="require-item">*</span>对方户名:</label>
+					<div class="layui-input-block">
+						<form:input path="clientAccname" htmlEscape="false"  readonly="true" 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="clientAccno" htmlEscape="false"  readonly="true" class="form-control required layui-input"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label">登记金额:</label>
+					<div class="layui-input-block">
+						<input name="registerAmt" htmlEscape="false" value="<fmt:formatNumber value="${workReceiptsRegister.registerAmt}" pattern="#,##0.00#"/>" class="form-control number layui-input" readonly="true" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label">收入状态:</label>
+					<div class="layui-input-block">
+						<input path="statuStr" htmlEscape="false" readonly="true" class="form-control layui-input"  <c:if test="${workReceiptsRegister.status eq '0'}">value="未登记"</c:if> <c:if test="${workReceiptsRegister.status eq '1'}">value="已登记"</c:if>/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label">所属分公司:</label>
+					<div class="layui-input-block">
+						<form:input path="company.name" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</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="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
+						<thead>
+						<tr>
+							<th class="hide"></th>
+							<th><font style="color: red">*</font>所属部门</th>
+							<th><font style="color: red">*</font>发票号</th>
+							<th>发票金额</th>
+							<th>累计登记金额</th>
+							<th>开票时间</th>
+							<th><font style="color: red">*</font>登记金额</th>
+							<th><font style="color: red">*</font>登记日期</th>
+							<th>登记状态</th>
+						</tr>
+						</thead>
+						<tbody id="registerDetailList">
+                        <c:forEach items="${workReceiptsRegister.registerDetailList}" var="row">
+                            <tr>
+                                <td style='text-align:center;'>
+                                        ${row.office.name}
+                                </td>
+                                <td style='text-align:center;'>
+                                        ${row.invoice.number}
+                                </td>
+                                <td style='text-align:center;'>
+                                    <fmt:formatNumber value="${row.invoice.totalMoney}" pattern="#,##0.00#"/>
+                                </td>
+                                <td style='text-align:center;'>
+                                    <fmt:formatNumber value="${row.invoice.incomeMoney}" pattern="#,##0.00#"/>
+                                </td>
+                                <td style='text-align:center;'>
+                                    <fmt:formatDate value="${row.invoice.date}" pattern="yyyy-MM-dd"/>
+                                </td>
+                                <td style='text-align:center;'>
+                                    <fmt:formatNumber value="${row.registerAmt}" pattern="#,##0.00#"/>
+                                </td>
+                                <td style='text-align:center;'>
+                                    <fmt:formatDate value="${row.registerDate}" pattern="yyyy-MM-dd"/>
+                                </td>
+                                <td style='text-align:center;'>
+                                        ${row.statusStr}
+                                </td>
+                            </tr>
+                        </c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 96 - 0
src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsImportView.jsp

@@ -0,0 +1,96 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>收入登记导入列表</title>
+</head>
+<body class="hideScroll">
+<form:form id="inputForm"  action="${ctx}/workreceiptsregister/workReceiptsRegister/saveImport" method="post" class="form-horizontal">
+<div class="tabs-container">
+    <ul class="nav nav-tabs">
+        <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true" style="margin-top: 15px">收入明细</a>
+        </li>
+    </ul>
+</div>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th> <input type="checkbox"></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 id="workRegisterList">
+    </tbody>
+</table>
+<script type="text/template" id="workRegisterTpl">//<!--
+					<tr id="registers{{idx}}">
+                <td> <input type="checkbox" id="{{idx}}"></td>
+                <td>
+                    <input id="registers{{idx}}_arrivalDate" name="registers[{{idx}}].arrivalDate" type="text" value="{{row.arrivalDate}}"  readOnly="true"  class="form-control "/>
+                </td>
+                <td>
+                    <input id="registers{{idx}}_arrivalAmt" name="registers[{{idx}}].arrivalAmt" type="text" value="{{row.arrivalAmt}}"  readOnly="true"  class="form-control money"/>
+                </td>
+                <td>
+                    <input id="registers{{idx}}_clientAccno" name="registers[{{idx}}].clientAccno" type="text" value="{{row.clientAccno}}"  readOnly="true"  class="form-control "/>
+                </td>
+                <td>
+                    <input id="registers{{idx}}_iclientAccname" name="registers[{{idx}}].clientAccname" type="text" value="{{row.clientAccname}}" readOnly="true"  class="form-control required"/>
+                </td>
+				</tr>//-->
+</script>
+<script type="text/javascript">
+    var workRegisterIdx = 0;
+    var workRegisterTpl = $("#workRegisterTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+    $(document).ready(function() {
+        var data = ${fns:toJson(registers)};
+        for (var i=0; i<data.length; i++){
+            addRow('#workRegisterList', workRegisterIdx, workRegisterTpl,data[i]);
+        }
+        $(":input.money").change();
+    });
+
+    function formatNum(obj) {
+        var val = $(obj).val();
+        if(val==null||val==''|| isNaN(val))return;
+        var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+        var l = money.split(".")[0].split("").reverse(),
+            r = money.split(".")[1];
+        t = "";
+        for(i = 0; i < l.length; i ++ )
+        {
+            t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+        }
+        $(obj).val(t.split("").reverse().join("") + "." + r);
+    }
+
+    function addRow(list, idx, tpl, row){
+        bornTemplete(list, idx, tpl, row, idx);
+        workRegisterIdx +=1;
+    }
+
+    function bornTemplete(list, idx, tpl, row, idx1){
+        var idx1 = $("#workRegisterList tr").length +1;
+        $(list).append(Mustache.render(tpl, {
+            idx: idx, delBtn: true, row: row,
+            order:idx1 + 1, idx1:idx1
+        }));
+        $(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");
+                }
+            }
+        });
+    }
+</script>
+</form:form>
+</body>
+</html>

+ 260 - 0
src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsRegisterCompany.jsp

@@ -0,0 +1,260 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <%@ include file="/webpage/include/echarts.jsp"%>
+    <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:messageJBox content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="contentShadow layui-row" id="queryDiv">
+                <form:form id="searchForm" modelAttribute="workReceiptsRegisterCompany" action="${ctx}/workreceiptsregister/workReceiptsRegister/companyList" method="post" class="form-inline">
+                    <%--以下三行照抄--%>
+                    <div class="commonQuery">
+
+                        <div class="layui-item layui-col-sm6">
+                            <label class="layui-form-label">展示方式:</label>
+                            <div class="layui-input-block">
+                                <form:radiobutton class="i-checks" path="ext" checked="true" id="extleft" label="按分公司" value="0"/>
+                                <form:radiobutton  class="i-checks" path="ext" id="ext1" label="按月份" value="1"/>
+                            </div>
+                        </div>
+                        <div class="layui-item layui-col-sm6">
+                            <label class="layui-form-label">显示样式:</label>
+                            <div class="layui-input-block">
+                                <input type="radio" class="i-checks" name="extright" checked id="cssExt" value="0">
+                                <label for="cssExt">列表</label>
+                                <input type="radio" class="i-checks" name="extright" id="cssExt1" value="1">
+                                <label for="cssExt1">柱图</label>
+                                <input type="radio" class="i-checks" name="extright"  id="cssExt2" value="2">
+                                <label for="cssExt2">饼图</label>
+                                <input type="radio" class="i-checks" name="extright" id="cssExt3" value="3">
+                                <label for="cssExt3">折线图</label>
+                            </div>
+                        </div>
+                     </div>
+                    <div class="commonQuery">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">分公司:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:treeselect id="companyId" name="companyId" value="${workReceiptsRegisterCompany.companyId}" labelName="name" labelValue="${workReceiptsRegisterCompany.name}"
+                                                title="分公司" url="/sys/office/treeDataCompany?type=2" cssClass="form-control input-sm" allowClear="true" notAllowSelectParent="false"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">登记日期:</label>
+                            <div class="layui-input-block">
+                                <input id="receiptDate" name="receiptDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+                                       value="${workReceiptsRegisterCompany.receiptDate}"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item athird">
+                            <div class="input-group">
+                                <button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearchs()">重置</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 id="echarts">
+            <%--柱图--%>
+            <div id="bar_normal" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none" class="main000">
+                <echarts:bar id="bar_normal" title="收入统计表" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="分公司" yAxisName="收款金额(元)"/></div>
+            <%--饼图--%>
+            <div id="pie"  style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none" class="main000">
+                <echarts:pie id="pie" title="收入统计表" subtitle="" orientData="${orientData}"/></div>
+            <%--折线图--%>
+            <div id="line_normal" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none"  class="main000">
+                <echarts:line id="line_normal" title="收入统计表" subtitle="" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="公司名称" yAxisName="收款金额(元)" /></div>
+        </div>
+
+        <div class="full-width fl" id="frametable">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                        <shiro:hasPermission name="workreceiptsregister:workReceiptsRegister:countExport">
+                            <table:exportExcel url="${ctx}/workreceiptsregister/workReceiptsRegister/exportCompany"></table:exportExcel><!-- 导出按钮 -->
+                        </shiro:hasPermission>
+                    <c:choose>
+                        <c:when test="${not empty backState}">
+                            <a class="nav-btn nav-btn-refresh" onClick="javascript :history.back(-1);"  data-toggle="tooltip" data-placement="left" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>
+                        </c:when>
+                    </c:choose>
+                    <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:${list.size()},
+            elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {field:'officeName',align:'center',title: '${colName}', templet:function(d){
+                        if(d.officeName!='合计'&&'${colName}'!="月份"){
+                            var xml = "<a class=\"attention-info\" onclick=\"isSign('"+d.id+"','"+d.sign+"')\" >" +
+                                "<span title=" + d.officeName + ">" + d.officeName + "</span></a>";
+                            return xml;
+                        }else{
+                            return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                        }
+                    }}
+                ,{field:'money',align:'center', title: '收款金额', templet:function(d){
+                        return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty list}">
+                <c:forEach items="${list}" var="workReceiptsRegisterCompany" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workReceiptsRegisterCompany.id}",
+                    "officeName":<c:choose>
+                        <c:when test="${colName == '月度'}">
+                        "${workReceiptsRegisterCompany.datestr}"
+                        </c:when>
+                        <c:otherwise>
+                            "${workReceiptsRegisterCompany.name}"
+                        </c:otherwise>
+                        </c:choose>
+                     ,"sign":"${workReceiptsRegisterCompany.sign}"
+                    ,"money":"<fmt:formatNumber value="${workReceiptsRegisterCompany.receiptAmt}" pattern="#,#00.00"/>"
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+    resizeListTable();
+</script>
+
+
+<script>
+    function isSign(companyId,sign){
+        $.ajax({
+            type:'post',
+            url:'${ctx}/workreimbursementcount/workInvoiceCount/signlist',
+            data:{
+                "companyId":companyId,"sign":sign
+            },
+            success:function(data){
+                if(data==0){
+                    window.location.href='${ctx}/workreceiptsregister/workReceiptsRegister/officelist?companyId='+companyId;
+                }else{
+                    window.location.href='${ctx}/workreceiptsregister/workReceiptsRegister/companyList?companyId='+companyId;
+                }
+            }
+        })
+    }
+
+    function resetSearchs(){//重置,页码清零
+        $("#extleft").iCheck('check');
+        $("#pageNo").val(0);
+        $("#searchForm div.query input").val("");
+        $("#searchForm div.query select").val("");
+        $("#searchForm").submit();
+        return false;
+    }
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#cus_name").show();
+        $("#cus_name").siblings().hide();
+        $("#frametable").show();//列表
+
+        $("input[name='extright']").on('ifChecked', function(event){
+            var obj=$("input:radio[name='extright']:checked").val();
+            changeStyle(obj);
+        });
+
+        //搜索框收放
+        $('#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: '#receiptDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date',
+            format:'yyyy'
+        });
+
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+    function changeStyle(obj){
+        if(obj==0){
+            $("#frametable").show();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==1){
+            $("#frametable").hide();//列表
+            $("#bar_normal").show();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==2){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").show();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==3){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").show();//折线
+        }
+    }
+</script>
+</body>
+</html>

+ 221 - 0
src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsRegisterForm.jsp

@@ -0,0 +1,221 @@
+<%@ 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: '#arrivalDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                        type : 'date'
+			        });
+
+			if("${workReceiptsRegister.ext}" == "1"){
+				$("#ext1").iCheck('check')
+			}else{
+				$("#ext").iCheck('check')
+			}
+
+			$("input[name='ext']").on('ifChecked',function(event){
+				radioVal = $(this).val();
+				if(radioVal == 0){
+
+					// $("#workClientLinkmanList tr").remove();
+					$("#divv").show();
+
+				}else{
+					$("#divv input").val('');
+					// $("#workClientLinkmanList tr").remove();
+					$("#divv").hide();
+
+				}
+			});
+		});
+
+		function setPNumber(obj){
+			$.ajax({
+				type:'post',
+				url:'${ctx}/workinvoice/workInvoice/getPNumber',
+				data:{
+					"obj":obj
+				},
+				success:function(data){
+					var d = JSON.parse(data);
+					$("#pNumber").val(d.pNumber);
+					$("#cInfoName").val(d.cInfoName);
+					$("#cName").val(d.cName);
+					$("#cMoney").val(d.cMoney);
+					formatNum("#cMoney");
+					// $("#officeName").val(d.officeName);
+					// $("#officeId").val(d.officeId);
+				}
+			})
+		}
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+        
+        function setClientBankInfo(item) {
+            $("#clientName").val(item.clientId.name);
+            $("#clientAccno").val(item.bankNum);
+        }
+	</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="workReceiptsRegister" action="${ctx}/workreceiptsregister/workReceiptsRegister/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">
+						<input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
+						<label for="ext">项目收入</label>
+						<input type="radio" class="i-checks" name="ext" id="ext1" value="1">
+						<label for="ext1">非项目收入</label>
+							<%--<input type="text" name="title" lay-verify="title" autocomplete="off" readonly="true" placeholder="" class="layui-input" value="全过程管理用户01">--%>
+					</div>
+				</div>
+				<div id="divv">
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label"><span class="require-item">*</span>收入项目:</label>
+					<div class="layui-input-block with-icon">
+						<sys:gridselectcallprojectt url="${ctx}/workinvoice/workInvoice/selectproject" id="project" name="project.id"  value="${workReceiptsRegister.project.id}"  title="选择所属项目" labelName="workInvoice.project.projectName"
+													labelValue="${workReceiptsRegister.project.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+					</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 ="pNumber" path="project.projectId" 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 id ="cInfoName" path="project.workContractInfo.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 id ="cName" path="project.workContractInfo.client.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">
+							<input id ="cMoney" path="project.workContractInfo.contractPrice"  htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+			</div>
+			<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">
+						<input id="arrivalDate" name="arrivalDate" type="text" readonly="true" maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workReceiptsRegister.arrivalDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+                <div class="layui-item layui-col-sm6 td1">
+                    <label class="layui-form-label"><span class="require-item">*</span>到账金额:</label>
+                    <div class="layui-input-block">
+                        <input id="arrivalAmt" name="arrivalAmt" htmlEscape="false" value="<fmt:formatNumber value="${workReceiptsRegister.arrivalAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);"  class="form-control required number layui-input"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label"><span class="require-item">*</span>对方户名:</label>
+                    <div class="layui-input-block with-icon">
+                        <sys:gridselectclientBankinfo url="${ctx}/workclientinfo/workClientInfo/selectclientBankinfo" id="client" name="clientName"  value="${workReceiptsRegister.clientAccname}"  title="选择客户" labelName="clientAccname"
+                                              allowInput="true"    labelValue="${workContractInfo.client.name}" cssClass="form-control layui-input required" fieldLabels="客户名称" fieldKeys="name" searchLabel="客户名称" searchKey="name" searchLabel1="联系人" searchKey1="workLinkName"></sys:gridselectclientBankinfo>
+                    </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="clientAccno" htmlEscape="false" minlength="16" maxlength="19"  class="form-control required digits layui-input"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label">登记金额:</label>
+					<div class="layui-input-block">
+						<input id="registerAmt" name="registerAmt" htmlEscape="false" readonly="true"  value="<fmt:formatNumber value="${workReceiptsRegister.registerAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);" class="form-control number layui-input" />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label">收入状态:</label>
+					<div class="layui-input-block">
+						<input path="statuStr" htmlEscape="false" readonly="true" class="form-control layui-input"  <c:if test="${workReceiptsRegister.status eq '0'}">value="未登记"</c:if> <c:if test="${workReceiptsRegister.status eq '1'}">value="已登记"</c:if>/>
+						<form:hidden path="status" htmlEscape="false" readonly="true"  class="form-control " />
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 td1">
+					<label class="layui-form-label">所属分公司:</label>
+					<div class="layui-input-block">
+						<input type="hidden" value="${workReceiptsRegister.company.id}" name="company.id">
+						<form:input path="company.name" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 171 - 0
src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsRegisterInfo.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>
+        .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="workReceiptsRegisterInfo" action="${ctx}/workreceiptsregister/workReceiptsRegister/infolist" method="post" class="form-inline">
+                    <%--以下三行照抄--%>
+                    <form:hidden path="companyId"/>
+                    <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 with-icon">
+                                <sys:treeselect id="officeId" name="office.id" value="${workReceiptsRegisterInfo.office.id}" labelName="office.name" labelValue="${workReceiptsRegisterInfo.office.name}"
+                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">登记日期:</label>
+                            <div class="layui-input-block">
+                                <input id="receiptDate" name="receiptDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+                                       value="${workReceiptsRegisterInfo.receiptDate}"/>
+                                </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>
+                </form:form>
+            </div>
+        </div>
+
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <shiro:hasPermission name="workreceiptsregister:workReceiptsRegister:countExport">
+                        <table:exportExcel url="${ctx}/workreceiptsregister/workReceiptsRegister/exportInfo"></table:exportExcel><!-- 导出按钮 -->
+                    </shiro:hasPermission>
+                    <c:choose>
+                        <c:when test="${not empty backState}">
+                            <a class="nav-btn nav-btn-refresh" onClick="javascript :history.back(-1);"  data-toggle="tooltip" data-placement="left" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>
+                        </c:when>
+                    </c:choose>
+                    <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:'number',align:'center', title: '发票号码', templet:function(d){
+                        return "<span title='"+ d.number +"'>" + d.number + "</span>";
+                    }},
+                {field:'projectName',align:'center', title: '对方户名',templet:function(d){
+                        return "<span title='"+ d.clientName +"'>" + d.clientName + "</span>";
+                    }}
+                ,{field:'submitterName',align:'center', title: '到账日期',templet:function(d){
+                        return "<span title='"+ d.arrivalDate +"'>" + d.arrivalDate + "</span>";
+                    }}
+                ,{field:'money',align:'center', title: '登记金额', templet:function(d){
+                        return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workReceiptsRegisterInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "number":"${workReceiptsRegisterInfo.invoiceNum}"
+                    ,"clientName":"${workReceiptsRegisterInfo.clientName}"
+                    ,"arrivalDate":<c:choose>
+                        <c:when test="${workReceiptsRegisterInfo.arrivalDate == null}">"-"</c:when>
+                        <c:otherwise>"<fmt:formatDate value="${workReceiptsRegisterInfo.arrivalDate}" pattern="yyyy-MM-dd"/>"</c:otherwise>
+                        </c:choose>
+                    ,"money":"<fmt:formatNumber value="${workReceiptsRegisterInfo.receiptAmt}" pattern="#,#00.00"/>"
+                }
+                </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: '#receiptDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date',
+            format:'yyyy'
+        });
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+
+</script>
+</body>
+</html>

+ 284 - 0
src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsRegisterList.jsp

@@ -0,0 +1,284 @@
+<%@ 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>
+		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">
+	<%--<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>--%>
+
+	<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="workReceiptsRegister" action="${ctx}/workreceiptsregister/workReceiptsRegister/" 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 id="beginDate" placeholder="开始时间" name="beginDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workReceiptsRegister.beginDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+                                <span class="group-sep">-</span>
+								<input id="endDate" placeholder="结束时间" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workReceiptsRegister.endDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+                            <label class="layui-form-label">对方账号:</label>
+                            <div class="layui-input-block">
+                                <form:input path="clientAccno" htmlEscape="false" maxlength="255"  class=" form-control layui-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:input path="clientAccname" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">到账金额:</label>
+                            <div class="layui-input-block">
+                                <input id="minArr" name="minArr" type="text" maxlength="20" class=" form-control layui-input number query-group"
+                                       value="<fmt:formatNumber value="${workReceiptsRegister.minArr}" pattern="#,##0.00#"/>" onchange="formatNum(this);"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="maxArr" name="maxArr" type="text" maxlength="20" class="form-control layui-input number query-group"
+                                       value="<fmt:formatNumber value="${workReceiptsRegister.maxArr}" pattern="#,##0.00#"/>" onchange="formatNum(this);"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">确认金额:</label>
+                            <div class="layui-input-block">
+                                <input id="minReg" name="minReg" type="text" maxlength="20" class="form-control layui-input number query-group"
+                                       value="<fmt:formatNumber value="${workReceiptsRegister.minReg}" pattern="#,##0.00#"/>" onchange="formatNum(this);" />
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="maxReg" name="maxReg" type="text" maxlength="20" class="form-control layui-input number query-group"
+                                       value="<fmt:formatNumber value="${workReceiptsRegister.maxReg}" pattern="#,##0.00#"/>" onchange="formatNum(this);" />
+                                </input>
+                            </div>
+                        </div>
+                        <%--<div class="layui-item query athird">--%>
+                            <%--<label class="layui-form-label">收入状态:</label>--%>
+                            <%--<div class="layui-input-block">--%>
+                                <%--<form:select path="status" htmlEscape="false" maxlength="255"  class=" form-control simple-select">--%>
+									<%--<form:option  value="" label=""/>--%>
+                                    <%--<form:option value="0" label="未登记"/>--%>
+                                    <%--<form:option value="1" label="已登记"/>--%>
+                                <%--</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="workreceiptsregister:workReceiptsRegister:add">
+						<table:addRow url="${ctx}/workreceiptsregister/workReceiptsRegister/form" title="收入登记"></table:addRow><!-- 增加按钮 -->
+					</shiro:hasPermission>
+					<shiro:hasPermission name="workreceiptsregister:workReceiptsRegister:edit">
+						<table:importExcel9 url="${ctx}/workreceiptsregister/workReceiptsRegister/ajaxImport"></table:importExcel9><!-- 导入按钮 -->
+					</shiro:hasPermission>
+					<%--<shiro:hasPermission name="workreceiptsregister:workReceiptsRegister:export">--%>
+						<%--<table:exportExcel url="${ctx}/workreceiptsregister/workReceiptsRegister/export"></table:exportExcel><!-- 导出按钮 -->--%>
+					<%--</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="contentTable1"></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: '#contentTable1'
+            ,page: false
+            ,cols: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'arrivalDate',align:'center', title: '到账时间',minWidth:100, templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看', '${ctx}/workreceiptsregister/workReceiptsRegister/view?id=" + d.id + "','95%','95%')\">" +
+                            d.arrivalDate + "</a>";
+                        return xml;
+                    }}
+                ,{field:'clientAccno',align:'center', title: '对方账号',minWidth:200,templet:function(d){
+                        return "<span title='"+ d.clientAccno +"'>" + d.clientAccno + "</span>";
+                    }}
+                ,{field:'clientAccname',align:'center', title: '对方户名',minWidth:200,templet:function(d){
+                        return "<span title='"+ d.clientAccname +"'>" + d.clientAccname + "</span>";
+                    }}
+                ,{field:'arrivalAmt', align:'center',title: '到账金额', width:150}
+                ,{field:'registerAmt', align:'center',title: '确认金额',width:150}
+                ,{field:'status',align:'center', title: '收入状态', width:100}
+                ,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
+                        ////对操作进行初始化
+                        var xml = "";
+                        if(d.canedit != undefined && d.canedit == "1")
+                            xml += "<a href=\"#\" onclick=\"openDialog('收入登记', '${ctx}/workreceiptsregister/workReceiptsRegister/regist?id=" + d.id + "', '95%' , '95%')\"   class=\"op-btn op-btn-cancel\"><i class=\"fa fa-edit\"></i> 登记</a>";
+                        if(d.candelete != undefined && d.candelete == "1")
+                            xml +="<a href=\"${ctx}/workreceiptsregister/workReceiptsRegister/delete?id=" + d.id + "\" 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="workReceiptsRegister" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workReceiptsRegister.id}"
+                    ,"arrivalDate":"<fmt:formatDate value="${workReceiptsRegister.arrivalDate}" pattern="yyyy-MM-dd"/>"
+                    ,"clientAccno":"<c:out value="${workReceiptsRegister.clientAccno}" escapeXml="true"/>"
+                    ,"clientAccname":"<c:out value="${workReceiptsRegister.clientAccname}" escapeXml="true"/>"
+                    ,"arrivalAmt":"<fmt:formatNumber pattern="#,##0.00#" value="${workReceiptsRegister.arrivalAmt}"/>"
+                    ,"registerAmt":"<fmt:formatNumber pattern="#,##0.00#" value="${workReceiptsRegister.registerAmt}"/>"
+                    ,"status":<c:if test="${workReceiptsRegister.status eq '0'}">"未登记"</c:if> <c:if test="${workReceiptsRegister.status eq '1'}">"已登记"</c:if>
+                    <c:if test="${flag == '1' or fns:getUser().id == workReceiptsRegister.createBy.id}">
+                    <shiro:hasPermission name="workreceiptsregister:workReceiptsRegister:edit">
+                    ,"canedit":"1"
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="workreceiptsregister:workReceiptsRegister:del">
+                    ,"candelete":<c:if test="${workReceiptsRegister.detailCou == 0}">"1"</c:if><c:if test="${workReceiptsRegister.detailCou != 0}">"0"</c:if>
+                    </shiro:hasPermission>
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable(130);/*消除由于有竖向滚动条造成table出现横向滚动条*/
+    $("a").on("click",addLinkVisied);
+</script>
+<script type="text/javascript">
+    var validateForm;
+    $(document).ready(function() {
+        $('#moresee').click(function(){
+            if($('#moresees').is(':visible'))
+            {
+                $('#moresees').slideUp(0,resizeWindow);
+                $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+            }else{
+                $('#moresees').slideDown(0,resizeWindow);
+                $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+            }
+        });
+        laydate.render({
+            elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+        });
+        laydate.render({
+            elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+        });
+
+        validateForm = $("#searchForm").validate({
+            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 formatNum(obj) {
+        var val = $(obj).val();
+        if(val==null||val==''|| isNaN(val))return;
+        var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+        var l = money.split(".")[0].split("").reverse(),
+            r = money.split(".")[1];
+        t = "";
+        for(i = 0; i < l.length; i ++ )
+        {
+            t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+        }
+        $(obj).val(t.split("").reverse().join("") + "." + r);
+    }
+</script>
+<script>
+    function resizeWindow()
+    {
+        var winH = $(window).height();
+        var updiv= $("#queryDiv").height();
+        $(".contentDetails").css('min-height',(winH - updiv - 16 - 1) +'px');//这里的div,选择你的那个div
+    }
+    resizeWindow();
+    $(window).resize(function(){
+        resizeWindow();
+    });
+</script>
+</body>
+</html>

+ 258 - 0
src/main/webapp/webpage/modules/workreceiptsregister/workReceiptsRegisterOffice.jsp

@@ -0,0 +1,258 @@
+<%@ 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/echarts.jsp"%>
+
+    <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:messageJBox content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="contentShadow layui-row" id="queryDiv">
+                <form:form id="searchForm" modelAttribute="workReceiptsRegisterOffice" action="${ctx}/workreceiptsregister/workReceiptsRegister/officelist" method="post" class="form-inline">
+                    <%--以下三行照抄--%>
+                    <form:hidden path="company.id"/>
+                    <div class="commonQuery">
+
+                        <div class="layui-item layui-col-sm6">
+                            <label class="layui-form-label">展示方式:</label>
+                            <div class="layui-input-block">
+                                <form:radiobutton class="i-checks" path="ext" checked="true" label="按部门" id="extleft" value="0"/>
+                                <form:radiobutton  class="i-checks" path="ext" id="ext1" label="按月份" value="1"/>
+                            </div>
+                        </div>
+                        <div class="layui-item layui-col-sm6">
+                            <label class="layui-form-label">显示样式:</label>
+                            <div class="layui-input-block">
+                                <input type="radio" class="i-checks" name="extright" checked id="cssExt" value="0">
+                                <label for="cssExt">列表</label>
+                                <input type="radio" class="i-checks" name="extright" id="cssExt1" value="1">
+                                <label for="cssExt1">柱图</label>
+                                <input type="radio" class="i-checks" name="extright"  id="cssExt2" value="2">
+                                <label for="cssExt2">饼图</label>
+                                <input type="radio" class="i-checks" name="extright" id="cssExt3" value="3">
+                                <label for="cssExt3">折线图</label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="commonQuery">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">部门:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:treeselect id="companyId" name="officeId" value="${workReceiptsRegisterOffice.officeId}" labelName="name" labelValue="${workReceiptsRegisterOffice.name}"
+                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">登记日期:</label>
+                            <div class="layui-input-block">
+                                <input id="receiptDate" name="receiptDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+                                       value="${workReceiptsRegisterOffice.receiptDate}"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item athird">
+                            <div class="input-group">
+                                <button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearchs()">重置</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" id="frametable">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <shiro:hasPermission name="workreceiptsregister:workReceiptsRegister:countExport">
+                        <table:exportExcel url="${ctx}/workreceiptsregister/workReceiptsRegister/exportOffice"></table:exportExcel><!-- 导出按钮 -->
+                    </shiro:hasPermission>
+                    <c:choose>
+                        <c:when test="${not empty backState}">
+                            <a class="nav-btn nav-btn-refresh" onClick="javascript :history.back(-1);"  data-toggle="tooltip" data-placement="left" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>
+                        </c:when>
+                    </c:choose>
+                    <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 id="echarts">
+            <%--柱图--%>
+            <div id="bar_normal" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none" class="main000">
+                <echarts:bar id="bar_normal" title="收入统计表" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="分公司" yAxisName="收款金额(元)"/></div>
+            <%--饼图--%>
+            <div id="pie"  style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none" class="main000">
+                <echarts:pie id="pie" title="收入统计表" subtitle="" orientData="${orientData}"/></div>
+            <%--折线图--%>
+            <div id="line_normal" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none"  class="main000">
+                <echarts:line id="line_normal" title="收入统计表" subtitle="" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="公司名称" yAxisName="收款金额(元)" /></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:${list.size()},
+            elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {field:'officeName',align:'center',title: '${colName}', templet:function(d){
+                        if(d.officeName!='合计'&&'${colName}'!="月份"){
+                            var xml = "<a class=\"attention-info\" onclick=\"isSign('"+d.id+"','"+d.sign+"')\" >" +
+                                "<span title=" + d.officeName + ">" + d.officeName + "</span></a>";
+                            return xml;
+                        }else{
+                            return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                        }
+                    }}
+                ,{field:'money',align:'center', title: '收款金额', templet:function(d){
+                        return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty list}">
+                <c:forEach items="${list}" var="workReceiptsRegisterCompany" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workReceiptsRegisterCompany.id}",
+                    "comId":"${workReceiptsRegisterOffice.id}",
+                    "officeName":<c:choose>
+                        <c:when test="${colName == '月度'}">
+                        "${workReceiptsRegisterCompany.datestr}"
+                    </c:when>
+                    <c:otherwise>
+                    "${workReceiptsRegisterCompany.name}"
+                    </c:otherwise>
+                    </c:choose>
+                    ,"money":"<fmt:formatNumber value="${workReceiptsRegisterCompany.receiptAmt}" pattern="#,#00.00"/>"
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+    })
+    resizeListTable();
+</script>
+
+
+<script>
+    function isSign(officeId){
+        $.ajax({
+            type:'post',
+            url:'${ctx}/workreimbursementcount/workInvoiceCount/officeSignlist',
+            data:{
+                "officeId":officeId
+            },
+            success:function(data){
+                if(data==0){
+                    window.location.href='${ctx}/workreceiptsregister/workReceiptsRegister/infolist?officeId='+officeId;
+                }else{
+                    window.location.href='${ctx}/workreceiptsregister/workReceiptsRegister/officelist?companyId='+officeId;
+                }
+            }
+        })
+    }
+    function resetSearchs(){//重置,页码清零
+        $("#extleft").iCheck('check');
+        $("#pageNo").val(0);
+        $("#searchForm div.query input").val("");
+        $("#searchForm div.query select").val("");
+        $("#searchForm").submit();
+        return false;
+    }
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#cus_name").show();
+        $("#cus_name").siblings().hide();
+        $("#frametable").show();//列表
+
+        $("input[name='extright']").on('ifChecked', function(event){
+            var obj=$("input:radio[name='extright']:checked").val();
+            changeStyle(obj);
+        });
+        //搜索框收放
+        $('#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: '#receiptDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date',
+            format:'yyyy'
+        });
+        var companyId = $(document.getElementById("company.id")).val();
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+    function changeStyle(obj){
+        if(obj==0){
+            $("#frametable").show();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==1){
+            $("#frametable").hide();//列表
+            $("#bar_normal").show();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==2){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").show();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==3){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").show();//折线
+        }
+    }
+</script>
+</body>
+</html>

+ 136 - 0
src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseAudit.jsp

@@ -0,0 +1,136 @@
+<%@ 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">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+              if(obj == 1){
+                  $('#flag').val('yes');
+              }else{
+                  $('#flag').val('no');
+              }
+			  $("#inputForm").submit();
+			  return true;
+		  }else {
+              parent.layer.msg("信息未填写完整!", {icon: 5});
+          }
+		  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 >
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workReceiptsRevise" action="${ctx}/workreceiptsrevise/workReceiptsRevise/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}"/>
+
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整部门:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workReceiptsRevise.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整编号:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workReceiptsRevise.officeNum}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${workReceiptsRevise.reviseDate}" pattern="yyyy年MM月dd日" type="date" dateStyle="full"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整人:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.userName}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${fns:getDictLabel(workReceiptsRevise.reviseType, 'revise_type','')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调出合同:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.workContractInfo.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调入部门:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.inreviseOffice.name}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatNumber value="${workReceiptsRevise.reviseMoney}" pattern="#,#00.00"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<textarea  htmlEscape="false" rows="4" readonly="true"    class="form-control ">${workReceiptsRevise.remarks}</textarea>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row lw8">
+				<div class="form-group-label"><h2>审批意见</h2></div>
+				<div class="layui-item layui-col-sm12  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" />
+						<input type="file" name="upload_files" style="display: none;">
+					</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="${workReceiptsRevise.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workReceiptsRevise.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 163 - 0
src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseForm.jsp

@@ -0,0 +1,163 @@
+<%@ 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{
+			left:0;
+			top:40px;
+		}
+	</style>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 2){
+                    $("#inputForm").attr("action","${ctx}/workreceiptsrevise/workReceiptsRevise/store");
+                }else{
+                    $("#inputForm").attr("action","${ctx}/workreceiptsrevise/workReceiptsRevise/save");
+                }
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            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: '#reviseDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+			        });
+            $("#reviseType").change(function(){
+                if($(this). val()== 1 || $(this). val()== 2 || $(this). val()== 3 || $(this). val()== 4){
+                    console.log($(this). val()+"----------2");
+                    $("#workContractInfoName").attr("class","form-control layui-input required");
+                    document.getElementById("workContractInfoName").disabled=false;
+                    document.getElementById("workContractInfoId").disabled=false;
+                    $("#inreviseOfficeName").attr("class","form-control layui-input");
+                    $("#td1").removeClass("hide");
+                    $("#td2").addClass("hide");
+                    if($(this). val()== 1){
+                        $("#td3").removeClass("hide");
+                        $("#td4").addClass("hide");
+                        $("#inreviseOfficeName").attr("class","form-control layui-input required");
+					}
+                }else{
+                    console.log($(this). val()+"----------1");
+                    $("#workContractInfoName").attr("class","form-control layui-input");
+                    $("#inreviseOfficeName").attr("class","form-control layui-input");
+                    document.getElementById("workContractInfoName").disabled=true;
+                    document.getElementById("workContractInfoId").disabled=true;
+                    $("#td1").addClass("hide");
+                    $("#td2").removeClass("hide");
+                    $("#td3").addClass("hide");
+                    $("#td4").removeClass("hide");
+				}
+            });
+		});
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workReceiptsRevise" action="${ctx}/workreceiptsrevise/workReceiptsRevise/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<%--<sys:message content="${message}"/>--%>
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整部门:</label>
+					<div class="layui-input-block">
+						<form:input id="officeName" path="officeName" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整编号:</label>
+					<div class="layui-input-block">
+						<form:input id="officeNum" path="officeNum" 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">
+						<input id="reviseDate" name="reviseDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon required"
+							   value="<fmt:formatDate value="${workReceiptsRevise.reviseDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整人:</label>
+					<div class="layui-input-block">
+						<form:input id="userName" path="userName" 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:select id="reviseType" path="reviseType" class="form-control simple-select required">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('revise_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调出合同:</label>
+					<div class="layui-input-block with-icon" id="td1">
+						<sys:gridselectrecord url="${ctx}/project/projectRecords/selectcontract" id="workContractInfo" name="workContractInfo.id"  value="${workReceiptsRevise.workContractInfo.id}"  title="选择合同" labelName="workContractInfo.name"
+											  labelValue="${workReceiptsRevise.workContractInfo.name}" cssClass="form-control layui-input " fieldLabels="合同" fieldKeys="name" searchLabel="合同名称" searchKey="name" ></sys:gridselectrecord>
+					</div>
+					<div class="layui-input-block hide" id="td2">
+						<form:input path="" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调入部门:</label>
+					<div class="layui-input-block with-icon" id="td3">
+						<sys:treeselect id="inreviseOffice" name="inreviseOffice.id" value="${workReceiptsRevise.inreviseOffice.id}" labelName="inreviseOffice.name"
+										labelValue="${workReceiptsRevise.inreviseOffice.name}"
+										title="部门" url="/sys/office/treeDataAlls?type=2" cssClass="form-control layui-input"
+										allowClear="true"/>
+					</div>
+					<div class="layui-input-block hide" id="td4">
+						<input  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 path="reviseMoney" htmlEscape="false" class="form-control required number  layui-input"/><%-- pattern="#.00"--%>
+					</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"   maxlength="64" class="form-control "/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+	</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 136 - 0
src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseInvalidAudit.jsp

@@ -0,0 +1,136 @@
+<%@ 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">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+              if(obj == 1){
+                  $('#flag').val('yes');
+              }else{
+                  $('#flag').val('no');
+              }
+			  $("#inputForm").submit();
+			  return true;
+		  }else {
+              parent.layer.msg("信息未填写完整!", {icon: 5});
+          }
+		  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 >
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workReceiptsRevise" action="${ctx}/workreceiptsrevise/workReceiptsRevise/inauditSaveAudit" 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}"/>
+
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整部门:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workReceiptsRevise.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整编号:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workReceiptsRevise.officeNum}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${workReceiptsRevise.reviseDate}" pattern="yyyy年MM月dd日" type="date" dateStyle="full"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整人:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.userName}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${fns:getDictLabel(workReceiptsRevise.reviseType, 'revise_type','')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调出合同:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.workContractInfo.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调入部门:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.inreviseOffice.name}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatNumber value="${workReceiptsRevise.reviseMoney}" pattern="#,#00.00"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<textarea  htmlEscape="false" rows="4" readonly="true"    class="form-control ">${workReceiptsRevise.remarks}</textarea>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row lw8">
+				<div class="form-group-label"><h2>审批意见</h2></div>
+				<div class="layui-item layui-col-sm12  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" />
+						<input type="file" name="upload_files" style="display: none;">
+					</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="${workReceiptsRevise.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workReceiptsRevise.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 325 - 0
src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseInvalidList.jsp

@@ -0,0 +1,325 @@
+<%@ 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(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: '#reviseDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+	            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+	        });
+            laydate.render({
+                elem: '#beginContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+		});
+        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: false, //开启最大化最小化按钮
+                skin: 'three-btns',
+                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
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+        }
+        function openDialogreplay(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: false, //开启最大化最小化按钮
+                skin: 'two-btns',
+                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
+                    }
+
+                },
+                cancel: function(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%;
+		}
+	</style>
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
+				<ul class="list-tabs" >
+					<li ><a href="${ctx}/workreceiptsrevise/workReceiptsRevise/list">收入调整</a></li>
+					<li class="active"><a href="${ctx}/workreceiptsreviseinvalid/workReceiptsReviseInvalid/list">调整作废</a></li>
+				</ul>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+	<form:form id="searchForm" modelAttribute="workReceiptsRevise" action="${ctx}/workreceiptsreviseinvalid/workReceiptsReviseInvalid/" 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 lw7">
+			<div class="layui-item query athird">
+				<label class="layui-form-label">调整编号:</label>
+				<div class="layui-input-block">
+					<form:input path="officeNum" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+				</div>
+			</div>
+			<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('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+				<div style="clear:both;"></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" class="lw8" style="clear:both;display:none;">
+			<div class="layui-item query athird">
+				<label class="layui-form-label">调整日期:</label>
+				<div class="layui-input-block">
+					<input id="beginContractDate" name="beginContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+						   value="<fmt:formatDate value="${workReceiptsRevise.beginContractDate}" pattern="yyyy-MM-dd"/>"/>
+					</input>
+					<span class="group-sep">-</span>
+					<input id="endContractDate" name="endContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+						   value="<fmt:formatDate value="${workReceiptsRevise.endContractDate}" pattern="yyyy-MM-dd"/>"/>
+					</input>
+				</div>
+			</div>
+			<div class="layui-item query athird">
+				<label class="layui-form-label">调整类型:</label>
+				<div class="layui-input-block">
+					<form:select path="reviseType"  class="form-control simple-select">
+						<form:option value="" label=""/>
+						<form:options items="${fns:getDictList('revise_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+				<div style="clear:both;"></div>
+			</div>
+			<div class="layui-item query athird">
+				<label class="layui-form-label">调整部门:</label>
+				<div class="layui-input-block">
+					<form:input path="officeName" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+				</div>
+			</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: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'officeNum',align:'center',sort:true,title: '调整编号',width:160,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看收入调整', '${ctx}/workreceiptsrevise/workReceiptsRevise/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.officeNum + ">" + d.officeNum + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'officeName',align:'center', title: '调整部门',width:160,templet:function(d){
+                    return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                }}
+                ,{field:'reviseType',align:'center', title: '调整类型',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.reviseType +"'>" + d.reviseType + "</span>";
+                }}
+                ,{field:'reviseMoney',align:'center', sort:true,title: '调整金额',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.reviseMoney +"'>" + d.reviseMoney + "</span>";
+                }}
+                ,{field:'reviseDate', align:'center',sort:true,title: '调整日期',width:90,templet:function(d){
+                    return "<span title='"+ d.reviseDate +"'>" + d.reviseDate + "</span>";
+                }}
+                ,{field:'status',align:'center', title: '状态', width:70,templet:function(d){
+                    var st = getAuditInvalidState(d.status)
+                    var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workreceiptsrevise/workReceiptsRevise/getInvalidProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                    return xml;
+                }}
+                // ,{fixed: 'right',align:'center', toolbar: '#op',title:"操作"}
+                ,{align:'center',title:"操作",width:130,templet:function(d){
+                    ////对操作进行初始化
+                    var xml = "";
+                    if(d.cancancel != undefined && d.cancancel == "1")
+                        xml += "<a href=\"${ctx}/workreceiptsrevise/workReceiptsRevise/cancelInvalidateInvalid?id=" + d.id + "\" 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=\"openDialogreplay('修改收入调整', '${ctx}/workreceiptsrevise/workReceiptsRevise/form?id="+ d.id + "&tabId=5','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit3 != undefined && d.canedit3 == "1")
+                        xml += "<a href=\"${ctx}/workreceiptsrevise/workReceiptsRevise/invalid?id=" + d.id + "\" onclick=\"return confirmx('确认要重新发起作废申请吗?', this.href)\"   class=\"op-btn op-btn-cancel\"><i class=\"glyphicon glyphicon-share-alt\"></i> 送审</a>";
+                    if(d.candelete != undefined && d.candelete == "1")
+                        xml +="<a href=\"${ctx}/workreceiptsrevise/workReceiptsRevise/deleteInvalid?id=" + d.id + "\" 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="workReceiptsRevise" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workReceiptsRevise.id}"
+                    ,"officeNum":"${workReceiptsRevise.officeNum}"
+                    ,"officeName":"${workReceiptsRevise.office.name}"
+                    ,"reviseType":"${fns:getDictLabel(workReceiptsRevise.reviseType, 'revise_type', '')}"
+                    ,"reviseMoney":"<fmt:formatNumber value="${workReceiptsRevise.reviseMoney}" pattern="#,#00.00"/>"
+                    ,"reviseDate":"<fmt:formatDate value="${workReceiptsRevise.reviseDate}" pattern="yyyy-MM-dd"/>"
+                    ,"status":"${workReceiptsRevise.invalidStatus}"
+                    <c:if test="${fns:getUser().id == workReceiptsRevise.createBy.id}">
+                    <c:if test="${workReceiptsRevise.invalidStatus == '2' }">,"cancancel":"1"</c:if>
+                    <c:if test="${workReceiptsRevise.invalidStatus == '5'}">,"invalid":"1"</c:if>
+                    <shiro:hasPermission name="workcontractrecord:workContractRecord:edit"><c:choose>
+                    <c:when test="${workReceiptsRevise.invalidStatus == '4'}">,"canedit2":"1"</c:when>
+                    <c:when test="${workReceiptsRevise.invalidStatus == '3'}">,"canedit3":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="workcontractrecord:workContractRecord:del"><c:choose>
+                    <c:when test="${(workReceiptsRevise.invalidStatus == '1' or workReceiptsRevise.invalidStatus == '3' or workReceiptsRevise.invalidStatus == '4')}">,"candelete":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 126 - 0
src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseInvalidModify.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 src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+              if(obj == 2){
+                  $("#flag").val("no");
+              }else{
+                  $("#flag").val("yes");
+              }
+			  $("#inputForm").submit();
+			  return true;
+		  }else {
+              parent.layer.msg("信息未填写完整!", {icon: 5});
+          }
+		  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 >
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workReceiptsRevise" action="${ctx}/workreceiptsrevise/workReceiptsRevise/inauditSaveAudit" 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}"/>
+
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整部门:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workReceiptsRevise.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整编号:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workReceiptsRevise.officeNum}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${workReceiptsRevise.reviseDate}" pattern="yyyy年MM月dd日" type="date" dateStyle="full"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整人:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.userName}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${fns:getDictLabel(workReceiptsRevise.reviseType, 'revise_type','')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调出合同:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.workContractInfo.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调入部门:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.inreviseOffice.name}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatNumber value="${workReceiptsRevise.reviseMoney}" pattern="#,#00.00"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<textarea  htmlEscape="false" rows="4" readonly="true"    class="form-control ">${workReceiptsRevise.remarks}</textarea>
+					</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="${workReceiptsRevise.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workReceiptsRevise.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 335 - 0
src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseList.jsp

@@ -0,0 +1,335 @@
+<%@ 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(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: '#reviseDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+	            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+	        });
+            laydate.render({
+                elem: '#beginContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+		});
+        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: false, //开启最大化最小化按钮
+                skin: 'three-btns',
+                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
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+        }
+        function openDialogreplay(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: false, //开启最大化最小化按钮
+                skin: 'two-btns',
+                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
+                    }
+
+                },
+                cancel: function(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%;
+		}
+	</style>
+</head>
+<body class="gray-bg">
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
+				<ul class="list-tabs" >
+					<li class="active"><a href="${ctx}/workreceiptsrevise/workReceiptsRevise/list">收入调整</a></li>
+					<li><a href="${ctx}/workreceiptsreviseinvalid/workReceiptsReviseInvalid/list">调整作废</a></li>
+				</ul>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+	<form:form id="searchForm" modelAttribute="workReceiptsRevise" action="${ctx}/workreceiptsrevise/workReceiptsRevise/" 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 lw7">
+			<div class="layui-item query athird">
+				<label class="layui-form-label">调整编号:</label>
+				<div class="layui-input-block">
+					<form:input path="officeNum" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+				</div>
+			</div>
+			<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('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+				<div style="clear:both;"></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" class="lw8" style="clear:both;display:none;">
+			<div class="layui-item query athird">
+				<label class="layui-form-label">调整日期:</label>
+				<div class="layui-input-block">
+					<input id="beginContractDate" name="beginContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+						   value="<fmt:formatDate value="${workReceiptsRevise.beginContractDate}" pattern="yyyy-MM-dd"/>"/>
+					</input>
+					<span class="group-sep">-</span>
+					<input id="endContractDate" name="endContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+						   value="<fmt:formatDate value="${workReceiptsRevise.endContractDate}" pattern="yyyy-MM-dd"/>"/>
+					</input>
+				</div>
+			</div>
+			<div class="layui-item query athird">
+				<label class="layui-form-label">调整类型:</label>
+				<div class="layui-input-block">
+					<form:select path="reviseType"  class="form-control simple-select">
+						<form:option value="" label=""/>
+						<form:options items="${fns:getDictList('revise_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+				<div style="clear:both;"></div>
+			</div>
+			<div class="layui-item query athird">
+				<label class="layui-form-label">调整部门:</label>
+				<div class="layui-input-block">
+					<form:input path="officeName" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>
+				</div>
+			</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="workreceiptsrevise:workReceiptsRevise:add">
+						<button class="nav-btn nav-btn-add" title="收入调整" onclick="openDialogre('收入调整','${ctx}/workreceiptsrevise/workReceiptsRevise/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>
+					</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: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'officeNum',align:'center',sort:true,title: '调整编号',width:160,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看收入调整', '${ctx}/workreceiptsrevise/workReceiptsRevise/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.officeNum + ">" + d.officeNum + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'officeName',align:'center', title: '调整部门',width:160,templet:function(d){
+                    return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                }}
+                ,{field:'reviseType',align:'center', title: '调整类型',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.reviseType +"'>" + d.reviseType + "</span>";
+                }}
+                ,{field:'reviseMoney',align:'center', sort:true,title: '调整金额',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.reviseMoney2 +"'>" + d.reviseMoney2 + "</span>";
+                }}
+                ,{field:'reviseDate', align:'center',sort:true,title: '调整日期',width:90,templet:function(d){
+                    return "<span title='"+ d.reviseDate +"'>" + d.reviseDate + "</span>";
+                }}
+                ,{field:'status',align:'center', title: '状态', width:70,templet:function(d){
+                    var st = getAuditState(d.status)
+                    var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workreceiptsrevise/workReceiptsRevise/getProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                    return xml;
+                }}
+                // ,{fixed: 'right',align:'center', toolbar: '#op',title:"操作"}
+                ,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
+                    ////对操作进行初始化
+                    var xml = "";
+                    if(d.cancancel != undefined && d.cancancel == "1")
+                        xml += "<a href=\"${ctx}/workreceiptsrevise/workReceiptsRevise/cancelInvalidate?id=" + d.id + "\" onclick=\"return confirmx('确认要强制撤回?', this.href)\"   class=\"op-btn op-btn-cancel\"><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
+                    if(d.invalid != undefined && d.invalid == "1")
+                        xml += "<a href=\"${ctx}/workreceiptsrevise/workReceiptsRevise/invalid?id=" + d.id + "\" onclick=\"return confirmx('确认要发起作废申请吗?', this.href)\"   class=\"op-btn op-btn-invalid\"><i class=\"fa fa-trash-o\"></i> 作废</a>";
+                    if(d.canedit1 != undefined && d.canedit1 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogre('修改收入调整', '${ctx}/workreceiptsrevise/workReceiptsRevise/form?id="+ d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit2 != undefined && d.canedit2 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('修改收入调整', '${ctx}/workreceiptsrevise/workReceiptsRevise/form?id="+ d.id + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit3 != undefined && d.canedit3 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请收入调整', '${ctx}/workreceiptsrevise/workReceiptsRevise/form?id=" + d.id + "&tabId=4','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}/workreceiptsrevise/workReceiptsRevise/delete?id=" + d.id + "\" 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="workReceiptsRevise" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workReceiptsRevise.id}"
+                    ,"officeNum":"${workReceiptsRevise.officeNum}"
+                    ,"officeName":"${workReceiptsRevise.office.name}"
+                    ,"reviseType":"${fns:getDictLabel(workReceiptsRevise.reviseType, 'revise_type', '')}"
+                    ,"reviseMoney2":"<fmt:formatNumber value="${workReceiptsRevise.reviseMoney}" pattern="#,#00.00"/>"
+                    ,"reviseMoney":"${workReceiptsRevise.reviseMoney}"
+                    ,"reviseDate":"<fmt:formatDate value="${workReceiptsRevise.reviseDate}" pattern="yyyy-MM-dd"/>"
+                    ,"status":"${workReceiptsRevise.status}"
+                    <c:if test="${fns:getUser().id == workReceiptsRevise.createBy.id}">
+                    <c:if test="${workReceiptsRevise.status == '2' }">,"cancancel":"1"</c:if>
+                    <c:if test="${workReceiptsRevise.status == '5'}">,"invalid":"1"</c:if>
+                    <shiro:hasPermission name="workcontractrecord:workContractRecord:edit"><c:choose>
+                    <c:when test="${workReceiptsRevise.status == '1' }">,"canedit1":"1"</c:when>
+                    <c:when test="${workReceiptsRevise.status == '4'}">,"canedit2":"1"</c:when>
+                    <c:when test="${workReceiptsRevise.status == '3'}">,"canedit3":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="workcontractrecord:workContractRecord:del"><c:choose>
+                    <c:when test="${(workReceiptsRevise.status == '1' or workReceiptsRevise.status == '3' or workReceiptsRevise.status == '4')}">,"candelete":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 165 - 0
src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseModify.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"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 2){
+                    $("#flag").val("no");
+                }else{
+                    $("#flag").val("yes");
+                }
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            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: '#reviseDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            $("#reviseType").change(function(){
+                if($(this). val()== 1 || $(this). val()== 2 || $(this). val()== 3 || $(this). val()== 4){
+                    console.log($(this). val()+"----------2");
+                    $("#workContractInfoName").attr("class","form-control layui-input required");
+                    document.getElementById("workContractInfoName").disabled=false;
+                    document.getElementById("workContractInfoId").disabled=false;
+                    $("#inreviseOfficeName").attr("class","form-control layui-input");
+                    $("#td1").removeClass("hide");
+                    $("#td2").addClass("hide");
+                    if($(this). val()== 1){
+                        $("#td3").removeClass("hide");
+                        $("#td4").addClass("hide");
+                        $("#inreviseOfficeName").attr("class","form-control layui-input required");
+                    }
+                }else{
+                    console.log($(this). val()+"----------1");
+                    $("#workContractInfoName").attr("class","form-control layui-input");
+                    $("#inreviseOfficeName").attr("class","form-control layui-input");
+                    document.getElementById("workContractInfoName").disabled=true;
+                    document.getElementById("workContractInfoId").disabled=true;
+                    $("#td1").addClass("hide");
+                    $("#td2").removeClass("hide");
+                    $("#td3").addClass("hide");
+                    $("#td4").removeClass("hide");
+                }
+            });
+		});
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workReceiptsRevise" action="${ctx}/workreceiptsrevise/workReceiptsRevise/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}"/>--%>
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整部门:</label>
+					<div class="layui-input-block">
+						<form:input id="officeName" path="office.name" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整编号:</label>
+					<div class="layui-input-block">
+						<form:input id="officeNum" path="officeNum" 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">
+						<input id="reviseDate" name="reviseDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon required"
+							   value="<fmt:formatDate value="${workReceiptsRevise.reviseDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整人:</label>
+					<div class="layui-input-block">
+						<form:input id="userName" path="userName" 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:select id="reviseType" path="reviseType" class="form-control simple-select required">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('revise_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调出合同:</label>
+					<div class="layui-input-block with-icon">
+						<sys:gridselectrecord url="${ctx}/workcontractrecord/workContractRecord/selectworkContractInfo" id="workContractInfo" name="workContractInfo.id"  value="${workReceiptsRevise.workContractInfo.id}"  title="选择合同" labelName="workContractInfo.name"
+											  labelValue="${workReceiptsRevise.workContractInfo.name}" cssClass="form-control layui-input " fieldLabels="合同" fieldKeys="name" searchLabel="合同名称" searchKey="name" ></sys:gridselectrecord>
+					</div>
+					<div class="layui-input-block hide" id="td2">
+						<form:input path="" htmlEscape="false" readonly="true" class="form-control 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:treeselect id="inreviseOffice" name="inreviseOffice.id" value="${workReceiptsRevise.inreviseOffice.id}" labelName="inreviseOffice.name"
+										labelValue="${workReceiptsRevise.inreviseOffice.name}"
+										title="部门" url="/sys/office/treeDataAlls?type=2" cssClass="form-control layui-input"
+										allowClear="true" notAllowSelectParent="true"/>
+					</div>
+					<div class="layui-input-block hide" id="td4">
+						<form:input path="" 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 path="reviseMoney" htmlEscape="false" class="form-control required number  layui-input"/><%-- pattern="#.00"--%>
+					</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"   maxlength="64" class="form-control "/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+	</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 15 - 0
src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseTrack.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>
+

+ 112 - 0
src/main/webapp/webpage/modules/workreceiptsrevise/workReceiptsReviseView.jsp

@@ -0,0 +1,112 @@
+<%@ 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 == 2){
+                  $("#inputForm").attr("action","${ctx}/workcontractrecord/workContractRecord/store");
+              }else{
+                  $("#inputForm").attr("action","${ctx}/workcontractrecord/workContractRecord/save");
+              }
+			  $("#inputForm").submit();
+			  return true;
+		  }else {
+              parent.layer.msg("信息未填写完整!", {icon: 5});
+          }
+		  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>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="workReceiptsRevise" action="${ctx}/workreceiptsrevise/workReceiptsRevise/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整部门:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workReceiptsRevise.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整编号:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workReceiptsRevise.officeNum}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${workReceiptsRevise.reviseDate}" pattern="yyyy年MM月dd日" type="date" dateStyle="full"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调整人:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.userName}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${fns:getDictLabel(workReceiptsRevise.reviseType, 'revise_type','')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调出合同:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.workContractInfo.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">调入部门:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workReceiptsRevise.inreviseOffice.name}"/>
+					</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  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatNumber value="${workReceiptsRevise.reviseMoney}" pattern="#,#00.00"/>"/>
+
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<textarea  htmlEscape="false" rows="4" readonly="true"    class="form-control ">${workReceiptsRevise.remarks}</textarea>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 286 - 0
src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleAudit.jsp

@@ -0,0 +1,286 @@
+<%@ 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;
+		}
+		$(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);
+					}
+				}
+			});
+            jQuery.validator.addMethod("percent", function(value, element) {
+                var length = value.length;
+                var phone = /^(100|[1-9]?\d(\.\d\d?)?)%$/;
+                return this.optional(element) || (phone.test(value));
+            }, "请填写正确的百分数");
+
+		});
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+	</script>
+</head>
+<body>
+    <div class="single-form">
+        <div class="container">
+            <form:form id="inputForm" modelAttribute="workReceiptsSettle" action="${ctx}/workreceipts/workReceiptsSettle/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"/>
+                <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">结算部门:</label>
+                        <div class="layui-input-block">
+                            <input name="office.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.office.topCompany}" />
+                            <input name="office.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.office.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算单号:</label>
+                        <div class="layui-input-block">
+                            <div class="input-group">
+                                <input name="num" type="text" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.num}" />
+                                <span class="input-group-btn">
+                                        <label class="form-status"><c:choose><c:when test="${not empty workReceiptsSettle.state}">${fns:getDictLabel(workReceiptsSettle.state, 'audit_state', '')}</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">结算人:</label>
+                        <div class="layui-input-block">
+                            <input name="createBy.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.createBy.name}" />
+                            <input name="createBy.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.createBy.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算日期:</label>
+                        <div class="layui-input-block">
+                            <input name="createDate" type="text" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workReceiptsSettle.createDate}" 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="remarks" htmlEscape="false" rows="3" readonly="true" class="form-control layui-area"/>
+                        </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="contentTable" class="table table-bordered table-condensed">
+                            <thead>
+                            <tr>
+                                <th width="10%"><font style="color: red">*</font>发票号</th>
+                                <th>价税合计</th>
+                                <th>税额</th>
+                                <th width="10%">累计登记金额</th>
+                                <th>结算比例</th>
+                                <th>结算金额</th>
+                                <th>项目名称</th>
+                                <th>合同名称</th>
+                                <th>所属部门</th>
+                                <th width="10%">实际开票单位</th>
+                                <th>确认付款</th>
+                                <th>确认日期</th>
+                            </tr>
+                            </thead>
+                            <tbody id="settleDetailList">
+                            <c:forEach items="${workReceiptsSettle.settleDetailList}" var="row">
+                                <tr>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.number}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.invoice.totalMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.invoice.taxMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.invoice.incomeMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.settlePct}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.settleAmt}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.project.projectName}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.project.workContractInfo.name}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.office.name}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.client.name}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${fns:getDictLabel(row.status, 'settle_status', '未付款')}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatDate value="${row.settleDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                        <script type="text/javascript">
+                            Date.prototype.format = function(fmt) {
+                                var o = {
+                                    "M+" : this.getMonth()+1,                 //月份
+                                    "d+" : this.getDate(),                    //日
+                                    "h+" : this.getHours(),                   //小时
+                                    "m+" : this.getMinutes(),                 //分
+                                    "s+" : this.getSeconds(),                 //秒
+                                    "q+" : Math.floor((this.getMonth()+3)/3), //季度
+                                    "S"  : this.getMilliseconds()             //毫秒
+                                };
+                                if(/(y+)/.test(fmt)) {
+                                    fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
+                                }
+                                for(var k in o) {
+                                    if(new RegExp("("+ k +")").test(fmt)){
+                                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
+                                    }
+                                }
+                                return fmt;
+                            }
+
+                            function bornTemplete(list, idx, tpl, row, idx1){
+                                $(list).append(Mustache.render(tpl, {
+                                    idx: idx, delBtn: true, row: row,
+                                    order:idx1 + 1, idx1:idx1
+                                }));
+                                $(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,idx){
+                                var id = $(prefix+"_id");
+                                var delFlag = $(prefix+"_delFlag");
+                                if (id.val() == ""){
+                                    $(obj).parent().parent().remove();
+                                }else {
+                                    delFlag.val("1");
+                                    $(obj).parent().parent().hide();
+                                }
+                            }
+                        </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="contentTable1" class="table table-bordered table-condensed">
+                            <thead>
+                            <tr>
+                                <th><font style="color: red">*</font>发票代码</th>
+                                <th><font style="color: red">*</font>发票号</th>
+                                <th><font style="color: red">*</font>价税合计</th>
+                                <th><font style="color: red">*</font>税额</th>
+                            </tr>
+                            </thead>
+                            <tbody id="settleInvoiceList">
+                            <c:forEach items="${workReceiptsSettle.settleInvoiceList}" var="row">
+                                <tr>
+                                    <td style='text-align:center;'>
+                                            ${row.code}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.num}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.totalMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.taxRate}" pattern="#,##0.00#"/>
+                                    </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" />
+                            <input type="file" name="upload_files" style="display: none;">
+                        </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="${workReceiptsSettle.act.procInsId}"/>
+                        <act:histoicFlow procInsId="${workReceiptsSettle.act.procInsId}"/>
+                    </div>
+                </div>
+
+                <div class="form-group layui-row page-end"></div>
+        </form:form>
+        </div>
+    </div>
+</body>
+</html>

+ 365 - 0
src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleCNAudit.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">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+
+              if(obj == 1){
+                  $('#flag').val('yes');
+                  if($(document.getElementById("act.taskDefKey")).val()== "cn"){
+                      var settleStatusList = $(".settleStatus");
+                      if(settleStatusList!=null&&settleStatusList.length>0){
+                          for(var i=0;i<settleStatusList.length;i++){
+                              var html = $(settleStatusList[0]).html();
+                              if("未付款"==html.trim()){
+                                  top.layer.msg('请确认付款全部结算明细!', {icon: 0});
+                                  return false;
+                              }
+                          }
+                      }
+                  }
+              }else{
+                  $('#flag').val('no');
+              }
+
+			  $("#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);
+					}
+				}
+			});
+            jQuery.validator.addMethod("percent", function(value, element) {
+                var length = value.length;
+                var phone = /^(100|[1-9]?\d(\.\d\d?)?)%$/;
+                return this.optional(element) || (phone.test(value));
+            }, "请填写正确的百分数");
+
+		});
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+	</script>
+</head>
+<body>
+    <div class="single-form">
+        <div class="container">
+            <form:form id="inputForm" modelAttribute="workReceiptsSettle" action="${ctx}/workreceipts/workReceiptsSettle/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"/>
+                <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">结算部门:</label>
+                        <div class="layui-input-block">
+                            <input name="office.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.office.topCompany}" />
+                            <input name="office.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.office.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算单号:</label>
+                        <div class="layui-input-block">
+                            <div class="input-group">
+                                <input name="num" type="text" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.num}" />
+                                <span class="input-group-btn">
+                                        <label class="form-status"><c:choose><c:when test="${not empty workReceiptsSettle.state}">${fns:getDictLabel(workReceiptsSettle.state, 'audit_state', '')}</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">结算人:</label>
+                        <div class="layui-input-block">
+                            <input name="createBy.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.createBy.name}" />
+                            <input name="createBy.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.createBy.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算日期:</label>
+                        <div class="layui-input-block">
+                            <input name="createDate" type="text" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workReceiptsSettle.createDate}" 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="remarks" htmlEscape="false" rows="3" readonly="true" class="form-control layui-area"/>
+                        </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="contentTable" class="table table-bordered table-condensed">
+                            <thead>
+                            <tr>
+                                <th><font style="color: red">*</font>发票号</th>
+                                <th>价税合计</th>
+                                <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 id="settleDetailList">
+                            <c:forEach items="${workReceiptsSettle.settleDetailList}" var="row" varStatus="varStatus">
+                                <tr>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.number}
+                                    </td>
+                                    <td style='text-align:center;' id="total${varStatus.index}Money">
+                                        <fmt:formatNumber value="${row.invoice.totalMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.invoice.taxMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;' id="income${varStatus.index}Money">
+                                        <fmt:formatNumber value="${row.invoice.incomeMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.settlePct}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.settleAmt}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.project.projectName}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.project.workContractInfo.name}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.office.name}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.client.name}
+                                    </td>
+                                    <td style='text-align:center;' id="settle${varStatus.index}Staus" class="settleStatus">
+                                            ${fns:getDictLabel(row.status, 'settle_status', '未付款')}
+                                    </td>
+                                    <td style='text-align:center;' id="settle${varStatus.index}Date">
+                                        <fmt:formatDate value="${row.settleDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td class="text-center op-td" style="width:60px">
+                                        <div id="confirm${varStatus.index}Button" <c:if test="${row.status == '1'}">hidden="hidden"</c:if>>
+                                            <span class="op-btn op-btn-edit" onclick="confirmPay('${row.invoice.id}','${varStatus.index}');" ><i class="fa fa-edit"></i> 确认</span>
+                                        </div>
+                                        <div id="cancel${varStatus.index}Button" <c:if test="${row.status == null or row.status == '' or row.status == '0'}">hidden="hidden"</c:if>>
+                                            <span class="op-btn op-btn-delete" onclick="cancelPay('${row.invoice.id}','${varStatus.index}');" ><i class="fa fa-trash"></i> 取消</span>
+                                        </div>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                        <script type="text/javascript">
+                            Date.prototype.format = function(fmt) {
+                                var o = {
+                                    "M+" : this.getMonth()+1,                 //月份
+                                    "d+" : this.getDate(),                    //日
+                                    "h+" : this.getHours(),                   //小时
+                                    "m+" : this.getMinutes(),                 //分
+                                    "s+" : this.getSeconds(),                 //秒
+                                    "q+" : Math.floor((this.getMonth()+3)/3), //季度
+                                    "S"  : this.getMilliseconds()             //毫秒
+                                };
+                                if(/(y+)/.test(fmt)) {
+                                    fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
+                                }
+                                for(var k in o) {
+                                    if(new RegExp("("+ k +")").test(fmt)){
+                                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
+                                    }
+                                }
+                                return fmt;
+                            }
+
+                            function confirmPay(invoiceId,idx) {
+                                var totalAmt = "#total"+idx+"Money";
+                                var incomeAmt = "#income"+idx+"Money";
+                                if($(totalAmt).val().trim()!=$(incomeAmt).val().trim()){
+                                    top.layer.msg("发票累计登记金额不等于价税合计,不能确认付款",{icon:2});
+                                    return;
+                                }
+                                var confirmId = "#confirm"+idx+"Button";
+                                var cancelId = "#cancel"+idx+"Button";
+                                var statusId = "#settle"+idx+"Staus";
+                                var settleDate = "#settle"+idx+"Date";
+                                $.ajax({
+                                    url:"${ctx}/workreceipts/workReceiptsSettle/confirmPay",
+                                    data:{"invoiceId":invoiceId,"status":"1","settleId":'${workReceiptsSettle.id}'},
+                                    type:"post",
+                                    success:function(result){
+                                        if(result.success){
+                                            $(confirmId).hide();
+                                            $(cancelId).show();
+                                            $(statusId).html("已付款");
+                                            $(settleDate).html(new Date().format("yyyy-MM-dd"));
+                                            top.layer.msg("确认付款状态成功",{icon:1});
+                                        }else {
+                                            top.layer.msg(result.msg,{icon:1});
+                                        }
+                                    },
+                                    error:function (data) {
+                                        top.layer.msg("更新付款状态异常",{icon:1});
+                                    }
+                                })
+                            }
+
+                            function cancelPay(invoiceId,idx) {
+                                var confirmId = "#confirm"+idx+"Button";
+                                var cancelId = "#cancel"+idx+"Button";
+                                var statusId = "#settle"+idx+"Staus";
+                                var settleDate = "#settle"+idx+"Date";
+                                $.ajax({
+                                    url:"${ctx}/workreceipts/workReceiptsSettle/confirmPay",
+                                    data:{"invoiceId":invoiceId,"status":"0","settleId":'${workReceiptsSettle.id}'},
+                                    type:"post",
+                                    success:function(result){
+                                        if(result.success){
+                                            $(confirmId).show();
+                                            $(cancelId).hide();
+                                            $(statusId).html("未付款");
+                                            $(settleDate).html("");
+                                            top.layer.msg("取消确认付款状态成功",{icon:1});
+                                        }else {
+                                            top.layer.msg(result.msg,{icon:1});
+                                        }
+                                    },
+                                    error:function (data) {
+                                        top.layer.msg("更新付款状态异常",{icon:1});
+                                    }
+                                })
+                            }
+
+                            function bornTemplete(list, idx, tpl, row, idx1){
+                                $(list).append(Mustache.render(tpl, {
+                                    idx: idx, delBtn: true, row: row,
+                                    order:idx1 + 1, idx1:idx1
+                                }));
+                                $(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,idx){
+                                var id = $(prefix+"_id");
+                                var delFlag = $(prefix+"_delFlag");
+                                if (id.val() == ""){
+                                    $(obj).parent().parent().remove();
+                                }else {
+                                    delFlag.val("1");
+                                    $(obj).parent().parent().hide();
+                                }
+                            }
+                        </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="contentTable1" class="table table-bordered table-condensed">
+                            <thead>
+                            <tr>
+                                <th><font style="color: red">*</font>发票代码</th>
+                                <th><font style="color: red">*</font>发票号</th>
+                                <th><font style="color: red">*</font>价税合计</th>
+                                <th><font style="color: red">*</font>税额</th>
+                            </tr>
+                            </thead>
+                            <tbody id="settleInvoiceList">
+                            <c:forEach items="${workReceiptsSettle.settleInvoiceList}" var="row">
+                                <tr>
+                                    <td style='text-align:center;'>
+                                            ${row.code}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.num}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.totalMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.taxRate}" pattern="#,##0.00#"/>
+                                    </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" />
+                            <input type="file" name="upload_files" style="display: none;">
+                        </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="${workReceiptsSettle.act.procInsId}"/>
+                        <act:histoicFlow procInsId="${workReceiptsSettle.act.procInsId}"/>
+                    </div>
+                </div>
+
+                <div class="form-group layui-row page-end"></div>
+        </form:form>
+        </div>
+    </div>
+</body>
+</html>

+ 322 - 0
src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleForm.jsp

@@ -0,0 +1,322 @@
+<%@ 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()){
+
+              if($("#settleDetailList tr:visible").length==0){
+                  top.layer.alert('请至少添加一条结算明细!', {icon: 0});
+                  return false;
+              }
+
+			  $("#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);
+					}
+				}
+			});
+            jQuery.validator.addMethod("percent", function(value, element) {
+                var length = value.length;
+                var phone = /^(100|[1-9]?\d(\.\d\d?)?)%$/;
+                return this.optional(element) || (phone.test(value));
+            }, "请填写正确的百分数");
+		});
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+	</script>
+</head>
+<body>
+    <div class="single-form">
+        <div class="container">
+            <form:form id="inputForm" modelAttribute="workReceiptsSettle" action="${ctx}/workreceipts/workReceiptsSettle/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">结算部门:</label>
+                        <div class="layui-input-block">
+                            <input name="office.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.office.topCompany}" />
+                            <input name="office.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.office.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算单号:</label>
+                        <div class="layui-input-block">
+                            <div class="input-group">
+                                <input name="num" type="text" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.num}" />
+                                <span class="input-group-btn">
+                                    <label class="form-status"><c:choose><c:when test="${not empty workReceiptsSettle.state}">${fns:getDictLabel(workReceiptsSettle.state, 'audit_state', '')}</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">结算人:</label>
+                        <div class="layui-input-block">
+                            <input name="createBy.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.createBy.name}" />
+                            <input name="createBy.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.createBy.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算日期:</label>
+                        <div class="layui-input-block">
+                            <input name="createDate" type="text" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workReceiptsSettle.createDate}" 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="remarks" htmlEscape="false" rows="3"  maxlength="255"  class="form-control layui-area"/>
+                        </div>
+                    </div>
+                </div>
+                <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>结算明细</h2></div>
+                    <div class="layui-item nav-btns">
+                        <a class="nav-btn nav-btn-add" onclick="addRow('#settleDetailList', settleDetailIdx, settleDetailTpl);"><i class="fa fa-plus"></i>&nbsp;新增</a>
+                    </div>
+                    <div class="layui-item layui-col-xs12 form-table-container" >
+                        <table id="contentTable" class="table table-bordered table-condensed no-bottom-margin can-edit">
+                            <thead>
+                            <tr>
+                                <th class="hide"></th>
+                                <th width="10%"><font style="color: red">*</font>发票号</th>
+                                <th>价税合计</th>
+                                <th>税额</th>
+                                <th width="10%">累计登记金额</th>
+                                <th>结算比例</th>
+                                <th>结算金额</th>
+                                <th>项目名称</th>
+                                <th>合同名称</th>
+                                <th>所属部门</th>
+                                <th width="10%">实际开票单位</th>
+                                <th>确认付款</th>
+                                <th>确认日期</th>
+                                <th width="8%">操作</th>
+                            </tr>
+                            </thead>
+                            <tbody id="settleDetailList">
+                            </tbody>
+                        </table>
+                        <script type="text/template" id="settleDetailTpl">//<!--
+                            <tr id="settleDetailList{{idx}}">
+                            <td class="hide">
+                            <input id="settleDetailList{{idx}}_id" name="settleDetailList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                            <input id="settleDetailList{{idx}}_delFlag" name="settleDetailList[{{idx}}].delFlag" type="hidden" value="0"/>
+                            </td>
+                            <td>
+                                <sys:gridselectInvoice url="${ctx}/workreceipts/workReceiptsSettle/selectinvoice" type="" isTotal="1" id="settleDetailList{{idx}}_invoice" name="settleDetailList[{{idx}}].invoice.id"  value="{{row.invoice.id}}"  title="选择发票" labelName="settleDetailList[{{idx}}].invoice.number"
+                                                      companyId="${workReceiptsSettle.office.id}"  idx="{{idx}}"	labelValue="{{row.invoice.number}}" cssClass="form-control required" fieldLabels="发票编号" fieldKeys="number" searchLabel="发票编号" searchKey="number" ></sys:gridselectInvoice>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_invoiceAmt" name="settleDetailList[{{idx}}].invoice.totalMoney" type="text" value="{{row.invoice.totalMoney}}" onchange="formatNum(this);" readOnly="true"  class="form-control money"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_taxMoney" name="settleDetailList[{{idx}}].invoice.taxMoney" type="text" value="{{row.invoice.taxMoney}}" onchange="formatNum(this);" readOnly="true"  class="form-control money"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_incomeAmt" name="settleDetailList[{{idx}}].invoice.incomeMoney" type="text" value="{{row.invoice.incomeMoney}}" onchange="formatNum(this);" readOnly="true"  class="form-control required money"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_settlePct" name="settleDetailList[{{idx}}].settlePct" type="text" value="{{row.settlePct}}"  onchange="caculateAmt('#settleDetailList{{idx}}_');" class="form-control required percent"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_settleAmt" type="text" value="{{row.settleAmt}}" onchange="formatNum(this);" readOnly="true"  class="form-control required money"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_project" type="text" value="{{row.invoice.workInvoice.project.projectName}}"  readOnly="true"  class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_contract" type="text" value="{{row.invoice.workInvoice.project.workContractInfo.name}}"  readOnly="true"  class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_office" type="text" value="{{row.invoice.workInvoice.office.name}}"  readOnly="true"  class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_client" type="text" value="{{row.invoice.workInvoice.client.name}}"  readOnly="true"  class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_statusStr" name="settleDetailList[{{idx}}].statusStr" type="text" value="${fns:getDictLabel(row.status, 'settle_status', '未确认')}"  readOnly="true" class="form-control"/>
+                                <input type="hidden" id="settleDetailList{{idx}}_status" name="settleDetailList[{{idx}}].status" type="text" value="{{row.status}}" readOnly="true" class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_settleDate" name="settleDetailList[{{idx}}].settleDate" type="text" value="<fmt:formatDate value="${row.settleDate}" pattern="yyyy-MM-dd"/>"  readOnly="true"  class="form-control "/>
+                            </td>
+                            <td class="text-center op-td">
+                            <span class="op-btn op-btn-delete" onclick="delRow(this, '#settleDetailList{{idx}}')" ><i class="fa fa-trash"></i> 取消</span>
+                            </td>
+                            </tr>//-->
+                        </script>
+                        <script type="text/javascript">
+                            var settleDetailIdx = 0, settleDetailTpl = $("#settleDetailTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                            var data;
+                            $(document).ready(function() {
+                                data = ${fns:toJson(workReceiptsSettle.settleDetailList)};
+                                if(data!=null) {
+                                    for (var i = 0; i < data.length; i++) {
+                                        addRow('#settleDetailList', settleDetailIdx, settleDetailTpl, data[i]);
+                                        $(":input.money").change();
+                                    }
+                                }
+                            });
+
+                            Date.prototype.format = function(fmt) {
+                                var o = {
+                                    "M+" : this.getMonth()+1,                 //月份
+                                    "d+" : this.getDate(),                    //日
+                                    "h+" : this.getHours(),                   //小时
+                                    "m+" : this.getMinutes(),                 //分
+                                    "s+" : this.getSeconds(),                 //秒
+                                    "q+" : Math.floor((this.getMonth()+3)/3), //季度
+                                    "S"  : this.getMilliseconds()             //毫秒
+                                };
+                                if(/(y+)/.test(fmt)) {
+                                    fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
+                                }
+                                for(var k in o) {
+                                    if(new RegExp("("+ k +")").test(fmt)){
+                                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
+                                    }
+                                }
+                                return fmt;
+                            }
+
+                            function addRow(list, idx, tpl, row){
+                                var idx1 = $("#settleDetailList tr").length +1;
+                                bornTemplete(list, idx, tpl, row, idx);
+                                settleDetailIdx +=1;
+                                var stausId = "#settleDetailList"+idx+"_status";
+                                var status = $(stausId).val();
+                                if(status==null||status==''){
+                                    $(stausId).val(0);
+                                }
+                            }
+
+                            function bornTemplete(list, idx, tpl, row, idx1){
+                                $(list).append(Mustache.render(tpl, {
+                                    idx: idx, delBtn: true, row: row,
+                                    order:idx1 + 1, idx1:idx1
+                                }));
+                                $(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,idx){
+                                var id = $(prefix+"_id");
+                                var delFlag = $(prefix+"_delFlag");
+                                if (id.val() == ""){
+                                    $(obj).parent().parent().remove();
+                                }else {
+                                    delFlag.val("1");
+                                    $(obj).parent().parent().hide();
+                                }
+                            }
+
+                            function getAllInvoice() {
+                                var invoices = $("#settleDetailList tr:visible .invoiceId");
+                                var invoiceIds ="";
+                                for (var i=0;i<invoices.length;i++){
+                                    if($(invoices[i]).val()!=null&&$(invoices[i]).val()!=''){
+                                        invoiceIds+=$(invoices[i]).val();
+                                        invoiceIds+=",";
+                                    }
+                                }
+                                invoiceIds = invoiceIds.slice(0,invoiceIds.length-1);
+                                return invoiceIds;
+                            }
+
+                            function setInvoiceValue(obj,idx) {
+                                $.ajax({
+                                    type:'post',
+                                    url:'${ctx}/workinvoicedetail/workInvoiceDetail/ajaxInvoice',
+                                    data:{
+                                        "id":obj.id
+                                    },
+                                    success:function(data){
+                                        if(data.success){
+                                            var pref = "#settleDetailList"+idx+"_";
+                                            var amtId = pref+"invoiceAmt";
+                                            var taxId = pref+"taxMoney";
+                                            var incomeId = pref+"incomeAmt";
+                                            var project = pref+"project";
+                                            var contract = pref+"contract";
+                                            var office = pref+"office";
+                                            var client = pref+"client";
+                                            $(amtId).val(data.body.invoice.totalMoney);
+                                            $(taxId).val(data.body.invoice.taxMoney);
+                                            $(incomeId).val(data.body.invoice.incomeMoney);
+                                            $(project).val(data.body.invoice.workInvoice.project.projectName);
+                                            $(contract).val(data.body.invoice.workInvoice.project.workContractInfo.name);
+                                            $(office).val(data.body.invoice.workInvoice.office.name);
+                                            $(client).val(data.body.invoice.workInvoice.client.name);
+                                            $(":input.money").change();
+                                            caculateAmt(pref);
+                                        }
+                                    }
+                                })
+                            }
+
+                            function caculateAmt(prefix) {
+                                var settlePctId = prefix+"settlePct";
+                                var settleAmtId = prefix+"settleAmt";
+                                var incomeId = prefix+"incomeAmt";
+                                var settlePct = $(settlePctId).val();
+                                var  imcomeAmt = $(incomeId).val();
+                                if(settlePct != null&&settlePct!=''&&imcomeAmt!=null&&imcomeAmt!=''){
+                                    var pct = (settlePct.replace("%",""))/100;
+                                    var amt = imcomeAmt.replace(/,/g,"");
+                                    $(settleAmtId).val(amt*pct);
+                                }else {
+                                    $(settleAmtId).val(0);
+                                }
+                                $(settleAmtId).change();
+                            }
+                        </script>
+                    </div>
+                </div>
+        </form:form>
+        </div>
+    </div>
+</body>
+</html>

+ 404 - 0
src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleKPAudit.jsp

@@ -0,0 +1,404 @@
+<%@ 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');
+                  if($(document.getElementById("act.taskDefKey")).val()== "fpgly" && $("#settleInvoiceList tr:visible").length==0){
+                      top.layer.msg('请至少添加一条分所开票明细!', {icon: 5});
+                      return false;
+                  }
+                  if(!validateSum()){
+                      top.layer.msg("分所开票价税合计金额不等于结算明细结算金额", {icon: 5});
+                      return false;
+                  }
+              }else{
+                  $('#flag').val('no');
+              }
+
+			  $("#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);
+					}
+				}
+			});
+            jQuery.validator.addMethod("percent", function(value, element) {
+                var length = value.length;
+                var phone = /^(100|[1-9]?\d(\.\d\d?)?)%$/;
+                return this.optional(element) || (phone.test(value));
+            }, "请填写正确的百分数");
+            jQuery.validator.addMethod("invoiceNum", function(value, element) {
+                if(value.length!=8)return true;
+                var invoiceNumArr = $("#settleInvoiceList tr:visible input.invoiceNum");
+                var id = $(element).attr("id");
+                for(var i=0;i<invoiceNumArr.length;i++){
+                    if(id == $(invoiceNumArr[i]).attr("id")){
+                        continue;
+                    }
+                    if(value==$(invoiceNumArr[i]).val()){
+                        return false;
+                    }
+                }
+                var flag = true;
+                $.ajax({
+                    url:"${ctx}/workreceipts/workReceiptsSettle/invoiceNum",
+                    data:{
+                        "invoiceNum":value,
+                        "comId":'${workReceiptsSettle.company.id}',
+                        "id":'${workReceiptsSettle.id}'
+                    },
+                    async:false,
+                    type:"post",
+                    success:function (result) {
+                        if(result.success && !result.body.isUsed){
+                            flag=true;
+                        }else {
+                            flag=false;
+                        }
+                    },
+                    error:function (result) {
+                        top.layer.msg('异步校验发票号异常!请稍后重试', {icon: 0});
+                        flag=false;
+                    }
+                })
+                return flag;
+            }, "发票号重复,请填写正确的发票号");
+		});
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+
+        function validateSum() {
+            var rgs = $("#settleInvoiceList tr:visible td:nth-child(4) :input");
+            var totalInvoiceAmt = 0;
+            for (var i=0;i<rgs.length;i++){
+                totalInvoiceAmt += parseFloat($(rgs[i]).val().replace(/[^\d\.-]/g, ""));
+            }
+            if(totalInvoiceAmt!=totalAmt){
+                return false;
+            }
+            return true;
+        }
+        function validateAmt(obj) {
+            var thisVal = parseFloat($(obj).val());
+            var rgs = $("#settleInvoiceList tr:visible td:nth-child(4) :input");
+            var totalInvoiceAmt = 0;
+            for (var i=0;i<rgs.length;i++){
+                totalInvoiceAmt += parseFloat($(rgs[i]).val().replace(/[^\d\.-]/g, ""));
+            }
+
+            if(totalInvoiceAmt>totalAmt){
+                parent.layer.msg("分所开票价税合计金额不能大于结算明细结算金额", {icon: 5});
+                $(obj).val(thisVal-(totalInvoiceAmt-totalAmt));
+            }
+            formatNum(obj);
+            return;
+        }
+	</script>
+</head>
+<body>
+    <div class="single-form">
+        <div class="container">
+            <form:form id="inputForm" modelAttribute="workReceiptsSettle" action="${ctx}/workreceipts/workReceiptsSettle/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"/>
+                <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">结算部门:</label>
+                        <div class="layui-input-block">
+                            <input name="office.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.office.topCompany}" />
+                            <input name="office.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.office.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算单号:</label>
+                        <div class="layui-input-block">
+                            <div class="input-group">
+                                <input name="num" type="text" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.num}" />
+                                <span class="input-group-btn">
+                                        <label class="form-status"><c:choose><c:when test="${not empty workReceiptsSettle.state}">${fns:getDictLabel(workReceiptsSettle.state, 'audit_state', '')}</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">结算人:</label>
+                        <div class="layui-input-block">
+                            <input name="createBy.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.createBy.name}" />
+                            <input name="createBy.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.createBy.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算日期:</label>
+                        <div class="layui-input-block">
+                            <input name="createDate" type="text" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workReceiptsSettle.createDate}" 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="remarks" htmlEscape="false" rows="3" readonly="true" class="form-control layui-area"/>
+                        </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="contentTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="10%"><font style="color: red">*</font>发票号</th>
+                                <th>价税合计</th>
+                                <th>税额</th>
+                                <th width="10%">累计登记金额</th>
+                                <th>结算比例</th>
+                                <th>结算金额</th>
+                                <th>项目名称</th>
+                                <th>合同名称</th>
+                                <th>所属部门</th>
+                                <th width="10%">实际开票单位</th>
+                                <th>确认付款</th>
+                                <th>确认日期</th>
+                            </tr>
+                            </thead>
+                            <tbody id="settleDetailList">
+                            <c:forEach items="${workReceiptsSettle.settleDetailList}" var="row">
+                                <tr>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.number}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.invoice.totalMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.invoice.taxMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.invoice.incomeMoney}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.settlePct}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatNumber value="${row.settleAmt}" pattern="#,##0.00#"/>
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.project.projectName}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.project.workContractInfo.name}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.office.name}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.client.name}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                            ${fns:getDictLabel(row.status, 'settle_status', '未确认')}
+                                    </td>
+                                    <td style='text-align:center;'>
+                                        <fmt:formatDate value="${row.settleDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                        <script type="text/javascript">
+                            Date.prototype.format = function(fmt) {
+                                var o = {
+                                    "M+" : this.getMonth()+1,                 //月份
+                                    "d+" : this.getDate(),                    //日
+                                    "h+" : this.getHours(),                   //小时
+                                    "m+" : this.getMinutes(),                 //分
+                                    "s+" : this.getSeconds(),                 //秒
+                                    "q+" : Math.floor((this.getMonth()+3)/3), //季度
+                                    "S"  : this.getMilliseconds()             //毫秒
+                                };
+                                if(/(y+)/.test(fmt)) {
+                                    fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
+                                }
+                                for(var k in o) {
+                                    if(new RegExp("("+ k +")").test(fmt)){
+                                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
+                                    }
+                                }
+                                return fmt;
+                            }
+
+                            function bornTemplete(list, idx, tpl, row, idx1){
+                                $(list).append(Mustache.render(tpl, {
+                                    idx: idx, delBtn: true, row: row,
+                                    order:idx1 + 1, idx1:idx1
+                                }));
+                                $(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,idx){
+                                var id = $(prefix+"_id");
+                                var delFlag = $(prefix+"_delFlag");
+                                if (id.val() == ""){
+                                    $(obj).parent().parent().remove();
+                                }else {
+                                    delFlag.val("1");
+                                    $(obj).parent().parent().hide();
+                                }
+                            }
+                        </script>
+                    </div>
+                </div>
+                <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>分所开票明细</h2></div>
+                    <div class="layui-item nav-btns" id="detailAddButton">
+                        <a class="nav-btn nav-btn-add" onclick="addInvoiceRow('#settleInvoiceList', settleInvoiceIdx, settleInvoiceTpl,{});"><i class="fa fa-plus"></i>&nbsp;新增</a>
+                    </div>
+                    <div class="layui-item layui-col-xs12 form-table-container" >
+                        <table id="contentTable1" class="table table-bordered table-condensed no-bottom-margin can-edit">
+                            <thead>
+                            <tr>
+                                <th class="hide"></th>
+                                <th width="20%"><font style="color: red">*</font>发票代码</th>
+                                <th width="20%"><font style="color: red">*</font>发票号</th>
+                                <th width="20%"><font style="color: red">*</font>价税合计</th>
+                                <th width="20%"><font style="color: red">*</font>税额</th>
+                                <th width="20%">操作</th>
+                            </tr>
+                            </thead>
+                            <tbody id="settleInvoiceList">
+                            </tbody>
+                        </table>
+                        <script type="text/template" id="settleInvoiceTpl">//<!--
+                            <tr id="settleInvoiceList{{idx}}">
+                            <td class="hide">
+                            <input id="settleInvoiceList{{idx}}_id" name="settleInvoiceList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                            <input id="settleInvoiceList{{idx}}_delFlag" name="settleInvoiceList[{{idx}}].delFlag" type="hidden" value="0"/>
+                            </td>
+                            <td>
+                                <input id="settleInvoiceList{{idx}}_code" type="text" name="settleInvoiceList[{{idx}}].code" value="{{row.code}}" minlength="10" maxlength="12" class="form-control digits required "/>
+                            </td>
+                            <td>
+                                <input id="settleInvoiceList{{idx}}_num" type="text" name="settleInvoiceList[{{idx}}].num" value="{{row.num}}" minlength="8" maxlength="8" class="form-control digits required invoiceNum"/>
+                            </td>
+                            <td>
+                                <input id="settleInvoiceList{{idx}}_invoiceAmt" name="settleInvoiceList[{{idx}}].totalMoney" type="text" value="{{row.totalMoney}}" onchange="validateAmt(this);" class="form-control number required money"/>
+                            </td>
+                            <td>
+                                <input id="settleInvoiceList{{idx}}_taxRate" name="settleInvoiceList[{{idx}}].taxRate" type="text" value="{{row.taxRate}}" onchange="formatNum(this);" class="form-control number required money"/>
+                            </td>
+                            <td class="text-center op-td">
+                            <span class="op-btn op-btn-delete" onclick="delRow(this, '#settleInvoiceList{{idx}}')" ><i class="fa fa-trash"></i> 取消</span>
+                            </td>
+                            </tr>//-->
+                        </script>
+                        <script type="text/javascript">
+                            var settleInvoiceIdx = 0, settleInvoiceTpl = $("#settleInvoiceTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                            var data2;
+                            var totalAmt=0;
+                            $(document).ready(function() {
+                                data2 = ${fns:toJson(workReceiptsSettle.settleInvoiceList)};
+                                if(data2!=null) {
+                                    for (var i = 0; i < data2.length; i++) {
+                                        addInvoiceRow('#settleInvoiceList', settleInvoiceIdx, settleInvoiceTpl, data2[i]);
+                                        $(":input.money").change();
+                                    }
+                                }
+
+                                var detailList = ${fns:toJson(workReceiptsSettle.settleDetailList)};
+                                if(detailList!=null){
+                                    for (var i = 0; i < detailList.length; i++) {
+                                        totalAmt+=detailList[i].settleAmt;
+                                    }
+                                }
+                            });
+
+                            function addInvoiceRow(list, idx, tpl, row){
+                                var trArr = $("#settleInvoiceList tr:visible");
+                                if(trArr !=undefined && trArr.length>0){
+                                    if(row == undefined){
+                                        row = {};
+                                    }
+                                    var id = $(trArr[trArr.length-1]).attr("id");
+                                    row.code = $("#"+id+"_code").val();
+                                }
+                                var idx1 = $("#settleInvoiceList tr").length +1;
+                                bornTemplete(list, idx, tpl, row, idx1);
+                                settleInvoiceIdx +=1;
+                            }
+
+                        </script>
+                    </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" />
+                            <input type="file" name="upload_files" style="display: none;">
+                        </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="${workReceiptsSettle.act.procInsId}"/>
+                        <act:histoicFlow procInsId="${workReceiptsSettle.act.procInsId}"/>
+                    </div>
+                </div>
+
+                <div class="form-group layui-row page-end"></div>
+        </form:form>
+        </div>
+    </div>
+</body>
+</html>

+ 276 - 0
src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleList.jsp

@@ -0,0 +1,276 @@
+<%@ 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>
+	<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'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+        });
+        function openDialogre(title,url,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                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){
+                    if(split.length==2){return}
+                    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) {
+                }
+            });
+        }
+	</script>
+</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="workReceiptsSettle" action="${ctx}/workreceipts/workReceiptsSettle/list" 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 with-icon">
+                                <sys:treeselect id="office" name="office.id" value="${workReceiptsSettle.office.id}" labelName="office.name" labelValue="${workReceiptsSettle.office.name}"
+                                                title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">结算编号:</label>
+                            <div class="layui-input-block">
+                                <form:input path="num" htmlEscape="false" maxlength="64"  class=" form-control layui-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">
+                                <input id="beginDate" name="beginDate" type="text" readonly="readonly" placeholder="开始时间" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${workReceiptsSettle.beginDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endDate" name="endDate" type="text" readonly="readonly" placeholder="结束时间" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${workReceiptsSettle.endDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">结算人:</label>
+                            <div class="layui-input-block">
+                                <form:input path="createBy.name" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                            </div>
+                        </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="workreceipts:workReceiptsSettle:add">
+                            <table:addRow url="${ctx}/workreceipts/workReceiptsSettle/form" title="收入结算"></table:addRow><!-- 增加按钮 -->
+                        </shiro:hasPermission>
+                        <shiro:hasPermission name="workreceipts:workReceiptsSettle:import">
+                            <table:importExcel url="${ctx}/workreceipts/workReceiptsSettle/import"></table:importExcel><!-- 导入按钮 -->
+                        </shiro:hasPermission>
+                        <shiro:hasPermission name="workreceipts:workReceiptsSettle:export">
+                            <table:exportExcel url="${ctx}/workreceipts/workReceiptsSettle/export"></table:exportExcel><!-- 导出按钮 -->
+                        </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:'num',align:'center', title: '结算单号',sort:true,minWidth:200,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看收入结算', '${ctx}/workreceipts/workReceiptsSettle/view?id="+d.id+"','95%','95%')\">" +
+                            "<span title=" + d.num + ">" + d.num + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'officeName',align:'center', title: '结算部门',minWidth:150}
+                ,{field:'createBy',align:'center', title: '结算人', minWidth:150}
+                ,{field:'createDate', align:'center',sort:true,title: '结算日期',minWidth:200}
+                ,{align:'center', title: '状态',  width:70,templet:function(d){
+                        var st = getAuditState(d.state)
+                        var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workreceipts/workReceiptsSettle/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        return xml;
+                    }}
+                ,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
+                        ////对操作进行初始化
+                        var xml = "";
+
+                        if(d.canedit != undefined && d.canedit == "1"){
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改收入结算', '${ctx}/workreceipts/workReceiptsSettle/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=\"openDialogre('修改收入结算', '${ctx}/workreceipts/workReceiptsSettle/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        }
+                        if(d.canrecall != undefined && d.canrecall =="1"){
+                            xml+="<a href=\"#\" onclick=\"openDialogre('修改收入结算', '${ctx}/workreceipts/workReceiptsSettle/form?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}/workreceipts/workReceiptsSettle/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}/workreceipts/workReceiptsSettle/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>";
+                        }
+
+                        return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workReceiptsSettle" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workReceiptsSettle.id}"
+                    ,"num":"<c:out value="${workReceiptsSettle.num}" escapeXml="true"/>"
+                    ,'officeName':"${workReceiptsSettle.office.name}"
+                    ,'createBy':"${workReceiptsSettle.createBy.name}"
+                    ,"createDate":"<fmt:formatDate value="${workReceiptsSettle.createDate}" pattern="yyyy-MM-dd"/>"
+                    ,"state":"${workReceiptsSettle.state}"
+                    ,"procId":"${workReceiptsSettle.processInstanceId}"
+                    <c:if test="${flag == '1' or fns:getUser().id == workReceiptsSettle.createBy.id}">
+                    <shiro:hasPermission name="workreceipts:workReceiptsSettle:edit">,"canedit":<c:choose><c:when test="${workReceiptsSettle.state == 1}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canmodify":<c:choose><c:when test="${workReceiptsSettle.state == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canrecall":<c:choose><c:when test="${workReceiptsSettle.state == 3}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="workreceipts:workReceiptsSettle:del">,"candelete":<c:choose><c:when test="${workReceiptsSettle.state == 1 or workReceiptsSettle.state == 3 or workReceiptsSettle.state == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+                        ,"cancancel":<c:choose><c:when test="${workReceiptsSettle.state == 2}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+
+    resizeListTable(130);/*消除由于有竖向滚动条造成table出现横向滚动条*/
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 329 - 0
src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleModifyApply.jsp

@@ -0,0 +1,329 @@
+<%@ 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()){
+
+              if($("#settleDetailList tr:visible").length==0){
+                  top.layer.alert('请至少添加一条结算明细!', {icon: 0});
+                  return false;
+              }
+
+			  $("#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);
+					}
+				}
+			});
+            jQuery.validator.addMethod("percent", function(value, element) {
+                var length = value.length;
+                var phone = /^(100|[1-9]?\d(\.\d\d?)?)%$/;
+                return this.optional(element) || (phone.test(value));
+            }, "请填写正确的百分数");
+		});
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+	</script>
+</head>
+<body>
+    <div class="single-form">
+        <div class="container">
+            <form:form id="inputForm" modelAttribute="workReceiptsSettle" action="${ctx}/workreceipts/workReceiptsSettle/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"/>
+                <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">结算部门:</label>
+                        <div class="layui-input-block">
+                            <input name="office.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.office.topCompany}" />
+                            <input name="office.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.office.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算单号:</label>
+                        <div class="layui-input-block">
+                            <div class="input-group">
+                                <input name="num" type="text" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.num}" />
+                                <span class="input-group-btn">
+                                    <label class="form-status"><c:choose><c:when test="${not empty workReceiptsSettle.state}">${fns:getDictLabel(workReceiptsSettle.state, 'audit_state', '')}</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">结算人:</label>
+                        <div class="layui-input-block">
+                            <input name="createBy.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.createBy.name}" />
+                            <input name="createBy.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.createBy.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算日期:</label>
+                        <div class="layui-input-block">
+                            <input name="createDate" type="text" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workReceiptsSettle.createDate}" 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="remarks" htmlEscape="false" rows="3"  maxlength="255"  class="form-control layui-area"/>
+                        </div>
+                    </div>
+                </div>
+                <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>结算明细</h2></div>
+                    <div class="layui-item nav-btns">
+                        <a class="nav-btn nav-btn-add" onclick="addRow('#settleDetailList', settleDetailIdx, settleDetailTpl);"><i class="fa fa-plus"></i>&nbsp;新增</a>
+                    </div>
+                    <div class="layui-item layui-col-xs12 form-table-container" >
+                        <table id="contentTable" class="table table-bordered table-condensed no-bottom-margin can-edit">
+                            <thead>
+                            <tr>
+                                <th class="hide"></th>
+                                <th width="10%"><font style="color: red">*</font>发票号</th>
+                                <th>价税合计</th>
+                                <th>税额</th>
+                                <th width="10%">累计登记金额</th>
+                                <th>结算比例</th>
+                                <th>结算金额</th>
+                                <th>项目名称</th>
+                                <th>合同名称</th>
+                                <th>所属部门</th>
+                                <th width="10%">实际开票单位</th>
+                                <th>确认付款</th>
+                                <th>确认日期</th>
+                                <th width="8%">操作</th>
+                            </tr>
+                            </thead>
+                            <tbody id="settleDetailList">
+                            </tbody>
+                        </table>
+                        <script type="text/template" id="settleDetailTpl">//<!--
+                            <tr id="settleDetailList{{idx}}">
+                            <td class="hide">
+                            <input id="settleDetailList{{idx}}_id" name="settleDetailList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                            <input id="settleDetailList{{idx}}_delFlag" name="settleDetailList[{{idx}}].delFlag" type="hidden" value="0"/>
+                            </td>
+                            <td>
+                                <sys:gridselectInvoice url="${ctx}/workreceipts/workReceiptsSettle/selectinvoice" type="" isTotal="1" id="settleDetailList{{idx}}_invoice" name="settleDetailList[{{idx}}].invoice.id"  value="{{row.invoice.id}}"  title="选择发票" labelName="settleDetailList[{{idx}}].invoice.number"
+                                                      companyId="${workReceiptsSettle.office.id}"  idx="{{idx}}"	labelValue="{{row.invoice.number}}" cssClass="form-control required" fieldLabels="发票编号" fieldKeys="number" searchLabel="发票编号" searchKey="number" ></sys:gridselectInvoice>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_invoiceAmt" name="settleDetailList[{{idx}}].invoice.totalMoney" type="text" value="{{row.invoice.totalMoney}}" onchange="formatNum(this);" readOnly="true"  class="form-control money"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_taxMoney" name="settleDetailList[{{idx}}].invoice.taxMoney" type="text" value="{{row.invoice.taxMoney}}" onchange="formatNum(this);" readOnly="true"  class="form-control money"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_incomeAmt" name="settleDetailList[{{idx}}].invoice.incomeMoney" type="text" value="{{row.invoice.incomeMoney}}" onchange="formatNum(this);" readOnly="true"  class="form-control required money"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_settlePct" name="settleDetailList[{{idx}}].settlePct" type="text" value="{{row.settlePct}}"  onchange="caculateAmt('#settleDetailList{{idx}}_');" class="form-control required percent"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_settleAmt" type="text" value="{{row.settleAmt}}" onchange="formatNum(this);" readOnly="true"  class="form-control required money"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_project" type="text" value="{{row.invoice.workInvoice.project.projectName}}"  readOnly="true"  class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_contract" type="text" value="{{row.invoice.workInvoice.project.workContractInfo.name}}"  readOnly="true"  class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_office" type="text" value="{{row.invoice.workInvoice.office.name}}"  readOnly="true"  class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_client" type="text" value="{{row.invoice.workInvoice.client.name}}"  readOnly="true"  class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_statusStr" name="settleDetailList[{{idx}}].statusStr" type="text" value="${fns:getDictLabel(row.status, 'settle_status', '未确认')}"  readOnly="true" class="form-control"/>
+                                <input type="hidden" id="settleDetailList{{idx}}_status" name="settleDetailList[{{idx}}].status" type="text" value="{{row.status}}" readOnly="true" class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="settleDetailList{{idx}}_settleDate" name="settleDetailList[{{idx}}].settleDate" type="text" value="<fmt:formatDate value="${row.settleDate}" pattern="yyyy-MM-dd"/>"  readOnly="true"  class="form-control "/>
+                            </td>
+                            <td class="text-center op-td">
+                            <span class="op-btn op-btn-delete" onclick="delRow(this, '#settleDetailList{{idx}}')" ><i class="fa fa-trash"></i> 取消</span>
+                            </td>
+                            </tr>//-->
+                        </script>
+                        <script type="text/javascript">
+                            var settleDetailIdx = 0, settleDetailTpl = $("#settleDetailTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                            var data;
+                            $(document).ready(function() {
+                                data = ${fns:toJson(workReceiptsSettle.settleDetailList)};
+                                if(data!=null) {
+                                    for (var i = 0; i < data.length; i++) {
+                                        addRow('#settleDetailList', settleDetailIdx, settleDetailTpl, data[i]);
+                                        $(":input.money").change();
+                                    }
+                                }
+                            });
+
+                            Date.prototype.format = function(fmt) {
+                                var o = {
+                                    "M+" : this.getMonth()+1,                 //月份
+                                    "d+" : this.getDate(),                    //日
+                                    "h+" : this.getHours(),                   //小时
+                                    "m+" : this.getMinutes(),                 //分
+                                    "s+" : this.getSeconds(),                 //秒
+                                    "q+" : Math.floor((this.getMonth()+3)/3), //季度
+                                    "S"  : this.getMilliseconds()             //毫秒
+                                };
+                                if(/(y+)/.test(fmt)) {
+                                    fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
+                                }
+                                for(var k in o) {
+                                    if(new RegExp("("+ k +")").test(fmt)){
+                                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
+                                    }
+                                }
+                                return fmt;
+                            }
+
+                            function addRow(list, idx, tpl, row){
+                                var idx1 = $("#settleDetailList tr").length +1;
+                                bornTemplete(list, idx, tpl, row, idx);
+                                settleDetailIdx +=1;
+                                var stausId = "#settleDetailList"+idx+"_status";
+                                var status = $(stausId).val();
+                                if(status==null||status==''){
+                                    $(stausId).val(0);
+                                }
+                            }
+
+                            function bornTemplete(list, idx, tpl, row, idx1){
+                                $(list).append(Mustache.render(tpl, {
+                                    idx: idx, delBtn: true, row: row,
+                                    order:idx1 + 1, idx1:idx1
+                                }));
+                                $(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,idx){
+                                var id = $(prefix+"_id");
+                                var delFlag = $(prefix+"_delFlag");
+                                if (id.val() == ""){
+                                    $(obj).parent().parent().remove();
+                                }else {
+                                    delFlag.val("1");
+                                    $(obj).parent().parent().hide();
+                                }
+                            }
+
+                            function getAllInvoice() {
+                                var invoices = $("#settleDetailList tr:visible .invoiceId");
+                                var invoiceIds ="";
+                                for (var i=0;i<invoices.length;i++){
+                                    if($(invoices[i]).val()!=null&&$(invoices[i]).val()!=''){
+                                        invoiceIds+=$(invoices[i]).val();
+                                        invoiceIds+=",";
+                                    }
+                                }
+                                invoiceIds = invoiceIds.slice(0,invoiceIds.length-1);
+                                return invoiceIds;
+                            }
+
+                            function setInvoiceValue(obj,idx) {
+                                $.ajax({
+                                    type:'post',
+                                    url:'${ctx}/workinvoicedetail/workInvoiceDetail/ajaxInvoice',
+                                    data:{
+                                        "id":obj.id
+                                    },
+                                    success:function(data){
+                                        if(data.success){
+                                            var pref = "#settleDetailList"+idx+"_";
+                                            var amtId = pref+"invoiceAmt";
+                                            var taxId = pref+"taxMoney";
+                                            var incomeId = pref+"incomeAmt";
+                                            var project = pref+"project";
+                                            var contract = pref+"contract";
+                                            var office = pref+"office";
+                                            var client = pref+"client";
+                                            $(amtId).val(data.body.invoice.totalMoney);
+                                            $(taxId).val(data.body.invoice.taxMoney);
+                                            $(incomeId).val(data.body.invoice.incomeMoney);
+                                            $(project).val(data.body.invoice.workInvoice.project.projectName);
+                                            $(contract).val(data.body.invoice.workInvoice.project.workContractInfo.name);
+                                            $(office).val(data.body.invoice.workInvoice.office.name);
+                                            $(client).val(data.body.invoice.workInvoice.client.name);
+                                            $(":input.money").change();
+                                            caculateAmt(pref);
+                                        }
+                                    }
+                                })
+                            }
+
+                            function caculateAmt(prefix) {
+                                var settlePctId = prefix+"settlePct";
+                                var settleAmtId = prefix+"settleAmt";
+                                var incomeId = prefix+"incomeAmt";
+                                var settlePct = $(settlePctId).val();
+                                var  imcomeAmt = $(incomeId).val();
+                                if(settlePct != null&&settlePct!=''&&imcomeAmt!=null&&imcomeAmt!=''){
+                                    var pct = (settlePct.replace("%",""))/100;
+                                    var amt = imcomeAmt.replace(",","");
+                                    $(settleAmtId).val(amt*pct);
+                                }else {
+                                    $(settleAmtId).val(0);
+                                }
+                                $(settleAmtId).change();
+                            }
+                        </script>
+                    </div>
+                </div>
+        </form:form>
+        </div>
+    </div>
+</body>
+</html>

+ 15 - 0
src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleTask.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>
+

+ 226 - 0
src/main/webapp/webpage/modules/workreceiptssettle/workReceiptsSettleView.jsp

@@ -0,0 +1,226 @@
+<%@ 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);
+					}
+				}
+			});
+            jQuery.validator.addMethod("percent", function(value, element) {
+                var length = value.length;
+                var phone = /^(100|[1-9]?\d(\.\d\d?)?)%$/;
+                return this.optional(element) || (phone.test(value));
+            }, "请填写正确的百分数");
+		});
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+	</script>
+</head>
+<body>
+    <div class="single-form">
+        <div class="container view-form">
+            <form:form id="inputForm" modelAttribute="workReceiptsSettle" action="${ctx}/workreceipts/workReceiptsSettle/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">结算部门:</label>
+                        <div class="layui-input-block">
+                            <input name="office.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.office.topCompany}" />
+                            <input name="office.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.office.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算单号:</label>
+                        <div class="layui-input-block">
+                            <div class="input-group">
+                                <input name="num" type="text" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.num}" />
+                                <span class="input-group-btn">
+                                        <label class="form-status"><c:choose><c:when test="${not empty workReceiptsSettle.state}">${fns:getDictLabel(workReceiptsSettle.state, 'audit_state', '')}</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">结算人:</label>
+                        <div class="layui-input-block">
+                            <input name="createBy.name" type="text" readonly="true" class="form-control required layui-input" value="${workReceiptsSettle.createBy.name}" />
+                            <input name="createBy.id" type="hidden" readonly="true" class="form-control layui-input" value="${workReceiptsSettle.createBy.id}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">结算日期:</label>
+                        <div class="layui-input-block">
+                            <input name="createDate" type="text" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workReceiptsSettle.createDate}" 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="remarks" htmlEscape="false" rows="3"  readonly="true"  class="form-control layui-area"/>
+                        </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="contentTable" class="table table-bordered table-condensed">
+                            <thead>
+                                <tr>
+                                    <th width="10%"><font style="color: red">*</font>发票号</th>
+                                    <th>价税合计</th>
+                                    <th>税额</th>
+                                    <th width="10%">累计登记金额</th>
+                                    <th>结算比例</th>
+                                    <th>结算金额</th>
+                                    <th>项目名称</th>
+                                    <th>合同名称</th>
+                                    <th>所属部门</th>
+                                    <th width="10%">实际开票单位</th>
+                                    <th>确认付款</th>
+                                    <th>确认日期</th>
+                                </tr>
+                            </thead>
+                            <tbody id="settleDetailList">
+                                <c:forEach items="${workReceiptsSettle.settleDetailList}" var="row">
+                                    <tr>
+                                        <td style='text-align:center;'>
+                                            ${row.invoice.number}
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            <fmt:formatNumber value="${row.invoice.totalMoney}" pattern="#,##0.00#"/>
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            <fmt:formatNumber value="${row.invoice.taxMoney}" pattern="#,##0.00#"/>
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            <fmt:formatNumber value="${row.invoice.incomeMoney}" pattern="#,##0.00#"/>
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            ${row.settlePct}
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            <fmt:formatNumber value="${row.settleAmt}" pattern="#,##0.00#"/>
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.project.projectName}
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.project.workContractInfo.name}
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.office.name}
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            ${row.invoice.workInvoice.client.name}
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            ${fns:getDictLabel(row.status, 'settle_status', '未付款')}
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            <fmt:formatDate value="${row.settleDate}" pattern="yyyy-MM-dd"/>
+                                        </td>
+                                    </tr>
+                                </c:forEach>
+                            </tbody>
+                        </table>
+                        <script type="text/javascript">
+
+                            Date.prototype.format = function(fmt) {
+                                var o = {
+                                    "M+" : this.getMonth()+1,                 //月份
+                                    "d+" : this.getDate(),                    //日
+                                    "h+" : this.getHours(),                   //小时
+                                    "m+" : this.getMinutes(),                 //分
+                                    "s+" : this.getSeconds(),                 //秒
+                                    "q+" : Math.floor((this.getMonth()+3)/3), //季度
+                                    "S"  : this.getMilliseconds()             //毫秒
+                                };
+                                if(/(y+)/.test(fmt)) {
+                                    fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
+                                }
+                                for(var k in o) {
+                                    if(new RegExp("("+ k +")").test(fmt)){
+                                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
+                                    }
+                                }
+                                return fmt;
+                            }
+
+                        </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="contentTable1" class="table table-bordered table-condensed">
+                            <thead>
+                                <tr>
+                                    <th><font style="color: red">*</font>发票代码</th>
+                                    <th><font style="color: red">*</font>发票号</th>
+                                    <th><font style="color: red">*</font>价税合计</th>
+                                    <th><font style="color: red">*</font>税额</th>
+                                </tr>
+                            </thead>
+                            <tbody id="settleInvoiceList">
+                                <c:forEach items="${workReceiptsSettle.settleInvoiceList}" var="row">
+                                    <tr>
+                                        <td style='text-align:center;'>
+                                            ${row.code}
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            ${row.num}
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            <fmt:formatNumber value="${row.totalMoney}" pattern="#,##0.00#"/>
+                                        </td>
+                                        <td style='text-align:center;'>
+                                            <fmt:formatNumber value="${row.taxRate}" pattern="#,##0.00#"/>
+                                        </td>
+                                    </tr>
+                                </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+        </form:form>
+        </div>
+    </div>
+</body>
+</html>

+ 439 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularApplyAudit.jsp

@@ -0,0 +1,439 @@
+<%@ 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调用提交表单。
+            $("#correctDate").removeAttr("disabled");
+            if(validateForm.form()){
+                if(obj == 1){
+                    // if(taskKey=='bmzr'){
+                    //     var correctDate = new Date($("#correctDate").val().replace(/-/g, "/"));
+                    //     var tryEndTime = new Date($("#tryEndTime").val().replace(/-/g, "/"));
+                    //     if($("#correctOpinion").val()=='1'){
+					//
+                    //     }else if($("#correctOpinion").val()=='2'){//提前
+                    //         if(correctDate.getTime()>tryEndTime.getTime()){
+                    //             parent.layer.msg("新试用期结束日期不能大于试用期结束日期!", {icon: 5});
+                    //             return false;
+                    //         }
+                    //     }else if($("#correctOpinion").val()=='3'){
+                    //         if(correctDate.getTime()<tryEndTime.getTime()){
+                    //             parent.layer.msg("新试用期结束日期不能小于试用期结束日期!", {icon: 5});
+                    //             return false;
+                    //         }
+                    //     }
+                    // }
+
+                    $('#flag').val('yes');
+                }else{
+                    $('#flag').val('no');
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        var validateForm;
+        var count = 0;
+        var taskKey;
+        var defaultCorrectDate;
+        $(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);
+                    }
+                }
+            });
+            defaultCorrectDate=$("#correctDate").val();
+            taskKey="${workRegularApply.act.taskDefKey}";
+            if(taskKey=='bmzr'){
+                var value=$("#correctOpinion").val();
+                getChange(value);
+			}
+
+			laydate.render({
+				elem: '#correctDate',
+				format: 'yyyy-MM-dd',
+				type : 'date'
+			});
+        });
+        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 = $("#workMonthlyPlanThisList tr").length;
+            //tpl = tpl.replace("workMonthlyPlanThisList[0]_workClientInfoId","workMonthlyPlanThisList["+idx1+"].workClientInfoId");
+
+            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");
+                    }
+                }
+            });
+
+        }
+        function getChange(value){
+            if(value==1){
+                $("#jobGradeButton").show();
+                $("#correctDate").attr("disabled","disabled");
+                $("#correctDate").val(defaultCorrectDate);
+			}else if(value==2) {
+                $("#jobGradeButton").show();
+                $("#correctDate").removeAttr("disabled");
+                laydate.render({
+                    elem: '#correctDate',
+                    format: 'yyyy-MM-dd',
+                    type : 'date'
+                });
+			}else if(value==3){
+                $("#jobGradeButton").hide();
+                $("#correctDate").removeAttr("disabled");
+                laydate.render({
+                    elem: '#correctDate',
+                    format: 'yyyy-MM-dd',
+                    type : 'date'
+                });
+			}
+
+
+        }
+
+        function getMoney(value,j){
+            var score = "0";
+            //方法一使用id选择器进行计算。
+            //获取输入的数字
+            //自动计算出结果并填充在相应的输入框中
+            var size = $("#workRegularScoreList tr").length;
+            for (var i = 0;i<size;i++){
+                var scores = $("#workRegularScoreList"+i+"_score").val();
+                var delFlag = $("#workRegularScoreList"+i+"_delFlag").val();
+                if (scores!=undefined && isNumber(scores) && delFlag==0){
+                    if(score==""){
+                        score = parseFloat(scores);
+                    }else {
+                        score = (parseFloat(score) + parseFloat(scores));
+                        if(parseFloat(score)>100){
+                            parent.layer.msg("鉴定得分合计不可超过100分!", {icon: 5});
+                            $("#workRegularScoreList"+i+"_score").val('');
+                            return false;
+                        }
+                    }
+                }
+            }
+            $("#score").val(score);
+
+        }
+        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="workRegularApply" action="${ctx}/workregularapply/workRegularApply/saveAudit" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="basicInfoId" id="basicInfoId"/>
+			<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 with-icon">
+						<div class="input-group">
+							<form:input id="userId" readonly="true" path="workStaffBasicInfo.name" htmlEscape="false" class="form-control layui-input"/>
+						</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">
+						<div class="input-group">
+							<form:input id="no" path="workStaffBasicInfo.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 workRegularApply.state}">${fns:getDictLabel(workRegularApply.state, 'audit_state', '')}</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 id="status" path="workStaffBasicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input" value="${fns:getDictLabel(workRegularApply.workStaffBasicInfo.status, 'staff_status', '')}"/>
+					</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="idCard" readonly="true" path="workStaffBasicInfo.idCard" 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 id="officeName" readonly="true" path="workStaffBasicInfo.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 id="jobName" readonly="true" path="jobName"  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="pay" name="pay" value="${workRegularApply.pay}"  readonly="true" 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="entryDate" name="workStaffBasicInfo.entryDate" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"/>
+					</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">
+						<input id="tryEndTime" name="tryEndTime" type="text"  maxlength="20"  readonly="true" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.workStaffBasicInfo.tryEndTime}" pattern="yyyy-MM-dd"/>"/>
+					</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="applyDate" name="applyDate" type="text"  readonly="true"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.applyDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>个人总结</h2></div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">个人总结:</label>
+					<div class="layui-input-block">
+								<form:textarea path="summary" value="${workRegularApply.summary}" cssStyle="resize: none" readonly="true" htmlEscape="false" rows="6"    maxlength="500" class="form-control "/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>部门鉴定</h2></div>
+				<div class="layui-item layui-col-sm12  with-textarea"style="margin-top: 20px">
+					<label class="layui-form-label">部门评语:</label>
+					<div class="layui-input-block">
+						<c:choose>
+							<c:when test="${workRegularApply.act.taskDefKey eq 'bmzr'}">
+								<form:textarea path="comment" htmlEscape="false" rows="4"    maxlength="255" class="form-control "/>
+							</c:when>
+							<c:otherwise>
+								<form:textarea path="comment" htmlEscape="false" rows="4"  readonly="true"   maxlength="255" class="form-control "/>
+							</c:otherwise>
+						</c:choose>
+					</div>
+				</div>
+
+				<c:choose>
+					<c:when test="${workRegularApply.act.taskDefKey eq 'bmzr'}">
+						<%--<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="correctOpinion"  class=" form-control  simple-select">--%>
+									<%--<form:option value="" label=""/>--%>
+									<%--<form:options items="${fns:getDictList('correct_opinion')}" 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  with-icon">--%>
+								<%--<div class="input-group">--%>
+									<%--<sys:treeselectJob id="jobGrade" name="jobGrade.id" value="jobGrade.id" labelName="jobGrade.name" labelValue="${workRegularApply.jobGrade.name}"--%>
+													   <%--title="职级类型" url="/workjobgrade/workJobGrade/treeData"  cssClass="form-control layui-input " allowClear="false" notAllowSelectParent="true"/>--%>
+								<%--</div>--%>
+							<%--</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">--%>
+								<%--<input id="correctDate"  name="correctDate" type="text"   class="laydate-icondate form-control required layer-date  layui-input laydate-icon"--%>
+									   <%--value="<fmt:formatDate value="${workRegularApply.correctDate}" pattern="yyyy-MM-dd"/>" readonly="true"/>--%>
+							<%--</div>--%>
+						<%--</div>--%>
+					</c:when>
+					<c:otherwise>
+						<%--<div class="layui-item layui-col-sm6">--%>
+							<%--<label class="layui-form-label"><span class="require-item">*</span>转正意见:</label>--%>
+							<%--<div class="layui-input-block">--%>
+								<%--<input  htmlEscape="false" readonly="true" class="form-control layui-input" value="${fns:getDictLabel(workRegularApply.correctOpinion, 'correct_opinion', '')}"/>--%>
+							<%--</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  with-icon">--%>
+								<%--<div class="input-group">--%>
+									<%--<input id="jobGradeName" name="jobGrade.name" value="${workRegularApply.jobGrade.name}" readonly="true"  htmlEscape="false" class="form-control layui-input"/>--%>
+								<%--</div>--%>
+							<%--</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">--%>
+								<%--<input id=""  readonly="true" name="correctDate" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"--%>
+									   <%--value="<fmt:formatDate value="${workRegularApply.correctDate}" pattern="yyyy-MM-dd"/>"/>--%>
+							<%--</div>--%>
+						<%--</div>--%>
+					</c:otherwise>
+				</c:choose>
+
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<%--<table id="contentTable1" class="table table-bordered table-condensed can-edit no-bottom-margin">--%>
+						<%--<thead>--%>
+						<%--<tr>--%>
+							<%--<th width="400px">鉴定内容</th>--%>
+							<%--<th width="200px">评价得分</th>--%>
+						<%--</tr>--%>
+						<%--</thead>--%>
+						<%--<tbody id="workRegularScoreList">--%>
+						<%--<c:if test="${not empty workRegularApply.workRegularScoreList}">--%>
+							<%--<c:forEach items="${workRegularApply.workRegularScoreList}" var="workRegularScore" varStatus="index">--%>
+								<%--<tr id="workRegularScoreList${index.index}">--%>
+									<%--<td class="hide">--%>
+										<%--<input id="workRegularScoreList${index.index}_id" name="workRegularScoreList[${index.index}].id" type="hidden" value="${workRegularScore.id}"/>--%>
+										<%--<input id="workRegularScoreList${index.index}_regularContentId" name="workRegularScoreList[${index.index}].regularContentId" type="hidden" value="${workRegularScore.regularContentId}"/>--%>
+										<%--<input id="workRegularScoreList${index.index}_delFlag" name="workRegularScoreList[${index.index}].delFlag" type="hidden" value="0"/>--%>
+									<%--</td>--%>
+									<%--<td>--%>
+										<%--<input id="workRegularScoreList${index.index}_content"  readonly="true"   name="workRegularScoreList[${index.index}].content" type="text" value="${workRegularScore.content}"   class="form-control "/>--%>
+									<%--</td>--%>
+									<%--<c:choose>--%>
+										<%--<c:when test="${workRegularApply.act.taskDefKey eq 'ywbfzr'}">--%>
+											<%--<td>--%>
+												<%--<input id="workRegularScoreList${index.index}_score" onchange="getMoney(this.value,'1')"   name="workRegularScoreList[${index.index}].score" type="text" value="${workRegularScore.score}"   class="form-control number "/>--%>
+											<%--</td>--%>
+										<%--</c:when>--%>
+										<%--<c:otherwise>--%>
+											<%--<td>--%>
+												<%--<form:input path="workRegularScoreList[${index.index}].score" id="workRegularScoreList${index.index}_score" htmlEscape="false" readonly="true" onchange="getMoney(this.value,'1')"    type="text" value="${workRegularScore.score}"   class="form-control"/>--%>
+											<%--</td>--%>
+										<%--</c:otherwise>--%>
+									<%--</c:choose>--%>
+
+								<%--</tr>--%>
+							<%--</c:forEach>--%>
+							<%--<tr >--%>
+								<%--<td  style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>合计得分:</label></td>--%>
+								<%--</td>--%>
+								<%--<td>--%>
+									<%--<input id="score"  readonly="true"   name="score" type="text" value="${workRegularApply.score}"   class="form-control "/>--%>
+								<%--</td>--%>
+							<%--</tr>--%>
+						<%--</c:if>--%>
+						<%--</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">
+						<c:choose>
+							<c:when test="${workRegularApply.act.taskDefKey eq 'zzr'}">
+								<form:textarea path="act.comment" readonly="true" class="form-control" rows="3" maxlength="127" />
+							</c:when>
+							<c:otherwise>
+								<form:textarea path="act.comment" class="form-control" rows="3" maxlength="127" />
+							</c:otherwise>
+						</c:choose>
+					</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="${workRegularApply.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workRegularApply.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 357 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularApplyForm.jsp

@@ -0,0 +1,357 @@
+<%@ 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() {
+            if($("#applyDate").val()==null || $("#applyDate").val()==''){
+                $("#applyDate").val(getNowFormatDate());
+            }
+            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: '#applyDate', //目标元素。由于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 doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+
+            if(obj == 2){
+                $("#inputForm").attr("action","${ctx}/workregularapply/workRegularApply/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workregularapply/workRegularApply/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 = $("#workMonthlyPlanThisList tr").length;
+            //tpl = tpl.replace("workMonthlyPlanThisList[0]_workClientInfoId","workMonthlyPlanThisList["+idx1+"].workClientInfoId");
+
+            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");
+                    }
+                }
+            });
+
+        }
+
+        function selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            $("#no").val(obj.no);
+            $("#basicInfoId").val(obj.id);
+            $("#name").val(obj.name);
+            $("#status").val(obj.status);
+            $("#idCard").val(obj.idCard);
+            $("#officeName").val(obj.office.name);
+            $("#jobName").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#pay").val(obj.salary);
+            $("#tryEndTime").val(obj.tryEndTime);
+
+            $("#correctOpinion").val(1);
+            $("#jobGradeId").val(obj.jobGrade.id);
+            $("#jobGradeName").val(obj.jobGrade.name);
+            $("#correctDate").val(obj.tryEndTime);
+
+
+        }
+
+        function getMoney(value,j){
+            var score = "0";
+            //方法一使用id选择器进行计算。
+            //获取输入的数字
+            //自动计算出结果并填充在相应的输入框中
+            var size = $("#workRegularScoreList tr").length;
+            for (var i = 0;i<size;i++){
+                var scores = $("#workRegularScoreList"+i+"_score").val();
+                var delFlag = $("#workRegularScoreList"+i+"_delFlag").val();
+                if (scores!=undefined && isNumber(scores) && delFlag==0){
+                    if(score==""){
+                        score = parseFloat(scores);
+                    }else {
+                        score = (parseFloat(score) + parseFloat(scores));
+                    }
+                }
+            }
+            $("#score").val(score);
+
+        }
+        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="workRegularApply" action="${ctx}/workregularapply/workRegularApply/save" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="jobGrade.id" id="jobGradeId"/>
+			<form:hidden path="basicInfoId" id="basicInfoId"/>
+			<form:hidden path="userId" id="userId"/>
+			<form:hidden path="officeId" id="officeId"/>
+			<form:hidden path="correctOpinion" id="correctOpinion"/>
+			<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 with-icon">
+						<div class="input-group">
+							<%--<sys:gridSelectUser id="userId" name="userId" value="${workRegularApply.userId}" labelName="name" labelValue="${workRegularApply.workStaffBasicInfo.name}"--%>
+												 <%--title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="1"  isSingle="true"></sys:gridSelectUser>--%>
+								<input id="userName" readonly="true" name="userName" htmlEscape="false" class="form-control layui-input" value="${workRegularApply.workStaffBasicInfo.name}"/>
+						</div>
+					</div>
+					<%--<div class="layui-input-block with-icon">
+						<sys:gridselectItem url="${ctx}/workitem/workItem/selectItem" id="fixedAssetsNumber" name="fixedAssetsNumber"  value="${workBorrowMangement.fixedAssetsNumber}"  title="选择固定资产" labelName="assetsNumber"
+											labelValue="${workBorrowMangement.assetsNumber}" cssClass="form-control layui-input required" fieldLabels="固定资产" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectItem>
+					</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="workStaffBasicInfo.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 workRegularApply.state}">${fns:getDictLabel(workRegularApply.state, 'audit_state', '')}</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 id="status" path="workStaffBasicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input" value="${fns:getDictLabel(workRegularApply.workStaffBasicInfo.status, 'staff_status', '')}"/>
+					</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="idCard" readonly="true" path="workStaffBasicInfo.idCard" 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 id="officeName" readonly="true" path="workStaffBasicInfo.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 id="jobName" readonly="true" path="jobName" 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="pay" name="pay" value="${workRegularApply.pay}"  readonly="true" 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="entryDate" name="workStaffBasicInfo.entryDate" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"/>
+					</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">
+						<input id="tryEndTime" name="tryEndTime" type="text"  maxlength="20" readonly="true" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.workStaffBasicInfo.tryEndTime}" pattern="yyyy-MM-dd"/>"/>
+					</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="applyDate" name="applyDate" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.applyDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>个人总结</h2></div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">个人总结:</label>
+					<div class="layui-input-block">
+						<form:textarea path="summary"  htmlEscape="false" rows="7"    maxlength="500" class="form-control "/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row view-form">
+				<div class="form-group-label"><h2>部门鉴定</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<%--<div class="layui-item layui-col-sm6">--%>
+						<%--<label class="layui-form-label"><span class="require-item">*</span>转正意见:</label>--%>
+						<%--<div class="layui-input-block">--%>
+							<%--<input  htmlEscape="false" readonly="true"   class="form-control layui-input" value="正常"/>--%>
+						<%--</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  with-icon">--%>
+							<%--<div class="input-group">--%>
+								<%--<input id="jobGradeName" name="jobGrade.name" value="${workRegularApply.jobGrade.name}" readonly="true"  htmlEscape="false" class="form-control layui-input"/>--%>
+							<%--</div>--%>
+						<%--</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">--%>
+								<%--<input id="correctDate"  readonly="true" name="correctDate" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"--%>
+									   <%--value="<fmt:formatDate value="${workRegularApply.correctDate}" pattern="yyyy-MM-dd"/>"/>--%>
+						<%--</div>--%>
+					<%--</div>--%>
+					<div class="layui-item layui-col-sm12  with-textarea"style="margin-top: 20px">
+						<label class="layui-form-label">部门评语:</label>
+						<div class="layui-input-block">
+							<form:textarea path="comment" htmlEscape="false" rows="4"  readonly="true"   maxlength="255" class="form-control "/>
+						</div>
+					</div>
+					<%--<table id="contentTable1" class="table table-bordered table-condensed can-edit no-bottom-margin">--%>
+						<%--<thead>--%>
+						<%--<tr>--%>
+							<%--<th width="400px">鉴定内容</th>--%>
+							<%--<th width="200px">评价得分</th>--%>
+						<%--</tr>--%>
+						<%--</thead>--%>
+						<%--<tbody id="workRegularScoreList">--%>
+						<%--<c:if test="${not empty workRegularApply.workRegularScoreList}">--%>
+							<%--<c:forEach items="${workRegularApply.workRegularScoreList}" var="workRegularScore" varStatus="index">--%>
+								<%--<tr id="workRegularScoreList${index.index}">--%>
+									<%--<td class="hide">--%>
+										<%--<input id="workRegularScoreList${index.index}_id" name="workRegularScoreList[${index.index}].id" type="hidden" value="${workRegularScore.id}"/>--%>
+										<%--<input id="workRegularScoreList${index.index}_regularContentId" name="workRegularScoreList[${index.index}].regularContentId" type="hidden" value="${workRegularScore.regularContentId}"/>--%>
+										<%--<input id="workRegularScoreList${index.index}_delFlag" name="workRegularScoreList[${index.index}].delFlag" type="hidden" value="0"/>--%>
+									<%--</td>--%>
+									<%--<td>--%>
+										<%--<input id="workRegularScoreList${index.index}_content"  readonly="true"   name="workRegularScoreList[${index.index}].content" type="text" value="${workRegularScore.content}"   class="form-control "/>--%>
+									<%--</td>--%>
+									<%--<td>--%>
+										<%--<input id="workRegularScoreList${index.index}_score"  readonly="true"  name="workRegularScoreList[${index.index}].score" type="text" value="${workRegularScore.score}"   class="form-control number "/>--%>
+									<%--</td>--%>
+								<%--</tr>--%>
+							<%--</c:forEach>--%>
+							<%--<tr >--%>
+								<%--<td  style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>合计得分:</label></td>--%>
+								<%--</td>--%>
+								<%--<td>--%>
+									<%--<input id="score"  readonly="true"   name="score" type="text" value="${workRegularApply.score}"   class="form-control "/>--%>
+								<%--</td>--%>
+							<%--</tr>--%>
+						<%--</c:if>--%>
+						<%--</tbody>--%>
+					<%--</table>--%>
+
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 329 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularApplyList.jsp

@@ -0,0 +1,329 @@
+<%@ 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="workRegularApply" action="${ctx}/workregularapply/workRegularApply/" 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 id="userName" name="userName" type="text"  maxlength="64" class=" form-control  layui-input laydate-icon" value="${workRegularApply.userName}" />
+								</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="beginDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workRegularApply.beginDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endDate" placeholder="结束时间" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workRegularApply.endDate}" 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="state" class=" form-control  simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('audit_state')}" 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--%>
+					<c:if test="${user.status eq '试用'}">
+					<shiro:hasPermission name="workregularapply:workRegularApply:add">
+						<a href="javascript:void(0)" onclick="openDialog('新增转正申请', '${ctx}/workregularapply/workRegularApply/form?tabId=1','95%','95%')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i>&nbsp;添加</a>
+					</shiro:hasPermission>
+					</c:if>
+						<shiro:hasPermission name="workregularapply:workRegularApply:export">
+							<table:exportExcel url="${ctx}/workregularapply/workRegularApply/export"></table:exportExcel><!-- 导出按钮 -->
+						</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:'no',align:'center',sort: true, width:120,title: '工号', templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看转正申请', '${ctx}/workregularapply/workRegularApply/view?id=" + d.id + "','95%','95%')\">" +
+                            "<span title=" + d.no + ">" + d.no + "</span></a>";
+                        return xml;
+                    }},
+                {field:'name',align:'center', minWidth:150, title: '姓名',templet:function(d){
+                        return "<span title='"+ d.name +"'>" + d.name + "</span>";
+                    }}
+                ,{field:'idCard',align:'center',width:150, title: '身份证号码',templet:function(d){
+                        return "<span title='"+ d.idCard +"'>" + d.idCard + "</span>";
+                    }}
+                ,{field:'officeName',align:'center',minWidth:150, title: '部门',templet:function(d){
+                        return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                    }}
+                ,{field:'jobName',align:'center',width:150, title: '职级',templet:function(d){
+                        return "<span title='"+ d.jobName +"'>" + d.jobName + "</span>";
+                    }}
+                ,{field:'status', align:'center',width:100,title: '员工状态'}
+                ,{field:'applyDate',align:'center',width:100, title: '申请日期',templet:function(d){
+                        return "<span title='"+ d.applyDate +"'>" + d.applyDate + "</span>";
+                    }}
+                ,{field:'state',align:'center',width:80, title: '申请状态',templet:function(d){
+                        var st = getAuditState(d.state);
+                        if(st.action)
+                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workregularapply/workRegularApply/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}/workregularapply/workRegularApply/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=\"openDialogremodify('修改转正申请', '${ctx}/workregularapply/workRegularApply/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}/workregularapply/workRegularApply/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}/workregularapply/workRegularApply/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>";
+                        }
+
+                        return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workRegularApply" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workRegularApply.id}"
+                    ,"no":"${workRegularApply.workStaffBasicInfo.no}"
+                    ,"name":"${workRegularApply.workStaffBasicInfo.name}"
+                    ,"idCard":"${workRegularApply.workStaffBasicInfo.idCard}"
+                    ,"officeName":"${workRegularApply.workStaffBasicInfo.office.name}"
+                    ,"jobName":"${workRegularApply.jobName}"
+                    ,"status":"${workRegularApply.workStaffBasicInfo.status}"
+                    ,"applyDate":"<fmt:formatDate value="${workRegularApply.applyDate}" pattern="yyyy-MM-dd"/>"
+                    ,"state":"${workRegularApply.state}"
+                    ,"procId":"${workRegularApply.processInstanceId}"
+                    <c:if test="${flag == '1' or fns:getUser().id == workRegularApply.createBy.id}">
+                    <shiro:hasPermission name="workregularapply:workRegularApply:edit">
+					,"canedit":<c:choose><c:when test="${workRegularApply.state == 1 or workRegularApply.state == 3}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canmodify":<c:choose><c:when test="${workRegularApply.state == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="workregularapply:workRegularApply:del">
+					,"candelete":<c:choose><c:when test="${workRegularApply.state == 1 or workRegularApply.state == 3 or workRegularApply.state == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					</shiro:hasPermission>
+                    ,"cancancel":<c:choose><c:when test="${workRegularApply.state == 2}">"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 openDialog(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: '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) {
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 303 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularApplyModifyApply.jsp

@@ -0,0 +1,303 @@
+<%@ 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() {
+
+            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: '#applyDate', //目标元素。由于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 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 = $("#workMonthlyPlanThisList tr").length;
+            //tpl = tpl.replace("workMonthlyPlanThisList[0]_workClientInfoId","workMonthlyPlanThisList["+idx1+"].workClientInfoId");
+
+            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");
+                    }
+                }
+            });
+
+        }
+        function setUserInfo(obj){
+            $("#no").val(obj.no);
+            $("#basicInfoId").val(obj.id);
+            $("#name").val(obj.name);
+            $("#status").val(obj.status);
+            $("#idCard").val(obj.idCard);
+            $("#officeName").val(obj.office.name);
+            $("#jobGrade").val(obj.jobGrade);
+            $("#entryDate").val(obj.entryDate);
+          /*  $("#itemModel").val(obj.idCard);
+            $("#itemModel").val(obj.idCard);
+            $("#itemModel").val(obj.idCard);*/
+
+        }
+
+        function getMoney(value,j){
+            var score = "0";
+            //方法一使用id选择器进行计算。
+            //获取输入的数字
+            //自动计算出结果并填充在相应的输入框中
+            var size = $("#workRegularScoreList tr").length;
+            for (var i = 0;i<size;i++){
+                var scores = $("#workRegularScoreList"+i+"_score").val();
+                var delFlag = $("#workRegularScoreList"+i+"_delFlag").val();
+                if (scores!=undefined && isNumber(scores) && delFlag==0){
+                    if(score==""){
+                        score = parseFloat(scores);
+                    }else {
+                        score = (parseFloat(score) + parseFloat(scores));
+                    }
+                }
+            }
+            $("#score").val(score);
+
+        }
+        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="workRegularApply" action="${ctx}/workregularapply/workRegularApply/saveAudit" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="basicInfoId" id="basicInfoId"/>
+			<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 with-icon">
+						<div class="input-group">
+							<sys:treeselectapply id="userId" name="userId" value="${workRegularApply.userId}" labelName="name" labelValue="${workRegularApply.workStaffBasicInfo.name}"
+											title="用户" url="/sys/office/treeData?type=3" cssClass="form-control required layui-input" notAllowSelectParent="true" checked="true"/>
+						</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">
+						<div class="input-group">
+							<form:input id="no" path="workStaffBasicInfo.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 workRegularApply.state}">${fns:getDictLabel(workRegularApply.state, 'audit_state', '')}</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 id="status" path="workStaffBasicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input" value="${fns:getDictLabel(workRegularApply.workStaffBasicInfo.status, 'staff_status', '')}"/>
+					</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="idCard" readonly="true" path="workStaffBasicInfo.idCard" 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 id="officeName" readonly="true" path="workStaffBasicInfo.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 id="jobGrade" readonly="true" path="workStaffBasicInfo.jobGrade" 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="" readonly="true" readonly="true" 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="entryDate" name="workStaffBasicInfo.entryDate" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"/>
+					</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">
+						<input id="endDate" name="" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"/>
+					</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="applyDate" name="applyDate" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.applyDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>个人总结</h2></div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">个人总结:</label>
+					<div class="layui-input-block">
+						<form:textarea path="summary" htmlEscape="false" rows="6"    maxlength="500" class="form-control "/>
+					</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="contentTable1" class="table table-bordered table-condensed can-edit no-bottom-margin">--%>
+						<%--<thead>--%>
+						<%--<tr>--%>
+							<%--<th width="400px">鉴定内容</th>--%>
+							<%--<th width="200px">评价得分</th>--%>
+						<%--</tr>--%>
+						<%--</thead>--%>
+						<%--<tbody id="workRegularScoreList">--%>
+						<%--<c:if test="${not empty workRegularApply.workRegularScoreList}">--%>
+							<%--<c:forEach items="${workRegularApply.workRegularScoreList}" var="workRegularScore" varStatus="index">--%>
+								<%--<tr id="workRegularScoreList${index.index}">--%>
+									<%--<td class="hide">--%>
+										<%--<input id="workRegularScoreList${index.index}_id" name="workRegularScoreList[${index.index}].id" type="hidden" value="${workRegularScore.id}"/>--%>
+										<%--<input id="workRegularScoreList${index.index}_regularContentId" name="workRegularScoreList[${index.index}].regularContentId" type="hidden" value="${workRegularScore.regularContentId}"/>--%>
+										<%--<input id="workRegularScoreList${index.index}_delFlag" name="workRegularScoreList[${index.index}].delFlag" type="hidden" value="0"/>--%>
+									<%--</td>--%>
+									<%--<td>--%>
+										<%--<input id="workRegularScoreList${index.index}_content"  readonly="true"   name="workRegularScoreList[${index.index}].content" type="text" value="${workRegularScore.content}"   class="form-control "/>--%>
+									<%--</td>--%>
+									<%--<td>--%>
+										<%--<input id="workRegularScoreList${index.index}_score" onchange="getMoney(this.value,'1')"   name="workRegularScoreList[${index.index}].score" type="text" value="${workRegularScore.score}"   class="form-control number "/>--%>
+									<%--</td>--%>
+								<%--</tr>--%>
+							<%--</c:forEach>--%>
+							<%--<tr >--%>
+								<%--<td  style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>合计得分:</label></td>--%>
+								<%--</td>--%>
+								<%--<td>--%>
+									<%--<input id="score"  readonly="true"   name="score" type="text" value="${workRegularApply.score}"   class="form-control "/>--%>
+								<%--</td>--%>
+							<%--</tr>--%>
+						<%--</c:if>--%>
+						<%--</tbody>--%>
+					<%--</table>--%>
+					<div class="layui-item layui-col-sm12  with-textarea"style="margin-top: 20px">
+						<label class="layui-form-label">部门评语:</label>
+						<div class="layui-input-block">
+							<form:textarea path="comment" htmlEscape="false" rows="4"    maxlength="500" class="form-control "/>
+						</div>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 15 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularApplyTask.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>
+

+ 186 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularApplyView.jsp

@@ -0,0 +1,186 @@
+<%@ 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() {
+        });
+	</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="workRegularApply" action="${ctx}/workregularapply/workRegularApply/save" method="post" class="form-horizontal" >
+			<form:hidden path="id"/>
+			<form:hidden path="basicInfoId" id="basicInfoId"/>
+			<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">
+						<div class="input-group">
+							<form:input id="userId" readonly="true" path="workStaffBasicInfo.name" htmlEscape="false" class="form-control layui-input"/>
+						</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">
+						<div class="input-group">
+							<form:input id="no" path="workStaffBasicInfo.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 workRegularApply.state}">${fns:getDictLabel(workRegularApply.state, 'audit_state', '')}</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 id="status" path="workStaffBasicInfo.status" htmlEscape="false" readonly="true"  class="form-control layui-input" value="${fns:getDictLabel(workRegularApply.workStaffBasicInfo.status, 'staff_status', '')}"/>
+					</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="idCard" readonly="true" path="workStaffBasicInfo.idCard" 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 id="officeName" readonly="true" path="workStaffBasicInfo.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 id="jobName" readonly="true" path="jobName" 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="pay" name="pay" value="${workRegularApply.pay}" readonly="true" 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="entryDate" name="workStaffBasicInfo.entryDate" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"/>
+					</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">
+						<input id="endDate" name="" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"/>
+					</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="applyDate" name="applyDate" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularApply.applyDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>个人总结</h2></div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">个人总结:</label>
+					<div class="layui-input-block">
+						<form:textarea path="summary" cssStyle="resize: none" readonly="true" htmlEscape="false" rows="6"    maxlength="500" class="form-control "/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>部门鉴定</h2></div>
+				<div class="layui-item layui-col-sm12  with-textarea"style="margin-top: 20px">
+					<label class="layui-form-label">部门评语:</label>
+					<div class="layui-input-block">
+								<form:textarea path="comment" htmlEscape="false" rows="4" readonly="true"   maxlength="255" class="form-control "/>
+					</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  htmlEscape="false" readonly="true" class="form-control layui-input" value="${fns:getDictLabel(workRegularApply.correctOpinion, 'correct_opinion', '')}"/>--%>
+							<%--</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  with-icon">--%>
+								<%--<div class="input-group">--%>
+									<%--<input id="jobGradeName" name="jobGrade.name" value="${workRegularApply.jobGrade.name}" readonly="true"  htmlEscape="false" class="form-control layui-input"/>--%>
+								<%--</div>--%>
+							<%--</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">--%>
+								<%--<input id=""  readonly="true" name="correctDate" type="text"  maxlength="20" class="laydate-icondate form-control layer-date  layui-input laydate-icon"--%>
+									   <%--value="<fmt:formatDate value="${workRegularApply.correctDate}" pattern="yyyy-MM-dd"/>"/>--%>
+							<%--</div>--%>
+						<%--</div>--%>
+
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<%--<table id="contentTable1" class="table table-bordered table-condensed can-edit no-bottom-margin">--%>
+						<%--<thead>--%>
+						<%--<tr>--%>
+							<%--<th width="400px">鉴定内容</th>--%>
+							<%--<th width="200px">评价得分</th>--%>
+						<%--</tr>--%>
+						<%--</thead>--%>
+						<%--<tbody id="workRegularScoreList">--%>
+						<%--<c:if test="${not empty workRegularApply.workRegularScoreList}">--%>
+							<%--<c:forEach items="${workRegularApply.workRegularScoreList}" var="workRegularScore" varStatus="index">--%>
+								<%--<tr id="workRegularScoreList${index.index}">--%>
+									<%--<td class="hide">--%>
+										<%--<input id="workRegularScoreList${index.index}_id" name="workRegularScoreList[${index.index}].id" type="hidden" value="${workRegularScore.id}"/>--%>
+										<%--<input id="workRegularScoreList${index.index}_regularContentId" name="workRegularScoreList[${index.index}].regularContentId" type="hidden" value="${workRegularScore.regularContentId}"/>--%>
+										<%--<input id="workRegularScoreList${index.index}_delFlag" name="workRegularScoreList[${index.index}].delFlag" type="hidden" value="0"/>--%>
+									<%--</td>--%>
+									<%--<td>--%>
+										<%--<input id="workRegularScoreList${index.index}_content"  readonly="true"   name="workRegularScoreList[${index.index}].content" type="text" value="${workRegularScore.content}"   class="form-control "/>--%>
+									<%--</td>--%>
+									<%--<td>--%>
+										<%--<input id="workRegularScoreList${index.index}_score" readonly="true"   name="workRegularScoreList[${index.index}].score" type="text" value="${workRegularScore.score}"   class="form-control number "/>--%>
+									<%--</td>--%>
+								<%--</tr>--%>
+							<%--</c:forEach>--%>
+							<%--<tr >--%>
+								<%--<td  style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>合计得分:</label></td>--%>
+								<%--</td>--%>
+								<%--<td>--%>
+									<%--<input id="score"  readonly="true"   name="score" type="text" value="${workRegularApply.score}"   class="form-control "/>--%>
+								<%--</td>--%>
+							<%--</tr>--%>
+						<%--</c:if>--%>
+						<%--</tbody>--%>
+					<%--</table>--%>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 108 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularContentForm.jsp

@@ -0,0 +1,108 @@
+<%@ 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() {
+            if($("#createDate").val()==null || $("#createDate").val()==''){
+                $("#createDate").val(getNowFormatDate());
+            }
+            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: '#createDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                format: 'yyyy-MM-dd',
+                type : 'date'
+            });
+        });
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            $("#inputForm").attr("action","${ctx}/workregularapply/workRegularContent/save");
+            if(validateForm.form()){
+
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+
+
+        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;
+        }
+
+	</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="workRegularContent" action="${ctx}/workregularapply/workRegularContent/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-sm12">
+					<label class="layui-form-label"><span class="require-item">*</span>鉴定内容:</label>
+					<div class="layui-input-block">
+						<form:input path="content" htmlEscape="false"   id="content"  class="form-control required layui-input" value="${workRegularContent.content}"/>
+					</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="companyName" htmlEscape="false"  readonly="true"   class="form-control  layui-input" value="${workRegularContent.companyName}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">创建日期:</label>
+					<div class="layui-input-block">
+						<input id="createDate" name="createDate" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularContent.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 208 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularContentList.jsp

@@ -0,0 +1,208 @@
+<%@ 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="workRegularContent" action="${ctx}/workregularapply/workRegularContent/" 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 id="content" name="content" type="text"  maxlength="20" class=" form-control layui-input"
+									 value="${workRegularContent.content}"/>
+								</input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+						</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>
+				</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="workregularapply:workRegularContent:add">
+						<button class="nav-btn nav-btn-add" title="鉴定内容" onclick="openDialog('新增鉴定','${ctx}/workregularapply/workRegularContent/form?tabId=2','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>
+					</shiro:hasPermission>
+					<%--<shiro:hasPermission name="workmonthlyplan:workMonthlyPlan:export">
+					<table:exportExcel url="${ctx}/workmonthlyplan/workMonthlyPlan/export"></table:exportExcel><!-- 导出按钮 -->
+					</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>
+<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: [[
+                // {checkbox: true, fixed: true},
+                {field:'content',align:'center',minWidth:300, sort: true, title: '鉴定内容',templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看鉴定内容', '${ctx}/workregularapply/workRegularContent/form?id=" + d.id + "&tabId=1','95%','95%')\">"+
+                            "<span title=" + d.content + ">" + d.content + "</span></a>" ;
+                        return xml;
+                    }},
+                {field:'companyName',align:'center',  title: '所属公司',minWidth:300}
+                ,{field:'createDate', align:'center',title: '创建时间',width:300}
+                ,{align:'caozuo',align:'center',title:"操作",width:180,templet:function(d){
+                        ////对操作进行初始化
+                        var xml = "";
+                        if(d.canedit != undefined && d.canedit == "1"){
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改鉴定', '${ctx}/workregularapply/workRegularContent/form?id="+ d.id + "&tabId=3','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}/workregularapply/workRegularContent/delete?id=" + d.id + "\" 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="workRegularContent" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workRegularContent.id}"
+                    ,"content":"${workRegularContent.content}"
+                    ,"companyName":"${workRegularContent.companyName}"
+                    ,"createDate":"<fmt:formatDate value="${workRegularContent.createDate}" pattern="yyyy-MM-dd"/>"
+
+                    <shiro:hasPermission name="workregularapply:workRegularContent:edit">
+                    ,"canedit":"1"
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="workregularapply:workRegularContent:del">
+                    ,"candelete":"1"
+                    </shiro:hasPermission>
+
+                }
+                </c:forEach>
+                </c:if>
+            ]
+
+        });
+
+    })
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+<script type="text/javascript">
+    $(document).ready(function() {
+
+    });
+    //搜索框收放
+    $('#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");
+        }
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+    function reset(){
+        $("#searchForm").reset();
+    }
+
+    function openDialog(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: 'tow-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(2) ){
+                    top.layer.close(index);//关闭对话框。
+                    setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+            },
+            btn3: function(index){
+            }
+        });
+    }
+
+</script>
+</body>
+</html>

+ 87 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularContentview.jsp

@@ -0,0 +1,87 @@
+<%@ 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调用提交表单。
+            $("#inputForm").attr("action","${ctx}/workregularapply/workRegularContent/save");
+            if(validateForm.form()){
+
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            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="workRegularContent" action="${ctx}/workregularapply/workRegularContent/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-sm12">
+					<label class="layui-form-label"><span class="require-item">*</span>鉴定内容:</label>
+					<div class="layui-input-block">
+						<form:input path="content" htmlEscape="false" readonly="true"  id="content"  class="form-control required layui-input" value="${workRegularContent.content}"/>
+					</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="companyName" htmlEscape="false"  readonly="true"   class="form-control  layui-input" value="${workRegularContent.companyName}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">创建日期:</label>
+					<div class="layui-input-block">
+						<input id="createDate" name="createDate" readonly="true" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRegularContent.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>

+ 77 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularScoreForm.jsp

@@ -0,0 +1,77 @@
+<%@ 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="workRegularScore" action="${ctx}/workregularapply/workRegularScore/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">转正申请主键:</label></td>
+					<td class="width-35">
+						<form:input path="regularApplyId" 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="score" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">评分表主键:</label></td>
+					<td class="width-35">
+						<form:input path="regularContentId" 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="officeId" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">所属公司:</label></td>
+					<td class="width-35">
+						<form:input path="companyId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 142 - 0
src/main/webapp/webpage/modules/workregularapply/workRegularScoreList.jsp

@@ -0,0 +1,142 @@
+<%@ 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="workRegularScore" action="${ctx}/workregularapply/workRegularScore/" 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="workregularapply:workRegularScore:add">
+				<table:addRow url="${ctx}/workregularapply/workRegularScore/form" title="转正申请评分表"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workregularapply:workRegularScore:edit">
+			    <table:editRow url="${ctx}/workregularapply/workRegularScore/form" title="转正申请评分表" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workregularapply:workRegularScore:del">
+				<table:delRow url="${ctx}/workregularapply/workRegularScore/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workregularapply:workRegularScore:import">
+				<table:importExcel url="${ctx}/workregularapply/workRegularScore/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workregularapply:workRegularScore:export">
+	       		<table:exportExcel url="${ctx}/workregularapply/workRegularScore/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 regularApplyId">转正申请主键</th>
+				<th  class="sort-column score">评分</th>
+				<th  class="sort-column regularContentId">评分表主键</th>
+				<th  class="sort-column officeId">所属部门</th>
+				<th  class="sort-column companyId">所属公司</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="workRegularScore">
+			<tr>
+				<td> <input type="checkbox" id="${workRegularScore.id}" class="i-checks"></td>
+				<td><a  href="#" onclick="openDialogView('查看转正申请评分表', '${ctx}/workregularapply/workRegularScore/form?id=${workRegularScore.id}','800px', '500px')">
+					${workRegularScore.remarks}
+				</a></td>
+				<td>
+					${workRegularScore.regularApplyId}
+				</td>
+				<td>
+					${workRegularScore.score}
+				</td>
+				<td>
+					${workRegularScore.regularContentId}
+				</td>
+				<td>
+					${workRegularScore.officeId}
+				</td>
+				<td>
+					${workRegularScore.companyId}
+				</td>
+				<td>
+					<shiro:hasPermission name="workregularapply:workRegularScore:view">
+						<a href="#" onclick="openDialogView('查看转正申请评分表', '${ctx}/workregularapply/workRegularScore/form?id=${workRegularScore.id}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="workregularapply:workRegularScore:edit">
+    					<a href="#" onclick="openDialog('修改转正申请评分表', '${ctx}/workregularapply/workRegularScore/form?id=${workRegularScore.id}','800px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+    				<shiro:hasPermission name="workregularapply:workRegularScore:del">
+						<a href="${ctx}/workregularapply/workRegularScore/delete?id=${workRegularScore.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>

+ 152 - 0
src/main/webapp/webpage/modules/workreimbur/workReimburAudit.jsp

@@ -0,0 +1,152 @@
+<%@ 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}/workreimbur/workReimbur/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);
+					}
+				}
+			});
+		});
+	</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="workReimbur" action="${ctx}/workreimbur/workReimbur/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="${workReimbur.act.status}" />
+			<div class="control-group">
+				<label class="control-label">报销明细:</label>
+				<div class="controls">
+					<c:forEach items="${workReimbur.detailsList}" var="reimburDetail">
+						<table style="text-align: center;width: 100%;margin-top:10px;" class="table table-striped table-bordered table-condensed" >
+							<tr>
+								<td>报销金额(元):</td><td>${reimburDetail.reimburAmount}</td>
+								<td>报销类别:</td><td>${reimburDetail.reimburCategory}</td>
+							</tr>
+							<tr>
+								<td>费用明细:</td><td colspan="3">${reimburDetail.reimburDetail}</td>
+							</tr>
+						</table>
+					</c:forEach>
+				</div>
+				<label class="control-label">报销总额(元):</label>
+				<div class="controls" style="margin-top: 8px;">
+					${workReimbur.totalAmount}
+				</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 workReimbur.workattachmentList}">
+							<c:forEach items="${workReimbur.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>
+			<div class="control-group">
+				<label class="control-label">备注:</label>
+				<div class="controls" style="margin-top: 8px;">
+						${workReimbur.remarks}
+				</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="${workReimbur.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="${workReimbur.act.procInsId}"/>
+			<act:histoicFlow procInsId="${workReimbur.act.procInsId}"/>
+	</form:form>
+	</div>
+	</div>
+	</div>
+</body>
+</html>

+ 296 - 0
src/main/webapp/webpage/modules/workreimbur/workReimburForm.jsp

@@ -0,0 +1,296 @@
+<%@ 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() {
+            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);
+                    }
+                }
+            });
+        });
+
+        function selectPeople(objId,objName){
+            var currentUser = '${fns:getUser().id}';
+            if(currentUser==objId){
+                parent.layer.msg("不能选择自己为审批人!",{icon:5});
+                return false;
+            }
+            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">
+        var  table_index = 0;
+        function add_details_tables_(){
+            var add_btn = '<a id="add_btn" href="javascript:add_details_tables_(0);" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i>增加报销明细</a>';
+            var add_inline = '<span id="add_inline" class="help-inline"></span>';
+            table_index ++;
+            var a = '<table id="details_list_table_'+table_index+'"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >';
+            var b =
+                '<tr>'+
+                '<td><a class="glyphicon glyphicon-remove-circle" onclick="removeTr('+table_index+')"></a><font color="red">*</font>报销金额(元):</td>'+
+                '<td><input name="detailsList['+table_index+'].reimburAmount"  class="form-control required number"></td>'+
+                '<td>报销类别:</td>'+
+                '<td><input name="detailsList['+table_index+'].reimburCategory"  class="form-control "></td>'+
+                '</tr>';
+            var c =
+                '<tr>'+
+                '<td>费用明细:</td>'+
+                '<td colspan="3"><input name="detailsList['+table_index+'].reimburDetail" placeholder="请输入费用明细描述" class="form-control " /></td>'+
+                '</tr>';
+            var d = ' </table>';
+
+            $("#add_btn").remove();
+            $("#add_inline").remove();
+            $("#details-tables").append(a+b+c+d+add_btn+add_inline);
+        }
+        function removeTr(table_index) {
+            var size = $("[id^=details_list_table_]").size();
+            if(size==1){
+                top.layer.alert('请至少填报一条明细!', {icon: 0, title:'系统提示'});
+            }else{
+                $("#details_list_table_"+table_index).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}/workreimbur/workReimbur/list">报销申请信息</a></li>
+						<li><a href="${ctx}/workreimbur/workReimbur/workReimburTodoList">待办任务</a></li>
+						<li><a href="${ctx}/workreimbur/workReimbur/workReimburHistoricList">已办任务</a></li>
+						<shiro:hasPermission name="workreimbur:workReimbur:edit"><li class="active"><a href="${ctx}/workreimbur/workReimbur/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="workReimbur" action="${ctx}/workreimbur/workReimbur/save" enctype="multipart/form-data" method="post" class="form-horizontal">
+				<form:hidden path="id"/>
+				<c:set var="id" value="${workReimbur.id}" />
+				<c:set var="ids" value="${workReimbur.ids}" />
+				<sys:message content="${message}"/>
+				<div class="control-group">
+					<label class="control-label">报销明细:</label>
+					<div class="controls" id="details-tables">
+						<table id="details_list_table_0"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+							<tr>
+								<td>
+									<a class="glyphicon glyphicon-remove-circle" onclick="removeTr(0)"></a>
+									<span><font color="red">*</font>报销金额(元):</span>
+								</td>
+								<td><input name="detailsList[0].reimburAmount"  class="form-control required number"></td>
+								<td>报销类别:</td>
+								<td><input name="detailsList[0].reimburCategory"  class="form-control "></td>
+							</tr>
+							<tr>
+								<td>费用明细:</td>
+								<td colspan="3"><input name="detailsList[0].reimburDetail" placeholder="请输入费用明细描述" class="form-control " maxlength="100" /></td>
+							</tr>
+						</table>
+						<a id="add_btn" href="javascript:add_details_tables_(0);" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i>增加报销明细</a>
+						<span id="add_inline" 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>
+				<div class="control-group">
+					<label class="control-label">备注:</label>
+					<div class="controls">
+						<form:textarea path="remarks" class="form-control" rows="3" maxlength="20"/>
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<c:if test="${empty id}">
+					<div class="control-group">
+						<label class="control-label"><font color="red">*</font>审批人:</label>
+						<div id="" class="controls">
+							<sys:treeselectleave id="" name="" value="" labelName="" labelValue=""
+												 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>
+					<div class="control-group">
+						<label class="control-label"><font color="red">*</font>抄送人:</label>
+						<div id="CCid" class="controls">
+							<sys:treeselect id="CCid" name="CCid" value="" labelName="" labelValue=""
+											title="抄送人" url="/sys/office/treeDataAll?type=3&isAll=false" cssClass="form-control required" allowClear="true" checked="true" notAllowSelectParent="true"/>
+							<span class="help-inline"></span>
+						</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>

+ 117 - 0
src/main/webapp/webpage/modules/workreimbur/workReimburHistoricList.jsp

@@ -0,0 +1,117 @@
+<%@ 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.render({
+                elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+                ,type: 'datetime'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+                ,type: 'datetime'
+            });
+        });
+	</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}/workreimbur/workReimbur/list">报销申请信息</a></li>
+					<li><a href="${ctx}/workreimbur/workReimbur/workReimburTodoList">待办任务</a></li>
+					<li class="active"><a href="${ctx}/workreimbur/workReimbur/workReimburHistoricList">已办任务</a></li>
+					<shiro:hasPermission name="workreimbur:workReimbur:edit"><li><a href="${ctx}/workreimbur/workReimbur/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}/workreimbur/workReimbur/workReimburHistoricList" 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 id="beginDate"  name="beginDate"  type="text" readonly="readonly" maxlength="20" style="width:200px;" class="laydate-icondate form-control layer-date input-sm"
+								   value="<fmt:formatDate value="${act.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+							 -- 
+							<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" style="width:200px;" class="laydate-icondate form-control layer-date input-sm"
+								   value="<fmt:formatDate value="${act.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+						</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;"  class="sort-column a.create_date">申请时间</th>
+				</tr>
+				</thead>
+				<tbody>
+				<c:forEach items="${list}" var="workReimbur">
+					<c:set var="task" value="${workReimbur.act.task}" />
+					<c:set var="vars" value="${workReimbur.act.vars}" />
+					<c:set var="procDef" value="${workReimbur.act.procDef}" />
+					<c:set var="status" value="${workReimbur.act.status}" />
+					<tr>
+						<td>${workReimbur.act.vars.map.applyUserId}</td>
+						<td>
+							<shiro:hasPermission name="workreimbur:workReimbur:view">
+								<a href="javascript:void(0)" onclick="openDialogView('详情', '${ctx}/workreimbur/workReimbur/form?id=${workReimbur.id}&readAttr=disabled&name=view','80%', '80%')">
+									${procDef.name}
+								</a>
+							</shiro:hasPermission>
+						</td>
+						<td><b title='流程版本号'>V: ${procDef.version}</b></td>
+						<td><fmt:formatDate value="${workReimbur.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>

+ 218 - 0
src/main/webapp/webpage/modules/workreimbur/workReimburList.jsp

@@ -0,0 +1,218 @@
+<%@ 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() {
+            function page(n,s){
+                location = '${ctx}/workReimbur/workReimbur/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">
+		<h5>
+			<ul class="nav nav-tabs">
+				<li class="active"><a href="${ctx}/workreimbur/workReimbur/list">报销申请信息</a></li>
+				<li><a href="${ctx}/workreimbur/workReimbur/workReimburTodoList">待办任务</a></li>
+				<li><a href="${ctx}/workreimbur/workReimbur/workReimburHistoricList">已办任务</a></li>
+				<shiro:hasPermission name="workreimbur:workReimbur:edit"><li><a href="${ctx}/workreimbur/workReimbur/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>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="workReimbur" action="${ctx}/workreimbur/workReimbur/list" 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>
+				<sys:treeselect id="officeId" name="officeId" value="${workReimbur.officeId}" labelName="officeName" labelValue="${workReimbur.officeName}"
+					title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control input-sm" allowClear="true" notAllowSelectParent="true"/>
+			<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">
+	        <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 company.name">申请公司</th>
+				<th style="text-align: center;"  class="sort-column office.name">申请部门</th>
+				<th style="text-align: center;"  class="sort-column a.status">审批状态</th>
+				<th style="text-align: center;"  class="sort-column a.create_date">创建时间</th>
+				<th style="text-align: center;">操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="workReimbur" varStatus="varStatus">
+			<c:set var="task" value="${workReimbur.task }" />
+			<c:set var="pi" value="${workReimbur.processInstance }" />
+			<c:set var="hpi" value="${workReimbur.historicProcessInstance }" />
+			<tr>
+				<td>${varStatus.index+1}</td>
+				<td>
+					<span title="${workReimbur.company.name}">${fns:abbr(workReimbur.company.name, 60)}</span>
+				</td>
+				<td>
+					<span title="${workReimbur.office.name}">${fns:abbr(workReimbur.office.name, 60)}</span>
+				</td>
+				<c:if test="${not empty task}">
+					<td>${fns:getDictLabel(workReimbur.status, 'act_status', '')}</td>
+					<td><fmt:formatDate value="${workReimbur.createDate}" pattern="yyyy-MM-dd"/></td>
+					<td>
+						<div style="text-align: center">
+						<shiro:hasPermission name="workreimbur:workReimbur:view">
+							<a href="javascript:void(0)" onclick="openDialogView('详情', '${ctx}/workreimbur/workReimbur/form?id=${workReimbur.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="${workReimbur.createBy.id eq fns:getUser().id}">
+							<c:if test="${workReimbur.status!=3 && workReimbur.status!=4 && workReimbur.status!=5}">
+								<a href="${ctx}/workreimbur/workReimbur/revoke?id=${workReimbur.id}&processInstanceId=${workReimbur.processInstanceId}&reason=${workReimbur.reason}" 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}/workreimbur/workReimbur/applyOnWorkReimbur?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}/workreimbur/workReimbur/applyOnWorkReimbur?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(workReimbur.status, 'act_status', '')}</td>
+					<td><fmt:formatDate value="${workReimbur.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+					<td>
+						<div style="text-align: center">
+						<shiro:hasPermission name="workreimbur:workReimbur:view">
+							<a href="javascript:void(0)" onclick="openDialogView('详情', '${ctx}/workreimbur/workReimbur/form?id=${workReimbur.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="${workReimbur.createBy.id eq fns:getUser().id}">
+							<c:if test="${workReimbur.status!=3 && workReimbur.status!=4 && workReimbur.status!=5}">
+								<a href="${ctx}/workreimbur/workReimbur/revoke?id=${workReimbur.id}&processInstanceId=${workReimbur.processInstanceId}" onclick="return confirmx('确认要撤回该信息吗?', this.href)" class="btn btn-warning btn-xs"><i class="glyphicon glyphicon-share-alt"></i> 撤回</a>
+							</c:if>
+							<c:if test="${workReimbur.status==4 || workReimbur.status==5}">
+								<shiro:hasPermission name="workreimbur:workReimbur:del">
+									<a href="${ctx}/workreimbur/workReimbur/delete?id=${workReimbur.id}" onclick="return confirmx('确认要删除该报销申请吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+								</shiro:hasPermission>
+							</c:if>
+							<c:if test="${workReimbur.status==3}">
+								<a href="javascript:void(0)" onclick="javascript:top.layer.alert('该申请已通过不允许删除',{icon: 0, title:'系统提示'})" class="btn btn-default btn-xs"><i class="fa fa-trash"></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>

+ 185 - 0
src/main/webapp/webpage/modules/workreimbur/workReimburTodoList.jsp

@@ -0,0 +1,185 @@
+<%@ 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 page(n,s){
+            location = '${ctx}/workreimbur/workReimbur/list/?pageNo='+n+'&pageSize='+s;
+        }
+        $(document).ready(function() {
+            laydate.render({
+                elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+                ,type: 'datetime'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+                ,type: 'datetime'
+            });
+        });
+        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}/workreimbur/workReimbur/list">报销申请信息</a></li>
+					<li class="active"><a href="${ctx}/workreimbur/workReimbur/workReimburTodoList">待办任务</a></li>
+					<li><a href="${ctx}/workreimbur/workReimbur/workReimburHistoricList">已办任务</a></li>
+					<shiro:hasPermission name="workreimbur:workReimbur:edit"><li><a href="${ctx}/workreimbur/workReimbur/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}/workreimbur/workReimbur/workReimburTodoList" 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 id="beginDate"  name="beginDate"  type="text" readonly="readonly" maxlength="20" style="width:200px;" class="laydate-icondate form-control layer-date input-sm"
+								   value="<fmt:formatDate value="${act.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+							 -- 
+							<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" style="width:200px;" class="laydate-icondate form-control layer-date input-sm"
+								   value="<fmt:formatDate value="${act.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+						</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"  class="sort-column a.create_date">申请时间</th>
+					<th style="text-align: center">创建时间</th>
+					<th style="text-align: center">操作</th>
+				</tr>
+				</thead>
+				<tbody>
+				<c:forEach items="${list}" var="workReimbur">
+					<c:set var="task" value="${workReimbur.act.task}" />
+					<c:set var="vars" value="${workReimbur.act.vars}" />
+					<c:set var="procDef" value="${workReimbur.act.procDef}" />
+					<c:set var="status" value="${workReimbur.act.status}" />
+					<tr>
+						<td>${workReimbur.act.vars.map.applyUserId}</td>
+						<td>${task.name}</td>
+						<td>
+							<shiro:hasPermission name="workreimbur:workReimbur:view">
+								<a href="javascript:void(0)" onclick="openDialogView('详情', '${ctx}/workreimbur/workReimbur/form?id=${workReimbur.id}&readAttr=disabled&name=view','80%', '80%')">
+										${procDef.name}
+								</a>
+							</shiro:hasPermission>
+						</td>
+						<td><b title='流程版本号'>V: ${procDef.version}</b></td>
+						<td><fmt:formatDate value="${workReimbur.createDate}" type="both"/></td>
+						<td><fmt:formatDate value="${task.createTime}" type="both"/></td>
+						<td>
+							<div style="text-align: center">
+							<c:if test="${not empty task.assignee}">
+								<a href="javascript:void(0)" onclick="openDialogre('任务办理', '${ctx}/workreimbur/workReimbur/applyOnWorkReimbur?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}/workreimbur/workReimbur/applyOnWorkReimbur?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>
+						--%>	</c:if>
+							</div>
+						</td>
+					</tr>
+				</c:forEach>
+				</tbody>
+			</table>
+			<!-- 分页代码 -->
+			<table:page page="${page}"></table:page>
+			<br/>
+			<br/>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 142 - 0
src/main/webapp/webpage/modules/workreimbursement/reimbursementHistoricList.jsp

@@ -0,0 +1,142 @@
+<%@ 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}/workreimbursement/workReimbursement/list">报销信息</a></li>
+					<li><a href="${ctx}/workreimbursement/workReimbursement/queryToList">待办任务</a></li>
+					<li class="active"><a href="${ctx}/workreimbursement/workReimbursement/queryCompleteList">已办任务</a></li>
+                    <%--<shiro:hasPermission name="workreimbursement:workreimbursement:edit"><li><a href="${ctx}/workreimbursement/workReimbursement/form?tabId=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}/workreimbursement/workReimbursement/queryCompleteList" 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" id="beginDate" name="beginDate" 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" id="endDate" name="endDate" 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>
+                    <th style="text-align: center;">报销状态</th>
+                    <th style="text-align: center;">创建时间</th>
+                </tr>
+                </thead>
+                <tbody>
+				<c:choose>
+					<c:when test="${not empty list}">
+						<c:forEach items="${list}" var="workreimbursement">
+							<c:set var="task" value="${workreimbursement.task}" />
+							<c:set var="vars" value="${workreimbursement.act.vars}" />
+							<c:set var="procDef" value="${workreimbursement.act.procDef}" /><%--
+						<c:set var="procExecUrl" value="${act.procExecUrl}" /> --%>
+							<c:set var="status" value="${workreimbursement.act.status}" />
+							<tr>
+								<td>${workreimbursement.createBy.name}</td>
+								<td>
+										${workreimbursement.act.histTask.name}
+								</td>
+									<%--<td>${task.description}</td>--%>
+								<td>${procDef.name}</td>
+								<td><b title='流程版本号'>V: ${procDef.revision}</b></td>
+								<td><span title="${workreimbursement.number}">${fns:abbr(workreimbursement.number,30)}</span></td>
+								<td>
+									<c:choose>
+										<c:when test="${workreimbursement.ext != 1}">
+											${workreimbursement.businessType}
+										</c:when>
+									</c:choose>
+								</td>
+								<td>${workreimbursement.officeName}</td>
+								<td>${workreimbursement.submitterName}</td>
+								<td>
+									<c:choose>
+										<c:when test="${workreimbursement.ext == 1}">
+											<span title="${workreimbursement.projectName}">${fns:abbr(workreimbursement.projectName,30)}</span>
+										</c:when>
+										<c:otherwise>
+											<span title="${workreimbursement.project.projectName}">${fns:abbr(workreimbursement.project.projectName,30)}</span>
+										</c:otherwise>
+									</c:choose>
+								</td>
+								<td>${workreimbursement.money}</td>
+								<td>${fns:getDictLabel(workreimbursement.status, 'reimbursement_status', '')}</td>
+								<td><fmt:formatDate value="${workreimbursement.createDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
+							</tr>
+						</c:forEach>
+					</c:when>
+					<c:otherwise>
+						<tr>
+							<td colspan="13" align="center">
+								暂无数据
+							</td>
+						</tr>
+					</c:otherwise>
+				</c:choose>
+                </tbody>
+            </table>
+			<!-- 分页代码 -->
+			<table:page page="${page}"></table:page>
+			<br/>
+			<br/>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 225 - 0
src/main/webapp/webpage/modules/workreimbursement/reimbursementTodoList.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"/>
+	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></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: ['同意','驳回','关闭'],
+                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){
+                }
+            });
+        }
+        function page(n,s){
+            location = '${ctx}/oa/leave/list/?pageNo='+n+'&pageSize='+s;
+        }
+        /**
+         * 签收任务
+         */
+        function claim(taskId) {
+            $.get('${ctx}/act/task/claim' ,{taskId: taskId}, function(data) {
+                if (data == 'true'){
+                    top.$.jBox.tip('签收完成');
+                    location = '${ctx}/workreimbursement/workReimbursement';
+                }else{
+                    top.$.jBox.tip('签收失败');
+                }
+            });
+        }
+	</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">
+                    <ul class="nav nav-tabs">
+						<li><a href="${ctx}/workreimbursement/workReimbursement/list">报销信息</a></li>
+						<li  class="active"><a href="${ctx}/workreimbursement/workReimbursement/queryToList">待办任务</a></li>
+						<li><a href="${ctx}/workreimbursement/workReimbursement/queryCompleteList">已办任务</a></li>
+                        <%--<shiro:hasPermission name="workreimbursement:workreimbursement:edit"><li><a href="${ctx}/workreimbursement/workReimbursement/form?tabId=0">报销申请</a></li></shiro:hasPermission>--%>
+                    </ul>
+				</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}/workreimbursement/workReimbursement/queryToList" 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" id="beginDate" name="beginDate" 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" id="endDate" name="endDate" 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>
+					<th style="text-align: center;">报销状态</th>
+					<th style="text-align: center;">创建时间</th>
+					<th style="text-align: center;">操作</th>
+				</tr>
+				</thead>
+				<tbody>
+				<c:choose>
+					<c:when test="${not empty list}">
+						<c:forEach items="${list}" var="workreimbursement">
+							<c:set var="task" value="${workreimbursement.act.task}" />
+							<c:set var="vars" value="${workreimbursement.act.vars}" />
+							<c:set var="procDef" value="${workreimbursement.act.procDef}" /><%--
+				<c:set var="procExecUrl" value="${act.procExecUrl}" /> --%>
+							<c:set var="status" value="${workreimbursement.act.status}" />
+							<tr>
+								<td>${workreimbursement.createBy.name}</td>
+								<td>
+										${task.name}
+								</td>
+									<%--<td>${task.description}</td>--%>
+								<td>${procDef.name}</td>
+								<td><b title='流程版本号'>V: ${procDef.revision}</b></td>
+								<td><span title="${workreimbursement.number}">${fns:abbr(workreimbursement.number,30)}</span></td>
+								<td>
+									<c:choose>
+										<c:when test="${workreimbursement.ext != 1}">
+											${workreimbursement.businessType}
+										</c:when>
+									</c:choose>
+								</td>
+								<td>${workreimbursement.officeName}</td>
+								<td>${workreimbursement.submitterName}</td>
+								<td>
+									<c:choose>
+										<c:when test="${workreimbursement.ext == 1}">
+											<span title="${workreimbursement.projectName}">${fns:abbr(workreimbursement.projectName,30)}</span>
+										</c:when>
+										<c:otherwise>
+											<span title="${workreimbursement.project.projectName}">${fns:abbr(workreimbursement.project.projectName,30)}</span>
+										</c:otherwise>
+									</c:choose>
+								</td>
+								<td>${workreimbursement.money}</td>
+								<td>${fns:getDictLabel(workreimbursement.status, 'reimbursement_status', '')}</td>
+								<td><fmt:formatDate value="${workreimbursement.createDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
+								<td>
+									<div style="text-align: center">
+									<c:choose>
+										<c:when test="${workreimbursement.status == '2'}">
+											<a href="javascript:void(0)" onclick="openDialogre('审核', '${ctx}/workreimbursement/workReimbursement/applyOnLeave?id=${workreimbursement.id}&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:when>
+										<c:otherwise>
+											<a href="javascript:void(0)" onclick="openDialogre('审核', '${ctx}/workreimbursement/workReimbursement/applyOnLeave?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:otherwise>
+									</c:choose>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+					</c:when>
+					<c:otherwise>
+						<tr>
+							<td colspan="13" align="center">暂无数据</td>
+						</tr>
+					</c:otherwise>
+				</c:choose>
+
+				</tbody>
+			</table>
+			<!-- 分页代码 -->
+			<table:page page="${page}"></table:page>
+			<br/>
+			<br/>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 422 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAudit.jsp

@@ -0,0 +1,422 @@
+<%@ 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;
+		  }else {
+              parent.layer.msg("信息未填写完整!", {icon: 5});
+          }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+            if (${workReimbursement.ext == 0}){
+                $(".td1").removeClass("hide");
+                $(".project_reimbursement_div").show();
+                $(".not_project_reimbursement_div").hide();
+            }else {
+                $(".td1").addClass("hide");
+                $(".project_reimbursement_div").hide();
+                $(".not_project_reimbursement_div").show();
+            }
+            if (${workReimbursement.isPublic =='0'}){
+                $(".isPublic").addClass("hide");
+            }else {
+                $(".isPublic").removeClass("hide");
+            }
+			$("#name").focus();
+			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>
+	<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="workReimbursement" enctype="multipart/form-data" action="${ctx}/workreimbursement/workReimbursement/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"/>
+
+		<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="submitterName" htmlEscape="false"  id="submitterName"  class="form-control layui-input" value = "${workReimbursement.submitterName}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">报销编号:</label>
+				<div class="layui-input-block">
+					<div class="input-group">
+						<input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${workReimbursement.number}"/>
+						<span class="input-group-btn">
+                        <label class="form-status"><c:choose><c:when test="${not empty workReimbursement.status}">${fns:getDictLabel(workReimbursement.status, 'audit_state', '')}</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">所属部门:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value = "${workReimbursement.officeName}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">银行卡号:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false" readonly="true"  class="form-control layui-input" value = "${workReimbursement.bankCard}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">报销类型:</label>
+				<div class="layui-input-block">
+					<input readonly="true" htmlEscape="false" class="form-control layui-input"
+						   value="<c:choose><c:when test="${workReimbursement.ext == 0}">项目报销</c:when><c:otherwise>非项目报销</c:otherwise></c:choose>"/>
+				</div>
+			</div>
+
+			<div class="layui-item layui-col-sm6 td1">
+				<label class="layui-form-label">报销项目:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.project.projectName}"/>
+				</div>
+			</div>
+				<%--<div class="layui-item layui-col-sm6 td1">
+                    <label class="layui-form-label">项目负责人:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${workReimbursement.projectMasterName}"/>
+                    </div>
+                </div>--%>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label double-line">是否对公报销:</label>
+				<div class="layui-input-block">
+					<input readonly="true" htmlEscape="false" class="form-control layui-input"
+						   value="<c:choose><c:when test="${workReimbursement.isPublic == '0'}">否</c:when><c:otherwise>是</c:otherwise></c:choose>"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6 isPublic">
+				<label class="layui-form-label">公司名称:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.comname}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6 isPublic">
+				<label class="layui-form-label">开户行:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.bank}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6 isPublic">
+				<label class="layui-form-label">银行账号:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.bankNo}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">报销人:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.submitterName}"/>
+				</div>
+			</div>
+
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">报销日期:</label>
+				<div class="layui-input-block">
+					<input readonly="readonly" class="form-control layui-input" value="<fmt:formatDate value="${workReimbursement.submitterDate}" pattern="yyyy-MM-dd"/>"/>
+				</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="contentTable3" class="table table-bordered table-condensed can-edit no-bottom-margin">
+					<thead>
+					<tr>
+						<th width="190px">借款日期</th>
+						<th width="190px">借款类型</th>
+						<th width="190px">借款项目</th>
+						<th width="190px">借款金额</th>
+						<th width="180px">未还金额</th>
+						<th width="100px">本次还款</th>
+						<th width="120px">借款编号</th>
+					</tr>
+					</thead>
+					<tbody id="reimbursementBackList">
+					<c:if test="${not empty workReimbursement.reimbursementBackList}">
+						<c:forEach items="${workReimbursement.reimbursementBackList}" var="reimbursementBack" varStatus="index">
+							<tr id="reimbursementBackList${index.index}">
+								<td class="hide">
+									<input id="reimbursementBackList${index.index}_id" name="reimbursementBackList[${index.index}].id" type="hidden" value="${reimbursementBack.id}"/>
+									<input id="reimbursementBackList${index.index}_workLoanId" name="reimbursementBackList[${index.index}].workLoan.id" type="hidden" value="${reimbursementBack.workLoan.id}"/>
+									<input id="reimbursementBackList${index.index}_delFlag" name="reimbursementBackList[${index.index}].delFlag" type="hidden" value="0"/>
+								</td>
+								<td>
+									<input id="reimbursementBackList${index.index}_1"   type="text" maxlength="20"  readonly="true" class=" form-control layui-input"
+										   value="<fmt:formatDate value="${reimbursementBack.workLoan.loanDate}" pattern="yyyy-MM-dd"/>"/>
+									</input>
+								</td>
+								<td>
+									<input id="reimbursementBackList${index.index}_2"  readonly="true" type="text" value="${reimbursementBack.workLoan.type}"   class="form-control"/>
+								</td>
+								<td>
+									<input id="reimbursementBackList${index.index}_3"  readonly="true" type="text" value="${reimbursementBack.workLoan.projectRecords.projectName}"   class="form-control"/>
+								</td>
+								<td>
+									<input id="reimbursementBackList${index.index}_4"  readonly="true" type="text" value="${reimbursementBack.workLoan.money}"   class="form-control"/>
+								</td>
+								<td>
+									<input id="reimbursementBackList${index.index}_5"  readonly="true" type="text" value="${reimbursementBack.workLoan.notRepay}"   class="form-control"/>
+								</td>
+								<td>
+									<input id="reimbursementBackList${index.index}_6" readonly="true"  name="reimbursementBackList[${index.index}].money" type="text" value="${reimbursementBack.money}"   class="form-control number "/>
+								</td>
+								<td>
+									<input id="reimbursementBackList${index.index}_7"  readonly="true" type="text" value="${reimbursementBack.workLoan.num}"   class="form-control"/>
+								</td>
+							</tr>
+						</c:forEach>
+					</c:if>
+					</tbody>
+				</table>
+				<table id="contentMoneys1" class="table table-bordered table-condensed can-edit summary">
+					<tr>
+						<td  style="width:190px;vertical-align:middle;text-align: center;"><label><font color="red">*</font>合计</label></td>
+						<td  width="190px" style="vertical-align:middle;text-align: center;">
+							-
+						</td >
+						<td  width="190px" style="vertical-align:middle;text-align: center;">
+							-
+						</td>
+						<td  width="190px" style="vertical-align:middle;text-align: center;">
+							-
+						</td>
+						<td width="180px" style="vertical-align:middle;text-align: center;">
+							-
+						</td>
+						<td width="100px" style="vertical-align:middle;text-align: center;">
+							<input  id="backmoney" value="${workReimbursement.backmoney}" name="backmoney" htmlEscape="false" readonly="true"   maxlength="12"  class="form-control "/>
+						</td>
+						<td  width="120px" style="vertical-align:middle;text-align: center;">
+							-
+						</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="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
+					<thead>
+					<tr>
+						<th width="200px">财务科目</th>
+						<th>报销费用摘要</th>
+						<th width="150px">发票类型</th>
+						<th width="150px">报销费用(元)</th>
+						<th>备注</th>
+					</tr>
+					</thead>
+					<tbody id="workAccountList">
+					<c:if test="${not empty workReimbursement.workAccountList}">
+						<c:forEach items="${workReimbursement.workAccountList}" var="workAccount" varStatus="index">
+							<tr id="workAccountList${index.index}">
+								<td class="hide">
+								</td>
+								<td>
+									<div class="project_reimbursement_div">
+											${fns:getMainDictLabel(workAccount.financialSubjects, 'project_reimbursement', '')}
+									</div>
+									<div class="not_project_reimbursement_div" style="display:none;">
+											${fns:getMainDictLabel(workAccount.financialSubjectss, 'not_project_reimbursement', '')}
+									</div>
+								</td>
+								<td title="${workAccount.moneyAbstract}">
+										${workAccount.moneyAbstract}
+								</td>
+								<td title="${workAccount.invoiceType}">
+										${workAccount.invoiceType}
+								</td>
+								<td>
+									<fmt:formatNumber value="${workAccount.money}" pattern="#,#00.00"/>
+								</td>
+								<td title="${workAccount.remarks}">
+										${workAccount.remarks}
+								</td>
+
+							</tr>
+						</c:forEach>
+
+					</c:if>
+					</tbody>
+				</table>
+				<table id="contentMoneys" class="table table-bordered table-condensed summary">
+					<tr>
+						<td width="200px" style="vertical-align:middle;text-align: center;padding: 0px;"><label>总报销费用(元):</label></td>
+						<td >
+							<fmt:formatNumber value="${workReimbursement.money}" pattern="#,#00.00"/>
+						</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="contentTable2" class="table table-bordered table-condensed no-bottom-margin details">
+					<thead>
+					<tr>
+						<th width="300px">发票代码</th>
+						<th width="200px">发票号</th>
+						<th width="200px">金额</th>
+						<th width="200px">税额</th>
+						<th width="200px">价税合计</th>
+					</tr>
+					</thead>
+					<tbody id="reimbursementVATTaxes">
+					<c:if test="${not empty workReimbursement.reimbursementVATTaxes}">
+						<c:forEach items="${workReimbursement.reimbursementVATTaxes}" var="reimbursementVATTaxe" varStatus="index">
+							<tr>
+								<td class="hide">
+								</td>
+								<td>
+										${reimbursementVATTaxe.invoiceCode}
+								</td>
+
+								<td>
+										${reimbursementVATTaxe.invoiceNumber}
+								</td>
+								<td>
+										${reimbursementVATTaxe.money}
+								</td>
+								<td>
+										${reimbursementVATTaxe.taxAmount}
+								</td>
+								<td>
+										${reimbursementVATTaxe.sumMoney}
+								</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 layui-col-xs12 form-table-container" >
+				<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="${workReimbursement.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">
+			<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" />
+						<input type="file" name="upload_files" style="display: none;">
+					</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="${workReimbursement.act.procInsId}"/>
+		<act:histoicFlow procInsId="${workReimbursement.act.procInsId}"/>
+			</div>
+		</div>
+
+		<div class="form-group layui-row page-end"></div>
+	</form:form>
+</div>
+</div>
+</body>
+</html>
+

+ 679 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementCWAudit.jsp

@@ -0,0 +1,679 @@
+<%@ 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 state;//考核科目显示隐藏
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 1){
+                    $('#flag').val('yes');
+                    var idx1 = $("#contentTable tbody").length;
+                    for(var i = 0;i < idx1; i++){
+                        var idx2 = $("#workAccountList"+i+" tr").length;
+                        var financialSubjectss = $("#workAccountList"+i+"_financialSubjectss").val();
+                        var financialSubjects = $("#workAccountList"+i+"_financialSubjects").val();
+                        var moneyAbstract = $("#workAccountList"+i+"_moneyAbstract").val();
+                        var totalMoney = $("#workAccountList"+i+"_money").val();
+                            if(financialSubjectss==null || financialSubjectss==''|| financialSubjectss == undefined){
+                                if(financialSubjects==null || financialSubjects==''|| financialSubjects == undefined){
+                                    parent.layer.msg("财务科目为空!", {icon: 5});
+                                    return false;
+                                }
+                            }
+                        if(moneyAbstract==null || moneyAbstract==''|| moneyAbstract == undefined){
+                            parent.layer.msg("报销费用摘要不能为空!", {icon: 5});
+                            return false;
+                        }
+                        var auditMoney = "0.00";
+                        for(var j = 0;j < idx2; j++){
+                            var checkSubjects = $("#workAccountList"+i+"_audit"+j+"_checkSubjects").val();
+                            var money = $("#workAccountList"+i+"_audit"+j+"_money").val();
+                            var u8Subjects = $("#workAccountList"+i+"_audit"+j+"_u8Subjects").val();
+                            if(state=='1'){
+                            if (checkSubjects==null || checkSubjects=='' || checkSubjects == undefined){
+                                parent.layer.msg("考核科目不能为空!", {icon: 5});
+                                return false;
+                            }
+                            }
+                            if (money==null || money==''|| money == undefined){
+                                parent.layer.msg("考核金额不能为空!", {icon: 5});
+                                return false;
+                            }
+                            if (u8Subjects==null || u8Subjects==''|| u8Subjects == undefined){
+                                parent.layer.msg("U8科目不能为空!", {icon: 5});
+                                return false;
+                            }
+                            auditMoney = (parseFloat(auditMoney) + parseFloat(money)).toFixed(2);
+                        }
+                        var s = parseFloat(totalMoney) - parseFloat(auditMoney);
+                        if (s<0){
+                            parent.layer.msg("考核金额不能超过报销金额,请确认输入!", {icon: 5});
+                            return false;
+                        }
+                        if(parseFloat($("#backmoneys").val())<0){
+                            parent.layer.msg("实际报销总额不能为负数,请确认输入!", {icon: 5});
+                            return false;
+                        }
+                    }
+                }else{
+                    $('#flag').val('no');
+                }
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            if (${workReimbursement.ext == 0}){
+                $(".td1").removeClass("hide");
+                $(".project_reimbursement_div").show();
+                $(".not_project_reimbursement_div").hide();
+            }else {
+                $(".td1").addClass("hide");
+                $(".project_reimbursement_div").hide();
+                $(".not_project_reimbursement_div").show();
+            }
+            if (${workReimbursement.isPublic =='0'}){
+                $(".isPublic").addClass("hide");
+            }else {
+                $(".isPublic").removeClass("hide");
+            }
+            state=${isShow};
+            if (state =='0'){
+                $(".isShow").hide();
+            }else {
+                $(".isShow").show();
+            }
+            if($("#backmoney").val()==null||$("#backmoney").val()==''){
+                $("#backmoney").val('0');
+            }
+            $("#name").focus();
+            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 getEntity(form) {
+            var result = {};
+            $(form).find("[data-field]").each(function() {
+                var field = $(this).attr("data-field");
+                var val;
+
+                if ($(this).attr('type') == 'checkbox') {
+                    val = $(this).prop('checked');
+                } else if ($(this).attr('type') == 'radio') {
+                    val = $(this).prop('checked');
+                } else {
+                    val = $(this).val();
+                }
+                // 获取单个属性的值,并扩展到result对象里面
+                getField(field.split('.'), val, result);
+            });
+            return result;
+        }
+
+        function getField(fieldNames, value, result) {
+            if (fieldNames.length > 1) {
+                for (var i = 0; i < fieldNames.length - 1; i++) {
+                    if (result[fieldNames[i]] == undefined) {
+                        result[fieldNames[i]] = {}
+                    }
+                    result = result[fieldNames[i]];
+                }
+                result[fieldNames[fieldNames.length - 1]] = value;
+            } else {
+                result[fieldNames[0]] = value;
+            }
+        }
+
+        function addRow(list, idx, tpl, row){
+            var size = list.replace("#workAccountList","");
+            var idx1 = $("#workAccountList"+size+" tr").length;
+            tpl = tpl.replace("workAccountList[0]","workAccountList["+size+"]");
+            tpl = tpl.replace("workAccountList[0]","workAccountList["+size+"]");
+            tpl = tpl.replace("workAccountAuditList[0]","workAccountAuditList["+idx1+"]");
+            tpl = tpl.replace("workAccountAuditList[0]","workAccountAuditList["+idx1+"]");
+            tpl = tpl.replace("workAccountAuditList[0]","workAccountAuditList["+idx1+"]");
+            tpl = tpl.replace("workAccountAuditList[0]","workAccountAuditList["+idx1+"]");
+            tpl = tpl.replace(/\audit0/g,"audit"+idx1);
+            tpl = tpl.replace(/\workAccountList0/g,"workAccountList"+size);
+            var ext = $("#ext").val();
+            if(ext == 0){
+                tpl = tpl.replace("not_project_reimbursement_div","not_project_reimbursement_div\" style=\"display:none;\"");
+                tpl = tpl.replace("project_reimbursement_div\" style=\"display:none;\"","project_reimbursement_div");
+            }else {
+                tpl = tpl.replace("project_reimbursement_div","project_reimbursement_div\" style=\"display:none;\"");
+                tpl = tpl.replace("not_project_reimbursement_div\" style=\"display:none;\"","not_project_reimbursement_div\"");
+            }
+            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");
+                    }
+                }
+            });
+            if (state =='0'){
+                $(".isShow").hide();
+            }else {
+                $(".isShow").show();
+            }
+        }
+        function delRow(obj){
+            $(obj).parent().parent().remove();
+            getMoney();
+        }
+
+        function getMoney(){
+            var money = 0;
+            $(".checkMoney").each(function () {
+               if($(this).val()!=undefined && isNumber($(this).val())){
+                   money = (parseFloat(money) + parseFloat($(this).val())).toFixed(2);
+               }
+            })
+            $("#checkMoneys").val(formatNumber(money,2));
+            $("#sumcheckMoneys").val(money);
+            var backmoneys=(parseFloat(money)-  parseFloat($("#backmoney").val())).toFixed(2);
+            $("#backmoneys").val(formatNumber(backmoneys,2));
+            $("#sumbackmoneys").val(backmoneys);
+        }
+        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 formatNumber(num, precision, separator) {
+            var parts;
+            if (!isNaN(parseFloat(num)) && isFinite(num)) {
+                num = Number(num);
+                num = (typeof precision !== 'undefined' ? num.toFixed(precision) : num).toString();
+                parts = num.split('.');
+                parts[0] = parts[0].toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1' + (separator || ','));
+                return parts.join('.');
+            }
+            return NaN;
+        }
+    </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="workReimbursement" enctype="multipart/form-data" action="${ctx}/workreimbursement/workReimbursement/saveAudit" method="post" class="form-horizontal">
+        <form:hidden path="id"/>
+        <form:hidden path="home"/>
+        <form:hidden path="ext"/>
+        <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 path="submitterName" htmlEscape="false"  id="submitterName"  class="form-control layui-input" value = "${workReimbursement.submitterName}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">报销编号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${workReimbursement.number}"/>
+                            <span class="input-group-btn">
+                        <label class="form-status"><c:choose><c:when test="${not empty workReimbursement.status}">${fns:getDictLabel(workReimbursement.status, 'audit_state', '')}</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">所属部门:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value = "${workReimbursement.officeName}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">银行卡号:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false" readonly="true"  class="form-control layui-input" value = "${workReimbursement.bankCard}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">报销类型:</label>
+                    <div class="layui-input-block">
+                        <input readonly="true" htmlEscape="false" class="form-control layui-input"
+                               value="<c:choose><c:when test="${workReimbursement.ext == 0}">项目报销</c:when><c:otherwise>非项目报销</c:otherwise></c:choose>"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 td1">
+                    <label class="layui-form-label">报销项目:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.project.projectName}"/>
+                    </div>
+                </div>
+                    <%--<div class="layui-item layui-col-sm6 td1">
+                        <label class="layui-form-label">项目负责人:</label>
+                        <div class="layui-input-block">
+                            <input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${workReimbursement.projectMasterName}"/>
+                        </div>
+                    </div>--%>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label double-line">是否对公报销:</label>
+                    <div class="layui-input-block">
+                        <input readonly="true" htmlEscape="false" class="form-control layui-input"
+                               value="<c:choose><c:when test="${workReimbursement.isPublic == '0'}">否</c:when><c:otherwise>是</c:otherwise></c:choose>"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 isPublic">
+                    <label class="layui-form-label">公司名称:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.comname}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 isPublic">
+                    <label class="layui-form-label">开户行:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.bank}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 isPublic">
+                    <label class="layui-form-label">银行账号:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.bankNo}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">报销人:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.submitterName}"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">报销日期:</label>
+                    <div class="layui-input-block">
+                        <input readonly="readonly" class="form-control layui-input" value="<fmt:formatDate value="${workReimbursement.submitterDate}" pattern="yyyy-MM-dd"/>"/>
+                    </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="contentTable3" class="table table-bordered table-condensed can-edit no-bottom-margin">
+                        <thead>
+                        <tr>
+                            <th width="190px">借款日期</th>
+                            <th width="190px">借款类型</th>
+                            <th width="190px">借款项目</th>
+                            <th width="190px">借款金额</th>
+                            <th width="180px">未还金额</th>
+                            <th width="100px">本次还款</th>
+                            <th width="120px">借款编号</th>
+                        </tr>
+                        </thead>
+                        <tbody id="reimbursementBackList">
+                        <c:if test="${not empty workReimbursement.reimbursementBackList}">
+                            <c:forEach items="${workReimbursement.reimbursementBackList}" var="reimbursementBack" varStatus="index">
+                                <tr id="reimbursementBackList${index.index}">
+                                    <td class="hide">
+                                        <input id="reimbursementBackList${index.index}_id" name="reimbursementBackList[${index.index}].id" type="hidden" value="${reimbursementBack.id}"/>
+                                        <input id="reimbursementBackList${index.index}_workLoanId" name="reimbursementBackList[${index.index}].workLoan.id" type="hidden" value="${reimbursementBack.workLoan.id}"/>
+                                        <input id="reimbursementBackList${index.index}_delFlag" name="reimbursementBackList[${index.index}].delFlag" type="hidden" value="0"/>
+                                    </td>
+                                    <td>
+                                        <input id="reimbursementBackList${index.index}_1"   type="text" maxlength="20"  readonly="true" class=" form-control layui-input"
+                                               value="<fmt:formatDate value="${reimbursementBack.workLoan.loanDate}" pattern="yyyy-MM-dd"/>"/>
+                                        </input>
+                                    </td>
+                                    <td>
+                                        <input id="reimbursementBackList${index.index}_2"  readonly="true" type="text" value="${reimbursementBack.workLoan.type}"   class="form-control"/>
+                                    </td>
+                                    <td>
+                                        <input id="reimbursementBackList${index.index}_3"  readonly="true" type="text" value="${reimbursementBack.workLoan.projectRecords.projectName}"   class="form-control"/>
+                                    </td>
+                                    <td>
+                                        <input id="reimbursementBackList${index.index}_4"  readonly="true" type="text" value="${reimbursementBack.workLoan.money}"   class="form-control"/>
+                                    </td>
+                                    <td>
+                                        <input id="reimbursementBackList${index.index}_5"  readonly="true" type="text" value="${reimbursementBack.workLoan.notRepay}"   class="form-control"/>
+                                    </td>
+                                    <td>
+                                        <input id="reimbursementBackList${index.index}_6" readonly="true"  name="reimbursementBackList[${index.index}].money" type="text" value="${reimbursementBack.money}"   class="form-control number "/>
+                                    </td>
+                                    <td>
+                                        <input id="reimbursementBackList${index.index}_7"  readonly="true" type="text" value="${reimbursementBack.workLoan.num}"   class="form-control"/>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                        </c:if>
+                        </tbody>
+                    </table>
+                    <table id="contentMoneys1" class="table table-bordered table-condensed can-edit summary">
+                        <tr>
+                            <td  style="width:190px;vertical-align:middle;text-align: center;"><label><font color="red">*</font>合计</label></td>
+                            <td  width="190px" style="vertical-align:middle;text-align: center;">
+                                -
+                            </td >
+                            <td  width="190px" style="vertical-align:middle;text-align: center;">
+                                -
+                            </td>
+                            <td  width="190px" style="vertical-align:middle;text-align: center;">
+                                -
+                            </td>
+                            <td width="180px" style="vertical-align:middle;text-align: center;">
+                                -
+                            </td>
+                            <td width="100px" style="vertical-align:middle;text-align: center;">
+                                <input  id="backmoney" value="${workReimbursement.backmoney}" name="backmoney" htmlEscape="false" readonly="true"   maxlength="12"  class="form-control "/>
+                            </td>
+                            <td  width="120px" style="vertical-align:middle;text-align: center;">
+                                -
+                            </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="contentTable" class="table table-bordered table-condensed no-bottom-margin can-edit">
+                    <thead>
+                    <tr>
+                        <th width="150px"><span class="require-item">*</span>财务科目</th>
+                        <th><span class="require-item">*</span>报销费用摘要</th>
+                        <th width="150px"><font color="red">*</font>发票类型</th>
+                        <th width="150px">报销费用(元)</th>
+                        <th width="80px">备注</th>
+                        <th width="150px"><span class="require-item">*</span>U8科目</th>
+                        <th width="150px" class="isShow"><span class="require-item">*</span>考核科目</th>
+                        <th width="120px"><span class="require-item">*</span>考核金额(元)</th>
+                        <th width="80px">操作</th>
+                    </tr>
+                    </thead>
+                    <c:if test="${not empty workReimbursement.workAccountList}">
+                    <c:forEach items="${workReimbursement.workAccountList}" var="workAccount" varStatus="index">
+                    <tbody id="workAccountList${index.index}">
+                    <tr id="workAccountList${index.index}_audit0">
+                        <td class="hide">
+                            <input id="workAccountList${index.index}_id" name="workAccountList[${index.index}].id" type="hidden" value="${workAccount.id}"/>
+                            <input id="workAccountList${index.index}_delFlag" name="workAccountList[${index.index}].delFlag" type="hidden" value="0"/>
+                            <input id="workAccountList${index.index}_money" name="workAccountList[${index.index}].money" type="hidden" value="${workAccount.money}"/>
+                        </td>
+                        <td>
+                            <div class="project_reimbursement_div">
+                                <form:select id="workAccountList${index.index}_financialSubjects" path="workAccountList[${index.index}].financialSubjects" class="form-control ">
+                                    <form:option value="" label=""/>
+                                    <form:options items="${fns:getMainDictList('project_reimbursement')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                </form:select>
+                            </div>
+                            <div class="not_project_reimbursement_div" style="display:none;">
+                                <form:select id="workAccountList${index.index}_financialSubjectss" path="workAccountList[${index.index}].financialSubjectss" class="form-control ">
+                                    <form:option value="" label=""/>
+                                    <form:options items="${fns:getMainDictList('not_project_reimbursement')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                </form:select>
+                            </div>
+                        </td>
+                        <td>
+                            <input id="workAccountList${index.index}_moneyAbstract"  name="workAccountList[${index.index}].moneyAbstract"  type="text" value="${workAccount.moneyAbstract}"    class="form-control "/>
+                        </td>
+                        <td style="text-align: center; vertical-align:middle;">
+                                ${workAccount.invoiceType}
+                        </td>
+                        <td style="text-align: center; vertical-align:middle;">
+                            <fmt:formatNumber value="${workAccount.money}" pattern="#,#00.00"/>
+                        </td>
+                        <td style="text-align: center; vertical-align:middle;" title="${workAccount.remarks}">
+                                ${workAccount.remarks}
+                        </td>
+                        <td>
+                            <form:select id="workAccountList${index.index}_audit0_u8Subjects" path="workAccountList[${index.index}].workAccountAuditList[0].u8Subjects" class="form-control ">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getMainDictList('u8_subjects')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>
+                        </td>
+                        <td class="isShow">
+                            <form:select id="workAccountList${index.index}_audit0_checkSubjects" path="workAccountList[${index.index}].workAccountAuditList[0].checkSubjects" class="form-control ">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getMainDictList('check_subjects')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>
+                        </td>
+                        <td>
+                            <input id="workAccountList${index.index}_audit0_money" onchange="getMoney()" name="workAccountList[${index.index}].workAccountAuditList[0].checkMoney" type="text" value="${workAccount.workAccountAuditList[0].checkMoney}"  maxlength="10"  class="form-control number checkMoney"/>
+                            <input id="workAccountList${index.index}_audit0_id" name="workAccountList[${index.index}].workAccountAuditList[0].id" type="hidden" value="${workAccount.workAccountAuditList[0].id}"/>
+                        </td>
+                        <td  class="text-center op-td" >
+                            <span class="op-btn op-btn-add" onclick="addRow('#workAccountList${index.index}', workAccountListRowIdx, workAccountAuditListTpl);workAccountListRowIdx=workAccountListRowIdx+1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</span>
+                        </td>
+                    </tr>
+                    </tbody>
+                    </c:forEach>
+
+                    </c:if>
+                </table>
+                <table id="contentMoneys" class="table table-bordered table-condensed can-edit summary">
+                    <tr>
+                        <td width="150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>总报销费用(元):</label></td>
+                        <td>
+                            <input htmlEscape="false" id="moneys"  readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${workReimbursement.money}" pattern="#,#00.00"/>"/>
+                            <input htmlEscape="false" id="summoney" name="money" type="hidden"  readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
+                        </td>
+                        <td width="150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>考核金额总额(元):</label></td>
+                        <td >
+                            <input htmlEscape="false" id="checkMoneys"  readonly="true" class="form-control layui-input"/>
+                            <input htmlEscape="false" id="sumcheckMoneys" name="checkMoneys" type="hidden"  readonly="true" class="form-control layui-input" value="${workReimbursement.checkMoneys}"/>
+                        </td>
+                        <td width="150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>实际报销费用(元):</label></td>
+                        <td >
+                            <input htmlEscape="false" id="backmoneys"  readonly="true" class="form-control layui-input"/>
+                            <input htmlEscape="false" id="sumbackmoneys" name="backmoneys" type="hidden"  readonly="true" class="form-control layui-input" value="${workReimbursement.backmoneys}"/>
+                        </td>
+                    </tr>
+                </table>
+                <script type="text/template" id="workAccountAuditListTpl">//<!--
+                                    <tr id="workAccountList0_audit0">
+                                        <td class="hide">
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+											<form:select id="workAccountList0_audit0_u8Subjects" path="workAccountList[0].workAccountAuditList[0].u8Subjects" class="form-control ">
+												<form:option value="" label=""/>
+												<form:options items="${fns:getMainDictList('u8_subjects')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+											</form:select>
+										</td>
+										<td class="isShow">
+											<form:select id="workAccountList0_audit0_checkSubjects" path="workAccountList[0].workAccountAuditList[0].checkSubjects" class="form-control ">
+												<form:option value="" label=""/>
+												<form:options items="${fns:getMainDictList('check_subjects')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+											</form:select>
+										</td>
+										<td>
+										<input id="workAccountList0_audit0_money" onchange="getMoney()" name="workAccountList[0].workAccountAuditList[0].checkMoney" type="text" value="${workAccount.workAccountAuditList[0].checkMoney}"    class="form-control number checkMoney"/>
+										</td>
+
+										<td class="text-center op-td" >
+										    <span class="op-btn op-btn-delete" onclick="delRow(this, '#workAccountList0')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+										</td>
+                                    </tr>//-->
+                </script>
+                <script type="text/javascript">
+                    var workAccountListRowIdx = 0, workAccountAuditListTpl = $("#workAccountAuditListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                </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="contentTable2" class="table table-bordered table-condensed no-bottom-margin details">
+                    <thead>
+                    <tr>
+                        <th width="300px">发票代码</th>
+                        <th width="200px">发票号</th>
+                        <th width="200px">金额</th>
+                        <th width="200px">税额</th>
+                        <th width="200px">价税合计</th>
+                    </tr>
+                    </thead>
+                    <tbody id="reimbursementVATTaxes">
+                    <c:if test="${not empty workReimbursement.reimbursementVATTaxes}">
+                        <c:forEach items="${workReimbursement.reimbursementVATTaxes}" var="reimbursementVATTaxe" varStatus="index">
+                            <tr>
+                                <td class="hide">
+                                </td>
+                                <td>
+                                        ${reimbursementVATTaxe.invoiceCode}
+                                </td>
+
+                                <td>
+                                        ${reimbursementVATTaxe.invoiceNumber}
+                                </td>
+                                <td>
+                                        ${reimbursementVATTaxe.money}
+                                </td>
+                                <td>
+                                        ${reimbursementVATTaxe.taxAmount}
+                                </td>
+                                <td>
+                                        ${reimbursementVATTaxe.sumMoney}
+                                </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 layui-col-xs12 form-table-container" >
+                <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="${workReimbursement.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">
+            <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" />
+                    <input type="file" name="upload_files" style="display: none;">
+                </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="${workReimbursement.act.procInsId}"/>
+                <act:histoicFlow procInsId="${workReimbursement.act.procInsId}"/>
+            </div>
+        </div>
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>
+

Різницю між файлами не показано, бо вона завелика
+ 1000 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormAdd.jsp


+ 492 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormDetail.jsp

@@ -0,0 +1,492 @@
+<%@ 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() {
+            if (${workReimbursement.ext == 0}){
+                $(".td1").removeClass("hide");
+                $(".project_reimbursement_div").show();
+                $(".not_project_reimbursement_div").hide();
+            }else {
+                $(".td1").addClass("hide");
+                $(".project_reimbursement_div").hide();
+                $(".not_project_reimbursement_div").show();
+            }
+            if (${workReimbursement.isPublic =='0'}){
+                $(".isPublic").addClass("hide");
+            }else {
+                $(".isPublic").removeClass("hide");
+            }
+            var state=${isShow};
+            if (state =='0'){
+                $(".isShow").hide();
+            }else {
+                $(".isShow").show();
+            }
+            if($("#backmoney").val()==null||$("#backmoney").val()==''){
+                $("#backmoney").val('0');
+            }
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                    number:{
+                        required:true
+                    },
+                },
+                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);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+        });
+
+    </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="workReimbursement" action="${ctx}/workreimbursement/workReimbursement/save" method="post" class="form-horizontal" >
+<form:hidden path="ext"/>
+<%--<sys:message content="${message}"/>--%>
+    <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="submitterName" htmlEscape="false"  id="submitterName"  class="form-control layui-input" value = "${workReimbursement.submitterName}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">报销编号:</label>
+            <div class="layui-input-block">
+                <div class="input-group">
+                    <input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${workReimbursement.number}"/>
+                    <span class="input-group-btn">
+                        <label class="form-status"><c:choose><c:when test="${not empty workReimbursement.status}">${fns:getDictLabel(workReimbursement.status, 'audit_state', '')}</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">所属部门:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value = "${workReimbursement.officeName}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">银行卡号:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false" readonly="true"  class="form-control layui-input" value = "${workReimbursement.bankCard}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">报销类型:</label>
+            <div class="layui-input-block">
+                <input readonly="true" htmlEscape="false" class="form-control layui-input"
+                       value="<c:choose><c:when test="${workReimbursement.ext == 0}">项目报销</c:when><c:otherwise>非项目报销</c:otherwise></c:choose>"/>
+            </div>
+        </div>
+
+        <div class="layui-item layui-col-sm6 td1">
+            <label class="layui-form-label">报销项目:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.project.projectName}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">报销类别:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.type}"/>
+            </div>
+        </div>
+        <%--<div class="layui-item layui-col-sm6 td1">
+            <label class="layui-form-label">项目负责人:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true"  class="form-control layui-input" value="${workReimbursement.projectMasterName}"/>
+            </div>
+        </div>--%>
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label double-line">是否对公报销:</label>
+            <div class="layui-input-block">
+                <input readonly="true" htmlEscape="false" class="form-control layui-input"
+                       value="<c:choose><c:when test="${workReimbursement.isPublic == '0'}">否</c:when><c:otherwise>是</c:otherwise></c:choose>"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6 isPublic">
+            <label class="layui-form-label">公司名称:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.comname}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6 isPublic">
+            <label class="layui-form-label">开户行:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.bank}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6 isPublic">
+            <label class="layui-form-label">银行账号:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.bankNo}"/>
+            </div>
+        </div>
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">报销人:</label>
+            <div class="layui-input-block">
+                <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workReimbursement.submitterName}"/>
+            </div>
+        </div>
+
+        <div class="layui-item layui-col-sm6">
+            <label class="layui-form-label">报销日期:</label>
+            <div class="layui-input-block">
+                <input readonly="readonly" class="form-control layui-input" value="<fmt:formatDate value="${workReimbursement.submitterDate}" pattern="yyyy-MM-dd"/>"/>
+            </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="contentTable3" class="table table-bordered table-condensed can-edit no-bottom-margin">
+                <thead>
+                <tr>
+                    <th width="190px">借款日期</th>
+                    <th width="190px">借款类型</th>
+                    <th width="190px">借款项目</th>
+                    <th width="190px">借款金额</th>
+                    <th width="180px">未还金额</th>
+                    <th width="100px">本次还款</th>
+                    <th width="120px">借款编号</th>
+                </tr>
+                </thead>
+                <tbody id="reimbursementBackList">
+                <c:if test="${not empty workReimbursement.reimbursementBackList}">
+                    <c:forEach items="${workReimbursement.reimbursementBackList}" var="reimbursementBack" varStatus="index">
+                        <tr id="reimbursementBackList${index.index}">
+                            <td class="hide">
+                                <input id="reimbursementBackList${index.index}_id" name="reimbursementBackList[${index.index}].id" type="hidden" value="${reimbursementBack.id}"/>
+                                <input id="reimbursementBackList${index.index}_workLoanId" name="reimbursementBackList[${index.index}].workLoan.id" type="hidden" value="${reimbursementBack.workLoan.id}"/>
+                                <input id="reimbursementBackList${index.index}_delFlag" name="reimbursementBackList[${index.index}].delFlag" type="hidden" value="0"/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_1"   type="text" maxlength="20"  readonly="true" class=" form-control layui-input"
+                                       value="<fmt:formatDate value="${reimbursementBack.workLoan.loanDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_2"  readonly="true" type="text" value="${reimbursementBack.workLoan.type}"   class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_3"  readonly="true" type="text" value="${reimbursementBack.workLoan.projectRecords.projectName}"   class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_4"  readonly="true" type="text" value="${reimbursementBack.workLoan.money}"   class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_5"  readonly="true" type="text" value="${reimbursementBack.workLoan.notRepay}"   class="form-control"/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_6" readonly="true"  name="reimbursementBackList[${index.index}].money" type="text" value="${reimbursementBack.money}"   class="form-control number "/>
+                            </td>
+                            <td>
+                                <input id="reimbursementBackList${index.index}_7"  readonly="true" type="text" value="${reimbursementBack.workLoan.num}"   class="form-control"/>
+                            </td>
+                        </tr>
+                    </c:forEach>
+                </c:if>
+                </tbody>
+            </table>
+            <table id="contentMoneys1" class="table table-bordered table-condensed can-edit summary">
+                <tr>
+                    <td  style="width:190px;vertical-align:middle;text-align: center;"><label><font color="red">*</font>合计</label></td>
+                    <td  width="190px" style="vertical-align:middle;text-align: center;">
+                        -
+                    </td >
+                    <td  width="190px" style="vertical-align:middle;text-align: center;">
+                        -
+                    </td>
+                    <td  width="190px" style="vertical-align:middle;text-align: center;">
+                        -
+                    </td>
+                    <td width="180px" style="vertical-align:middle;text-align: center;">
+                        -
+                    </td>
+                    <td width="100px" style="vertical-align:middle;text-align: center;">
+                        <input  id="backmoney" value="${workReimbursement.backmoney}" name="backmoney" htmlEscape="false" readonly="true"   maxlength="12"  class="form-control "/>
+                    </td>
+                    <td  width="120px" style="vertical-align:middle;text-align: center;">
+                        -
+                    </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="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
+                <thead>
+                <tr>
+                    <th width="200px">财务科目</th>
+                    <th>报销费用摘要</th>
+                    <th width="150px">发票类型</th>
+                    <th width="150px">报销费用(元)</th>
+                    <th width="100px">备注</th>
+                    <th width="150px" >U8科目</th>
+                    <th width="150px" class="isShow">考核科目</th>
+                    <th width="150px">考核金额(元)</th>
+                </tr>
+                </thead>
+                <tbody id="workAccountList">
+                <c:if test="${not empty workReimbursement.workAccountList}">
+                    <c:forEach items="${workReimbursement.workAccountList}" var="workAccount" varStatus="index">
+                        <c:if test="${not empty workAccount.workAccountAuditList}">
+                            <c:forEach items="${workAccount.workAccountAuditList}" var="workAccountAudit" varStatus="index">
+                                <c:if test="${index.index==0}">
+                                    <tr>
+                                        <td class="hide">
+                                        </td>
+                                        <td>
+                                            <div class="project_reimbursement_div">
+                                                    ${fns:getMainDictLabel(workAccount.financialSubjects, 'project_reimbursement', '')}
+                                            </div>
+                                            <div class="not_project_reimbursement_div" style="display:none;">
+                                                    ${fns:getMainDictLabel(workAccount.financialSubjectss, 'not_project_reimbursement', '')}
+                                            </div>
+                                        </td>
+                                        <td title="${workAccount.moneyAbstract}">
+                                                ${workAccount.moneyAbstract}
+                                        </td>
+                                        <td title="${workAccount.invoiceType}">
+                                                ${workAccount.invoiceType}
+                                        </td>
+                                        <td>
+                                            <fmt:formatNumber value="${workAccount.money}" pattern="#,#00.00"/>
+                                        </td>
+                                        <td title="${workAccount.remarks}">
+                                                ${workAccount.remarks}
+                                        </td>
+                                        <td>
+                                                ${fns:getMainDictLabel(workAccountAudit.u8Subjects, 'u8_subjects', '')}
+                                        </td>
+                                        <td class="isShow">
+                                                ${fns:getMainDictLabel(workAccountAudit.checkSubjects, 'check_subjects', '')}
+                                        </td>
+                                        <td>
+                                                ${workAccountAudit.checkMoney}
+                                        </td>
+
+                                    </tr>
+                                </c:if>
+                                <c:if test="${index.index!=0}">
+                                    <tr>
+                                        <td class="hide">
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                        </td>
+                                        <td>
+                                                ${fns:getMainDictLabel(workAccountAudit.u8Subjects, 'u8_subjects', '')}
+                                        </td>
+                                        <td class="isShow">
+                                                ${fns:getMainDictLabel(workAccountAudit.checkSubjects, 'check_subjects', '')}
+                                        </td>
+                                        <td>
+                                                ${workAccountAudit.checkMoney}
+                                        </td>
+
+                                    </tr>
+                                </c:if>
+
+                            </c:forEach>
+                        </c:if>
+                        <c:if test="${empty workAccount.workAccountAuditList}">
+                            <tr>
+                                <td class="hide">
+                                </td>
+                                <td>
+                                    <div class="project_reimbursement_div">
+                                            ${fns:getMainDictLabel(workAccount.financialSubjects, 'project_reimbursement', '')}
+                                    </div>
+                                    <div class="not_project_reimbursement_div" style="display:none;">
+                                            ${fns:getMainDictLabel(workAccount.financialSubjectss, 'not_project_reimbursement', '')}
+                                    </div>
+                                </td>
+                                <td title="${workAccount.moneyAbstract}">
+                                        ${workAccount.moneyAbstract}
+                                </td>
+                                <td title="${workAccount.invoiceType}">
+                                        ${workAccount.invoiceType}
+                                </td>
+                                <td>
+                                    <fmt:formatNumber value="${workAccount.money}" pattern="#,#00.00"/>
+                                </td>
+                                <td title="${workAccount.remarks}">
+                                        ${workAccount.remarks}
+                                </td>
+                                <td>
+                                </td>
+                                <td class="isShow">
+                                </td>
+                                <td>
+                                </td>
+                            </tr>
+                        </c:if>
+
+                    </c:forEach>
+                </c:if>
+                </tbody>
+            </table>
+            <table id="contentMoneys" class="table table-bordered table-condensed summary">
+                <tr>
+                    <td width="200px" style="vertical-align:middle;text-align: center;padding: 0px;"><label>总报销费用(元):</label></td>
+                    <td>
+                        <input htmlEscape="false" id="moneys"  readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${workReimbursement.money}" pattern="#,#00.00"/>"/>
+                        <input htmlEscape="false" name="money" type="hidden"  readonly="true" class="form-control layui-input" value="${workReimbursement.money}"/>
+                    </td>
+                    <td width="150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>考核金额总额(元):</label></td>
+                    <td >
+                        <input htmlEscape="false" id="checkMoneys"  readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${workReimbursement.checkMoneys}" pattern="#,#00.00"/>"/>
+                    </td>
+                    <td width="150px" style="vertical-align:middle;text-align: center;"><label><font color="red">*</font>实际报销费用(元):</label></td>
+                    <td >
+                        <input htmlEscape="false" id="backmoneys"  readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${workReimbursement.backmoneys}" pattern="#,#00.00"/>"/>
+                    </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="contentTable2" class="table table-bordered table-condensed no-bottom-margin details">
+                <thead>
+                <tr>
+                    <th width="300px">发票代码</th>
+                    <th width="200px">发票号</th>
+                    <th width="200px">金额</th>
+                    <th width="200px">税额</th>
+                    <th width="200px">价税合计</th>
+                </tr>
+                </thead>
+                <tbody id="reimbursementVATTaxes">
+                <c:if test="${not empty workReimbursement.reimbursementVATTaxes}">
+                    <c:forEach items="${workReimbursement.reimbursementVATTaxes}" var="reimbursementVATTaxe" varStatus="index">
+                        <tr>
+                            <td class="hide">
+                            </td>
+                            <td>
+                                    ${reimbursementVATTaxe.invoiceCode}
+                            </td>
+
+                            <td>
+                                    ${reimbursementVATTaxe.invoiceNumber}
+                            </td>
+                            <td>
+                                    ${reimbursementVATTaxe.money}
+                            </td>
+                            <td>
+                                    ${reimbursementVATTaxe.taxAmount}
+                            </td>
+                            <td>
+                                    ${reimbursementVATTaxe.sumMoney}
+                            </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 layui-col-xs12 form-table-container" >
+            <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="${workReimbursement.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 href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','95%','95%','1')">${workClientAttachment.attachmentName}</a></td>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','95%','95%')">${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>

+ 385 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementList.jsp

@@ -0,0 +1,385 @@
+<%@ 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="workReimbursement" action="${ctx}/workreimbursement/workReimbursement/list" 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 with-icon">
+                                <sys:gridselectcallproject url="${ctx}/workreimbursement/workReimbursement/selectproject" id="project" name="project.id"  value="${workReimbursement.project.id}"  title="选择报销项目" labelName="project.projectName"
+                                                           labelValue="${workReimbursement.project.projectName}"  cssClass="form-control widthClass layui-input" fieldLabels="工程" fieldKeys="projectName" searchLabel="工程名称" searchKey="projectName"></sys:gridselectcallproject>
+                            </div>
+                        </div>
+                        <%--<div class="layui-item query athird">
+                            <label class="layui-form-label">报销时间:</label>
+                            <div class="layui-input-block">
+                                <input id="startDate" name="startDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+                                       value="<fmt:formatDate value="${workReimbursement.startDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">——&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+                            <div class="layui-input-block">
+                                <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+                                       value="<fmt:formatDate value="${workReimbursement.endDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>--%>
+
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销时间:</label>
+                            <div class="layui-input-block">
+                                <input id="startDate" placeholder="开始时间" name="startDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${workReimbursement.startDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endDate" placeholder="结束时间" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${workReimbursement.endDate}" 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 with-icon">
+                                <sys:treeselect id="submitterId" name="submitterId" value="${workReimbursement.submitterId}" labelName="submitterName" labelValue="${workReimbursement.submitterName}"
+                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                            </div>
+                        </div>
+                        <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('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                </form:select>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销部门:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:treeselect id="officeId" name="officeId" value="${workReimbursement.officeId}" labelName="officeName" labelValue="${workReimbursement.officeName}"
+                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                            </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="workreimbursement:workReimbursement:add">
+                        <a href="javascript:void(0)" onclick="openDialogre('新增报销单', '${ctx}/workreimbursement/workReimbursement/form?tabId=0','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: [[
+                // {checkbox: true, fixed: true},
+                {field:'submitterId',align:'center',  width:40,title: '序号'}
+                ,{field:'number',align:'center', title: '报销编号', minWidth:150,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看报销单', '${ctx}/workreimbursement/workReimbursement/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                            "<span title=" + d.realnumber + ">" + d.number + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'submitterName',align:'center', title: '报销人', width:80,templet:function(d){
+                        return "<span title='"+ d.submitterName +"'>" + d.submitterName + "</span>";
+                    }}
+                ,{field:'officeId',align:'center', title: '报销公司/部门', minWidth:110,templet:function(d){
+                        return "<span title='"+ d.officeId +"'>" + d.officeId + "</span>";
+                    }}
+                ,{field:'projectId', align:'center',title: '报销项目', minWidth:150,templet:function(d){
+                        return "<span title='"+ d.projectId +"'>" + d.projectId + "</span>";
+                    }}
+                ,/*{field:'projectLeader', align:'center',title: '项目负责人', width:80,templet:function(d){
+                        return "<span title='"+ d.projectLeader +"'>" + d.projectLeader + "</span>";
+                    }}
+                ,*/{field:'submitterDate', align:'center',title: '报销日期',width:80}
+                ,{field:'money',align:'center', title: '报销金额', width:100,templet:function(d){
+                        return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                    }}
+                ,{ title: '状态', align:'center',width:70,templet:function(d){
+                        <%--var st = getAuditState(d.status);--%>
+                        <%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workreimbursement/workReimbursement/getProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
+                        <%--return xml;--%>
+                        var st = getAuditState(d.status);
+                        if(st.action)
+                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workreimbursement/workReimbursement/getProcessOne?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;
+                    }}
+                // ,{fixed: 'right',align:'center', toolbar: '#op',title:"操作"}
+                ,{align:'center',title:"操作",width:130,templet:function(d){
+                        ////对操作进行初始化
+                        var xml = "";
+                        if(d.cancancel != undefined && d.cancancel == "1")
+                            xml += "<a href=\"${ctx}/workreimbursement/workReimbursement/cancelInvalidate?id=" + d.id + "\" 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=\"openDialogre('修改报销单', '${ctx}/workreimbursement/workReimbursement/form?id="+ d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        if(d.canedit2 != undefined && d.canedit2 == "1")
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('修改报销单', '${ctx}/workreimbursement/workReimbursement/form?id="+ d.id + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        if(d.canedit3 != undefined && d.canedit3 == "1")
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请报销单', '${ctx}/workreimbursement/workReimbursement/form?id=" + d.id + "&tabId=4','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}/workreimbursement/workReimbursement/delete?id=" + d.id + "\" 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="workReimbursement" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workReimbursement.id}"
+                    ,"submitterId":"${index.index+1}"
+                    ,"realnumber":"${workReimbursement.number}"
+                    ,"number":"${workReimbursement.number}"
+                    ,"submitterName":"<c:out value="${fns:getUserById(workReimbursement.submitterId).name}" escapeXml="true"/>"
+                    ,"officeId":"${fns:getOfficeById(workReimbursement.officeId).name}"
+                    ,"projectId":
+                        <c:if test="${workReimbursement.ext == 1}">
+                            "<c:out value="${workReimbursement.projectName}" escapeXml="true"/>"
+                        </c:if>
+                        <c:if test="${workReimbursement.ext != 1}">
+                            "<c:out value="${workReimbursement.project.projectName}" escapeXml="true"/>"
+                        </c:if>
+                    ,"projectLeader":
+                        <c:if test="${not empty workReimbursement.project && not empty workReimbursement.project.leaderNameStr}">
+                            "<c:out value="${workReimbursement.project.leaderNameStr}" escapeXml="true"/>"
+                    </c:if>
+                    <c:if test="${empty workReimbursement.project || empty workReimbursement.project.leaderNameStr}">
+                    ""
+                    </c:if>
+                    ,"submitterDate":"<fmt:formatDate value="${workReimbursement.submitterDate}" pattern="yyyy-MM-dd"/>"
+                    ,"money":"<fmt:formatNumber value="${workReimbursement.money}" pattern="#,#0.00"/>"
+                    ,"status":"${workReimbursement.status}"
+                    <shiro:hasPermission name="workreimbursement:workReimbursement:del">
+                    ,"candelete":
+                        <c:if test="${fns:getUser().id == workReimbursement.createBy.id && (workReimbursement.status == '1' or workReimbursement.status == '3' or workReimbursement.status == '4')}">"1"</c:if>
+                    <c:if test="${fns:getUser().id != workReimbursement.createBy.id || (workReimbursement.status != '1' and workReimbursement.status != '3' and workReimbursement.status != '4')}">"0"</c:if>
+                    </shiro:hasPermission>
+                    ,"cancancel":
+                        <c:if test="${workReimbursement.status == '2' && fns:getUser().id == workReimbursement.createBy.id}">"1"</c:if>
+                    <c:if test="${workReimbursement.status != '2' || fns:getUser().id != workReimbursement.createBy.id}">"0"</c:if>
+                    <shiro:hasPermission name="workreimbursement:workReimbursement:edit">
+                    ,"canedit1":
+                        <c:if test="${fns:getUser().id == workReimbursement.createBy.id && workReimbursement.status == '1' }">"1"</c:if>
+                    <c:if test="${fns:getUser().id != workReimbursement.createBy.id || workReimbursement.status != '1' }">"0"</c:if>
+                    ,"canedit2":
+                        <c:if test="${fns:getUser().id == workReimbursement.createBy.id && workReimbursement.status == '4' && fns:getUser().id == workReimbursement.createBy.id}">"1"</c:if>
+                    <c:if test="${fns:getUser().id != workReimbursement.createBy.id || workReimbursement.status != '4' || fns:getUser().id != workReimbursement.createBy.id}">"0"</c:if>
+                    ,"canedit3":
+                        <c:if test="${workReimbursement.status == '3' && fns:getUser().id == workReimbursement.createBy.id}">"1"</c:if>
+                    <c:if test="${workReimbursement.status != '3' || fns:getUser().id != workReimbursement.createBy.id}">"0"</c:if>
+                    </shiro:hasPermission>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+    })
+    resizeListTable();
+    $("a").on("click",addLinkVisied);
+</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: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+        });
+        laydate.render({
+            elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+        });
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+    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,
+            skin: 'three-btns',
+            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
+                }
+                return false;
+            },
+            btn3: function(index){
+            }
+        });
+    }
+    function openDialogreplay(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
+                }
+
+            },
+            cancel: function(index){
+            }
+        });
+    }
+</script>
+</body>
+</html>

Різницю між файлами не показано, бо вона завелика
+ 1009 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementModifyApply.jsp


+ 20 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementTrack.jsp

@@ -0,0 +1,20 @@
+<%@ 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>
+	<%--<div class="wrapper wrapper-content">--%>
+		<%--<act:flowChart procInsId="${processInstanceId}"/>--%>
+        <%--<act:histoicFlow procInsId="${processInstanceId}"/>--%>
+	<%--</div>--%>
+
+</body>
+</html>
+

+ 300 - 0
src/main/webapp/webpage/modules/workreimbursementcount/workInvoiceCompany.jsp

@@ -0,0 +1,300 @@
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <%@ include file="/webpage/include/echarts.jsp"%>
+    <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="workInvoiceCompany" action="${ctx}/workreimbursementcount/workInvoiceCount/list" method="post" class="form-inline">
+                    <form:hidden path="check"></form:hidden>
+                    <%--以下三行照抄--%>
+                    <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 type="radio" class="i-checks" name="extleft" checked id="extleft" value="0">
+                                <label for="extleft">按分公司</label>
+                                <input type="radio" class="i-checks" name="extleft" id="extleft1" value="1">
+                                <label for="extleft1">按月份</label>
+                            </div>
+                        </div>
+                        <div class="layui-item query two-thirds">
+                            <label class="layui-form-label">展现样式:</label>
+                            <div class="layui-input-block">
+                                <input type="radio" class="i-checks"  name="extright" checked id="extright" value="0">
+                                <label for="extright">列表</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright1" value="1">
+                                <label for="extright1">柱图</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright2" value="2">
+                                <label for="extright2">饼图</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright3" value="3">
+                                <label for="extright3">折线图</label>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">分公司:</label>
+                            <div class="layui-input-block with-icon">
+                                <%--<sys:treeselectcompany id="companyId" name="companyId" value="${workReimbursementCompany.companyId}" labelName="officeName" labelValue="${workReimbursementCompany.officeName}"
+                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>--%>
+                                    <sys:treeselect id="office" name="companyId" value="${workInvoiceCompany.companyId}" labelName="name" labelValue="${workInvoiceCompany.officeName}"
+                                                    title="分公司" url="/sys/office/treeDataCompany?type=2" cssClass="form-control input-sm" allowClear="true" notAllowSelectParent="false"/>
+
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">开票时间:</label>
+                            <div class="layui-input-block">
+                                <input id="date" name="date" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon" value="${workInvoiceCompany.date}"/>
+                                </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="resetSearchs()">重置</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 style="clear:both;"></div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+
+        <div class="full-width fl" id="frametable">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                 <shiro:hasPermission name="workreimbursement:workInvoiceCount:export">
+                    <table:exportExcel url="${ctx}/workreimbursementcount/workInvoiceCount/exportCompany"></table:exportExcel><!-- 导出按钮 -->
+                  </shiro:hasPermission>
+                    <%--<a class="nav-btn nav-btn-refresh" <c:if test="${empty companyId}">style="display: none"</c:if>  data-toggle="tooltip" data-placement="left" href="${ctx}/workreimbursementcount/workInvoiceCount/list" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>--%>
+                    <c:choose>
+                    <c:when test="${not empty backState}">
+                        <a class="nav-btn nav-btn-refresh" onClick="javascript :history.back(-1);"  data-toggle="tooltip" data-placement="left" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>
+                    </c:when>
+                </c:choose>
+                    <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 id="echarts">
+            <%--柱图--%>
+            <div id="bar_normal"  class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:bar id="bar_normal" title="发票统计表" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="分公司" yAxisName="金额(元)"/></div>
+            <%--饼图--%>
+            <div id="pie"   class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:pie id="pie" title="发票统计表(收款金额)" subtitle="" orientData="${orientData}"/></div>
+             <div id="pie1"   class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                    <echarts:pie id="pie1" title="发票统计表(开票金额)" subtitle="" orientData="${orientData1}"/></div>
+            <%--折线图--%>
+            <div id="line_normal"  class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:line id="line_normal" title="发票统计表" subtitle="" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="公司名称" yAxisName="金额(元)" /></div>
+        </div>
+
+    </div>
+    </div>
+    <div id="changewidth"></div>
+
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${list.size()},
+            elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {field:'officeName',align:'center', minWidth:150,title: '${showName}', templet:function(d){
+                    if(d.officeName!='合计'&&'${showName}'!="月份"){
+                        var xml = "<a class=\"attention-info\" onclick=\"isSign('"+d.id+"','"+d.sign+"')\" >" +
+                            "<span title=" + d.officeName + ">" + d.officeName + "</span></a>";
+                        return xml;
+                        /* var xml = "<a class=\"attention-info\" href=\"${ctx}/workreimbursementcount/workInvoiceCount/signlist?companyId=" + d.id + "&sign="+d.sign+"\" >" +*/
+                    }else{
+                        return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                    }
+
+                    }}
+                ,{field:'invoiceCount',align:'center', title: '发票数量', templet:function(d){
+                        return "<span title='"+ d.invoiceCount +"'>" + d.invoiceCount + "</span>";
+                    }}
+                ,{field:'invoiceMoneys',align:'center', title: '开票金额', templet:function(d){
+                        return "<span title='"+ d.invoiceMoneys +"'>" + d.invoiceMoneys + "</span>";
+                    }}
+                ,{field:'incomeMoneys',align:'center', title: '收款金额', templet:function(d){
+                        return "<span title='"+ d.incomeMoneys +"'>" + d.incomeMoneys + "</span>";
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty list}">
+                <c:forEach items="${list}" var="workInvoiceCompany" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workInvoiceCompany.id}",
+                    "sign":"${workInvoiceCompany.sign}",
+                    "officeName":"${workInvoiceCompany.officeName}"
+                    ,"invoiceCount":"${workInvoiceCompany.invoiceCount}"
+                    ,"invoiceMoneys":"<fmt:formatNumber value="${workInvoiceCompany.invoiceMoneys}" pattern="#,#00.00"/>"
+                    ,"incomeMoneys":"<fmt:formatNumber value="${workInvoiceCompany.incomeMoneys}" pattern="#,#00.00"/>"
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+    resizeListTable();
+</script>
+
+
+<script>
+    function isSign(companyId,sign){
+        $.ajax({
+            type:'post',
+            url:'${ctx}/workreimbursementcount/workInvoiceCount/signlist',
+            data:{
+                "companyId":companyId,"sign":sign
+            },
+            success:function(data){
+                if(data==0){
+                    window.location.href='${ctx}/workreimbursementcount/workInvoiceCount/officelist?companyId='+companyId;
+                }else{
+                    window.location.href='${ctx}/workreimbursementcount/workInvoiceCount/list?companyId='+companyId;
+                }
+            }
+        })
+    }
+
+    function resetSearchs(){//重置,页码清零
+        $("#extleft").iCheck('check');
+        $("#pageNo").val(0);
+        $("#searchForm div.query input").val("");
+        $("#searchForm div.query select").val("");
+        $("#searchForm").submit();
+        return false;
+    }
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+
+<script type="text/javascript">
+    function changeStyle(obj){
+        if(obj==0){
+            $("#frametable").show();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#pie1").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==1){
+            $("#frametable").hide();//列表
+            $("#bar_normal").show();//柱图
+            $("#pie").hide();//饼图
+            $("#pie1").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==2){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").show();//饼图
+            $("#pie1").show();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==3){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#pie1").hide();//饼图
+            $("#line_normal").show();//折线
+        }
+    }
+    function changeStyleLeft(obj){
+        $("#check").val(obj);
+    }
+</script>
+
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#cus_name").show();
+        $("#cus_name").siblings().hide();
+        $("#frametable").show();//列表
+        if(${showName eq '月份'}){
+            $("#extleft1").iCheck('check');
+        }else {
+            $("#extleft").iCheck('check')
+        }
+        $("input[name='extright']").on('ifChecked', function(event){
+            var obj=$("input:radio[name='extright']:checked").val();
+            changeStyle(obj);
+
+        });
+        $("input[name='extleft']").on('ifChecked', function(event){
+            var radioVal = $(this).val();
+            changeStyleLeft(radioVal);
+        });
+        //搜索框收放
+        $('#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: '#date', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'year'
+        });
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+
+
+</script>
+</body>
+</html>

+ 210 - 0
src/main/webapp/webpage/modules/workreimbursementcount/workInvoiceInfo.jsp

@@ -0,0 +1,210 @@
+<%@ 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="workInvoiceInfo" action="${ctx}/workreimbursementcount/workInvoiceCount/infolist" method="post" class="form-inline">
+                    <form:hidden path="officeId"/>
+                    <%--以下三行照抄--%>
+                    <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 layui-col-sm6">
+                            <label class="layui-form-label">展示方式:</label>
+                            <div class="layui-input-block">
+                                <input type="radio" class="i-checks" name="" checked id="ext" value="0">
+                                <label for="ext">按部门</label>
+                                <input type="radio" class="i-checks" name="" id="ext1" value="1">
+                                <label for="ext1">按月份</label>
+                            </div>
+                        </div>--%>
+
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">开票时间:</label>
+                            <div class="layui-input-block">
+                                <input id="date" name="date" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon" value="${workInvoiceInfo.date}"/>
+                                </input>
+                            </div>
+                        </div>
+                            <div class="layui-item query athird">
+                                <label class="layui-form-label"></label>
+                                <div class="layui-input-block with-icon">
+                                </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 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="workreimbursement:workInvoiceCount:export">
+                        <table:exportExcel url="${ctx}/workreimbursementcount/workInvoiceCount/exportInfo"></table:exportExcel>
+                    </shiro:hasPermission><!-- 导出按钮 -->
+                   <%-- <a class="nav-btn nav-btn-refresh" <c:if test="${empty companyId}">style="display: none"</c:if> data-toggle="tooltip" data-placement="left" href="${ctx}/workreimbursementcount/workInvoiceCount/officelist?companyId=${companyId}" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>--%>
+                    <c:choose>
+                        <c:when test="${not empty backState}">
+                            <a class="nav-btn nav-btn-refresh" onClick="javascript :history.back(-1);"  data-toggle="tooltip" data-placement="left" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>
+                        </c:when>
+                    </c:choose>
+                    <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:'invoiceCode',align:'center', minWidth:150, title: '发票代码', templet:function(d){
+                        return "<span title='"+ d.invoiceCode +"'>" + d.invoiceCode + "</span>";
+                    }},
+                {field:'number',align:'center', title: '发票编号',templet:function(d){
+                        return "<span title='"+ d.number +"'>" + d.number + "</span>";
+                    }}
+                ,
+                {field:'totalMoney',align:'center', title: '价税合计',templet:function(d){
+                        return "<span title='"+ d.totalMoney +"'>" + d.totalMoney + "</span>";
+                    }}
+                ,
+                {field:'incomeMoney',align:'center', title: '累计登记金额',templet:function(d){
+                        return "<span title='"+ d.incomeMoney +"'>" + d.incomeMoney + "</span>";
+                    }}
+                ,
+                {field:'date',align:'center', title: '开票日期',templet:function(d){
+                        return "<span title='"+ d.date +"'>" + d.date + "</span>";
+                    }}
+                ,
+                {field:'clientName',align:'center', title: '实际开票单位',templet:function(d){
+                        return "<span title='"+ d.clientName +"'>" + d.clientName + "</span>";
+                    }}
+                ,{field:'state',align:'center', title: '发票状态',templet:function(d){
+                        return "<span title='"+ d.state +"'>" + d.state + "</span>";
+                    }}
+                ,{field:'backSign', align:'center',title: '被退标记', templet:function(d){
+                        return "<span title='"+ d.backSign +"'>" + d.backSign + "</span>";
+                    }}
+                ,{field:'contractNum',align:'center', title: '合同编号', templet:function(d){
+                        return "<span title='"+ d.contractNum +"'>" + d.contractNum + "</span>";
+                    }}
+                ,{field:'contractName',align:'center', title: '合同名称', templet:function(d){
+                        return "<span title='"+ d.contractName +"'>" + d.contractName + "</span>";
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workInvoiceInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workInvoiceInfo.id}"
+                    ,"invoiceCode":"${workInvoiceInfo.invoiceCode}"
+                    ,"number":"${workInvoiceInfo.number}"
+                    ,"totalMoney":"<fmt:formatNumber value="${workInvoiceInfo.totalMoney}" pattern="#,#00.00"/>"
+                    ,"incomeMoney":"<fmt:formatNumber value="${workInvoiceInfo.incomeMoney}" pattern="#,#00.00"/>"
+                    ,"date":"${workInvoiceInfo.date}"
+                    ,"clientName":"${workInvoiceInfo.clientName}"
+                    ,"state":"${workInvoiceInfo.state}"
+                    ,"backSign":"${workInvoiceInfo.backSign}"
+                    ,"contractNum":"${workInvoiceInfo.contractNum}"
+                    ,"contractName":"${workInvoiceInfo.contractName}"
+                }
+                </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: '#date', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'year'
+        });
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+
+</script>
+</body>
+</html>

+ 297 - 0
src/main/webapp/webpage/modules/workreimbursementcount/workInvoiceOffice.jsp

@@ -0,0 +1,297 @@
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <%@ include file="/webpage/include/echarts.jsp"%>
+    <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="workInvoiceOffice" action="${ctx}/workreimbursementcount/workInvoiceCount/officelist" method="post" class="form-inline">
+                    <form:hidden path="check"></form:hidden>
+                    <form:hidden path="companyId"></form:hidden>
+                    <%--以下三行照抄--%>
+                    <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 type="radio" class="i-checks" name="extleft" checked id="extleft" value="0">
+                                <label for="extleft">按部门</label>
+                                <input type="radio" class="i-checks" name="extleft" id="extleft1" value="1">
+                                <label for="extleft1">按月份</label>
+                            </div>
+                        </div>
+                        <div class="layui-item query two-thirds">
+                            <label class="layui-form-label">展现样式:</label>
+                            <div class="layui-input-block">
+                                <input type="radio" class="i-checks"  name="extright" checked id="extright" value="0">
+                                <label for="extright">列表</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright1" value="1">
+                                <label for="extright1">柱图</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright2" value="2">
+                                <label for="extright2">饼图</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright3" value="3">
+                                <label for="extright3">折线图</label>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">部门:</label>
+                            <div class="layui-input-block with-icon">
+                                    <%--<sys:treeselectcompany id="companyId" name="companyId" value="${workReimbursementCompany.companyId}" labelName="officeName" labelValue="${workReimbursementCompany.officeName}"
+                                                    title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>--%>
+                                <sys:treeselect id="office" name="officeId" value="${workInvoiceOffice.officeId}" labelName="name" labelValue="${workInvoiceOffice.officeName}"
+                                                title="部门" url="/sys/office/treeData?type=2" cssClass="form-control input-sm" allowClear="true" notAllowSelectParent="true"/>
+
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">开票时间:</label>
+                            <div class="layui-input-block">
+                                <input id="date" name="date" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon" value="${workInvoiceOffice.date}"/>
+                                </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="resetSearchs()">重置</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 style="clear:both;"></div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+
+        <div class="full-width fl" id="frametable">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <shiro:hasPermission name="workreimbursement:workInvoiceCount:export">
+                    <table:exportExcel url="${ctx}/workreimbursementcount/workInvoiceCount/exportOffice"></table:exportExcel><!-- 导出按钮 -->
+                    </shiro:hasPermission>
+                    <%--<a class="nav-btn nav-btn-refresh" <c:if test="${empty companyId}">style="display: none"</c:if>  data-toggle="tooltip" data-placement="left" href="${ctx}/workreimbursementcount/workInvoiceCount/list?companyId=${companyId}" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>--%>
+                    <c:choose>
+                        <c:when test="${not empty backState}">
+                            <a class="nav-btn nav-btn-refresh" onClick="javascript :history.back(-1);"  data-toggle="tooltip" data-placement="left" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>
+                        </c:when>
+                    </c:choose>
+                    <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 id="echarts">
+            <%--柱图--%>
+            <div id="bar_normal"  class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:bar id="bar_normal" title="发票统计表" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="分公司" yAxisName="金额(元)"/></div>
+            <%--饼图--%>
+            <div id="pie"   class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:pie id="pie" title="发票统计表(收款金额)" subtitle="" orientData="${orientData}"/></div>
+             <div id="pie1"   class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                    <echarts:pie id="pie1" title="发票统计表(开票金额)" subtitle="" orientData="${orientData1}"/></div>
+            <%--折线图--%>
+            <div id="line_normal"  class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:line id="line_normal" title="发票统计表" subtitle="" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="公司名称" yAxisName="金额(元)" /></div>
+        </div>
+
+    </div>
+</div>
+<div id="changewidth"></div>
+
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${list.size()},
+            elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {field:'officeName',align:'center', minWidth:150,title: '${showName}', templet:function(d){
+                        if(d.officeName!='合计'&&'${showName}'!="月份"){
+                           /* var xml = "<a class=\"attention-info\" href=\"${ctx}/workreimbursementcount/workInvoiceCount/infolist?officeId=" + d.id + "\" >" +*/
+                            var xml = "<a class=\"attention-info\" onclick=\"isSign('"+d.id+"','"+d.sign+"')\" >" +
+                                "<span title=" + d.officeName + ">" + d.officeName + "</span></a>";
+                            return xml;
+                        }else{
+                            return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                        }
+                    }}
+                ,{field:'invoiceCount',align:'center', title: '发票数量', templet:function(d){
+                        return "<span title='"+ d.invoiceCount +"'>" + d.invoiceCount + "</span>";
+                    }}
+                ,{field:'invoiceMoneys',align:'center', title: '开票金额', templet:function(d){
+                        return "<span title='"+ d.invoiceMoneys +"'>" + d.invoiceMoneys + "</span>";
+                    }}
+                ,{field:'incomeMoneys',align:'center', title: '收款金额', templet:function(d){
+                        return "<span title='"+ d.incomeMoneys +"'>" + d.incomeMoneys + "</span>";
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty list}">
+                <c:forEach items="${list}" var="workInvoiceOffice" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workInvoiceOffice.id}",
+                    "officeName":"${workInvoiceOffice.officeName}"
+                    ,"invoiceCount":"${workInvoiceOffice.invoiceCount}"
+                    ,"invoiceMoneys":"<fmt:formatNumber value="${workInvoiceOffice.invoiceMoneys}" pattern="#,#00.00"/>"
+                    ,"incomeMoneys":"<fmt:formatNumber value="${workInvoiceOffice.incomeMoneys}" pattern="#,#00.00"/>"
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+    resizeListTable();
+</script>
+
+
+<script>
+    function isSign(officeId){
+        $.ajax({
+            type:'post',
+            url:'${ctx}/workreimbursementcount/workInvoiceCount/officeSignlist',
+            data:{
+                "officeId":officeId
+            },
+            success:function(data){
+                if(data==0){
+                    window.location.href='${ctx}/workreimbursementcount/workInvoiceCount/infolist?officeId='+officeId;
+                }else{
+                    window.location.href='${ctx}/workreimbursementcount/workInvoiceCount/officelist?companyId='+officeId;
+                }
+            }
+        })
+    }
+    function resetSearchs(){//重置,页码清零
+        $("#extleft").iCheck('check');
+        $("#pageNo").val(0);
+        $("#searchForm div.query input").val("");
+        $("#searchForm div.query select").val("");
+        $("#searchForm").submit();
+        return false;
+    }
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+
+<script type="text/javascript">
+    function changeStyle(obj){
+        if(obj==0){
+            $("#frametable").show();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#pie1").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==1){
+            $("#frametable").hide();//列表
+            $("#bar_normal").show();//柱图
+            $("#pie").hide();//饼图
+            $("#pie1").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==2){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").show();//饼图
+            $("#pie1").show();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==3){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#pie1").hide();//饼图
+            $("#line_normal").show();//折线
+        }
+    }
+    function changeStyleLeft(obj){
+        $("#check").val(obj);
+    }
+</script>
+
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#cus_name").show();
+        $("#cus_name").siblings().hide();
+        $("#frametable").show();//列表
+        if(${showName eq '月份'}){
+            $("#extleft1").iCheck('check');
+        }else {
+            $("#extleft").iCheck('check')
+        }
+        $("input[name='extright']").on('ifChecked', function(event){
+            var obj=$("input:radio[name='extright']:checked").val();
+            changeStyle(obj);
+
+        });
+        $("input[name='extleft']").on('ifChecked', function(event){
+            var radioVal = $(this).val();
+            changeStyleLeft(radioVal);
+        });
+        //搜索框收放
+        $('#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: '#date', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'year'
+        });
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+
+</script>
+</body>
+</html>

+ 290 - 0
src/main/webapp/webpage/modules/workreimbursementcount/workReimbursementCompany.jsp

@@ -0,0 +1,290 @@
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <%@ include file="/webpage/include/echarts.jsp"%>
+    <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="workReimbursementCompany" action="${ctx}/workreimbursementcount/workReimbursementCount/list" method="post" class="form-inline">
+                    <form:hidden path="check"></form:hidden>
+                    <%--以下三行照抄--%>
+                    <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 type="radio" class="i-checks" name="extleft" checked id="extleft" value="0">
+                                <label for="extleft">按分公司</label>
+                                <input type="radio" class="i-checks" name="extleft" id="extleft1" value="1">
+                                <label for="extleft1">按月份</label>
+                            </div>
+                        </div>
+                        <div class="layui-item query two-thirds">
+                            <label class="layui-form-label">展现样式:</label>
+                            <div class="layui-input-block">
+                                <input type="radio" class="i-checks"  name="extright" checked id="extright" value="0">
+                                <label for="extright">列表</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright1" value="1">
+                                <label for="extright1">柱图</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright2" value="2">
+                                <label for="extright2">饼图</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright3" value="3">
+                                <label for="extright3">折线图</label>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">分公司:</label>
+                            <div class="layui-input-block with-icon">
+                               <%-- <sys:treeselect id="officeId" name="companyId" value="${workReimbursementCompany.companyId}" labelName="name" labelValue="${workReimbursementCompany.officeName}"
+                                                title="分公司" url="/sys/office/treeDataCompany?type=2" cssClass="form-control input-sm" allowClear="true" notAllowSelectParent="false"/>--%>
+                                <sys:treeselect id="office" name="companyId" value="${workReimbursementCompany.companyId}" labelName="name" labelValue="${workReimbursementCompany.officeName}"
+                                                title="分公司" url="/sys/office/treeDataCompany?type=2" cssClass="form-control input-sm" allowClear="true" notAllowSelectParent="false"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销时间:</label>
+                            <div class="layui-input-block">
+                                <input id="date" name="date" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon" value="${workReimbursementCompany.date}"/>
+                                </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="resetSearchs()">重置</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 double-line">是否项目报销</label>
+                            <div class="layui-input-block">
+                                <form:select path="ext" class="form-control simple-select">
+                                    <form:option value="" label=""/>
+                                    <form:option value="0" label="项目"/>
+                                    <form:option value="1" label="非项目"/>
+                                </form:select>
+                            </div>
+                        </div>
+                        <div style="clear:both;"></div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+
+        <div class="full-width fl" id="frametable">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                      <shiro:hasPermission name="workreimbursementcount:workReimbursementCount:export">
+                        <table:exportExcel url="${ctx}/workreimbursementcount/workReimbursementCount/exportCompany"></table:exportExcel><!-- 导出按钮 -->
+                      </shiro:hasPermission>
+                    <c:choose>
+                        <c:when test="${not empty backState}">
+                            <a class="nav-btn nav-btn-refresh" onClick="javascript :history.back(-1);"  data-toggle="tooltip" data-placement="left" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>
+                        </c:when>
+                    </c:choose>
+                <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 id="echarts">
+            <%--柱图--%>
+            <div id="bar_normal"  class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:bar id="bar_normal" title="报销统计表" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="分公司" yAxisName="报销金额(元)"/></div>
+                <%--饼图--%>
+             <div id="pie"   class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:pie id="pie" title="报销统计表" subtitle="" orientData="${orientData}"/></div>
+                <%--折线图--%>
+             <div id="line_normal"  class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:line id="line_normal" title="报销统计表" subtitle="" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="公司名称" yAxisName="报销金额(元)" /></div>
+        </div>
+
+    </div>
+    </div>
+    <div id="changewidth"></div>
+
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${list.size()},
+            elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {field:'officeName',align:'center', minWidth:150,title: '${showName}', templet:function(d){
+                        if(d.officeName!='合计'&&'${showName}'!="月份"){
+                            var xml = "<a class=\"attention-info\" onclick=\"isSign('"+d.id+"','"+d.sign+"')\" >" +
+                                "<span title=" + d.officeName + ">" + d.officeName + "</span></a>";
+                            return xml;
+                           /* var xml = "<a class=\"attention-info\" href=\"${ctx}/workreimbursementcount/workReimbursementCount/officelist?companyId=" + d.id + "\" >" +
+                                "<span title=" + d.officeName + ">" + d.officeName + "</span></a>";*/
+                        }else{
+                            return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                        }
+                    }}
+                ,{field:'money',align:'center', minWidth:150, title: '报销金额', templet:function(d){
+                        return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty list}">
+                <c:forEach items="${list}" var="workReimbursementCompany" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workReimbursementCompany.id}",
+                    "sign":"${workReimbursementCompany.sign}",
+                    "officeName":"${workReimbursementCompany.officeName}"
+                    ,"money":"<fmt:formatNumber value="${workReimbursementCompany.money}" pattern="#,#00.00"/>"
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+    resizeListTable();
+</script>
+
+
+<script>
+    function isSign(companyId,sign){
+        $.ajax({
+            type:'post',
+            url:'${ctx}/workreimbursementcount/workInvoiceCount/signlist',
+            data:{
+                "companyId":companyId,"sign":sign
+            },
+            success:function(data){
+                if(data==0){
+                    window.location.href='${ctx}/workreimbursementcount/workReimbursementCount/officelist?companyId='+companyId;
+                }else{
+                    window.location.href='${ctx}/workreimbursementcount/workReimbursementCount/list?companyId='+companyId;
+                }
+            }
+        })
+    }
+    function resetSearchs(){//重置,页码清零
+        $("#extleft").iCheck('check');
+        $("#pageNo").val(0);
+        $("#searchForm div.query input").val("");
+        $("#searchForm div.query select").val("");
+        $("#searchForm").submit();
+        return false;
+    }
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+
+<script type="text/javascript">
+    function changeStyle(obj){
+        if(obj==0){
+            $("#frametable").show();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==1){
+            $("#frametable").hide();//列表
+            $("#bar_normal").show();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==2){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").show();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==3){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").show();//折线
+        }
+    }
+    function changeStyleLeft(obj){
+        $("#check").val(obj);
+    }
+</script>
+
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#cus_name").show();
+        $("#cus_name").siblings().hide();
+        if(${showName eq '月份'}){
+            $("#extleft1").iCheck('check');
+        }else {
+            $("#extleft").iCheck('check')
+        }
+        $("input[name='extright']").on('ifChecked', function(event){
+            var obj=$("input:radio[name='extright']:checked").val();
+            changeStyle(obj);
+
+        });
+        $("input[name='extleft']").on('ifChecked', function(event){
+            var radioVal = $(this).val();
+            changeStyleLeft(radioVal);
+        });
+        //搜索框收放
+        $('#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: '#date', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'year'
+        });
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+
+</script>
+</body>
+</html>

+ 203 - 0
src/main/webapp/webpage/modules/workreimbursementcount/workReimbursementInfo.jsp

@@ -0,0 +1,203 @@
+<%@ 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="workReimbursementInfo" action="${ctx}/workreimbursementcount/workReimbursementCount/infolist" method="post" class="form-inline">
+                    <form:hidden path="officeId"/>
+                    <%--以下三行照抄--%>
+                    <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>
+                    <div class="commonQuery">
+                        <%--<div class="layui-item layui-col-sm6">
+                            <label class="layui-form-label">展示方式:</label>
+                            <div class="layui-input-block">
+                                <input type="radio" class="i-checks" name="" checked id="ext" value="0">
+                                <label for="ext">按部门</label>
+                                <input type="radio" class="i-checks" name="" id="ext1" value="1">
+                                <label for="ext1">按月份</label>
+                            </div>
+                        </div>--%>
+                        <%--<div class="layui-item query athird">
+                            <label class="layui-form-label">部门:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:treeselect id="officeId" name="officeId" value="${workReimbursementInfo.officeId}"  labelName="officeName" labelValue="${workReimbursementInfo.officeName}"
+                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                            </div>
+                        </div>--%>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销时间:</label>
+                            <div class="layui-input-block">
+                                <input id="date" name="date" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon" value="${workReimbursementInfo.submitterDate}" />
+                                </input>
+                            </div>
+                        </div>
+                            <div class="layui-item query athird lw9">
+                                <label class="layui-form-label double-line">是否项目报销:</label>
+                                <div class="layui-input-block">
+                                    <form:select path="ext" class="form-control simple-select">
+                                        <form:option value="" label=""/>
+                                        <form:option value="0" label="项目"/>
+                                        <form:option value="1" label="非项目"/>
+                                    </form:select>
+                                </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 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="workreimbursementcount:workReimbursementCount:export">
+                        <table:exportExcel url="${ctx}/workreimbursementcount/workReimbursementCount/exportInfo"></table:exportExcel><!-- 导出按钮 -->
+                    </shiro:hasPermission>
+                    <c:choose>
+                        <c:when test="${not empty backState}">
+                            <a class="nav-btn nav-btn-refresh" onClick="javascript :history.back(-1);"  data-toggle="tooltip" data-placement="left" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>
+                        </c:when>
+                    </c:choose>
+                    <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:'number',align:'center', title: '报销编号', templet:function(d){
+                    if(d.number!='合计'){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看报销单', '${ctx}/workreimbursement/workReimbursement/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                            "<span title=" + d.number + ">" + d.number + "</span></a>";
+                        return xml;
+                    }else{
+                        return "<span title='"+ d.number +"'>" + d.number + "</span>";
+                    }
+
+                    }},
+                {field:'projectName',align:'center', minWidth:150, title: '报销项目',templet:function(d){
+                        return "<span title='"+ d.projectName +"'>" + d.projectName + "</span>";
+                    }}
+                ,{field:'submitterName',align:'center', title: '报销人',templet:function(d){
+                        return "<span title='"+ d.submitterName +"'>" + d.submitterName + "</span>";
+                    }}
+                ,{field:'submitterDate', align:'center',title: '报销日期'}
+                ,{field:'money',align:'center', title: '报销金额', templet:function(d){
+                        return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workReimbursementInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workReimbursementInfo.id}"
+                    ,"number":"${workReimbursementInfo.number}"
+                    ,"projectName":"${workReimbursementInfo.projectName}"
+                    ,"submitterName":"${workReimbursementInfo.submitterName}"
+                    ,"submitterDate":"<fmt:formatDate value="${workReimbursementInfo.submitterDate}" pattern="yyyy-MM-dd"/>"
+                    ,"money":"<fmt:formatNumber value="${workReimbursementInfo.money}" pattern="#,#00.00"/>"
+                }
+                </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: '#date', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'year'
+        });
+
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+
+</script>
+</body>
+</html>

+ 306 - 0
src/main/webapp/webpage/modules/workreimbursementcount/workReimbursementOffice.jsp

@@ -0,0 +1,306 @@
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <%@ include file="/webpage/include/echarts.jsp"%>
+    <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="workReimbursementOffice" action="${ctx}/workreimbursementcount/workReimbursementCount/officelist" method="post" class="form-inline">
+                    <form:hidden path="check"></form:hidden>
+                    <form:hidden path="companyId"></form:hidden>
+
+                    <%--以下三行照抄--%>
+                   <%-- <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 type="radio" class="i-checks" name="extleft" checked id="extleft" value="0">
+                                <label for="extleft">按部门</label>
+                                <input type="radio" class="i-checks" name="extleft" id="extleft1" value="1">
+                                <label for="extleft1">按月份</label>
+                            </div>
+                        </div>
+                        <div class="layui-item query two-thirds">
+                            <label class="layui-form-label">展现样式:</label>
+                            <div class="layui-input-block">
+                                <input type="radio" class="i-checks"  name="extright" checked id="extright" value="0">
+                                <label for="extright">列表</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright1" value="1">
+                                <label for="extright1">柱图</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright2" value="2">
+                                <label for="extright2">饼图</label>
+                                <input type="radio" class="i-checks"  name="extright" id="extright3" value="3">
+                                <label for="extright3">折线图</label>
+                            </div>
+                        </div>
+                     </div>
+                    <div class="commonQuery">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">部门:</label>
+                            <div class="layui-input-block with-icon">
+                                <%--<sys:treeselect id="office" name="companyId" value="${workReimbursementOffice.companyId}" labelName="officeName" labelValue="${workReimbursementOffice.officeName}"
+                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>--%>
+
+                                <sys:treeselect id="office" name="officeId" value="${workReimbursementOffice.officeId}" labelName="name" labelValue="${workReimbursementOffice.officeName}"
+                                                title="部门" url="/sys/office/treeData?type=2" cssClass="form-control input-sm" allowClear="true" notAllowSelectParent="true"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销时间:</label>
+                            <div class="layui-input-block">
+                                <input id="date" name="date" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon" value="${workReimbursementOffice.date}"/>
+                                </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="resetSearchs()">重置</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 double-line">是否项目报销:</label>
+                            <div class="layui-input-block">
+                                <form:select path="ext" class="form-control simple-select">
+                                    <form:option value="" label=""/>
+                                    <form:option value="0" label="项目"/>
+                                    <form:option value="1" label="非项目"/>
+                                </form:select>
+                            </div>
+                        </div>
+                        <div style="clear:both;"></div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+
+        <div class="full-width fl" id="frametable">
+            <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="workreimbursementcount:workReimbursementCount:export">
+                            <table:exportExcel url="${ctx}/workreimbursementcount/workReimbursementCount/exportOffice"></table:exportExcel><!-- 导出按钮 -->
+                        </shiro:hasPermission>
+                        <c:choose>
+                            <c:when test="${not empty backState}">
+                                <a class="nav-btn nav-btn-refresh" onClick="javascript :history.back(-1);"  data-toggle="tooltip" data-placement="left" title="返回"><i class="glyphicon glyphicon-repeat"></i>&nbsp;返回</a>
+                            </c:when>
+                        </c:choose>
+                    <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 id="echarts">
+            <%--柱图--%>
+            <div id="bar_normal"  class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:bar id="bar_normal" title="报销统计表" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="分公司" yAxisName="报销金额(元)"/></div>
+            <%--饼图--%>
+            <div id="pie"   class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:pie id="pie" title="报销统计表" subtitle="" orientData="${orientData}"/></div>
+            <%--折线图--%>
+            <div id="line_normal"  class="main000" style="position: relative; overflow: hidden; width: 1290px; height: 360px; display: none">
+                <echarts:line id="line_normal" title="报销统计表" subtitle="" xAxisData="${xAxisData}" yAxisData="${yAxisData}" xAxisName="公司名称" yAxisName="报销金额(元)" /></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:${list.size()}
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {field:'officeName',align:'center', minWidth:150, title: '${showName}', templet:function(d){
+                        if(d.officeName!='合计'&&'${showName}'!="月份"){
+                            var xml = "<a class=\"attention-info\" onclick=\"isSign('"+d.id+"')\" >" +
+                                "<span title=" + d.officeName + ">" + d.officeName + "</span></a>";
+                        return xml;
+                    }else{
+                            return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                        }
+                }}
+                ,{field:'money',align:'center', minWidth:150, title: '报销金额', templet:function(d){
+                        return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty list}">
+                <c:forEach items="${list}" var="workReimbursementOffice" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workReimbursementOffice.id}",
+                    "officeName":"${workReimbursementOffice.officeName}"
+                    ,"money":"<fmt:formatNumber value="${workReimbursementOffice.money}" pattern="#,#00.00"/>"
+                }
+                </c:forEach>
+                </c:if>
+            ]
+           /* done: function(res, curr, count){
+                var data=res.data;
+                $('.layui-table-body tr').each(function(){
+                    var dataindex=$(this).attr('data-index');
+                    var idx=0;
+                    for(var item in data){
+                        if(dataindex==idx){
+                            $(this).dblclick(function(){//双击某一行事件
+                                var rowId=data[item].id;
+                                window.location = "${ctx}/workreimbursementcount/workReimbursementCount/infolist?id="+rowId;
+
+                            });
+                            break;
+                        }
+                        idx++;
+                    }
+                });
+            }*/
+        });
+
+    })
+    resizeListTable();
+</script>
+
+
+<script>
+    function isSign(officeId){
+        $.ajax({
+            type:'post',
+            url:'${ctx}/workreimbursementcount/workInvoiceCount/officeSignlist',
+            data:{
+                "officeId":officeId
+            },
+            success:function(data){
+                if(data==0){
+                    window.location.href='${ctx}/workreimbursementcount/workReimbursementCount/infolist?officeId='+officeId;
+                }else{
+                    window.location.href='${ctx}/workreimbursementcount/workReimbursementCount/officelist?companyId='+officeId;
+                }
+            }
+        })
+    }
+    function resetSearchs(){//重置,页码清零
+        $("#extleft").iCheck('check');
+        $("#pageNo").val(0);
+        $("#searchForm div.query input").val("");
+        $("#searchForm div.query select").val("");
+        $("#searchForm").submit();
+        return false;
+    }
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+<script type="text/javascript">
+    function changeStyle(obj){
+        if(obj==0){
+            $("#frametable").show();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==1){
+            $("#frametable").hide();//列表
+            $("#bar_normal").show();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==2){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").show();//饼图
+            $("#line_normal").hide();//折线
+        }else if(obj==3){
+            $("#frametable").hide();//列表
+            $("#bar_normal").hide();//柱图
+            $("#pie").hide();//饼图
+            $("#line_normal").show();//折线
+        }
+    }
+    function changeStyleLeft(obj){
+        $("#check").val(obj);
+    }
+</script>
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#cus_name").show();
+        $("#cus_name").siblings().hide();
+        if(${showName eq '月份'}){
+            $("#extleft1").iCheck('check');
+        }else {
+            $("#extleft").iCheck('check')
+        }
+        $("input[name='extright']").on('ifChecked', function(event){
+            var obj=$("input:radio[name='extright']:checked").val();
+            changeStyle(obj);
+        });
+        $("input[name='extleft']").on('ifChecked', function(event){
+            var radioVal = $(this).val();
+            changeStyleLeft(radioVal);
+        });
+        //搜索框收放
+        $('#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: '#date', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+        });
+
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+
+
+</script>
+</body>
+</html>

+ 20 - 0
src/main/webapp/webpage/modules/workrelationship/Track.jsp

@@ -0,0 +1,20 @@
+<%@ 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>
+	<%--<div class="wrapper wrapper-content">--%>
+		<%--<act:flowChart procInsId="${processInstanceId}"/>--%>
+        <%--<act:histoicFlow procInsId="${processInstanceId}"/>--%>
+	<%--</div>--%>
+
+</body>
+</html>
+

+ 460 - 0
src/main/webapp/webpage/modules/workrelationship/workRelationshipAudit.jsp

@@ -0,0 +1,460 @@
+<%@ 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(obj == 1){
+                $('#flag').val('1');
+            }else{
+                $('#flag').val('2');
+            }
+		  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: '#contractStartTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#contractEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#tryEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#transactTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                if($("#file_attachment tr").length>0){
+                    top.layer.alert('仅可以上传一个附件', {icon: 0});
+                    return;
+                }
+                $("#attachment_file").click();
+            });
+            /*$("input[name='renew']").on('ifChecked', function(event){
+                var radioVal = $(this).val();
+                console.log(radioVal+"----------radioVal");
+                if(radioVal == 1){
+                    //不续签
+                }else{
+                    //续签
+                }
+            });*/
+            if("${workRelationship.renew}" == "1"){
+                $("#renew1").iCheck('check')
+            }else{
+                $("#renew").iCheck('check')
+            }
+		});
+        function insertTitle(tValue){
+            var list = "${workRelationship.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 = "108";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workRelationship/"+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);}
+        }
+        function addRow(list, idx, workClientLinkmanTpl, row) {
+            $(list).append(Mustache.render(workClientLinkmanTpl, {
+                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).parent().parent().hide();
+                $(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");
+            }
+        }
+        function selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+            setValuee(id);
+        }
+        function setValuee(obj){
+            $('#workClientLinkmanList').html("");
+            var rId = "${workRelationship.id}";
+            //console.log(rId+"-------------");
+            $.get("${ctx}/workrelationship/workRelationship/selectStaffUser", { rId:rId,sId: obj},
+                function(data,textStatus){
+                    data = data.body.list;
+                    if(data !=null){
+                        for (var i=0; i<data.length; i++){
+                            addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                            workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                        }
+                    }
+                });
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+           // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workRelationship" action="${ctx}/workrelationship/workRelationship/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"/>
+			<%--<input name="renew" type="hidden" value="0">--%>
+		<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+						<%--<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workRelationship.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workRelationship.workStaffBasicInfo.name}"
+											title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="null"  isSingle="true"></sys:gridSelectUserRship>--%>
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.name}"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.no}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workRelationship.status}">${fns:getDictLabel(workRelationship.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.status}"/>
+						<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('bidProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.idCard}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.jobGrade}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.pay}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+						<%--input class="laydate-icondate layui-input form-control layer-date laydate-icon required"
+							   id="contractDate" name="contractDate" value="<fmt:formatDate value="${workContractInfo.contractDate}"
+							    pattern="yyyy-MM-dd"/>">--%>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row lw16">
+				<div class="form-group-label"><h2>合同详情</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">是否续签:</label>
+					<div class="layui-input-block">
+						<input type="radio" class="i-checks" name="renew" checked id="renew" value="0">
+						<label for="renew">续签</label>
+						<input type="radio" class="i-checks" name="renew" id="renew1" value="1">
+						<label for="renew1">不续签</label>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.contractNum}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同类型:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" value="${fns:getDictLabel(workRelationship.contractType, 'relsp_cType', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同期限:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" value="${fns:getDictLabel(workRelationship.contractLimit, 'contract_limit', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同起始日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.contractStartTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同终止日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.contractEndTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">试用期结束日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.tryEndTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">办理日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.transactTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</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 width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+
+						<c:forEach items="${workRelationship.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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a 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">
+				<div class="form-group-label"><h2>历史关系</h2></div>
+				<%--<div class="layui-item nav-btns">
+					<a class="nav-btn nav-btn-add" onclick="addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
+				</div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable2" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>合同编号</th>
+							<th>合同类型</th>
+							<th>合同期限</th>
+							<th>合同起始日期</th>
+							<th>合同终止日期</th>
+							<th>办理日期</th>
+							<th width="160px">附件</th>
+						</tr>
+						</thead>
+						<tbody id="workClientLinkmanList">
+						<c:forEach items="${workRelationship.workRelationships}" var="buyDetails" varStatus="status">
+							<tr>
+								<td>${buyDetails.contractNum}</td>
+								<td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+								<td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+								<td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+								<%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+									<c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+										<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}"></td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+									</c:forEach>
+							</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-sm12 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" />
+						<input type="file" name="upload_files" style="display: none;">
+					</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="${workRelationship.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workRelationship.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 451 - 0
src/main/webapp/webpage/modules/workrelationship/workRelationshipAuditFirst.jsp

@@ -0,0 +1,451 @@
+<%@ 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(obj == 1){
+                $('#flag').val('yes');
+            }else{
+                $('#flag').val('no');
+            }
+		  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: '#contractStartTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#contractEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#tryEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#transactTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                if($("#file_attachment tr").length>0){
+                    top.layer.alert('仅可以上传一个附件', {icon: 0});
+                    return;
+                }
+                $("#attachment_file").click();
+            });
+            /*$("input[name='renew']").on('ifChecked', function(event){
+                var radioVal = $(this).val();
+                console.log(radioVal+"----------radioVal");
+                if(radioVal == 1){
+                    //不续签
+                }else{
+                    //续签
+                }
+            });*/
+            if("${workRelationship.renew}" == "1"){
+                $("#renew1").iCheck('check')
+            }else{
+                $("#renew").iCheck('check')
+            }
+		});
+        function insertTitle(tValue){
+            var list = "${workRelationship.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 = "108";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workRelationship/"+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);}
+        }
+        function addRow(list, idx, workClientLinkmanTpl, row) {
+            $(list).append(Mustache.render(workClientLinkmanTpl, {
+                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).parent().parent().hide();
+                $(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");
+            }
+        }
+        function selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+            setValuee(id);
+        }
+        function setValuee(obj){
+            $('#workClientLinkmanList').html("");
+            var rId = "${workRelationship.id}";
+            //console.log(rId+"-------------");
+            $.get("${ctx}/workrelationship/workRelationship/selectStaffUser", { rId:rId,sId: obj},
+                function(data,textStatus){
+                    data = data.body.list;
+                    if(data !=null){
+                        for (var i=0; i<data.length; i++){
+                            addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                            workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                        }
+                    }
+                });
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+           // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workRelationship" action="${ctx}/workrelationship/workRelationship/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"/>
+			<%--<input name="renew" type="hidden" value="0">--%>
+		<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+						<%--<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workRelationship.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workRelationship.workStaffBasicInfo.name}"
+											title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="null"  isSingle="true"></sys:gridSelectUserRship>--%>
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.name}"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.no}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workRelationship.status}">${fns:getDictLabel(workRelationship.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.status}"/>
+						<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('bidProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.idCard}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.jobGrade}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.pay}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+						<%--input class="laydate-icondate layui-input form-control layer-date laydate-icon required"
+							   id="contractDate" name="contractDate" value="<fmt:formatDate value="${workContractInfo.contractDate}"
+							    pattern="yyyy-MM-dd"/>">--%>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row lw16">
+				<div class="form-group-label"><h2>合同详情</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.contractNum}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同类型:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" value="${fns:getDictLabel(workRelationship.contractType, 'relsp_cType', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同期限:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" value="${fns:getDictLabel(workRelationship.contractLimit, 'contract_limit', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同起始日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.contractStartTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同终止日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.contractEndTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">试用期结束日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.tryEndTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">办理日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.transactTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</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 width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+
+						<c:forEach items="${workRelationship.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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a 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">
+				<div class="form-group-label"><h2>历史关系</h2></div>
+				<%--<div class="layui-item nav-btns">
+					<a class="nav-btn nav-btn-add" onclick="addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
+				</div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable2" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>合同编号</th>
+							<th>合同类型</th>
+							<th>合同期限</th>
+							<th>合同起始日期</th>
+							<th>合同终止日期</th>
+							<th>办理日期</th>
+							<th width="160px">附件</th>
+						</tr>
+						</thead>
+						<tbody id="workClientLinkmanList">
+						<c:forEach items="${workRelationship.workRelationships}" var="buyDetails" varStatus="status">
+							<tr>
+								<td>${buyDetails.contractNum}</td>
+								<td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+								<td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+								<td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+								<%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+									<c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+										<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}"></td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+									</c:forEach>
+							</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-sm12 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" />
+						<input type="file" name="upload_files" style="display: none;">
+					</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="${workRelationship.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workRelationship.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 564 - 0
src/main/webapp/webpage/modules/workrelationship/workRelationshipForm.jsp

@@ -0,0 +1,564 @@
+<%@ 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(obj == 2){
+                $("#inputForm").attr("action","${ctx}/workrelationship/workRelationship/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workrelationship/workRelationship/save");
+            }
+		  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: '#contractStartTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#contractEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#tryEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#transactTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                if($("#file_attachment tr").length>0){
+                    top.layer.alert('仅可以上传一个附件', {icon: 0});
+                    return;
+                }
+                $("#attachment_file").click();
+            });
+            var remarks =  "${workRelationship.remarks}"
+			if("1" == remarks){
+                $("#contractNum").removeAttr("disabled");
+                $("#contractType1").removeAttr("disabled");
+                $("#contractType2").removeAttr("disabled");
+                $("#contractLimit").removeAttr("disabled");
+                $("#contractStartTime").removeAttr("disabled");
+                $("#contractEndTime").removeAttr("disabled");
+                $("#tryEndTime").removeAttr("disabled");
+                $("#transactTime").removeAttr("disabled");
+			}else {
+                $("#contractNum").val("");
+                $("#contractType1").val("");
+                $("#contractType2").val("");
+                $("#contractLimit").val("");
+                $("#contractStartTime").val("");
+                $("#contractEndTime").val("");
+                $("#tryEndTime").val("");
+                $("#transactTime").val("");
+                $("#contractNum").attr("disabled","true");
+                $("#contractType1").attr("disabled","true");
+                $("#contractType2").attr("disabled","true");
+                $("#contractLimit").attr("disabled","true");
+                $("#contractStartTime").attr("disabled","true");
+                $("#contractEndTime").attr("disabled","true");
+                $("#tryEndTime").attr("disabled","true");
+                $("#transactTime").attr("disabled","true");
+			}
+			var _status = "${workRelationship.workStaffBasicInfo.status}"
+            if(_status == '劳务'){
+                $("#tr1").hide()
+                $("#tr2").show()
+            }else{
+                $("#tr1").show()
+                $("#tr2").hide()
+            }
+		});
+        function insertTitle(tValue){
+            var list = "${workRelationship.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var file = $("#attachment_file")[0].files[0];
+            var attachmentId = "";
+            var attachmentFlag = "108";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workRelationship/"+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);
+        }
+        function addRow(list, idx, workClientLinkmanTpl, row) {
+            $(list).append(Mustache.render(workClientLinkmanTpl, {
+                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).parent().parent().hide();
+                $(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");
+            }
+        }
+        function selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+            setValuee(id);
+        }
+        function setValuee(obj){
+            $('#workClientLinkmanList').html("");
+            var rId = "${workRelationship.id}";
+            //console.log(rId+"-------------");
+            $.get("${ctx}/workrelationship/workRelationship/selectStaffUser", { rId:rId,sId: obj},
+                function(data,textStatus){
+                    data = data.body.list;
+                    if(data !=null && data.length > 0){
+                        $("#contractNum").val("");
+                        $("#contractType1").val("");
+                        $("#contractType2").val("");
+                        $("#contractLimit").val("");
+                        $("#contractStartTime").val("");
+                        $("#contractEndTime").val("");
+                        $("#tryEndTime").val("");
+                        $("#transactTime").val("");
+                        $("#contractNum").attr("disabled","true");
+                        $("#contractType1").attr("disabled","true");
+                        $("#contractType2").attr("disabled","true");
+                        $("#contractLimit").attr("disabled","true");
+                        $("#contractStartTime").attr("disabled","true");
+                        $("#contractEndTime").attr("disabled","true");
+                        $("#tryEndTime").attr("disabled","true");
+                        $("#transactTime").attr("disabled","true");
+                        for (var i=0; i<data.length; i++){
+                            addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                            console.log(data[i]);
+                            workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                            /*$("#contentTable2").addClass("table table-bordered table-condensed can-edit no-bottom-margin");*/
+                        }
+                    }else{
+                        $("#contractNum").removeAttr("disabled");
+                        $("#contractType1").removeAttr("disabled");
+                        $("#contractType2").removeAttr("disabled");
+                        $("#contractLimit").removeAttr("disabled");
+                        $("#contractStartTime").removeAttr("disabled");
+                        $("#contractEndTime").removeAttr("disabled");
+                        $("#tryEndTime").removeAttr("disabled");
+                        $("#transactTime").removeAttr("disabled");
+					}
+                });
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+           // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+
+            if(obj.status == '劳务'){
+                $("#tr1").hide()
+                $("#tr2").show()
+            }else{
+                $("#tr1").show()
+                $("#tr2").hide()
+            }
+        }
+        function changeType(obj){
+/*
+            var renew = $("#renew").val();
+            if(obj == '2'){
+                //无固定期限
+                $("#contractEndTime").attr("disabled","true");
+                $("#contractEndTime").val("");
+            }else{
+                $("#contractEndTime").removeAttr("disabled");
+            }
+            //续签且固定期限
+            if(obj == '1' && renew == '0'){
+                //合同终止日期
+                $("#contractEndTime").removeClass().addClass("laydate-icondate form-control required layer-date layui-input laydate-icon");
+            }else{
+                $("#contractEndTime").removeClass().addClass("laydate-icondate form-control layer-date layui-input laydate-icon");
+            }*/
+        }
+        function changeClass(obj){
+          /*  //续签,试用,劳动
+            var renew = $("#renew").val();
+            var sStatus = "${workRelationship.workStaffBasicInfo.status}"
+            if(obj == '1' && renew == '0' && sStatus == '试用'){
+                //试用期结束日期
+                $("#tryEndTime").removeClass().addClass("laydate-icondate form-control required layer-date layui-input laydate-icon");
+            }else{
+                $("#tryEndTime").removeClass().addClass("laydate-icondate form-control layer-date layui-input laydate-icon");
+            }*/
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workRelationship" action="${ctx}/workrelationship/workRelationship/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+						<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workRelationship.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workRelationship.workStaffBasicInfo.name}"
+											title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="2"  isSingle="true"></sys:gridSelectUserRship>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="sNo" path="workStaffBasicInfo.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 workRelationship.status}">${fns:getDictLabel(workRelationship.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<form:input id="sStatus" path="workStaffBasicInfo.status" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+						<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('bidProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<form:input id="sIdCard" path="workStaffBasicInfo.idCard" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<form:input id="sOffice" path="workStaffBasicInfo.office.name" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<form:input id="sJobGrade" path="jobGrade" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<form:input id="baseSalary" path="pay" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="entryDate" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+						<%--input class="laydate-icondate layui-input form-control layer-date laydate-icon required"
+							   id="contractDate" name="contractDate" value="<fmt:formatDate value="${workContractInfo.contractDate}"
+							    pattern="yyyy-MM-dd"/>">--%>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row lw16">
+				<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">
+						<input  htmlEscape="false" value="" readonly="true" class="form-control layui-input"/>
+						&lt;%&ndash;<c:if test="${workRelationship.renew eq 0}">
+							<input  htmlEscape="false" value="续签" readonly="true" class="form-control layui-input"/>
+						</c:if>
+						<c:if test="${workRelationship.renew eq 1}">
+							<input  htmlEscape="false" value="不续签" readonly="true" class="form-control layui-input"/>
+						</c:if>&ndash;%&gt;
+					</div>
+				</div>--%>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<form:input path="contractNum" htmlEscape="false" id="contractNum" class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同类型:</label>
+					<div class="layui-input-block" id ="tr1" style="display:none">    <%--劳动--%>
+						<form:select path="contractType" id="contractType1" onchange="changeClass(this.value)" class="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('relsp_cType1')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+					<div class="layui-input-block" id ="tr2" style="display:block"> <%--劳务--%>
+						<form:select path="contractType" id="contractType2" class="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('relsp_cType2')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同期限:</label>
+					<div class="layui-input-block">
+						<form:select path="contractLimit" id="contractLimit" onchange="changeType(this.value)" class="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('contract_limit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同起始日期:</label>
+					<div class="layui-input-block">
+						<input id="contractStartTime" name="contractStartTime" type="text" maxlength="20" class="laydate-icondate required form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.contractStartTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同终止日期:</label>
+					<div class="layui-input-block">
+						<input id="contractEndTime" name="contractEndTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.contractEndTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">试用期结束日期:</label>
+					<div class="layui-input-block">
+						<input id="tryEndTime" name="tryEndTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.tryEndTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">办理日期:</label>
+					<div class="layui-input-block">
+						<input id="transactTime" name="transactTime" type="text" maxlength="20" class="laydate-icondate form-control required layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.transactTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</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" 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 width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+
+						<c:forEach items="${workRelationship.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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a 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">
+				<div class="form-group-label"><h2>历史关系</h2></div>
+				<%--<div class="layui-item nav-btns">
+					<a class="nav-btn nav-btn-add" onclick="addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
+				</div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable2" class="table table-bordered table-condensed details">
+						<%--<table id="contentTable2" class="table table-bordered table-condensed no-bottom-margin">--%>
+						<thead>
+						<tr>
+							<th>合同编号</th>
+							<th>合同类型</th>
+							<th>合同期限</th>
+							<th>合同起始日期</th>
+							<th>合同终止日期</th>
+							<th>办理日期</th>
+							<th>附件</th>
+						</tr>
+						</thead>
+						<tbody id="workClientLinkmanList">
+						<c:forEach items="${workRelationship.workRelationships}" var="buyDetails" varStatus="status">
+							<tr>
+								<td>${buyDetails.contractNum}</td>
+								<td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+								<td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+								<td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+									<%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+								<c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+									<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}"></td>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+													<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+												</c:when>
+												<c:otherwise>
+													<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+								</c:forEach>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+
+					<script type="text/template" id="workClientLinkmanTpl">//<!--
+					<tr id="workClientLinkmanList{{idx}}">
+						<td>
+							{{row.contractNum}}
+						</td>
+						<td>
+							{{row.contractType}}
+						</td>
+						<td>
+							{{row.contractLimit}}
+						</td>
+						<td>
+							{{row.startDate}}
+						</td>
+						<td>
+							{{row.endDate}}
+						</td>
+						<td>
+							{{row.tDate}}
+						</td>
+						<td >
+							<a href="javascript:void(0)" onclick="preview('预览','{{row.url}}','90%','90%')"> {{row.uName}}</a>
+						</td>
+					</tr>//-->
+					</script>
+					<script type="text/javascript">
+                        var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        if($("#id").val()){
+                            workClientLinkmanRowIdx = ${fn:length(workRelationship.workRelationships)};
+                        }
+
+					</script>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 369 - 0
src/main/webapp/webpage/modules/workrelationship/workRelationshipList.jsp

@@ -0,0 +1,369 @@
+<%@ 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(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: '#beginContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            /*contract_end_time*/
+            laydate.render({
+                elem: '#endContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#beginContractDates', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            /*transact_time*/
+            laydate.render({
+                elem: '#endContractDates', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+        });
+        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: false, //开启最大化最小化按钮
+                skin: 'three-btns',
+                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
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+        }
+        function openDialogreplay(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: false, //开启最大化最小化按钮
+                skin: 'two-btns',
+                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
+                    }
+
+                },
+                cancel: function(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%;
+		}
+	</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="workRelationship" action="${ctx}/workrelationship/workRelationship/" 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 lw8">
+			<div class="layui-item query athird">
+				<label class="layui-form-label">姓名:</label>
+				<div class="layui-input-block">
+					<form:input id="" path="workStaffBasicInfo.name" htmlEscape="false" class="form-control  layui-input"/>
+				</div>
+			</div>
+			<div class="layui-item query athird">
+				<label class="layui-form-label">合同终止日期:</label>
+				<div class="layui-input-block">
+					<input id="beginContractDate" name="beginContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+						   value="<fmt:formatDate value="${workRelationship.beginContractDate}" pattern="yyyy-MM-dd"/>"/>
+					</input>
+					<span class="group-sep">-</span>
+					<input id="endContractDate" name="endContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+						   value="<fmt:formatDate value="${workRelationship.endContractDate}" 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" class="lw8" style="clear:both;display:none;">
+			<div class="layui-item query athird">
+				<label class="layui-form-label">办理日期:</label>
+				<div class="layui-input-block">
+					<input id="beginContractDates" name="beginContractDates" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+						   value="<fmt:formatDate value="${workRelationship.beginContractDates}" pattern="yyyy-MM-dd"/>"/>
+					</input>
+					<span class="group-sep">-</span>
+					<input id="endContractDates" name="endContractDates" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+						   value="<fmt:formatDate value="${workRelationship.endContractDates}" pattern="yyyy-MM-dd"/>"/>
+					</input>
+				</div>
+			</div>
+			<div class="layui-item query athird">
+				<label class="layui-form-label">工号:</label>
+				<div class="layui-input-block">
+					<form:input path="workStaffBasicInfo.no" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+				</div>
+			</div>
+
+			<div class="layui-item query athird">
+				<label class="layui-form-label">部门:</label>
+				<div class="layui-input-block">
+					<form:input path="workStaffBasicInfo.office.name" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+				</div>
+			</div>
+			<div class="layui-item query athird">
+				<label class="layui-form-label">合同类型:</label>
+				<div class="layui-input-block">
+					<form:select path="contractType"  class="form-control simple-select">
+						<form:option value="" label=""/>
+						<form:options items="${fns:getDictList('relsp_cType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+				<div style="clear:both;"></div>
+			</div>
+			<div class="layui-item query athird">
+				<label class="layui-form-label">合同期限:</label>
+				<div class="layui-input-block">
+					<form:select path="contractLimit"  class="form-control simple-select">
+						<form:option value="" label=""/>
+						<form:options items="${fns:getDictList('contract_limit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+				<div style="clear:both;"></div>
+			</div>
+			<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('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+				<div style="clear:both;"></div>
+			</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="workrelationship:workRelationship:add">
+						<button class="nav-btn nav-btn-add" title="劳动关系" onclick="openDialogre('劳动关系管理','${ctx}/workrelationship/workRelationship/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>
+					</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: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'contractNum',align:'center',title: '合同编号',width:160,templet:function(d){
+                    return "<span title='"+ d.contractNum +"'>" + d.contractNum + "</span>";
+                }}
+                ,{field:'no',align:'center', title: '工号',width:160,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看劳动关系', '${ctx}/workrelationship/workRelationship/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.no + ">" + d.no + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'sName',align:'center', title: '姓名',width:160,templet:function(d){
+                    return "<span title='"+ d.sName +"'>" + d.sName + "</span>";
+                }}
+                ,{field:'sOffice',align:'center', title: '部门',width:160,templet:function(d){
+                    return "<span title='"+ d.sOffice +"'>" + d.sOffice + "</span>";
+                }}
+                ,{field:'contractType', align:'center',title: '合同类型',width:160,templet:function(d){
+                    return "<span title='"+ d.contractType +"'>" + d.contractType + "</span>";
+                }}
+                ,{field:'contractLimit', align:'center',title: '合同期限',width:160,templet:function(d){
+                    return "<span title='"+ d.contractLimit +"'>" + d.contractLimit + "</span>";
+                }}
+                ,{field:'contractEndTime',align:'center', title: '合同终止日期', width:160}
+                ,{field:'transactTime',align:'center',sort:true, title: '办理日期', width:160}
+                ,{field:'status',align:'center', title: '状态', width:160,templet:function(d){
+                    <%--var st = getAuditState(d.status);--%>
+                    <%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractrecord/workContractRecord/getProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
+                    <%--return xml;--%>
+                    var st = getAuditState(d.status);
+                    if(st.action)
+                        var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workrelationship/workRelationship/getProcessOne?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;
+                }}
+                // ,{fixed: 'right',align:'center', toolbar: '#op',title:"操作"}
+                ,{align:'center',title:"操作",width:192,templet:function(d){
+                    ////对操作进行初始化
+                    var xml = "";
+                    if(d.cancancel != undefined && d.cancancel == "1")
+                        xml += "<a href=\"${ctx}/workrelationship/workRelationship/cancelInvalidate?id=" + d.id + "\" 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=\"openDialogre('修改劳动关系', '${ctx}/workrelationship/workRelationship/form?id="+ d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit2 != undefined && d.canedit2 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('修改劳动关系', '${ctx}/workrelationship/workRelationship/form?id="+ d.id + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit3 != undefined && d.canedit3 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请劳动关系', '${ctx}/workrelationship/workRelationship/form?id=" + d.id + "&tabId=4','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}/workrelationship/workRelationship/delete?id=" + d.id + "\" 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="workRelationship" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workRelationship.id}"
+                    ,"contractNum":"${workRelationship.contractNum}"
+                    ,"no":"${workRelationship.workStaffBasicInfo.no}"
+                    ,"sName":"${workRelationship.workStaffBasicInfo.name}"
+                    ,"sOffice":"${workRelationship.workStaffBasicInfo.office.name}"
+                    ,"contractType":"${fns:getDictLabel(workRelationship.contractType, 'relsp_cType', '')}"
+                    ,"contractLimit":"${fns:getDictLabel(workRelationship.contractLimit, 'contract_limit', '')}"
+                    ,"contractEndTime":"<fmt:formatDate value="${workRelationship.contractEndTime}" pattern="yyyy-MM-dd"/>"
+                    ,"transactTime":"<fmt:formatDate value="${workRelationship.transactTime}" pattern="yyyy-MM-dd"/>"
+                    ,"status":"${workRelationship.status}"
+                    <c:if test="${fns:getUser().id == workRelationship.createBy.id}">
+                    <c:if test="${workRelationship.status == '2' }">,"cancancel":"1"</c:if>
+                    <shiro:hasPermission name="workrelationship:workRelationship:edit"><c:choose>
+                    <c:when test="${workRelationship.status == '1' }">,"canedit1":"1"</c:when>
+                    <c:when test="${workRelationship.status == '3' && workRelationship.remarks == '1'}">,"canedit2":"1"</c:when>
+                    <c:when test="${workRelationship.status == '3'}">,"canedit3":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="workrelationship:workRelationship:del"><c:choose>
+                    <c:when test="${(workRelationship.status == '1' or workRelationship.status == '3' or workRelationship.status == '4')}">,"candelete":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 543 - 0
src/main/webapp/webpage/modules/workrelationship/workRelationshipModify.jsp

@@ -0,0 +1,543 @@
+<%@ 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(obj == 2){
+                $("#flag").val("no");
+            }else{
+                $("#flag").val("yes");
+            }
+		  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: '#contractStartTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#contractEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#tryEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#transactTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                if($("#file_attachment tr").length>0){
+                    top.layer.alert('仅可以上传一个附件', {icon: 0});
+                    return;
+                }
+                $("#attachment_file").click();
+            });
+            var _status = "${workRelationship.workStaffBasicInfo.status}"
+            if(_status == '劳务'){
+                $("#tr1").hide()
+                $("#tr2").show()
+            }else{
+                $("#tr1").show()
+                $("#tr2").hide()
+            }
+		});
+        function insertTitle(tValue){
+            var list = "${workRelationship.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var file = $("#attachment_file")[0].files[0];
+            var attachmentId = "";
+            var attachmentFlag = "108";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workRelationship/"+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);
+        }
+        function addRow(list, idx, workClientLinkmanTpl, row) {
+            $(list).append(Mustache.render(workClientLinkmanTpl, {
+                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).parent().parent().hide();
+                $(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");
+            }
+        }
+        function selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+            setValuee(id);
+        }
+        function setValuee(obj){
+            $('#workClientLinkmanList').html("");
+            var rId = "${workRelationship.id}";
+            //console.log(rId+"-------------");
+            $.get("${ctx}/workrelationship/workRelationship/selectStaffUser", { rId:rId,sId: obj},
+                function(data,textStatus){
+                    data = data.body.list;
+                    if(data !=null && data.length > 0){
+                        $("#contractNum").val("");
+                        $("#contractType1").val("");
+                        $("#contractType2").val("");
+                        $("#contractLimit").val("");
+                        $("#contractStartTime").val("");
+                        $("#contractEndTime").val("");
+                        $("#tryEndTime").val("");
+                        $("#transactTime").val("");
+                        $("#contractNum").attr("disabled","true");
+                        $("#contractType1").attr("disabled","true");
+                        $("#contractType2").attr("disabled","true");
+                        $("#contractLimit").attr("disabled","true");
+                        $("#contractStartTime").attr("disabled","true");
+                        $("#contractEndTime").attr("disabled","true");
+                        $("#tryEndTime").attr("disabled","true");
+                        $("#transactTime").attr("disabled","true");
+                        for (var i=0; i<data.length; i++){
+                            addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                            console.log(data[i]);
+                            workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                            /*$("#contentTable2").addClass("table table-bordered table-condensed can-edit no-bottom-margin");*/
+                        }
+                    }else{
+                        $("#contractNum").removeAttr("disabled");
+                        $("#contractType1").removeAttr("disabled");
+                        $("#contractType2").removeAttr("disabled");
+                        $("#contractLimit").removeAttr("disabled");
+                        $("#contractStartTime").removeAttr("disabled");
+                        $("#contractEndTime").removeAttr("disabled");
+                        $("#tryEndTime").removeAttr("disabled");
+                        $("#transactTime").removeAttr("disabled");
+					}
+                });
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+           // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+
+            if(obj.status == '劳务'){
+                $("#tr1").hide()
+                $("#tr2").show()
+            }else{
+                $("#tr1").show()
+                $("#tr2").hide()
+            }
+        }
+        function changeType(obj){
+/*
+            var renew = $("#renew").val();
+            if(obj == '2'){
+                //无固定期限
+                $("#contractEndTime").attr("disabled","true");
+                $("#contractEndTime").val("");
+            }else{
+                $("#contractEndTime").removeAttr("disabled");
+            }
+            //续签且固定期限
+            if(obj == '1' && renew == '0'){
+                //合同终止日期
+                $("#contractEndTime").removeClass().addClass("laydate-icondate form-control required layer-date layui-input laydate-icon");
+            }else{
+                $("#contractEndTime").removeClass().addClass("laydate-icondate form-control layer-date layui-input laydate-icon");
+            }*/
+        }
+        function changeClass(obj){
+          /*  //续签,试用,劳动
+            var renew = $("#renew").val();
+            var sStatus = "${workRelationship.workStaffBasicInfo.status}"
+            if(obj == '1' && renew == '0' && sStatus == '试用'){
+                //试用期结束日期
+                $("#tryEndTime").removeClass().addClass("laydate-icondate form-control required layer-date layui-input laydate-icon");
+            }else{
+                $("#tryEndTime").removeClass().addClass("laydate-icondate form-control layer-date layui-input laydate-icon");
+            }*/
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workRelationship" action="${ctx}/workrelationship/workRelationship/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}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+						<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workRelationship.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workRelationship.workStaffBasicInfo.name}"
+											title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="2"  isSingle="true"></sys:gridSelectUserRship>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="sNo" path="workStaffBasicInfo.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 workRelationship.status}">${fns:getDictLabel(workRelationship.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<form:input id="sStatus" path="workStaffBasicInfo.status" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+						<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('bidProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<form:input id="sIdCard" path="workStaffBasicInfo.idCard" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<form:input id="sOffice" path="workStaffBasicInfo.office.name" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<form:input id="sJobGrade" path="jobGrade" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<form:input id="baseSalary" path="pay" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="entryDate" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+						<%--input class="laydate-icondate layui-input form-control layer-date laydate-icon required"
+							   id="contractDate" name="contractDate" value="<fmt:formatDate value="${workContractInfo.contractDate}"
+							    pattern="yyyy-MM-dd"/>">--%>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row lw16">
+				<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">
+						<input  htmlEscape="false" value="" readonly="true" class="form-control layui-input"/>
+						&lt;%&ndash;<c:if test="${workRelationship.renew eq 0}">
+							<input  htmlEscape="false" value="续签" readonly="true" class="form-control layui-input"/>
+						</c:if>
+						<c:if test="${workRelationship.renew eq 1}">
+							<input  htmlEscape="false" value="不续签" readonly="true" class="form-control layui-input"/>
+						</c:if>&ndash;%&gt;
+					</div>
+				</div>--%>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<form:input path="contractNum" htmlEscape="false" id="contractNum" class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同类型:</label>
+					<div class="layui-input-block" id ="tr1" style="display:none">    <%--劳动--%>
+						<form:select path="contractType" id="contractType1" onchange="changeClass(this.value)" class="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('relsp_cType1')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+					<div class="layui-input-block" id ="tr2" style="display:block"> <%--劳务--%>
+						<form:select path="contractType" id="contractType2" class="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('relsp_cType2')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同期限:</label>
+					<div class="layui-input-block">
+						<form:select path="contractLimit" id="contractLimit" onchange="changeType(this.value)" class="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('contract_limit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同起始日期:</label>
+					<div class="layui-input-block">
+						<input id="contractStartTime" name="contractStartTime" type="text" maxlength="20" class="laydate-icondate required form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.contractStartTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同终止日期:</label>
+					<div class="layui-input-block">
+						<input id="contractEndTime" name="contractEndTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.contractEndTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">试用期结束日期:</label>
+					<div class="layui-input-block">
+						<input id="tryEndTime" name="tryEndTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.tryEndTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">办理日期:</label>
+					<div class="layui-input-block">
+						<input id="transactTime" name="transactTime" type="text" maxlength="20" class="laydate-icondate form-control required layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.transactTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</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" 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 width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+
+						<c:forEach items="${workRelationship.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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a 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">
+				<div class="form-group-label"><h2>历史关系</h2></div>
+				<%--<div class="layui-item nav-btns">
+					<a class="nav-btn nav-btn-add" onclick="addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
+				</div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable2" class="table table-bordered table-condensed details">
+						<%--<table id="contentTable2" class="table table-bordered table-condensed no-bottom-margin">--%>
+						<thead>
+						<tr>
+							<th>合同编号</th>
+							<th>合同类型</th>
+							<th>合同期限</th>
+							<th>合同起始日期</th>
+							<th>合同终止日期</th>
+							<th>办理日期</th>
+							<th>附件</th>
+						</tr>
+						</thead>
+						<tbody id="workClientLinkmanList">
+						<c:forEach items="${workRelationship.workRelationships}" var="buyDetails" varStatus="status">
+							<tr>
+								<td>${buyDetails.contractNum}</td>
+								<td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+								<td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+								<td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+									<%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+								<c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+									<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}"></td>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+													<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+												</c:when>
+												<c:otherwise>
+													<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+								</c:forEach>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+
+					<script type="text/template" id="workClientLinkmanTpl">//<!--
+					<tr id="workClientLinkmanList{{idx}}">
+						<td>
+							{{row.contractNum}}
+						</td>
+						<td>
+							{{row.contractType}}
+						</td>
+						<td>
+							{{row.contractLimit}}
+						</td>
+						<td>
+							{{row.startDate}}
+						</td>
+						<td>
+							{{row.endDate}}
+						</td>
+						<td>
+							{{row.tDate}}
+						</td>
+						<td >
+							<a href="javascript:void(0)" onclick="preview('预览','{{row.url}}','90%','90%')"> {{row.uName}}</a>
+						</td>
+					</tr>//-->
+					</script>
+					<script type="text/javascript">
+                        var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        if($("#id").val()){
+                            workClientLinkmanRowIdx = ${fn:length(workRelationship.workRelationships)};
+                        }
+
+					</script>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 426 - 0
src/main/webapp/webpage/modules/workrelationship/workRelationshipView.jsp

@@ -0,0 +1,426 @@
+<%@ 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(obj == 2){
+                $("#inputForm").attr("action","${ctx}/workrelationship/workRelationship/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workrelationship/workRelationship/save");
+            }
+		  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: '#contractStartTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#contractEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#tryEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#transactTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                if($("#file_attachment tr").length>0){
+                    top.layer.alert('仅可以上传一个附件', {icon: 0});
+                    return;
+                }
+                $("#attachment_file").click();
+            });
+		});
+        function insertTitle(tValue){
+            var list = "${workRelationship.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 = "108";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workRelationship/"+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);
+        }
+        function addRow(list, idx, workClientLinkmanTpl, row) {
+            $(list).append(Mustache.render(workClientLinkmanTpl, {
+                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).parent().parent().hide();
+                $(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");
+            }
+        }
+        function selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+            setValuee(id);
+        }
+        function setValuee(obj){
+            $('#workClientLinkmanList').html("");
+            var rId = "${workRelationship.id}";
+            //console.log(rId+"-------------");
+            $.get("${ctx}/workrelationship/workRelationship/selectStaffUser", { rId:rId,sId: obj},
+                function(data,textStatus){
+                    data = data.body.list;
+                    if(data !=null){
+                        for (var i=0; i<data.length; i++){
+                            addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                            workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                        }
+                    }
+                });
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+           // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workRelationship" action="${ctx}/workrelationship/workRelationship/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+						<%--<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workRelationship.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workRelationship.workStaffBasicInfo.name}"
+											title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="null"  isSingle="true"></sys:gridSelectUserRship>--%>
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.name}"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.no}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workRelationship.status}">${fns:getDictLabel(workRelationship.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.status}"/>
+						<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('bidProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.idCard}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.jobGrade}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.pay}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+						<%--input class="laydate-icondate layui-input form-control layer-date laydate-icon required"
+							   id="contractDate" name="contractDate" value="<fmt:formatDate value="${workContractInfo.contractDate}"
+							    pattern="yyyy-MM-dd"/>">--%>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row lw16">
+				<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">
+						<c:choose>
+							<c:when test="${workRelationship.renew eq 0}">
+								<input  htmlEscape="false" value="续签" readonly="true" class="form-control layui-input"/>
+							</c:when>
+							<c:when test="${workRelationship.renew eq 1}">
+								<input  htmlEscape="false" value="不续签" readonly="true" class="form-control layui-input"/>
+							</c:when>
+							<c:otherwise>
+								<input  htmlEscape="false" value="" readonly="true" class="form-control layui-input"/>
+							</c:otherwise>
+						</c:choose>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.contractNum}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同类型:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" value="${fns:getDictLabel(workRelationship.contractType, 'relsp_cType', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同期限:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" value="${fns:getDictLabel(workRelationship.contractLimit, 'contract_limit', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同起始日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.contractStartTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同终止日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.contractEndTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">试用期结束日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.tryEndTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">办理日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.transactTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</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 width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+
+						<c:forEach items="${workRelationship.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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a 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">
+				<div class="form-group-label"><h2>历史关系</h2></div>
+				<%--<div class="layui-item nav-btns">
+					<a class="nav-btn nav-btn-add" onclick="addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
+				</div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable2" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>合同编号</th>
+							<th>合同类型</th>
+							<th>合同期限</th>
+							<th>合同起始日期</th>
+							<th>合同终止日期</th>
+							<th>办理日期</th>
+							<th width="160px">附件</th>
+						</tr>
+						</thead>
+						<tbody id="workClientLinkmanList">
+						<c:forEach items="${workRelationship.workRelationships}" var="buyDetails" varStatus="status">
+							<tr>
+								<td>${buyDetails.contractNum}</td>
+								<td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+								<td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+								<td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+								<%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+									<c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+										<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}"></td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+									</c:forEach>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 463 - 0
src/main/webapp/webpage/modules/workrelationship/workRelationshipqyrAudit.jsp

@@ -0,0 +1,463 @@
+<%@ 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(obj == 1){
+                $('#flag').val('1');
+            }else{
+                $('#flag').val('2');
+            }
+		  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: '#contractStartTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#contractEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#tryEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#transactTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                if($("#file_attachment tr").length>0){
+                    top.layer.alert('仅可以上传一个附件', {icon: 0});
+                    return;
+                }
+                $("#attachment_file").click();
+            });
+            /*$("input[name='renew']").on('ifChecked', function(event){
+                var radioVal = $(this).val();
+                console.log(radioVal+"----------radioVal");
+                if(radioVal == 1){
+                    //不续签
+                }else{
+                    //续签
+                }
+            });*/
+            if("${workRelationship.renew}" == "1"){
+                $("#renew1").iCheck('check')
+            }else{
+                $("#renew").iCheck('check')
+            }
+		});
+        function insertTitle(tValue){
+            var list = "${workRelationship.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 = "108";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workRelationship/"+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);}
+        }
+        function addRow(list, idx, workClientLinkmanTpl, row) {
+            $(list).append(Mustache.render(workClientLinkmanTpl, {
+                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).parent().parent().hide();
+                $(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");
+            }
+        }
+        function selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+            setValuee(id);
+        }
+        function setValuee(obj){
+            $('#workClientLinkmanList').html("");
+            var rId = "${workRelationship.id}";
+            //console.log(rId+"-------------");
+            $.get("${ctx}/workrelationship/workRelationship/selectStaffUser", { rId:rId,sId: obj},
+                function(data,textStatus){
+                    data = data.body.list;
+                    if(data !=null){
+                        for (var i=0; i<data.length; i++){
+                            addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                            workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                        }
+                    }
+                });
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+           // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workRelationship" action="${ctx}/workrelationship/workRelationship/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"/>
+			<%--<input name="renew" type="hidden" value="0">--%>
+		<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+						<%--<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workRelationship.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workRelationship.workStaffBasicInfo.name}"
+											title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="null"  isSingle="true"></sys:gridSelectUserRship>--%>
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.name}"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.no}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workRelationship.status}">${fns:getDictLabel(workRelationship.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.status}"/>
+						<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('bidProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.idCard}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.jobGrade}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.pay}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+						<%--input class="laydate-icondate layui-input form-control layer-date laydate-icon required"
+							   id="contractDate" name="contractDate" value="<fmt:formatDate value="${workContractInfo.contractDate}"
+							    pattern="yyyy-MM-dd"/>">--%>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row lw16">
+				<div class="form-group-label"><h2>合同详情</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">是否续签:</label>
+					<div class="layui-input-block">
+						<c:if test="${workRelationship.renew eq 0}">
+							<input  htmlEscape="false" value="续签" readonly="true" class="form-control layui-input"/>
+						</c:if>
+						<c:if test="${workRelationship.renew eq 1}">
+							<input  htmlEscape="false" value="不续签" readonly="true" class="form-control layui-input"/>
+						</c:if>
+						<%--<input type="hidden"  name="renew" value="${workRelationship.renew}"/>--%>
+					</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 htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.contractNum}"/>
+					</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  htmlEscape="false" value="${fns:getDictLabel(workRelationship.contractType, 'relsp_cType', '')}" 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">
+						<input  htmlEscape="false" value="${fns:getDictLabel(workRelationship.contractLimit, 'contract_limit', '')}" 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">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.contractStartTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同终止日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.contractEndTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">试用期结束日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.tryEndTime}" pattern="yyyy年MM月dd日"/>"/>
+					</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 htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.transactTime}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</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 width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+
+						<c:forEach items="${workRelationship.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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a 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">
+				<div class="form-group-label"><h2>历史关系</h2></div>
+				<%--<div class="layui-item nav-btns">
+					<a class="nav-btn nav-btn-add" onclick="addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
+				</div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable2" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>合同编号</th>
+							<th>合同类型</th>
+							<th>合同期限</th>
+							<th>合同起始日期</th>
+							<th>合同终止日期</th>
+							<th>办理日期</th>
+							<th width="160px">附件</th>
+						</tr>
+						</thead>
+						<tbody id="workClientLinkmanList">
+						<c:forEach items="${workRelationship.workRelationships}" var="buyDetails" varStatus="status">
+							<tr>
+								<td>${buyDetails.contractNum}</td>
+								<td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+								<td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+								<td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+								<%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+									<c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+										<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}"></td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+									</c:forEach>
+							</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-sm12 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" />
+						<input type="file" name="upload_files" style="display: none;">
+					</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="${workRelationship.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workRelationship.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 549 - 0
src/main/webapp/webpage/modules/workrelationship/workRelationshiprlzyAudit.jsp

@@ -0,0 +1,549 @@
+<%@ 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(obj == 1){
+                $('#flag').val('1');
+            }else{
+                $('#flag').val('2');
+                //驳回
+                //合同编号
+                $("#contractNum").removeClass().addClass("form-control  layui-input");
+                //合同期限
+                $("#contractLimit").removeClass().addClass("form-control  simple-select");
+                //日期
+                $("#contractStartTime").removeClass().addClass("laydate-icondate form-control  layer-date layui-input laydate-icon");
+                $("#contractEndTime").removeClass().addClass("laydate-icondate form-control  layer-date layui-input laydate-icon");
+                $("#tryEndTime").removeClass().addClass("laydate-icondate form-control  layer-date layui-input laydate-icon");
+                //办理日期
+                $("#transactTime").removeClass().addClass("laydate-icondate form-control  layer-date layui-input laydate-icon");
+                //合同类型
+                $("#contractType1").removeClass().addClass("form-control  simple-select");
+                $("#contractType2").removeClass().addClass("form-control  simple-select");
+            }
+		  if(validateForm.form()){
+                /*if(obj == 2){
+
+				}*/
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+		    var renew = $("#renew").val();
+		    var sStatus = "${workRelationship.workStaffBasicInfo.status}"
+			console.log(sStatus+"------------");
+            if(sStatus == '劳务'){
+                $("#tr1").hide()
+                $("#tr2").show()
+            }else{
+                $("#tr1").show()
+                $("#tr2").hide()
+			}
+		    if(renew == 0){
+                //续签
+                $("#tryEndTime").attr("readonly",true);
+				//合同编号
+				$("#contractNum").removeClass().addClass("form-control required layui-input");
+				//合同期限
+                $("#contractLimit").removeClass().addClass("form-control required simple-select");
+                //合同起始日期
+                $("#contractStartTime").removeClass().addClass("laydate-icondate form-control required layer-date layui-input laydate-icon");
+                //办理日期
+                $("#transactTime").removeClass().addClass("laydate-icondate form-control required layer-date layui-input laydate-icon");
+				//合同类型
+                $("#contractType1").removeClass().addClass("form-control required simple-select");
+                $("#contractType2").removeClass().addClass("form-control required simple-select");
+                if(sStatus == '试用'){
+                    $("#tryEndTime").removeClass().addClass("laydate-icondate form-control required layer-date layui-input laydate-icon");
+				}
+			}else{
+                laydate.render({
+                    elem: '#tryEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                    event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+                });
+			}
+
+			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: '#contractStartTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#contractEndTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+
+            laydate.render({
+                elem: '#transactTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                if($("#file_attachment tr").length>0){
+                    top.layer.alert('仅可以上传一个附件', {icon: 0});
+                    return;
+                }
+                $("#attachment_file").click();
+            });
+            /*$("input[name='renew']").on('ifChecked', function(event){
+                var radioVal = $(this).val();
+                console.log(radioVal+"----------radioVal");
+                if(radioVal == 1){
+                    //不续签
+                }else{
+                    //续签
+                }
+            });*/
+            if("${workRelationship.renew}" == "1"){
+                $("#renew1").iCheck('check')
+            }else{
+                $("#renew").iCheck('check')
+            }
+		});
+        function insertTitle(tValue){
+            var list = "${workRelationship.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 = "108";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workRelationship/"+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);}
+        }
+        function addRow(list, idx, workClientLinkmanTpl, row) {
+            $(list).append(Mustache.render(workClientLinkmanTpl, {
+                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).parent().parent().hide();
+                $(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");
+            }
+        }
+        function selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+            setValuee(id);
+        }
+        function setValuee(obj){
+            $('#workClientLinkmanList').html("");
+            var rId = "${workRelationship.id}";
+            //console.log(rId+"-------------");
+            $.get("${ctx}/workrelationship/workRelationship/selectStaffUser", { rId:rId,sId: obj},
+                function(data,textStatus){
+                    data = data.body.list;
+                    if(data !=null){
+                        for (var i=0; i<data.length; i++){
+                            addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                            workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                        }
+                    }
+                });
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+           // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+        function changeType(obj){
+
+            var renew = $("#renew").val();
+            if(obj == '2'){
+                //无固定期限
+                $("#contractEndTime").attr("disabled","true");
+                $("#contractEndTime").val("");
+			}else{
+                $("#contractEndTime").removeAttr("disabled");
+			}
+            //续签且固定期限
+            if(obj == '1' && renew == '0'){
+                //合同终止日期
+                $("#contractEndTime").removeClass().addClass("laydate-icondate form-control required layer-date layui-input laydate-icon");
+            }else{
+                $("#contractEndTime").removeClass().addClass("laydate-icondate form-control layer-date layui-input laydate-icon");
+            }
+		}
+        function changeClass(obj){
+            //续签,试用,劳动
+            var renew = $("#renew").val();
+            var sStatus = "${workRelationship.workStaffBasicInfo.status}"
+            if(obj == '1' && renew == '0' && sStatus == '试用'){
+                //试用期结束日期
+                $("#tryEndTime").removeClass().addClass("laydate-icondate form-control required layer-date layui-input laydate-icon");
+            }else{
+                $("#tryEndTime").removeClass().addClass("laydate-icondate form-control layer-date layui-input laydate-icon");
+            }
+        }
+
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workRelationship" action="${ctx}/workrelationship/workRelationship/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"/>
+			<input type="hidden" id="renew" value="${workRelationship.renew}">
+		<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+						<%--<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workRelationship.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workRelationship.workStaffBasicInfo.name}"
+											title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="null"  isSingle="true"></sys:gridSelectUserRship>--%>
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.name}"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.no}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workRelationship.status}">${fns:getDictLabel(workRelationship.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.status}"/>
+						<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('bidProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.idCard}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.workStaffBasicInfo.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.jobGrade}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workRelationship.pay}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workRelationship.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+						<%--input class="laydate-icondate layui-input form-control layer-date laydate-icon required"
+							   id="contractDate" name="contractDate" value="<fmt:formatDate value="${workContractInfo.contractDate}"
+							    pattern="yyyy-MM-dd"/>">--%>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row lw16">
+				<div class="form-group-label"><h2>合同详情</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">是否续签:</label>
+					<div class="layui-input-block">
+						<c:if test="${workRelationship.renew eq 0}">
+							<input  htmlEscape="false" value="续签" readonly="true" class="form-control layui-input"/>
+						</c:if>
+						<c:if test="${workRelationship.renew eq 1}">
+							<input  htmlEscape="false" value="不续签" readonly="true" class="form-control layui-input"/>
+						</c:if>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<form:input path="contractNum" htmlEscape="false" id="contractNum" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同类型:</label>
+					<div class="layui-input-block" id ="tr1" style="display:none">    <%--劳动--%>
+						<form:select path="contractType" id="contractType1" onchange="changeClass(this.value)" class="form-control simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('relsp_cType1')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+					<div class="layui-input-block" id ="tr2" style="display:block"> <%--劳务--%>
+						<form:select path="contractType" id="contractType2" class="form-control simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('relsp_cType2')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同期限:</label>
+					<div class="layui-input-block">
+						<form:select path="contractLimit" id="contractLimit" onchange="changeType(this.value)" class="form-control simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('contract_limit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同起始日期:</label>
+					<div class="layui-input-block">
+						<input id="contractStartTime" name="contractStartTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.contractStartTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同终止日期:</label>
+					<div class="layui-input-block">
+						<input id="contractEndTime" name="contractEndTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.contractEndTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">试用期结束日期:</label>
+					<div class="layui-input-block">
+						<input id="tryEndTime" name="tryEndTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.tryEndTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">办理日期:</label>
+					<div class="layui-input-block">
+						<input id="transactTime" name="transactTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRelationship.transactTime}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</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 width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+
+						<c:forEach items="${workRelationship.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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a 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">
+				<div class="form-group-label"><h2>历史关系</h2></div>
+				<%--<div class="layui-item nav-btns">
+					<a class="nav-btn nav-btn-add" onclick="addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增</a>
+				</div>--%>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable2" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>合同编号</th>
+							<th>合同类型</th>
+							<th>合同期限</th>
+							<th>合同起始日期</th>
+							<th>合同终止日期</th>
+							<th>办理日期</th>
+							<th width="160px">附件</th>
+						</tr>
+						</thead>
+						<tbody id="workClientLinkmanList">
+						<c:forEach items="${workRelationship.workRelationships}" var="buyDetails" varStatus="status">
+							<tr>
+								<td>${buyDetails.contractNum}</td>
+								<td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+								<td>${fns:getDictLabel(buyDetails.contractLimit, 'contract_limit', '')}</td>
+								<td><fmt:formatDate value="${buyDetails.contractStartTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.contractEndTime}" pattern="yyyy-MM-dd"/></td>
+								<td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>
+								<%--试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+
+									<c:forEach items="${buyDetails.workAttachments}" var = "workClientAttachment" varStatus="status">
+										<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}"></td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+									</c:forEach>
+							</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-sm12 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" />
+						<input type="file" name="upload_files" style="display: none;">
+					</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="${workRelationship.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workRelationship.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 168 - 0
src/main/webapp/webpage/modules/workrepay/workRepayAudit.jsp

@@ -0,0 +1,168 @@
+<%@ 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;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            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: '#repayDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+        function checkMoney(obj){
+            var notRepay =  ${workRepay.notRepay};
+            if(notRepay != undefined && notRepay != '' && obj > notRepay){
+                $("#money").val("");
+                parent.layer.msg("所填值大于未还款金额!请重新输入",{icon:5});
+                return;
+			}
+		}
+	</script>
+</head>
+<body>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workRepay" action="${ctx}/workrepay/workRepay/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}"/>
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款人:</label>
+					<div class="layui-input-block with-icon">
+						<div class="input-group">
+							<form:input path="workLoan.workStaffBasicInfo.name" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款编号:</label>
+					<div class="layui-input-block with-icon">
+						<div class="input-group">
+							<form:input path="workLoan.num" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">所属部门:</label>
+					<div class="layui-input-block">
+						<form:input id="officeName" path="workLoan.workStaffBasicInfo.office.name" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款日期:</label>
+					<div class="layui-input-block">
+						<input name="loanDate" type="text" readonly="true" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRepay.workLoan.loanDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款金额:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${workRepay.workLoan.money}" pattern="#,#0.00"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">还款日期:</label>
+					<div class="layui-input-block">
+						<input name="repayDate" type="text" readonly="true" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRepay.repayDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">剩余未还款:</label>
+					<div class="layui-input-block">
+						<input  id="notRepay" htmlEscape="false" readonly="true" class="form-control layui-input"
+								value="<fmt:formatNumber value="${workRepay.notRepay}" pattern="#,#0.00"/>"/>
+					</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="money" htmlEscape="false" readonly="true" class="form-control layui-input"
+								value="<fmt:formatNumber value="${workRepay.money}" pattern="#,#0.00"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">还款人:</label>
+					<div class="layui-input-block with-icon">
+						<div class="input-group">
+							<form:input path="createBy.name" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">还款状态:</label>
+					<div class="layui-input-block">
+						<input id="repayState" htmlEscape="false" readonly="true" class="form-control  layui-input"
+							   value="${fns:getDictLabel(workRepay.workLoan.repayState, 'repay_state','')}"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row lw8">
+				<div class="form-group-label"><h2>审批意见</h2></div>
+				<div class="layui-item layui-col-sm12  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" />
+						<input type="file" name="upload_files" style="display: none;">
+					</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="${workRepay.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workRepay.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 141 - 0
src/main/webapp/webpage/modules/workrepay/workRepayForm.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">
+        var validateForm;
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+				$("#inputForm").attr("action","${ctx}/workrepay/workRepay/save");
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            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: '#repayDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+        function checkMoney(obj){
+            var notRepay =  ${workRepay.notRepay};
+            if(notRepay != undefined && notRepay != '' && obj > notRepay){
+                $("#money").val("");
+                console.log(obj+"--------"+notRepay);
+                parent.layer.msg("所填值大于未还款金额!请重新输入",{icon:5});
+                return;
+			}
+		}
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workRepay" action="${ctx}/workrepay/workRepay/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="workLoan.id"/>
+			<form:hidden path="source"/>
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款人:</label>
+					<div class="layui-input-block with-icon">
+						<div class="input-group">
+							<form:input path="workLoan.workStaffBasicInfo.name" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款编号:</label>
+					<div class="layui-input-block with-icon">
+						<div class="input-group">
+							<form:input path="workLoan.num" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">所属部门:</label>
+					<div class="layui-input-block">
+						<form:input id="officeName" path="workLoan.workStaffBasicInfo.office.name" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款日期:</label>
+					<div class="layui-input-block">
+						<input name="loanDate" type="text" readonly="true" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRepay.workLoan.loanDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款金额:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${workRepay.workLoan.money}" pattern="#,#0.00"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">还款日期:</label>
+					<div class="layui-input-block">
+						<input readonly="true" name="repayDate" type="text" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRepay.repayDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">剩余未还款:</label>
+					<div class="layui-input-block">
+						<input  id="notRepay" htmlEscape="false" readonly="true" class="form-control layui-input"
+								value="<fmt:formatNumber value="${workRepay.notRepay}" pattern="#,#0.00"/>"/>
+					</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="money" path="money" onchange="checkMoney(this.value)" htmlEscape="false"  class="form-control number layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">还款人:</label>
+					<div class="layui-input-block with-icon">
+						<div class="input-group">
+							<form:input path="createBy.name" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">还款状态:</label>
+					<div class="layui-input-block">
+						<input id="repayState" htmlEscape="false" readonly="true" class="form-control  layui-input"
+							   value="${fns:getDictLabel(workRepay.workLoan.repayState, 'repay_state','')}"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 154 - 0
src/main/webapp/webpage/modules/workrepay/workRepayList.jsp

@@ -0,0 +1,154 @@
+<%@ 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="workRepay" action="${ctx}/workrepay/workRepay/" 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="workrepay:workRepay:add">
+				<table:addRow url="${ctx}/workrepay/workRepay/form" title="还款"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workrepay:workRepay:edit">
+			    <table:editRow url="${ctx}/workrepay/workRepay/form" title="还款" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workrepay:workRepay:del">
+				<table:delRow url="${ctx}/workrepay/workRepay/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workrepay:workRepay:import">
+				<table:importExcel url="${ctx}/workrepay/workRepay/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workrepay:workRepay:export">
+	       		<table:exportExcel url="${ctx}/workrepay/workRepay/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 processInstanceId">流程号</th>
+				<th  class="sort-column officeId">部门</th>
+				<th  class="sort-column companyId">公司</th>
+				<th  class="sort-column status">状态</th>
+				<th  class="sort-column workLoan">借款</th>
+				<th  class="sort-column repayDate">还款日期</th>
+				<th  class="sort-column money">还款金额</th>
+				<th  class="sort-column repayState">还款状态</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="workRepay">
+			<tr>
+				<td> <input type="checkbox" id="${workRepay.id}" class="i-checks"></td>
+				<td><a  href="#" onclick="openDialogView('查看还款', '${ctx}/workrepay/workRepay/form?id=${workRepay.id}','800px', '500px')">
+					${workRepay.remarks}
+				</a></td>
+				<td>
+					${workRepay.processInstanceId}
+				</td>
+				<td>
+					${workRepay.officeId}
+				</td>
+				<td>
+					${workRepay.companyId}
+				</td>
+				<td>
+					${workRepay.status}
+				</td>
+				<td>
+					${workRepay.workLoan}
+				</td>
+				<td>
+					<fmt:formatDate value="${workRepay.repayDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					${workRepay.money}
+				</td>
+				<td>
+					${workRepay.repayState}
+				</td>
+				<td>
+					<shiro:hasPermission name="workrepay:workRepay:view">
+						<a href="#" onclick="openDialogView('查看还款', '${ctx}/workrepay/workRepay/form?id=${workRepay.id}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="workrepay:workRepay:edit">
+    					<a href="#" onclick="openDialog('修改还款', '${ctx}/workrepay/workRepay/form?id=${workRepay.id}','800px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+    				<shiro:hasPermission name="workrepay:workRepay:del">
+						<a href="${ctx}/workrepay/workRepay/delete?id=${workRepay.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>

+ 151 - 0
src/main/webapp/webpage/modules/workrepay/workRepayView.jsp

@@ -0,0 +1,151 @@
+<%@ 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()){
+                if(obj == 1){
+                    $('#flag').val('yes');
+                }else{
+                    $('#flag').val('no');
+                }
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            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: '#repayDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+        function checkMoney(obj){
+            var notRepay =  ${workRepay.notRepay};
+            if(notRepay != undefined && notRepay != '' && obj > notRepay){
+                $("#money").val("");
+                parent.layer.msg("所填值大于未还款金额!请重新输入",{icon:5});
+                return;
+			}
+		}
+	</script>
+</head>
+<body>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workRepay" action="${ctx}/workrepay/workRepay/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}"/>
+			<div class="form-group layui-row first lw8">
+				<div class="form-group-label"><h2>基础信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款人:</label>
+					<div class="layui-input-block with-icon">
+						<div class="input-group">
+							<form:input path="workLoan.workStaffBasicInfo.name" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款编号:</label>
+					<div class="layui-input-block with-icon">
+						<div class="input-group">
+							<form:input path="workLoan.num" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">所属部门:</label>
+					<div class="layui-input-block">
+						<form:input id="officeName" path="workLoan.workStaffBasicInfo.office.name" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款日期:</label>
+					<div class="layui-input-block">
+						<input name="loanDate" type="text" readonly="true" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRepay.workLoan.loanDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">借款金额:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${workRepay.workLoan.money}" pattern="#,#0.00"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">还款日期:</label>
+					<div class="layui-input-block">
+						<input name="repayDate" type="text" readonly="true" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workRepay.repayDate}" pattern="yyyy-MM-dd"/>"/>
+						</input>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">剩余未还款:</label>
+					<div class="layui-input-block">
+						<input  id="notRepay" htmlEscape="false" readonly="true" class="form-control layui-input"
+								value="<fmt:formatNumber value="${workRepay.notRepay}" pattern="#,#0.00"/>"/>
+					</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="money" htmlEscape="false" readonly="true" class="form-control layui-input"
+								value="<fmt:formatNumber value="${workRepay.money}" pattern="#,#0.00"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">还款人:</label>
+					<div class="layui-input-block with-icon">
+						<div class="input-group">
+							<form:input path="createBy.name" htmlEscape="false"   readonly="true" class="form-control layui-input"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">还款状态:</label>
+					<div class="layui-input-block">
+						<input id="repayState" htmlEscape="false" readonly="true" class="form-control  layui-input"
+							   value="${fns:getDictLabel(workRepay.workLoan.repayState, 'repay_state','')}"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 195 - 0
src/main/webapp/webpage/modules/workresignation/workResignationAudit.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">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(obj == 1){
+                $('#flag').val('yes');
+            }else{
+                $('#flag').val('no');
+            }
+		  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: '#date', //目标元素。由于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 selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+            // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workResignation" action="${ctx}/workresignation/workResignation/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}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.name}"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.no}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workResignation.status}">${fns:getDictLabel(workResignation.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.status}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.idCard}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.jobGrade}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.pay}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="entryDate" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+					</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  htmlEscape="false" value="${fns:getDictLabel(workResignation.type, 'resignation_type', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">离职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.date}" pattern="yyyy年MM月dd日"/>"/>
+					</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  htmlEscape="false" value="${fns:getMainDictLabel(workResignation.reason, 'resignation_reason', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">考勤截止日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.endDate}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>审批意见</h2></div>
+				<div class="layui-item layui-col-sm12 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" />
+						<input type="file" name="upload_files" style="display: none;">
+					</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="${workResignation.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workResignation.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 244 - 0
src/main/webapp/webpage/modules/workresignation/workResignationAudits.jsp

@@ -0,0 +1,244 @@
+<%@ 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(obj == 1){
+                $('#flag').val('yes');
+            }else{
+                $('#flag').val('no');
+            }
+		  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: '#date', //目标元素。由于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 selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+            // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workResignation" action="${ctx}/workresignation/workResignation/saveAudits" 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}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.name}"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.no}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workResignation.status}">${fns:getDictLabel(workResignation.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.status}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.idCard}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.jobGrade}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.pay}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="entryDate" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+					</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  htmlEscape="false" value="${fns:getDictLabel(workResignation.type, 'resignation_type', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">离职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.date}" pattern="yyyy年MM月dd日"/>"/>
+					</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  htmlEscape="false" value="${fns:getMainDictLabel(workResignation.reason, 'resignation_reason', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">考勤截止日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"   readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.endDate}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row first lw16">
+				<div class="form-group-label"><h2>离职审核</h2></div>
+				<div class="layui-input-block">
+					<table id="bankinfo5" class="table table-bordered table-condensed can-edit">
+						<thead>
+						<tr>
+							<th width="">审核部门</th>
+							<th >审核人</th>
+							<th >审核项目</th>
+							<th width="130px"><span class="require-item">*</span>是否通过</th>
+						</tr>
+						</thead>
+						<tbody id="templateList">
+						<c:if test="${not empty workResignation.templateList}">
+							<c:forEach items="${workResignation.templateList}" var="workResignationTemplate" varStatus="index">
+								<tr id="templateList${index.index}">
+									<td class="hide">
+										<input id="templateList${index.index}_id" name="templateList[${index.index}].id" type="hidden" value="${workResignationTemplate.id}"/>
+										<input id="templateList${index.index}_delFlag" name="templateList[${index.index}].delFlag" type="hidden" value="0"/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_officeName" name="templateList[${index.index}].officeName" type="text" value="${workResignationTemplate.officeName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_officeId" name="templateList[${index.index}].officeId" type="hidden" value="${workResignationTemplate.officeId}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_userName" name="templateList[${index.index}].userName" type="text" value="${workResignationTemplate.userName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_auditor" name="templateList[${index.index}].auditor" type="hidden" value="${workResignationTemplate.auditor}" readonly="true" class="form-control "/>
+									</td>
+									<td title="${workResignationTemplate.comment}">
+										<input id="templateList${index.index}_comment" name="templateList[${index.index}].comment" type="text" value="${workResignationTemplate.comment}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<c:choose>
+											<c:when test="${workResignationTemplate.auditor == fns:getUser().id}">
+												<form:select id="templateList${index.index}_status" path="templateList[${index.index}].status" class="form-control required">
+													<form:option value="" label="请选择"/>
+													<form:options items="${fns:getDictList('resignation_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+												</form:select>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${empty workResignationTemplate.status}">
+														<input  type="text" value="未审核" readonly="true" class="form-control "/>
+													</c:when>
+													<c:otherwise>
+														<input type="text" value="${fns:getDictLabel(workResignationTemplate.status, 'resignation_status', '')}" readonly="true" class="form-control "/>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+
+									</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 layui-col-xs12 form-table-container" >
+					<act:flowChart procInsId="${workResignation.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workResignation.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 225 - 0
src/main/webapp/webpage/modules/workresignation/workResignationForm.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"/>
+	<style>
+		label.error{
+			top:40px;
+			left:0;
+		}
+	</style>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(obj == 2){
+                $("#inputForm").attr("action","${ctx}/workresignation/workResignation/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workresignation/workResignation/save");
+            }
+		  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: '#date', //目标元素。由于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 selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+            // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workResignation" action="${ctx}/workresignation/workResignation/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="home"/>
+			<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+							<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workResignation.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workResignation.workStaffBasicInfo.name}"
+													 title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="2"  isSingle="true"></sys:gridSelectUserRship>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="sNo" path="workStaffBasicInfo.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 workResignation.status}">${fns:getDictLabel(workResignation.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<form:input id="sStatus" path="workStaffBasicInfo.status" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+							<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('bidProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<form:input id="sIdCard" path="workStaffBasicInfo.idCard" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<form:input id="sOffice" path="workStaffBasicInfo.office.name" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<form:input id="sJobGrade" path="jobGrade" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<form:input id="baseSalary" path="pay" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="entryDate" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+					</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="type" id="type" class="form-control required simple-select">
+							<form:options items="${fns:getDictList('resignation_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">离职日期:</label>
+					<div class="layui-input-block">
+						<input id="date" name="date" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workResignation.date}" pattern="yyyy-MM-dd"/>"/>
+					</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="reason" id="reason" class="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getMainDictList('resignation_reason')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">考勤截止日期:</label>
+					<div class="layui-input-block">
+						<input id="endDate" name="endDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workResignation.endDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row first lw16">
+				<div class="form-group-label"><h2>离职审核</h2></div>
+				<div class="layui-input-block">
+					<table id="bankinfo5" class="table table-bordered table-condensed can-edit">
+						<thead>
+						<tr>
+							<th width="">审核部门</th>
+							<th width="">审核人</th>
+							<th >审核项目</th>
+						</tr>
+						</thead>
+						<tbody id="templateList">
+						<c:if test="${not empty workResignation.templateList}">
+							<c:forEach items="${workResignation.templateList}" var="workResignationTemplate" varStatus="index">
+								<tr id="templateList${index.index}">
+									<td class="hide">
+										<input id="templateList${index.index}_id" name="templateList[${index.index}].id" type="hidden" value="${workResignationTemplate.id}"/>
+										<input id="templateList${index.index}_delFlag" name="templateList[${index.index}].delFlag" type="hidden" value="0"/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_officeName" name="templateList[${index.index}].officeName" type="text" value="${workResignationTemplate.officeName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_officeId" name="templateList[${index.index}].officeId" type="hidden" value="${workResignationTemplate.officeId}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_userName" name="templateList[${index.index}].userName" type="text" value="${workResignationTemplate.userName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_auditor" name="templateList[${index.index}].auditor" type="hidden" value="${workResignationTemplate.auditor}" readonly="true" class="form-control "/>
+									</td>
+									<td title="${workResignationTemplate.comment}">
+										<input id="templateList${index.index}_comment" name="templateList[${index.index}].comment" type="text" value="${workResignationTemplate.comment}" readonly="true" class="form-control "/>
+									</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>

+ 229 - 0
src/main/webapp/webpage/modules/workresignation/workResignationForms.jsp

@@ -0,0 +1,229 @@
+<%@ 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;
+		}
+	</style>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(obj == 2){
+                $("#inputForm").attr("action","${ctx}/workresignations/workResignations/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workresignations/workResignations/save");
+            }
+		  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: '#date', //目标元素。由于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 selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+            // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workResignation" action="${ctx}/workresignations/workResignations/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="home"/>
+			<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+							<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workResignation.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workResignation.workStaffBasicInfo.name}"
+													 title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="3"  isSingle="true"></sys:gridSelectUserRship>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="sNo" path="workStaffBasicInfo.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 workResignation.status}">${fns:getDictLabel(workResignation.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<form:input id="sStatus" path="workStaffBasicInfo.status" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+							<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getMainDictList('contract_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<form:input id="sIdCard" path="workStaffBasicInfo.idCard" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<form:input id="sOffice" path="workStaffBasicInfo.office.name" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<form:input id="sJobGrade" path="jobGrade" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<form:input id="baseSalary" path="pay" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="entryDate" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+					</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="type" id="type" class="form-control required simple-select">
+							<form:options items="${fns:getDictList('resignation_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">离职日期:</label>
+					<div class="layui-input-block">
+						<input id="date" name="date" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workResignation.date}" pattern="yyyy-MM-dd"/>"/>
+					</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="reason" id="reason" class="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getMainDictList('resignation_reason')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">考勤截止日期:</label>
+					<div class="layui-input-block">
+						<input id="endDate" name="endDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workResignation.endDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row first lw16">
+				<div class="form-group-label"><h2>离职审核</h2></div>
+				<div class="layui-input-block">
+					<table id="bankinfo5" class="table table-bordered table-condensed can-edit">
+						<thead>
+						<tr>
+							<th width="">审核部门</th>
+							<th width="">审核人</th>
+							<th >审核项目</th>
+						</tr>
+						</thead>
+						<tbody id="templateList">
+						<c:if test="${not empty workResignation.templateList}">
+							<c:forEach items="${workResignation.templateList}" var="workResignationTemplate" varStatus="index">
+								<tr id="templateList${index.index}">
+									<td class="hide">
+										<input id="templateList${index.index}_id" name="templateList[${index.index}].id" type="hidden" value="${workResignationTemplate.id}"/>
+										<input id="templateList${index.index}_delFlag" name="templateList[${index.index}].delFlag" type="hidden" value="0"/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_officeName" name="templateList[${index.index}].officeName" type="text" value="${workResignationTemplate.officeName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_officeId" name="templateList[${index.index}].officeId" type="hidden" value="${workResignationTemplate.officeId}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_userName" name="templateList[${index.index}].userName" type="text" value="${workResignationTemplate.userName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_auditor" name="templateList[${index.index}].auditor" type="hidden" value="${workResignationTemplate.auditor}" readonly="true" class="form-control "/>
+									</td>
+									<td title="${workResignationTemplate.comment}">
+										<input id="templateList${index.index}_comment" name="templateList[${index.index}].comment" type="text" value="${workResignationTemplate.comment}" readonly="true" class="form-control "/>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<%--<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>--%>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 394 - 0
src/main/webapp/webpage/modules/workresignation/workResignationList.jsp

@@ -0,0 +1,394 @@
+<%@ 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(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: '#beginContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#endContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#beginContractDates', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#endContractDates', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+		});
+        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: false, //开启最大化最小化按钮
+                skin: 'three-btns',
+                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
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+        }
+        function openDialogreplay(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: false, //开启最大化最小化按钮
+                skin: 'two-btns',
+                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
+                    }
+
+                },
+                cancel: function(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%;
+		}
+	</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="workResignation" action="${ctx}/workresignation/workResignation/" 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 lw8">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">姓名:</label>
+							<div class="layui-input-block">
+								<form:input id="" path="workStaffBasicInfo.name" htmlEscape="false" class="form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">离职日期:</label>
+							<div class="layui-input-block">
+								<input id="beginContractDate" name="beginContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workResignation.beginContractDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endContractDate" name="endContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workResignation.endContractDate}" 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" class="lw8" style="clear:both;display:none;">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">考勤截止日期:</label>
+							<div class="layui-input-block">
+								<input id="beginContractDates" name="beginContractDates" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workResignation.beginContractDates}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endContractDates" name="endContractDates" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workResignation.endContractDates}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">工号:</label>
+							<div class="layui-input-block">
+								<form:input path="workStaffBasicInfo.no" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">身份证号码:</label>
+							<div class="layui-input-block">
+								<form:input path="workStaffBasicInfo.idCard" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">职级:</label>
+							<div class="layui-input-block">
+								<form:input path="jobGrade" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">员工状态:</label>
+							<div class="layui-input-block">
+								<form:input path="workStaffBasicInfo.status" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+
+						<div class="layui-item query athird">
+							<label class="layui-form-label">部门:</label>
+							<div class="layui-input-block">
+								<form:input path="workStaffBasicInfo.office.name" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">离职类型:</label>
+							<div class="layui-input-block">
+								<form:select path="type"  class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('resignation_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+							<div style="clear:both;"></div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">离职原因:</label>
+							<div class="layui-input-block">
+								<form:select path="reason"  class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getMainDictList('resignation_reason')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+							<div style="clear:both;"></div>
+						</div>
+						<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('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+							<div style="clear:both;"></div>
+						</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="workresignation:workResignation:add">
+						<button class="nav-btn nav-btn-add" title="离职申请" onclick="openDialogre('离职申请','${ctx}/workresignation/workResignation/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>
+					</shiro:hasPermission>
+						<shiro:hasPermission name="workresignation:workResignation:export">
+							<table:exportExcel url="${ctx}/workresignation/workResignation/export"></table:exportExcel><!-- 导出按钮 -->
+						</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: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'no',align:'center', title: '工号',width:160,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看离职申请', '${ctx}/workresignation/workResignation/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.no + ">" + d.no + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'sName',align:'center', title: '姓名',width:160,templet:function(d){
+                    return "<span title='"+ d.sName +"'>" + d.sName + "</span>";
+                }}
+                ,{field:'sStatus',align:'center', title: '员工状态',width:160,templet:function(d){
+                    return "<span title='"+ d.sStatus +"'>" + d.sStatus + "</span>";
+                }}
+                ,{field:'sIdCard',align:'center', title: '身份证号码',width:160,templet:function(d){
+                    return "<span title='"+ d.sIdCard +"'>" + d.sIdCard + "</span>";
+                }}
+                ,{field:'sOffice',align:'center', title: '部门',width:160,templet:function(d){
+                    return "<span title='"+ d.sOffice +"'>" + d.sOffice + "</span>";
+                }}
+                ,{field:'jobGrade', align:'center',title: '职级',width:160,templet:function(d){
+                    return "<span title='"+ d.jobGrade +"'>" + d.jobGrade + "</span>";
+                }}
+                ,{field:'type', align:'center',title: '离职类型',width:160,templet:function(d){
+                    return "<span title='"+ d.type +"'>" + d.type + "</span>";
+                }}
+                ,{field:'date',align:'center', title: '离职日期', width:160}
+                ,{field:'endDate',align:'center', title: '考勤截止日期', width:160}
+                ,{field:'reason',align:'center', title: '离职原因', width:160}
+                ,{field:'status',align:'center', title: '状态', width:160,templet:function(d){
+                    <%--var st = getAuditState(d.status);--%>
+                    <%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractrecord/workContractRecord/getProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
+                    <%--return xml;--%>
+                    var st = getAuditState(d.status);
+                    if(st.action)
+                        var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workresignation/workResignation/getProcessOne?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;
+                }}
+                // ,{fixed: 'right',align:'center', toolbar: '#op',title:"操作"}
+                ,{field:'op',align:'center',title:"操作",width:160,templet:function(d){
+                    ////对操作进行初始化
+                    var xml = "";
+                    if(d.cancancel != undefined && d.cancancel == "1")
+                        xml += "<a href=\"${ctx}/workresignation/workResignation/cancelInvalidate?id=" + d.id + "\" 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=\"openDialogre('修改离职申请', '${ctx}/workresignation/workResignation/form?id="+ d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit2 != undefined && d.canedit2 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('修改离职申请', '${ctx}/workresignation/workResignation/form?id="+ d.id + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit3 != undefined && d.canedit3 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请离职申请', '${ctx}/workresignation/workResignation/form?id=" + d.id + "&tabId=4','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}/workresignation/workResignation/delete?id=" + d.id + "\" 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="workResignation" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workResignation.id}"
+                    ,"no":"${workResignation.workStaffBasicInfo.no}"
+                    ,"sName":"${workResignation.workStaffBasicInfo.name}"
+                    ,"sStatus":"${workResignation.workStaffBasicInfo.status}"
+                    ,"sIdCard":"${workResignation.workStaffBasicInfo.idCard}"
+                    ,"sOffice":"${workResignation.workStaffBasicInfo.office.name}"
+                    ,"jobGrade":"${workResignation.jobGrade}"
+                    ,"type":"${fns:getDictLabel(workResignation.type, 'resignation_type', '')}"
+                    ,"date":"<fmt:formatDate value="${workResignation.date}" pattern="yyyy-MM-dd"/>"
+                    ,"endDate":"<fmt:formatDate value="${workResignation.endDate}" pattern="yyyy-MM-dd"/>"
+                    ,"reason":"${fns:getMainDictLabel(workResignation.reason, 'resignation_reason', '')}"
+                    ,"status":"${workResignation.status}"
+                    <c:if test="${fns:getUser().id == workResignation.createBy.id}">
+                    <c:if test="${workResignation.status == '2' }">,"cancancel":"1"</c:if>
+                    <shiro:hasPermission name="workresignation:workResignation:edit"><c:choose>
+                    <c:when test="${workResignation.status == '1' }">,"canedit1":"1"</c:when>
+                    <c:when test="${workResignation.status == '4'}">,"canedit2":"1"</c:when>
+                    <c:when test="${workResignation.status == '3'}">,"canedit3":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="workresignation:workResignation:del"><c:choose>
+                    <c:when test="${(workResignation.status == '1' or workResignation.status == '3' or workResignation.status == '4')}">,"candelete":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 394 - 0
src/main/webapp/webpage/modules/workresignation/workResignationLists.jsp

@@ -0,0 +1,394 @@
+<%@ 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(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: '#beginContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#endContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#beginContractDates', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+            laydate.render({
+                elem: '#endContractDates', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+
+		});
+        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: false, //开启最大化最小化按钮
+                skin: 'three-btns',
+                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
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+        }
+        function openDialogreplay(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: false, //开启最大化最小化按钮
+                skin: 'two-btns',
+                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
+                    }
+
+                },
+                cancel: function(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%;
+		}
+	</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="workResignation" action="${ctx}/workresignations/workResignations/" 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 lw8">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">姓名:</label>
+							<div class="layui-input-block">
+								<form:input id="" path="workStaffBasicInfo.name" htmlEscape="false" class="form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">离职日期:</label>
+							<div class="layui-input-block">
+								<input id="beginContractDate" name="beginContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workResignation.beginContractDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endContractDate" name="endContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workResignation.endContractDate}" 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" class="lw8" style="clear:both;display:none;">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">考勤截止日期:</label>
+							<div class="layui-input-block">
+								<input id="beginContractDates" name="beginContractDates" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workResignation.beginContractDates}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endContractDates" name="endContractDates" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workResignation.endContractDates}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">工号:</label>
+							<div class="layui-input-block">
+								<form:input path="workStaffBasicInfo.no" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">身份证号码:</label>
+							<div class="layui-input-block">
+								<form:input path="workStaffBasicInfo.idCard" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">职级:</label>
+							<div class="layui-input-block">
+								<form:input path="jobGrade" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">员工状态:</label>
+							<div class="layui-input-block">
+								<form:input path="workStaffBasicInfo.status" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+
+						<div class="layui-item query athird">
+							<label class="layui-form-label">部门:</label>
+							<div class="layui-input-block">
+								<form:input path="workStaffBasicInfo.office.name" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">离职类型:</label>
+							<div class="layui-input-block">
+								<form:select path="type"  class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('resignation_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+							<div style="clear:both;"></div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">离职原因:</label>
+							<div class="layui-input-block">
+								<form:select path="reason"  class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getMainDictList('resignation_reason')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+							<div style="clear:both;"></div>
+						</div>
+						<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('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+							<div style="clear:both;"></div>
+						</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="workresignation:workResignation:add">
+						<button class="nav-btn nav-btn-add" title="离职申请" onclick="openDialogre('离职申请','${ctx}/workresignations/workResignations/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>
+					</shiro:hasPermission>
+						<shiro:hasPermission name="workresignation:workResignation:export">
+							<table:exportExcel url="${ctx}/workresignations/workResignations/export"></table:exportExcel><!-- 导出按钮 -->
+						</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: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'no',align:'center', title: '工号',width:160,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看离职申请', '${ctx}/workresignations/workResignations/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.no + ">" + d.no + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'sName',align:'center', title: '姓名',width:160,templet:function(d){
+                    return "<span title='"+ d.sName +"'>" + d.sName + "</span>";
+                }}
+                ,{field:'sStatus',align:'center', title: '员工状态',width:160,templet:function(d){
+                    return "<span title='"+ d.sStatus +"'>" + d.sStatus + "</span>";
+                }}
+                ,{field:'sIdCard',align:'center', title: '身份证号码',width:160,templet:function(d){
+                    return "<span title='"+ d.sIdCard +"'>" + d.sIdCard + "</span>";
+                }}
+                ,{field:'sOffice',align:'center', title: '部门',width:160,templet:function(d){
+                    return "<span title='"+ d.sOffice +"'>" + d.sOffice + "</span>";
+                }}
+                ,{field:'jobGrade', align:'center',title: '职级',width:160,templet:function(d){
+                    return "<span title='"+ d.jobGrade +"'>" + d.jobGrade + "</span>";
+                }}
+                ,{field:'type', align:'center',title: '离职类型',width:160,templet:function(d){
+                    return "<span title='"+ d.type +"'>" + d.type + "</span>";
+                }}
+                ,{field:'date',align:'center', title: '离职日期', width:160}
+                ,{field:'endDate',align:'center', title: '考勤截止日期', width:160}
+                ,{field:'reason',align:'center', title: '离职原因', width:160}
+                ,{field:'status',align:'center', title: '状态', width:160,templet:function(d){
+                    <%--var st = getAuditState(d.status);--%>
+                    <%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractrecord/workContractRecord/getProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
+                    <%--return xml;--%>
+                    var st = getAuditState(d.status);
+                    if(st.action)
+                        var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workresignations/workResignations/getProcessOne?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;
+                }}
+                // ,{fixed: 'right',align:'center', toolbar: '#op',title:"操作"}
+                ,{field:'op',align:'center',title:"操作",width:160,templet:function(d){
+                    ////对操作进行初始化
+                    var xml = "";
+                    if(d.cancancel != undefined && d.cancancel == "1")
+                        xml += "<a href=\"${ctx}/workresignations/workResignations/cancelInvalidate?id=" + d.id + "\" 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=\"openDialogre('修改离职申请', '${ctx}/workresignations/workResignations/form?id="+ d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit2 != undefined && d.canedit2 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('修改离职申请', '${ctx}/workresignations/workResignations/form?id="+ d.id + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                    if(d.canedit3 != undefined && d.canedit3 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请离职申请', '${ctx}/workresignations/workResignations/form?id=" + d.id + "&tabId=4','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}/workresignations/workResignations/delete?id=" + d.id + "\" 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="workResignation" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workResignation.id}"
+                    ,"no":"${workResignation.workStaffBasicInfo.no}"
+                    ,"sName":"${workResignation.workStaffBasicInfo.name}"
+                    ,"sStatus":"${workResignation.workStaffBasicInfo.status}"
+                    ,"sIdCard":"${workResignation.workStaffBasicInfo.idCard}"
+                    ,"sOffice":"${workResignation.workStaffBasicInfo.office.name}"
+                    ,"jobGrade":"${workResignation.jobGrade}"
+                    ,"type":"${fns:getDictLabel(workResignation.type, 'resignation_type', '')}"
+                    ,"date":"<fmt:formatDate value="${workResignation.date}" pattern="yyyy-MM-dd"/>"
+                    ,"endDate":"<fmt:formatDate value="${workResignation.endDate}" pattern="yyyy-MM-dd"/>"
+                    ,"reason":"${fns:getMainDictLabel(workResignation.reason, 'resignation_reason', '')}"
+                    ,"status":"${workResignation.status}"
+                    <c:if test="${fns:getUser().id == workResignation.createBy.id}">
+                    <c:if test="${workResignation.status == '2' }">,"cancancel":"1"</c:if>
+                    <shiro:hasPermission name="workresignation:workResignation:edit"><c:choose>
+                    <c:when test="${workResignation.status == '1' }">,"canedit1":"1"</c:when>
+                    <c:when test="${workResignation.status == '4'}">,"canedit2":"1"</c:when>
+                    <c:when test="${workResignation.status == '3'}">,"canedit3":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="workresignation:workResignation:del"><c:choose>
+                    <c:when test="${(workResignation.status == '1' or workResignation.status == '3' or workResignation.status == '4')}">,"candelete":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 225 - 0
src/main/webapp/webpage/modules/workresignation/workResignationModify.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"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(obj == 2){
+                $("#flag").val("no");
+            }else{
+                $("#flag").val("yes");
+            }
+		  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: '#date', //目标元素。由于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 selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+            // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workResignation" action="${ctx}/workresignation/workResignation/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}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+							<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workResignation.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workResignation.workStaffBasicInfo.name}"
+													 title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="2"  isSingle="true"></sys:gridSelectUserRship>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="sNo" path="workStaffBasicInfo.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 workResignation.status}">${fns:getDictLabel(workResignation.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<form:input id="sStatus" path="workStaffBasicInfo.status" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+							<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('bidProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<form:input id="sIdCard" path="workStaffBasicInfo.idCard" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<form:input id="sOffice" path="workStaffBasicInfo.office.name" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<form:input id="sJobGrade" path="jobGrade" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<form:input id="baseSalary" path="pay" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="entryDate" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+					</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="type" id="type" class="form-control required simple-select">
+							<form:options items="${fns:getDictList('resignation_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">离职日期:</label>
+					<div class="layui-input-block">
+						<input id="date" name="date" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workResignation.date}" pattern="yyyy-MM-dd"/>"/>
+					</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="reason" id="reason" class="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getMainDictList('resignation_reason')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">考勤截止日期:</label>
+					<div class="layui-input-block">
+						<input id="endDate" name="endDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workResignation.endDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row first lw16">
+				<div class="form-group-label"><h2>离职审核</h2></div>
+				<div class="layui-input-block">
+					<table id="bankinfo5" class="table table-bordered table-condensed can-edit">
+						<thead>
+						<tr>
+							<th width="">审核部门</th>
+							<th width="">审核人</th>
+							<th >审核项目</th>
+						</tr>
+						</thead>
+						<tbody id="templateList">
+						<c:if test="${not empty workResignation.templateList}">
+							<c:forEach items="${workResignation.templateList}" var="workResignationTemplate" varStatus="index">
+								<tr id="templateList${index.index}">
+									<td class="hide">
+										<input id="templateList${index.index}_id" name="templateList[${index.index}].id" type="hidden" value="${workResignationTemplate.id}"/>
+										<input id="templateList${index.index}_delFlag" name="templateList[${index.index}].delFlag" type="hidden" value="0"/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_officeName" name="templateList[${index.index}].officeName" type="text" value="${workResignationTemplate.officeName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_officeId" name="templateList[${index.index}].officeId" type="hidden" value="${workResignationTemplate.officeId}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_userName" name="templateList[${index.index}].userName" type="text" value="${workResignationTemplate.userName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_auditor" name="templateList[${index.index}].auditor" type="hidden" value="${workResignationTemplate.auditor}" readonly="true" class="form-control "/>
+									</td>
+									<td title="${workResignationTemplate.comment}">
+										<input id="templateList${index.index}_comment" name="templateList[${index.index}].comment" type="text" value="${workResignationTemplate.comment}" readonly="true" class="form-control "/>
+									</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>

+ 224 - 0
src/main/webapp/webpage/modules/workresignation/workResignationModifys.jsp

@@ -0,0 +1,224 @@
+<%@ 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(obj == 2){
+                $("#flag").val("no");
+            }else{
+                $("#flag").val("yes");
+            }
+		  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: '#date', //目标元素。由于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 selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+            // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workResignation" action="${ctx}/workresignations/workResignations/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}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+							<sys:gridSelectUserRship id="sId" name="workStaffBasicInfo.id" value="${workResignation.workStaffBasicInfo.id}" labelName="workStaffBasicInfo.name" labelValue="${workResignation.workStaffBasicInfo.name}"
+													 title="用户" url="${ctx}/sys/office/gridSelectUser" cssClass="form-control required layui-input" isAll="true" type="2"  isSingle="true"></sys:gridSelectUserRship>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="sNo" path="workStaffBasicInfo.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 workResignation.status}">${fns:getDictLabel(workResignation.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<form:input id="sStatus" path="workStaffBasicInfo.status" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+							<%--<form:select path="projectType" class="form-control required simple-select"  onChange="changeTypeExplain(this)">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('bidProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<form:input id="sIdCard" path="workStaffBasicInfo.idCard" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<form:input id="sOffice" path="workStaffBasicInfo.office.name" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<form:input id="sJobGrade" path="jobGrade" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<form:input id="baseSalary" path="pay" htmlEscape="false" readonly="true"   class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="entryDate" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+					</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="type" id="type" class="form-control required simple-select">
+							<form:options items="${fns:getDictList('resignation_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">离职日期:</label>
+					<div class="layui-input-block">
+						<input id="date" name="date" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workResignation.date}" pattern="yyyy-MM-dd"/>"/>
+					</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="reason" id="reason" class="form-control required simple-select">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getMainDictList('resignation_reason')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">考勤截止日期:</label>
+					<div class="layui-input-block">
+						<input id="endDate" name="endDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workResignation.endDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row first lw16">
+				<div class="form-group-label"><h2>离职审核</h2></div>
+				<div class="layui-input-block">
+					<table id="bankinfo5" class="table table-bordered table-condensed can-edit">
+						<thead>
+						<tr>
+							<th width="">审核部门</th>
+							<th width="">审核人</th>
+							<th >审核项目</th>
+						</tr>
+						</thead>
+						<tbody id="templateList">
+						<c:if test="${not empty workResignation.templateList}">
+							<c:forEach items="${workResignation.templateList}" var="workResignationTemplate" varStatus="index">
+								<tr id="templateList${index.index}">
+									<td class="hide">
+										<input id="templateList${index.index}_id" name="templateList[${index.index}].id" type="hidden" value="${workResignationTemplate.id}"/>
+										<input id="templateList${index.index}_delFlag" name="templateList[${index.index}].delFlag" type="hidden" value="0"/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_officeName" name="templateList[${index.index}].officeName" type="text" value="${workResignationTemplate.officeName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_officeId" name="templateList[${index.index}].officeId" type="hidden" value="${workResignationTemplate.officeId}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_userName" name="templateList[${index.index}].userName" type="text" value="${workResignationTemplate.userName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_auditor" name="templateList[${index.index}].auditor" type="hidden" value="${workResignationTemplate.auditor}" readonly="true" class="form-control "/>
+									</td>
+									<td title="${workResignationTemplate.comment}">
+										<input id="templateList${index.index}_comment" name="templateList[${index.index}].comment" type="text" value="${workResignationTemplate.comment}" readonly="true" class="form-control "/>
+									</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>

+ 218 - 0
src/main/webapp/webpage/modules/workresignation/workResignationView.jsp

@@ -0,0 +1,218 @@
+<%@ 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(obj == 2){
+                $("#inputForm").attr("action","${ctx}/workresignation/workResignation/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workresignation/workResignation/save");
+            }
+		  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: '#date', //目标元素。由于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 selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+            // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workResignation" action="${ctx}/workresignation/workResignation/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.name}"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.no}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workResignation.status}">${fns:getDictLabel(workResignation.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.status}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.idCard}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.jobGrade}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.pay}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="entryDate" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+					</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  htmlEscape="false" value="${fns:getDictLabel(workResignation.type, 'resignation_type', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">离职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.date}" pattern="yyyy年MM月dd日"/>"/>
+					</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  htmlEscape="false" value="${fns:getMainDictLabel(workResignation.reason, 'resignation_reason', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">考勤截止日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.endDate}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row first lw16">
+				<div class="form-group-label"><h2>离职审核</h2></div>
+				<div class="layui-input-block">
+					<table id="bankinfo5" class="table table-bordered table-condensed can-edit">
+						<thead>
+						<tr>
+							<th width="">审核部门</th>
+							<th width="">审核人</th>
+							<th >审核项目</th>
+							<th >是否通过</th>
+						</tr>
+						</thead>
+						<tbody id="templateList">
+						<c:if test="${not empty workResignation.templateList}">
+							<c:forEach items="${workResignation.templateList}" var="workResignationTemplate" varStatus="index">
+								<tr id="templateList${index.index}">
+									<td class="hide">
+										<input id="templateList${index.index}_id" name="templateList[${index.index}].id" type="hidden" value="${workResignationTemplate.id}"/>
+										<input id="templateList${index.index}_delFlag" name="templateList[${index.index}].delFlag" type="hidden" value="0"/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_officeName" name="templateList[${index.index}].officeName" type="text" value="${workResignationTemplate.officeName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_officeId" name="templateList[${index.index}].officeId" type="hidden" value="${workResignationTemplate.officeId}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_userName" name="templateList[${index.index}].userName" type="text" value="${workResignationTemplate.userName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_auditor" name="templateList[${index.index}].auditor" type="hidden" value="${workResignationTemplate.auditor}" readonly="true" class="form-control "/>
+									</td>
+									<td title="${workResignationTemplate.comment}">
+										<input id="templateList${index.index}_comment" name="templateList[${index.index}].comment" type="text" value="${workResignationTemplate.comment}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<c:choose>
+											<c:when test="${empty workResignationTemplate.status}">
+												<input id="templateList${index.index}_status" name="templateList[${index.index}].status" type="text" value="未审核" readonly="true" class="form-control "/>
+											</c:when>
+											<c:otherwise>
+												<input id="templateList${index.index}_status" name="templateList[${index.index}].status" type="text" value="${fns:getDictLabel(workResignationTemplate.status, 'resignation_status', '')}" readonly="true" class="form-control "/>
+											</c:otherwise>
+										</c:choose>
+									</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>

+ 255 - 0
src/main/webapp/webpage/modules/workresignation/workResignationrlzyAudit.jsp

@@ -0,0 +1,255 @@
+<%@ 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(obj == 1){
+                $('#flag').val('yes');
+            }else{
+                $('#flag').val('no');
+            }
+		  if(validateForm.form()){
+
+              var size = $("#templateList tr").length;
+              for (var i = 0;i<size;i++){
+                  var _status = $("#templateList"+i+"_status").val();
+				  if(_status == '未审核'){
+                      top.layer.alert('各级审核部门未审核完毕,请等待!', {icon: 0});
+                      return;
+				  }
+              }
+			  $("#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: '#date', //目标元素。由于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 selectUserInfo(id) {
+            $.ajax({
+                type:'post',
+                data:{
+                    "id":id
+                },
+                url:'${ctx}/workregularapply/workRegularApply/userInfo',
+                success:function(data){
+                    setUserInfo(data);
+                }
+            })
+        }
+        function setUserInfo(obj){
+            $("#sNo").val(obj.no);
+            // $("#basicInfoId").val(obj.id);
+            //$("#name").val(obj.name);
+            $("#sStatus").val(obj.status);
+            $("#sIdCard").val(obj.idCard);
+            $("#sOffice").val(obj.office.name);
+            $("#sJobGrade").val(obj.jobGrade.name);
+            $("#entryDate").val(obj.entryDate);
+            $("#baseSalary").val(obj.salary);
+        }
+	</script>
+</head>
+<body>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workResignation" action="${ctx}/workresignation/workResignation/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}"/>
+			<div class="form-group layui-row first lw16">
+				<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 with-icon">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.name}"/>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">工号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.no}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workResignation.status}">${fns:getDictLabel(workResignation.status, 'audit_state', '')}</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">员工状态:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.status}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">身份证号码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.idCard}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.workStaffBasicInfo.office.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">职级:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.jobGrade}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">基本工资:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workResignation.pay}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">入职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="entryDate" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.workStaffBasicInfo.entryDate}" pattern="yyyy年MM月dd日"/>"/>
+					</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  htmlEscape="false" value="${fns:getDictLabel(workResignation.type, 'resignation_type', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">离职日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"   readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.date}" pattern="yyyy年MM月dd日"/>"/>
+					</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  htmlEscape="false" value="${fns:getMainDictLabel(workResignation.reason, 'resignation_reason', '')}" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">考勤截止日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control layui-input"
+							   value="<fmt:formatDate value="${workResignation.endDate}" pattern="yyyy年MM月dd日"/>"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row first lw16">
+				<div class="form-group-label"><h2>离职审核</h2></div>
+				<div class="layui-input-block">
+					<table id="bankinfo5" class="table table-bordered table-condensed can-edit">
+						<thead>
+						<tr>
+							<th width="">审核部门</th>
+							<th >审核人</th>
+							<th >审核项目</th>
+							<th width="130px"><span class="require-item">*</span>是否通过</th>
+						</tr>
+						</thead>
+						<tbody id="templateList">
+						<c:if test="${not empty workResignation.templateList}">
+							<c:forEach items="${workResignation.templateList}" var="workResignationTemplate" varStatus="index">
+								<tr id="templateList${index.index}">
+									<td class="hide">
+										<input id="templateList${index.index}_id" name="templateList[${index.index}].id" type="hidden" value="${workResignationTemplate.id}"/>
+										<input id="templateList${index.index}_delFlag" name="templateList[${index.index}].delFlag" type="hidden" value="0"/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_officeName" name="templateList[${index.index}].officeName" type="text" value="${workResignationTemplate.officeName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_officeId" name="templateList[${index.index}].officeId" type="hidden" value="${workResignationTemplate.officeId}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="templateList${index.index}_userName" name="templateList[${index.index}].userName" type="text" value="${workResignationTemplate.userName}" readonly="true" class="form-control "/>
+										<input id="templateList${index.index}_auditor" name="templateList[${index.index}].auditor" type="hidden" value="${workResignationTemplate.auditor}" readonly="true" class="form-control "/>
+									</td>
+									<td title="${workResignationTemplate.comment}">
+										<input id="templateList${index.index}_comment" name="templateList[${index.index}].comment" type="text" value="${workResignationTemplate.comment}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<%--<form:select id="templateList${index.index}_status" path="templateList[${index.index}].status" class="form-control required">
+											<form:option value="" label=""/>
+											<form:options items="${fns:getDictList('resignation_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+										</form:select>--%>
+											<c:choose>
+												<c:when test="${empty workResignationTemplate.status || workResignationTemplate.status == '2'}">
+													<input id="templateList${index.index}_status" name="templateList[${index.index}].status" type="text" value="未审核" readonly="true" class="form-control "/>
+												</c:when>
+												<c:otherwise>
+													<input id="templateList${index.index}_status" name="templateList[${index.index}].status" type="text" value="已通过" readonly="true" class="form-control "/>
+												</c:otherwise>
+											</c:choose>
+									</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 layui-col-sm12 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" />
+						<input type="file" name="upload_files" style="display: none;">
+					</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="${workResignation.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workResignation.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 77 - 0
src/main/webapp/webpage/modules/workresignationtemplate/workResignationTemplateForm.jsp

@@ -0,0 +1,77 @@
+<%@ 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="workResignationTemplate" action="${ctx}/workresignationtemplate/workResignationTemplate/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">部门:</label></td>
+					<td class="width-35">
+						<form:input path="officeId" 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="auditor" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">审核项目:</label></td>
+					<td class="width-35">
+						<form:input path="comment" 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="status" htmlEscape="false"    class="form-control "/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">申请主键:</label></td>
+					<td class="width-35">
+						<form:input path="resignationId" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 142 - 0
src/main/webapp/webpage/modules/workresignationtemplate/workResignationTemplateList.jsp

@@ -0,0 +1,142 @@
+<%@ 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="workResignationTemplate" action="${ctx}/workresignationtemplate/workResignationTemplate/" 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="workresignationtemplate:workResignationTemplate:add">
+				<table:addRow url="${ctx}/workresignationtemplate/workResignationTemplate/form" title="离职审核列表"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workresignationtemplate:workResignationTemplate:edit">
+			    <table:editRow url="${ctx}/workresignationtemplate/workResignationTemplate/form" title="离职审核列表" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workresignationtemplate:workResignationTemplate:del">
+				<table:delRow url="${ctx}/workresignationtemplate/workResignationTemplate/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workresignationtemplate:workResignationTemplate:import">
+				<table:importExcel url="${ctx}/workresignationtemplate/workResignationTemplate/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workresignationtemplate:workResignationTemplate:export">
+	       		<table:exportExcel url="${ctx}/workresignationtemplate/workResignationTemplate/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 officeId">部门</th>
+				<th  class="sort-column auditor">审核人</th>
+				<th  class="sort-column comment">审核项目</th>
+				<th  class="sort-column status">审核状态</th>
+				<th  class="sort-column resignationId">申请主键</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="workResignationTemplate">
+			<tr>
+				<td> <input type="checkbox" id="${workResignationTemplate.id}" class="i-checks"></td>
+				<td><a  href="#" onclick="openDialogView('查看离职审核列表', '${ctx}/workresignationtemplate/workResignationTemplate/form?id=${workResignationTemplate.id}','800px', '500px')">
+					${workResignationTemplate.remarks}
+				</a></td>
+				<td>
+					${workResignationTemplate.officeId}
+				</td>
+				<td>
+					${workResignationTemplate.auditor}
+				</td>
+				<td>
+					${workResignationTemplate.comment}
+				</td>
+				<td>
+					${workResignationTemplate.status}
+				</td>
+				<td>
+					${workResignationTemplate.resignationId}
+				</td>
+				<td>
+					<shiro:hasPermission name="workresignationtemplate:workResignationTemplate:view">
+						<a href="#" onclick="openDialogView('查看离职审核列表', '${ctx}/workresignationtemplate/workResignationTemplate/form?id=${workResignationTemplate.id}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="workresignationtemplate:workResignationTemplate:edit">
+    					<a href="#" onclick="openDialog('修改离职审核列表', '${ctx}/workresignationtemplate/workResignationTemplate/form?id=${workResignationTemplate.id}','800px', '500px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+    				</shiro:hasPermission>
+    				<shiro:hasPermission name="workresignationtemplate:workResignationTemplate:del">
+						<a href="${ctx}/workresignationtemplate/workResignationTemplate/delete?id=${workResignationTemplate.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>

+ 102 - 0
src/main/webapp/webpage/modules/workreview/workReviewStandardForm.jsp

@@ -0,0 +1,102 @@
+<%@ 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;
+		}
+		#standardDetail-error{
+			top:82px;
+			left:0;
+		}
+	</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);
+					}
+				}
+			});
+            var edit = "${workReviewStandard.id}";
+            if(edit!=null && edit!=''){
+                $("#reviewParentButton").attr("disabled","disabled");
+            }
+            setParentInfo($("#reviewParentId").val());
+		});
+        function setParentInfo(parentId){
+            $.ajax({
+                url:"${ctx}/workreview/workReviewStandard/jsonData",
+                dataType:"json",
+                data:{id:parentId},
+                success:function (data) {
+                    if(data.proofread==1&&data.grade==1){
+                        $("#maxDeductTr").show();
+                    }else {
+                        $("#maxDeductTr").hide();
+                    }
+                }
+            })
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workReviewStandard" action="${ctx}/workreview/workReviewStandard/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-sm12">
+					<label class="layui-form-label"><span class="require-item">*</span>上级节点:</label>
+					<div class="layui-input-block with-icon">
+						<sys:treeselectReview id="reviewParent" name="parent.id" value="${workReviewStandard.parent.id}" labelName="parent.name" labelValue="${workReviewStandard.parent.standardDetail}"
+											  title="复核标准" url="/workreview/workReviewStandard/treeData" extId="${workReviewStandard.id}"  cssClass="form-control required layui-input" allowClear="${workReviewStandard.currentUser.admin}"/>
+					</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="standardDetail" htmlEscape="false"  rows="4" style="resize:none;" class="form-control required"/>
+					</div>
+				</div>
+				<div id="maxDeductTr" class="layui-item layui-col-sm12">
+					<label class="layui-form-label"><span class="require-item">*</span>最多扣分:</label>
+					<div class="layui-input-block">
+						<form:input path="maxDeduct" htmlEscape="false" max="100" min="0" class="form-control digits required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">序号:</label>
+					<div class="layui-input-block">
+						<form:input path="orderNum" htmlEscape="false"  readonly="true"  class="form-control layui-input"/>
+					</div>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 122 - 0
src/main/webapp/webpage/modules/workreview/workReviewStandardList.jsp

@@ -0,0 +1,122 @@
+<%@ 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 : 5},{ 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="workReviewStandard" action="${ctx}/workreview/workReviewStandard/" 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="standardDetail" 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">
+								<form:input path="orderNum" htmlEscape="false" class=" form-control layui-input"></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">
+						<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="40%">复核内容</th>
+								<th  >最多扣分</th>
+								<th >序号</th>
+								<th width="240px">操作</th>
+							</tr>
+						</thead>
+						<tbody>
+						<c:forEach items="${list}" var="workReviewStandard">
+							<tr id="${workReviewStandard.id}" pid="${workReviewStandard.parent.id}">
+								<td><a  href="#" onclick="openDialogView('查看复核标准', '${ctx}/workreview/workReviewStandard/view?id=${workReviewStandard.id}','95%', '95%')">
+										${workReviewStandard.standardDetail}
+								</a></td>
+								<td style="text-align: center">
+									${workReviewStandard.maxDeduct}
+								</td>
+								<td style="text-align: center">
+									${workReviewStandard.orderNum}
+								</td>
+								<td class="op-td text-center">
+									<div class="op-btn-box">
+										<c:if test="${workReviewStandard.grade == 1 or (workReviewStandard.grade==2 and workReviewStandard.proofread == 1)}">
+											<shiro:hasPermission name="workreview:workReviewStandard:add">
+												<a href="javascript:void(0);" onclick="openDialog('添加标准', '${ctx}/workreview/workReviewStandard/form?parent.id=${workReviewStandard.id}','95%','95%')" class="op-btn op-btn-add"><i class="fa fa-plus"></i> 添加下级标准</a>
+											</shiro:hasPermission>
+										</c:if>
+										<c:if test="${workReviewStandard.grade >=2}">
+										<shiro:hasPermission name="workreview:workReviewStandard:edit">
+											<a href="javascript:void(0);" onclick="openDialog('修改复核标准', '${ctx}/workreview/workReviewStandard/form?id=${workReviewStandard.id}','95%','95%')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>
+										</shiro:hasPermission>
+										<shiro:hasPermission name="workreview:workReviewStandard:del">
+											<a href="${ctx}/workreview/workReviewStandard/delete?id=${workReviewStandard.id}" onclick="return confirmx('确认要删除该复核标准及其子复核标准吗?', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
+										</shiro:hasPermission>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+	
+		<!-- 分页代码 -->
+	<%--<table:page page="${page}"></table:page>--%>
+
+				</div>
+			</div>
+		</div>
+</div>
+	<script>
+        resizeListWindow1();
+        $(window).resize(function(){
+            resizeListWindow1();
+        });
+	</script>
+</body>
+</html>

+ 76 - 0
src/main/webapp/webpage/modules/workreview/workReviewStandardView.jsp

@@ -0,0 +1,76 @@
+<%@ 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>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="workReviewStandard" action="#" 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-sm12">
+					<label class="layui-form-label"><span class="require-item">*</span>上级节点:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workReviewStandard.parent.standardDetail}"/>
+					</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">
+						<textarea htmlEscape="false" readonly="true" rows="4" style="resize:none;" class="form-control required">${workReviewStandard.standardDetail}</textarea>
+					</div>
+				</div>
+				<c:if test="${workReviewStandard.proofread == 1}">
+					<div class="layui-item layui-col-sm12">
+						<label class="layui-form-label"><span class="require-item">*</span>最多扣分:</label>
+						<div class="layui-input-block">
+							<input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workReviewStandard.maxDeduct}"/>
+						</div>
+					</div>
+				</c:if>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">序号:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control layui-input" value=" ${workReviewStandard.orderNum}"/>
+					</div>
+				</div>
+
+			</div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>