Enford 5 anni fa
parent
commit
c38d400bed
70 ha cambiato i file con 30907 aggiunte e 0 eliminazioni
  1. 106 0
      src/main/webapp/webpage/modules/worksalaryitem/workSalaryItemForm.jsp
  2. 208 0
      src/main/webapp/webpage/modules/worksalaryitem/workSalaryItemList.jsp
  3. 94 0
      src/main/webapp/webpage/modules/worksalaryitem/workSalaryItemView.jsp
  4. 182 0
      src/main/webapp/webpage/modules/workscrap/workScrapAudit.jsp
  5. 160 0
      src/main/webapp/webpage/modules/workscrap/workScrapForm.jsp
  6. 331 0
      src/main/webapp/webpage/modules/workscrap/workScrapList.jsp
  7. 166 0
      src/main/webapp/webpage/modules/workscrap/workScrapModify.jsp
  8. 164 0
      src/main/webapp/webpage/modules/workscrap/workScrapView.jsp
  9. 20 0
      src/main/webapp/webpage/modules/workscrap/workTrack.jsp
  10. 238 0
      src/main/webapp/webpage/modules/worksealform/workSealFormAudit.jsp
  11. 280 0
      src/main/webapp/webpage/modules/worksealform/workSealFormForm.jsp
  12. 123 0
      src/main/webapp/webpage/modules/worksealform/workSealFormHistoricList.jsp
  13. 234 0
      src/main/webapp/webpage/modules/worksealform/workSealFormList.jsp
  14. 190 0
      src/main/webapp/webpage/modules/worksealform/workSealFormTodoList.jsp
  15. 278 0
      src/main/webapp/webpage/modules/worksendmessage/workSendMessageAudit.jsp
  16. 399 0
      src/main/webapp/webpage/modules/worksendmessage/workSendMessageForm.jsp
  17. 355 0
      src/main/webapp/webpage/modules/worksendmessage/workSendMessageList.jsp
  18. 255 0
      src/main/webapp/webpage/modules/worksendmessage/workSendMessageMemberList.jsp
  19. 123 0
      src/main/webapp/webpage/modules/worksendmessage/workSendMessageMemberView.jsp
  20. 394 0
      src/main/webapp/webpage/modules/worksendmessage/workSendMessageModifyApply.jsp
  21. 15 0
      src/main/webapp/webpage/modules/worksendmessage/workSendMessageTask.jsp
  22. 216 0
      src/main/webapp/webpage/modules/worksendmessage/workSendMessageView.jsp
  23. 270 0
      src/main/webapp/webpage/modules/worksinglewage/workSingleWageAudit.jsp
  24. 328 0
      src/main/webapp/webpage/modules/worksinglewage/workSingleWageForm.jsp
  25. 319 0
      src/main/webapp/webpage/modules/worksinglewage/workSingleWageList.jsp
  26. 335 0
      src/main/webapp/webpage/modules/worksinglewage/workSingleWageModifyApply.jsp
  27. 206 0
      src/main/webapp/webpage/modules/worksinglewage/workSingleWageView.jsp
  28. 92 0
      src/main/webapp/webpage/modules/workstaff/infoList.jsp
  29. 270 0
      src/main/webapp/webpage/modules/workstaff/workAddressBookList.jsp
  30. 803 0
      src/main/webapp/webpage/modules/workstaff/workAddressBookView.jsp
  31. 1857 0
      src/main/webapp/webpage/modules/workstaff/workStaffAchiveInfoForm.jsp
  32. 1857 0
      src/main/webapp/webpage/modules/workstaff/workStaffAchiveInfoForms.jsp
  33. 480 0
      src/main/webapp/webpage/modules/workstaff/workStaffAchivesList.jsp
  34. 1233 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailAudit.jsp
  35. 1811 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailForm.jsp
  36. 1817 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModify.jsp
  37. 1841 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModifyDirectly.jsp
  38. 1977 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp
  39. 269 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoList.jsp
  40. 816 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoView.jsp
  41. 750 0
      src/main/webapp/webpage/modules/workstock/workStockAcceptAudit.jsp
  42. 591 0
      src/main/webapp/webpage/modules/workstock/workStockAudit.jsp
  43. 664 0
      src/main/webapp/webpage/modules/workstock/workStockForm.jsp
  44. 304 0
      src/main/webapp/webpage/modules/workstock/workStockList.jsp
  45. 668 0
      src/main/webapp/webpage/modules/workstock/workStockModify.jsp
  46. 567 0
      src/main/webapp/webpage/modules/workstock/workStockView.jsp
  47. 677 0
      src/main/webapp/webpage/modules/workstock/workStocksAudit.jsp
  48. 20 0
      src/main/webapp/webpage/modules/workstock/workTrack.jsp
  49. 327 0
      src/main/webapp/webpage/modules/workstockcontract/workStockContractAudit.jsp
  50. 310 0
      src/main/webapp/webpage/modules/workstockcontract/workStockContractForm.jsp
  51. 297 0
      src/main/webapp/webpage/modules/workstockcontract/workStockContractForms.jsp
  52. 378 0
      src/main/webapp/webpage/modules/workstockcontract/workStockContractList.jsp
  53. 317 0
      src/main/webapp/webpage/modules/workstockcontract/workStockContractModify.jsp
  54. 323 0
      src/main/webapp/webpage/modules/workstockcontract/workStockContractSqrAudit.jsp
  55. 352 0
      src/main/webapp/webpage/modules/workstockcontract/workStockContractView.jsp
  56. 350 0
      src/main/webapp/webpage/modules/workstockcontract/workStockContractgzAudit.jsp
  57. 15 0
      src/main/webapp/webpage/modules/workstockcontract/workTrack.jsp
  58. 269 0
      src/main/webapp/webpage/modules/worksupplier/workSupplierForm.jsp
  59. 269 0
      src/main/webapp/webpage/modules/worksupplier/workSupplierForms.jsp
  60. 252 0
      src/main/webapp/webpage/modules/worksupplier/workSupplierList.jsp
  61. 248 0
      src/main/webapp/webpage/modules/worksupplier/workSupplierView.jsp
  62. 319 0
      src/main/webapp/webpage/modules/workvisa/workFullManageFormDetail.jsp
  63. 151 0
      src/main/webapp/webpage/modules/workvisa/workVisaAudit.jsp
  64. 283 0
      src/main/webapp/webpage/modules/workvisa/workVisaForm.jsp
  65. 127 0
      src/main/webapp/webpage/modules/workvisa/workVisaHistoricList.jsp
  66. 234 0
      src/main/webapp/webpage/modules/workvisa/workVisaList.jsp
  67. 238 0
      src/main/webapp/webpage/modules/workvisa/workVisaManageList.jsp
  68. 15 0
      src/main/webapp/webpage/modules/workvisa/workVisaTask.jsp
  69. 204 0
      src/main/webapp/webpage/modules/workvisa/workVisaTodoList.jsp
  70. 276 0
      src/main/webapp/webpage/modules/workvisa/workVisaView.jsp

+ 106 - 0
src/main/webapp/webpage/modules/worksalaryitem/workSalaryItemForm.jsp

@@ -0,0 +1,106 @@
+<%@ 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(validateForm.form()){
+                $("#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="workSalaryItem" action="${ctx}/worksalaryitem/workSalaryItem/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"><span class="require-item">*</span>工资项名称:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="name" htmlEscape="false"  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 id="num" path="num" htmlEscape="false"  class="form-control required number 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="type" path="type" class="form-control simple-select required">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('salaryItem_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>设置方式:</label>
+					<div class="layui-input-block">
+						<form:select id="setMethod" path="setMethod" class="form-control simple-select required">
+							<form:option value="" label=""/>
+							<form:options items="${fns:getDictList('salaryItem_setMethod')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">禁用状态:</label>
+					<div class="layui-input-block">
+						<input class="form-control layui-input" readonly="true" value="${fns:getDictLabel(workSalaryItem.state, 'salaryItem_state', '')}">
+					</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="formula" htmlEscape="false" rows="4" maxlength="255"    class="form-control "/>
+					</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="explanation" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+					</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/worksalaryitem/workSalaryItemList.jsp

@@ -0,0 +1,208 @@
+<%@ 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");
+                }
+            });
+        });
+        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
+                    }
+                },
+                btn3: 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="workSalaryItem" action="${ctx}/worksalaryitem/workSalaryItem/" 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}"/>
+					<div class="commonQuery lw8">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">工资项名称:</label>
+							<div class="layui-input-block">
+								<form:input id="name" path="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">
+								<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" class="lw8" style="clear:both;display:none;">
+					</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="worksalaryitem:workSalaryItem:add">
+						<button class="nav-btn nav-btn-add" title="工资项" onclick="openDialogre('工资项','${ctx}/worksalaryitem/workSalaryItem/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:'num',align:'center',title: '工资项编号',minWidth:160,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工资项', '${ctx}/worksalaryitem/workSalaryItem/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.num + ">" + d.num + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'name',align:'center', title: '工资项名称',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.name +"'>" + d.name + "</span>";
+                }}
+                ,{field:'type',align:'center', title: '工资项类型',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.type +"'>" + d.type + "</span>";
+                }}
+                ,{field:'setMethod',align:'center', title: '设置方式',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.setMethod +"'>" + d.setMethod + "</span>";
+                }}
+                ,{field:'state', align:'center',title: '禁用状态',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.state +"'>" + d.state + "</span>";
+                }}
+                ,{field:'op',align:'center',title:"操作",minWidth:160,templet:function(d){
+                    ////对操作进行初始化
+                    var xml = "";
+                    if(d.canedit1 != undefined && d.canedit1 == "1")
+                        xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogre('修改工资项信息', '${ctx}/worksalaryitem/workSalaryItem/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=\"${ctx}/worksalaryitem/workSalaryItem/edits?tabId=3&id=" + d.id + "\" onclick=\"return confirmx('确认要禁用吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 禁用</a>";
+                    if(d.canedit3 != undefined && d.canedit3 == "1")
+                        xml +="<a href=\"${ctx}/worksalaryitem/workSalaryItem/edits?tabId=4&id=" + d.id + "\" onclick=\"return confirmx('确认要启用吗?', this.href)\"   class=\"op-btn op-btn-edit\"><i class=\"fa fa-plus\"></i> 启用</a>";
+                    if(d.candelete != undefined && d.candelete == "1")
+                        xml +="<a href=\"${ctx}/worksalaryitem/workSalaryItem/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="workSalaryItem" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workSalaryItem.id}"
+                    ,"num":"${workSalaryItem.num}"
+                    ,"name":"${workSalaryItem.name}"
+                    ,"setMethod":"${fns:getDictLabel(workSalaryItem.setMethod, 'salaryItem_setMethod', '')}"
+                    ,"type":"${fns:getDictLabel(workSalaryItem.type, 'salaryItem_type', '')}"
+                    ,"state":"${fns:getDictLabel(workSalaryItem.state, 'salaryItem_state', '')}"
+                    <c:if test="${fns:getUser().id == workSalaryItem.createBy.id}">
+                    <shiro:hasPermission name="worksalaryitem:workSalaryItem:edit"><c:choose>
+						<%--<c:when test="${'1' == '1' }">,"canedit1":"1"</c:when>--%>
+                    	<c:when test="${workSalaryItem.state == '2' }">,"canedit2":"1","canedit1":"1"</c:when>
+                    	<c:when test="${workSalaryItem.state == '1' }">,"canedit3":"1","canedit1":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="worksalaryitem:workSalaryItem:del"><c:choose>
+                    <c:when test="${'1' == '1' }">,"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>

+ 94 - 0
src/main/webapp/webpage/modules/worksalaryitem/workSalaryItemView.jsp

@@ -0,0 +1,94 @@
+<%@ 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()){
+                $("#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="workSalaryItem" action="${ctx}/worksalaryitem/workSalaryItem/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"><span class="require-item">*</span>工资项名称:</label>
+					<div class="layui-input-block">
+						<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workSalaryItem.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="${workSalaryItem.num}"/>
+					</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(workSalaryItem.type, 'salaryItem_type', '')}"/>
+					</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(workSalaryItem.setMethod, 'salaryItem_setMethod', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">禁用状态:</label>
+					<div class="layui-input-block">
+						<input class="form-control layui-input" readonly="true" value="${fns:getDictLabel(workSalaryItem.state, 'salaryItem_state', '')}">
+					</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 ">${workContractRecord.formula}</textarea>
+					</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 ">${workContractRecord.explanation}</textarea>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 182 - 0
src/main/webapp/webpage/modules/workscrap/workScrapAudit.jsp

@@ -0,0 +1,182 @@
+<%@ 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: '#scrapDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+		});
+        function setValue(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workscrap/workScrap/getItem',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#cName").val(d.cName);
+                    $("#cNumber").val(d.cNumber);
+                    $("#cType").val(d.cType);
+                    $("#cModel").val(d.cModel);
+                    $("#cPrimaryUnit").val(d.cPrimaryUnit);
+                }
+            })
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form  id="inputForm" modelAttribute="workScrap" action="${ctx}/workscrap/workScrap/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 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" readonly="true" class="form-control required layui-input" value="${workScrap.createBy.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">
+						<div class="input-group">
+							<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workScrap.number}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workScrap.status}">${fns:getDictLabel(workScrap.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"><span class="require-item">*</span>所属部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workScrap.officeName}"/>
+					</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 required layui-input" value="<fmt:formatDate value="${workScrap.scrapDate}" 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">
+						<textarea  htmlEscape="false" rows="4"  readonly="true"  class="form-control ">${workScrap.reason}</textarea>
+					</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 with-icon">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workScrap.item.number}"/>
+					</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 required layui-input" value="${workScrap.item.itemName}"/>
+					</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 required layui-input" value="${workScrap.item.workCatalogueItem.number}"/>
+					</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 required layui-input" value="${fns:getMainDictLabel(workScrap.item.workCatalogueItem.type, 'item_type', '')}"/>
+					</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 required layui-input" value="${workScrap.item.workCatalogueItem.model}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>计量单位:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${fns:getMainDictLabel(workScrap.item.workCatalogueItem.primaryUnit, 'full_count_unit', '')}"/>
+					</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 ">${workScrap.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-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="${workScrap.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workScrap.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 160 - 0
src/main/webapp/webpage/modules/workscrap/workScrapForm.jsp

@@ -0,0 +1,160 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>报废管理管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(obj == 2){
+                $("#inputForm").attr("action","${ctx}/workscrap/workScrap/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workscrap/workScrap/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: '#scrapDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+		});
+        function setValue(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workscrap/workScrap/getItem',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#cName").val(d.cName);
+                    $("#cNumber").val(d.cNumber);
+                    $("#cType").val(d.cType);
+                    $("#cModel").val(d.cModel);
+                    $("#cPrimaryUnit").val(d.cPrimaryUnit);
+                }
+            })
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form  id="inputForm" modelAttribute="workScrap" action="${ctx}/workscrap/workScrap/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+
+			<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">
+						<form:input path="createBy.name" 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">
+						<div class="input-group">
+							<form:input path="number" 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 workScrap.status}">${fns:getDictLabel(workScrap.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"><span class="require-item">*</span>所属部门:</label>
+					<div class="layui-input-block">
+						<form:input path="officeName" 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">
+						<input id="scrapDate" name="scrapDate" type="text" maxlength="20" class="laydate-icondate form-control required layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workScrap.scrapDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12 with-textarea">
+					<label class="layui-form-label">报废事由:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+					</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 with-icon">
+						<sys:gridselectscrap url="${ctx}/workscrap/workScrap/selectitem" id="item" name="item.id"  value="${workScrap.item.id}"  title="选择固定资产" labelName="workScrap.item.number"
+											  labelValue="${workScrap.item.number}" cssClass="form-control layui-input required" fieldLabels="固定资产" fieldKeys="itemName" searchLabel="物品名称" searchKey="itemName" ></sys:gridselectscrap>
+					</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="item.itemName" 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="cNumber" path="item.workCatalogueItem.number" 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="cType" path="item.workCatalogueItem.type" htmlEscape="false" value="${fns:getMainDictLabel(workScrap.item.workCatalogueItem.type, 'item_type', '')}" 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="cModel" path="item.workCatalogueItem.model" 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="cPrimaryUnit" path="item.workCatalogueItem.primaryUnit" htmlEscape="false" value="${fns:getMainDictLabel(workScrap.item.workCatalogueItem.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control layui-input"/>
+					</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="255"  class="form-control "/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 331 - 0
src/main/webapp/webpage/modules/workscrap/workScrapList.jsp

@@ -0,0 +1,331 @@
+<%@ 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
+            });
+		});
+        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="workScrap" action="${ctx}/workscrap/workScrap/" 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="cName" path="item.workCatalogueItem.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">
+								<form:input id="cName" path="item.number" htmlEscape="false" 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" 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 required"
+									   value="<fmt:formatDate value="${workScrap.beginContractDate}" 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="endContractDate" name="endContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon required"
+									   value="<fmt:formatDate value="${workScrap.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:input id="number" path="number" 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">
+								<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="workscrap:workScrap:add">
+						<button class="nav-btn nav-btn-add" title="报废管理" onclick="openDialogre('报废管理','${ctx}/workscrap/workScrap/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:'number',align:'center',sort:true,title: '报废编号',width:160,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看报废管理', '${ctx}/workscrap/workScrap/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.number + ">" + d.number + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'cNumber',align:'center', title: '固定资产编号',width:160,templet:function(d){
+                    return "<span title='"+ d.cNumber +"'>" + d.cNumber + "</span>";
+                }}
+                ,{field:'cName',align:'center', title: '物品名称',minWidth:100,templet:function(d){
+                    return "<span title='"+ d.cName +"'>" + d.cName + "</span>";
+                }}
+                ,{field:'cType',align:'center', title: '物品分类',minWidth:100,templet:function(d){
+                    return "<span title='"+ d.cType +"'>" + d.cType + "</span>";
+                }}
+                ,{field:'cModel', align:'center',title: '规格型号',width:90,templet:function(d){
+                    return "<span title='"+ d.cModel +"'>" + d.cModel + "</span>";
+                }}
+                ,{field:'scrapDate',align:'center', sort:true,title: '报废日期', width:160}
+                ,{field:'createBy',align:'center', title: '报废人', width:65}
+                ,{field:'status',align:'center', title: '状态', width:70,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}/workscrap/workScrap/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:130,templet:function(d){
+                    ////对操作进行初始化
+                    var xml = "";
+                    if(d.cancancel != undefined && d.cancancel == "1")
+                        xml += "<a href=\"${ctx}/workscrap/workScrap/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}/workscrap/workScrap/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}/workscrap/workScrap/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}/workscrap/workScrap/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}/workscrap/workScrap/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="workScrap" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workScrap.id}"
+                    ,"number":"${workScrap.number}"
+                    ,"cNumber":"${workScrap.item.number}"
+                    ,"cName":"${workScrap.item.workCatalogueItem.name}"
+                    ,"cType":"${fns:getMainDictLabel(workScrap.item.workCatalogueItem.type, 'item_type', '')}"
+                    ,"cModel":"${workScrap.item.workCatalogueItem.model}"
+                    /*,"cModel":"${fns:getMainDictLabel(workScrap.item.workCatalogueItem.model, 'contract_type', '')}"*/
+                    ,"scrapDate":"<fmt:formatDate value="${workScrap.scrapDate}" pattern="yyyy-MM-dd"/>"
+                    ,"status":"${workScrap.status}"
+                    ,"createBy":"${workScrap.createBy.name}"
+                    <c:if test="${fns:getUser().id == workScrap.createBy.id}">
+                    <c:if test="${workScrap.status == '2' }">,"cancancel":"1"</c:if>
+                    <shiro:hasPermission name="workscrap:workScrap:edit"><c:choose>
+                    <c:when test="${workScrap.status == '1' }">,"canedit1":"1"</c:when>
+                    <c:when test="${workScrap.status == '4'}">,"canedit2":"1"</c:when>
+                    <c:when test="${workScrap.status == '3'}">,"canedit3":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="workscrap:workScrap:del"><c:choose>
+                    <c:when test="${(workScrap.status == '1' or workScrap.status == '3' or workScrap.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>

+ 166 - 0
src/main/webapp/webpage/modules/workscrap/workScrapModify.jsp

@@ -0,0 +1,166 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>报废管理管理</title>
+	<meta name="decorator" content="default"/>
+	<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: '#scrapDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+		});
+        function setValue(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workscrap/workScrap/getItem',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#cName").val(d.cName);
+                    $("#cNumber").val(d.cNumber);
+                    $("#cType").val(d.cType);
+                    $("#cModel").val(d.cModel);
+                    $("#cPrimaryUnit").val(d.cPrimaryUnit);
+                }
+            })
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form  id="inputForm" modelAttribute="workScrap" action="${ctx}/workscrap/workScrap/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 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">
+						<form:input path="createBy.name" 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">
+						<div class="input-group">
+							<form:input path="number" 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 workScrap.status}">${fns:getDictLabel(workScrap.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"><span class="require-item">*</span>所属部门:</label>
+					<div class="layui-input-block">
+						<form:input path="officeName" 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">
+						<input id="scrapDate" name="scrapDate" type="text" maxlength="20" class="laydate-icondate form-control required layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${workScrap.scrapDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12 with-textarea">
+					<label class="layui-form-label">报废事由:</label>
+					<div class="layui-input-block">
+						<form:textarea path="reason" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+					</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 with-icon">
+						<sys:gridselectscrap url="${ctx}/workscrap/workScrap/selectitem" id="item" name="item.id"  value="${workScrap.item.id}"  title="选择固定资产" labelName="workScrap.item.number"
+											  labelValue="${workScrap.item.number}" cssClass="form-control layui-input required" fieldLabels="固定资产" fieldKeys="itemName" searchLabel="物品名称" searchKey="itemName" ></sys:gridselectscrap>
+					</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="item.itemName" 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="cNumber" path="item.workCatalogueItem.number" 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="cType" path="item.workCatalogueItem.type" htmlEscape="false" value="${fns:getMainDictLabel(workScrap.item.workCatalogueItem.type, 'item_type', '')}" 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="cModel" path="item.workCatalogueItem.model" 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="cPrimaryUnit" path="item.workCatalogueItem.primaryUnit" htmlEscape="false" value="${fns:getMainDictLabel(workScrap.item.workCatalogueItem.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control layui-input"/>
+					</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="255"  class="form-control "/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 164 - 0
src/main/webapp/webpage/modules/workscrap/workScrapView.jsp

@@ -0,0 +1,164 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>报废管理管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		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: '#scrapDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+		});
+        function setValue(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workscrap/workScrap/getItem',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#cName").val(d.cName);
+                    $("#cNumber").val(d.cNumber);
+                    $("#cType").val(d.cType);
+                    $("#cModel").val(d.cModel);
+                    $("#cPrimaryUnit").val(d.cPrimaryUnit);
+                }
+            })
+        }
+	</script>
+</head>
+<body>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form  id="inputForm" modelAttribute="workScrap" action="${ctx}/workscrap/workScrap/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 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" readonly="true" class="form-control required layui-input" value="${workScrap.createBy.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">
+						<div class="input-group">
+							<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workScrap.number}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workScrap.status}">${fns:getDictLabel(workScrap.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"><span class="require-item">*</span>所属部门:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workScrap.officeName}"/>
+					</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 required layui-input" value="<fmt:formatDate value="${workScrap.scrapDate}" 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">
+						<textarea  htmlEscape="false" rows="4"  readonly="true"  class="form-control ">${workScrap.reason}</textarea>
+					</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 with-icon">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workScrap.item.number}"/>
+					</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 required layui-input" value="${workScrap.item.itemName}"/>
+					</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 required layui-input" value="${workScrap.item.workCatalogueItem.number}"/>
+					</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 required layui-input" value="${fns:getMainDictLabel(workScrap.item.workCatalogueItem.type, 'item_type', '')}"/>
+					</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 required layui-input" value="${workScrap.item.workCatalogueItem.model}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>计量单位:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${fns:getMainDictLabel(workScrap.item.workCatalogueItem.primaryUnit, 'full_count_unit', '')}"/>
+					</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 ">${workScrap.remarks}</textarea>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 20 - 0
src/main/webapp/webpage/modules/workscrap/workTrack.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>
+

+ 238 - 0
src/main/webapp/webpage/modules/worksealform/workSealFormAudit.jsp

@@ -0,0 +1,238 @@
+<%@ 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}/worksealform/workSealForm/present",
+	             data:$('#loginForm').serialize(),
+	             type:"post",
+	             success:function(data){
+	        
+	             }					
+		});
+		});	
+			
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+            $('input,textarea,select').attr('disabled',<%=request.getAttribute("disabled")%>);
+            if (${requestScope.disabled eq 'false'}) {
+                $("#applicationDate").attr('disabled',true);
+                $("#documentName").attr('disabled',true);
+                $("#reason").attr('disabled',true);
+                $("#documentCount").attr('disabled',true);
+                $("#sealType").attr('disabled',true);
+            }
+		});
+	</script>
+</head>
+
+<body class="gray-bg">
+
+  <div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>用印详情 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+		<div class="ibox-content">
+		<form:form id="inputForm" modelAttribute="workSealForm" action="${ctx}/worksealform/workSealForm/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="${workSealForm.act.status}" />
+			<div class="control-group">
+			<label class="control-label">用印时间:</label>
+			<div class="controls" style="margin-top: 8px;">
+
+				<c:choose>
+					<c:when test="${!disabled}">
+						<input id="applicationDate" name="applicationDate" type="text" readonly="readonly" maxlength="20" class="laydate-icon form-control layer-date required"
+							   value="${workSealForm.applicationDate}"/></c:when>
+					<c:otherwise>
+						${workSealForm.applicationDate}
+					</c:otherwise>
+				</c:choose>
+			</div>
+		</div>
+            <div class="control-group">
+                <label class="control-label">用印事由:</label>
+                <div class="controls" style="margin-top: 8px">
+                    <c:choose>
+						<c:when test="${!disabled}">
+							<form:textarea path="reason" readonly="readonly" class="form-control required" rows="3" maxlength="20"/>
+						</c:when>
+						<c:otherwise>
+							${workSealForm.reason}
+						</c:otherwise>
+					</c:choose>
+				</div>
+            </div>
+			<div class="control-group">
+				<label class="control-label">用印文件名称:</label>
+				<div class="controls" style="margin-top: 8px">
+					<c:choose>
+						<c:when test="${!disabled}">
+							<input id="documentName" name="documentName" readonly="readonly" type="text" class="form-control required"
+								   value="${workSealForm.documentName}"/></c:when>
+						<c:otherwise>
+							${workSealForm.documentName}
+						</c:otherwise>
+					</c:choose>
+					<span class="help-inline"></span>
+				</div>
+			</div>
+			<div class="control-group">
+				<label class="control-label">文件个数:</label>
+				<div class="controls" style="margin-top: 8px">
+					<c:choose>
+						<c:when test="${!disabled}">
+							<input id="documentCount" name="documentCount" readonly="readonly" type="text" class="form-control required"
+								   value="${workSealForm.documentCount}"/></c:when>
+						<c:otherwise>
+							${workSealForm.documentCount}
+						</c:otherwise>
+					</c:choose>
+					<span class="help-inline"></span>
+				</div>
+			</div>
+			<div class="control-group">
+				<label class="control-label">印章类型:</label>
+				<div class="controls" style="margin-top: 8px">
+					<c:choose>
+						<c:when test="${!disabled}">
+							<input id="sealType" name="sealType" type="text" disabled="true" class="form-control required" value="${fns:getMainDictLabel(workSealForm.sealType, 'seal_type', '')}"/>
+						</c:when>
+						<c:otherwise>
+							${fns:getMainDictLabel(workSealForm.sealType, 'seal_type', '')}
+						</c:otherwise>
+					</c:choose>
+					<span class="help-inline"></span>
+				</div>
+			</div>
+			<div class="control-group">
+				<label class="control-label">附件信息:</label>
+				<div id="fileid" class="controls">
+					<table id="workReportList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+						<thead>
+						<tr>
+							<%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
+						</tr>
+						</thead>
+						<tbody id="file_attachment_report">
+						<c:forEach items="${workSealForm.workAttachments}" var="attachment" varStatus="index">
+							<tr>
+								<%--<td>${index.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'jpg')
+                                                               or fn:containsIgnoreCase(attachment.attachmentName,'png')
+                                                               or fn:containsIgnoreCase(attachment.attachmentName,'gif')
+                                                               or fn:containsIgnoreCase(attachment.attachmentName,'bmp')
+                                                               or fn:containsIgnoreCase(attachment.attachmentName,'jpeg')}">
+										<td><img src="${attachment.url}" width="50" height="50" alt="${fns:abbr(attachment.attachmentName,30)}"/></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
+												<td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%','1')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${attachment.attachmentUser}</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>--%>
+									<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/workengineeringproject/workEngineeringProject/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workEngineeringProject.id}&type=2')" class="btn btn-danger btn-xs" >删除</a>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<c:if test="${not empty status}">
+				<div class="control-group">
+					<label class="control-label">审批意见:</label>
+					<div class="controls">
+						<form:textarea path="act.comment" class="form-control" rows="3" maxlength="127"/>
+					</div>
+				</div>
+				<%--<div class="form-actions">
+				<c:if test="${workSealForm.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>
+		</br>
+		</br>
+			<act:flowChart procInsId="${workSealForm.act.procInsId}"/>
+			<act:histoicFlow procInsId="${workSealForm.act.procInsId}"/>
+	</form:form>
+	</div>
+	</div>
+	</div>
+</body>
+</html>

+ 280 - 0
src/main/webapp/webpage/modules/worksealform/workSealFormForm.jsp

@@ -0,0 +1,280 @@
+<%@ 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() {
+            $("#name").focus();
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    var len = $("#showPeo span").length;
+                    if(len<=0){
+                        parent.layer.msg("请选择审批人!",{icon:5});
+                        return false;
+                    }
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+			//只做查看时,禁用掉以下标签
+            if('${sessionScope.state}' =='disabled'){
+                $('input,textarea,select').attr('disabled','<%=session.getAttribute("state")%>');
+            }else if('${sessionScope.state}' !='disabled'){
+                $('input,textarea,select').removeAttr('disabled');
+            }
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+        });
+        function selectPeople(objId,objName){
+            var showPeo = $("#showPeo").html();
+            var len = $("#showPeo span").length;
+            if(len > 4){
+                parent.layer.msg("最多添加5个审批人",{icon:5})
+                return;
+            }
+            var arr = [];
+            var a = $("#showPeo span").each(function(){
+                var dataId = $(this).attr("data-id");
+                arr.push(dataId)
+            })
+            if(arr.indexOf(objId) != -1){
+                parent.layer.msg("该审批人已被选择,不能重复选择!!!",{icon:5})
+                return ;
+            }
+            showPeo = showPeo + '<span class="badge badge-success fontSpan" data-id="'+objId+'">'+objName+'&nbsp;&nbsp;&nbsp;' +
+                '<i onclick=deletePeo(this) class="fa fa-close"></i><input type="hidden" name=adds['+len+'] value="'+objId+'"></span>';
+            $("#showPeo").html(showPeo)
+        }
+        //删除选择的人员
+        function deletePeo(obj){
+            $(obj).parent().remove()
+        }
+        function insertTitle(tValue){
+            var list = "${workSealForm.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 = $("#id").val();
+            var attachmentFlag = "68";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workSealForm/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+	</script>
+</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}/worksealform/workSealForm/list">用印信息</a></li>
+					<li><a href="${ctx}/worksealform/workSealForm/workSealFormTodoList">待办任务</a></li>
+					<li><a href="${ctx}/worksealform/workSealForm/workSealFormHistoricList">已办任务</a></li>
+					<shiro:hasPermission name="worksealform:workSealForm:edit"><li class="active"><a href="${ctx}/worksealform/workSealForm/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="workSealForm" action="${ctx}/worksealform/workSealForm/save" method="post" class="form-horizontal">
+				<form:hidden path="id"/>
+				<c:set var="id" value="${workSealForm.id}" />
+				<c:set var="ids" value="${workSealForm.ids}" />
+				<sys:message content="${message}"/>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>用印文件名称:</label>
+					<div class="controls">
+						<input id="documentName" name="documentName" type="text" class="form-control required" value="${workSealForm.documentName}"/>
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>文件个数:</label>
+					<div class="controls">
+						<input id="documentCount" name="documentCount" type="text" class="form-control required" value="${workSealForm.documentCount}"/>
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>申请时间:</label>
+					<div class="controls">
+						<input class="form-control layer-date laydate-icon required" id="applicationDate" name="applicationDate" readonly="readonly" value="<fmt:formatDate value="${workSealForm.applicationDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>印章类型:</label>
+					<div class="controls">
+						<form:select path="sealType" class="form-control required">
+							<form:options items="${fns:getMainDictList('seal_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>经办人:</label>
+					<div class="controls">
+						<sys:treeselect id="user" name="user" value="${workSealForm.user.id}" labelName="user.name" labelValue="${workSealForm.name}"
+										title="用户" url="/sys/office/treeData?type=3" cssClass="form-control required" allowClear="true" notAllowSelectParent="true"/>
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>用印部门:</label>
+					<div class="controls">
+						<sys:treeselect id="office" name="office.id" value="${workSealForm.office.id}" labelName="office.name" labelValue="${workSealForm.officeName}"
+										title="部门" url="/sys/office/treeData?type=2" cssClass="form-control required" allowClear="true" notAllowSelectParent="true"/>
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label"><font color="red">*</font>用印原因:</label>
+					<div class="controls">
+						<form:textarea path="reason" class="form-control required" rows="3" maxlength="20"/>
+						<span class="help-inline"></span>
+					</div>
+				</div>
+				<c:if test="${empty id}">
+					<div class="control-group">
+						<label class="control-label">抄送人:</label>
+						<div id="CCId" class="controls">
+							<sys:treeselect id="CCId" name="CCId" value="${workSealForm.CCId}" labelName="idNames" labelValue="${workSealForm.idNames}"
+											title="用户" url="/sys/office/treeDataAll?type=3&isAll=false" cssClass="form-control" allowClear="true" checked="true" notAllowSelectParent="true"/>
+							<span class="help-inline"></span>
+						</div>
+					</div>
+					<div class="control-group">
+						<label class="control-label"><font color="red">*</font>审批人:</label>
+						<div id="addida" class="controls">
+							<sys:treeselectleave id="ida" name="ida" value="${workSealForm.ida}" labelName="idNamea" labelValue="${workSealForm.idNamea}"
+											title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required" allowClear="true" notAllowSelectParent="true"/>
+							<span class="help-inline"></span>
+						</div>
+						<div id="showPeo" class="controls">
+						</div>
+					</div>
+				<div class="control-group">
+					<label class="control-label">附件信息:</label>
+					<div id="fileid" class="controls">
+						<div style="display: inline-block">
+							<div id="addFile_attachment" style="display: none">
+								<div>
+									<span id="fileName_attachment" ></span>
+									<b><span id="baifenbi_attachment" ></span></b>
+								</div>
+								<div>
+									<div class="progress">
+										<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+										</div>
+									</div>
+								</div>
+							</div>
+							<input id="attachment_file" type="file" name="attachment_report" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+							<a id="attachment_btn" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>
+							<span id="attachment_title"></span>
+						</div>
+						<table id="workReportList"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+							<thead>
+							<tr>
+								<%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
+							</tr>
+							</thead>
+							<tbody id="file_attachment">
+							<c:forEach items="${workSealForm.workAttachments}" var="attachment" varStatus="status">
+								<tr>
+									<%--<td>${status.index + 1}</td>--%>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'jpg')
+                                                               or fn:containsIgnoreCase(attachment.attachmentName,'png')
+                                                               or fn:containsIgnoreCase(attachment.attachmentName,'gif')
+                                                               or fn:containsIgnoreCase(attachment.attachmentName,'bmp')
+                                                               or fn:containsIgnoreCase(attachment.attachmentName,'jpeg')}">
+											<td><img src="${attachment.url}" width="50" height="50" alt="${fns:abbr(attachment.attachmentName,30)}"/></td>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(attachment.attachmentName,'pdf')}">
+													<td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%','1')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
+												</c:when>
+												<c:otherwise>
+													<td><a href="javascript:void(0)" onclick="preview('预览','${attachment.url}','80%','80%')"><span title="${attachment.attachmentName}">${fns:abbr(attachment.attachmentName,30)}</span></a></td>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td>${attachment.attachmentUser}</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>--%>
+										<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/workengineeringproject/workEngineeringProject/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workEngineeringProject.id}&type=2')" class="btn btn-danger btn-xs" >删除</a>
+									</td>
+								</tr>
+							</c:forEach>
+							</tbody>
+						</table>
+					</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>
+

+ 123 - 0
src/main/webapp/webpage/modules/worksealform/workSealFormHistoricList.jsp

@@ -0,0 +1,123 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>已审核用印信息管理</title>
+	<meta name="decorator" content="default"/>
+	<script 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}/worksealform/workSealForm/list">用印信息</a></li>
+					<li><a href="${ctx}/worksealform/workSealForm/workSealFormTodoList">待办任务</a></li>
+					<li class="active"><a href="${ctx}/worksealform/workSealForm/workSealFormHistoricList">已办任务</a></li>
+					<shiro:hasPermission name="worksealform:workSealForm:edit"><li><a href="${ctx}/worksealform/workSealForm/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}/worksealform/workSealForm/workSealFormHistoricList" method="get" class="form-inline">
+						<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+						<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+						<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+						<div class="form-group">
+							<label>创建时间:</label>
+							<input class="form-control layer-date laydate-icon required" id="beginDate" name="beginDate" readonly="readonly" value="<fmt:formatDate value="${act.beginDate}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+							 -- 
+							<input class="form-control layer-date laydate-icon required" id="endDate" name="endDate" readonly="readonly" value="<fmt:formatDate value="${act.endDate}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
+
+						</div>
+					</form:form>
+					<br/>
+				</div>
+			</div>
+			<!-- 工具栏 -->
+			<div class="row">
+				<div class="col-sm-12">
+					<div class="pull-left">
+						<button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+					</div>
+					<div class="pull-right">
+						<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
+						<button  class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()" ><i class="fa fa-refresh"></i> 重置</button>
+					</div>
+				</div>
+			</div>
+			<!-- 表格 -->
+			<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+				<thead>
+				<tr>
+					<th style="text-align: center;">流程发起人</th>
+					<th style="text-align: center;">流程名称</th>
+					<th style="text-align: center;">流程版本</th>
+					<th style="text-align: center;"  class="sort-column documentName">用印文件名称</th>
+					<th style="text-align: center;"  class="sort-column documentCount">文件个数</th>
+					<th style="text-align: center;"  class="sort-column sealType">印章类型</th>
+					<th style="text-align: center;"  class="sort-column user.name">经办人</th>
+					<th style="text-align: center;"  class="sort-column applicationDate">申请时间</th>
+					<th style="text-align: center;"  class="sort-column office.name">用印部门</th>
+					<th style="text-align: center;"  class="sort-column reason">用印原因</th>
+					<th style="text-align: center;">创建时间</th>
+					<%--<th style="text-align: center;">操作</th>--%>
+				</tr>
+				</thead>
+				<tbody>
+				<c:forEach items="${list}" var="workSealForm">
+					<c:set var="task" value="${workSealForm.act.task}" />
+					<c:set var="vars" value="${workSealForm.act.vars}" />
+					<c:set var="procDef" value="${workSealForm.act.procDef}" /><%--
+				<c:set var="procExecUrl" value="${act.procExecUrl}" /> --%>
+					<c:set var="status" value="${workSealForm.act.status}" />
+					<tr>
+						<td>${workSealForm.act.vars.map.applyUserId}</td>
+						<td>${procDef.name}</td>
+						<td><b title='流程版本号'>V: ${procDef.version}</b></td>
+						<td><%--${workSealForm.documentName}--%>
+							<span title="${workSealForm.documentName}">${fns:abbr(workSealForm.documentName, 30)}</span>
+						</td>
+						<td>${workSealForm.documentCount}</td>
+						<td>${fns:getMainDictLabel(workSealForm.sealType, 'seal_type', '')}</td>
+						<td>${workSealForm.createBy.name}</td>
+						<td>${workSealForm.applicationDate}</td>
+						<td><%--${workSealForm.office.name}--%>
+							<span title="${workSealForm.office.name}">${fns:abbr(workSealForm.office.name, 30)}</span>
+						</td>
+						<td><%--${workSealForm.reason}--%>
+							<span title="${workSealForm.reason}">${fns:abbr(workSealForm.reason, 30)}</span>
+						</td>
+						<td><fmt:formatDate value="${workSealForm.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+						<%--<td><fmt:formatDate value="${task.createTime}" type="both"/></td>--%>
+						<%--<td>--%>
+							<%--&lt;%&ndash;<a  href="javascript:openDialog('跟踪','${ctx}/act/task/trace/photo/${task.processDefinitionId}/${task.executionId}','1000px', '600px')">跟踪</a>--%>
+						<%--&ndash;%&gt;</td>--%>
+					</tr>
+				</c:forEach>
+				</tbody>
+			</table>
+			<!-- 分页代码 -->
+			<table:page page="${page}"></table:page>
+			<br/>
+			<br/>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 234 - 0
src/main/webapp/webpage/modules/worksealform/workSealFormList.jsp

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

+ 190 - 0
src/main/webapp/webpage/modules/worksealform/workSealFormTodoList.jsp

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

+ 278 - 0
src/main/webapp/webpage/modules/worksendmessage/workSendMessageAudit.jsp

@@ -0,0 +1,278 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>发文管理管理</title>
+	<meta name="decorator" content="default"/>
+    <script type="text/javascript">
+        var validateForm;
+        function doSubmit(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);
+                    }
+                }
+            });
+        });
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+		<form:form id="inputForm" modelAttribute="workSendMessage" action="${ctx}/worksendmessage/workSendMessage/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="title" htmlEscape="false"  readonly="true"  class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文文号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="num" 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 workSendMessage.state}">${fns:getDictLabel(workSendMessage.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">
+                        <input type="text"  htmlEscape="false" value="${fns:getMainDictLabel(workSendMessage.docType, 'doc_type', '')}" readonly="readonly" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文日期:</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="createDate" htmlEscape="false" value="<fmt:formatDate value="${workSendMessage.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>拟 稿 人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="person" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">所属部门:</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="office.name" readonly="readonly" class="form-control layui-input"  value="${workSendMessage.office.topCompany}"/>
+                        <input type="hidden" name="office.id" readonly="readonly" class="form-control layui-input"  value="${workSendMessage.office.id}"/>
+                    </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="summary" readonly="true" htmlEscape="false" rows="3" class="form-control"/>
+                    </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" readonly="true" htmlEscape="false" rows="3" class="form-control"/>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>发文范围-部门</h2></div>
+                <table id="officeTable" class="table table-bordered table-condensed details">
+                <thead>
+                <tr>
+                    <th>部门</th>
+                </tr>
+                </thead>
+                <tbody id="officeTableList">
+                </tbody>
+                </table>
+                <script type="text/template" id="officeTpl">//<!--
+                    <tr id="officeList{{idx}}">
+                        <td>
+                            {{row.name}}
+                        </td>
+                    </tr>//-->
+                </script>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>发文范围-成员</h2></div>
+                <table id="userTable" class="table table-bordered table-condensed details">
+                    <thead>
+                    <tr>
+                        <th>姓名</th>
+                        <th>部门</th>
+                    </tr>
+                    </thead>
+                    <tbody id="userTableList">
+                    </tbody>
+                </table>
+                <script type="text/template" id="userTpl">//<!--
+                    <tr id="userList{{idx}}">
+                        <td>
+                        {{row.name}}
+                        </td>
+                        <td>
+                        {{row.officeName}}
+                        </td>
+                    </tr>//-->
+                </script>
+                <script type="text/javascript">
+                    var userIdx = 0, userTpl = $("#userTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var officeIdx = 0, officeTpl = $("#officeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+                    $(document).ready(function() {
+                        var data = ${fns:toJson(workSendMessage.officeList)};
+                        if (data!=null) {
+                            for (var i = 0; i < data.length; i++) {
+                                addRow('#officeTableList', officeIdx, officeTpl, data[i]);
+                                officeIdx = officeIdx + 1;
+                            }
+                        }
+                        var dataBank = ${fns:toJson(workSendMessage.userList)};
+                        if (dataBank!=null) {
+                            for (var i = 0; i < dataBank.length; i++) {
+                                addRow('#userTableList', userIdx, userTpl, dataBank[i]);
+                                userIdx = userIdx + 1;
+                            }
+                        }
+                    });
+
+                    function addRow(list, idx, tpl, row){
+                        var idx1 = 0;
+                        if('#userTableList'==list){
+                            idx1 = $("#userTableList tr").length
+                        }else if('#officeTableList'==list){
+                            idx1 = $("#officeTableList tr").length
+                        }
+                        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, 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){
+                        $(obj).parent().parent().remove();
+                    }
+                </script>
+            </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="listAttachment" class="table table-bordered table-condensed no-bottom-margin details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th>文件预览</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${workSendMessage.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 class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workClientAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>审批意见</h2></div>
+                <div class="layui-item layui-col-xs12 with-textarea" >
+                    <label class="layui-form-label">审批意见:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="act.comment" class="form-control" rows="4" maxlength="127" />
+                        <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="${workSendMessage.act.procInsId}"/>
+                    <act:histoicFlow procInsId="${workSendMessage.act.procInsId}"/>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+	</form:form>
+    </div>
+</div>
+</body>
+</html>

+ 399 - 0
src/main/webapp/webpage/modules/worksendmessage/workSendMessageForm.jsp

@@ -0,0 +1,399 @@
+<%@ 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(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(i==2){
+                    $("#inputForm").attr("action","${ctx}/worksendmessage/workSendMessage/tstore");
+                }
+                $("#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);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+        });
+
+        function insertTitle(tValue){
+            var list = "${workSendMessage.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 = "107";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workIncomingMessage/"+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 changeUser(ids,names,parents) {
+            var split = ids.split(',');
+            var split2 = names.split(',');
+            $("#userTableList").html("");
+            userIdx=0;
+            for(var i=0;i<split.length;i++){
+                var id = split[i];
+                if(id==''||id==null){
+                    continue;
+                }
+                var obj = {'id':id,'name':split2[i],'officeName':parents[i]};
+                addRow('#userTableList',userIdx,userTpl,obj);
+                userIdx+=1;
+            }
+        }
+
+        function changeOffice(ids,names,parentIds) {
+            $("#officeTableList").html("");
+            officeIdx=0;
+            for(var i=0;i<ids.length;i++){
+                var obj = {'id':ids[i],'name':parentIds[i]};
+                addRow('#officeTableList',officeIdx,officeTpl,obj);
+                officeIdx+=1;
+            }
+        }
+        function getSelectOfficeIds() {
+            var selectedIds = "";
+            var pidArr = $("#officeTableList tr .officeId");
+            for(var i=0;i<pidArr.length;i++){
+                selectedIds+=$(pidArr[i]).val();
+                selectedIds+=",";
+            }
+            return selectedIds;
+        }
+        function getSelectUserIds() {
+            var selectedIds = "";
+            var pidArr = $("#userTableList tr .userId");
+            for(var i=0;i<pidArr.length;i++){
+                selectedIds+=$(pidArr[i]).val();
+                selectedIds+=",";
+            }
+            return selectedIds;
+        }
+        
+        function setValuee(obj) {
+            if(obj==null){
+                return;
+            }
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workcommongroup/workCommonGroup/queryDetail',
+                data:{
+                    "id":obj.id
+                },
+                success:function (result) {
+                    console.log(result);
+                    if(result.success){
+                        var idArr = $("#userTableList tr .userId");
+                        var userList = result.body.userList;
+                        for(var i=0;i<userList.length;i++){
+                            var user = userList[i];
+                            if(user.id==''||hasInArr(user.id,idArr)){
+                                continue;
+                            }
+                            addRow('#userTableList',userIdx,userTpl,user);
+                            userIdx+=1;
+                        }
+                    }
+                }
+            })
+        }
+
+        function hasInArr(id,idArr) {
+            for(var i=0;i<idArr.length;i++){
+                if(id==$(idArr[i]).val()){
+                    return true;
+                }
+            }
+            return false;
+        }
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+		<form:form id="inputForm" modelAttribute="workSendMessage" action="${ctx}/worksendmessage/workSendMessage/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+            <div class="form-group layui-row first">
+                <div class="form-group-label"><h2>基本信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文标题:</label>
+                    <div class="layui-input-block">
+                        <form:input path="title" htmlEscape="false"    class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文文号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="num" 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 workSendMessage.state}">${fns:getDictLabel(workSendMessage.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:select path="docType" class="form-control simple-select required">
+                            <form:option value="" label=""/>
+                            <form:options items="${fns:getMainDictList('doc_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文日期:</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="createDate" htmlEscape="false" value="<fmt:formatDate value="${workSendMessage.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>拟 稿 人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="person" htmlEscape="false" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">所属部门:</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="office.name" readonly="readonly" class="form-control layui-input"  value="${workSendMessage.office.topCompany}"/>
+                        <input type="hidden" name="office.id" readonly="readonly" class="form-control layui-input"  value="${workSendMessage.office.id}"/>
+                    </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="summary" htmlEscape="false" rows="3" maxlength="255" class="form-control"/>
+                    </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"/>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>发文范围-部门</h2></div>
+                <div class="layui-item nav-btns">
+                <sys:treeselectoffices id="offices" name="" value="" labelName="memberNameStr" labelValue=""
+                                       retnParent="true" checked="true" notAllowSelectParent="true" title="部门" url="/sys/office/treeData?type=2"  cssClass="form-control required" allowClear="true"/>
+                </div>
+                <table id="officeTable" class="table table-bordered table-condensed details">
+                <thead>
+                <tr>
+                    <th class="hide"></th>
+                    <th>部门</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody id="officeTableList">
+                </tbody>
+                </table>
+                <script type="text/template" id="officeTpl">//<!--
+                    <tr id="officeList{{idx}}">
+                        <td class="hide">
+                            <input id="officeList{{idx}}_id" name="officeList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control officeId"/>
+                        </td>
+                        <td>
+                            {{row.name}}
+                        </td>
+                        <td class="text-center op-td">
+                                    <a href=javascript:void(0); onclick="delRow(this, '#officeList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+                        </td>
+                    </tr>//-->
+                </script>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>发文范围-成员</h2></div>
+                <div class="layui-item nav-btns">
+                    <sys:treeselectusers id="users" name="" value="" labelName="memberNameStr" labelValue=""
+                                         retnParent="true" title="用户" url="/sys/office/treeData?type=3" checked="true" cssClass="form-control required" allowClear="true" notAllowSelectParent="true"/>
+                    <sys:gridselectCommonGroup url="${ctx}/workcommongroup/workCommonGroup/selectList" id="baseData" title="选择常用组"
+                                            cssClass="form-control" fieldLabels="" fieldKeys=""  searchLabel="常用组名称" searchKey="name"></sys:gridselectCommonGroup>
+                </div>
+                <table id="userTable" class="table table-bordered table-condensed details">
+                    <thead>
+                    <tr>
+                        <th class="hide"></th>
+                        <th>姓名</th>
+                        <th>部门</th>
+                        <th>操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="userTableList">
+                    </tbody>
+                </table>
+                <script type="text/template" id="userTpl">//<!--
+                    <tr id="userList{{idx}}">
+                        <td class="hide">
+                            <input id="userList{{idx}}_id" name="userList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control userId"/>
+                        </td>
+                        <td>
+                        {{row.name}}
+                        </td>
+                        <td>
+                        {{row.officeName}}
+                        </td>
+                        <td class="text-center op-td">
+                                    <a href=javascript:void(0); onclick="delRow(this, '#userList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+                        </td>
+                    </tr>//-->
+                </script>
+                <script type="text/javascript">
+                    var userIdx = 0, userTpl = $("#userTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var officeIdx = 0, officeTpl = $("#officeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+                    $(document).ready(function() {
+                        var data = ${fns:toJson(workSendMessage.officeList)};
+                        if (data!=null) {
+                            for (var i = 0; i < data.length; i++) {
+                                addRow('#officeTableList', officeIdx, officeTpl, data[i]);
+                                officeIdx = officeIdx + 1;
+                            }
+                        }
+                        var dataBank = ${fns:toJson(workSendMessage.userList)};
+                        if (dataBank!=null) {
+                            for (var i = 0; i < dataBank.length; i++) {
+                                addRow('#userTableList', userIdx, userTpl, dataBank[i]);
+                                userIdx = userIdx + 1;
+                            }
+                        }
+                    });
+
+                    function addRow(list, idx, tpl, row){
+                        var idx1 = 0;
+                        if('#userTableList'==list){
+                            idx1 = $("#userTableList tr").length
+                        }else if('#officeTableList'==list){
+                            idx1 = $("#officeTableList tr").length
+                        }
+                        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, 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){
+                        $(obj).parent().parent().remove();
+                    }
+                </script>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>附件信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                </div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th>文件预览</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${workSendMessage.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 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>
+	</form:form>
+    </div>
+</div>
+</body>
+</html>

+ 355 - 0
src/main/webapp/webpage/modules/worksendmessage/workSendMessageList.jsp

@@ -0,0 +1,355 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>发文管理管理</title>
+	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </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: '#beginCreateDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+	            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+	        });
+	        laydate.render({
+	            elem: '#endCreateDate', //目标元素。由于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) {
+                }
+            });
+        }
+        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: ['送审', '暂存', '关闭'],
+                /*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
+                    }
+
+                },*/
+                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>
+</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="workSendMessage" action="${ctx}/worksendmessage/workSendMessage/" 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">
+                                <form:input path="title" 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="num" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item athird fr">
+                            <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="beginCreateDate" name="beginCreateDate" type="text" placeholder="开始时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${workSendMessage.beginCreateDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endCreateDate" name="endCreateDate" type="text" placeholder="结束时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${workSendMessage.endCreateDate}" 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="docType" class="form-control layui-input">
+                                    <form:option value="" label=""/>
+                                    <form:options items="${fns:getMainDictList('doc_type')}" 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">
+                                <form:input path="person" 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">
+                                <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>
+	            </form:form>
+	        </div>
+	    </div>
+
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <shiro:hasPermission name="worksendmessage:workSendMessage:add">
+                        <table:addRow url="${ctx}/worksendmessage/workSendMessage/form" title="发文管理"></table:addRow><!-- 增加按钮 -->
+                    </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: '发文文号',minWidth:200,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看发文', '${ctx}/worksendmessage/workSendMessage/view?id="+d.id+"','95%','95%')\">" +
+                            "<span title=" + d.num + ">" + d.num + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'title',align:'center', title: '发文标题',minWidth:150}
+                ,{field:'docType',align:'center', title: '发文类型', minWidth:150}
+                ,{field:'person',align:'center', title: '拟 稿 人', minWidth:150}
+                ,{field:'createDate', align:'center',title: '发文日期',width:100}
+                ,{align:'center', title: '申请状态',  width:70,templet:function(d){
+                        var st = getAuditState(d.state)
+                        var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/worksendmessage/workSendMessage/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}/worksendmessage/workSendMessage/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}/worksendmessage/workSendMessage/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}/worksendmessage/workSendMessage/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}/worksendmessage/workSendMessage/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}/worksendmessage/workSendMessage/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="workSendMessage" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workSendMessage.id}"
+                    ,"num":"<c:out value="${workSendMessage.num}" escapeXml="true"/>"
+                    ,'docType':"${fns:getMainDictLabel(workSendMessage.docType,'doc_type','')}"
+                    ,'person':"<c:out value="${workSendMessage.person}" escapeXml="true"/>"
+                    ,'title':"<c:out value="${workSendMessage.title}" escapeXml="true"/>"
+                    ,"createDate":"<fmt:formatDate value="${workSendMessage.createDate}" pattern="yyyy-MM-dd"/>"
+                    ,"state":"${workSendMessage.state}"
+                    ,"procId":"${workSendMessage.processInstanceId}"
+                    <c:if test="${flag == '1' or fns:getUser().id == workSendMessage.createBy.id}">
+                    <shiro:hasPermission name="worksendmessage:workSendMessage:edit">,"canedit":<c:choose><c:when test="${workSendMessage.state == 1}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canmodify":<c:choose><c:when test="${workSendMessage.state == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canrecall":<c:choose><c:when test="${workSendMessage.state == 3}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="worksendmessage:workSendMessage:del">,"candelete":<c:choose><c:when test="${workSendMessage.state == 1 or workSendMessage.state == 3 or workSendMessage.state == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+                    ,"cancancel":<c:choose><c:when test="${workSendMessage.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>

+ 255 - 0
src/main/webapp/webpage/modules/worksendmessage/workSendMessageMemberList.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"/>
+    <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: '#beginCreateDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+	            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+	        });
+	        laydate.render({
+	            elem: '#endCreateDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+	            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+	        });
+
+		});
+        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: ['送审', '暂存', '关闭'],
+                /*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
+                    }
+
+                },*/
+                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>
+</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="workSendMessage" action="${ctx}/worksendmessage/workSendMessage/memberList" 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">
+                                <form:input path="title" 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="num" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item athird fr">
+                            <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="beginCreateDate" name="beginCreateDate" type="text" readonly="readonly" maxlength="20" placeholder="开始时间" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${workSendMessage.beginCreateDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endCreateDate" name="endCreateDate" type="text" readonly="readonly" maxlength="20" placeholder="结束时间" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${workSendMessage.endCreateDate}" 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="docType" class="form-control layui-input">
+                                    <form:option value="" label=""/>
+                                    <form:options items="${fns:getMainDictList('doc_type')}" 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">
+                                <form:input path="person" htmlEscape="false" 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">
+                    <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}/worksendmessage/workSendMessage/memberView?id="+d.id+"','95%','95%')\">" +
+                            "<span title=" + d.num + ">" + d.num + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'title',align:'center', title: '发文标题',minWidth:150}
+                ,{field:'docType',align:'center', title: '发文类型', minWidth:150}
+                ,{field:'person',align:'center', title: '拟 稿 人', minWidth:150}
+                ,{field:'createDate', align:'center',sort:true,title: '发文日期',width:100}
+                ,{field:'op',align:'center',title:"操作",width:100,templet:function(d){
+                        ////对操作进行初始化
+                        var xml ="<a href=\"javascript:void(0)\" onclick=\"openDialogView('查看发文', '${ctx}/worksendmessage/workSendMessage/memberView?id=" + d.id+"','95%','95%')\" class=\"op-btn op-btn-view\" ><i class=\"fa fa-search-plus\"></i> 查看</a>"
+                        return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workSendMessage" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workSendMessage.id}"
+                    ,"num":"${workSendMessage.num}"
+                    ,'docType':"${fns:getMainDictLabel(workSendMessage.docType,'doc_type','')}"
+                    ,'person':"<c:out value="${workSendMessage.person}" escapeXml="true"/>"
+                    ,'title':"<c:out value="${workSendMessage.title}" escapeXml="true"/>"
+                    ,"createDate":"<fmt:formatDate value="${workSendMessage.createDate}" pattern="yyyy-MM-dd"/>"
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+
+    resizeListTable(100);/*消除由于有竖向滚动条造成table出现横向滚动条*/
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 123 - 0
src/main/webapp/webpage/modules/worksendmessage/workSendMessageMemberView.jsp

@@ -0,0 +1,123 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>发文管理管理</title>
+	<meta name="decorator" content="default"/>
+</head>
+<body>
+<div class="single-form">
+    <div class="container view-form">
+		<form:form id="inputForm" modelAttribute="workSendMessage" action="${ctx}/worksendmessage/workSendMessage/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+            <div class="form-group layui-row first">
+                <div class="form-group-label"><h2>基本信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文标题:</label>
+                    <div class="layui-input-block">
+                        <form:input path="title" htmlEscape="false"  readonly="true"  class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文文号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="num" 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 workSendMessage.state}">${fns:getDictLabel(workSendMessage.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">
+                        <input type="text"  htmlEscape="false" value="${fns:getMainDictLabel(workSendMessage.docType, 'doc_type', '')}" readonly="readonly" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文日期:</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="createDate" htmlEscape="false" value="<fmt:formatDate value="${workSendMessage.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>拟 稿 人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="person" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">所属部门:</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="office.name" readonly="readonly" class="form-control layui-input"  value="${workSendMessage.office.topCompany}"/>
+                        <input type="hidden" name="office.id" readonly="readonly" class="form-control layui-input"  value="${workSendMessage.office.id}"/>
+                    </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="summary" readonly="true" htmlEscape="false" rows="3" class="form-control"/>
+                    </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" readonly="true" htmlEscape="false" rows="3" 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="listAttachment" class="table table-bordered table-condensed no-bottom-margin details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th>文件预览</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${workSendMessage.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 class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workClientAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+	</form:form>
+    </div>
+</div>
+</body>
+</html>

+ 394 - 0
src/main/webapp/webpage/modules/worksendmessage/workSendMessageModifyApply.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">
+        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);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+        });
+
+        function insertTitle(tValue){
+            var list = "${workSendMessage.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 = "107";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workIncomingMessage/"+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 changeUser(ids,names,parents) {
+            var split = ids.split(',');
+            var split2 = names.split(',');
+            $("#userTableList").html("");
+            userIdx=0;
+            for(var i=0;i<split.length;i++){
+                var id = split[i];
+                var obj = {'id':id,'name':split2[i],'officeName':parents[i]};
+                addRow('#userTableList',userIdx,userTpl,obj);
+                userIdx+=1;
+            }
+        }
+
+        function changeOffice(ids,names,parentIds) {
+            $("#officeTableList").html("");
+            officeIdx=0;
+            for(var i=0;i<ids.length;i++){
+                var obj = {'id':ids[i],'name':parentIds[i]};
+                addRow('#officeTableList',officeIdx,officeTpl,obj);
+                officeIdx+=1;
+            }
+        }
+        function getSelectOfficeIds() {
+            var selectedIds = "";
+            var pidArr = $("#officeTableList tr .officeId");
+            for(var i=0;i<pidArr.length;i++){
+                selectedIds+=$(pidArr[i]).val();
+                selectedIds+=",";
+            }
+            return selectedIds;
+        }
+        function getSelectUserIds() {
+            var selectedIds = "";
+            var pidArr = $("#userTableList tr .userId");
+            for(var i=0;i<pidArr.length;i++){
+                selectedIds+=$(pidArr[i]).val();
+                selectedIds+=",";
+            }
+            return selectedIds;
+        }
+
+        function setValuee(obj) {
+            if(obj==null){
+                return;
+            }
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workcommongroup/workCommonGroup/queryDetail',
+                data:{
+                    "id":obj.id
+                },
+                success:function (result) {
+                    console.log(result);
+                    if(result.success){
+                        var idArr = $("#userTableList tr .userId");
+                        var userList = result.body.userList;
+                        for(var i=0;i<userList.length;i++){
+                            var user = userList[i];
+                            if(user.id==''||hasInArr(user.id,idArr)){
+                                continue;
+                            }
+                            addRow('#userTableList',userIdx,userTpl,user);
+                            userIdx+=1;
+                        }
+                    }
+                }
+            })
+        }
+
+        function hasInArr(id,idArr) {
+            for(var i=0;i<idArr.length;i++){
+                if(id==$(idArr[i]).val()){
+                    return true;
+                }
+            }
+            return false;
+        }
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+		<form:form id="inputForm" modelAttribute="workSendMessage" action="${ctx}/worksendmessage/workSendMessage/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="title" htmlEscape="false"    class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文文号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="num" 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 workSendMessage.state}">${fns:getDictLabel(workSendMessage.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:select path="docType" class="form-control simple-select required">
+                            <form:option value="" label=""/>
+                            <form:options items="${fns:getMainDictList('doc_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文日期:</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="createDate" htmlEscape="false" value="<fmt:formatDate value="${workSendMessage.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>拟 稿 人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="person" htmlEscape="false" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">所属部门:</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="office.name" readonly="readonly" class="form-control layui-input"  value="${workSendMessage.office.topCompany}"/>
+                        <input type="hidden" name="office.id" readonly="readonly" class="form-control layui-input"  value="${workSendMessage.office.id}"/>
+                    </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="summary" htmlEscape="false" rows="3" maxlength="255" class="form-control"/>
+                    </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"/>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>发文范围-部门</h2></div>
+                <div class="layui-item nav-btns">
+                <sys:treeselectoffices id="offices" name="" value="" labelName="memberNameStr" labelValue=""
+                                       retnParent="true" checked="true" notAllowSelectParent="true" title="部门" url="/sys/office/treeData?type=2"  cssClass="form-control required" allowClear="true"/>
+                </div>
+                <table id="officeTable" class="table table-bordered table-condensed details">
+                <thead>
+                <tr>
+                    <th class="hide"></th>
+                    <th>部门</th>
+                    <th>操作</th>
+                </tr>
+                </thead>
+                <tbody id="officeTableList">
+                </tbody>
+                </table>
+                <script type="text/template" id="officeTpl">//<!--
+                    <tr id="officeList{{idx}}">
+                        <td class="hide">
+                            <input id="officeList{{idx}}_id" name="officeList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control officeId"/>
+                        </td>
+                        <td>
+                            {{row.name}}
+                        </td>
+                        <td class="text-center op-td">
+                                    <a href=javascript:void(0); onclick="delRow(this, '#officeList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+                        </td>
+                    </tr>//-->
+                </script>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>发文范围-成员</h2></div>
+                <div class="layui-item nav-btns">
+                    <sys:treeselectusers id="users" name="" value="" labelName="memberNameStr" labelValue=""
+                                         retnParent="true" title="用户" url="/sys/office/treeData?type=3" checked="true" cssClass="form-control required" allowClear="true" notAllowSelectParent="true"/>
+                    <sys:gridselectCommonGroup url="${ctx}/workcommongroup/workCommonGroup/selectList" id="baseData" title="选择常用组"
+                                               cssClass="form-control" fieldLabels="" fieldKeys=""  searchLabel="常用组名称" searchKey="name"></sys:gridselectCommonGroup>
+                </div>
+                <table id="userTable" class="table table-bordered table-condensed details">
+                    <thead>
+                    <tr>
+                        <th class="hide"></th>
+                        <th>姓名</th>
+                        <th>部门</th>
+                        <th>操作</th>
+                    </tr>
+                    </thead>
+                    <tbody id="userTableList">
+                    </tbody>
+                </table>
+                <script type="text/template" id="userTpl">//<!--
+                    <tr id="userList{{idx}}">
+                        <td class="hide">
+                            <input id="userList{{idx}}_id" name="userList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control userId"/>
+                        </td>
+                        <td>
+                        {{row.name}}
+                        </td>
+                        <td>
+                        {{row.officeName}}
+                        </td>
+                        <td class="text-center op-td">
+                                    <a href=javascript:void(0); onclick="delRow(this, '#userList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+                        </td>
+                    </tr>//-->
+                </script>
+                <script type="text/javascript">
+                    var userIdx = 0, userTpl = $("#userTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var officeIdx = 0, officeTpl = $("#officeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+                    $(document).ready(function() {
+                        var data = ${fns:toJson(workSendMessage.officeList)};
+                        if (data!=null) {
+                            for (var i = 0; i < data.length; i++) {
+                                addRow('#officeTableList', officeIdx, officeTpl, data[i]);
+                                officeIdx = officeIdx + 1;
+                            }
+                        }
+                        var dataBank = ${fns:toJson(workSendMessage.userList)};
+                        if (dataBank!=null) {
+                            for (var i = 0; i < dataBank.length; i++) {
+                                addRow('#userTableList', userIdx, userTpl, dataBank[i]);
+                                userIdx = userIdx + 1;
+                            }
+                        }
+                    });
+
+                    function addRow(list, idx, tpl, row){
+                        var idx1 = 0;
+                        if('#userTableList'==list){
+                            idx1 = $("#userTableList tr").length
+                        }else if('#officeTableList'==list){
+                            idx1 = $("#officeTableList tr").length
+                        }
+                        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, 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){
+                        $(obj).parent().parent().remove();
+                    }
+                </script>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>附件信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                </div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th>文件预览</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${workSendMessage.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 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>
+	</form:form>
+    </div>
+</div>
+</body>
+</html>

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

+ 216 - 0
src/main/webapp/webpage/modules/worksendmessage/workSendMessageView.jsp

@@ -0,0 +1,216 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>发文管理管理</title>
+	<meta name="decorator" content="default"/>
+</head>
+<body>
+<div class="single-form">
+    <div class="container view-form">
+		<form:form id="inputForm" modelAttribute="workSendMessage" action="${ctx}/worksendmessage/workSendMessage/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+            <div class="form-group layui-row first">
+                <div class="form-group-label"><h2>基本信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文标题:</label>
+                    <div class="layui-input-block">
+                        <form:input path="title" htmlEscape="false"  readonly="true"  class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文文号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="num" 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 workSendMessage.state}">${fns:getDictLabel(workSendMessage.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">
+                        <input type="text"  htmlEscape="false" value="${fns:getMainDictLabel(workSendMessage.docType, 'doc_type', '')}" readonly="readonly" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>发文日期:</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="createDate" htmlEscape="false" value="<fmt:formatDate value="${workSendMessage.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>拟 稿 人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="person" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">所属部门:</label>
+                    <div class="layui-input-block">
+                        <input type="text" name="office.name" readonly="readonly" class="form-control layui-input"  value="${workSendMessage.office.topCompany}"/>
+                        <input type="hidden" name="office.id" readonly="readonly" class="form-control layui-input"  value="${workSendMessage.office.id}"/>
+                    </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="summary" readonly="true" htmlEscape="false" rows="3" class="form-control"/>
+                    </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" readonly="true" htmlEscape="false" rows="3" class="form-control"/>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>发文范围-部门</h2></div>
+                <table id="officeTable" class="table table-bordered table-condensed details">
+                <thead>
+                <tr>
+                    <th>部门</th>
+                </tr>
+                </thead>
+                <tbody id="officeTableList">
+                </tbody>
+                </table>
+                <script type="text/template" id="officeTpl">//<!--
+                    <tr id="officeList{{idx}}">
+                        <td>
+                            {{row.name}}
+                        </td>
+                    </tr>//-->
+                </script>
+            </div>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>发文范围-成员</h2></div>
+                <table id="userTable" class="table table-bordered table-condensed details">
+                    <thead>
+                    <tr>
+                        <th>姓名</th>
+                        <th>部门</th>
+                    </tr>
+                    </thead>
+                    <tbody id="userTableList">
+                    </tbody>
+                </table>
+                <script type="text/template" id="userTpl">//<!--
+                    <tr id="userList{{idx}}">
+                        <td>
+                        {{row.name}}
+                        </td>
+                        <td>
+                        {{row.officeName}}
+                        </td>
+                    </tr>//-->
+                </script>
+                <script type="text/javascript">
+                    var userIdx = 0, userTpl = $("#userTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var officeIdx = 0, officeTpl = $("#officeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+                    $(document).ready(function() {
+                        var data = ${fns:toJson(workSendMessage.officeList)};
+                        if (data!=null) {
+                            for (var i = 0; i < data.length; i++) {
+                                addRow('#officeTableList', officeIdx, officeTpl, data[i]);
+                                officeIdx = officeIdx + 1;
+                            }
+                        }
+                        var dataBank = ${fns:toJson(workSendMessage.userList)};
+                        if (dataBank!=null) {
+                            for (var i = 0; i < dataBank.length; i++) {
+                                addRow('#userTableList', userIdx, userTpl, dataBank[i]);
+                                userIdx = userIdx + 1;
+                            }
+                        }
+                    });
+
+                    function addRow(list, idx, tpl, row){
+                        var idx1 = 0;
+                        if('#userTableList'==list){
+                            idx1 = $("#userTableList tr").length
+                        }else if('#officeTableList'==list){
+                            idx1 = $("#officeTableList tr").length
+                        }
+                        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, 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){
+                        $(obj).parent().parent().remove();
+                    }
+                </script>
+            </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="listAttachment" class="table table-bordered table-condensed no-bottom-margin details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th>文件预览</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${workSendMessage.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 class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workClientAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+	</form:form>
+    </div>
+</div>
+</body>
+</html>

+ 270 - 0
src/main/webapp/webpage/modules/worksinglewage/workSingleWageAudit.jsp

@@ -0,0 +1,270 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>单项工资</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		img {width: 50px; height: 50px;}
+	</style>
+	<script type="text/javascript" src="${ctxStatic}/ckeditor/ckeditor.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() {
+            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();
+            }
+            $("#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>
+
+</head>
+<body >
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workSingleWage" enctype="multipart/form-data" action="${ctx}/worksinglewage/workSingleWage/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">
+				<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">
+						<form:input path="name" htmlEscape="false" readonly="true"  maxlength="64" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>发放月份:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input id="month" name="month" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+								   value="${workSingleWage.month}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workSingleWage.status}">${fns:getDictLabel(workSingleWage.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"><span class="require-item">*</span>工资项:</label>
+					<div class="layui-input-block with-icon">
+						<input  type="text" readonly="readonly" maxlength="20" class="form-control layui-input"
+							   value="${workSingleWage.workSalaryItem.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">
+						<form:input path="money" htmlEscape="false"  maxlength="20" 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 path="createBy.name" htmlEscape="false" readonly="true" maxlength="20" 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 id="createDate" name="createDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+                               value="<fmt:formatDate value="${workSingleWage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">分公司人数:</label>
+					<div class="layui-input-block">
+						<form:input path="branchCount" htmlEscape="false" readonly="true" maxlength="20" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">发放人数:</label>
+					<div class="layui-input-block">
+						<form:input path="grantCount" htmlEscape="false" readonly="true" maxlength="20" class="form-control layui-input required"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>规则使用范围-部门</h2></div>
+				<div id="officeId2" style="display:none">
+					<button style="font-size:14px;" type="button" onclick="addInfo()" class="nav-btn nav-btn-add"><i class="fa fa-plus"></i>&nbsp;选择
+					</button>
+				</div>
+				<table id="officeTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th class="hide"></th>
+						<th>部门</th>
+						<th>操作</th>
+					</tr>
+					</thead>
+					<tbody id="officeTableList">
+					</tbody>
+				</table>
+				<script type="text/template" id="officeTpl">//<!--
+                    <tr id="officeList{{idx}}">
+                        <td class="hide">
+                            <input id="officeList{{idx}}_id" name="officeList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control officeId"/>
+                        </td>
+                        <td>
+                            {{row.name}}
+                        </td>
+                        <td class="text-center op-td">
+                        </td>
+                    </tr>//-->
+				</script>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>规则使用范围-成员</h2></div>
+				<div id="userId2" style="display:none">
+					<button style="font-size:14px;" type="button" onclick="addInfo()" class="nav-btn nav-btn-add"><i class="fa fa-plus"></i>&nbsp;选择
+					</button>
+				</div>
+				<table id="userTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th class="hide"></th>
+						<th>姓名</th>
+						<th>部门</th>
+						<th>操作</th>
+					</tr>
+					</thead>
+					<tbody id="userTableList">
+					</tbody>
+				</table>
+				<script type="text/template" id="userTpl">//<!--
+                    <tr id="userList{{idx}}">
+                        <td class="hide">
+                            <input id="userList{{idx}}_id" name="userList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control userId"/>
+                        </td>
+                        <td>
+                        {{row.name}}
+                        </td>
+                        <td>
+                        {{row.officeName}}
+                        </td>
+                        <td class="text-center op-td">
+                        </td>
+                    </tr>//-->
+				</script>
+				<script type="text/javascript">
+                    var userIdx = 0, userTpl = $("#userTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var officeIdx = 0, officeTpl = $("#officeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+                    $(document).ready(function() {
+                        var data = ${fns:toJson(workSingleWage.officeList)};
+                        if (data!=null) {
+                            for (var i = 0; i < data.length; i++) {
+                                addRow('#officeTableList', officeIdx, officeTpl, data[i]);
+                                officeIdx = officeIdx + 1;
+                            }
+                        }
+                        var dataBank = ${fns:toJson(workSingleWage.userList)};
+                        if (dataBank!=null) {
+                            for (var i = 0; i < dataBank.length; i++) {
+                                addRow('#userTableList', userIdx, userTpl, dataBank[i]);
+                                userIdx = userIdx + 1;
+                            }
+                        }
+                    });
+
+                    function addRow(list, idx, tpl, row){
+                        var idx1 = 0;
+                        if('#userTableList'==list){
+                            idx1 = $("#userTableList tr").length
+                        }else if('#officeTableList'==list){
+                            idx1 = $("#officeTableList tr").length
+                        }
+                        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, 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){
+                        var delFlag = $(prefix+"_delFlag");
+                        delFlag.val("1");
+                        $(obj).parent().parent().hide();
+                    }
+				</script>
+			</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="${workSingleWage.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workSingleWage.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 328 - 0
src/main/webapp/webpage/modules/worksinglewage/workSingleWageForm.jsp

@@ -0,0 +1,328 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>单项工资</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		img {width: 50px; height: 50px;}
+	</style>
+	<script type="text/javascript" src="${ctxStatic}/ckeditor/ckeditor.js"></script>
+	<script type="text/javascript" language="JavaScript" for="window" event="onload">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 2){
+                    $("#inputForm").attr("action","${ctx}/worksinglewage/workSingleWage/store");
+                }else{
+                    $("#inputForm").attr("action","${ctx}/worksinglewage/workSingleWage/save");
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            //只做查看时,禁用掉以下标签
+        });
+	</script>
+	<script type="text/javascript">
+        function changeUser(ids,names,parents) {
+            var split = ids.split(',');
+            var split2 = names.split(',');
+            $("#userTableList").html("");
+            userIdx=0;
+            for(var i=0;i<split.length;i++){
+                var id = split[i];
+                if(id==''||id==null){
+                    continue;
+                }else {
+                    var obj = {'id':id,'name':split2[i],'officeName':parents[i]};
+                    addRow('#userTableList',userIdx,userTpl,obj);
+                    userIdx+=1;
+                }
+            }
+        }
+
+        function changeOffice(ids,names,parentIds) {
+            $("#officeTableList").html("");
+            officeIdx=0;
+            for(var i=0;i<ids.length;i++){
+                var obj = {'id':ids[i],'name':parentIds[i]};
+                addRow('#officeTableList',officeIdx,officeTpl,obj);
+                officeIdx+=1;
+            }
+        }
+        function getSelectOfficeIds() {
+            var selectedIds = "";
+            var pidArr = $("#officeTableList tr .officeId");
+            for(var i=0;i<pidArr.length;i++){
+                selectedIds+=$(pidArr[i]).val();
+                selectedIds+=",";
+            }
+            return selectedIds;
+        }
+        function getSelectUserIds() {
+            var selectedIds = "";
+            var pidArr = $("#userTableList tr .userId");
+            for(var i=0;i<pidArr.length;i++){
+                selectedIds+=$(pidArr[i]).val();
+                selectedIds+=",";
+            }
+            return selectedIds;
+        }
+
+        function addRow(list, idx, tpl, row){
+            var idx2 = $("#workAttendancePlaces tr").length;
+            if(list == '#workAttendancePlaces'){
+                bornTemplete(list, idx, tpl, row, idx2);
+            }
+        }
+        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 dispSimpleName(obj) {
+			if(obj == 1){
+			    $("#month").val('${nowm}')
+			}else {
+                $("#month").val('${oldm}')
+            }
+        }
+	</script>
+
+</head>
+<body >
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workSingleWage" enctype="multipart/form-data"  method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="grantCount"/>
+			<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 with-icon">
+						<form:input path="name" htmlEscape="false"  maxlength="64" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>发放月份:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:select path="nowMonth" class="form-control required simple-select" style="width:25%;float:left;" onchange="dispSimpleName(this.value);">
+								<form:options items="${fns:getDictList('now_month')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+							<input id="month" name="month" type="text" style="width:75%;" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+								   value="${workSingleWage.month}"/>
+							<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"><span class="require-item">*</span>工资项:</label>
+					<div class="layui-input-block with-icon">
+						<sys:gridselectcallproject url="${ctx}/worksinglewage/workSingleWage/selectWage" id="workSalaryItem" name="workSalaryItem.id"  value="${workSingleWage.workSalaryItem.id}"  title="选择工资项" labelName="workSalaryItem.name"
+												   labelValue="${workSingleWage.workSalaryItem.name}" cssClass="form-control required layui-input" fieldLabels="工资项" fieldKeys="workSalaryItemName" searchLabel="工资项名称" searchKey="workSalaryItemName" ></sys:gridselectcallproject>
+					</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="money" htmlEscape="false"  maxlength="20" class="form-control number layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">发放人:</label>
+					<div class="layui-input-block">
+						<form:input path="createBy.name" htmlEscape="false" readonly="true" maxlength="20" class="form-control layui-input required"/>
+					</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" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+                               value="<fmt:formatDate value="${workSingleWage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">分公司人数:</label>
+					<div class="layui-input-block">
+						<form:input path="branchCount" htmlEscape="false" readonly="true" maxlength="20" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<%--<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">发放人数:</label>
+					<div class="layui-input-block">
+						<form:input path="grantCount" htmlEscape="false" readonly="true" maxlength="20" class="form-control layui-input required"/>
+					</div>
+				</div>--%>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>规则使用范围-部门</h2></div>
+				<div id="officeId1" class="layui-item nav-btns">
+                    <sys:treeselectoffices id="offices" name="" value="" labelName="memberNameStr" labelValue=""
+                                           retnParent="true" checked="true" notAllowSelectParent="true" title="部门" url="/sys/office/treeDataBranchOffice?type=2"  cssClass="form-control required" allowClear="true"/>
+				</div>
+				<div id="officeId2" style="display:none">
+					<button style="font-size:14px;" type="button" onclick="addInfo()" class="nav-btn nav-btn-add"><i class="fa fa-plus"></i>&nbsp;选择
+					</button>
+				</div>
+				<table id="officeTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th class="hide"></th>
+						<th>部门</th>
+						<th>操作</th>
+					</tr>
+					</thead>
+					<tbody id="officeTableList">
+					</tbody>
+				</table>
+				<script type="text/template" id="officeTpl">//<!--
+                    <tr id="officeList{{idx}}">
+                        <td class="hide">
+                            <input id="officeList{{idx}}_id" name="officeList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control officeId"/>
+                            <input id="officeList{{idx}}_delFlag" name="officeList[{{idx}}].delFlag" readonly="true" value="0" type="hidden" class="form-control delFlag"/>
+                        </td>
+                        <td>
+                            {{row.name}}
+                        </td>
+                        <td class="text-center op-td">
+                                    <a href=javascript:void(0); onclick="delRow(this, '#officeList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+                        </td>
+                    </tr>//-->
+				</script>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>规则使用范围-成员</h2></div>
+				<div id="userId1" class="layui-item nav-btns">
+                    <sys:treeselectusers id="users" name="" value="" labelName="memberNameStr" labelValue=""
+                                         retnParent="true" title="用户" url="/sys/office/treeDataBranchOffice?type=3" checked="true" cssClass="form-control required" allowClear="true" notAllowSelectParent="true"/>
+				</div>
+				<div id="userId2" style="display:none">
+					<button style="font-size:14px;" type="button" onclick="addInfo()" class="nav-btn nav-btn-add"><i class="fa fa-plus"></i>&nbsp;选择
+					</button>
+				</div>
+				<table id="userTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th class="hide"></th>
+						<th>姓名</th>
+						<th>部门</th>
+						<th>操作</th>
+					</tr>
+					</thead>
+					<tbody id="userTableList">
+					</tbody>
+				</table>
+				<script type="text/template" id="userTpl">//<!--
+                    <tr id="userList{{idx}}">
+                        <td class="hide">
+                            <input id="userList{{idx}}_id" name="userList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control userId"/>
+                            <input id="userList{{idx}}_delFlag" name="userList[{{idx}}].delFlag" readonly="true" value="0" type="hidden" class="form-control delFlag"/>
+                        </td>
+                        <td>
+                        {{row.name}}
+                        </td>
+                        <td>
+                        {{row.officeName}}
+                        </td>
+                        <td class="text-center op-td">
+                                    <a href=javascript:void(0); onclick="delRow(this, '#userList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+                        </td>
+                    </tr>//-->
+				</script>
+				<script type="text/javascript">
+                    var userIdx = 0, userTpl = $("#userTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var officeIdx = 0, officeTpl = $("#officeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+                    $(document).ready(function() {
+                        var data = ${fns:toJson(workSingleWage.officeList)};
+                        if (data!=null) {
+                            for (var i = 0; i < data.length; i++) {
+                                addRow('#officeTableList', officeIdx, officeTpl, data[i]);
+                                officeIdx = officeIdx + 1;
+                            }
+                        }
+                        var dataBank = ${fns:toJson(workSingleWage.userList)};
+                        if (dataBank!=null) {
+                            for (var i = 0; i < dataBank.length; i++) {
+                                addRow('#userTableList', userIdx, userTpl, dataBank[i]);
+                                userIdx = userIdx + 1;
+                            }
+                        }
+                    });
+
+                    function addRow(list, idx, tpl, row){
+                        var idx1 = 0;
+                        if('#userTableList'==list){
+                            idx1 = $("#userTableList tr").length
+                        }else if('#officeTableList'==list){
+                            idx1 = $("#officeTableList tr").length
+                        }
+                        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, 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){
+                        var delFlag = $(prefix+"_delFlag");
+                        delFlag.val("1");
+                        $(obj).parent().parent().hide();
+                    }
+				</script>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 319 - 0
src/main/webapp/webpage/modules/worksinglewage/workSingleWageList.jsp

@@ -0,0 +1,319 @@
+<%@ 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: '#startDate', //目标元素。由于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,
+                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>
+	<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="workSingleWage" action="${ctx}/worksinglewage/workSingleWage/" 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}"/>
+					<div class="commonQuery lw8">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">发放名称:</label>
+							<div class="layui-input-block">
+								<form:input id="name" path="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="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="${workSingleWage.startDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+								</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="${workSingleWage.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+								</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 with-icon">
+								<sys:gridselectcallproject url="${ctx}/worksinglewage/workSingleWage/selectWage" id="workSalaryItem" name="workSalaryItem.id"  value="${workSingleWage.workSalaryItem.id}"  title="选择工资项" labelName="workSalaryItem.name"
+														   labelValue="${workSingleWage.workSalaryItem.name}" cssClass="form-control required layui-input" fieldLabels="工资项" fieldKeys="workSalaryItemName" searchLabel="工资项名称" searchKey="workSalaryItemName" ></sys:gridselectcallproject>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">发放金额:</label>
+							<div class="layui-input-block">
+								<form:input path="minmoney" htmlEscape="false"  maxlength="20" class="form-control number layui-input required query-group"/>
+								<span class="group-sep">-</span>
+								<form:input path="maxmoney" htmlEscape="false"  maxlength="20" class="form-control number layui-input required query-group"/>
+							</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="worksinglewage:workSingleWage:add">
+						<button class="nav-btn nav-btn-add" title="单笔工资项发放" onclick="openDialogre('单笔工资项发放','${ctx}/worksinglewage/workSingleWage/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:'name',align:'center',title: '发放名称',minWidth:160,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看单笔工资项发放', '${ctx}/worksinglewage/workSingleWage/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                            "<span title=" + d.name + ">" + d.name + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'month',align:'center', title: '发放月份',minWidth:160,templet:function(d){
+                        return "<span title='"+ d.month +"'>" + d.month + "</span>";
+                    }}
+                 ,{field:'workSalaryItem',align:'center', title: '工资项',minWidth:160,templet:function(d){
+                         return "<span title='"+ d.workSalaryItem +"'>" + d.workSalaryItem + "</span>";
+                     }}
+                 ,{field:'branchCount',align:'center', title: '分公司人数',minWidth:160,templet:function(d){
+                         return "<span title='"+ d.branchCount +"'>" + d.branchCount + "</span>";
+                     }}
+                 ,{field:'grantCount', align:'center',title: '发放人数',minWidth:160,templet:function(d){
+                         return "<span title='"+ d.grantCount +"'>" + d.grantCount + "</span>";
+                     }}
+                 ,{field:'money', align:'center',title: '发放金额',minWidth:160,templet:function(d){
+                         return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                     }}
+                 ,{ title: '状态', align:'center',width:70,templet:function(d){
+                         var st = getAuditState(d.status);
+                         if(st.action)
+                             var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/worksinglewage/workSingleWage/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;
+                    }}
+                ,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
+                        ////对操作进行初始化
+                        var xml = "";
+                        if(d.cancancel != undefined && d.cancancel == "1")
+                            xml += "<a href=\"${ctx}/worksinglewage/workSingleWage/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}/worksinglewage/workSingleWage/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}/worksinglewage/workSingleWage/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}/worksinglewage/workSingleWage/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}/worksinglewage/workSingleWage/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="workSingleWage" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workSingleWage.id}"
+                    ,"name":"${workSingleWage.name}"
+                    ,"month":"${workSingleWage.month}"
+                    ,"workSalaryItem":"${workSingleWage.workSalaryItem.name}"
+                    ,"branchCount":"${workSingleWage.branchCount}"
+                    ,"grantCount":"${workSingleWage.grantCount}"
+                    ,"money":"<fmt:formatNumber value="${workSingleWage.money}" pattern="#,#0.00"/>"
+                    ,"status":"${workSingleWage.status}"
+                    <shiro:hasPermission name="worksinglewage:workSingleWage:del">
+                    ,"candelete":
+                        <c:if test="${fns:getUser().id == workSingleWage.createBy.id && (workSingleWage.status == '1' or workSingleWage.status == '3' or workSingleWage.status == '4')}">"1"</c:if>
+                    <c:if test="${fns:getUser().id != workSingleWage.createBy.id || (workSingleWage.status != '1' and workSingleWage.status != '3' and workSingleWage.status != '4')}">"0"</c:if>
+                    </shiro:hasPermission>
+                    ,"cancancel":
+                        <c:if test="${workSingleWage.status == '2' && fns:getUser().id == workSingleWage.createBy.id}">"1"</c:if>
+                    <c:if test="${workSingleWage.status != '2' || fns:getUser().id != workSingleWage.createBy.id}">"0"</c:if>
+                    <shiro:hasPermission name="worksinglewage:workSingleWage:edit">
+                    ,"canedit1":
+                        <c:if test="${fns:getUser().id == workSingleWage.createBy.id && workSingleWage.status == '1' }">"1"</c:if>
+                    <c:if test="${fns:getUser().id != workSingleWage.createBy.id || workSingleWage.status != '1' }">"0"</c:if>
+                    ,"canedit2":
+                        <c:if test="${fns:getUser().id == workSingleWage.createBy.id && workSingleWage.status == '4'  && fns:getUser().id == workSingleWage.createBy.id}">"1"</c:if>
+                    <c:if test="${fns:getUser().id != workSingleWage.createBy.id || workSingleWage.status != '4'  || fns:getUser().id != workSingleWage.createBy.id}">"0"</c:if>
+                    ,"canedit3":
+                        <c:if test="${workSingleWage.status == '3' && fns:getUser().id == workSingleWage.createBy.id}">"1"</c:if>
+                    <c:if test="${workSingleWage.status != '3' || fns:getUser().id != workSingleWage.createBy.id}">"0"</c:if>
+                    </shiro:hasPermission>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 335 - 0
src/main/webapp/webpage/modules/worksinglewage/workSingleWageModifyApply.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"/>
+	<style type="text/css">
+		img {width: 50px; height: 50px;}
+	</style>
+	<script type="text/javascript" src="${ctxStatic}/ckeditor/ckeditor.js"></script>
+	<script type="text/javascript" language="JavaScript" for="window" event="onload">
+        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);
+                    }
+                }
+            });
+            //只做查看时,禁用掉以下标签
+        });
+	</script>
+	<script type="text/javascript">
+        function changeUser(ids,names,parents) {
+            var split = ids.split(',');
+            var split2 = names.split(',');
+            $("#userTableList").html("");
+            userIdx=0;
+            for(var i=0;i<split.length;i++){
+                var id = split[i];
+                if(id==''||id==null){
+                    continue;
+                }else {
+                    var obj = {'id':id,'name':split2[i],'officeName':parents[i]};
+                    addRow('#userTableList',userIdx,userTpl,obj);
+                    userIdx+=1;
+                }
+            }
+        }
+
+        function changeOffice(ids,names,parentIds) {
+            $("#officeTableList").html("");
+            officeIdx=0;
+            for(var i=0;i<ids.length;i++){
+                var obj = {'id':ids[i],'name':parentIds[i]};
+                addRow('#officeTableList',officeIdx,officeTpl,obj);
+                officeIdx+=1;
+            }
+        }
+        function getSelectOfficeIds() {
+            var selectedIds = "";
+            var pidArr = $("#officeTableList tr .officeId");
+            for(var i=0;i<pidArr.length;i++){
+                selectedIds+=$(pidArr[i]).val();
+                selectedIds+=",";
+            }
+            return selectedIds;
+        }
+        function getSelectUserIds() {
+            var selectedIds = "";
+            var pidArr = $("#userTableList tr .userId");
+            for(var i=0;i<pidArr.length;i++){
+                selectedIds+=$(pidArr[i]).val();
+                selectedIds+=",";
+            }
+            return selectedIds;
+        }
+
+        function addRow(list, idx, tpl, row){
+            var idx2 = $("#workAttendancePlaces tr").length;
+            if(list == '#workAttendancePlaces'){
+                bornTemplete(list, idx, tpl, row, idx2);
+            }
+        }
+        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 dispSimpleName(obj) {
+			if(obj == 1){
+			    $("#month").val('${nowm}')
+			}else {
+                $("#month").val('${oldm}')
+            }
+        }
+	</script>
+
+</head>
+<body >
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workSingleWage" enctype="multipart/form-data" action="${ctx}/worksinglewage/workSingleWage/saveAudit" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="grantCount"/>
+			<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">
+				<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">
+						<form:input path="name" htmlEscape="false"  maxlength="64" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>发放月份:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:select path="nowMonth" class="form-control required simple-select" style="width:25%;float:left;" onchange="dispSimpleName(this.value);">
+								<form:options items="${fns:getDictList('now_month')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+							<input id="month" name="month" type="text" style="width:75%;" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+								   value="${workSingleWage.month}"/>
+							<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"><span class="require-item">*</span>工资项:</label>
+					<div class="layui-input-block with-icon">
+						<sys:gridselectcallproject url="${ctx}/worksinglewage/workSingleWage/selectWage" id="project" name="workSalaryItem.id"  value="${workSingleWage.workSalaryItem.id}"  title="选择工资项" labelName="workSalaryItem.name"
+												   labelValue="${workSingleWage.workSalaryItem.name}" cssClass="form-control required layui-input" fieldLabels="工资项" fieldKeys="workSalaryItemName" searchLabel="工资项名称" searchKey="workSalaryItemName" ></sys:gridselectcallproject>
+					</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="money" htmlEscape="false"  maxlength="20" class="form-control number layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">发放人:</label>
+					<div class="layui-input-block">
+						<form:input path="createBy.name" htmlEscape="false" readonly="true" maxlength="20" class="form-control layui-input required"/>
+					</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" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+                               value="<fmt:formatDate value="${workSingleWage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">分公司人数:</label>
+					<div class="layui-input-block">
+						<form:input path="branchCount" htmlEscape="false" readonly="true" maxlength="20" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<%--<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">发放人数:</label>
+					<div class="layui-input-block">
+						<form:input path="grantCount" htmlEscape="false" readonly="true" maxlength="20" class="form-control layui-input required"/>
+					</div>
+				</div>--%>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>规则使用范围-部门</h2></div>
+				<div id="officeId1" class="layui-item nav-btns">
+					<sys:treeselectoffices id="offices" name="" value="" labelName="memberNameStr" labelValue=""
+										   retnParent="true" checked="true" notAllowSelectParent="true" title="部门" url="/sys/office/treeDataBranchOffice?type=2"  cssClass="form-control required" allowClear="true"/>
+				</div>
+				<div id="officeId2" style="display:none">
+					<button style="font-size:14px;" type="button" onclick="addInfo()" class="nav-btn nav-btn-add"><i class="fa fa-plus"></i>&nbsp;选择
+					</button>
+				</div>
+				<table id="officeTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th class="hide"></th>
+						<th>部门</th>
+						<th>操作</th>
+					</tr>
+					</thead>
+					<tbody id="officeTableList">
+					</tbody>
+				</table>
+				<script type="text/template" id="officeTpl">//<!--
+                    <tr id="officeList{{idx}}">
+                        <td class="hide">
+                            <input id="officeList{{idx}}_id" name="officeList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control officeId"/>
+                            <input id="officeList{{idx}}_delFlag" name="officeList[{{idx}}].delFlag" readonly="true" value="0" type="hidden" class="form-control delFlag"/>
+                        </td>
+                        <td>
+                            {{row.name}}
+                        </td>
+                        <td class="text-center op-td">
+                                    <a href=javascript:void(0); onclick="delRow(this, '#officeList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+                        </td>
+                    </tr>//-->
+				</script>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>规则使用范围-成员</h2></div>
+				<div id="userId1" class="layui-item nav-btns">
+					<sys:treeselectusers id="users" name="" value="" labelName="memberNameStr" labelValue=""
+										 retnParent="true" title="用户" url="/sys/office/treeDataBranchOffice?type=3" checked="true" cssClass="form-control required" allowClear="true" notAllowSelectParent="true"/>
+				</div>
+				<div id="userId2" style="display:none">
+					<button style="font-size:14px;" type="button" onclick="addInfo()" class="nav-btn nav-btn-add"><i class="fa fa-plus"></i>&nbsp;选择
+					</button>
+				</div>
+				<table id="userTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th class="hide"></th>
+						<th>姓名</th>
+						<th>部门</th>
+						<th>操作</th>
+					</tr>
+					</thead>
+					<tbody id="userTableList">
+					</tbody>
+				</table>
+				<script type="text/template" id="userTpl">//<!--
+                    <tr id="userList{{idx}}">
+                        <td class="hide">
+                            <input id="userList{{idx}}_id" name="userList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control userId"/>
+                            <input id="userList{{idx}}_delFlag" name="userList[{{idx}}].delFlag" readonly="true" value="0" type="hidden" class="form-control delFlag"/>
+                        </td>
+                        <td>
+                        {{row.name}}
+                        </td>
+                        <td>
+                        {{row.officeName}}
+                        </td>
+                        <td class="text-center op-td">
+                                    <a href=javascript:void(0); onclick="delRow(this, '#userList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+                        </td>
+                    </tr>//-->
+				</script>
+				<script type="text/javascript">
+                    var userIdx = 0, userTpl = $("#userTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var officeIdx = 0, officeTpl = $("#officeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+                    $(document).ready(function() {
+                        var data = ${fns:toJson(workSingleWage.officeList)};
+                        if (data!=null) {
+                            for (var i = 0; i < data.length; i++) {
+                                addRow('#officeTableList', officeIdx, officeTpl, data[i]);
+                                officeIdx = officeIdx + 1;
+                            }
+                        }
+                        var dataBank = ${fns:toJson(workSingleWage.userList)};
+                        if (dataBank!=null) {
+                            for (var i = 0; i < dataBank.length; i++) {
+                                addRow('#userTableList', userIdx, userTpl, dataBank[i]);
+                                userIdx = userIdx + 1;
+                            }
+                        }
+                    });
+
+                    function addRow(list, idx, tpl, row){
+                        var idx1 = 0;
+                        if('#userTableList'==list){
+                            idx1 = $("#userTableList tr").length
+                        }else if('#officeTableList'==list){
+                            idx1 = $("#officeTableList tr").length
+                        }
+                        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, 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){
+                        var delFlag = $(prefix+"_delFlag");
+                        delFlag.val("1");
+                        $(obj).parent().parent().hide();
+                    }
+				</script>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 206 - 0
src/main/webapp/webpage/modules/worksinglewage/workSingleWageView.jsp

@@ -0,0 +1,206 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>单项工资</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		img {width: 50px; height: 50px;}
+	</style>
+	<script type="text/javascript" src="${ctxStatic}/ckeditor/ckeditor.js"></script>
+	<script type="text/javascript" language="JavaScript" for="window" event="onload">
+	</script>
+	<script type="text/javascript">
+	</script>
+
+</head>
+<body >
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workSingleWage" enctype="multipart/form-data"  method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="grantCount"/>
+			<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 with-icon">
+						<form:input path="name" htmlEscape="false" readonly="true"  maxlength="64" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>发放月份:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<input id="month" name="month" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+								   value="${workSingleWage.month}"/>
+							<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"><span class="require-item">*</span>工资项:</label>
+					<div class="layui-input-block with-icon">
+						<input  type="text" readonly="readonly" maxlength="20" class="form-control layui-input"
+							   value="${workSingleWage.workSalaryItem.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">
+						<form:input path="money" htmlEscape="false"  maxlength="20" 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 path="createBy.name" htmlEscape="false" readonly="true" maxlength="20" 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 id="createDate" name="createDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+                               value="<fmt:formatDate value="${workSingleWage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">分公司人数:</label>
+					<div class="layui-input-block">
+						<form:input path="branchCount" htmlEscape="false" readonly="true" maxlength="20" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">发放人数:</label>
+					<div class="layui-input-block">
+						<form:input path="grantCount" htmlEscape="false" readonly="true" maxlength="20" class="form-control layui-input required"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>规则使用范围-部门</h2></div>
+				<div id="officeId2" style="display:none">
+					<button style="font-size:14px;" type="button" onclick="addInfo()" class="nav-btn nav-btn-add"><i class="fa fa-plus"></i>&nbsp;选择
+					</button>
+				</div>
+				<table id="officeTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th class="hide"></th>
+						<th>部门</th>
+						<th>操作</th>
+					</tr>
+					</thead>
+					<tbody id="officeTableList">
+					</tbody>
+				</table>
+				<script type="text/template" id="officeTpl">//<!--
+                    <tr id="officeList{{idx}}">
+                        <td class="hide">
+                            <input id="officeList{{idx}}_id" name="officeList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control officeId"/>
+                        </td>
+                        <td>
+                            {{row.name}}
+                        </td>
+                        <td class="text-center op-td">
+                        </td>
+                    </tr>//-->
+				</script>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>规则使用范围-成员</h2></div>
+				<div id="userId2" style="display:none">
+					<button style="font-size:14px;" type="button" onclick="addInfo()" class="nav-btn nav-btn-add"><i class="fa fa-plus"></i>&nbsp;选择
+					</button>
+				</div>
+				<table id="userTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th class="hide"></th>
+						<th>姓名</th>
+						<th>部门</th>
+						<th>操作</th>
+					</tr>
+					</thead>
+					<tbody id="userTableList">
+					</tbody>
+				</table>
+				<script type="text/template" id="userTpl">//<!--
+                    <tr id="userList{{idx}}">
+                        <td class="hide">
+                            <input id="userList{{idx}}_id" name="userList[{{idx}}].id" readonly="true" value="{{row.id}}" type="hidden" class="form-control userId"/>
+                        </td>
+                        <td>
+                        {{row.name}}
+                        </td>
+                        <td>
+                        {{row.officeName}}
+                        </td>
+                        <td class="text-center op-td">
+                        </td>
+                    </tr>//-->
+				</script>
+				<script type="text/javascript">
+                    var userIdx = 0, userTpl = $("#userTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var officeIdx = 0, officeTpl = $("#officeTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+                    $(document).ready(function() {
+                        var data = ${fns:toJson(workSingleWage.officeList)};
+                        if (data!=null) {
+                            for (var i = 0; i < data.length; i++) {
+                                addRow('#officeTableList', officeIdx, officeTpl, data[i]);
+                                officeIdx = officeIdx + 1;
+                            }
+                        }
+                        var dataBank = ${fns:toJson(workSingleWage.userList)};
+                        if (dataBank!=null) {
+                            for (var i = 0; i < dataBank.length; i++) {
+                                addRow('#userTableList', userIdx, userTpl, dataBank[i]);
+                                userIdx = userIdx + 1;
+                            }
+                        }
+                    });
+
+                    function addRow(list, idx, tpl, row){
+                        var idx1 = 0;
+                        if('#userTableList'==list){
+                            idx1 = $("#userTableList tr").length
+                        }else if('#officeTableList'==list){
+                            idx1 = $("#officeTableList tr").length
+                        }
+                        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, 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){
+                        var delFlag = $(prefix+"_delFlag");
+                        delFlag.val("1");
+                        $(obj).parent().parent().hide();
+                    }
+				</script>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 92 - 0
src/main/webapp/webpage/modules/workstaff/infoList.jsp

@@ -0,0 +1,92 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>员工信息</title>
+	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function() {
+
+        });
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <div class="layui-row">
+
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <%--<div class="nav-btns">--%>
+                    <%--<shiro:hasPermission name="workstaff:workStaffBasicInfo:add">--%>
+                        <%--<table:addRow url="${ctx}/workstaff/workStaffBasicInfo/form" title="员工信息"></table:addRow><!-- 增加按钮 -->--%>
+                    <%--</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="dataTable" lay-filter="dataTable"></table>
+
+                <!-- 分页代码 -->
+                <%--<table:page page="${page}"></table:page>--%>
+                <%--<div style="clear: both;"></div>--%>
+            </div>
+            <%--<a href="javascript:window.opener=null;window.open('','_self');window.close();">关闭</a>--%>
+        </div>
+
+    </div>
+    <div id="changewidth"></div>
+</div>
+<script src="${ctxp}/static/layui/layui.js"></script>
+<script>
+    layui.use(['table','form','layedit', 'laydate'], function(){
+        var table = layui.table //生产数据表格
+            ,form = layui.form;
+        form.render();//表格渲染
+        table.render({
+            limit:100
+            ,elem: '#dataTable'
+            ,page: false
+            ,cols: [[
+                {field:'name',align:'center', title: '姓名',minWidth:100}
+                ,{field:'idCard',align:'center', title: '身份证号码',minWidth:150}
+            ]]
+            ,data: [
+                <c:if test="${ not empty list}">
+                <c:forEach items="${list}" var="workStaffBasicInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "name":"<c:out value="${workStaffBasicInfo.name}" escapeXml="false"/>"
+                    ,"idCard":"<c:out value="${workStaffBasicInfo.idCard}" escapeXml="true"/>"
+
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+        table.on('rowDouble(dataTable)', function(obj){
+            var card = obj.data.idCard;
+            parent.$("#username").val(card)
+            parent.layer.closeAll();
+        });
+
+    })
+
+    // resizeListTable(130);/*消除由于有竖向滚动条造成table出现横向滚动条*/
+    // $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 270 - 0
src/main/webapp/webpage/modules/workstaff/workAddressBookList.jsp

@@ -0,0 +1,270 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>员工通讯录</title>
+	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </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: '#beginEntryDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endEntryDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+
+        });
+
+        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,
+                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(index) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn2: function (index) {
+
+                }
+            });
+        }
+
+        function setParentInfo(ids,names,nos,salarys){
+            return;
+        }
+	</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="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfo/addressbook" 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">
+                            <form:input path="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 with-icon">
+                            <sys:treeselect id="office" name="office.id" value="${workStaffBasicInfo.office.id}" labelName="office.name" labelValue="${workStaffBasicInfo.office.name}"
+                                            title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input required" notAllowSelectParent="true" isAll="true"/>
+                        </div>
+                    </div>
+                    <div class="layui-item athird fr">
+                        <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="no" htmlEscape="false" maxlength="10"  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="mobile" 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 with-icon">--%>
+                            <%--<sys:treeselect id="office" name="office.id" value="${workStaffBasicInfo.office.id}" labelName="office.name" labelValue="${workStaffBasicInfo.office.name}"--%>
+                                            <%--title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input required" notAllowSelectParent="true"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">职级:</label>
+                        <div class="layui-input-block with-icon">
+                            <sys:treeselectJobGrade id="jobGrade" name="jobGrade.id" value="${workStaffBasicInfo.jobGrade.id}" labelName="jobGrade.name" labelValue="${workStaffBasicInfo.jobGrade.name}"
+                                                    title="职级类型" url="/workjobgrade/workJobGrade/treeData"  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 required">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('staff_status')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
+                    <%--<div class="layui-item query athird">--%>
+                        <%--<label class="layui-form-label">入职日期:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input id="beginEntryDate" name="beginEntryDate" type="text" placeholder="开始时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"--%>
+                                   <%--value="<fmt:formatDate value="${workStaffBasicInfo.beginEntryDate}" pattern="yyyy-MM-dd"/>"/>--%>
+                            <%--</input>--%>
+                            <%--<span class="group-sep">-</span>--%>
+                            <%--<input id="endEntryDate" name="endEntryDate" type="text" placeholder="结束时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"--%>
+                                   <%--value="<fmt:formatDate value="${workStaffBasicInfo.endEntryDate}" pattern="yyyy-MM-dd"/>"/>--%>
+                            <%--</input>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item query athird">--%>
+                        <%--<label class="layui-form-label">操作:</label>--%>
+
+                    <%--</div>--%>
+                </div>
+            </form:form>
+	        </div>
+	    </div>
+
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <%--<shiro:hasPermission name="workstaff:workStaffBasicInfo:add">--%>
+                        <%--<table:addRow url="${ctx}/workstaff/workStaffBasicInfo/form" title="员工信息"></table:addRow><!-- 增加按钮 -->--%>
+                    <%--</shiro:hasPermission>--%>
+                    <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+                    <div style="clear: both;"></div>
+                </div>
+                <table class="oa-table layui-table" id="contentTable"></table>
+
+                <!-- 分页代码 -->
+                <table:page page="${page}"></table:page>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
+    </div>
+    <div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'no',align:'center', title: '工号',minWidth:100,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfo/addressbookview?id="+d.id+"','95%','95%')\">" +
+                            "<span title=" + d.no + ">" + d.no + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'name',align:'center', title: '姓名',minWidth:100,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfo/addressbookview?id="+d.id+"','95%','95%')\">" +
+                        "<span title=" + d.name + ">" + d.name + "</span></a>";
+                    return xml;
+                }}
+                // ,{field:'idCard',align:'center', title: '身份证号码',minWidth:150}
+                ,{field:'mobile',align:'center', title: '移动电话', minWidth:100}
+                ,{field:'office',align:'center', title: '部门', minWidth:100}
+                // ,{field:'role',align:'center', title: '岗位', minWidth:100}
+                ,{field:'jobGrade',align:'center', title: '职级', minWidth:100}
+                ,{field:'status',align:'center', title: '员工状态', minWidth:80}
+                // ,{field:'entryDate', align:'center',sort:true,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=\"javascript:void(0)\" onclick=\"openDialog('修改', '${ctx}/workstaff/workStaffBasicInfo/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}/workstaff/workStaffBasicInfo/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="workStaffBasicInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workStaffBasicInfo.id}"
+                    <%--,"role":"${workStaffBasicInfo.roleName}"--%>
+                    ,"no":"<c:out value="${workStaffBasicInfo.no}" escapeXml="true"/>"
+                    ,"name":"<c:out value="${workStaffBasicInfo.name}" escapeXml="false"/>"
+                    <%--,"idCard":"<c:out value="${workStaffBasicInfo.idCard}" escapeXml="true"/>"--%>
+                    ,'mobile':"<c:out value="${workStaffBasicInfo.mobile}" escapeXml="true"/>"
+                    ,'office':"<c:out value="${workStaffBasicInfo.office.name}" escapeXml="true"/>"
+                    ,'jobGrade':"<c:out value="${workStaffBasicInfo.jobGrade.name}" escapeXml="true"/>"
+                    ,'status':"<c:out value="${workStaffBasicInfo.status}" escapeXml="true"/>"
+                    <%--,"entryDate":"<fmt:formatDate value="${workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"--%>
+                    <%--<shiro:hasPermission name="workstaff:workStaffBasicInfo:edit">,"canedit":"1"</shiro:hasPermission>--%>
+                    <%--<shiro:hasPermission name="workstaff:workStaffBasicInfo:del">,"candelete":"1"</shiro:hasPermission>--%>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+
+    resizeListTable(130);/*消除由于有竖向滚动条造成table出现横向滚动条*/
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 803 - 0
src/main/webapp/webpage/modules/workstaff/workAddressBookView.jsp

@@ -0,0 +1,803 @@
+<%@ 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() {
+            cacuAge('${workStaffBasicInfo.idCard}','1');
+		});
+	</script>
+    <script type="text/javascript">
+
+        function cacuAge(idCard,type){
+            if(type=='1'){
+                var pattern = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
+                if(!pattern.test(idCard)){
+                    return;
+                }
+            }
+            var age = 0;
+            var year='';
+            var months='';
+            var days='';
+            if(idCard.length==15){
+                year = "19"+idCard.substring(6,8);
+                months=idCard.substring(8,10);//截取身份证上的月
+                days=idCard.substring(10,12);//截取身份证上的日
+            }else {
+                year=idCard.substring(6,10);//截取身份证上的年
+                months=idCard.substring(10,12);//截取身份证上的月
+                days=idCard.substring(12,14);//截取身份证上的日
+            }
+
+            var myDate = new Date();
+            var month = myDate.getMonth() + 1;
+            var day = myDate.getDate();
+            age = myDate.getFullYear() - year - 1;
+            if (months< month || months == month && days <= day) {
+                age++;
+            }
+            if(age<0)age=0;
+            $("#age").val(age);
+        }
+    </script>
+</head>
+<body>
+    <div class="single-form">
+        <div class="container view-form">
+            <form:form id="inputForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfo/save" enctype="multipart/form-data" method="post" class="form-horizontal">
+                <form:hidden path="id"/>
+                <form:hidden path="userId"/>
+                <div class="form-group layui-row first">
+                    <div class="form-group-label"><h2>基本信息</h2></div>
+                    <div class="layui-item layui-col-sm6 lw7" style="padding-right: 0;">
+                        <div class="layui-item layui-col-sm12">
+                            <label class="layui-form-label">工    号:</label>
+                            <div class="layui-input-block">
+                                <form:input path="no" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item layui-col-sm12">
+                            <label class="layui-form-label">性    别:</label>
+                            <div class="layui-input-block">
+                                <input value="${fns:getDictLabel(workStaffBasicInfo.gender,'sex','')}" type="text" readonly="true" class="form-control  layui-input" />
+                                <input name="gender" value="${workStaffBasicInfo.gender}" type="hidden" readonly="true" class="form-control  layui-input" />
+                            </div>
+                        </div>
+                        <div class="layui-item layui-col-sm12">
+                            <label class="layui-form-label">出生日期:</label>
+                            <div class="layui-input-block">
+                                <input name="birthday" value="<fmt:formatDate value="${workStaffBasicInfo.birthday}" pattern="yyyy-MM-dd"/>" type="text" readonly="true" class="form-control  layui-input" />
+                            </div>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <div style="margin-right: 120px;">
+                            <div class="layui-item layui-col-sm12">
+                                <label class="layui-form-label">姓    名:</label>
+                                <div class="layui-input-block">
+                                    <form:input path="name" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
+                                </div>
+                            </div>
+                            <div class="layui-item layui-col-sm12">
+                                <label class="layui-form-label">民    族:</label>
+                                <div class="layui-input-block">
+                                    <input value="${fns:getDictLabel(workStaffBasicInfo.nation,'nation_type','')}" type="text" readonly="true" class="form-control  layui-input" />
+                                    <input name="nation" value="${workStaffBasicInfo.nation}" type="hidden" readonly="true" class="form-control  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="age" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="profile_box_wrapper">
+                            <div class="profile_box">
+                                <div id="this_upload_image_div_1">
+                                    <div id="this_upload_div_1" style="position:relative;">
+                                        <c:choose>
+                                            <c:when test="${not empty workStaffBasicInfo.picture}">
+                                                <%--<span id="this_upload_close_1" class="pic_close glyphicon glyphicon-remove" onclick="this_close_img(1)"></span>--%>
+                                                <img alt="_blank" id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${workStaffBasicInfo.picture}" />
+                                            </c:when>
+                                            <c:otherwise>
+                                                <img alt="_blank" id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png" />
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <input id="this_upload_file_1" type="file" style="display:none"  name="pictureFile"  onchange="this_upload_show_image(1)"  class="form-control"/>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">电子邮箱:</label>
+                        <div class="layui-input-block">
+                            <form:input path="email" htmlEscape="false" readonly="true" class="form-control layui-input email"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">移动电话:</label>
+                        <div class="layui-input-block">
+                            <form:input path="mobile" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">座机:</label>
+                        <div class="layui-input-block">
+                            <form:input path="phone" readonly="true" htmlEscape="false"  class="form-control  layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>归属部门:</label>
+                        <div class="layui-input-block">
+                            <input name="office.name" value="${workStaffBasicInfo.office.name}" type="text" readonly="true" class="form-control  layui-input" />
+                            <input name="office.id" value="${workStaffBasicInfo.office.id}" type="hidden" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>岗   位:</label>
+                        <div class="layui-input-block ">
+                            <input id="roleName" value="${workStaffBasicInfo.roleName}" type="text" readonly class="form-control layui-input" />
+                        </div>
+                    </div>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label">职    位:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input name="duty" value="${workStaffBasicInfo.duty}" type="text" readonly="true" class="form-control  layui-input" />--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">职    级:</label>
+                        <div class="layui-input-block with-icon">
+                            <form:input path="jobGrade.name" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
+                            <form:hidden path="jobGrade.id" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
+                        </div>
+                    </div>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label"><span class="require-item">*</span>基本工资:</label>--%>
+                        <%--<div class="layui-input-block with-icon">--%>
+                            <%--<input id="salary" htmlEscape="false" readonly value="<fmt:formatNumber pattern="#,##0.00#" value="${workStaffBasicInfo.salary}"/>" class="form-control layui-input"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label double-line"><span class="require-item">*</span>是否 TS人员:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input value="${fns:getDictLabel(workStaffBasicInfo.ts,'yes_no','')}" type="text" readonly="true" class="form-control  layui-input" />--%>
+                            <%--<input name="ts" value="${workStaffBasicInfo.ts}" type="hidden" readonly="true" class="form-control  layui-input" />--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>员工状态:</label>
+                        <div class="layui-input-block">
+                            <input name="status" value="${workStaffBasicInfo.status}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>入职日期:</label>
+                        <div class="layui-input-block">
+                            <input name="entryDate" value="<fmt:formatDate value="${workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label double-line"><span class="require-item">*</span>参加工作日期:</label>
+                        <div class="layui-input-block">
+                            <input name="workDate" value="<fmt:formatDate value="${workStaffBasicInfo.workDate}" pattern="yyyy-MM"/>" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label">开户银行:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input name="bankName" value="${workStaffBasicInfo.bankName}" type="text" readonly="true" class="form-control  layui-input" />--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label">银行卡号:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<form:input path="bankCard" htmlEscape="false" readonly="true" class="form-control layui-input digits"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">婚姻状况:</label>
+                        <div class="layui-input-block">
+                            <input name="marriage" value="${workStaffBasicInfo.marriage}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">政治面貌:</label>
+                        <div class="layui-input-block">
+                            <input name="politics" value="${workStaffBasicInfo.politics}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label double-line">是否退伍军人:</label>
+                        <div class="layui-input-block">
+                            <input name="exSoldier" value="${fns:getDictLabel(workStaffBasicInfo.exSoldier,'yes_no','')}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label">常住地址:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<form:input path="address" htmlEscape="false" readonly="true" class="form-control layui-input"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">籍    贯:</label>
+                        <div class="layui-input-block">
+                            <input name="nativePlace.name" value="${workStaffBasicInfo.nativePlace.name}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label">户口所在地:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<form:input path="household" htmlEscape="false" readonly="true" class="form-control layui-input"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label double-line"><span class="require-item">*</span>从事本行业日期:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input id="industryDate" name="industryDate" type="text" maxlength="20" readonly class="form-control layui-input"--%>
+                                   <%--value="<fmt:formatDate value="${workStaffBasicInfo.industryDate}" pattern="yyyy-MM"/>"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label double-line">试用期结束日期:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input id="tryEndTime"  type="text" maxlength="20" readonly class="form-control layui-input"--%>
+                                   <%--value="<fmt:formatDate value="${workStaffBasicInfo.tryEndTime}" pattern="yyyy-MM-dd"/>"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label">离职日期:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input id="dimissionDate"  type="text" maxlength="20" readonly class="form-control layui-input"--%>
+                                   <%--value="<fmt:formatDate value="${workStaffBasicInfo.dimissionDate}" pattern="yyyy-MM-dd"/>"/>--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label double-line">考勤截止日期:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input id="workEndDate"  type="text" maxlength="20" readonly class="form-control layui-input"--%>
+                                   <%--value="<fmt:formatDate value="${workStaffBasicInfo.workEndDate}" 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="educationTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="12%"><span class="require-item">*</span>毕业院校</th>--%>
+                                <%--<th width="12%">所学专业</th>--%>
+                                <%--<th width="12%"><span class="require-item">*</span>学    历</th>--%>
+                                <%--<th width="12%">学    位</th>--%>
+                                <%--<th width="12%"><span class="require-item">*</span>学历性质</th>--%>
+                                <%--<th width="10%"><span class="require-item">*</span>入学日期</th>--%>
+                                <%--<th width="10%">毕业日期</th>--%>
+                                <%--<th width="10%">学历证书</th>--%>
+                                <%--<th width="10%">学位证书</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="educationList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.educationList}" var="education" varStatus="varStatus">--%>
+                                <%--<tr>--%>
+                                    <%--<td>--%>
+                                        <%--${education.school}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${education.major}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                            <%--${fns:getDictLabel(education.edu,'education_level','')}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                            <%--${fns:getDictLabel(education.degree,'degree_level','')}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                            <%--${fns:getDictLabel(education.eduType,'edu_type','')}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<fmt:formatDate value="${education.startDate}" pattern="yyyy-MM-dd"/>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<fmt:formatDate value="${education.endDate}" pattern="yyyy-MM-dd"/>--%>
+                                    <%--</td>--%>
+                                    <%--<td class="text-left op-td">--%>
+                                        <%--<c:if test="${not empty education.eduPhoto}"><img src="${education.eduPhoto}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${education.eduPhoto}','90%','90%')" alt=""></c:if>--%>
+                                    <%--</td>--%>
+                                    <%--<td class="text-left op-td">--%>
+                                        <%--<c:if test="${not empty education.degreePhoto}"><img src="${education.degreePhoto}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${education.degreePhoto}','90%','90%')" alt=""></c:if>--%>
+                                    <%--</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 form-table-container">--%>
+                        <%--<table id="labourTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="12%">合同类型</th>--%>
+                                <%--<th width="12%">合同编号</th>--%>
+                                <%--<th width="12%">合同期限</th>--%>
+                                <%--<th width="11%">合同起始日期</th>--%>
+                                <%--<th width="11%">合同终止日期</th>--%>
+                                <%--<th width="11%">试用期结束日期</th>--%>
+                                <%--<th width="11%">办理日期</th>--%>
+                                <%--<th width="20%">文件</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="labourList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">--%>
+                                <%--<tr>--%>
+                                    <%--<td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>--%>
+                                    <%--<td>${buyDetails.contractNum}</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.tryEndTime}" pattern="yyyy-MM-dd"/></td>--%>
+                                    <%--<td><fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/></td>--%>
+                                        <%--&lt;%&ndash;试用期结束时间<td><fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/></td>&ndash;%&gt;--%>
+
+                                    <%--<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="24" height="24" 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-xs12 form-table-container">--%>
+                        <%--<table id="languageTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>语种</th>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>熟练程度</th>--%>
+                                <%--<th width="20%">证书名称</th>--%>
+                                <%--<th width="20%">获证日期</th>--%>
+                                <%--<th width="20%">文件</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="languageList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.languageList}" var="language" varStatus="varStatus">--%>
+                                <%--<tr>--%>
+                                    <%--<td>--%>
+                                            <%--${fns:getMainDictLabel(language.language,'language','')}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                            <%--${fns:getDictLabel(language.proficiency,'proficiency','')}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                            <%--${language.certificate}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<fmt:formatDate value="${language.certifDate}" pattern="yyyy-MM-dd"/>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<c:if test="${not empty language.filePath}"><img src="${language.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${language.filePath}','90%','90%')" alt=""></c:if>--%>
+                                    <%--</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 form-table-container">--%>
+                        <%--<table id="experienceTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="15%"><span class="require-item">*</span>所在单位</th>--%>
+                                <%--<th width="15%"><span class="require-item">*</span>工作部门</th>--%>
+                                <%--<th width="15%"><span class="require-item">*</span>职务或岗位</th>--%>
+                                <%--<th width="15%"><span class="require-item">*</span>起始日期</th>--%>
+                                <%--<th width="15%"><span class="require-item">*</span>终止日期</th>--%>
+                                <%--<th width="13%">证明人</th>--%>
+                                <%--<th width="12%">证明人联系方式</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="experienceList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.experienceList}" varStatus="varStatus" var="experience">--%>
+                                <%--<tr>--%>
+                                    <%--<td>--%>
+                                        <%--${experience.company}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${experience.dept}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${experience.duty}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<fmt:formatDate value="${experience.startDate}" pattern="yyyy-MM-dd"/>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<fmt:formatDate value="${experience.endDate}" pattern="yyyy-MM-dd"/>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${experience.certifier}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${experience.certifierTel}--%>
+                                    <%--</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 form-table-container">--%>
+                        <%--<table id="certificateTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="10%"><span class="require-item">*</span>证书名称</th>--%>
+                                <%--<th width="10%"><span class="require-item">*</span>证书编号</th>--%>
+                                <%--<th width="10%"><span class="require-item">*</span>发证机关</th>--%>
+                                <%--<th width="10%"><span class="require-item">*</span>发证日期</th>--%>
+                                <%--<th width="10%">注册日期</th>--%>
+                                <%--<th width="10%">注册证书编号</th>--%>
+                                <%--<th width="10%">专业</th>--%>
+                                <%--<th width="10%">等级</th>--%>
+                                <%--<th width="10%">取得方式</th>--%>
+                                <%--<th width="10%">文件</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="certificateList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.certificateList}" var="certificate" varStatus="varStatus">--%>
+                                <%--<tr>--%>
+                                    <%--<td>--%>
+                                            <%--${certificate.name}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${certificate.num}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${certificate.issuingAuthority}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<fmt:formatDate value="${certificate.issuingDate}" pattern="yyyy-MM-dd"/>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<fmt:formatDate value="${certificate.registDate}" pattern="yyyy-MM-dd"/>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${certificate.registNum}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${certificate.major}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${certificate.grade}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                            <%--${certificate.issType}--%>
+                                    <%--</td>--%>
+                                    <%--<td >--%>
+                                        <%--<c:if test="${not empty certificate.filePath}"><img src="${certificate.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${certificate.filePath}','90%','90%')" alt=""></c:if>--%>
+                                    <%--</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 form-table-container">--%>
+                        <%--<table id="titleTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>职称名称</th>--%>
+                                <%--<th width="15%"><span class="require-item">*</span>职称等级</th>--%>
+                                <%--<th width="15%"><span class="require-item">*</span>取得日期</th>--%>
+                                <%--<th width="15%"><span class="require-item">*</span>取得途径</th>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>审批单位</th>--%>
+                                <%--<th width="15%">文件</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="titleList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.titleList}" var="title" varStatus="varStatus">--%>
+                                <%--<tr>--%>
+                                    <%--<td>--%>
+                                        <%--${title.name}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${title.grade}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<fmt:formatDate value="${title.startDate}" pattern="yyyy-MM-dd"/>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${title.pathway}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${title.approvalAuthority}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<c:if test="${not empty title.filePath}"><img src="${title.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${title.filePath}','90%','90%')" alt=""></c:if>--%>
+                                    <%--</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 form-table-container">--%>
+                        <%--<table id="familyTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>与本人的关系</th>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>成员姓名</th>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>身份证号码</th>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>成员性别</th>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>成员联系方式</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="familyList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.familyList}" var="family" varStatus="varStatus">--%>
+                                <%--<tr>--%>
+                                    <%--<td>--%>
+                                        <%--${family.relation}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${family.name}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${family.idCard}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                            <%--${family.gender}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${family.contact}--%>
+                                    <%--</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 form-table-container">--%>
+                        <%--<table id="trainingTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="10%"><span class="require-item">*</span>培训名称</th>--%>
+                                <%--<th width="10%">培训机构</th>--%>
+                                <%--<th width="10%">培训地点</th>--%>
+                                <%--<th width="10%">培训起始日期</th>--%>
+                                <%--<th width="10%">培训终止日期</th>--%>
+                                <%--<th width="10%"><span class="require-item">*</span>培训类型</th>--%>
+                                <%--<th width="10%">学时</th>--%>
+                                <%--<th width="10%"><span class="require-item">*</span>所获证书</th>--%>
+                                <%--<th width="10%">文件</th>--%>
+                                <%--<th width="10%">备注</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="trainingList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.trainingList}" var="training" varStatus="varStatus">--%>
+                                <%--<tr>--%>
+                                    <%--<td>--%>
+                                        <%--${training.name}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${training.agency}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${training.address}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<fmt:formatDate value="${training.startDate}" pattern="yyyy-MM-dd"/>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<fmt:formatDate value="${training.endDate}" pattern="yyyy-MM-dd"/>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                            <%--${training.type}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${training.hours}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${training.certificate}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<c:if test="${not empty training.filePath}"><img src="${training.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${training.filePath}','90%','90%')" alt="${training.fileName}"></c:if>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${training.remarks}--%>
+                                    <%--</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 form-table-container">--%>
+                        <%--<table id="socialPositionTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="25%"><span class="require-item">*</span>职务名称</th>--%>
+                                <%--<th width="25%">任职开始日期</th>--%>
+                                <%--<th width="25%">任职结束日期</th>--%>
+                                <%--<th width="25%">任职机构</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="socialPositionList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.socialPositionList}" varStatus="varStatus" var="socialPosition">--%>
+                            <%--<tr>--%>
+                                <%--<td>--%>
+                                    <%--${socialPosition.name}--%>
+                                <%--</td>--%>
+                                <%--<td>--%>
+                                    <%--<fmt:formatDate value="${socialPosition.startDate}" pattern="yyyy-MM-dd"/>--%>
+                                <%--</td>--%>
+                                <%--<td>--%>
+                                    <%--<fmt:formatDate value="${socialPosition.endDate}" pattern="yyyy-MM-dd"/>--%>
+                                <%--</td>--%>
+                                <%--<td>--%>
+                                    <%--${socialPosition.organization}--%>
+                                <%--</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 form-table-container">--%>
+                        <%--<table id="rewardsTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="10%"><span class="require-item">*</span>奖惩类型</th>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>奖惩名称</th>--%>
+                                <%--<th width="15%"><span class="require-item">*</span>时间</th>--%>
+                                <%--<th width="15%">级别</th>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>原因</th>--%>
+                                <%--<th width="20%"><span class="require-item">*</span>授予机构</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="rewardsList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.rewardsList}" varStatus="varStatus" var="rewards">--%>
+                                <%--<tr>--%>
+                                    <%--<td>--%>
+                                            <%--${rewards.type}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${rewards.name}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${rewards.atTime}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${rewards.grade}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${rewards.reason}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${rewards.organization}--%>
+                                    <%--</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 form-table-container">--%>
+                        <%--<table id="achievementTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="20%">项目名称</th>--%>
+                                <%--<th width="15%">主委托方</th>--%>
+                                <%--<th width="15%">工程分类</th>--%>
+                                <%--<th width="15%">规模类型/单位/数量</th>--%>
+                                <%--<th width="15%">担任职务</th>--%>
+                                <%--<th width="20%">参与内容</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="achievementList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.achievementList}" var="achievement" varStatus="varStatus">--%>
+                                <%--<tr>--%>
+                                    <%--<td class="text-center">--%>
+                                            <%--${achievement.projName}--%>
+                                    <%--</td>--%>
+                                    <%--<td class="text-center">--%>
+                                            <%--${achievement.projClient}--%>
+                                    <%--</td>--%>
+                                    <%--<td class="text-center">--%>
+                                            <%--${achievement.category}--%>
+                                    <%--</td>--%>
+                                    <%--<td class="text-center">--%>
+                                            <%--${achievement.unitNumber}--%>
+                                    <%--</td>--%>
+                                    <%--<td class="text-center">--%>
+                                            <%--${achievement.duty}--%>
+                                    <%--</td>--%>
+                                    <%--<td class="text-center">--%>
+                                            <%--${achievement.content}--%>
+                                    <%--</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 form-table-container">--%>
+                        <%--<table id="recordTable" class="table table-bordered table-condensed details">--%>
+                            <%--<thead>--%>
+                            <%--<tr>--%>
+                                <%--<th width="25%"><span class="require-item">*</span>档案名称</th>--%>
+                                <%--<th width="25%">编号</th>--%>
+                                <%--<th width="25%">文件</th>--%>
+                                <%--<th width="25%">验证</th>--%>
+                            <%--</tr>--%>
+                            <%--</thead>--%>
+                            <%--<tbody id="recordList">--%>
+                            <%--<c:forEach items="${workStaffBasicInfo.recordList}" var="record" varStatus="varStatus">--%>
+                                <%--<tr>--%>
+                                    <%--<td>--%>
+                                        <%--${record.name}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${record.num}--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--<c:if test="${not empty record.filePath}"><img src="${record.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${record.filePath}','90%','90%')" alt="${record.fileName}"></c:if>--%>
+                                    <%--</td>--%>
+                                    <%--<td>--%>
+                                        <%--${record.status}--%>
+                                    <%--</td>--%>
+                                <%--</tr>--%>
+                            <%--</c:forEach>--%>
+                            <%--</tbody>--%>
+                        <%--</table>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
+            </form:form>
+        </div>
+    </div>
+</body>
+</html>

File diff suppressed because it is too large
+ 1857 - 0
src/main/webapp/webpage/modules/workstaff/workStaffAchiveInfoForm.jsp


File diff suppressed because it is too large
+ 1857 - 0
src/main/webapp/webpage/modules/workstaff/workStaffAchiveInfoForms.jsp


+ 480 - 0
src/main/webapp/webpage/modules/workstaff/workStaffAchivesList.jsp

@@ -0,0 +1,480 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>员工信息管理</title>
+	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        $(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: '#beginEntryDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endEntryDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#beginBirthdayDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endBirthdayDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#beginWorkDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'month'
+            });
+            laydate.render({
+                elem: '#endWorkDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'month'
+            });
+
+            validateForm = $("#searchForm").validate({
+                submitHandler: function(form){
+                    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 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,
+                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(index) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn2: function (index) {
+
+                }
+            });
+        }
+        function setParentInfo(ids,names,nos,salarys){
+            return;
+        }
+
+        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);
+        }
+
+        $(document).ready(function() {
+            $('#contentTable thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
+                $('#contentTable tbody tr td input.i-checks').iCheck('check');
+            });
+
+            $('#contentTable thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
+                $('#contentTable tbody tr td input.i-checks').iCheck('uncheck');
+            });
+
+        });
+        function completeAll(){
+            var checkStatus = layui.table.checkStatus('contentTable'); //test即为基础参数id对应的值
+            var checkeddata = checkStatus.data;
+            if(checkeddata.length == 0){
+                top.layer.alert('请至少选择一条数据!', {icon: 0, title:'警告'});
+                return;
+            }
+            var str="";
+            var ids="";
+            for(var i=0;i<checkeddata.length;i++){
+                str +=checkeddata[i].id+',';
+            }
+            if(str.substr(str.length-1)== ','){
+                ids = str.substr(0,str.length-1);
+            }
+
+            top.layer.confirm('确认要通知员工完善数据吗?', {icon: 3, title:'系统提示'}, function(index){
+                window.location = "${ctx}/workstaff/workStaffBasicInfo/complete?achiveIds="+ids;
+                top.layer.close(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="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfo/achivelist" 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 lw9">
+                        <label class="layui-form-label">姓    名:</label>
+                        <div class="layui-input-block">
+                            <form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">工    号:</label>
+                        <div class="layui-input-block">
+                            <form:input path="no" htmlEscape="false" maxlength="10"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item athird fr">
+                        <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 lw9">
+                        <label class="layui-form-label">移动电话:</label>
+                        <div class="layui-input-block">
+                            <form:input path="mobile" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">性别:</label>
+                        <div class="layui-input-block">
+                            <form:select path="gender" class="form-control simple-select">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('sex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">民族:</label>
+                        <div class="layui-input-block">
+                            <form:select path="nation" class="form-control simple-select">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('nation_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">身份证号码:</label>
+                        <div class="layui-input-block">
+                            <form:input path="idCard" htmlEscape="false" maxlength="20"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">公历/农历:</label>
+                        <div class="layui-input-block">
+                            <form:select path="calendar" class="form-control simple-select">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('calendar_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">出生日期:</label>
+                        <div class="layui-input-block">
+                            <input id="beginBirthdayDate" name="beginBirthdayDate" type="text" placeholder="开始时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.beginBirthdayDate}" pattern="yyyy-MM-dd"/>"/>
+                            </input>
+                            <span class="group-sep">-</span>
+                            <input id="endBirthdayDate" name="endBirthdayDate" type="text" placeholder="结束时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.endBirthdayDate}" pattern="yyyy-MM-dd"/>"/>
+                            </input>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">年龄:</label>
+                        <div class="layui-input-block">
+                            <input name="minAge" htmlEscape="false" value="${workStaffBasicInfo.minAge}" class="form-control digits layui-input query-group"/>
+                            <span class="group-sep">-</span>
+                            <input name="maxAge" htmlEscape="false" value="${workStaffBasicInfo.maxAge}"  class="form-control digits layui-input query-group"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">婚姻状况:</label>
+                        <div class="layui-input-block">
+                            <form:select path="marriage" class="form-control simple-select">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('marriage_status')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">政治面貌:</label>
+                        <div class="layui-input-block">
+                            <form:select path="politics" class="form-control simple-select">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('politics_type')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">部门:</label>
+                        <div class="layui-input-block with-icon">
+                            <sys:treeselect id="office" name="office.id" value="${workStaffBasicInfo.office.id}" labelName="office.name" labelValue="${workStaffBasicInfo.office.name}"
+                                            title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input" notAllowSelectParent="true"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">职级:</label>
+                        <div class="layui-input-block with-icon">
+                            <sys:treeselectJobGrade id="jobGrade" name="jobGrade.id" value="${workStaffBasicInfo.jobGrade.id}" labelName="jobGrade.name" labelValue="${workStaffBasicInfo.jobGrade.name}"
+                                                    title="职级类型" url="/workjobgrade/workJobGrade/treeData"  cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">基本工资:</label>
+                        <div class="layui-input-block with-icon">
+                            <input id="minSalary" htmlEscape="false" value="<fmt:formatNumber pattern="#,##0.00#" value="${workStaffBasicInfo.minSalary}"/>" onchange="formatNum(this)" class="form-control number layui-input query-group"/>
+                            <span class="group-sep">-</span>
+                            <input id="maxSalary" htmlEscape="false" value="<fmt:formatNumber pattern="#,##0.00#" value="${workStaffBasicInfo.maxSalary}"/>" onchange="formatNum(this)" class="form-control number layui-input query-group"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <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('staff_status')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">入职日期:</label>
+                        <div class="layui-input-block">
+                            <input id="beginEntryDate" name="beginEntryDate" type="text" placeholder="开始时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.beginEntryDate}" pattern="yyyy-MM-dd"/>"/>
+                            </input>
+                            <span class="group-sep">-</span>
+                            <input id="endEntryDate" name="endEntryDate" type="text" placeholder="结束时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.endEntryDate}" pattern="yyyy-MM-dd"/>"/>
+                            </input>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">参加工作日期:</label>
+                        <div class="layui-input-block">
+                            <input id="beginWorkDate" name="beginWorkDate" type="text" placeholder="开始时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.beginWorkDate}" pattern="yyyy-MM"/>"/>
+                            </input>
+                            <span class="group-sep">-</span>
+                            <input id="endWorkDate" name="endWorkDate" type="text" placeholder="结束时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.endWorkDate}" pattern="yyyy-MM"/>"/>
+                            </input>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird lw9">
+                        <label class="layui-form-label">信息完善度:</label>
+                        <div class="layui-input-block">
+                            <input name="minPercent" htmlEscape="false" value="${workStaffBasicInfo.minPercent}" class="form-control percent layui-input query-group"/>
+                            <span class="group-sep">-</span>
+                            <input name="maxPercent" htmlEscape="false" value="${workStaffBasicInfo.maxPercent}"  class="form-control percent layui-input query-group"/>
+                        </div>
+                    </div>
+                </div>
+            </form:form>
+	        </div>
+	    </div>
+
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:achivelist">
+                        <button class="nav-btn nav-btn-delete" onclick="completeAll()" data-toggle="tooltip" data-placement="top"><i class="fa fa-file-text-o"> 完善</i>
+                        </button>
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:achiveImport">
+                        <table:importExcel url="${ctx}/workstaff/workStaffBasicInfo/importAchive"></table:importExcel><!-- 导入按钮 -->
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:achiveExport">
+                        <table:exportExcel url="${ctx}/workstaff/workStaffBasicInfo/exportAchive"></table:exportExcel><!-- 导出按钮 -->
+                    </shiro:hasPermission>
+                    <table:importInfoErr url="${ctx}/workstaff/workStaffBasicInfo/importInfoErr" title="导入日志"></table:importInfoErr><!-- 导出按钮 -->
+                    <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" lay-data="{id: 'id'}"></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}
+                ,{field:'no',align:'center', title: '工号',minWidth:100,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfo/achiveView?achiveId="+d.id+"','95%','95%')\">" +
+                            "<span title=" + d.no + ">" + d.no + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'name',align:'center', title: '姓名',minWidth:100,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfo/achiveView?achiveId="+d.id+"','95%','95%')\">" +
+                        "<span title=" + d.name + ">" + d.name + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'gender',align:'center', title: '性别',minWidth:50}
+                ,{field:'nation',align:'center', title: '民族',minWidth:50}
+                ,{field:'idCard',align:'center', title: '身份证号码',minWidth:150}
+                ,{field:'calendar',align:'center', title: '公历/农历',minWidth:50}
+                ,{field:'birthday',align:'center', title: '出生日期',minWidth:100}
+                ,{field:'age',align:'center', title: '年龄',minWidth:50}
+                ,{field:'marriage',align:'center', title: '婚姻状况',minWidth:50}
+                ,{field:'mobile',align:'center', title: '移动电话', minWidth:100}
+                ,{field:'politics',align:'center', title: '政治面貌', minWidth:100}
+                ,{field:'office',align:'center', title: '部门', minWidth:100}
+                ,{field:'jobGrade',align:'center', title: '职级', minWidth:100}
+                ,{field:'salary',align:'center', title: '基本工资', minWidth:100}
+                ,{field:'entryDate', align:'center',sort:true,title: '入职日期',width:100}
+                ,{field:'workDate', align:'center',title: '参加工作日期',width:80}
+                ,{field:'status',align:'center', title: '员工状态', minWidth:80}
+                ,{field:'percent', align:'center',title: '信息完善度',width:80}
+                ,{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}/workstaff/workStaffBasicInfo/achiveForm?achiveId=" + d.id+"','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>修改</a>"
+                        }
+                        return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workStaffBasicInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "id":"${workStaffBasicInfo.id}"
+                    ,"no":"<c:out value="${workStaffBasicInfo.no}" escapeXml="true"/>"
+                    ,"name":"<c:out value="${workStaffBasicInfo.name}" escapeXml="false"/>"
+                    ,"gender":"<c:out value="${fns:getDictLabel(workStaffBasicInfo.gender,'sex','')}" escapeXml="true"/>"
+                    ,"nation":"<c:out value="${fns:getDictLabel(workStaffBasicInfo.nation,'nation_type','')}" escapeXml="true"/>"
+                    ,"idCard":"<c:out value="${workStaffBasicInfo.idCard}" escapeXml="true"/>"
+                    ,"calendar":"<c:out value="${fns:getDictLabel(workStaffBasicInfo.calendar,'calendar_type','')}" escapeXml="true"/>"
+                    ,"birthday":"<fmt:formatDate value="${workStaffBasicInfo.birthday}" pattern="yyyy-MM-dd"/>"
+                    ,'age':"<c:out value="${workStaffBasicInfo.age}" escapeXml="true"/>"
+                    ,'marriage':"<c:out value="${workStaffBasicInfo.marriage}" escapeXml="true"/>"
+                    ,'mobile':"<c:out value="${workStaffBasicInfo.mobile}" escapeXml="true"/>"
+                    ,'politics':"<c:out value="${workStaffBasicInfo.politics}" escapeXml="true"/>"
+                    ,'office':"<c:out value="${workStaffBasicInfo.office.name}" escapeXml="true"/>"
+                    ,'jobGrade':"<c:out value="${workStaffBasicInfo.jobGrade.name}" escapeXml="true"/>"
+                    ,'salary':"<fmt:formatNumber pattern="#,##0.00#" value="${workStaffBasicInfo.salary}"/>"
+                    ,"entryDate":"<fmt:formatDate value="${workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"
+                    ,"workDate":"<fmt:formatDate value="${workStaffBasicInfo.workDate}" pattern="yyyy-MM"/>"
+                    ,'status':"<c:out value="${workStaffBasicInfo.status}" escapeXml="true"/>"
+                    ,"percent":"<c:out value="${workStaffBasicInfo.percent}" escapeXml="true"/>"
+                    <shiro:hasPermission name="workstaff:workStaffAchiveInfo:edit">,"canedit":"1"</shiro:hasPermission>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+
+    resizeListTable(130);/*消除由于有竖向滚动条造成table出现横向滚动条*/
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+    var navg = window.navigator.userAgent;
+    if(navg.indexOf('Chrome')!==-1&& navg.indexOf('Edge')==-1){
+        $('.layui-table').children().eq(0).children().children().eq(1).css({"background":"transparent","position":"sticky","border-right":"1px solid #ccc","left":"0","background":"#F5F5F5","z-index":"999"});
+        var tableft = $('.layui-table').children().eq(0).children().children().eq(1).width();
+        $('.layui-table').children().eq(0).children().children().eq(2).css({"background":"transparent","position":"sticky","left":tableft,"background":"#F5F5F5","z-index":"999"});
+        var trone = $('.layui-table').children().eq(1).children();
+        var newArr = []
+        for(var i=0;i<trone.length;i++){
+            newArr.push(trone[i]);
+            $(newArr[i]).children().eq(1).css({"background":"transparent","position":"sticky","left":"0","background":"#fff","z-index":"999"});
+            $(newArr[i]).children().eq(2).css({"background":"transparent","position":"sticky","left":tableft,"background":"#fff","z-index":"999"});
+        }
+    }
+</script>
+</body>
+</html>

File diff suppressed because it is too large
+ 1233 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailAudit.jsp


File diff suppressed because it is too large
+ 1811 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailForm.jsp


File diff suppressed because it is too large
+ 1817 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModify.jsp


File diff suppressed because it is too large
+ 1841 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModifyDirectly.jsp


File diff suppressed because it is too large
+ 1977 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp


+ 269 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoList.jsp

@@ -0,0 +1,269 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>员工信息管理</title>
+	<meta name="decorator" content="default"/>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </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: '#beginEntryDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endEntryDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+
+        });
+
+        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,
+                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(index) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn2: function (index) {
+
+                }
+            });
+        }
+
+        function setParentInfo(ids,names,nos,salarys){
+            return;
+        }
+	</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="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfo/" 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">
+                            <form:input path="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:input path="mobile" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item athird fr">
+                        <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="no" htmlEscape="false" maxlength="10"  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="idCard" htmlEscape="false" maxlength="20"  class=" form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">部门:</label>
+                        <div class="layui-input-block with-icon">
+                            <sys:treeselect id="office" name="office.id" value="${workStaffBasicInfo.office.id}" labelName="office.name" labelValue="${workStaffBasicInfo.office.name}"
+                                            title="部门" url="/sys/office/treeData?type=2" cssClass="form-control layui-input required" notAllowSelectParent="true"/>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">职级:</label>
+                        <div class="layui-input-block with-icon">
+                            <sys:treeselectJobGrade id="jobGrade" name="jobGrade.id" value="${workStaffBasicInfo.jobGrade.id}" labelName="jobGrade.name" labelValue="${workStaffBasicInfo.jobGrade.name}"
+                                                    title="职级类型" url="/workjobgrade/workJobGrade/treeData"  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 required">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('staff_status')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">入职日期:</label>
+                        <div class="layui-input-block">
+                            <input id="beginEntryDate" name="beginEntryDate" type="text" placeholder="开始时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.beginEntryDate}" pattern="yyyy-MM-dd"/>"/>
+                            </input>
+                            <span class="group-sep">-</span>
+                            <input id="endEntryDate" name="endEntryDate" type="text" placeholder="结束时间" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.endEntryDate}" pattern="yyyy-MM-dd"/>"/>
+                            </input>
+                        </div>
+                    </div>
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">操作:</label>
+
+                    </div>
+                </div>
+            </form:form>
+	        </div>
+	    </div>
+
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:add">
+                        <table:addRow url="${ctx}/workstaff/workStaffBasicInfo/form" title="员工信息"></table:addRow><!-- 增加按钮 -->
+                    </shiro:hasPermission>
+                    <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+                    <div style="clear: both;"></div>
+                </div>
+                <table class="oa-table layui-table" id="contentTable"></table>
+
+                <!-- 分页代码 -->
+                <table:page page="${page}"></table:page>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
+    </div>
+    <div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'no',align:'center', title: '工号',minWidth:100,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfo/view?id="+d.id+"','95%','95%')\">" +
+                            "<span title=" + d.no + ">" + d.no + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'name',align:'center', title: '姓名',minWidth:100,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看员工信息', '${ctx}/workstaff/workStaffBasicInfo/view?id="+d.id+"','95%','95%')\">" +
+                        "<span title=" + d.name + ">" + d.name + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'idCard',align:'center', title: '身份证号码',minWidth:150}
+                ,{field:'mobile',align:'center', title: '移动电话', minWidth:100}
+                ,{field:'office',align:'center', title: '部门', minWidth:100}
+                // ,{field:'role',align:'center', title: '岗位', minWidth:100}
+                ,{field:'jobGrade',align:'center', title: '职级', minWidth:100}
+                ,{field:'status',align:'center', title: '员工状态', minWidth:80}
+                ,{field:'entryDate', align:'center',sort:true,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=\"javascript:void(0)\" onclick=\"openDialog('修改', '${ctx}/workstaff/workStaffBasicInfo/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}/workstaff/workStaffBasicInfo/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="workStaffBasicInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workStaffBasicInfo.id}"
+                    <%--,"role":"${workStaffBasicInfo.roleName}"--%>
+                    ,"no":"<c:out value="${workStaffBasicInfo.no}" escapeXml="true"/>"
+                    ,"name":"<c:out value="${workStaffBasicInfo.name}" escapeXml="false"/>"
+                    ,"idCard":"<c:out value="${workStaffBasicInfo.idCard}" escapeXml="true"/>"
+                    ,'mobile':"<c:out value="${workStaffBasicInfo.mobile}" escapeXml="true"/>"
+                    ,'office':"<c:out value="${workStaffBasicInfo.office.name}" escapeXml="true"/>"
+                    ,'jobGrade':"<c:out value="${workStaffBasicInfo.jobGrade.name}" escapeXml="true"/>"
+                    ,'status':"<c:out value="${workStaffBasicInfo.status}" escapeXml="true"/>"
+                    ,"entryDate":"<fmt:formatDate value="${workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>"
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:edit">,"canedit":"1"</shiro:hasPermission>
+                    <shiro:hasPermission name="workstaff:workStaffBasicInfo:del">,"candelete":"1"</shiro:hasPermission>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+
+    })
+
+    resizeListTable(130);/*消除由于有竖向滚动条造成table出现横向滚动条*/
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 816 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoView.jsp

@@ -0,0 +1,816 @@
+<%@ 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() {
+            cacuAge('${workStaffBasicInfo.idCard}','1');
+		});
+	</script>
+    <script type="text/javascript">
+
+        function cacuAge(idCard,type){
+            if(type=='1'){
+                var pattern = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
+                if(!pattern.test(idCard)){
+                    return;
+                }
+            }
+            var age = 0;
+            var year='';
+            var months='';
+            var days='';
+            if(idCard.length==15){
+                year = "19"+idCard.substring(6,8);
+                months=idCard.substring(8,10);//截取身份证上的月
+                days=idCard.substring(10,12);//截取身份证上的日
+            }else {
+                year=idCard.substring(6,10);//截取身份证上的年
+                months=idCard.substring(10,12);//截取身份证上的月
+                days=idCard.substring(12,14);//截取身份证上的日
+            }
+
+            var myDate = new Date();
+            var month = myDate.getMonth() + 1;
+            var day = myDate.getDate();
+            age = myDate.getFullYear() - year - 1;
+            if (months< month || months == month && days <= day) {
+                age++;
+            }
+            if(age<0)age=0;
+            $("#age").val(age);
+        }
+    </script>
+</head>
+<body>
+    <div class="single-form">
+        <div class="container view-form">
+            <form:form id="inputForm" modelAttribute="workStaffBasicInfo" action="${ctx}/workstaff/workStaffBasicInfo/save" enctype="multipart/form-data" method="post" class="form-horizontal">
+                <form:hidden path="id"/>
+                <form:hidden path="userId"/>
+                <div class="form-group layui-row first">
+                    <div class="form-group-label"><h2>基本信息</h2></div>
+                    <div class="layui-item layui-col-sm6 lw7" style="padding-right: 0;">
+                        <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="no" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+                            </div>
+                        </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 value="${fns:getDictLabel(workStaffBasicInfo.gender,'sex','')}" type="text" readonly="true" class="form-control  layui-input" />
+                                <input name="gender" value="${workStaffBasicInfo.gender}" type="hidden" readonly="true" class="form-control  layui-input" />
+                            </div>
+                        </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="idCard" htmlEscape="false" onchange="caculateAge(this.value);" readonly="true" class="form-control idCard layui-input required"/>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <div style="margin-right: 120px;">
+                            <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="name" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
+                                </div>
+                            </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 value="${fns:getDictLabel(workStaffBasicInfo.nation,'nation_type','')}" type="text" readonly="true" class="form-control  layui-input" />
+                                    <input name="nation" value="${workStaffBasicInfo.nation}" type="hidden" readonly="true" class="form-control  layui-input" />
+                                </div>
+                            </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="age" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="profile_box_wrapper">
+                            <div class="profile_box">
+                                <div id="this_upload_image_div_1">
+                                    <div id="this_upload_div_1" style="position:relative;">
+                                        <c:choose>
+                                            <c:when test="${not empty workStaffBasicInfo.picture}">
+                                                <%--<span id="this_upload_close_1" class="pic_close glyphicon glyphicon-remove" onclick="this_close_img(1)"></span>--%>
+                                                <img alt="_blank" id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${workStaffBasicInfo.picture}" />
+                                            </c:when>
+                                            <c:otherwise>
+                                                <img alt="_blank" id="this_upload_image_1" class="upload_ico" style="cursor:pointer;"  src="${pageContext.request.contextPath}/static/common/img/pic_add.png" />
+                                            </c:otherwise>
+                                        </c:choose>
+                                        <input id="this_upload_file_1" type="file" style="display:none"  name="pictureFile"  onchange="this_upload_show_image(1)"  class="form-control"/>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>出生日期:</label>
+                        <div class="layui-input-block">
+                            <input name="birthday" value="<fmt:formatDate value="${workStaffBasicInfo.birthday}" pattern="yyyy-MM-dd"/>" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>公历/农历:</label>
+                        <div class="layui-input-block">
+                            <input value="${fns:getDictLabel(workStaffBasicInfo.calendar,'calendar_type','')}" type="text" readonly="true" class="form-control  layui-input" />
+                            <input value="${workStaffBasicInfo.calendar}" type="hidden" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">电子邮箱:</label>
+                        <div class="layui-input-block">
+                            <form:input path="email" htmlEscape="false" readonly="true" class="form-control layui-input email"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>移动电话:</label>
+                        <div class="layui-input-block">
+                            <form:input path="mobile" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">座机:</label>
+                        <div class="layui-input-block">
+                            <form:input path="phone" readonly="true" htmlEscape="false"  class="form-control  layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>归属部门:</label>
+                        <div class="layui-input-block">
+                            <input name="office.name" value="${workStaffBasicInfo.office.name}" type="text" readonly="true" class="form-control  layui-input" />
+                            <input name="office.id" value="${workStaffBasicInfo.office.id}" type="hidden" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>岗   位:</label>
+                        <div class="layui-input-block ">
+                            <input id="roleName" value="${workStaffBasicInfo.roleName}" type="text" readonly class="form-control layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">职    位:</label>
+                        <div class="layui-input-block">
+                            <input name="duty" value="${workStaffBasicInfo.duty}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">职    级:</label>
+                        <div class="layui-input-block with-icon">
+                            <form:input path="jobGrade.name" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
+                            <form:hidden path="jobGrade.id" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>基本工资:</label>
+                        <div class="layui-input-block with-icon">
+                            <input id="salary" htmlEscape="false" readonly value="<fmt:formatNumber pattern="#,##0.00#" value="${workStaffBasicInfo.salary}"/>" class="form-control layui-input"/>
+                        </div>
+                    </div>
+                    <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                        <%--<label class="layui-form-label double-line"><span class="require-item">*</span>是否 TS人员:</label>--%>
+                        <%--<div class="layui-input-block">--%>
+                            <%--<input value="${fns:getDictLabel(workStaffBasicInfo.ts,'yes_no','')}" type="text" readonly="true" class="form-control  layui-input" />--%>
+                            <%--<input name="ts" value="${workStaffBasicInfo.ts}" type="hidden" readonly="true" class="form-control  layui-input" />--%>
+                        <%--</div>--%>
+                    <%--</div>--%>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>员工状态:</label>
+                        <div class="layui-input-block">
+                            <input name="status" value="${workStaffBasicInfo.status}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>入职日期:</label>
+                        <div class="layui-input-block">
+                            <input name="entryDate" value="<fmt:formatDate value="${workStaffBasicInfo.entryDate}" pattern="yyyy-MM-dd"/>" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label double-line"><span class="require-item">*</span>参加工作日期:</label>
+                        <div class="layui-input-block">
+                            <input name="workDate" value="<fmt:formatDate value="${workStaffBasicInfo.workDate}" pattern="yyyy-MM"/>" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">开户银行:</label>
+                        <div class="layui-input-block">
+                            <input name="bankName" value="${workStaffBasicInfo.bankName}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">银行卡号:</label>
+                        <div class="layui-input-block">
+                            <form:input path="bankCard" htmlEscape="false" readonly="true" class="form-control layui-input digits"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>婚姻状况:</label>
+                        <div class="layui-input-block">
+                            <input name="marriage" value="${workStaffBasicInfo.marriage}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label"><span class="require-item">*</span>政治面貌:</label>
+                        <div class="layui-input-block">
+                            <input name="politics" value="${workStaffBasicInfo.politics}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label double-line">是否退伍军人:</label>
+                        <div class="layui-input-block">
+                            <input name="exSoldier" value="${fns:getDictLabel(workStaffBasicInfo.exSoldier,'yes_no','')}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">常住地址:</label>
+                        <div class="layui-input-block">
+                            <form:input path="address" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">籍    贯:</label>
+                        <div class="layui-input-block">
+                            <input name="nativePlace.name" value="${workStaffBasicInfo.nativePlace.name}" type="text" readonly="true" class="form-control  layui-input" />
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">户口所在地:</label>
+                        <div class="layui-input-block">
+                            <form:input path="household" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label double-line"><span class="require-item">*</span>从事本行业日期:</label>
+                        <div class="layui-input-block">
+                            <input id="industryDate" name="industryDate" type="text" maxlength="20" readonly class="form-control layui-input"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.industryDate}" pattern="yyyy-MM"/>"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label double-line">试用期结束日期:</label>
+                        <div class="layui-input-block">
+                            <input id="tryEndTime"  type="text" maxlength="20" readonly class="form-control layui-input"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.tryEndTime}" pattern="yyyy-MM-dd"/>"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">离职日期:</label>
+                        <div class="layui-input-block">
+                            <input id="dimissionDate"  type="text" maxlength="20" readonly class="form-control layui-input"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.dimissionDate}" pattern="yyyy-MM-dd"/>"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label double-line">考勤截止日期:</label>
+                        <div class="layui-input-block">
+                            <input id="workEndDate"  type="text" maxlength="20" readonly class="form-control layui-input"
+                                   value="<fmt:formatDate value="${workStaffBasicInfo.workEndDate}" 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="educationTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="12%"><span class="require-item">*</span>毕业院校</th>
+                                <th width="12%">所学专业</th>
+                                <th width="12%"><span class="require-item">*</span>学    历</th>
+                                <th width="12%">学    位</th>
+                                <th width="12%"><span class="require-item">*</span>学历性质</th>
+                                <th width="10%"><span class="require-item">*</span>入学日期</th>
+                                <th width="10%">毕业日期</th>
+                                <th width="10%">学历证书</th>
+                                <th width="10%">学位证书</th>
+                            </tr>
+                            </thead>
+                            <tbody id="educationList">
+                            <c:forEach items="${workStaffBasicInfo.educationList}" var="education" varStatus="varStatus">
+                                <tr>
+                                    <td>
+                                        ${education.school}
+                                    </td>
+                                    <td>
+                                        ${education.major}
+                                    </td>
+                                    <td>
+                                            ${fns:getDictLabel(education.edu,'education_level','')}
+                                    </td>
+                                    <td>
+                                            ${fns:getDictLabel(education.degree,'degree_level','')}
+                                    </td>
+                                    <td>
+                                            ${fns:getDictLabel(education.eduType,'edu_type','')}
+                                    </td>
+                                    <td>
+                                        <fmt:formatDate value="${education.startDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td>
+                                        <fmt:formatDate value="${education.endDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td class="text-left op-td">
+                                        <c:if test="${not empty education.eduPhoto}"><img src="${education.eduPhoto}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${education.eduPhoto}','90%','90%')" alt=""></c:if>
+                                    </td>
+                                    <td class="text-left op-td">
+                                        <c:if test="${not empty education.degreePhoto}"><img src="${education.degreePhoto}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${education.degreePhoto}','90%','90%')" alt=""></c:if>
+                                    </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 form-table-container">
+                        <table id="labourTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="12%">合同类型</th>
+                                <th width="12%">合同编号</th>
+                                <th width="12%">合同期限</th>
+                                <th width="11%">合同起始日期</th>
+                                <th width="11%">合同终止日期</th>
+                                <th width="11%">试用期结束日期</th>
+                                <th width="11%">办理日期</th>
+                                <th width="20%">文件</th>
+                            </tr>
+                            </thead>
+                            <tbody id="labourList">
+                            <c:forEach items="${workStaffBasicInfo.labourList}" var="buyDetails" varStatus="status">
+                                <tr>
+                                    <td>${fns:getDictLabel(buyDetails.contractType, 'relsp_cType', '')}</td>
+                                    <td>${buyDetails.contractNum}</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.tryEndTime}" 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="24" height="24" 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-xs12 form-table-container">
+                        <table id="languageTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="20%"><span class="require-item">*</span>语种</th>
+                                <th width="20%"><span class="require-item">*</span>熟练程度</th>
+                                <th width="20%">证书名称</th>
+                                <th width="20%">获证日期</th>
+                                <th width="20%">文件</th>
+                            </tr>
+                            </thead>
+                            <tbody id="languageList">
+                            <c:forEach items="${workStaffBasicInfo.languageList}" var="language" varStatus="varStatus">
+                                <tr>
+                                    <td>
+                                            ${fns:getMainDictLabel(language.language,'language','')}
+                                    </td>
+                                    <td>
+                                            ${fns:getDictLabel(language.proficiency,'proficiency','')}
+                                    </td>
+                                    <td>
+                                            ${language.certificate}
+                                    </td>
+                                    <td>
+                                        <fmt:formatDate value="${language.certifDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td>
+                                        <c:if test="${not empty language.filePath}"><img src="${language.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${language.filePath}','90%','90%')" alt=""></c:if>
+                                    </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 form-table-container">
+                        <table id="experienceTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="15%"><span class="require-item">*</span>所在单位</th>
+                                <th width="15%"><span class="require-item">*</span>工作部门</th>
+                                <th width="15%"><span class="require-item">*</span>职务或岗位</th>
+                                <th width="15%"><span class="require-item">*</span>起始日期</th>
+                                <th width="15%"><span class="require-item">*</span>终止日期</th>
+                                <th width="13%">证明人</th>
+                                <th width="12%">证明人联系方式</th>
+                            </tr>
+                            </thead>
+                            <tbody id="experienceList">
+                            <c:forEach items="${workStaffBasicInfo.experienceList}" varStatus="varStatus" var="experience">
+                                <tr>
+                                    <td>
+                                        ${experience.company}
+                                    </td>
+                                    <td>
+                                        ${experience.dept}
+                                    </td>
+                                    <td>
+                                        ${experience.duty}
+                                    </td>
+                                    <td>
+                                        <fmt:formatDate value="${experience.startDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td>
+                                        <fmt:formatDate value="${experience.endDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td>
+                                        ${experience.certifier}
+                                    </td>
+                                    <td>
+                                        ${experience.certifierTel}
+                                    </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 form-table-container">
+                        <table id="certificateTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="10%"><span class="require-item">*</span>证书名称</th>
+                                <th width="10%"><span class="require-item">*</span>证书编号</th>
+                                <th width="10%"><span class="require-item">*</span>发证机关</th>
+                                <th width="10%"><span class="require-item">*</span>发证日期</th>
+                                <th width="10%">注册日期</th>
+                                <th width="10%">注册证书编号</th>
+                                <th width="10%">专业</th>
+                                <th width="10%">等级</th>
+                                <th width="10%">取得方式</th>
+                                <th width="10%">文件</th>
+                            </tr>
+                            </thead>
+                            <tbody id="certificateList">
+                            <c:forEach items="${workStaffBasicInfo.certificateList}" var="certificate" varStatus="varStatus">
+                                <tr>
+                                    <td>
+                                            ${certificate.name}
+                                    </td>
+                                    <td>
+                                        ${certificate.num}
+                                    </td>
+                                    <td>
+                                        ${certificate.issuingAuthority}
+                                    </td>
+                                    <td>
+                                        <fmt:formatDate value="${certificate.issuingDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td>
+                                        <fmt:formatDate value="${certificate.registDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td>
+                                        ${certificate.registNum}
+                                    </td>
+                                    <td>
+                                        ${certificate.major}
+                                    </td>
+                                    <td>
+                                        ${certificate.grade}
+                                    </td>
+                                    <td>
+                                            ${certificate.issType}
+                                    </td>
+                                    <td >
+                                        <c:if test="${not empty certificate.filePath}"><img src="${certificate.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${certificate.filePath}','90%','90%')" alt=""></c:if>
+                                    </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 form-table-container">
+                        <table id="titleTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="20%"><span class="require-item">*</span>职称名称</th>
+                                <th width="15%"><span class="require-item">*</span>职称等级</th>
+                                <th width="15%"><span class="require-item">*</span>取得日期</th>
+                                <th width="15%"><span class="require-item">*</span>取得途径</th>
+                                <th width="20%"><span class="require-item">*</span>审批单位</th>
+                                <th width="15%">文件</th>
+                            </tr>
+                            </thead>
+                            <tbody id="titleList">
+                            <c:forEach items="${workStaffBasicInfo.titleList}" var="title" varStatus="varStatus">
+                                <tr>
+                                    <td>
+                                        ${title.name}
+                                    </td>
+                                    <td>
+                                        ${title.grade}
+                                    </td>
+                                    <td>
+                                        <fmt:formatDate value="${title.startDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td>
+                                        ${title.pathway}
+                                    </td>
+                                    <td>
+                                        ${title.approvalAuthority}
+                                    </td>
+                                    <td>
+                                        <c:if test="${not empty title.filePath}"><img src="${title.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${title.filePath}','90%','90%')" alt=""></c:if>
+                                    </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 form-table-container">
+                        <table id="familyTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="20%"><span class="require-item">*</span>与本人的关系</th>
+                                <th width="20%"><span class="require-item">*</span>成员姓名</th>
+                                <th width="20%"><span class="require-item">*</span>身份证号码</th>
+                                <th width="20%"><span class="require-item">*</span>成员性别</th>
+                                <th width="20%"><span class="require-item">*</span>成员联系方式</th>
+                            </tr>
+                            </thead>
+                            <tbody id="familyList">
+                            <c:forEach items="${workStaffBasicInfo.familyList}" var="family" varStatus="varStatus">
+                                <tr>
+                                    <td>
+                                        ${family.relation}
+                                    </td>
+                                    <td>
+                                        ${family.name}
+                                    </td>
+                                    <td>
+                                        ${family.idCard}
+                                    </td>
+                                    <td>
+                                            ${family.gender}
+                                    </td>
+                                    <td>
+                                        ${family.contact}
+                                    </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 form-table-container">
+                        <table id="trainingTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="10%"><span class="require-item">*</span>培训名称</th>
+                                <th width="10%">培训机构</th>
+                                <th width="10%">培训地点</th>
+                                <th width="10%">培训起始日期</th>
+                                <th width="10%">培训终止日期</th>
+                                <th width="10%"><span class="require-item">*</span>培训类型</th>
+                                <th width="10%">学时</th>
+                                <th width="10%"><span class="require-item">*</span>所获证书</th>
+                                <th width="10%">文件</th>
+                                <th width="10%">备注</th>
+                            </tr>
+                            </thead>
+                            <tbody id="trainingList">
+                            <c:forEach items="${workStaffBasicInfo.trainingList}" var="training" varStatus="varStatus">
+                                <tr>
+                                    <td>
+                                        ${training.name}
+                                    </td>
+                                    <td>
+                                        ${training.agency}
+                                    </td>
+                                    <td>
+                                        ${training.address}
+                                    </td>
+                                    <td>
+                                        <fmt:formatDate value="${training.startDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td>
+                                        <fmt:formatDate value="${training.endDate}" pattern="yyyy-MM-dd"/>
+                                    </td>
+                                    <td>
+                                            ${training.type}
+                                    </td>
+                                    <td>
+                                        ${training.hours}
+                                    </td>
+                                    <td>
+                                        ${training.certificate}
+                                    </td>
+                                    <td>
+                                        <c:if test="${not empty training.filePath}"><img src="${training.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${training.filePath}','90%','90%')" alt="${training.fileName}"></c:if>
+                                    </td>
+                                    <td>
+                                        ${training.remarks}
+                                    </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 form-table-container">
+                        <table id="socialPositionTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="25%"><span class="require-item">*</span>职务名称</th>
+                                <th width="25%">任职开始日期</th>
+                                <th width="25%">任职结束日期</th>
+                                <th width="25%">任职机构</th>
+                            </tr>
+                            </thead>
+                            <tbody id="socialPositionList">
+                            <c:forEach items="${workStaffBasicInfo.socialPositionList}" varStatus="varStatus" var="socialPosition">
+                            <tr>
+                                <td>
+                                    ${socialPosition.name}
+                                </td>
+                                <td>
+                                    <fmt:formatDate value="${socialPosition.startDate}" pattern="yyyy-MM-dd"/>
+                                </td>
+                                <td>
+                                    <fmt:formatDate value="${socialPosition.endDate}" pattern="yyyy-MM-dd"/>
+                                </td>
+                                <td>
+                                    ${socialPosition.organization}
+                                </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 form-table-container">
+                        <table id="rewardsTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="10%"><span class="require-item">*</span>奖惩类型</th>
+                                <th width="20%"><span class="require-item">*</span>奖惩名称</th>
+                                <th width="15%"><span class="require-item">*</span>时间</th>
+                                <th width="15%">级别</th>
+                                <th width="20%"><span class="require-item">*</span>原因</th>
+                                <th width="20%"><span class="require-item">*</span>授予机构</th>
+                            </tr>
+                            </thead>
+                            <tbody id="rewardsList">
+                            <c:forEach items="${workStaffBasicInfo.rewardsList}" varStatus="varStatus" var="rewards">
+                                <tr>
+                                    <td>
+                                            ${rewards.type}
+                                    </td>
+                                    <td>
+                                        ${rewards.name}
+                                    </td>
+                                    <td>
+                                        ${rewards.atTime}
+                                    </td>
+                                    <td>
+                                        ${rewards.grade}
+                                    </td>
+                                    <td>
+                                        ${rewards.reason}
+                                    </td>
+                                    <td>
+                                        ${rewards.organization}
+                                    </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 form-table-container">
+                        <table id="achievementTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="20%">项目名称</th>
+                                <th width="15%">主委托方</th>
+                                <th width="15%">工程分类</th>
+                                <th width="15%">规模类型/单位/数量</th>
+                                <th width="15%">担任职务</th>
+                                <th width="20%">参与内容</th>
+                            </tr>
+                            </thead>
+                            <tbody id="achievementList">
+                            <c:forEach items="${workStaffBasicInfo.achievementList}" var="achievement" varStatus="varStatus">
+                                <tr>
+                                    <td class="text-center">
+                                            ${achievement.projName}
+                                    </td>
+                                    <td class="text-center">
+                                            ${achievement.projClient}
+                                    </td>
+                                    <td class="text-center">
+                                            ${achievement.category}
+                                    </td>
+                                    <td class="text-center">
+                                            ${achievement.unitNumber}
+                                    </td>
+                                    <td class="text-center">
+                                            ${achievement.duty}
+                                    </td>
+                                    <td class="text-center">
+                                            ${achievement.content}
+                                    </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 form-table-container">
+                        <table id="recordTable" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                <th width="25%"><span class="require-item">*</span>档案名称</th>
+                                <th width="25%">编号</th>
+                                <th width="25%">文件</th>
+                                <th width="25%">验证</th>
+                            </tr>
+                            </thead>
+                            <tbody id="recordList">
+                            <c:forEach items="${workStaffBasicInfo.recordList}" var="record" varStatus="varStatus">
+                                <tr>
+                                    <td>
+                                        ${record.name}
+                                    </td>
+                                    <td>
+                                        ${record.num}
+                                    </td>
+                                    <td>
+                                        <c:if test="${not empty record.filePath}"><img src="${record.filePath}" width="24" height="24" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${record.filePath}','90%','90%')" alt="${record.fileName}"></c:if>
+                                    </td>
+                                    <td>
+                                        ${record.status}
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </form:form>
+        </div>
+    </div>
+</body>
+</html>

+ 750 - 0
src/main/webapp/webpage/modules/workstock/workStockAcceptAudit.jsp

@@ -0,0 +1,750 @@
+<%@ 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调用提交表单。
+                $('#flag').val('yes');
+		  if(validateForm.form()){
+              if($("#workItemStocks tr").length==0){
+                  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: '#createDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#acceptDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+		});
+        function insertTitle(tValue){
+            var list = "${workStock.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 = "106";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStock/"+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, tpl, row){
+            var idx1 = $("#workCatalogueItemStocks tr").length;
+            if(list == '#workCatalogueItemStocks' && idx1 < 100){
+                bornTemplete(list, idx, tpl, row, idx1);
+            }
+        }
+        function addRow2(list, idx, tpl, row){
+            var idx2 = $("#workItemStocks tr").length;
+            if(list == '#workItemStocks' && idx2 < 100){
+                console.log("idx--------"+idx2);
+                tpl = tpl.replace("workItemStocks[0].isAssets","workItemStocks["+idx+"].isAssets");
+                bornTemplete(list, idx, tpl, row, idx2);
+            }
+        }
+        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 delRow(obj, prefix) {
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+           /* var idx1 = $("#workCatalogueItemStocks tr").length; //tr 总数
+            for (var i = 0; i < idx1; i++) {
+                $("#workCatalogueItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+            }
+
+            var idx2 = $("#workItemStocks tr").length; //tr 总数
+            for(var i = 0;i < idx2;i++){
+                $("#workItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+            }*/
+        }
+        function setPNumber(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoice/workInvoice/getPNumberr',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#pNumber").val(d.pNumber);
+                }
+            })
+        }
+
+        function setRow(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstock/workStock/getRow',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    addRow('#workCatalogueItemStocks',workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;
+                    //console.log("---------"+data.companyType+"---------"+data.companyIndustry+"---------"+data.areaName);
+                    //console.log("---------"+workCatalogueItemStocksRowIdx+"---------"+workCatalogueItemStocksTpl);
+                    var row = workCatalogueItemStocksRowIdx - 1 ;
+                    $("#"+"workCatalogueItemStocks"+row+"_name").val(d.name);
+                    $("#"+"workCatalogueItemStocks"+row+"_number").val(d.number);
+                    $("#"+"workCatalogueItemStocks"+row+"_type").val(d.type);
+                    $("#"+"workCatalogueItemStocks"+row+"_model").val(d.model);
+                    $("#"+"workCatalogueItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                }
+            })
+        }
+
+        function setRow2(_obj){
+            console.log(_obj);
+            for (var i=0; i<_obj.length; i++) {
+                console.log("------_obj-------" + _obj[i]);
+                console.log("-----id----" + _obj[i].id);
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstock/workStock/getRow',
+                    data:{
+                        "obj":_obj[i].id
+                    },
+                    success:function(data){
+                        var d = JSON.parse(data);
+                        addRow2('#workItemStocks', workItemStocksRowIdx, workItemStocksTpl);workItemStocksRowIdx = workItemStocksRowIdx + 1;
+                        var row = workItemStocksRowIdx - 1 ;
+                        $("#"+"workItemStocks"+row+"_name").val(d.name);
+                        $("#"+"workItemStocks"+row+"_number").val(d.number);
+                        $("#"+"workItemStocks"+row+"_type").val(d.types);
+                        $("#"+"workItemStocks"+row+"_model").val(d.model);
+                        $("#"+"workItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                        $("#"+"workItemStocks"+row+"_primaryUnits").val(d.primaryUnits);
+                        $("#"+"workItemStocks"+row+"_catalogueItemId").val(d.catalogueItemId);
+
+                    }
+                })
+            }
+        }
+
+        function setInfo(contractId,idx){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstock/workStock/setInfo',
+                data:{
+                    "contractId":contractId
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#"+"workItemStocks"+idx+"_supplierName").val(d.supplierName);
+                }
+            })
+        };
+        function setTaxMoney(obj){
+            var a = $(obj).attr("id");
+            var b = a.replace('price','count');
+            var t = a.replace('price','totalPrice');
+            var value = obj.value || 0;
+            if(!value || value == 0){
+                $("#" +  t ).val("");
+                return;
+            }
+            if(!/^\d+(\.\d{1,2})?$/.test( value )){
+                $("#" +  t ).val("");
+                return;
+			}
+            //数量
+            var b2 = $("#" +  b ).val();
+            if(!/^\d+(\.\d{1,2})?$/.test( b2 )){
+                parent.layer.msg("请正确填写数量",{icon:5});
+                $("#" +  t ).val("");
+                return;
+            }
+            console.log("-value----"+value);
+            var totalPrice = b2 * value ;
+            console.log("-tax----"+totalPrice);
+            $("#" +  t ).val(parseFloat(totalPrice.toFixed(2)));
+        }
+        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 openBill(title,url,width,height,target,formId){
+            var frameIndex = parent.layer.getFrameIndex(window.name);
+            var urls = url+"&index="+frameIndex;
+            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: urls ,
+                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中展示
+                    inputForm.attr("action","${ctx}/workcatalogueitem/workCatalogueItem/contractsave");//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+
+                    formSubmit($document,formId,index);
+                },
+                cancel: function(index){
+                }
+            });
+        }
+        function formSubmit($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        var d = JSON.parse(data);
+                        addRow2('#workItemStocks', workItemStocksRowIdx, workItemStocksTpl);workItemStocksRowIdx = workItemStocksRowIdx + 1;
+                        var row = workItemStocksRowIdx - 1 ;
+                        $("#"+"workItemStocks"+row+"_name").val(d.name);
+                        $("#"+"workItemStocks"+row+"_number").val(d.number);
+                        $("#"+"workItemStocks"+row+"_type").val(d.types);
+                        $("#"+"workItemStocks"+row+"_model").val(d.model);
+                        $("#"+"workItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                        $("#"+"workItemStocks"+row+"_primaryUnits").val(d.primaryUnits);
+                        $("#"+"workItemStocks"+row+"_catalogueItemId").val(d.catalogueItemId);
+                        parent.layer.msg(d.str,{icon:1});
+                        top.layer.close(index)
+                    }
+                });
+            }
+        }
+	</script>
+</head>
+
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStock" enctype="multipart/form-data"  action ="${ctx}/workstock/workStock/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 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" readonly="true" class="form-control required layui-input" value="${workStock.createBy.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">
+									<div class="input-group">
+										<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStock.number}"/>
+										<span class="input-group-btn">
+											<label class="form-status"><c:choose><c:when test="${ empty workStock.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workStock.status, 'audit_state','')}</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">
+									<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workStock.createDate}" 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 required layui-input" value="${workStock.officeName}"/>
+								</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 ">${workStock.reason}</textarea>
+								</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('#workCatalogueItemStocks', workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增物品</a>
+
+								<sys:gridselectstock2 url="${ctx}/workscrap/workScrap/selectitems" id="zzz" name="" sign="1" value=""  title="选择物品" labelName=""
+													  labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock2>--%>
+							</div>
+							<div class="layui-item layui-col-xs12 form-table-container">
+								<table id="contentTable1" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th><span class="require-item">*</span>物品名称</th>
+										<th>物品编号</th>
+										<th>物品分类</th>
+										<th>规格型号</th>
+										<th>计量单位</th>
+										<th><span class="require-item">*</span>数量</th>
+										<th>描述</th>
+										<%--<th width="150px">操作</th>--%>
+									</tr>
+									</thead>
+									<tbody id="workCatalogueItemStocks">
+									<c:if test="${not empty workStock.workCatalogueItemStocks}">
+										<c:forEach items="${workStock.workCatalogueItemStocks}" var="workCatalogueItemStocks" varStatus="index">
+											<tr id="workCatalogueItemStocks${index.index}">
+												<td class="hide">
+													<input id="workCatalogueItemStocks${index.index}_id" name="workCatalogueItemStocks[${index.index}].id" type="hidden" value="${workCatalogueItemStocks.id}"/>
+													<input id="workCatalogueItemStocks${index.index}_delFlag" name="workCatalogueItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_name" name="workCatalogueItemStocks[${index.index}].name" type="text" value="${workCatalogueItemStocks.name}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_number" name="workCatalogueItemStocks[${index.index}].number" type="text" value="${workCatalogueItemStocks.number}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+														<%--<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="text" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>--%>
+														<%--<form:select id="workCatalogueItemStocks${index.index}_type" path="workCatalogueItemStocks[${index.index}].type" readonly="true" class="form-control">
+                                                            <form:option value="" label="请选择"/>
+                                                            <form:options items="${fns:getDictList('item_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                                        </form:select>--%>
+
+													<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.type, 'item_type', '')}" readonly="true" class="form-control "/>
+													<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="hidden" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_model" name="workCatalogueItemStocks[${index.index}].model" type="text" readonly="true" value="${workCatalogueItemStocks.model}"  class="form-control "/>
+												</td>
+												<td>
+														<%--<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" type="text" value="${workCatalogueItemStocks.primaryUnit}" readonly="true"   class="form-control "/>--%>
+														<%--<form:select id="workCatalogueItemStocks${index.index}_primaryUnit" path="workCatalogueItemStocks[${index.index}].primaryUnit" readonly="true" class="form-control">
+                                                            <form:option value="" label="请选择"/>
+                                                            <form:options items="${fns:getDictList('full_count_unit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                                        </form:select>--%>
+													<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control "/>
+													<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" value="${workCatalogueItemStocks.primaryUnit}" type="hidden"  readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_count" name="workCatalogueItemStocks[${index.index}].count" type="text" value="${workCatalogueItemStocks.count}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_detail" name="workCatalogueItemStocks[${index.index}].detail" type="text" value="${workCatalogueItemStocks.detail}" readonly="true" class="form-control "/>
+												</td>
+												<%--<td class="text-center op-td">
+													<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+												</td>--%>
+											</tr>
+										</c:forEach>
+									</c:if>
+									</tbody>
+								</table>
+								<script type="text/template" id="workCatalogueItemStocksTpl">//<!--
+												<tr id="workCatalogueItemStocks{{idx}}">
+													<td class="hide">
+														<input id="workCatalogueItemStocks{{idx}}_id" name="workCatalogueItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+														<input id="workCatalogueItemStocks{{idx}}_delFlag" name="workCatalogueItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+													</td>
+													<td>
+														<input id="workCatalogueItemStocks{{idx}}_name" name="workCatalogueItemStocks[{{idx}}].name" type="text" value="{{row.name}}" class="form-control required"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_number" name="workCatalogueItemStocks[{{idx}}].number" type="text" value="{{row.number}}" class="form-control"/>
+													 </td>
+ 													<td>
+														<input id="workCatalogueItemStocks{{idx}}_type" name="workCatalogueItemStocks[{{idx}}].type" type="text" value="{{row.type}}"  class="form-control "/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_model" name="workCatalogueItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  class="form-control"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_primaryUnit" name="workCatalogueItemStocks[{{idx}}].primaryUnit" type="text" value="{{row.primaryUnit}}"  class="form-control "/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_count" name="workCatalogueItemStocks[{{idx}}].count" type="text" value="{{row.count}}" class="form-control required"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_detail" name="workCatalogueItemStocks[{{idx}}].detail" type="text" value="{{row.detail}}" class="form-control"/>
+													 </td>
+
+													<td class="text-center op-td" id="workCatalogueItemStocks{{idx}}_td">
+														{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+													</td>
+												</tr>//-->
+								</script>
+							</div>
+						</div>
+
+						<div class="form-group layui-row lw16">
+							<div class="form-group-label"><h2>物品验收明细</h2></div>
+							<div class="layui-item nav-btns">
+
+								<a href="javascript:void(0)" onclick="openBill('新增物品目录', '${ctx}/workcatalogueitem/workCatalogueItem/form?param=2','90%','90%',false,'inputForm')" class="nav-btn nav-btn-add"><i class="fa fa-plus"></i> 新增</a>
+
+								<sys:gridselectstock3 url="${ctx}/workscrap/workScrap/selectitems" id="xxx" name="" sign="2" value=""  title="选择物品" labelName=""
+													  labelValue="" isSingle="false" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock3>
+
+							</div>
+
+							<div class="layui-item layui-col-xs12 form-table-container">
+										<table id="contentTable2" class="table table-bordered table-condensed can-edit no-bottom-margin">
+									<thead>
+									<tr>
+										<th width="100px"><span class="require-item">*</span>物品编号</th>
+										<th width="100px">物品名称</th>
+										<th width="100px">物品分类</th>
+										<th width="100px">规格型号</th>
+										<th width="100px">计量单位</th>
+										<th width="100px"><span class="require-item">*</span>数量</th>
+										<th width="100px">单价</th>
+										<th width="100px">合计</th>
+										<th width="150px">采购合同</th>
+										<th width="100px">供应商</th>
+										<th width="100px"><span class="require-item">*</span>是否固定资产</th>
+										<th width="150px">操作</th>
+									</tr>
+									</thead>
+									<tbody id="workItemStocks">
+									<c:if test="${not empty workStock.workItemStocks}">
+										<c:forEach items="${workStock.workItemStocks}" var="workItemStocks" varStatus="index">
+											<tr id="workItemStocks${index.index}">
+												<td class="hide">
+													<input id="workItemStocks${index.index}_id" name="workItemStocks[${index.index}].id" type="hidden" value="${workItemStocks.id}"/>
+													<input id="workItemStocks${index.index}_delFlag" name="workItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_number" name="workItemStocks[${index.index}].number" type="text" value="${workItemStocks.number}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_name" name="workItemStocks[${index.index}].name" type="text" value="${workItemStocks.name}" readonly="true" class="form-control "/>
+													<input id="workItemStocks${index.index}_catalogueItemId" name="workItemStocks[${index.index}].catalogueItemId" type="hidden" value="${workItemStocks.catalogueItemId}"  class="form-control "/>
+
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_type" name="workItemStocks[${index.index}].type" type="text" value="${workItemStocks.type}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_model" name="workItemStocks[${index.index}].model" type="text" value="${workItemStocks.model}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_primaryUnit" name="workItemStocks[${index.index}].primaryUnit" type="text" value="${workItemStocks.primaryUnit}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_count" name="workItemStocks[${index.index}].count" type="text" value="${workItemStocks.count}" class="form-control number required"/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_price" onblur="setTaxMoney(this)" name="workItemStocks[${index.index}].price" type="text" value="${workItemStocks.price}" class="form-control number"/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_totalPrice" name="workItemStocks[${index.index}].totalPrice" type="text" value="${workItemStocks.totalPrice}" class="form-control number"/>
+												</td>
+												<td>
+													<%--<input id="workItemStocks${index.index}_contractName" name="workItemStocks[${index.index}].contractName" type="text" value="${workItemStocks.contractName}" class="form-control "/>--%>
+													<sys:gridselectstockcontracts url="${ctx}/workstock/workStock/getContract" id="workItemStocks${index.index}_contractId" name="workItemStocks[${index.index}].contractId"  title="选择客户" value="${workItemStocks.contractId}" labelValue="${workItemStocks.contractName}"
+																		 labelName="workItemStocks[${index.index}].contractName" idxs="${index.index}" cssClass="form-control required" fieldLabels="联系人" fieldKeys="name"  searchLabel="联系人" searchKey="name"></sys:gridselectstockcontracts>
+
+
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_supplierName" name="workItemStocks[${index.index}].supplierName" readonly="true" type="text" value="${workItemStocks.supplierName}" class="form-control "/>
+
+												</td>
+												<td>
+													<%--<input id="workItemStocks${index.index}_isAssets" name="workItemStocks[${index.index}].isAssets" type="text" value="${workItemStocks.isAssets}" class="form-control required"/>--%>
+														<form:select id="workItemStocks${index.index}_isAssets" path="workItemStocks[${index.index}].isAssets" class="form-control required">
+															<form:option value="" label="请选择"/>
+															<form:options items="${fns:getDictList('is_assets')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+												</td>
+												<td class="text-center op-td"  style="text-algin:center">
+													<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks${index.index}')" title="删除">
+														<i class="glyphicon glyphicon-remove"></i>&nbsp;删除
+													</span>
+												</td>
+											</tr>
+										</c:forEach>
+									</c:if>
+									</tbody>
+								</table>
+								<script type="text/template" id="workItemStocksTpl">//<!--
+                                    <tr id="workItemStocks{{idx}}">
+                                        <td class="hide">
+                                            <input id="workItemStocks{{idx}}_id" name="workItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                            <input id="workItemStocks{{idx}}_delFlag" name="workItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+                                        </td>
+                                    	<td>
+                                        	<input id="workItemStocks{{idx}}_number" name="workItemStocks[{{idx}}].number" type="text" value="{{row.number}}"  readonly="true"  class="form-control required"/>
+                                   		 </td>
+										<td>
+                                        	<input id="workItemStocks{{idx}}_name" name="workItemStocks[{{idx}}].name" type="text" value="{{row.name}}"  readonly="true"  class="form-control"/>
+                                        	<input id="workItemStocks{{idx}}_catalogueItemId" name="workItemStocks[{{idx}}].catalogueItemId"  value="{{row.catalogueItemId}}" type="hidden"  class="form-control"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_type" name="workItemStocks[{{idx}}].type" type="text" value="{{row.type}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_model" name="workItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_primaryUnits" name=" " type="text" value=""  readonly="true"  class="form-control "/>
+
+                                        	<input id="workItemStocks{{idx}}_primaryUnit" name="workItemStocks[{{idx}}].primaryUnit" type="hidden" value="{{row.primaryUnit}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_count" name="workItemStocks[{{idx}}].count" type="text" value="{{row.count}}"   class="form-control number required"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_price" onblur="setTaxMoney(this)" name="workItemStocks[{{idx}}].price" type="text" value="{{row.price}}"   class="form-control number"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_totalPrice" name="workItemStocks[{{idx}}].totalPrice" type="text" value="{{row.totalPrice}}"    class="form-control number"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<%--<input id="workItemStocks{{idx}}_contractName" name="workItemStocks[{{idx}}].contractName" type="text" value="{{row.contractName}}"   class="form-control "/>--%>
+
+                                        	<sys:gridselectstockcontracts url="${ctx}/workstock/workStock/getContract" id="workItemStocks{{idx}}_contractId" name="workItemStocks[{{idx}}].contractId"  title="选择合同" value="{{row.contractId}}" labelValue="{{row.contractName}}"
+																 labelName="workItemStocks[{{idx}}].contractName" idxs="{{idx}}" cssClass="form-control required" fieldLabels="" fieldKeys="name"  searchLabel="" searchKey="name"></sys:gridselectstockcontracts>
+
+                                   		 </td>
+                                   		  <td>
+                                        	<input id="workItemStocks{{idx}}_supplierName" name="workItemStocks[{{idx}}].supplierName" type="text" value="{{row.supplierName}}" readonly="true" class="form-control "/>
+
+
+                                   		 </td>
+                                   		  <td>
+                                        	<%--<input id="workItemStocks{{idx}}_isAssets" name="workItemStocks[{{idx}}].isAssets" type="text" value="{{row.isAssets}}" class="form-control required"/>--%>
+                                        	<form:select id="workItemStocks${index.index}_isAssets" path="workItemStocks[0].isAssets" class="form-control required">
+															<form:option value="" label="请选择"/>
+															<form:options items="${fns:getDictList('is_assets')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+                                   		 </td>
+
+                                        <td class="text-center op-td"  id="workItemStocks{{idx}}_td">
+                                            {{#delBtn}}<span class="op-btn op-btn-delete" style="margin-top:10px;margin-left:30%;display:block;width:60px;" onclick="delRow(this, '#workItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                                        </td>
+                                    </tr>//-->
+								</script>
+								<script type="text/javascript">
+                                    var workCatalogueItemStocksRowIdx = 0, workCatalogueItemStocksTpl = $("#workCatalogueItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                                    var workItemStocksRowIdx = 0, workItemStocksTpl = $("#workItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                                    if($("#id").val()){
+                                        workCatalogueItemStocksRowIdx = ${fn:length(workStock.workCatalogueItemStocks)};
+                                        workItemStocksRowIdx = ${fn:length(workStock.workItemStocks)};
+                                    }
+								</script>
+
+							</div>
+						</div>
+						<div class="form-group layui-row first lw16">
+							<div class="layui-item layui-col-sm6">
+								<label class="layui-form-label"><span class="require-item">*</span>验收日期:</label>
+								<div class="layui-input-block">
+									<input class="laydate-icondate layui-input form-control layer-date laydate-icon"
+										   id="acceptDate" name="acceptDate" type="hidden"
+										   value="<fmt:formatDate value="${workStock.acceptDate}" pattern="yyyy-MM-dd"/>">
+									<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workStock.acceptDate}" pattern="yyyy-MM-dd"/>"/>
+								</div>
+							</div>
+							<div class="layui-item layui-col-sm6">
+								<label class="layui-form-label">验收人:</label>
+								<div class="layui-input-block">
+									<form:input path="acceptName" htmlEscape="false" readonly="true" class="form-control required layui-input"/>
+								</div>
+							</div>
+						</div>
+						<div class="form-group layui-row first lw16">
+							<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">
+									<textarea  htmlEscape="false" rows="4"  readonly="true"  class="form-control ">${workStock.remarks}</textarea>
+								</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="listAttachment" class="table table-bordered table-condensed details">
+									<thead>
+									<tr>
+											<%-- <th>序号</th>--%>
+										<th>文件预览</th>
+										<th>上传人</th>
+										<th>上传时间</th>
+										<th width="180px">操作</th>
+									</tr>
+									</thead>
+									<tbody id="file_attachment">
+									<c:forEach items="${workStock.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_attachment','_attachment')" 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-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="${workStock.act.procInsId}"/>
+								<act:histoicFlow procInsId="${workStock.act.procInsId}"/>
+							</div>
+						</div>
+						<div class="form-group layui-row page-end"></div>
+					</div>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 591 - 0
src/main/webapp/webpage/modules/workstock/workStockAudit.jsp

@@ -0,0 +1,591 @@
+<%@ 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()){
+              if($("#workCatalogueItemStocks tr").length==0){
+                  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: '#createDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#acceptDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+		});
+        function insertTitle(tValue){
+            var list = "${workStock.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 = "106";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStock/"+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, tpl, row){
+            var idx1 = $("#workCatalogueItemStocks tr").length;
+            if(list == '#workCatalogueItemStocks' && idx1 < 100){
+                bornTemplete(list, idx, tpl, row, idx1);
+            }
+        }
+        function addRow2(list, idx, tpl, row){
+            var idx2 = $("#workItemStocks tr").length;
+            if(list == '#workItemStocks' && idx2 < 100){
+                bornTemplete(list, idx, tpl, row, idx2);
+            }
+        }
+        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 delRow(obj, prefix) {
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+           /* var idx1 = $("#workCatalogueItemStocks tr").length; //tr 总数
+            for (var i = 0; i < idx1; i++) {
+                $("#workCatalogueItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+            }
+
+            var idx2 = $("#workItemStocks tr").length; //tr 总数
+            for(var i = 0;i < idx2;i++){
+                $("#workItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+            }*/
+        }
+        function setPNumber(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoice/workInvoice/getPNumberr',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#pNumber").val(d.pNumber);
+                }
+            })
+        }
+
+        function setRow(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstock/workStock/getRow',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    addRow('#workCatalogueItemStocks',workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;
+                    //console.log("---------"+data.companyType+"---------"+data.companyIndustry+"---------"+data.areaName);
+                    //console.log("---------"+workCatalogueItemStocksRowIdx+"---------"+workCatalogueItemStocksTpl);
+                    var row = workCatalogueItemStocksRowIdx - 1 ;
+                    $("#"+"workCatalogueItemStocks"+row+"_name").val(d.name);
+                    $("#"+"workCatalogueItemStocks"+row+"_number").val(d.number);
+                    $("#"+"workCatalogueItemStocks"+row+"_type").val(d.type);
+                    $("#"+"workCatalogueItemStocks"+row+"_model").val(d.model);
+                    $("#"+"workCatalogueItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                }
+            })
+        }
+
+        function setRow2(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstock/workStock/getRow',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    addRow2('#workItemStocks', workItemStocksRowIdx, workItemStocksTpl);workItemStocksRowIdx = workItemStocksRowIdx + 1;
+                    var row = workItemStocksRowIdx - 1 ;
+                    $("#"+"workItemStocks"+row+"_name").val(d.name);
+                    $("#"+"workItemStocks"+row+"_number").val(d.number);
+                    $("#"+"workItemStocks"+row+"_type").val(d.type);
+                    $("#"+"workItemStocks"+row+"_model").val(d.model);
+                    $("#"+"workItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                    $("#"+"workItemStocks"+row+"_catalogueItemId").val(d.catalogueItemId);
+
+                }
+            })
+        }
+	</script>
+</head>
+
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStock" enctype="multipart/form-data"  action ="${ctx}/workstock/workStock/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 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" readonly="true" class="form-control required layui-input" value="${workStock.createBy.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">
+									<div class="input-group">
+										<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStock.number}"/>
+										<span class="input-group-btn">
+											<label class="form-status"><c:choose><c:when test="${ empty workStock.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workStock.status, 'audit_state','')}</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">
+									<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workStock.createDate}" 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 required layui-input" value="${workStock.officeName}"/>
+								</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 ">${workStock.reason}</textarea>
+								</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('#workCatalogueItemStocks', workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增物品</a>
+
+								<sys:gridselectstock2 url="${ctx}/workscrap/workScrap/selectitems" id="zzz" name="" sign="1" value=""  title="选择物品" labelName=""
+													  labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock2>--%>
+							</div>
+							<div class="layui-item layui-col-xs12 form-table-container">
+								<table id="contentTable1" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th><span class="require-item">*</span>物品名称</th>
+										<th>物品编号</th>
+										<th>物品分类</th>
+										<th>规格型号</th>
+										<th>计量单位</th>
+										<th><span class="require-item">*</span>数量</th>
+										<th>描述</th>
+										<%--<th width="150px">操作</th>--%>
+									</tr>
+									</thead>
+									<tbody id="workCatalogueItemStocks">
+									<c:if test="${not empty workStock.workCatalogueItemStocks}">
+										<c:forEach items="${workStock.workCatalogueItemStocks}" var="workCatalogueItemStocks" varStatus="index">
+											<tr id="workCatalogueItemStocks${index.index}">
+												<td class="hide">
+													<input id="workCatalogueItemStocks${index.index}_id" name="workCatalogueItemStocks[${index.index}].id" type="hidden" value="${workCatalogueItemStocks.id}"/>
+													<input id="workCatalogueItemStocks${index.index}_delFlag" name="workCatalogueItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_name" name="workCatalogueItemStocks[${index.index}].name" type="text" value="${workCatalogueItemStocks.name}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_number" name="workCatalogueItemStocks[${index.index}].number" type="text" value="${workCatalogueItemStocks.number}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+														<%--<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="text" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>--%>
+														<%--<form:select id="workCatalogueItemStocks${index.index}_type" path="workCatalogueItemStocks[${index.index}].type" readonly="true" class="form-control">
+                                                            <form:option value="" label="请选择"/>
+                                                            <form:options items="${fns:getDictList('item_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                                        </form:select>--%>
+
+													<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.type, 'item_type', '')}" readonly="true" class="form-control "/>
+													<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="hidden" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_model" name="workCatalogueItemStocks[${index.index}].model" type="text" readonly="true" value="${workCatalogueItemStocks.model}"  class="form-control "/>
+												</td>
+												<td>
+														<%--<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" type="text" value="${workCatalogueItemStocks.primaryUnit}" readonly="true"   class="form-control "/>--%>
+														<%--<form:select id="workCatalogueItemStocks${index.index}_primaryUnit" path="workCatalogueItemStocks[${index.index}].primaryUnit" readonly="true" class="form-control">
+                                                            <form:option value="" label="请选择"/>
+                                                            <form:options items="${fns:getDictList('full_count_unit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                                        </form:select>--%>
+													<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control "/>
+													<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" value="${workCatalogueItemStocks.primaryUnit}" type="hidden"  readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_count" readonly="true" name="workCatalogueItemStocks[${index.index}].count" type="text" value="${workCatalogueItemStocks.count}"  class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_detail" readonly="true" name="workCatalogueItemStocks[${index.index}].detail" type="text" value="${workCatalogueItemStocks.detail}"  class="form-control "/>
+												</td>
+												<%--<td class="text-center op-td">
+													<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+												</td>--%>
+											</tr>
+										</c:forEach>
+									</c:if>
+									</tbody>
+								</table>
+								<script type="text/template" id="workCatalogueItemStocksTpl">//<!--
+												<tr id="workCatalogueItemStocks{{idx}}">
+													<td class="hide">
+														<input id="workCatalogueItemStocks{{idx}}_id" name="workCatalogueItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+														<input id="workCatalogueItemStocks{{idx}}_delFlag" name="workCatalogueItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+													</td>
+													<td>
+														<input id="workCatalogueItemStocks{{idx}}_name" name="workCatalogueItemStocks[{{idx}}].name" type="text" value="{{row.name}}" class="form-control required"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_number" name="workCatalogueItemStocks[{{idx}}].number" type="text" value="{{row.number}}" class="form-control"/>
+													 </td>
+ 													<td>
+														<input id="workCatalogueItemStocks{{idx}}_type" name="workCatalogueItemStocks[{{idx}}].type" type="text" value="{{row.type}}"  class="form-control "/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_model" name="workCatalogueItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  class="form-control"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_primaryUnit" name="workCatalogueItemStocks[{{idx}}].primaryUnit" type="text" value="{{row.primaryUnit}}"  class="form-control "/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_count" name="workCatalogueItemStocks[{{idx}}].count" type="text" value="{{row.count}}" class="form-control required"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_detail" name="workCatalogueItemStocks[{{idx}}].detail" type="text" value="{{row.detail}}" class="form-control"/>
+													 </td>
+
+													<td class="text-center op-td" id="workCatalogueItemStocks{{idx}}_td">
+														{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+													</td>
+												</tr>//-->
+								</script>
+							</div>
+						</div>
+
+						<div class="form-group layui-row lw16">
+							<div class="form-group-label"><h2>物品验收明细</h2></div>
+							<div class="layui-item nav-btns">
+								<%--<sys:gridselectstock2 url="${ctx}/workscrap/workScrap/selectitems" id="xxx" name="" sign="2" value=""  title="选择物品" labelName=""
+													  labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock2>--%>
+							</div>
+
+							<div class="layui-item layui-col-xs12 form-table-container">
+								<table id="contentTable2" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th><span class="require-item">*</span>物品编号</th>
+										<th>物品名称</th>
+										<th>物品分类</th>
+										<th>规格型号</th>
+										<th>计量单位</th>
+										<th><span class="require-item">*</span>数量</th>
+										<th>单价</th>
+										<th>合计</th>
+										<th>采购合同</th>
+										<th>供应商</th>
+										<th><span class="require-item">*</span>是否固定资产</th>
+										<%--<th width="150px">操作</th>--%>
+									</tr>
+									</thead>
+									<tbody id="workItemStocks">
+									<%--<c:if test="${not empty workStock.workItemStocks}">
+										<c:forEach items="${workStock.workItemStocks}" var="workItemStocks" varStatus="index">
+											<tr id="workItemStocks${index.index}">
+												<td class="hide">
+													<input id="workItemStocks${index.index}_id" name="workItemStocks[${index.index}].id" type="hidden" value="${workItemStocks.id}"/>
+													<input id="workItemStocks${index.index}_delFlag" name="workItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_number" name="workItemStocks[${index.index}].number" type="text" value="${workItemStocks.number}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_name" name="workItemStocks[${index.index}].name" type="text" value="${workItemStocks.name}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_type" name="workItemStocks[${index.index}].type" type="text" value="${workItemStocks.type}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_model" name="workItemStocks[${index.index}].model" type="text" value="${workItemStocks.model}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_primaryUnit" name="workItemStocks[${index.index}].primaryUnit" type="text" value="${workItemStocks.primaryUnit}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_count" name="workItemStocks[${index.index}].count" type="text" value="${workItemStocks.count}" class="form-control required"/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_price" name="workItemStocks[${index.index}].price" type="text" value="${workItemStocks.price}" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_totalPrice" name="workItemStocks[${index.index}].totalPrice" type="text" value="${workItemStocks.totalPrice}" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_contractName" name="workItemStocks[${index.index}].contractName" type="text" value="${workItemStocks.contractName}" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_supplierName" name="workItemStocks[${index.index}].supplierName" type="text" value="${workItemStocks.supplierName}" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_isAssets" name="workItemStocks[${index.index}].isAssets" type="text" value="${workItemStocks.isAssets}" class="form-control required"/>
+												</td>
+												&lt;%&ndash;<td class="text-center op-td">
+													<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+												</td>&ndash;%&gt;
+											</tr>
+										</c:forEach>
+									</c:if>--%>
+									</tbody>
+								</table>
+								<script type="text/template" id="workItemStocksTpl">//<!--
+                                    <tr id="workItemStocks{{idx}}">
+                                        <td class="hide">
+                                            <input id="workItemStocks{{idx}}_id" name="workItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                            <input id="workItemStocks{{idx}}_delFlag" name="workItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+                                        </td>
+                                    	<td>
+                                        	<input id="workItemStocks{{idx}}_number" name="workItemStocks[{{idx}}].number" type="text" value="{{row.number}}"  readonly="true"  class="form-control required"/>
+                                   		 </td>
+										<td>
+                                        	<input id="workItemStocks{{idx}}_name" name="workItemStocks[{{idx}}].name" type="text" value="{{row.name}}"  readonly="true"  class="form-control"/>
+                                        	<input id="workItemStocks{{idx}}_catalogueItemId" name="workItemStocks[{{idx}}].catalogueItemId" type="text" value="{{row.catalogueItemId}}" type="hidden"  class="form-control"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_type" name="workItemStocks[{{idx}}].type" type="text" value="{{row.type}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_model" name="workItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_primaryUnit" name="workItemStocks[{{idx}}].primaryUnit" type="text" value="{{row.primaryUnit}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_count" name="workItemStocks[{{idx}}].count" type="text" value="{{row.count}}"   class="form-control required"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_price" name="workItemStocks[{{idx}}].price" type="text" value="{{row.price}}"   class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_totalPrice" name="workItemStocks[{{idx}}].totalPrice" type="text" value="{{row.totalPrice}}"    class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_contractName" name="workItemStocks[{{idx}}].contractName" type="text" value="{{row.contractName}}"   class="form-control "/>
+                                   		 </td>
+                                   		  <td>
+                                        	<input id="workItemStocks{{idx}}_supplierName" name="workItemStocks[{{idx}}].supplierName" type="text" value="{{row.supplierName}}" class="form-control "/>
+                                   		 </td>
+                                   		  <td>
+                                        	<input id="workItemStocks{{idx}}_isAssets" name="workItemStocks[{{idx}}].isAssets" type="text" value="{{row.isAssets}}" class="form-control required"/>
+                                   		 </td>
+
+                                        <td class="text-center op-td" id="workItemStocks{{idx}}_td">
+                                            {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                                        </td>
+                                    </tr>//-->
+								</script>
+								<script type="text/javascript">
+                                    var workCatalogueItemStocksRowIdx = 0, workCatalogueItemStocksTpl = $("#workCatalogueItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                                    var workItemStocksRowIdx = 0, workItemStocksTpl = $("#workItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                                    if($("#id").val()){
+                                        workCatalogueItemStocksRowIdx = ${fn:length(workStock.workCatalogueItemStocks)};
+                                        workItemStocksRowIdx = ${fn:length(workStock.workItemStocks)};
+                                    }
+								</script>
+
+							</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 required layui-input" value="<fmt:formatDate value="${workStock.acceptDate}" pattern="yyyy-MM-dd"/>"/>
+									<%--<input id="acceptDate" name="acceptDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+										   value="<fmt:formatDate value="${workStock.acceptDate}" 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 required layui-input" value="${workStock.acceptName}"/>
+								</div>
+							</div>
+						</div>
+
+						<div class="form-group layui-row first lw16">
+							<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">
+									<textarea  htmlEscape="false" rows="4"  readonly="true"  class="form-control ">${workStock.remarks}</textarea>
+								</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="listAttachment" class="table table-bordered table-condensed details">
+									<thead>
+									<tr>
+											<%-- <th>序号</th>--%>
+										<th>文件预览</th>
+										<th>上传人</th>
+										<th>上传时间</th>
+										<th width="180px">操作</th>
+									</tr>
+									</thead>
+									<tbody id="file_attachment">
+									<c:forEach items="${workStock.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_attachment','_attachment')" 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-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="${workStock.act.procInsId}"/>
+								<act:histoicFlow procInsId="${workStock.act.procInsId}"/>
+							</div>
+						</div>
+						<div class="form-group layui-row page-end"></div>
+					</div>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 664 - 0
src/main/webapp/webpage/modules/workstock/workStockForm.jsp

@@ -0,0 +1,664 @@
+<%@ 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}/workstock/workStock/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workstock/workStock/save");
+            }
+		  if(validateForm.form()){
+              if($("#workCatalogueItemStocks tr").length==0){
+                  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: '#createDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#acceptDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+		});
+        function insertTitle(tValue){
+            var list = "${workStock.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 = "106";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStock/"+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, tpl, row){
+            var idx1 = $("#workCatalogueItemStocks tr").length;
+            if(list == '#workCatalogueItemStocks' && idx1 < 100){
+                tpl = tpl.replace("workCatalogueItemStocks[0].type","workCatalogueItemStocks["+idx1+"].type");
+                tpl = tpl.replace("workCatalogueItemStocks[0].primaryUnit","workCatalogueItemStocks["+idx1+"].primaryUnit");
+
+                tpl = tpl.replace("not","not\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("yes\" style=\"display:none;disabled:true;\"","yes");
+
+                tpl = tpl.replace("stop","stop\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("should\" style=\"display:none;disabled:true;\"","should");
+
+                tpl = tpl.replace("one","one\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("two\" style=\"display:none;disabled:true;\"","two");
+
+                tpl = tpl.replace("three","three\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("four\" style=\"display:none;disabled:true;\"","four");
+
+                tpl = tpl.replace("five","five\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("six\" style=\"display:none;disabled:true;\"","six");
+
+
+                bornTemplete(list, idx, tpl, row, idx1);
+            }
+        }
+        function addRows(list, idx, tpl, row){
+            var idx1 = $("#workCatalogueItemStocks tr").length;
+            if(list == '#workCatalogueItemStocks' && idx1 < 100){
+                console.log("idx1--------"+idx1);
+                tpl = tpl.replace("workCatalogueItemStocks[0].type","workCatalogueItemStocks["+idx1+"].type");
+                tpl = tpl.replace("workCatalogueItemStocks[0].primaryUnit","workCatalogueItemStocks["+idx1+"].primaryUnit");
+
+                tpl = tpl.replace("yes","yes\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("not\" style=\"display:none;disabled:true;\"","not\"");
+
+                tpl = tpl.replace("should","should\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("stop\" style=\"display:none;disabled:true;\"","stop\"");
+
+                tpl = tpl.replace("two","two\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("one\" style=\"display:none;disabled:true;\"","one\"");
+
+                tpl = tpl.replace("four","four\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("three\" style=\"display:none;disabled:true;\"","three\"");
+
+                tpl = tpl.replace("six","six\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("five\" style=\"display:none;disabled:true;\"","five\"");
+
+                bornTemplete(list, idx, tpl, row, idx1);
+            }
+        }
+        function addRow2(list, idx, tpl, row){
+            var idx2 = $("#workItemStocks tr").length;
+            if(list == '#workItemStocks' && idx2 < 100){
+                tpl = tpl.replace("workItemStocks[0].isAssets","workItemStocks["+idx2+"].isAssets");
+                bornTemplete(list, idx, tpl, row, idx2);
+            }
+        }
+        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 delRow(obj, prefix) {
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+           /* var idx1 = $("#workCatalogueItemStocks tr").length; //tr 总数
+            for (var i = 0; i < idx1; i++) {
+                $("#workCatalogueItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+            }
+
+            var idx2 = $("#workItemStocks tr").length; //tr 总数
+            for(var i = 0;i < idx2;i++){
+                $("#workItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+            }*/
+        }
+        function setPNumber(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoice/workInvoice/getPNumberr',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#pNumber").val(d.pNumber);
+                }
+            })
+        }
+
+        function setRow(_obj){
+            console.log(_obj);
+            for (var i=0; i<_obj.length; i++){
+                console.log("------_obj-------"+_obj[i]);
+                console.log("-----id----"+_obj[i].id);
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstock/workStock/getRow',
+                    data:{
+                        "obj":_obj[i].id
+                    },
+                    success:function(data){
+                        var d = JSON.parse(data);
+                        addRows('#workCatalogueItemStocks',workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;
+                        //console.log("---------"+data.companyType+"---------"+data.companyIndustry+"---------"+data.areaName);
+                        //console.log("---------"+workCatalogueItemStocksRowIdx+"---------"+workCatalogueItemStocksTpl);
+                        var row = workCatalogueItemStocksRowIdx - 1 ;
+                        $("#"+"workCatalogueItemStocks"+row+"_name").val(d.name);
+                        $("#"+"workCatalogueItemStocks"+row+"_number").val(d.number);
+                        $("#"+"workCatalogueItemStocks"+row+"_type").val(d.type);
+                        $("#"+"workCatalogueItemStocks"+row+"_types").val(d.types);
+                        $("#"+"workCatalogueItemStocks"+row+"_model").val(d.model);
+                        $("#"+"workCatalogueItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                        //var a = "${fns:getMainDictLabel(d.primaryUnit, 'full_count_unit', '')}"
+                        $("#"+"workCatalogueItemStocks"+row+"_primaryUnits").val(d.primaryUnits);  <%--${fns:getDictLabel(d.primaryUnit, 'full_count_unit', '')}--%>
+                    }
+                })
+            }
+        }
+
+        function setRow2(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstock/workStock/getRow',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    addRow2('#workItemStocks', workItemStocksRowIdx, workItemStocksTpl);workItemStocksRowIdx = workItemStocksRowIdx + 1;
+                    var row = workItemStocksRowIdx - 1 ;
+                    $("#"+"workItemStocks"+row+"_name").val(d.name);
+                    $("#"+"workItemStocks"+row+"_number").val(d.number);
+                    var a = "${fns:getMainDictLabel("1", 'full_count_unit', '')}"
+                    $("#"+"workItemStocks"+row+"_type").val(d.types);
+                    $("#"+"workItemStocks"+row+"_model").val(d.model);
+                    $("#"+"workItemStocks"+row+"_primaryUnit").val(d.primaryUnits);
+                    $("#"+"workItemStocks"+row+"_catalogueItemId").val(d.catalogueItemId);
+
+                }
+            })
+        }
+	</script>
+</head>
+
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStock" enctype="multipart/form-data"  action ="${ctx}/workstock/workStock/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+						<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">
+									<form:input path="createBy.name" 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">
+									<div class="input-group">
+										<form:input path="number" id="number" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+										<span class="input-group-btn">
+											<label class="form-status"><c:choose><c:when test="${ empty workStock.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workStock.status, 'audit_state','')}</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">
+									<input class="laydate-icondate layui-input form-control layer-date laydate-icon"
+										   id="createDate" name="createDate" readonly="true"
+										   value="<fmt:formatDate value="${workStock.createDate}" pattern="yyyy-MM-dd"/>">
+								</div>
+							</div>
+							<div class="layui-item layui-col-sm6">
+								<label class="layui-form-label">所属部门:</label>
+								<div class="layui-input-block">
+									<form:input path="officeName" htmlEscape="false" readonly="true"  class="form-control layui-input"/>
+								</div>
+							</div>
+							<div class="layui-item layui-col-sm12 with-textarea">
+								<label class="layui-form-label">申请事由:</label>
+								<div class="layui-input-block">
+									<form:textarea path="reason" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+								</div>
+							</div>
+						</div>
+
+						<div class="form-group layui-row">
+							<div class="form-group-label"><h2>物品申请明细</h2></div>
+							<div class="layui-item nav-btns">
+								<a class="nav-btn nav-btn-add" onclick="addRow('#workCatalogueItemStocks', workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增物品</a>
+
+								<sys:gridselectstock3 url="${ctx}/workscrap/workScrap/selectitems" id="zzz" name="" sign="1" value=""  title="选择物品" labelName=""
+													  labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name"
+													  isSingle="false" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock3>
+							</div>
+							<div class="layui-item layui-col-xs12 form-table-container">
+								<table id="contentTable1" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th><span class="require-item">*</span>物品名称</th>
+										<th>物品编号</th>
+										<th width="130px">物品分类</th>
+										<th>规格型号</th>
+										<th width="100px">计量单位</th>
+										<th><span class="require-item">*</span>数量</th>
+										<th>描述</th>
+										<th width="150px">操作</th>
+									</tr>
+									</thead>
+									<tbody id="workCatalogueItemStocks">
+									<c:if test="${not empty workStock.workCatalogueItemStocks}">
+										<c:forEach items="${workStock.workCatalogueItemStocks}" var="workCatalogueItemStocks" varStatus="index">
+											<tr id="workCatalogueItemStocks${index.index}">
+												<td class="hide">
+													<input id="workCatalogueItemStocks${index.index}_id" name="workCatalogueItemStocks[${index.index}].id" type="hidden" value="${workCatalogueItemStocks.id}"/>
+													<input id="workCatalogueItemStocks${index.index}_delFlag" name="workCatalogueItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_name" name="workCatalogueItemStocks[${index.index}].name" type="text" value="${workCatalogueItemStocks.name}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_number" name="workCatalogueItemStocks[${index.index}].number" type="text" value="${workCatalogueItemStocks.number}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<%--<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="text" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>--%>
+														<%--<form:select id="workCatalogueItemStocks${index.index}_type" path="workCatalogueItemStocks[${index.index}].type" readonly="true" class="form-control">
+															<form:option value="" label="请选择"/>
+															<form:options items="${fns:getDictList('item_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>--%>
+
+														<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.type, 'item_type', '')}" readonly="true" class="form-control "/>
+														<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="hidden" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_model" name="workCatalogueItemStocks[${index.index}].model" type="text" readonly="true" value="${workCatalogueItemStocks.model}"  class="form-control "/>
+												</td>
+												<td>
+													<%--<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" type="text" value="${workCatalogueItemStocks.primaryUnit}" readonly="true"   class="form-control "/>--%>
+														<%--<form:select id="workCatalogueItemStocks${index.index}_primaryUnit" path="workCatalogueItemStocks[${index.index}].primaryUnit" readonly="true" class="form-control">
+															<form:option value="" label="请选择"/>
+															<form:options items="${fns:getDictList('full_count_unit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>--%>
+														<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control "/>
+														<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" value="${workCatalogueItemStocks.primaryUnit}" type="hidden"  readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_count" name="workCatalogueItemStocks[${index.index}].count" type="text" value="${workCatalogueItemStocks.count}"  class="form-control number required"/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_detail" name="workCatalogueItemStocks[${index.index}].detail" type="text" value="${workCatalogueItemStocks.detail}"  class="form-control "/>
+												</td>
+												<td class="text-center op-td">
+													<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+												</td>
+											</tr>
+										</c:forEach>
+									</c:if>
+									</tbody>
+								</table>
+								<script type="text/template" id="workCatalogueItemStocksTpl">//<!--
+												<tr id="workCatalogueItemStocks{{idx}}">
+													<td class="hide">
+														<input id="workCatalogueItemStocks{{idx}}_id" name="workCatalogueItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+														<input id="workCatalogueItemStocks{{idx}}_delFlag" name="workCatalogueItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+													</td>
+													<td>
+														<div class="one" style="display:none;disabled:true;">
+															<input id="workCatalogueItemStocks{{idx}}_name" name="workCatalogueItemStocks[{{idx}}].name" type="text" value="{{row.name}}"  readonly="true" class="form-control required"/>
+														</div>
+														<div class="two">
+															<input id="workCatalogueItemStocks{{idx}}_name" name="workCatalogueItemStocks[{{idx}}].name" type="text" value="{{row.name}}"  class="form-control required"/>
+														</div>
+													 </td>
+													 <td>
+														<div class="three" style="display:none;disabled:true;">
+														<input id="workCatalogueItemStocks{{idx}}_number" name="workCatalogueItemStocks[{{idx}}].number" type="text" value="{{row.number}}" readonly="true" class="form-control"/>
+														</div>
+														<div class="four">
+															<input id="workCatalogueItemStocks{{idx}}_number" name="workCatalogueItemStocks[{{idx}}].number" type="text" value="{{row.number}}" class="form-control"/>
+														</div>
+													 </td>
+ 													<td>
+ 														<div class="not" style="display:none;disabled:true;">
+															<input id="workCatalogueItemStocks{{idx}}_types" type="text" value="{{row.type}}" readonly="true" class="form-control "/>
+															<input id="workCatalogueItemStocks{{idx}}_type" name="workCatalogueItemStocks[{{idx}}].type" type="hidden" value="{{row.type}}" readonly="true" class="form-control "/>
+														</div>
+														<div class="yes">
+															<form:select id="workCatalogueItemStocks${index.index}_type" path="workCatalogueItemStocks[0].type" class="form-control">
+																<form:option value="" label="请选择"/>
+																<form:options items="${fns:getMainDictList('item_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+															</form:select>
+														</div>
+													 </td>
+													 <td>
+														<div class="five" style="display:none;disabled:true;">
+														<input id="workCatalogueItemStocks{{idx}}_model" name="workCatalogueItemStocks[{{idx}}].model" type="text" value="{{row.model}}" readonly="true"class="form-control"/>
+														</div>
+														<div class="six">
+															<input id="workCatalogueItemStocks{{idx}}_model" name="workCatalogueItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  class="form-control"/>
+														</div>
+													 </td>
+													 <td>
+														<div class="stop" style="display:none;disabled:true;">
+															<input id="workCatalogueItemStocks{{idx}}_primaryUnits" type="text" value="{{row.primaryUnit}}" readonly="true" class="form-control "/>
+															<input id="workCatalogueItemStocks{{idx}}_primaryUnit" name="workCatalogueItemStocks[{{idx}}].primaryUnit" type="hidden" value="{{row.type}}" readonly="true" class="form-control "/>
+														</div>
+														<div class="should">
+														<form:select id="workCatalogueItemStocks${index.index}_primaryUnit" path="workCatalogueItemStocks[0].primaryUnit" class="form-control">
+															<form:option value="" label="请选择"/>
+															<form:options items="${fns:getMainDictList('full_count_unit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+														</div>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_count" name="workCatalogueItemStocks[{{idx}}].count" type="text" value="{{row.count}}" class="form-control number required"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_detail" name="workCatalogueItemStocks[{{idx}}].detail" type="text" value="{{row.detail}}" class="form-control"/>
+													 </td>
+
+													<td class="text-center op-td" id="workCatalogueItemStocks{{idx}}_td">
+														{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+													</td>
+												</tr>//-->
+								</script>
+							</div>
+						</div>
+
+						<div class="form-group layui-row lw16">
+							<div class="form-group-label"><h2>物品验收明细</h2></div>
+							<div class="layui-item nav-btns">
+								<%--<sys:gridselectstock2 url="${ctx}/workscrap/workScrap/selectitems" id="xxx" name="" sign="2" value=""  title="选择物品" labelName=""
+													  labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock2>--%>
+							</div>
+
+							<div class="layui-item layui-col-xs12 form-table-container">
+								<table id="contentTable2" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th><span class="require-item">*</span>物品编号</th>
+										<th>物品名称</th>
+										<th>物品分类</th>
+										<th>规格型号</th>
+										<th>计量单位</th>
+										<th><span class="require-item">*</span>数量</th>
+										<th>单价</th>
+										<th>合计</th>
+										<th>采购合同</th>
+										<th>供应商</th>
+										<th width="100px"><span class="require-item">*</span>是否固定资产</th>
+										<th width="150px">操作</th>
+									</tr>
+									</thead>
+									<tbody id="workItemStocks">
+									<%--<c:if test="${not empty workStock.workItemStocks}">
+										<c:forEach items="${workStock.workItemStocks}" var="workItemStocks" varStatus="index">
+											<tr id="workItemStocks${index.index}">
+												<td class="hide">
+													<input id="workItemStocks${index.index}_id" name="workItemStocks[${index.index}].id" type="hidden" value="${workItemStocks.id}"/>
+													<input id="workItemStocks${index.index}_delFlag" name="workItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_number" name="workItemStocks[${index.index}].number" type="text" value="${workItemStocks.number}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_name" name="workItemStocks[${index.index}].name" type="text" value="${workItemStocks.name}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_type" name="workItemStocks[${index.index}].type" type="text" value="${workItemStocks.type}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_model" name="workItemStocks[${index.index}].model" type="text" value="${workItemStocks.model}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_primaryUnit" name="workItemStocks[${index.index}].primaryUnit" type="text" value="${workItemStocks.primaryUnit}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_count" name="workItemStocks[${index.index}].count" type="text" value="${workItemStocks.count}" class="form-control required"/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_price" name="workItemStocks[${index.index}].price" type="text" value="${workItemStocks.price}" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_totalPrice" name="workItemStocks[${index.index}].totalPrice" type="text" value="${workItemStocks.totalPrice}" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_contractName" name="workItemStocks[${index.index}].contractName" type="text" value="${workItemStocks.contractName}" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_supplierName" name="workItemStocks[${index.index}].supplierName" type="text" value="${workItemStocks.supplierName}" class="form-control "/>
+												</td>
+												<td>
+													&lt;%&ndash;<input id="workItemStocks${index.index}_isAssets" name="workItemStocks[${index.index}].isAssets" type="text" value="${workItemStocks.isAssets}" class="form-control required"/>&ndash;%&gt;
+														<form:select id="workItemStocks${index.index}_isAssets" path="workItemStocks[${index.index}].isAssets" class="form-control required">
+															<form:option value="" label="请选择"/>
+															<form:options items="${fns:getDictList('is_assets')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+												</td>
+												<td class="text-center op-td">
+													<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+												</td>
+											</tr>
+										</c:forEach>
+									</c:if>--%>
+									</tbody>
+								</table>
+								<script type="text/template" id="workItemStocksTpl">//<!--
+                                    <tr id="workItemStocks{{idx}}">
+                                        <td class="hide">
+                                            <input id="workItemStocks{{idx}}_id" name="workItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                            <input id="workItemStocks{{idx}}_delFlag" name="workItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+                                        </td>
+                                    	<td>
+                                        	<input id="workItemStocks{{idx}}_number" name="workItemStocks[{{idx}}].number" type="text" value="{{row.number}}"  readonly="true"  class="form-control required"/>
+                                   		 </td>
+										<td>
+                                        	<input id="workItemStocks{{idx}}_name" name="workItemStocks[{{idx}}].name" type="text" value="{{row.name}}"  readonly="true"  class="form-control"/>
+                                        	<input id="workItemStocks{{idx}}_catalogueItemId" name="workItemStocks[{{idx}}].catalogueItemId" value="{{row.catalogueItemId}}" type="hidden"  class="form-control"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_type" name="workItemStocks[{{idx}}].type" type="text" value="{{row.type}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_model" name="workItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_primaryUnit" name="workItemStocks[{{idx}}].primaryUnit" type="text" value="{{row.primaryUnit}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_count" name="workItemStocks[{{idx}}].count" type="text" value="{{row.count}}"   class="form-control required"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_price" name="workItemStocks[{{idx}}].price" type="text" value="{{row.price}}"   class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_totalPrice" name="workItemStocks[{{idx}}].totalPrice" type="text" value="{{row.totalPrice}}"    class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_contractName" name="workItemStocks[{{idx}}].contractName" type="text" value="{{row.contractName}}"   class="form-control "/>
+                                   		 </td>
+                                   		  <td>
+                                        	<input id="workItemStocks{{idx}}_supplierName" name="workItemStocks[{{idx}}].supplierName" type="text" value="{{row.supplierName}}" class="form-control "/>
+                                   		 </td>
+                                   		  <td>
+                                        	<%--<input id="workItemStocks{{idx}}_isAssets" name="workItemStocks[{{idx}}].isAssets" type="text" value="{{row.isAssets}}" class="form-control required"/>--%>
+                                        	<form:select id="workItemStocks${index.index}_isAssets" path="workItemStocks[0].isAssets" class="form-control required">
+															<form:option value="" label="请选择"/>
+															<form:options items="${fns:getDictList('is_assets')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+                                   		 </td>
+
+                                        <td class="text-center op-td" id="workItemStocks{{idx}}_td">
+                                            {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                                        </td>
+                                    </tr>//-->
+								</script>
+								<script type="text/javascript">
+                                    var workCatalogueItemStocksRowIdx = 0, workCatalogueItemStocksTpl = $("#workCatalogueItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                                    var workItemStocksRowIdx = 0, workItemStocksTpl = $("#workItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                                    if($("#id").val()){
+                                        workCatalogueItemStocksRowIdx = ${fn:length(workStock.workCatalogueItemStocks)};
+                                        workItemStocksRowIdx = ${fn:length(workStock.workItemStocks)};
+                                    }
+								</script>
+
+							</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="" path="" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+									<%--<input id="acceptDate" name="acceptDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+										   value="<fmt:formatDate value="${workStock.acceptDate}" pattern="yyyy-MM-dd"/>"/>--%>
+								</div>
+							</div>
+							<div class="layui-item layui-col-sm6">
+								<label class="layui-form-label">验收人:</label>
+								<div class="layui-input-block">
+									<form:input id="" path="" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+								</div>
+							</div>
+
+						</div>
+						<div class="form-group layui-row first lw16">
+							<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="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+								</div>
+							</div>
+						</div>
+
+						<div class="form-group layui-row">
+							<div class="form-group-label"><h2>附件信息</h2></div>
+							<div class="layui-item nav-btns">
+								<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="listAttachment" class="table table-bordered table-condensed details">
+									<thead>
+									<tr>
+											<%-- <th>序号</th>--%>
+										<th>文件预览</th>
+										<th>上传人</th>
+										<th>上传时间</th>
+										<th width="180px">操作</th>
+									</tr>
+									</thead>
+									<tbody id="file_attachment">
+									<c:forEach items="${workStock.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_attachment','_attachment')" 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>
+					</div>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 304 - 0
src/main/webapp/webpage/modules/workstock/workStockList.jsp

@@ -0,0 +1,304 @@
+<%@ 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
+            });
+		});
+        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="workStock" action="${ctx}/workstock/workStock/" 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 path="createBy.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">
+								<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 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="${workStock.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="${workStock.endContractDate}" pattern="yyyy-MM-dd"/>"/>
+								</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="workstock:workStock:add">
+						<button class="nav-btn nav-btn-add" title="采购申请" onclick="openDialogre('采购申请','${ctx}/workstock/workStock/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:'number',align:'center',title: '采购编号',width:160,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看采购申请', '${ctx}/workstock/workStock/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.number + ">" + d.number + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'reason',align:'center', title: '申请事由',minWidth:210,templet:function(d){
+                    return "<span title='"+ d.reason +"'>" + d.reason + "</span>";
+                }}
+                ,{field:'createBy',align:'center', title: '申请人',width:120,templet:function(d){
+                    return "<span title='"+ d.createBy +"'>" + d.createBy + "</span>";
+                }}
+                ,{field:'createDate',align:'center', title: '申请日期', width:120}
+                ,{field:'officeName',align:'center', title: '所属部门',width:130,templet:function(d){
+                    return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+                }}
+                ,{field:'status',align:'center', title: '采购状态', width:70,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}/workstock/workStock/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:130,templet:function(d){
+                    ////对操作进行初始化
+                    var xml = "";
+                    if(d.cancancel != undefined && d.cancancel == "1")
+                        xml += "<a href=\"${ctx}/workstock/workStock/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}/workstock/workStock/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}/workstock/workStock/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}/workstock/workStock/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}/workstock/workStock/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="workStock" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workStock.id}"
+                    ,"number":"${workStock.number}"
+                    ,"reason":"${workStock.reason}"
+                    ,"createBy":"${workStock.createBy.name}"
+                    ,"createDate":"<fmt:formatDate value="${workStock.createDate}" pattern="yyyy-MM-dd"/>"
+                    ,"officeName":"${workStock.officeName}"
+                    ,"status":"${workStock.status}"
+                    <c:if test="${fns:getUser().id == workStock.createBy.id}">
+                    <c:if test="${workStock.status == '2' }">,"cancancel":"1"</c:if>
+                    <shiro:hasPermission name="workstock:workStock:edit"><c:choose>
+                    <c:when test="${workStock.status == '1' }">,"canedit1":"1"</c:when>
+                    <c:when test="${workStock.status == '4'}">,"canedit2":"1"</c:when>
+                    <c:when test="${workStock.status == '3'}">,"canedit3":"1"</c:when>
+                    </c:choose></shiro:hasPermission>
+                    <shiro:hasPermission name="workstock:workStock:del"><c:choose>
+                    <c:when test="${(workStock.status == '1' or workStock.status == '3' or workStock.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>

+ 668 - 0
src/main/webapp/webpage/modules/workstock/workStockModify.jsp

@@ -0,0 +1,668 @@
+<%@ 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()){
+                if($("#workCatalogueItemStocks tr").length==0){
+                    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: '#createDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#acceptDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+        });
+        function insertTitle(tValue){
+            var list = "${workStock.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 = "106";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStock/"+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, tpl, row){
+            var idx1 = $("#workCatalogueItemStocks tr").length;
+            if(list == '#workCatalogueItemStocks' && idx1 < 100){
+                tpl = tpl.replace("workCatalogueItemStocks[0].type","workCatalogueItemStocks["+idx1+"].type");
+                tpl = tpl.replace("workCatalogueItemStocks[0].primaryUnit","workCatalogueItemStocks["+idx1+"].primaryUnit");
+
+                tpl = tpl.replace("not","not\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("yes\" style=\"display:none;disabled:true;\"","yes");
+
+                tpl = tpl.replace("stop","stop\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("should\" style=\"display:none;disabled:true;\"","should");
+
+                tpl = tpl.replace("one","one\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("two\" style=\"display:none;disabled:true;\"","two");
+
+                tpl = tpl.replace("three","three\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("four\" style=\"display:none;disabled:true;\"","four");
+
+                tpl = tpl.replace("five","five\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("six\" style=\"display:none;disabled:true;\"","six");
+
+                bornTemplete(list, idx, tpl, row, idx1);
+            }
+        }
+        function addRows(list, idx, tpl, row){
+            var idx1 = $("#workCatalogueItemStocks tr").length;
+            if(list == '#workCatalogueItemStocks' && idx1 < 100){
+                console.log("idx1--------"+idx1);
+                tpl = tpl.replace("workCatalogueItemStocks[0].type","workCatalogueItemStocks["+idx1+"].type");
+                tpl = tpl.replace("workCatalogueItemStocks[0].primaryUnit","workCatalogueItemStocks["+idx1+"].primaryUnit");
+
+                tpl = tpl.replace("yes","yes\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("not\" style=\"display:none;disabled:true;\"","not\"");
+
+                tpl = tpl.replace("should","should\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("stop\" style=\"display:none;disabled:true;\"","stop\"");
+
+                tpl = tpl.replace("two","two\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("one\" style=\"display:none;disabled:true;\"","one\"");
+
+                tpl = tpl.replace("four","four\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("three\" style=\"display:none;disabled:true;\"","three\"");
+
+                tpl = tpl.replace("six","six\" style=\"display:none;disabled:true;");
+                tpl = tpl.replace("five\" style=\"display:none;disabled:true;\"","five\"");
+
+                bornTemplete(list, idx, tpl, row, idx1);
+            }
+        }
+        function addRow2(list, idx, tpl, row){
+            var idx2 = $("#workItemStocks tr").length;
+            if(list == '#workItemStocks' && idx2 < 100){
+                tpl = tpl.replace("workItemStocks[0].isAssets","workItemStocks["+idx2+"].isAssets");
+                bornTemplete(list, idx, tpl, row, idx2);
+            }
+        }
+        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 delRow(obj, prefix) {
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+            /* var idx1 = $("#workCatalogueItemStocks tr").length; //tr 总数
+             for (var i = 0; i < idx1; i++) {
+                 $("#workCatalogueItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+             }
+
+             var idx2 = $("#workItemStocks tr").length; //tr 总数
+             for(var i = 0;i < idx2;i++){
+                 $("#workItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+             }*/
+        }
+        function setPNumber(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoice/workInvoice/getPNumberr',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#pNumber").val(d.pNumber);
+                }
+            })
+        }
+
+        function setRow(_obj){
+            console.log(_obj);
+            for (var i=0; i<_obj.length; i++) {
+                console.log("------_obj-------" + _obj[i]);
+                console.log("-----id----" + _obj[i].id);
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/workstock/workStock/getRow',
+                    data:{
+                        "obj":_obj[i].id
+                    },
+                    success:function(data){
+                        var d = JSON.parse(data);
+                        addRows('#workCatalogueItemStocks',workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;
+                        //console.log("---------"+data.companyType+"---------"+data.companyIndustry+"---------"+data.areaName);
+                        //console.log("---------"+workCatalogueItemStocksRowIdx+"---------"+workCatalogueItemStocksTpl);
+                        var row = workCatalogueItemStocksRowIdx - 1 ;
+                        $("#"+"workCatalogueItemStocks"+row+"_name").val(d.name);
+                        $("#"+"workCatalogueItemStocks"+row+"_number").val(d.number);
+                        $("#"+"workCatalogueItemStocks"+row+"_type").val(d.type);
+                        $("#"+"workCatalogueItemStocks"+row+"_types").val(d.types);
+                        $("#"+"workCatalogueItemStocks"+row+"_model").val(d.model);
+                        $("#"+"workCatalogueItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                        //var a = "${fns:getMainDictLabel(d.primaryUnit, 'full_count_unit', '')}"
+                        $("#"+"workCatalogueItemStocks"+row+"_primaryUnits").val(d.primaryUnits);  <%--${fns:getDictLabel(d.primaryUnit, 'full_count_unit', '')}--%>
+                    }
+                })
+            }
+        }
+
+        function setRow2(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstock/workStock/getRow',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    addRow2('#workItemStocks', workItemStocksRowIdx, workItemStocksTpl);workItemStocksRowIdx = workItemStocksRowIdx + 1;
+                    var row = workItemStocksRowIdx - 1 ;
+                    $("#"+"workItemStocks"+row+"_name").val(d.name);
+                    $("#"+"workItemStocks"+row+"_number").val(d.number);
+                    var a = "${fns:getMainDictLabel("1", 'full_count_unit', '')}"
+                    $("#"+"workItemStocks"+row+"_type").val(d.types);
+                    $("#"+"workItemStocks"+row+"_model").val(d.model);
+                    $("#"+"workItemStocks"+row+"_primaryUnit").val(d.primaryUnits);
+                    $("#"+"workItemStocks"+row+"_catalogueItemId").val(d.catalogueItemId);
+
+                }
+            })
+        }
+	</script>
+</head>
+
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStock" enctype="multipart/form-data"  action ="${ctx}/workstock/workStock/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 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">
+					<form:input path="createBy.name" 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">
+					<div class="input-group">
+						<form:input path="number" id="number" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+						<span class="input-group-btn">
+											<label class="form-status"><c:choose><c:when test="${ empty workStock.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workStock.status, 'audit_state','')}</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">
+					<input class="laydate-icondate layui-input form-control layer-date laydate-icon"
+						   id="createDate" name="createDate" readonly="true"
+						   value="<fmt:formatDate value="${workStock.createDate}" pattern="yyyy-MM-dd"/>">
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">所属部门:</label>
+				<div class="layui-input-block">
+					<form:input path="officeName" htmlEscape="false" readonly="true"  class="form-control layui-input"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm12 with-textarea">
+				<label class="layui-form-label">申请事由:</label>
+				<div class="layui-input-block">
+					<form:textarea path="reason" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+				</div>
+			</div>
+		</div>
+
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>物品申请明细</h2></div>
+			<div class="layui-item nav-btns">
+				<a class="nav-btn nav-btn-add" onclick="addRow('#workCatalogueItemStocks', workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增物品</a>
+
+				<sys:gridselectstock3 url="${ctx}/workscrap/workScrap/selectitems" id="zzz" name="" sign="1" value=""  title="选择物品" labelName=""
+									  labelValue="" isSingle="false" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock3>
+			</div>
+			<div class="layui-item layui-col-xs12 form-table-container">
+				<table id="contentTable1" class="table table-bordered table-condensed can-edit">
+					<thead>
+					<tr>
+						<th><span class="require-item">*</span>物品名称</th>
+						<th>物品编号</th>
+						<th width="130px">物品分类</th>
+						<th>规格型号</th>
+						<th width="100px">计量单位</th>
+						<th><span class="require-item">*</span>数量</th>
+						<th>描述</th>
+						<th width="150px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="workCatalogueItemStocks">
+					<c:if test="${not empty workStock.workCatalogueItemStocks}">
+						<c:forEach items="${workStock.workCatalogueItemStocks}" var="workCatalogueItemStocks" varStatus="index">
+							<tr id="workCatalogueItemStocks${index.index}">
+								<td class="hide">
+									<input id="workCatalogueItemStocks${index.index}_id" name="workCatalogueItemStocks[${index.index}].id" type="hidden" value="${workCatalogueItemStocks.id}"/>
+									<input id="workCatalogueItemStocks${index.index}_delFlag" name="workCatalogueItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+								</td>
+								<td>
+									<input id="workCatalogueItemStocks${index.index}_name" name="workCatalogueItemStocks[${index.index}].name" type="text" value="${workCatalogueItemStocks.name}" readonly="true" class="form-control "/>
+								</td>
+								<td>
+									<input id="workCatalogueItemStocks${index.index}_number" name="workCatalogueItemStocks[${index.index}].number" type="text" value="${workCatalogueItemStocks.number}" readonly="true" class="form-control "/>
+								</td>
+								<td>
+										<%--<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="text" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>--%>
+										<%--<form:select id="workCatalogueItemStocks${index.index}_type" path="workCatalogueItemStocks[${index.index}].type" readonly="true" class="form-control">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${fns:getDictList('item_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                        </form:select>--%>
+
+									<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.type, 'item_type', '')}" readonly="true" class="form-control "/>
+									<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="hidden" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>
+								</td>
+								<td>
+									<input id="workCatalogueItemStocks${index.index}_model" name="workCatalogueItemStocks[${index.index}].model" type="text" readonly="true" value="${workCatalogueItemStocks.model}"  class="form-control "/>
+								</td>
+								<td>
+										<%--<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" type="text" value="${workCatalogueItemStocks.primaryUnit}" readonly="true"   class="form-control "/>--%>
+										<%--<form:select id="workCatalogueItemStocks${index.index}_primaryUnit" path="workCatalogueItemStocks[${index.index}].primaryUnit" readonly="true" class="form-control">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${fns:getDictList('full_count_unit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                        </form:select>--%>
+									<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control "/>
+									<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" value="${workCatalogueItemStocks.primaryUnit}" type="hidden"  readonly="true" class="form-control "/>
+								</td>
+								<td>
+									<input id="workCatalogueItemStocks${index.index}_count" name="workCatalogueItemStocks[${index.index}].count" type="text" value="${workCatalogueItemStocks.count}"  class="form-control number required"/>
+								</td>
+								<td>
+									<input id="workCatalogueItemStocks${index.index}_detail" name="workCatalogueItemStocks[${index.index}].detail" type="text" value="${workCatalogueItemStocks.detail}"  class="form-control "/>
+								</td>
+								<td class="text-center op-td">
+									<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+								</td>
+							</tr>
+						</c:forEach>
+					</c:if>
+					</tbody>
+				</table>
+				<script type="text/template" id="workCatalogueItemStocksTpl">//<!--
+												<tr id="workCatalogueItemStocks{{idx}}">
+													<td class="hide">
+														<input id="workCatalogueItemStocks{{idx}}_id" name="workCatalogueItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+														<input id="workCatalogueItemStocks{{idx}}_delFlag" name="workCatalogueItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+													</td>
+													<td>
+														<div class="one" style="display:none;disabled:true;">
+															<input id="workCatalogueItemStocks{{idx}}_name" name="workCatalogueItemStocks[{{idx}}].name" type="text" value="{{row.name}}"  readonly="true" class="form-control required"/>
+														</div>
+														<div class="two">
+															<input id="workCatalogueItemStocks{{idx}}_name" name="workCatalogueItemStocks[{{idx}}].name" type="text" value="{{row.name}}"  class="form-control required"/>
+														</div>
+													 </td>
+													 <td>
+														<div class="three" style="display:none;disabled:true;">
+														<input id="workCatalogueItemStocks{{idx}}_number" name="workCatalogueItemStocks[{{idx}}].number" type="text" value="{{row.number}}" readonly="true" class="form-control"/>
+														</div>
+														<div class="four">
+															<input id="workCatalogueItemStocks{{idx}}_number" name="workCatalogueItemStocks[{{idx}}].number" type="text" value="{{row.number}}" class="form-control"/>
+														</div>
+													 </td>
+ 													<td>
+ 														<div class="not" style="display:none;disabled:true;">
+															<input id="workCatalogueItemStocks{{idx}}_types" type="text" value="{{row.type}}" readonly="true" class="form-control "/>
+															<input id="workCatalogueItemStocks{{idx}}_type" name="workCatalogueItemStocks[{{idx}}].type" type="hidden" value="{{row.type}}" readonly="true" class="form-control "/>
+														</div>
+														<div class="yes">
+															<form:select id="workCatalogueItemStocks${index.index}_type" path="workCatalogueItemStocks[0].type" class="form-control">
+																<form:option value="" label="请选择"/>
+																<form:options items="${fns:getMainDictList('item_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+															</form:select>
+														</div>
+													 </td>
+													 <td>
+														<div class="five" style="display:none;disabled:true;">
+														<input id="workCatalogueItemStocks{{idx}}_model" name="workCatalogueItemStocks[{{idx}}].model" type="text" value="{{row.model}}" readonly="true"class="form-control"/>
+														</div>
+														<div class="six">
+															<input id="workCatalogueItemStocks{{idx}}_model" name="workCatalogueItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  class="form-control"/>
+														</div>
+													 </td>
+													 <td>
+														<div class="stop" style="display:none;disabled:true;">
+															<input id="workCatalogueItemStocks{{idx}}_primaryUnits" type="text" value="{{row.primaryUnit}}" readonly="true" class="form-control "/>
+															<input id="workCatalogueItemStocks{{idx}}_primaryUnit" name="workCatalogueItemStocks[{{idx}}].primaryUnit" type="hidden" value="{{row.type}}" readonly="true" class="form-control "/>
+														</div>
+														<div class="should">
+														<form:select id="workCatalogueItemStocks${index.index}_primaryUnit" path="workCatalogueItemStocks[0].primaryUnit" class="form-control">
+															<form:option value="" label="请选择"/>
+															<form:options items="${fns:getMainDictList('full_count_unit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+														</div>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_count" name="workCatalogueItemStocks[{{idx}}].count" type="text" value="{{row.count}}" class="form-control number required"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_detail" name="workCatalogueItemStocks[{{idx}}].detail" type="text" value="{{row.detail}}" class="form-control"/>
+													 </td>
+
+													<td class="text-center op-td" id="workCatalogueItemStocks{{idx}}_td">
+														{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+													</td>
+												</tr>//-->
+				</script>
+			</div>
+		</div>
+
+		<div class="form-group layui-row lw16">
+			<div class="form-group-label"><h2>物品验收明细</h2></div>
+			<div class="layui-item nav-btns">
+					<%--<sys:gridselectstock2 url="${ctx}/workscrap/workScrap/selectitems" id="xxx" name="" sign="2" value=""  title="选择物品" labelName=""
+                                          labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock2>--%>
+			</div>
+
+			<div class="layui-item layui-col-xs12 form-table-container">
+				<table id="contentTable2" class="table table-bordered table-condensed can-edit">
+					<thead>
+					<tr>
+						<th><span class="require-item">*</span>物品编号</th>
+						<th>物品名称</th>
+						<th>物品分类</th>
+						<th>规格型号</th>
+						<th>计量单位</th>
+						<th><span class="require-item">*</span>数量</th>
+						<th>单价</th>
+						<th>合计</th>
+						<th>采购合同</th>
+						<th>供应商</th>
+						<th width="100px"><span class="require-item">*</span>是否固定资产</th>
+						<th width="150px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="workItemStocks">
+					<%--<c:if test="${not empty workStock.workItemStocks}">
+						<c:forEach items="${workStock.workItemStocks}" var="workItemStocks" varStatus="index">
+							<tr id="workItemStocks${index.index}">
+								<td class="hide">
+									<input id="workItemStocks${index.index}_id" name="workItemStocks[${index.index}].id" type="hidden" value="${workItemStocks.id}"/>
+									<input id="workItemStocks${index.index}_delFlag" name="workItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+								</td>
+								<td>
+									<input id="workItemStocks${index.index}_number" name="workItemStocks[${index.index}].number" type="text" value="${workItemStocks.number}" readonly="true" class="form-control "/>
+								</td>
+								<td>
+									<input id="workItemStocks${index.index}_name" name="workItemStocks[${index.index}].name" type="text" value="${workItemStocks.name}" readonly="true" class="form-control "/>
+								</td>
+								<td>
+									<input id="workItemStocks${index.index}_type" name="workItemStocks[${index.index}].type" type="text" value="${workItemStocks.type}" readonly="true" class="form-control "/>
+								</td>
+								<td>
+									<input id="workItemStocks${index.index}_model" name="workItemStocks[${index.index}].model" type="text" value="${workItemStocks.model}" readonly="true" class="form-control "/>
+								</td>
+								<td>
+									<input id="workItemStocks${index.index}_primaryUnit" name="workItemStocks[${index.index}].primaryUnit" type="text" value="${workItemStocks.primaryUnit}" readonly="true" class="form-control "/>
+								</td>
+								<td>
+									<input id="workItemStocks${index.index}_count" name="workItemStocks[${index.index}].count" type="text" value="${workItemStocks.count}" class="form-control required"/>
+								</td>
+								<td>
+									<input id="workItemStocks${index.index}_price" name="workItemStocks[${index.index}].price" type="text" value="${workItemStocks.price}" class="form-control "/>
+								</td>
+								<td>
+									<input id="workItemStocks${index.index}_totalPrice" name="workItemStocks[${index.index}].totalPrice" type="text" value="${workItemStocks.totalPrice}" class="form-control "/>
+								</td>
+								<td>
+									<input id="workItemStocks${index.index}_contractName" name="workItemStocks[${index.index}].contractName" type="text" value="${workItemStocks.contractName}" class="form-control "/>
+								</td>
+								<td>
+									<input id="workItemStocks${index.index}_supplierName" name="workItemStocks[${index.index}].supplierName" type="text" value="${workItemStocks.supplierName}" class="form-control "/>
+								</td>
+								<td>
+										&lt;%&ndash;<input id="workItemStocks${index.index}_isAssets" name="workItemStocks[${index.index}].isAssets" type="text" value="${workItemStocks.isAssets}" class="form-control required"/>&ndash;%&gt;
+									<form:select id="workItemStocks${index.index}_isAssets" path="workItemStocks[${index.index}].isAssets" class="form-control required">
+										<form:option value="" label="请选择"/>
+										<form:options items="${fns:getDictList('is_assets')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+									</form:select>
+								</td>
+								<td class="text-center op-td">
+									<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+								</td>
+							</tr>
+						</c:forEach>
+					</c:if>--%>
+					</tbody>
+				</table>
+				<script type="text/template" id="workItemStocksTpl">//<!--
+                                    <tr id="workItemStocks{{idx}}">
+                                        <td class="hide">
+                                            <input id="workItemStocks{{idx}}_id" name="workItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                            <input id="workItemStocks{{idx}}_delFlag" name="workItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+                                        </td>
+                                    	<td>
+                                        	<input id="workItemStocks{{idx}}_number" name="workItemStocks[{{idx}}].number" type="text" value="{{row.number}}"  readonly="true"  class="form-control required"/>
+                                   		 </td>
+										<td>
+                                        	<input id="workItemStocks{{idx}}_name" name="workItemStocks[{{idx}}].name" type="text" value="{{row.name}}"  readonly="true"  class="form-control"/>
+                                        	<input id="workItemStocks{{idx}}_catalogueItemId" name="workItemStocks[{{idx}}].catalogueItemId" value="{{row.catalogueItemId}}" type="hidden"  class="form-control"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_type" name="workItemStocks[{{idx}}].type" type="text" value="{{row.type}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_model" name="workItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_primaryUnit" name="workItemStocks[{{idx}}].primaryUnit" type="text" value="{{row.primaryUnit}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_count" name="workItemStocks[{{idx}}].count" type="text" value="{{row.count}}"   class="form-control required"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_price" name="workItemStocks[{{idx}}].price" type="text" value="{{row.price}}"   class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_totalPrice" name="workItemStocks[{{idx}}].totalPrice" type="text" value="{{row.totalPrice}}"    class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_contractName" name="workItemStocks[{{idx}}].contractName" type="text" value="{{row.contractName}}"   class="form-control "/>
+                                   		 </td>
+                                   		  <td>
+                                        	<input id="workItemStocks{{idx}}_supplierName" name="workItemStocks[{{idx}}].supplierName" type="text" value="{{row.supplierName}}" class="form-control "/>
+                                   		 </td>
+                                   		  <td>
+                                        	<%--<input id="workItemStocks{{idx}}_isAssets" name="workItemStocks[{{idx}}].isAssets" type="text" value="{{row.isAssets}}" class="form-control required"/>--%>
+                                        	<form:select id="workItemStocks${index.index}_isAssets" path="workItemStocks[0].isAssets" class="form-control required">
+															<form:option value="" label="请选择"/>
+															<form:options items="${fns:getDictList('is_assets')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+														</form:select>
+                                   		 </td>
+
+                                        <td class="text-center op-td" id="workItemStocks{{idx}}_td">
+                                            {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                                        </td>
+                                    </tr>//-->
+				</script>
+				<script type="text/javascript">
+                    var workCatalogueItemStocksRowIdx = 0, workCatalogueItemStocksTpl = $("#workCatalogueItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var workItemStocksRowIdx = 0, workItemStocksTpl = $("#workItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    if($("#id").val()){
+                        workCatalogueItemStocksRowIdx = ${fn:length(workStock.workCatalogueItemStocks)};
+                        workItemStocksRowIdx = ${fn:length(workStock.workItemStocks)};
+                    }
+				</script>
+
+			</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="" path="" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+						<%--<input id="acceptDate" name="acceptDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+                               value="<fmt:formatDate value="${workStock.acceptDate}" pattern="yyyy-MM-dd"/>"/>--%>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">验收人:</label>
+				<div class="layui-input-block">
+					<form:input id="" path="" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+				</div>
+			</div>
+		</div>
+			<div class="form-group layui-row first lw16">
+				<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="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+					</div>
+				</div>
+			</div>
+
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>附件信息</h2></div>
+			<div class="layui-item nav-btns">
+				<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="listAttachment" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+							<%-- <th>序号</th>--%>
+						<th>文件预览</th>
+						<th>上传人</th>
+						<th>上传时间</th>
+						<th width="180px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="file_attachment">
+					<c:forEach items="${workStock.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_attachment','_attachment')" 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>
+	</div>
+</div>
+</div>
+</form:form>
+</div>
+</div>
+</body>
+</html>

+ 567 - 0
src/main/webapp/webpage/modules/workstock/workStockView.jsp

@@ -0,0 +1,567 @@
+<%@ 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}/workstock/workStock/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workstock/workStock/save");
+            }
+		  if(validateForm.form()){
+              if($("#workCatalogueItemStocks tr").length==0){
+                  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: '#createDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#acceptDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+		});
+        function insertTitle(tValue){
+            var list = "${workStock.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 = "106";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStock/"+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, tpl, row){
+            var idx1 = $("#workCatalogueItemStocks tr").length;
+            if(list == '#workCatalogueItemStocks' && idx1 < 100){
+                bornTemplete(list, idx, tpl, row, idx1);
+            }
+        }
+        function addRow2(list, idx, tpl, row){
+            var idx2 = $("#workItemStocks tr").length;
+            if(list == '#workItemStocks' && idx2 < 100){
+                bornTemplete(list, idx, tpl, row, idx2);
+            }
+        }
+        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 delRow(obj, prefix) {
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+           /* var idx1 = $("#workCatalogueItemStocks tr").length; //tr 总数
+            for (var i = 0; i < idx1; i++) {
+                $("#workCatalogueItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+            }
+
+            var idx2 = $("#workItemStocks tr").length; //tr 总数
+            for(var i = 0;i < idx2;i++){
+                $("#workItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+            }*/
+        }
+        function setPNumber(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoice/workInvoice/getPNumberr',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#pNumber").val(d.pNumber);
+                }
+            })
+        }
+
+        function setRow(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstock/workStock/getRow',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    addRow('#workCatalogueItemStocks',workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;
+                    //console.log("---------"+data.companyType+"---------"+data.companyIndustry+"---------"+data.areaName);
+                    //console.log("---------"+workCatalogueItemStocksRowIdx+"---------"+workCatalogueItemStocksTpl);
+                    var row = workCatalogueItemStocksRowIdx - 1 ;
+                    $("#"+"workCatalogueItemStocks"+row+"_name").val(d.name);
+                    $("#"+"workCatalogueItemStocks"+row+"_number").val(d.number);
+                    $("#"+"workCatalogueItemStocks"+row+"_type").val(d.type);
+                    $("#"+"workCatalogueItemStocks"+row+"_model").val(d.model);
+                    $("#"+"workCatalogueItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                }
+            })
+        }
+
+        function setRow2(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstock/workStock/getRow',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    addRow2('#workItemStocks', workItemStocksRowIdx, workItemStocksTpl);workItemStocksRowIdx = workItemStocksRowIdx + 1;
+                    var row = workItemStocksRowIdx - 1 ;
+                    $("#"+"workItemStocks"+row+"_name").val(d.name);
+                    $("#"+"workItemStocks"+row+"_number").val(d.number);
+                    $("#"+"workItemStocks"+row+"_type").val(d.type);
+                    $("#"+"workItemStocks"+row+"_model").val(d.model);
+                    $("#"+"workItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                    $("#"+"workItemStocks"+row+"_catalogueItemId").val(d.catalogueItemId);
+
+                }
+            })
+        }
+	</script>
+</head>
+
+<body>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStock" enctype="multipart/form-data"  action ="${ctx}/workstock/workStock/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+						<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">
+									<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStock.createBy.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">
+									<div class="input-group">
+										<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStock.number}"/>
+										<span class="input-group-btn">
+											<label class="form-status"><c:choose><c:when test="${ empty workStock.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workStock.status, 'audit_state','')}</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">
+									<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workStock.createDate}" 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 required layui-input" value="${workStock.officeName}"/>
+								</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 ">${workStock.reason}</textarea>
+								</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('#workCatalogueItemStocks', workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增物品</a>
+
+								<sys:gridselectstock2 url="${ctx}/workscrap/workScrap/selectitems" id="zzz" name="" sign="1" value=""  title="选择物品" labelName=""
+													  labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock2>--%>
+							</div>
+							<div class="layui-item layui-col-xs12 form-table-container">
+								<table id="contentTable1" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th><span class="require-item">*</span>物品名称</th>
+										<th>物品编号</th>
+										<th width="130px">物品分类</th>
+										<th>规格型号</th>
+										<th width="100px">计量单位</th>
+										<th><span class="require-item">*</span>数量</th>
+										<th>描述</th>
+										<%--<th width="150px">操作</th>--%>
+									</tr>
+									</thead>
+									<tbody id="workCatalogueItemStocks">
+									<c:if test="${not empty workStock.workCatalogueItemStocks}">
+										<c:forEach items="${workStock.workCatalogueItemStocks}" var="workCatalogueItemStocks" varStatus="index">
+											<tr id="workCatalogueItemStocks${index.index}">
+												<td class="hide">
+													<input id="workCatalogueItemStocks${index.index}_id" name="workCatalogueItemStocks[${index.index}].id" type="hidden" value="${workCatalogueItemStocks.id}"/>
+													<input id="workCatalogueItemStocks${index.index}_delFlag" name="workCatalogueItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_name" name="workCatalogueItemStocks[${index.index}].name" type="text" value="${workCatalogueItemStocks.name}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_number" name="workCatalogueItemStocks[${index.index}].number" type="text" value="${workCatalogueItemStocks.number}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+														<%--<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="text" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>--%>
+														<%--<form:select id="workCatalogueItemStocks${index.index}_type" path="workCatalogueItemStocks[${index.index}].type" readonly="true" class="form-control">
+                                                            <form:option value="" label="请选择"/>
+                                                            <form:options items="${fns:getDictList('item_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                                        </form:select>--%>
+
+													<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.type, 'item_type', '')}" readonly="true" class="form-control "/>
+													<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="hidden" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_model" name="workCatalogueItemStocks[${index.index}].model" type="text" readonly="true" value="${workCatalogueItemStocks.model}"  class="form-control "/>
+												</td>
+												<td>
+														<%--<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" type="text" value="${workCatalogueItemStocks.primaryUnit}" readonly="true"   class="form-control "/>--%>
+														<%--<form:select id="workCatalogueItemStocks${index.index}_primaryUnit" path="workCatalogueItemStocks[${index.index}].primaryUnit" readonly="true" class="form-control">
+                                                            <form:option value="" label="请选择"/>
+                                                            <form:options items="${fns:getDictList('full_count_unit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                                        </form:select>--%>
+													<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control "/>
+													<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" value="${workCatalogueItemStocks.primaryUnit}" type="hidden"  readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_count" name="workCatalogueItemStocks[${index.index}].count" type="text" readonly="true" value="${workCatalogueItemStocks.count}"  class="form-control number required"/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_detail" name="workCatalogueItemStocks[${index.index}].detail" type="text" value="${workCatalogueItemStocks.detail}"  readonly="true" class="form-control "/>
+												</td>
+												<%--<td class="text-center op-td">
+													<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+												</td>--%>
+											</tr>
+										</c:forEach>
+									</c:if>
+									</tbody>
+								</table>
+								<script type="text/template" id="workCatalogueItemStocksTpl">//<!--
+												<tr id="workCatalogueItemStocks{{idx}}">
+													<td class="hide">
+														<input id="workCatalogueItemStocks{{idx}}_id" name="workCatalogueItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+														<input id="workCatalogueItemStocks{{idx}}_delFlag" name="workCatalogueItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+													</td>
+													<td>
+														<input id="workCatalogueItemStocks{{idx}}_name" name="workCatalogueItemStocks[{{idx}}].name" type="text" value="{{row.name}}" class="form-control required"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_number" name="workCatalogueItemStocks[{{idx}}].number" type="text" value="{{row.number}}" class="form-control"/>
+													 </td>
+ 													<td>
+														<input id="workCatalogueItemStocks{{idx}}_type" name="workCatalogueItemStocks[{{idx}}].type" type="text" value="{{row.type}}"  class="form-control "/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_model" name="workCatalogueItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  class="form-control"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_primaryUnit" name="workCatalogueItemStocks[{{idx}}].primaryUnit" type="text" value="{{row.primaryUnit}}"  class="form-control "/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_count" name="workCatalogueItemStocks[{{idx}}].count" type="text" value="{{row.count}}" class="form-control required"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_detail" name="workCatalogueItemStocks[{{idx}}].detail" type="text" value="{{row.detail}}" class="form-control"/>
+													 </td>
+
+													<td class="text-center op-td" id="workCatalogueItemStocks{{idx}}_td">
+														{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+													</td>
+												</tr>//-->
+								</script>
+							</div>
+						</div>
+
+						<div class="form-group layui-row lw16">
+							<div class="form-group-label"><h2>物品验收明细</h2></div>
+							<div class="layui-item nav-btns">
+								<%--<sys:gridselectstock2 url="${ctx}/workscrap/workScrap/selectitems" id="xxx" name="" sign="2" value=""  title="选择物品" labelName=""
+													  labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock2>--%>
+							</div>
+
+							<div class="layui-item layui-col-xs12 form-table-container">
+								<table id="contentTable2" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th><span class="require-item">*</span>物品编号</th>
+										<th>物品名称</th>
+										<th>物品分类</th>
+										<th>规格型号</th>
+										<th>计量单位</th>
+										<th><span class="require-item">*</span>数量</th>
+										<th>单价</th>
+										<th>合计</th>
+										<th>采购合同</th>
+										<th>供应商</th>
+										<th><span class="require-item">*</span>是否固定资产</th>
+										<%--<th width="150px">操作</th>--%>
+									</tr>
+									</thead>
+									<tbody id="workItemStocks">
+									<c:if test="${not empty workStock.workItemStocks}">
+										<c:forEach items="${workStock.workItemStocks}" var="workItemStocks" varStatus="index">
+											<tr id="workItemStocks${index.index}">
+												<td class="hide">
+													<input id="workItemStocks${index.index}_id" name="workItemStocks[${index.index}].id" type="hidden" value="${workItemStocks.id}"/>
+													<input id="workItemStocks${index.index}_delFlag" name="workItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_number" name="workItemStocks[${index.index}].number" type="text" value="${workItemStocks.number}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_name" name="workItemStocks[${index.index}].name" type="text" value="${workItemStocks.name}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_type" name="workItemStocks[${index.index}].type" type="text" value="${workItemStocks.type}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_model" name="workItemStocks[${index.index}].model" type="text" value="${workItemStocks.model}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<%--<input id="workItemStocks${index.index}_primaryUnit" name="workItemStocks[${index.index}].primaryUnit" type="text" value="${workItemStocks.primaryUnit}" readonly="true" class="form-control "/>--%>
+													<input id="" name="" type="text" value="${fns:getMainDictLabel(workItemStocks.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_count" name="workItemStocks[${index.index}].count" type="text" value="${workItemStocks.count}" readonly="true" class="form-control required"/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_price" name="workItemStocks[${index.index}].price" type="text" value="${workItemStocks.price}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_totalPrice" name="workItemStocks[${index.index}].totalPrice" type="text" value="${workItemStocks.totalPrice}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_contractName" name="workItemStocks[${index.index}].contractName" type="text" value="${workItemStocks.contractName}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_supplierName" name="workItemStocks[${index.index}].supplierName" type="text" value="${workItemStocks.supplierName}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStocks${index.index}_isAssets" name=" " type="text" value="${fns:getDictLabel(workItemStocks.isAssets, 'is_assets', '')}" readonly="true" class="form-control required"/>
+													<input id=" " name="workItemStocks[${index.index}].isAssets" value="${workItemStocks.isAssets}" type="hidden"  readonly="true" class="form-control "/>
+												</td>
+												<%--<td class="text-center op-td">
+													<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+												</td>--%>
+											</tr>
+										</c:forEach>
+									</c:if>
+									</tbody>
+								</table>
+								<script type="text/template" id="workItemStocksTpl">//<!--
+                                    <tr id="workItemStocks{{idx}}">
+                                        <td class="hide">
+                                            <input id="workItemStocks{{idx}}_id" name="workItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                            <input id="workItemStocks{{idx}}_delFlag" name="workItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+                                        </td>
+                                    	<td>
+                                        	<input id="workItemStocks{{idx}}_number" name="workItemStocks[{{idx}}].number" type="text" value="{{row.number}}"  readonly="true"  class="form-control required"/>
+                                   		 </td>
+										<td>
+                                        	<input id="workItemStocks{{idx}}_name" name="workItemStocks[{{idx}}].name" type="text" value="{{row.name}}"  readonly="true"  class="form-control"/>
+                                        	<input id="workItemStocks{{idx}}_catalogueItemId" name="workItemStocks[{{idx}}].catalogueItemId" type="text" value="{{row.catalogueItemId}}" type="hidden"  class="form-control"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_type" name="workItemStocks[{{idx}}].type" type="text" value="{{row.type}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_model" name="workItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_primaryUnit" name="workItemStocks[{{idx}}].primaryUnit" type="text" value="{{row.primaryUnit}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_count" name="workItemStocks[{{idx}}].count" type="text" value="{{row.count}}"   class="form-control required"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_price" name="workItemStocks[{{idx}}].price" type="text" value="{{row.price}}"   class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_totalPrice" name="workItemStocks[{{idx}}].totalPrice" type="text" value="{{row.totalPrice}}"    class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_contractName" name="workItemStocks[{{idx}}].contractName" type="text" value="{{row.contractName}}"   class="form-control "/>
+                                   		 </td>
+                                   		  <td>
+                                        	<input id="workItemStocks{{idx}}_supplierName" name="workItemStocks[{{idx}}].supplierName" type="text" value="{{row.supplierName}}" class="form-control "/>
+                                   		 </td>
+                                   		  <td>
+                                        	<input id="workItemStocks{{idx}}_isAssets" name="workItemStocks[{{idx}}].isAssets" type="text" value="{{row.isAssets}}" class="form-control required"/>
+                                   		 </td>
+
+                                        <td class="text-center op-td" id="workItemStocks{{idx}}_td">
+                                            {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                                        </td>
+                                    </tr>//-->
+								</script>
+								<script type="text/javascript">
+                                    var workCatalogueItemStocksRowIdx = 0, workCatalogueItemStocksTpl = $("#workCatalogueItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                                    var workItemStocksRowIdx = 0, workItemStocksTpl = $("#workItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                                    if($("#id").val()){
+                                        workCatalogueItemStocksRowIdx = ${fn:length(workStock.workCatalogueItemStocks)};
+                                        workItemStocksRowIdx = ${fn:length(workStock.workItemStocks)};
+                                    }
+								</script>
+
+							</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 required layui-input" value="<fmt:formatDate value="${workStock.acceptDate}" pattern="yyyy-MM-dd"/>"/>
+									<%--<input id="acceptDate" name="acceptDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+										   value="<fmt:formatDate value="${workStock.acceptDate}" 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 required layui-input" value="${workStock.acceptName}"/>
+								</div>
+							</div>
+						</div>
+						<div class="form-group layui-row first lw16">
+							<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">
+									<textarea  htmlEscape="false" rows="4" readonly="true"    class="form-control ">${workStock.remarks}</textarea>
+								</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="listAttachment" class="table table-bordered table-condensed details">
+									<thead>
+									<tr>
+											<%-- <th>序号</th>--%>
+										<th>文件预览</th>
+										<th>上传人</th>
+										<th>上传时间</th>
+										<th width="180px">操作</th>
+									</tr>
+									</thead>
+									<tbody id="file_attachment">
+									<c:forEach items="${workStock.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_attachment','_attachment')" 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>
+					</div>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 677 - 0
src/main/webapp/webpage/modules/workstock/workStocksAudit.jsp

@@ -0,0 +1,677 @@
+<%@ 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()){
+              if($("#workCatalogueItemStocks tr").length==0){
+                  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: '#createDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            laydate.render({
+                elem: '#acceptDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+            $('.icheckbox_square-green').css('top','10px');
+            $($('.icheckbox_square-green')[0]).css('top','0');
+		});
+        function insertTitle(tValue){
+            var list = "${workStock.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 = "106";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStock/"+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, tpl, row){
+            var idx1 = $("#workCatalogueItemStocks tr").length;
+            if(list == '#workCatalogueItemStocks' && idx1 < 100){
+                bornTemplete(list, idx, tpl, row, idx1);
+            }
+        }
+        function addRow2(list, idx, tpl, row){
+            var idx2 = $("#workItemStocks tr").length;
+            if(list == '#workItemStocks' && idx2 < 100){
+                bornTemplete(list, idx, tpl, row, idx2);
+            }
+        }
+        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 delRow(obj, prefix) {
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+           /* var idx1 = $("#workCatalogueItemStocks tr").length; //tr 总数
+            for (var i = 0; i < idx1; i++) {
+                $("#workCatalogueItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+            }
+
+            var idx2 = $("#workItemStocks tr").length; //tr 总数
+            for(var i = 0;i < idx2;i++){
+                $("#workItemStocks tr").eq(i).find("td").eq(1).html(i + 1);
+            }*/
+        }
+        function setPNumber(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoice/workInvoice/getPNumberr',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#pNumber").val(d.pNumber);
+                }
+            })
+        }
+
+        function setRow(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstock/workStock/getRow',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    addRow('#workCatalogueItemStocks',workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;
+                    //console.log("---------"+data.companyType+"---------"+data.companyIndustry+"---------"+data.areaName);
+                    //console.log("---------"+workCatalogueItemStocksRowIdx+"---------"+workCatalogueItemStocksTpl);
+                    var row = workCatalogueItemStocksRowIdx - 1 ;
+                    $("#"+"workCatalogueItemStocks"+row+"_name").val(d.name);
+                    $("#"+"workCatalogueItemStocks"+row+"_number").val(d.number);
+                    $("#"+"workCatalogueItemStocks"+row+"_type").val(d.type);
+                    $("#"+"workCatalogueItemStocks"+row+"_model").val(d.model);
+                    $("#"+"workCatalogueItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                }
+            })
+        }
+
+        function setRow2(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstock/workStock/getRow',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    addRow2('#workItemStocks', workItemStocksRowIdx, workItemStocksTpl);workItemStocksRowIdx = workItemStocksRowIdx + 1;
+                    var row = workItemStocksRowIdx - 1 ;
+                    $("#"+"workItemStocks"+row+"_name").val(d.name);
+                    $("#"+"workItemStocks"+row+"_number").val(d.number);
+                    $("#"+"workItemStocks"+row+"_type").val(d.type);
+                    $("#"+"workItemStocks"+row+"_model").val(d.model);
+                    $("#"+"workItemStocks"+row+"_primaryUnit").val(d.primaryUnit);
+                    $("#"+"workItemStocks"+row+"_catalogueItemId").val(d.catalogueItemId);
+
+                }
+            })
+        }
+        function  print() {
+            top.layer.alert('打印功能待开发', {icon: 0});
+        }
+	</script>
+</head>
+
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStock" enctype="multipart/form-data"  action ="${ctx}/workstock/workStock/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 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" readonly="true" class="form-control required layui-input" value="${workStock.createBy.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">
+									<div class="input-group">
+										<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStock.number}"/>
+										<span class="input-group-btn">
+											<label class="form-status"><c:choose><c:when test="${ empty workStock.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workStock.status, 'audit_state','')}</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">
+									<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="<fmt:formatDate value="${workStock.createDate}" 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 required layui-input" value="${workStock.officeName}"/>
+								</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 ">${workStock.reason}</textarea>
+								</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('#workCatalogueItemStocks', workCatalogueItemStocksRowIdx, workCatalogueItemStocksTpl);workCatalogueItemStocksRowIdx = workCatalogueItemStocksRowIdx + 1;" title="新增"><i class="fa fa-plus"></i>&nbsp;新增物品</a>
+
+								<sys:gridselectstock2 url="${ctx}/workscrap/workScrap/selectitems" id="zzz" name="" sign="1" value=""  title="选择物品" labelName=""
+													  labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock2>--%>
+							</div>
+							<div class="layui-item layui-col-xs12 form-table-container">
+								<table id="contentTable1" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th><span class="require-item">*</span>物品名称</th>
+										<th>物品编号</th>
+										<th>物品分类</th>
+										<th>规格型号</th>
+										<th>计量单位</th>
+										<th><span class="require-item">*</span>数量</th>
+										<th>描述</th>
+										<%--<th width="150px">操作</th>--%>
+									</tr>
+									</thead>
+									<tbody id="workCatalogueItemStocks">
+									<c:if test="${not empty workStock.workCatalogueItemStocks}">
+										<c:forEach items="${workStock.workCatalogueItemStocks}" var="workCatalogueItemStocks" varStatus="index">
+											<tr id="workCatalogueItemStocks${index.index}">
+												<td class="hide">
+													<input id="workCatalogueItemStocks${index.index}_id" name="workCatalogueItemStocks[${index.index}].id" type="hidden" value="${workCatalogueItemStocks.id}"/>
+													<input id="workCatalogueItemStocks${index.index}_delFlag" name="workCatalogueItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_name" name="workCatalogueItemStocks[${index.index}].name" type="text" value="${workCatalogueItemStocks.name}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_number" name="workCatalogueItemStocks[${index.index}].number" type="text" value="${workCatalogueItemStocks.number}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+														<%--<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="text" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>--%>
+														<%--<form:select id="workCatalogueItemStocks${index.index}_type" path="workCatalogueItemStocks[${index.index}].type" readonly="true" class="form-control">
+                                                            <form:option value="" label="请选择"/>
+                                                            <form:options items="${fns:getDictList('item_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                                        </form:select>--%>
+
+													<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.type, 'item_type', '')}" readonly="true" class="form-control "/>
+													<input id="workCatalogueItemStocks${index.index}_type" name="workCatalogueItemStocks[${index.index}].type" type="hidden" value="${workCatalogueItemStocks.type}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_model" name="workCatalogueItemStocks[${index.index}].model" type="text" readonly="true" value="${workCatalogueItemStocks.model}"  class="form-control "/>
+												</td>
+												<td>
+														<%--<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" type="text" value="${workCatalogueItemStocks.primaryUnit}" readonly="true"   class="form-control "/>--%>
+														<%--<form:select id="workCatalogueItemStocks${index.index}_primaryUnit" path="workCatalogueItemStocks[${index.index}].primaryUnit" readonly="true" class="form-control">
+                                                            <form:option value="" label="请选择"/>
+                                                            <form:options items="${fns:getDictList('full_count_unit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                                        </form:select>--%>
+													<input id="" name="" type="text" value="${fns:getMainDictLabel(workCatalogueItemStocks.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control "/>
+													<input id="workCatalogueItemStocks${index.index}_primaryUnit" name="workCatalogueItemStocks[${index.index}].primaryUnit" value="${workCatalogueItemStocks.primaryUnit}" type="hidden"  readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_count" readonly="true" name="workCatalogueItemStocks[${index.index}].count" type="text" value="${workCatalogueItemStocks.count}"  class="form-control "/>
+												</td>
+												<td>
+													<input id="workCatalogueItemStocks${index.index}_detail" readonly="true" name="workCatalogueItemStocks[${index.index}].detail" type="text" value="${workCatalogueItemStocks.detail}"  class="form-control "/>
+												</td>
+												<%--<td class="text-center op-td">
+													<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+												</td>--%>
+											</tr>
+										</c:forEach>
+									</c:if>
+									</tbody>
+								</table>
+								<script type="text/template" id="workCatalogueItemStocksTpl">//<!--
+												<tr id="workCatalogueItemStocks{{idx}}">
+													<td class="hide">
+														<input id="workCatalogueItemStocks{{idx}}_id" name="workCatalogueItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+														<input id="workCatalogueItemStocks{{idx}}_delFlag" name="workCatalogueItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+													</td>
+													<td>
+														<input id="workCatalogueItemStocks{{idx}}_name" name="workCatalogueItemStocks[{{idx}}].name" type="text" value="{{row.name}}" class="form-control required"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_number" name="workCatalogueItemStocks[{{idx}}].number" type="text" value="{{row.number}}" class="form-control"/>
+													 </td>
+ 													<td>
+														<input id="workCatalogueItemStocks{{idx}}_type" name="workCatalogueItemStocks[{{idx}}].type" type="text" value="{{row.type}}"  class="form-control "/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_model" name="workCatalogueItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  class="form-control"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_primaryUnit" name="workCatalogueItemStocks[{{idx}}].primaryUnit" type="text" value="{{row.primaryUnit}}"  class="form-control "/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_count" name="workCatalogueItemStocks[{{idx}}].count" type="text" value="{{row.count}}" class="form-control required"/>
+													 </td>
+													 <td>
+														<input id="workCatalogueItemStocks{{idx}}_detail" name="workCatalogueItemStocks[{{idx}}].detail" type="text" value="{{row.detail}}" class="form-control"/>
+													 </td>
+
+													<td class="text-center op-td" id="workCatalogueItemStocks{{idx}}_td">
+														{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workCatalogueItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+													</td>
+												</tr>//-->
+								</script>
+							</div>
+						</div>
+
+			<div class="form-group layui-row lw16">
+				<div class="form-group-label"><h2>物品验收明细</h2></div>
+				<div class="layui-item nav-btns">
+						<%--<sys:gridselectstock2 url="${ctx}/workscrap/workScrap/selectitems" id="xxx" name="" sign="2" value=""  title="选择物品" labelName=""
+                                              labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock2>--%>
+				</div>
+
+				<div class="layui-item layui-col-xs12 form-table-container">
+					<table id="contentTable2" class="table table-bordered table-condensed can-edit">
+						<thead>
+						<tr>
+							<th><span class="require-item">*</span>物品编号</th>
+							<th>物品名称</th>
+							<th>物品分类</th>
+							<th>规格型号</th>
+							<th>计量单位</th>
+							<th><span class="require-item">*</span>数量</th>
+							<th>单价</th>
+							<th>合计</th>
+							<th>采购合同</th>
+							<th>供应商</th>
+							<th><span class="require-item">*</span>是否固定资产</th>
+								<%--<th width="150px">操作</th>--%>
+						</tr>
+						</thead>
+						<tbody id="workItemStocks">
+						<c:if test="${not empty workStock.workItemStocks}">
+							<c:forEach items="${workStock.workItemStocks}" var="workItemStocks" varStatus="index">
+								<tr id="workItemStocks${index.index}">
+									<td class="hide">
+										<input id="workItemStocks${index.index}_id" name="workItemStocks[${index.index}].id" type="hidden" value="${workItemStocks.id}"/>
+										<input id="workItemStocks${index.index}_delFlag" name="workItemStocks[${index.index}].delFlag" type="hidden" value="0"/>
+									</td>
+									<td>
+										<input id="workItemStocks${index.index}_number" name="workItemStocks[${index.index}].number" type="text" value="${workItemStocks.number}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="workItemStocks${index.index}_name" name="workItemStocks[${index.index}].name" type="text" value="${workItemStocks.name}" readonly="true" class="form-control "/>
+										<input id="workItemStocks${index.index}_catalogueItemId" name="workItemStocks[${index.index}].catalogueItemId" type="hidden" value="${workItemStocks.catalogueItemId}"  class="form-control "/>
+									</td>
+									<td>
+										<input id="workItemStocks${index.index}_type" name="workItemStocks[${index.index}].type" type="text" value="${workItemStocks.type}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="workItemStocks${index.index}_model" name="workItemStocks[${index.index}].model" type="text" value="${workItemStocks.model}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<%--<input id="workItemStocks${index.index}_primaryUnit" name="workItemStocks[${index.index}].primaryUnit" type="text" value="${workItemStocks.primaryUnit}" readonly="true" class="form-control "/>--%>
+										<input id="" name="" type="text" value="${fns:getMainDictLabel(workItemStocks.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control "/>
+										<input id="workItemStocks${index.index}_primaryUnit" name="workItemStocks[${index.index}].primaryUnit" value="${workItemStocks.primaryUnit}" type="hidden"  readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="workItemStocks${index.index}_count" name="workItemStocks[${index.index}].count" type="text" value="${workItemStocks.count}" readonly="true" class="form-control required"/>
+									</td>
+									<td>
+										<input id="workItemStocks${index.index}_price" name="workItemStocks[${index.index}].price" type="text" value="${workItemStocks.price}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="workItemStocks${index.index}_totalPrice" name="workItemStocks[${index.index}].totalPrice" type="text" value="${workItemStocks.totalPrice}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="workItemStocks${index.index}_contractName" name="workItemStocks[${index.index}].contractName" type="text" value="${workItemStocks.contractName}" readonly="true" class="form-control "/>
+										<input id="workItemStocks${index.index}_contractId" name="workItemStocks[${index.index}].contractId" type="hidden" value="${workItemStocks.contractId}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="workItemStocks${index.index}_supplierName" name="workItemStocks[${index.index}].supplierName" type="text" value="${workItemStocks.supplierName}" readonly="true" class="form-control "/>
+									</td>
+									<td>
+										<input id="workItemStocks${index.index}_isAssets" name=" " type="text" value="${fns:getDictLabel(workItemStocks.isAssets, 'is_assets', '')}" readonly="true" class="form-control required"/>
+										<input id=" " name="workItemStocks[${index.index}].isAssets" value="${workItemStocks.isAssets}" type="hidden"  readonly="true" class="form-control "/>
+									</td>
+										<%--<td class="text-center op-td">
+                                            <span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+                                        </td>--%>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+					<script type="text/template" id="workItemStocksTpl">//<!--
+                                    <tr id="workItemStocks{{idx}}">
+                                        <td class="hide">
+                                            <input id="workItemStocks{{idx}}_id" name="workItemStocks[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                            <input id="workItemStocks{{idx}}_delFlag" name="workItemStocks[{{idx}}].delFlag" type="hidden" value="0"/>
+                                        </td>
+                                    	<td>
+                                        	<input id="workItemStocks{{idx}}_number" name="workItemStocks[{{idx}}].number" type="text" value="{{row.number}}"  readonly="true"  class="form-control required"/>
+                                   		 </td>
+										<td>
+                                        	<input id="workItemStocks{{idx}}_name" name="workItemStocks[{{idx}}].name" type="text" value="{{row.name}}"  readonly="true"  class="form-control"/>
+                                        	<input id="workItemStocks{{idx}}_catalogueItemId" name="workItemStocks[{{idx}}].catalogueItemId" type="text" value="{{row.catalogueItemId}}" type="hidden"  class="form-control"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_type" name="workItemStocks[{{idx}}].type" type="text" value="{{row.type}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_model" name="workItemStocks[{{idx}}].model" type="text" value="{{row.model}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_primaryUnit" name="workItemStocks[{{idx}}].primaryUnit" type="text" value="{{row.primaryUnit}}"  readonly="true"  class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_count" name="workItemStocks[{{idx}}].count" type="text" value="{{row.count}}"   class="form-control required"/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_price" name="workItemStocks[{{idx}}].price" type="text" value="{{row.price}}"   class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_totalPrice" name="workItemStocks[{{idx}}].totalPrice" type="text" value="{{row.totalPrice}}"    class="form-control "/>
+                                   		 </td>
+                                   		 <td>
+                                        	<input id="workItemStocks{{idx}}_contractName" name="workItemStocks[{{idx}}].contractName" type="text" value="{{row.contractName}}"   class="form-control "/>
+                                   		 </td>
+                                   		  <td>
+                                        	<input id="workItemStocks{{idx}}_supplierName" name="workItemStocks[{{idx}}].supplierName" type="text" value="{{row.supplierName}}" class="form-control "/>
+                                   		 </td>
+                                   		  <td>
+                                        	<input id="workItemStocks{{idx}}_isAssets" name="workItemStocks[{{idx}}].isAssets" type="text" value="{{row.isAssets}}" class="form-control required"/>
+                                   		 </td>
+
+                                        <td class="text-center op-td" id="workItemStocks{{idx}}_td">
+                                            {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                                        </td>
+                                    </tr>//-->
+					</script>
+				</div>
+			</div>
+
+						<div class="form-group layui-row lw16">
+							<div class="form-group-label"><h2>固定资产编码</h2></div>
+							<div class="layui-item nav-btns">
+								<a class="nav-btn nav-btn-add" onclick="print()" title="打印"><i class=""></i>&nbsp;打印</a>
+								<%--<sys:gridselectstock2 url="${ctx}/workscrap/workScrap/selectitems" id="xxx" name="" sign="2" value=""  title="选择物品" labelName=""
+													  labelValue="" cssClass="form-control layui-input required" fieldLabels="物品" fieldKeys="name" searchLabel="物品名称" searchKey="name" ></sys:gridselectstock2>--%>
+							</div>
+
+							<div class="layui-item layui-col-xs12 form-table-container">
+								<table id="contentTable3" class="table table-bordered table-condensed can-edit">
+									<thead>
+									<tr>
+										<th width="20px"> <input type="checkbox" class="i-checks"></th>
+										<th>物品名称</th>
+										<th>物品编号</th>
+										<th>物品分类</th>
+										<th>规格型号</th>
+										<th>计量单位</th>
+										<th>固定资产编号</th>
+									</tr>
+									</thead>
+									<tbody id="workItemStockAssets">
+									<c:if test="${not empty workStock.workItemStockAssets}">
+										<c:forEach items="${workStock.workItemStockAssets}" var="workItemStockAssets" varStatus="index">
+											<tr id="workItemStockAssets${index.index}">
+													<td> <input type="checkbox" id="${workItemStockAssets.id}" style="top: 100%" class="i-checks form-control "></td>
+												<td class="hide">
+													<input id="workItemStockAssets${index.index}_id" name="workItemStockAssets[${index.index}].id" type="hidden" value="${workItemStockAssets.id}"/>
+													<input id="workItemStockAssets${index.index}_delFlag" name="workItemStockAssets[${index.index}].delFlag" type="hidden" value="0"/>
+												</td>
+												<td>
+													<input id="workItemStockAssets${index.index}_name" name="workItemStockAssets[${index.index}].name" type="text" value="${workItemStockAssets.name}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStockAssets${index.index}_number" name="workItemStockAssets[${index.index}].number" type="text" value="${workItemStockAssets.number}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStockAssets${index.index}_type" name="workItemStockAssets[${index.index}].type" type="text" value="${workItemStockAssets.type}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStockAssets${index.index}_model" name="workItemStockAssets[${index.index}].model" type="text" value="${workItemStockAssets.model}" readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<%--<input id="workItemStockAssets${index.index}_primaryUnit" name="workItemStockAssets[${index.index}].primaryUnit" type="text" value="${workItemStockAssets.primaryUnit}" readonly="true" class="form-control "/>--%>
+													<input id="" name="" type="text" value="${fns:getMainDictLabel(workItemStockAssets.primaryUnit, 'full_count_unit', '')}" readonly="true" class="form-control "/>
+													<input id="workItemStockAssets${index.index}_primaryUnit" name="workItemStockAssets[${index.index}].primaryUnit" value="${workItemStockAssets.primaryUnit}" type="hidden"  readonly="true" class="form-control "/>
+												</td>
+												<td>
+													<input id="workItemStockAssets${index.index}_assetsNumber" name="workItemStockAssets[${index.index}].assetsNumber" type="text" value="${workItemStockAssets.assetsNumber}" readonly="true" class="form-control required"/>
+												</td>
+
+												<td>
+													<input id="workItemStockAssets${index.index}_count" name="workItemStockAssets[${index.index}].count" type="hidden" value="${workItemStockAssets.count}" readonly="true" class="form-control required"/>
+												</td>
+												<td>
+													<input id="workItemStockAssets${index.index}_contractId" name="workItemStockAssets[${index.index}].contractId" type="hidden" value="${workItemStockAssets.contractId}" readonly="true" class="form-control required"/>
+												</td>
+												<td>
+													<input id="workItemStockAssets${index.index}_catalogueItemId" name="workItemStockAssets[${index.index}].catalogueItemId" type="hidden" value="${workItemStockAssets.catalogueItemId}" readonly="true" class="form-control required"/>
+												</td>
+												<%--<td class="text-center op-td">
+													<span class="op-btn op-btn-delete" onclick="delRow(this, '#workItemStocks${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+												</td>--%>
+											</tr>
+										</c:forEach>
+									</c:if>
+									</tbody>
+								</table>
+								<script type="text/javascript">
+                                    var workCatalogueItemStocksRowIdx = 0, workCatalogueItemStocksTpl = $("#workCatalogueItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                                    var workItemStocksRowIdx = 0, workItemStocksTpl = $("#workItemStocksTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                                    var workItemStockAssetsRowIdx = 0/*workItemStockAssetsTpl = $("#workItemStockAssetsTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"")*/;
+
+                                    if($("#id").val()){
+                                        workCatalogueItemStocksRowIdx = ${fn:length(workStock.workCatalogueItemStocks)};
+                                        workItemStocksRowIdx = ${fn:length(workStock.workItemStocks)};
+                                        workItemStockAssetsRowIdx = ${fn:length(workStock.workItemStockAssets)};
+                                    }
+								</script>
+
+							</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 required layui-input" value="<fmt:formatDate value="${workStock.acceptDate}" pattern="yyyy-MM-dd"/>"/>
+									<%--<input id="acceptDate" name="acceptDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+										   value="<fmt:formatDate value="${workStock.acceptDate}" 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 required layui-input" value="${workStock.acceptName}"/>
+								</div>
+							</div>
+
+						</div>
+						<div class="form-group layui-row first lw16">
+							<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">
+									<textarea  htmlEscape="false" rows="4" readonly="true"    class="form-control ">${workStock.remarks}</textarea>
+								</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="listAttachment" class="table table-bordered table-condensed details">
+									<thead>
+									<tr>
+											<%-- <th>序号</th>--%>
+										<th>文件预览</th>
+										<th>上传人</th>
+										<th>上传时间</th>
+										<th width="180px">操作</th>
+									</tr>
+									</thead>
+									<tbody id="file_attachment">
+									<c:forEach items="${workStock.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_attachment','_attachment')" 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-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="${workStock.act.procInsId}"/>
+								<act:histoicFlow procInsId="${workStock.act.procInsId}"/>
+							</div>
+						</div>
+						<div class="form-group layui-row page-end"></div>
+					</div>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 20 - 0
src/main/webapp/webpage/modules/workstock/workTrack.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>
+

+ 327 - 0
src/main/webapp/webpage/modules/workstockcontract/workStockContractAudit.jsp

@@ -0,0 +1,327 @@
+
+
+<%@ 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()){
+                //附件必传限制
+                /*  if($("#file_attachment4 tr").length==0){
+                      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);
+                    }
+                }
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            $("#attachment_review_btn").click(function () {
+                $("#attachment_review_file").click();
+            });
+            laydate.render({
+                elem: '#signDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "103";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+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,0);}
+        }
+        function insertTitleReview(tValue){
+            var files = $("#attachment_review_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "104";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment_review";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+        //选择供应商为联系人赋值
+        function setLinkName(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstockcontract/workStockContract/getLinkName',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#linkName").val(d.linkName);
+                }
+            })
+        }
+	</script>
+</head>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStockContract" action="${ctx}/workstockcontract/workStockContract/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"/>
+			<form:hidden path="completeStatus"/>
+			<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">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.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">
+						<div class="input-group">
+							<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.number}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workStockContract.status}">${fns:getDictLabel(workStockContract.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"><span class="require-item">*</span>供应商名称:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.supplier.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 required layui-input" value="${workStockContract.linkName}"/>
+					</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 required layui-input" value="<fmt:formatNumber value="${workStockContract.money}" pattern="#,#00.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 class="form-control layui-input" readonly="true" id="signDate"
+							   name="signDate" value="<fmt:formatDate value="${workStockContract.signDate}" 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 class="form-control layui-input" readonly="true"
+							   value="${fns:getDictLabel(workStockContract.completeStatus, 'complete_status', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label ">所属部门:</label>
+					<div class="layui-input-block">
+						<input class="form-control layui-input" readonly="true"
+							   value="${workStockContract.officeName}"/>
+					</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 ">${workStockContract.remarks}</textarea>
+					</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="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workStockContract.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>归档附件信息</h2></div>
+			<%--	<div class="layui-item nav-btns">
+					<a id="attachment_review_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>--%>
+				<div id="addFile_attachment_review" style="display: none" class="upload-progress">
+					<span id="fileName_attachment_review" ></span>
+					<b><span id="baifenbi_attachment_review" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment_review" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_review_file" type="file" name="attachment_file" style="display: none;" onChange="if(this.value)insertTitleReview(this.value);"/>
+				<span id="attachment_review_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="listAttachmentReview" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment_review">
+						<c:forEach items="${workStockContract.workRecordAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>审批意见</h2></div>
+				<div class="layui-item layui-col-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="${workStockContract.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workStockContract.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 310 - 0
src/main/webapp/webpage/modules/workstockcontract/workStockContractForm.jsp

@@ -0,0 +1,310 @@
+
+
+<%@ 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}/workstockcontract/workStockContract/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workstockcontract/workStockContract/save");
+            }
+            if(validateForm.form()){
+                //附件必传限制
+                  if($("#file_attachment tr").length==0){
+                      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);
+                    }
+                }
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            $("#attachment_review_btn").click(function () {
+                $("#attachment_review_file").click();
+            });
+            laydate.render({
+                elem: '#signDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "103";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+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,0);}
+        }
+        function insertTitleReview(tValue){
+            var files = $("#attachment_review_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "104";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment_review";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+        //选择供应商为联系人赋值
+        function setLinkName(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstockcontract/workStockContract/getLinkName',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#linkName").val(d.linkName);
+                }
+            })
+        }
+	</script>
+</head>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStockContract" action="${ctx}/workstockcontract/workStockContract/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="completeStatus"/>
+			<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">
+						<form:input path="name" htmlEscape="false"    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">
+						<div class="input-group">
+							<form:input path="number" htmlEscape="false" class="form-control required layui-input"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workStockContract.status}">${fns:getDictLabel(workStockContract.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"><span class="require-item">*</span>供应商名称:</label>
+					<div class="layui-input-block with-icon">
+						<sys:gridselectsupplier url="${ctx}/workstockcontract/workStockContract/selectsupplier" id="supplier" name="supplier.id"
+							value="${workStockContract.supplier.id}" title="选择供应商" labelName="supplier.name"
+							labelValue="${workStockContract.supplier.name}" cssClass="form-control layui-input required"
+							fieldLabels="供应商管理" fieldKeys="name" searchLabel="名称" searchKey="name" ></sys:gridselectsupplier>
+					</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="linkName" path="linkName" htmlEscape="false"    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="money" htmlEscape="false"    class="form-control number required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>签订日期:</label>
+					<div class="layui-input-block">
+						<input class="laydate-icondate required layui-input form-control layer-date laydate-icon" id="signDate"
+							   name="signDate" value="<fmt:formatDate value="${workStockContract.signDate}" 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 class="form-control layui-input" readonly="true"
+							   value="${fns:getDictLabel(workStockContract.completeStatus, 'complete_status', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label ">所属部门:</label>
+					<div class="layui-input-block">
+						<input class="form-control layui-input" readonly="true"
+							   value="${workStockContract.officeName}"/>
+					</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" id="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>合同附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<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="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workStockContract.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_attachment','_attachment')" 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 id="attachment_review_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>--%>
+				<div id="addFile_attachment_review" style="display: none" class="upload-progress">
+					<span id="fileName_attachment_review" ></span>
+					<b><span id="baifenbi_attachment_review" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment_review" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_review_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleReview(this.value);"/>
+				<span id="attachment_review_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="listAttachmentReview" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment_review">
+						<c:forEach items="${workStockContract.workRecordAttachments}" 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_attachment','_attachment_review')" 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>

+ 297 - 0
src/main/webapp/webpage/modules/workstockcontract/workStockContractForms.jsp

@@ -0,0 +1,297 @@
+
+
+<%@ 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($("#file_attachment_review tr").length==0){
+                      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);
+                    }
+                }
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            $("#attachment_review_btn").click(function () {
+                $("#attachment_review_file").click();
+            });
+            laydate.render({
+                elem: '#signDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "103";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+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,0);}
+        }
+        function insertTitleReview(tValue){
+            var files = $("#attachment_review_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "104";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment_review";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+        //选择供应商为联系人赋值
+        function setLinkName(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstockcontract/workStockContract/getLinkName',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#linkName").val(d.linkName);
+                }
+            })
+        }
+	</script>
+</head>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStockContract" action="${ctx}/workstockcontract/workStockContract/complete" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="completeStatus"/>
+			<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">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.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">
+						<div class="input-group">
+							<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.number}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workStockContract.status}">${fns:getDictLabel(workStockContract.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"><span class="require-item">*</span>供应商名称:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.supplier.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 required layui-input" value="${workStockContract.linkName}"/>
+					</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 required layui-input" value="<fmt:formatNumber value="${workStockContract.money}" pattern="#,#00.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 class="form-control layui-input" readonly="true" id="signDate"
+							   name="signDate" value="<fmt:formatDate value="${workStockContract.signDate}" 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 class="form-control layui-input" readonly="true"
+							   value="${fns:getDictLabel(workStockContract.completeStatus, 'complete_status', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label ">所属部门:</label>
+					<div class="layui-input-block">
+						<input class="form-control layui-input" readonly="true"
+							   value="${workStockContract.officeName}"/>
+					</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 ">${workStockContract.remarks}</textarea>
+					</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="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workStockContract.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>归档附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_review_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment_review" style="display: none" class="upload-progress">
+					<span id="fileName_attachment_review" ></span>
+					<b><span id="baifenbi_attachment_review" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment_review" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_review_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleReview(this.value);"/>
+				<span id="attachment_review_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="listAttachmentReview" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment_review">
+						<c:forEach items="${workStockContract.workRecordAttachments}" 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>
+										<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment_review')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 378 - 0
src/main/webapp/webpage/modules/workstockcontract/workStockContractList.jsp

@@ -0,0 +1,378 @@
+<%@ 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: '#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'
+            });
+            //搜索框收放
+            $('#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 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){
+                }
+            });
+        }
+        function openDialogreplayComplete(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="workStockContract" action="${ctx}/workstockcontract/workStockContract/" 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="name" path="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">
+								<form:input path="supplier.name" 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" class="lw8" style="clear:both;display:none;">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">合同状态:</label>
+							<div class="layui-input-block with-icon">
+								<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">
+								<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="${workStockContract.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="${workStockContract.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 with-icon">
+								<form:select path="completeStatus"  class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('complete_status')}" 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">
+								<form:input id="number" path="number" 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">
+								<form:input id="linkName" path="linkName" htmlEscape="false" 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="workstockcontract:workStockContract:add">
+						<button class="nav-btn nav-btn-add" title="采购合同" onclick="openDialogre('采购合同','${ctx}/workstockcontract/workStockContract/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>
+						</shiro:hasPermission>
+						<shiro:hasPermission name="workstockcontract:workStockContract:export">
+						<table:exportExcel url="${ctx}/workstockcontract/workStockContract/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:'number',align:'center',title: '合同编号',width:210,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看采购合同', '${ctx}/workstockcontract/workStockContract/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.number + ">" + d.number + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'name',align:'center', title: '合同名称',width:160,templet:function(d){
+                    return "<span title='"+ d.name +"'>" + d.name + "</span>";
+                }}
+                ,{field:'supplierName',align:'center', title: '供应商名称',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.supplierName +"'>" + d.supplierName + "</span>";
+                }}
+                ,{field:'linkName',align:'center', title: '联系人姓名',minWidth:160,templet:function(d){
+                    return "<span title='"+ d.linkName +"'>" + d.linkName + "</span>";
+                }}
+                ,{field:'money', align:'center',title: '合同金额(元)',width:160,templet:function(d){
+                    return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                }}
+                ,{field:'signDate',align:'center',sort:true ,title: '签订日期', width:130}
+                ,{field:'completeStatus',align:'center', title: '完成状态', width:65}
+                ,{field:'remarks',align:'center', title: '备注信息', width:210}
+                ,{field:'status',align:'center', title: '状态', width:70,templet:function(d){
+                    var st = getAuditState(d.status)
+                    var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workstockcontract/workStockContract/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}/workstockcontract/workStockContract/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}/workstockcontract/workStockContract/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}/workstockcontract/workStockContract/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}/workstockcontract/workStockContract/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}/workstockcontract/workStockContract/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该合同申请吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+                    if(d.canlive != undefined && d.canlive == "1")
+                    xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplayComplete('修改采购合同', '${ctx}/workstockcontract/workStockContract/form?id="+ d.id + "&tabId=5','95%','95%')\" class=\"op-btn op-btn-delete\" style=\"background:green\"><i class=\"glyphicon glyphicon-share-alt\"></i> 完成</a>";
+                    return xml;
+                }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workStockContract" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workStockContract.id}"
+                    ,"number":"${workStockContract.number}"
+                    ,"name":"${workStockContract.name}"
+                    ,"supplierName":"${workStockContract.supplier.name}"
+                    ,"linkName":"${workStockContract.linkName}"
+                    ,"money":"<fmt:formatNumber value="${workStockContract.money}" pattern="#,#00.00"/>"
+                    ,"signDate":"<fmt:formatDate value="${workStockContract.signDate}" pattern="yyyy-MM-dd"/>"
+                    ,"completeStatus":"${fns:getDictLabel(workStockContract.completeStatus, 'complete_status', '')}"
+                    ,"remarks":"${workStockContract.remarks}"
+                    ,"status":"${workStockContract.status}"
+                    <c:if test="${fns:getUser().id == workStockContract.createBy.id}">
+						<c:if test="${workStockContract.status == '2' }">,"cancancel":"1"</c:if>
+						<shiro:hasPermission name="workstockcontract:workStockContract:edit"><c:choose>
+						<c:when test="${workStockContract.status == '1' }">,"canedit1":"1"</c:when>
+						<c:when test="${workStockContract.status == '4'}">,"canedit2":"1"</c:when>
+						<c:when test="${workStockContract.status == '3'}">,"canedit3":"1"</c:when>
+						</c:choose></shiro:hasPermission>
+						<shiro:hasPermission name="workstockcontract:workStockContract:del"><c:choose>
+						<c:when test="${(workStockContract.status == '1' or workStockContract.status == '3' or workStockContract.status == '4')}">,"candelete":"1"</c:when>
+						</c:choose></shiro:hasPermission>
+                    </c:if>
+                    <c:if test="${workStockContract.status == 5 && workStockContract.completeStatus != 2 && fns:getUser().id == workStockContract.createBy.id}">
+                    <shiro:hasPermission name="workstockcontract:workStockContract:edit">,"canlive":"1"</shiro:hasPermission>
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 317 - 0
src/main/webapp/webpage/modules/workstockcontract/workStockContractModify.jsp

@@ -0,0 +1,317 @@
+
+
+<%@ 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()){
+                //附件必传限制
+                  if($("#file_attachment tr").length==0){
+                      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);
+                    }
+                }
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            $("#attachment_review_btn").click(function () {
+                $("#attachment_review_file").click();
+            });
+            laydate.render({
+                elem: '#signDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "103";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+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,0);}
+        }
+        function insertTitleReview(tValue){
+            var files = $("#attachment_review_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "104";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment_review";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+        //选择供应商为联系人赋值
+        function setLinkName(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstockcontract/workStockContract/getLinkName',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#linkName").val(d.linkName);
+                }
+            })
+        }
+	</script>
+</head>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStockContract" action="${ctx}/workstockcontract/workStockContract/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"/>
+			<form:hidden path="completeStatus"/>
+			<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">
+						<form:input path="name" htmlEscape="false"    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">
+						<div class="input-group">
+							<form:input path="number" htmlEscape="false" class="form-control required layui-input"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workStockContract.status}">${fns:getDictLabel(workStockContract.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"><span class="require-item">*</span>供应商名称:</label>
+					<div class="layui-input-block with-icon">
+						<sys:gridselectsupplier url="${ctx}/workstockcontract/workStockContract/selectsupplier" id="supplier" name="supplier.id"
+							value="${workStockContract.supplier.id}" title="选择供应商" labelName="supplier.name"
+							labelValue="${workStockContract.supplier.name}" cssClass="form-control layui-input required"
+							fieldLabels="供应商管理" fieldKeys="name" searchLabel="名称" searchKey="name" ></sys:gridselectsupplier>
+					</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="linkName" path="linkName" htmlEscape="false"    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="money" htmlEscape="false"    class="form-control number required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>签订日期:</label>
+					<div class="layui-input-block">
+						<input class="laydate-icondate required layui-input form-control layer-date laydate-icon" id="signDate"
+							   name="signDate" value="<fmt:formatDate value="${workStockContract.signDate}" 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 class="form-control layui-input" readonly="true"
+							   value="${fns:getDictLabel(workStockContract.completeStatus, 'complete_status', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label ">所属部门:</label>
+					<div class="layui-input-block">
+						<input class="form-control layui-input" readonly="true"
+							   value="${workStockContract.officeName}"/>
+					</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" id="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>合同附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<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="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workStockContract.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_attachment','_attachment')" 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 id="attachment_review_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>--%>
+				<div id="addFile_attachment_review" style="display: none" class="upload-progress">
+					<span id="fileName_attachment_review" ></span>
+					<b><span id="baifenbi_attachment_review" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment_review" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_review_file" type="file" name="attachment_file" style="display: none;" onChange="if(this.value)insertTitleReview(this.value);"/>
+				<span id="attachment_review_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="listAttachmentReview" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment_review">
+						<c:forEach items="${workStockContract.workRecordAttachments}" 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_attachment','_attachment_review')" 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>

+ 323 - 0
src/main/webapp/webpage/modules/workstockcontract/workStockContractSqrAudit.jsp

@@ -0,0 +1,323 @@
+
+
+<%@ 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调用提交表单。
+                $('#flag').val('yes');
+            if(validateForm.form()){
+                //归档附件必传限制
+                  if($("#file_attachment_review tr").length==0){
+                      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);
+                    }
+                }
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            $("#attachment_review_btn").click(function () {
+                $("#attachment_review_file").click();
+            });
+            laydate.render({
+                elem: '#signDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "103";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+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,0);}
+        }
+        function insertTitleReview(tValue){
+            var files = $("#attachment_review_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "104";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment_review";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+        //选择供应商为联系人赋值
+        function setLinkName(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstockcontract/workStockContract/getLinkName',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#linkName").val(d.linkName);
+                }
+            })
+        }
+	</script>
+</head>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStockContract" action="${ctx}/workstockcontract/workStockContract/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"/>
+			<form:hidden path="completeStatus"/>
+			<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">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.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">
+						<div class="input-group">
+							<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.number}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workStockContract.status}">${fns:getDictLabel(workStockContract.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"><span class="require-item">*</span>供应商名称:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.supplier.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 required layui-input" value="${workStockContract.linkName}"/>
+					</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 required layui-input" value="<fmt:formatNumber value="${workStockContract.money}" pattern="#,#00.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 class="form-control layui-input" readonly="true" id="signDate"
+							   name="signDate" value="<fmt:formatDate value="${workStockContract.signDate}" 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 class="form-control layui-input" readonly="true"
+							   value="${fns:getDictLabel(workStockContract.completeStatus, 'complete_status', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label ">所属部门:</label>
+					<div class="layui-input-block">
+						<input class="form-control layui-input" readonly="true"
+							   value="${workStockContract.officeName}"/>
+					</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 ">${workStockContract.remarks}</textarea>
+					</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="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workStockContract.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>归档附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_review_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment_review" style="display: none" class="upload-progress">
+					<span id="fileName_attachment_review" ></span>
+					<b><span id="baifenbi_attachment_review" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment_review" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_review_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleReview(this.value);"/>
+				<span id="attachment_review_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="listAttachmentReview" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment_review">
+						<c:forEach items="${workStockContract.workRecordAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>审批意见</h2></div>
+				<div class="layui-item layui-col-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="${workStockContract.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workStockContract.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 352 - 0
src/main/webapp/webpage/modules/workstockcontract/workStockContractView.jsp

@@ -0,0 +1,352 @@
+
+
+<%@ 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}/workstockcontract/workStockContract/store");
+            }else{
+                $("#inputForm").attr("action","${ctx}/workstockcontract/workStockContract/save");
+            }
+            if(validateForm.form()){
+                //附件必传限制
+                /*  if($("#file_attachment4 tr").length==0){
+                      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);
+                    }
+                }
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            $("#attachment_review_btn").click(function () {
+                $("#attachment_review_file").click();
+            });
+            laydate.render({
+                elem: '#signDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "103";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+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,0);}
+        }
+        function insertTitleReview(tValue){
+            var files = $("#attachment_review_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "104";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment_review";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+        //选择供应商为联系人赋值
+        function setLinkName(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstockcontract/workStockContract/getLinkName',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#linkName").val(d.linkName);
+                }
+            })
+        }
+	</script>
+</head>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStockContract" action="${ctx}/workstockcontract/workStockContract/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="completeStatus"/>
+			<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">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.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">
+						<div class="input-group">
+							<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.number}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workStockContract.status}">${fns:getDictLabel(workStockContract.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"><span class="require-item">*</span>供应商名称:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.supplier.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 required layui-input" value="${workStockContract.linkName}"/>
+					</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 required layui-input" value="<fmt:formatNumber value="${workStockContract.money}" pattern="#,#00.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 class="form-control layui-input" readonly="true" id="signDate"
+							   name="signDate" value="<fmt:formatDate value="${workStockContract.signDate}" 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 class="form-control layui-input" readonly="true"
+							   value="${fns:getDictLabel(workStockContract.completeStatus, 'complete_status', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label ">所属部门:</label>
+					<div class="layui-input-block">
+						<input class="form-control layui-input" readonly="true"
+							   value="${workStockContract.officeName}"/>
+					</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 ">${workStockContract.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" >
+						<table id="contentTable2" class="table table-bordered table-condensed details no-bottom-margin">
+							<thead>
+							<tr>
+								<th>物品名称</th>
+								<th>物品编号</th>
+								<th>物品分类</th>
+								<th>规格型号</th>
+								<th>计量单位</th>
+								<th>数量</th>
+								<th>单价</th>
+								<th>合计</th>
+								<th>是否固定资产</th>
+							</tr>
+							</thead>
+							<tbody id="workCatalogueItemList">
+							<c:forEach items="${workStockContract.workCatalogueItemList}" var="workCatalogueItem" varStatus="status">
+								<tr>
+									<td>${workCatalogueItem.name}</td>
+									<td>${workCatalogueItem.number}</td>
+									<td> ${workCatalogueItem.type}<%--${fns:getDictLabel(workCatalogueItem.type, 'item_type','')}--%></td>
+									<td>${workCatalogueItem.model}</td>
+									<td><%--${workCatalogueItem.primaryUnit}--%>${fns:getMainDictLabel(workCatalogueItem.primaryUnit, 'full_count_unit','')}</td>
+									<td>
+									<c:choose >
+										<c:when test="${workCatalogueItem.isAssets eq '1'}">
+											1
+										</c:when>
+										<c:otherwise>
+											${workCatalogueItem.count}
+										</c:otherwise>
+									</c:choose>
+									</td>
+									<td>${workCatalogueItem.price}</td>
+									<td>${workCatalogueItem.totalPrice}</td>
+									<td>${fns:getDictLabel(workCatalogueItem.isAssets, 'is_assets','')}</td>
+								</tr>
+							</c:forEach>
+							<c:if test="${empty workStockContract.workCatalogueItemList}">
+								<tr>
+									<td colspan="9">暂无数据</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 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="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workStockContract.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>归档附件信息</h2></div>
+			<%--	<div class="layui-item nav-btns">
+					<a id="attachment_review_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>--%>
+				<div id="addFile_attachment_review" style="display: none" class="upload-progress">
+					<span id="fileName_attachment_review" ></span>
+					<b><span id="baifenbi_attachment_review" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment_review" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_review_file" type="file" name="attachment_file" style="display: none;" onChange="if(this.value)insertTitleReview(this.value);"/>
+				<span id="attachment_review_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="listAttachmentReview" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment_review">
+						<c:forEach items="${workStockContract.workRecordAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 350 - 0
src/main/webapp/webpage/modules/workstockcontract/workStockContractgzAudit.jsp

@@ -0,0 +1,350 @@
+
+
+<%@ 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()){
+                //附件必传限制
+                /*  if($("#file_attachment4 tr").length==0){
+                      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);
+                    }
+                }
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+            $("#attachment_review_btn").click(function () {
+                $("#attachment_review_file").click();
+            });
+            laydate.render({
+                elem: '#signDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "103";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+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,0);}
+        }
+        function insertTitleReview(tValue){
+            var files = $("#attachment_review_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "104";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workStockContract/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment_review";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+        //选择供应商为联系人赋值
+        function setLinkName(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstockcontract/workStockContract/getLinkName',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#linkName").val(d.linkName);
+                }
+            })
+        }
+	</script>
+</head>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workStockContract" action="${ctx}/workstockcontract/workStockContract/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"/>
+			<form:hidden path="completeStatus"/>
+			<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">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.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">
+						<div class="input-group">
+							<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.number}"/>
+							<span class="input-group-btn">
+                            <label class="form-status"><c:choose><c:when test="${not empty workStockContract.status}">${fns:getDictLabel(workStockContract.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"><span class="require-item">*</span>供应商名称:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false" readonly="true" class="form-control required layui-input" value="${workStockContract.supplier.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 required layui-input" value="${workStockContract.linkName}"/>
+					</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 required layui-input" value="<fmt:formatNumber value="${workStockContract.money}" pattern="#,#00.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 class="form-control layui-input" readonly="true" id="signDate"
+							   name="signDate" value="<fmt:formatDate value="${workStockContract.signDate}" 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 class="form-control layui-input" readonly="true"
+							   value="${fns:getDictLabel(workStockContract.completeStatus, 'complete_status', '')}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label ">所属部门:</label>
+					<div class="layui-input-block">
+						<input class="form-control layui-input" readonly="true"
+							   value="${workStockContract.officeName}"/>
+					</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 ">${workStockContract.remarks}</textarea>
+					</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="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workStockContract.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" >
+                                        <c:set var="signflag" value="${fns:getSysParam('sign_flag',fns:getUser())}"/>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'doc')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'docx')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'xls')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'xlsx')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ppt')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'pptx')}">
+                                                <a href="${ctx}/isignature/iSignatureDocument/sign?recordId=${workClientAttachment.id}" class="op-btn op-btn-sign" target="_blank">签章</a>
+                                                <a href="javascript:void(0);" onclick="openDialogView('查看电子签章信息', '${ctx}/isignature/iSignatureDocument/form?recordId=${workClientAttachment.id}','95%', '95%')" class="op-btn op-btn-view" ><i class="fa fa-search-plus"></i> 查看</a>
+                                                <c:choose>
+                                                    <c:when test="${signflag == '是'}">
+                                                        <a href="javascript:location.href='${ctx}/isignature/iSignatureDocument/download?recordId=${workClientAttachment.id}'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <a href="javascript:location.href='${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="javascript:location.href='${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+									</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 id="attachment_review_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>--%>
+				<div id="addFile_attachment_review" style="display: none" class="upload-progress">
+					<span id="fileName_attachment_review" ></span>
+					<b><span id="baifenbi_attachment_review" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment_review" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_review_file" type="file" name="attachment_file" style="display: none;" onChange="if(this.value)insertTitleReview(this.value);"/>
+				<span id="attachment_review_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="listAttachmentReview" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="180px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment_review">
+						<c:forEach items="${workStockContract.workRecordAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>审批意见</h2></div>
+				<div class="layui-item layui-col-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="${workStockContract.act.procInsId}"/>
+					<act:histoicFlow procInsId="${workStockContract.act.procInsId}"/>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

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

+ 269 - 0
src/main/webapp/webpage/modules/worksupplier/workSupplierForm.jsp

@@ -0,0 +1,269 @@
+<%@ 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() {
+            jQuery.validator.addMethod("isUscCode", function(value, element) {
+                if (this.optional(element)){
+                    return true;
+                }
+                var uscCode = /^((\w{15})|(\w{18})|(\w{20}))$/;
+                return uscCode.test(value);
+            }, "请填写正确的统一社会信用代码");
+            var ids = $("#id").val();
+			validateForm = $("#inputForm").validate({
+                rules: {
+                    uscCode: {remote: "${ctx}/worksupplier/workSupplier/validateUscCode?ids="+ids},
+                },
+                messages: {
+                    uscCode:{remote: "该统一社会信用代码已经被使用!", required: "统一社会信用代码不能为空."},
+                },
+				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);
+					}
+				}
+			});
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+		});
+        window.onload = function(){
+            var oInput = document.getElementById("uscCode");
+            oInput.focus();
+        }
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "101";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workSupplier/"+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,0);}
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workSupplier" action="${ctx}/worksupplier/workSupplier/save" method="post" class="form-horizontal">
+			<form:hidden id="id" path="id"/>
+			<form:hidden path="removeSign"/>
+			<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"><span class="require-item">*</span>供应商名称:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="name" htmlEscape="false" class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7 companyType_uscCode">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>统一社会信用代码:</label>
+					<div class="layui-input-block">
+						<form:input id="uscCode" path="uscCode" htmlEscape="false"  minlength="18" maxlength="18" class="form-control isUscCode required layui-input"/>
+						<%--<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workSupplier.uscCode}"/>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">公司地址:</label>
+					<div class="layui-input-block">
+						<form:input id="address" path="address" htmlEscape="false" maxlength="60" 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="zipCode" path="zipCode" htmlEscape="false" minlength="6" maxlength="6" 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">
+						<form:input id="deputy" path="deputy" htmlEscape="false" 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="fax" path="fax" htmlEscape="false" class="form-control  layui-input isTel"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">公司网站:</label>
+					<div class="layui-input-block">
+						<form:input id="website" path="website" htmlEscape="false" 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="registAddress" path="registAddress" htmlEscape="false" 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="registPhone" path="registPhone" htmlEscape="false" class="form-control  layui-input isTel"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">开户银行:</label>
+					<div class="layui-input-block">
+						<form:input id="bank" path="bank" htmlEscape="false" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">开户账号:</label>
+					<div class="layui-input-block">
+						<form:input id="bankNumber" path="bankNumber" minlength="16" maxlength="19" htmlEscape="false" class="form-control  layui-input number"/>
+					</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="instruction" htmlEscape="false" rows="4"    class="form-control "/>
+					</div>
+				</div>--%>
+			</div>
+			<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"><span class="require-item">*</span>联系人姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="linkName" path="linkName" htmlEscape="false" class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">QQ号码:</label>
+					<div class="layui-input-block">
+						<form:input id="qq" path="qq" 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">
+						<form:input id="linkPhone" path="linkPhone" htmlEscape="false" class="form-control  layui-input isTel"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">联系人手机:</label>
+					<div class="layui-input-block">
+						<form:input id="linkMobile" path="linkMobile" htmlEscape="false" class="form-control layui-input isPhone"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">电子邮箱:</label>
+					<div class="layui-input-block">
+						<form:input id="email" path="email" htmlEscape="false" class="form-control  layui-input email"/>
+					</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(workSupplier.removeSign, 'remove_sign','')}"/>
+					</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="255" class="form-control "/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workSupplier.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 class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 269 - 0
src/main/webapp/webpage/modules/worksupplier/workSupplierForms.jsp

@@ -0,0 +1,269 @@
+<%@ 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() {
+            jQuery.validator.addMethod("isUscCode", function(value, element) {
+                if (this.optional(element)){
+                    return true;
+                }
+                var uscCode = /^((\w{15})|(\w{18})|(\w{20}))$/;
+                return uscCode.test(value);
+            }, "请填写正确的统一社会信用代码");
+            var ids = $("#id").val();
+			validateForm = $("#inputForm").validate({
+                rules: {
+                    uscCode: {remote: "${ctx}/worksupplier/workSupplier/validateUscCode?ids="+ids},
+                },
+                messages: {
+                    uscCode:{remote: "该统一社会信用代码已经被使用!", required: "统一社会信用代码不能为空."},
+                },
+				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);
+					}
+				}
+			});
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+		});
+        window.onload = function(){
+            var oInput = document.getElementById("uscCode");
+            //oInput.focus();
+        }
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "101";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workSupplier/"+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,0);}
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workSupplier" action="${ctx}/worksupplier/workSupplier/save" method="post" class="form-horizontal">
+			<form:hidden id="id" path="id"/>
+			<form:hidden path="removeSign"/>
+			<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"><span class="require-item">*</span>供应商名称:</label>
+					<div class="layui-input-block">
+						<form:input id="name" path="name" htmlEscape="false" class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7 companyType_uscCode">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>统一社会信用代码:</label>
+					<div class="layui-input-block">
+						<form:input id="uscCode" path="uscCode" htmlEscape="false"  minlength="18" maxlength="18" class="form-control isUscCode required layui-input"/>
+						<%--<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workSupplier.uscCode}"/>--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">公司地址:</label>
+					<div class="layui-input-block">
+						<form:input id="address" path="address" htmlEscape="false" maxlength="60" 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="zipCode" path="zipCode" htmlEscape="false" minlength="6" maxlength="6" 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">
+						<form:input id="deputy" path="deputy" htmlEscape="false" 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="fax" path="fax" htmlEscape="false" class="form-control  layui-input isTel"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">公司网站:</label>
+					<div class="layui-input-block">
+						<form:input id="website" path="website" htmlEscape="false" 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="registAddress" path="registAddress" htmlEscape="false" 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="registPhone" path="registPhone" htmlEscape="false" class="form-control  layui-input isTel"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">开户银行:</label>
+					<div class="layui-input-block">
+						<form:input id="bank" path="bank" htmlEscape="false" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">开户账号:</label>
+					<div class="layui-input-block">
+						<form:input id="bankNumber" path="bankNumber" htmlEscape="false" minlength="16" maxlength="19" class="form-control  layui-input number"/>
+					</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="instruction" htmlEscape="false" rows="4"    class="form-control "/>
+					</div>
+				</div>--%>
+			</div>
+			<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"><span class="require-item">*</span>联系人姓名:</label>
+					<div class="layui-input-block">
+						<form:input id="linkName" path="linkName" htmlEscape="false" class="form-control required layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">QQ号码:</label>
+					<div class="layui-input-block">
+						<form:input id="qq" path="qq" 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">
+						<form:input id="linkPhone" path="linkPhone" htmlEscape="false" class="form-control  layui-input isTel"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">联系人手机:</label>
+					<div class="layui-input-block">
+						<form:input id="linkMobile" path="linkMobile" htmlEscape="false" class="form-control layui-input isPhone"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">电子邮箱:</label>
+					<div class="layui-input-block">
+						<form:input id="email" path="email" htmlEscape="false" class="form-control  layui-input email"/>
+					</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(workSupplier.removeSign, 'remove_sign','')}"/>
+					</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="255" class="form-control "/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workSupplier.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 class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 252 - 0
src/main/webapp/webpage/modules/worksupplier/workSupplierList.jsp

@@ -0,0 +1,252 @@
+<%@ 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: '#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'
+            });
+            //搜索框收放
+            $('#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 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
+                    }
+                },
+                btn3: 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="workSupplier" action="${ctx}/worksupplier/workSupplier/" 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  path="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">
+								<form:input path="linkName" 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" 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="${workSupplier.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="${workSupplier.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="removeSign" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('remove_sign')}" 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">
+								<form:input  path="uscCode" 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">
+								<form:input  path="deputy" htmlEscape="false" 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--%>
+					<%--<table:addRow url="${ctx}/worksupplier/workSupplier/form" title="供应商管理"></table:addRow><!-- 增加按钮 -->--%>
+						<button class="nav-btn nav-btn-add" title="供应商管理" onclick="openDialogre('供应商管理','${ctx}/worksupplier/workSupplier/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>
+					<table:exportExcel url="${ctx}/worksupplier/workSupplier/export"></table:exportExcel><!-- 导出按钮 -->
+					<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:'name',align:'center',title: '供应商名称',width:160,templet:function(d){
+                    var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看供应商信息', '${ctx}/worksupplier/workSupplier/form?id=" + d.id + "&tabId=1','95%','95%')\">" +
+                        "<span title=" + d.name + ">" + d.name + "</span></a>";
+                    return xml;
+                }}
+                ,{field:'uscCode',align:'center', title: '统一社会信用代码',width:160,templet:function(d){
+                    return "<span title='"+ d.uscCode +"'>" + d.uscCode + "</span>";
+                }}
+                ,{field:'address',align:'center', title: '公司地址',minWidth:100,templet:function(d){
+                    return "<span title='"+ d.address +"'>" + d.address + "</span>";
+                }}
+                ,{field:'deputy',align:'center', title: '法人代表',width:120,templet:function(d){
+                    return "<span title='"+ d.deputy +"'>" + d.deputy + "</span>";
+                }}
+                ,{field:'linkName', align:'center',title: '联系人姓名',width:120,templet:function(d){
+                    return "<span title='"+ d.linkName +"'>" + d.linkName + "</span>";
+                }}
+                ,{field:'linkMobile',align:'center', title: '联系人手机', width:150}
+                ,{field:'createDate',align:'center', sort:true,title: '创建日期', width:120}
+                ,{field:'removeSign',align:'center', title: '移除标记', width:65}
+                ,{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=\"openDialogre('修改供应商信息', '${ctx}/worksupplier/workSupplier/form?id=" + d.id + "&param=1','80%','80%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>修改</a>"
+
+                    if(d.candelete != undefined && d.candelete == "1")
+                        xml +="<a href=\"${ctx}/worksupplier/workSupplier/remove?id=" + d.id + "\" onclick=\"return confirmx('确认要移除该供应商信息吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 移除</a>"
+
+                    if(d.canlive != undefined && d.canlive == "1")
+                        xml +="<a href=\"${ctx}/worksupplier/workSupplier/live?id=" + d.id + "\" onclick=\"return confirmx('确认要恢复该供应商信息吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"glyphicon glyphicon-share-alt\"></i> 恢复</a>";
+                    return xml;
+                }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workSupplier" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workSupplier.id}"
+                    ,"name":"${workSupplier.name}"
+                    ,"uscCode":"${workSupplier.uscCode}"
+                    ,"address":"${workSupplier.address}"
+                    ,"deputy":"${workSupplier.deputy}"
+                    ,"linkName":"${workSupplier.linkName}"
+                    ,"linkMobile":"${workSupplier.linkMobile}"
+                    ,"createDate":"<fmt:formatDate value="${workSupplier.createDate}" pattern="yyyy-MM-dd"/>"
+                    ,"removeSign":"${fns:getDictLabel(workSupplier.removeSign, 'remove_sign', '')}"
+                    <c:if test="${workSupplier.removeSign != 2 && fns:getUser().id == workSupplier.createBy.id}">
+                    <shiro:hasPermission name="worksupplier:workSupplier:edit">,"canedit":"1"</shiro:hasPermission>
+                    </c:if>
+                    <c:if test="${workSupplier.removeSign == 1 && fns:getUser().id == workSupplier.createBy.id}">
+                    <shiro:hasPermission name="worksupplier:workSupplier:edit">,"candelete":"1"</shiro:hasPermission>
+                    </c:if>
+                    <c:if test="${workSupplier.removeSign == 2 && fns:getUser().id == workSupplier.createBy.id}">
+                    <shiro:hasPermission name="worksupplier:workSupplier:edit">,"canlive":"1"</shiro:hasPermission>
+                    </c:if>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+        });
+    })
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 248 - 0
src/main/webapp/webpage/modules/worksupplier/workSupplierView.jsp

@@ -0,0 +1,248 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>供应商管理管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+              $("#inputForm").attr("action","${ctx}/worksupplier/workSupplier/save");
+			  $("#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);
+					}
+				}
+			});
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+		});
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "101";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workSupplier/"+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,0);}
+        }
+	</script>
+</head>
+<body>
+<div class="single-form view-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workSupplier" action="${ctx}/worksupplier/workSupplier/save" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="removeSign"/>
+			<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"><span class="require-item">*</span>供应商名称:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workSupplier.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7 companyType_uscCode">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>统一社会信用代码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workSupplier.uscCode}"/>
+					</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="${workSupplier.address}"/>
+					</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="${workSupplier.zipCode}"/>
+					</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="${workSupplier.deputy}"/>
+					</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="${workSupplier.fax}"/>
+					</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="${workSupplier.website}"/>
+					</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="${workSupplier.registAddress}"/>
+					</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="${workSupplier.registPhone}"/>
+					</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="${workSupplier.bank}"/>
+					</div>
+				</div>
+				<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="${workSupplier.bankNumber}"/>
+					</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="instruction" htmlEscape="false" rows="4"    class="form-control "/>
+					</div>
+				</div>--%>
+			</div>
+			<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"><span class="require-item">*</span>联系人姓名:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workSupplier.linkName}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">QQ号码:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"   readonly="true" class="form-control layui-input" value="${workSupplier.qq}"/>
+					</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="${workSupplier.linkPhone}"/>
+					</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="${workSupplier.linkMobile}"/>
+					</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="${workSupplier.email}"/>
+					</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(workSupplier.removeSign, 'remove_sign','')}"/>
+					</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 ">${workSupplier.remarks}</textarea>
+					</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>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workSupplier.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 class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 319 - 0
src/main/webapp/webpage/modules/workvisa/workFullManageFormDetail.jsp

@@ -0,0 +1,319 @@
+<%@ 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="hideScroll">
+		<form:form id="inputForm" modelAttribute="workFullManage" action="${ctx}/workvisamanage/workVisaManage/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-20 active" rowspan="3"><label class="pull-right">合同信息</label></td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>合同名称:</label></td>
+					<td class="width-25" colspan="3">
+						${workFullManage.workContractInfo.name}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">合同编号:</label></td>
+					<td class="width-25">
+						${workFullManage.contractId}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-20 active" rowspan="5"><label class="pull-right">项目信息</label></td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">项目编号:</label></td>
+					<td class="width-25">
+						${workFullManage.fullProjectNumber}
+					</td>
+					<td class="width-15 active"><label class="pull-right">项目来源:</label></td>
+					<td class="width-25">
+						${fns:getDictLabel(workFullManage.fullProjectSource, 'full_project_source', '')}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">项目名称:</label></td>
+					<td class="width-25">
+						${workFullManage.fullProjectName}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">行业分类:</label></td>
+					<td class="width-25">
+						${fns:getDictLabel(workFullManage.fullIndustryType, 'full_industry_type', '')}
+					</td>
+					<td class="width-15 active"><label class="pull-right">结构类型:</label></td>
+					<td class="width-25">
+						${fns:getDictLabel(workFullManage.fullStructureType, 'full_structure_type', '')}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">投资额(元):</label></td>
+					<td class="width-25">
+						${workFullManage.fullInvestMoney}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-20 active" rowspan="5"><label class="pull-right">客户信息</label></td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">业主单位:</label></td>
+					<td class="width-25" colspan="3">
+						<input type="hidden" id="clientId" name="clientId" value="${workFullManage.workClientInfo.id}"/>
+						${workFullManage.workClientInfo.name}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">客户信用等级:</label></td>
+					<td class="width-25">
+						${workFullManage.workClientInfo.creditRank}
+					</td>
+					<td class="width-15 active"><label class="pull-right">业主联系人:</label></td>
+					<td class="width-25">
+						${workFullManage.workClientInfo.workClientLinkmanList[0].name}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">职务:</label></td>
+					<td class="width-25">
+						${workFullManage.workClientInfo.workClientLinkmanList[0].position}
+					</td>
+					<td class="width-15 active"><label class="pull-right">联系方式:</label></td>
+					<td class="width-25">
+						${workFullManage.workClientInfo.workClientLinkmanList[0].linkPhone}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">QQ:</label></td>
+					<td class="width-25">
+						${workFullManage.workClientInfo.workClientLinkmanList[0].qq}
+					</td>
+					<td class="width-15 active"><label class="pull-right">Email:</label></td>
+					<td class="width-25">
+						${workFullManage.workClientInfo.workClientLinkmanList[0].email}
+					</td>
+				</tr>
+
+				<tr>
+					<td class="width-20 active" rowspan="5"><label class="pull-right">建设方信息</label></td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">业主单位:</label></td>
+					<td class="width-25" colspan="3">
+						${workFullManage.workBuildInfo.name}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">客户信用等级:</label></td>
+					<td class="width-25">
+						${workFullManage.workBuildInfo.creditRank}
+					</td>
+					<td class="width-15 active"><label class="pull-right">业主联系人:</label></td>
+					<td class="width-25">
+						${workFullManage.workBuildInfo.workClientLinkmanList[0].name}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">职务:</label></td>
+					<td class="width-25">
+						${workFullManage.workBuildInfo.workClientLinkmanList[0].position}
+					</td>
+					<td class="width-15 active"><label class="pull-right">联系方式:</label></td>
+					<td class="width-25">
+						${workFullManage.workBuildInfo.workClientLinkmanList[0].linkPhone}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">QQ:</label></td>
+					<td class="width-25">
+						${workFullManage.workBuildInfo.workClientLinkmanList[0].qq}
+					</td>
+					<td class="width-15 active"><label class="pull-right">Email:</label></td>
+					<td class="width-25">
+						${workFullManage.workBuildInfo.workClientLinkmanList[0].email}
+					</td>
+				</tr>
+
+				<tr>
+					<td class="width-20 active"><label class="pull-right">施工单位</label></td>
+					<td colspan="4">
+						<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+							<thead>
+							<th>施工单位</th>
+							<th>施工方联系人</th>
+							<th>联系方式</th>
+							</thead>
+							<tbody id="constructId">
+								<tr>
+									<td><a href="javascript:void(0)" onclick="openDialogView('查看','${ctx}/workfullmanage/workFullConstruct/form?id=${workFullManage.constructId.id}&tabId=1','80%','80%')">${workFullManage.constructId.unitName}</a></td>
+									<td>${workFullManage.constructId.unitLinkMan}</td>
+									<td>${workFullManage.constructId.linkPhone}</td>
+								</tr>
+							</tbody>
+						</table>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-20 active"><label class="pull-right">监理单位</label></td>
+					<td colspan="4">
+						<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+							<thead>
+								<th>监理单位</th>
+								<th>监理方联系人</th>
+								<th>监理方式</th>
+							</thead>
+							<tbody id="surveyId">
+								<tr>
+									<td><a href="javascript:void(0)" onclick="openDialogView('查看','${ctx}/workfullmanage/workFullSurvey/form?id=${workFullManage.surveyId.id}&tabId=1','80%','80%')">${workFullManage.surveyId.unitName}</a></td>
+									<td>${workFullManage.surveyId.unitLinkMan}</td>
+									<td>${workFullManage.surveyId.linkPhone}</td>
+								</tr>
+							</tbody>
+						</table>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-20 active"><label class="pull-right">设计单位</label></td>
+					<td colspan="4">
+						<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+							<thead>
+								<th>设计单位</th>
+								<th>设计方联系人</th>
+								<th>设计方式</th>
+							</thead>
+							<tbody id="designId">
+								<tr>
+									<td><a href="javascript:void(0)" onclick="openDialogView('查看','${ctx}/workfullmanage/workFullDesign/form?id=${workFullManage.designId.id}&tabId=1','80%','80%')">${workFullManage.designId.unitName}</a></td>
+									<td>${workFullManage.designId.unitLinkMan}</td>
+									<td>${workFullManage.designId.linkPhone}</td>
+								</tr>
+							</tbody>
+						</table>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-20 active" rowspan="5"><label class="pull-right">项目概况</label></td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">项目分类:</label></td>
+					<td class="width-25">
+							${fns:getDictLabel(workFullManage.fullProjectType, 'full_project_type', '')}
+					</td>
+					<td class="width-15 active"><label class="pull-right">工程所在地:</label></td>
+					<td class="width-25">
+						${workFullManage.fullProjectAddress}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">工程性质:</label></td>
+					<td class="width-25">
+						${fns:getDictLabel(workFullManage.fullProjectProperty, 'full_project_property', '')}
+					</td>
+
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">工程规模:</label></td>
+					<td class="width-25">
+						${workFullManage.fullProjectScale}
+					</td>
+					<td class="width-15 active"><label class="pull-right">计量单位:</label></td>
+					<td class="width-25">
+						${fns:getDictLabel(workFullManage.fullCountUnit, 'full_count_unit', '')}
+					</td>
+
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">项目特性:</label></td>
+					<td class="width-25" colspan="3">
+						${workFullManage.fullProjectFeature}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-20 active" rowspan="6"><label class="pull-right">洽谈记录</label></td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">洽谈开始时间:</label></td>
+					<td class="width-25">
+						<fmt:formatDate value="${workFullManage.talkStartTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">洽谈结束时间:</label></td>
+					<td class="width-25">
+						<fmt:formatDate value="${workFullManage.talkEndTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">咨询费用支付方式:</label></td>
+					<td class="width-25">
+						${fns:getDictLabel(workFullManage.askPayMode, 'ask_pay_mode', '')}
+					</td>
+
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">标准说明:</label></td>
+					<td class="width-25" colspan="3">
+						${workFullManage.standardExplain}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">固定价(元):</label></td>
+					<td class="width-25">
+						${workFullManage.fixedPrice}
+					</td>
+
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">业主要求:</label></td>
+					<td class="width-25" colspan="3">
+						${workFullManage.clientRequire}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-20 active" rowspan="2"><label class="pull-right">部门安排</label></td>
+					<td class="width-15 active"><label class="pull-right">主办公司及部门:</label></td>
+					<td class="width-25">
+						${workFullManage.hostCompany.name}
+					</td>
+					<td class="width-15 active"><label class="pull-right">协办公司及部门:</label></td>
+					<td class="width-25">
+						${workFullManage.followCompany.name}
+					</td>
+				</tr>
+				<tr>
+
+				</tr>
+				<tr>
+					<td class="width-20 active" rowspan="2"><label class="pull-right">人员安排</label></td>
+					<td class="width-15 active"><label class="pull-right">主办公司负责人:</label></td>
+					<td class="width-25">
+						${workFullManage.hostMasterName}
+					</td>
+					<td class="width-15 active"><label class="pull-right">协办公司负责人:</label></td>
+					<td class="width-25">
+						${workFullManage.followMasterName}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">主办公司项目成员:</label></td>
+					<td class="width-25">
+						${workFullManage.hostMemberName}
+					</td>
+					<td class="width-15 active"><label class="pull-right">协办公司项目成员:</label></td>
+					<td class="width-25">
+						${workFullManage.followMemberName}
+					</td>
+				</tr>
+
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js" integrity="sha384-FzT3vTVGXqf7wRfy8k4BiyzvbNfeYjK+frTVqZeNDFl8woCbF0CYG6g2fMEFFo/i" crossorigin="anonymous"></script>

+ 151 - 0
src/main/webapp/webpage/modules/workvisa/workVisaAudit.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(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);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+
+<body class="gray-bg">
+
+  <div class="wrapper wrapper-content">
+	<div class="ibox">
+	<div class="ibox-title">
+		<h5>工程签证 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>
+		<div class="ibox-content">
+		<form:form id="inputForm" modelAttribute="workVisa" action="${ctx}/workvisa/workVisa/saveAudit" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<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="${workVisa.act.status}" />
+			<fieldset>
+				<legend>${workInvoice.act.taskName}</legend>
+				<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+					<tr>
+						<td class="width-20 active" rowspan="7"><label class="pull-right">台账信息</label></td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">发起单位:</label></td>
+						<td class="width-25">
+								${workVisa.initiateClient}
+						</td>
+						<td class="width-15 active"><label class="pull-right">单位工程名称:</label></td>
+						<td class="width-25">
+								${workVisa.cprojectName}
+						</td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">施工标段:</label></td>
+						<td class="width-25">
+								${workVisa.constructionExample}
+						</td>
+						<td class="width-15 active"><label class="pull-right">签证单编号:</label></td>
+						<td class="width-25">
+								${workVisa.visaNumber}
+						</td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">签证范围:</label></td>
+						<td class="width-25">
+								${workVisa.visaArea}
+						</td>
+						<td class="width-15 active"><label class="pull-right">主题内容:</label></td>
+						<td class="width-25">
+								${workVisa.theme}
+						</td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">签证单主要内容:</label></td>
+						<td class="width-25" colspan="3">
+								${workVisa.visaContent}
+						</td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">审价批复意见:</label></td>
+						<td class="width-25" colspan="3">
+								${workVisa.replySuggest}
+						</td>
+							<%--<td class="width-15 active"><label class="pull-right">全过程管理项目:</label></td>--%>
+							<%--<td class="width-35">--%>
+							<%--<sys:gridselect url="${ctx}/workvisa/workVisa/selectfullManage" id="fullManage" name="fullManage.id"  value="${workVisa.fullManage.id}"  title="选择全过程管理项目" labelName="fullManage.id" --%>
+							<%--labelValue="${workVisa.fullManage.id}" cssClass="form-control required" fieldLabels="全过程项目表" fieldKeys="WorkFullManage" searchLabel="id" searchKey="id" ></sys:gridselect>--%>
+							<%--</td>--%>
+					</tr>
+					<%--<tr>
+						<td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+						<td class="width-25" colspan="3">
+								${workVisa.remarks}
+						</td>
+					</tr>--%>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">审批意见:</label></td>
+						<td colspan="5">
+							<form:textarea path="act.comment" class="form-control " rows="5" maxlength="127"/>
+						</td>
+					</tr>
+				</table>
+			</fieldset>
+			<act:flowChart procInsId="${workVisa.act.procInsId}"/>
+			<act:histoicFlow procInsId="${workVisa.act.procInsId}"/>
+	</form:form>
+	</div>
+	</div>
+	</div>
+</body>
+</html>

+ 283 - 0
src/main/webapp/webpage/modules/workvisa/workVisaForm.jsp

@@ -0,0 +1,283 @@
+<%@ 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}/workvisa/workVisa/store");
+              }else if (obj == 3){
+                  $("#inputForm").attr("action","${ctx}/workvisa/workVisa/save");
+              }else if (obj == 4){
+                  $("#inputForm").attr("action","${ctx}/workvisa/workVisa/store");
+              }else{
+                  $("#inputForm").attr("action","${ctx}/workvisa/workVisa/save");
+              }
+              $("#inputForm").submit();
+              return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+			
+		});
+
+        $(function () {
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            })
+        })
+        /*function insertTitle(tValue){
+            $("#attachment_title_div").remove();
+            var t1 = tValue.lastIndexOf("\\");
+            if(t1 >= 0 && t1 < tValue.length){
+                $("#attachment_title").text(tValue.substring(t1+1));
+                $("#attachment_title").after("<div id='attachment_title_div' style='float: right'>&nbsp;&nbsp;<span id='attachment_delete' onclick='attachment_del()'style='color: red ; cursor: pointer;'>x</span></div>");
+            }
+        }*/
+        function attachment_del() {
+            $("#attachment_file").val("");
+            $("#attachment_title").text("");
+            $("#attachment_delete").remove();
+            $("#attachment_title_div").remove();
+        }
+        function insertTitle(tValue){
+            var list = "${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 = $("#id").val();
+            var attachmentFlag = "37";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workVisa/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+	</script>
+</head>
+<body class="hideScroll">
+		<form:form id="inputForm" modelAttribute="workVisa" method="post" enctype="multipart/form-data" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="fullManage.id" value="${workFullManage.id}"/>
+		<sys:message content="${message}"/>
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+			   <tr>
+				   <td class="width-20 active" rowspan="6"><label class="pull-right">台账信息</label></td>
+			   </tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>发起单位:</label></td>
+					<td class="width-25">
+						<form:input path="initiateClient" htmlEscape="false"    class="form-control required"/>
+					</td>
+					<td class="width-15 active"><label class="pull-right">单位工程名称:</label></td>
+					<td class="width-25">
+						<form:input path="cprojectName" htmlEscape="false"    class="form-control "/>
+					</td>
+				</tr>
+			   <tr>
+					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>施工标段:</label></td>
+					<td class="width-25">
+						<form:input path="constructionExample" htmlEscape="false"    class="form-control required"/>
+					</td>
+				   <td class="width-15 active"><label class="pull-right">签证单编号:</label></td>
+				   <td class="width-25">
+					   <form:input path="visaNumber" htmlEscape="false"   readonly="true" class="form-control required"/>
+				   </td>
+			   </tr>
+			   <tr>
+					<td class="width-15 active"><label class="pull-right">签证范围:</label></td>
+					<td class="width-25">
+						<form:input path="visaArea" htmlEscape="false"    class="form-control "/>
+					</td>
+				   <td class="width-15 active"><label class="pull-right"><font color="red">*</font>主题内容:</label></td>
+				   <td class="width-25">
+					   <form:input path="theme" htmlEscape="false"    class="form-control required"/>
+				   </td>
+			   </tr>
+			   <tr>
+					<td class="width-15 active"><label class="pull-right">签证单主要内容:</label></td>
+					<td class="width-25" colspan="3">
+						<form:textarea path="visaContent" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">审价批复意见:</label></td>
+					<td class="width-25" colspan="3">
+						<form:textarea path="replySuggest" htmlEscape="false" rows="4"    class="form-control "/>
+					</td>
+					<%--<td class="width-15 active"><label class="pull-right">全过程管理项目:</label></td>--%>
+					<%--<td class="width-35">--%>
+						<%--<sys:gridselect url="${ctx}/workvisa/workVisa/selectfullManage" id="fullManage" name="fullManage.id"  value="${workVisa.fullManage.id}"  title="选择全过程管理项目" labelName="fullManage.id" --%>
+						 <%--labelValue="${workVisa.fullManage.id}" cssClass="form-control required" fieldLabels="全过程项目表" fieldKeys="WorkFullManage" searchLabel="id" searchKey="id" ></sys:gridselect>--%>
+					<%--</td>--%>
+				</tr>
+			<%--   <tr>
+				   <td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+				   <td class="width-25" colspan="3">
+					   <form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
+				   </td>
+			   </tr>--%>
+			   <tr>
+				   <td class="width-20 active" rowspan="5"><label class="pull-right">项目信息</label></td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">项目编号:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.fullProjectNumber}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">项目来源:</label></td>
+				   <td class="width-25">
+						   ${fns:getDictLabel(workFullManage.fullProjectSource, 'full_project_source', '')}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">项目名称:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.fullProjectName}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">行业分类:</label></td>
+				   <td class="width-25">
+						   ${fns:getDictLabel(workFullManage.fullIndustryType, 'full_industry_type', '')}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">结构类型:</label></td>
+				   <td class="width-25">
+						   ${fns:getDictLabel(workFullManage.fullStructureType, 'full_structure_type', '')}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">投资额(元):</label></td>
+				   <td class="width-25">
+						   ${workFullManage.fullInvestMoney}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-20 active" rowspan="5"><label class="pull-right">客户信息</label></td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">业主单位:</label></td>
+				   <td class="width-25" colspan="3">
+					   <input type="hidden" id="clientId" name="clientId" value="${workFullManage.workClientInfo.id}"/>
+						   ${workFullManage.workClientInfo.name}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">客户信用等级:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.creditRank}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">业主联系人:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.workClientLinkmanList[0].name}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">职务:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.workClientLinkmanList[0].position}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">联系方式:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.workClientLinkmanList[0].linkPhone}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">QQ:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.workClientLinkmanList[0].qq}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">Email:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.workClientLinkmanList[0].email}
+				   </td>
+			   </tr>
+
+			   <tr>
+				   <td class="width-25" colspan="4">
+					   <div style="width: 580px; ">
+						   <div style="float:left;width: 80px; height: 100%; ">
+							   附件
+						   </div>
+						   <div style="float:left; height: 100%; width: 500px; ">
+							   <div style="display: inline-block">
+								   <div id="addFile_attachment" style="display: none">
+									   <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);"/>
+								   <a id="attachment_btn" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>
+								   <span id="attachment_title"></span>
+							   </div>
+
+							   <table id="listAttachment"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
+								   <thead>
+								   <tr>
+									   <%--<td>序号</td>--%><td>文件名</td><td>上传人</td><td>上传时间</td><td>操作</td>
+								   </tr>
+								   </thead>
+								   <tbody id="file_attachment">
+								   <c:forEach items="${workAttachments}" var="attachment" varStatus="index">
+									   <tr>
+										   <%--<td>${index.index + 1}</td>--%>
+										   <td>${attachment.attachmentName}</td>
+										   <td>${attachment.attachmentUser}</td>
+										   <td><fmt:formatDate value="${attachment.createDate}" pattern="yyyy-MM-dd"/></td>
+										   <td>
+											   <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${attachment.url}');" class="btn btn-success btn-xs">下载</a>
+
+											  <%-- <a href="${attachment.url}">下载</a>--%>
+											   <a href="${ctx}/workvisa/workVisa/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workVisa.id}">删除</a>
+										   </td>
+									   </tr>
+								   </c:forEach>
+								   </tbody>
+							   </table>
+
+						   </div>
+					   </div>
+				   </td>
+			   </tr>
+
+			   <%--<tr>--%>
+					<%--<td class="width-15 active"><label class="pull-right">项目状态:</label></td>--%>
+					<%--<td class="width-35">--%>
+						<%--<form:textarea path="status" htmlEscape="false" rows="4"    class="form-control "/>--%>
+					<%--</td>--%>
+					<%--<td class="width-15 active"></td>--%>
+		   			<%--<td class="width-35" ></td>--%>
+		  		<%--</tr>--%>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>

+ 127 - 0
src/main/webapp/webpage/modules/workvisa/workVisaHistoricList.jsp

@@ -0,0 +1,127 @@
+<%@ 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}/workvisamanage/workVisaManage/list">工程签证</a></li>
+					<li><a href="${ctx}/workvisa/workVisa/workVisaTodoList">待办任务</a></li>
+					<li class="active"><a href="${ctx}/workvisa/workVisa/workVisaHistoricList">已办任务</a></li>
+					<%--<li><a href="${ctx}/workprequalification/workPrequalification/form">申请资格预审项目</a></li>--%>
+				</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}/workvisa/workVisa/workVisaHistoricList" 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;width: 10%">流程发起人</th>
+					<th style="text-align: center;width: 10%">当前环节</th>
+					<th style="text-align: center;width: 8%">流程名称</th>
+					<th style="text-align: center;width: 8%">流程版本</th>
+					<th style="text-align: center;width: 20%">发起单位</th>
+					<th style="text-align: center;width: 10%">施工标段</th>
+					<th style="text-align: center;width: 20%">主题内容</th>
+					<th style="text-align: center;width: 13%">创建时间</th>
+				<%--<th>备注信息</th>--%>
+				</tr>
+				</thead>
+				<tbody>
+				<c:forEach items="${list}" var="workVisa">
+					<c:set var="task" value="${workVisa.act.task}" />
+					<c:set var="vars" value="${workVisa.act.vars}" />
+					<c:set var="procDef" value="${workVisa.act.procDef}" />
+					<c:set var="status" value="${workVisa.act.status}" />
+					<tr>
+						<td>${workVisa.act.vars.map.applyUserId}</td>
+						<td>
+								<%--${task.name}--%>
+										${fns:getDictLabel(workVisa.status, 'workVisa_status','')}
+						</td>
+						<td>${procDef.name}</td>
+						<td><b title='流程版本号'>V: ${procDef.version}</b></td>
+						<td>${workVisa.initiateClient}</td>
+						<td>${workVisa.constructionExample}</td>
+						<td>${workVisa.theme}</td>
+						<%--<td>${workVisa.remarks}</td>--%>
+						<td><fmt:formatDate value="${workVisa.createDate}" type="both"/></td>
+						<%--<td>
+							</td>--%>
+					</tr>
+				</c:forEach>
+				</tbody>
+			</table>
+			<!-- 分页代码 -->
+			<table:page page="${page}"></table:page>
+			<br/>
+			<br/>
+		</div>
+		<td>${act.vars.map.applyUserId}</td>
+	</div>
+</div>
+</body>
+</html>

+ 234 - 0
src/main/webapp/webpage/modules/workvisa/workVisaList.jsp

@@ -0,0 +1,234 @@
+<%@ 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"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+		});
+        function openDialogreToo(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(3) ){
+                        //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(4) ){
+                        //top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+	<%--<div class="ibox-title">
+		<h5>工程签证列表 </h5>
+		<div class="ibox-tools">
+			<a class="collapse-link">
+				<i class="fa fa-chevron-up"></i>
+			</a>
+			<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
+				<i class="fa fa-wrench"></i>
+			</a>
+			<ul class="dropdown-menu dropdown-user">
+				<li><a href="javascript:void(0)">选项1</a>
+				</li>
+				<li><a href="javascript:void(0)">选项2</a>
+				</li>
+			</ul>
+			<a class="close-link">
+				<i class="fa fa-times"></i>
+			</a>
+		</div>
+	</div>--%>
+    
+    <div class="ibox-content">
+	<sys:message content="${message}"/>
+	
+	<!--查询条件-->
+	<div class="row">
+	<div class="col-sm-12">
+	<form:form id="searchForm" modelAttribute="workVisa" action="${ctx}/workvisa/workVisa/" method="post" class="form-inline">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+		<%--<div class="form-group">--%>
+			<%--<span>项目状态:</span>--%>
+				<%--<form:input path="status" htmlEscape="false" maxlength="64"  class=" form-control input-sm"/>--%>
+		 <%--</div> 		--%>
+	</form:form>
+	<br/>
+	</div>
+	</div>
+	
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+			<shiro:hasPermission name="workvisa:workVisa:add">
+				<table:addRow url="${ctx}/workvisa/workVisa/form" title="工程签证"></table:addRow><!-- 增加按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workvisa:workVisa:edit">
+			    <table:editRow url="${ctx}/workvisa/workVisa/form" title="工程签证" id="contentTable"></table:editRow><!-- 编辑按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workvisa:workVisa:del">
+				<table:delRow url="${ctx}/workvisa/workVisa/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workvisa:workVisa:import">
+				<table:importExcel url="${ctx}/workvisa/workVisa/import"></table:importExcel><!-- 导入按钮 -->
+			</shiro:hasPermission>
+			<shiro:hasPermission name="workvisa:workVisa:export">
+	       		<table:exportExcel url="${ctx}/workvisa/workVisa/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 style="text-align: center;width: 14%"  class="">签证单编号</th>
+				<th style="text-align: center;width: 15%"  class="">发起单位</th>
+				<th style="text-align: center;width: 18%"  class="">单位工程名称</th>
+				<th style="text-align: center;width: 7%"  class="">施工标段</th>
+				<th style="text-align: center;width: 10%"  class="">签证范围</th>
+				<th style="text-align: center;width: 15%"  class="">主题内容</th>
+				<th style="text-align: center;width: 7%"  class="">签证状态</th>
+				<th style="text-align: center;width: 7%"  class="">流程追踪</th>
+				<th style="text-align: center;width: 7%">操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:choose>
+		<c:when test="${not empty page.list}">
+		<c:forEach items="${page.list}" var="workVisa">
+			<c:set var="Srole" scope="session" value="<%= UserUtils.getSelectRole().get(0).getName()%>"/>
+			<c:set var="Sid" scope="session" value="<%= UserUtils.getUser().getId()%>"/>
+			<tr>
+				<%--<td> <input type="checkbox" id="${workVisa.id}" class="i-checks"></td>--%>
+				<td><a  href="javascript:void(0)" onclick="openDialogView('查看工程签证', '${ctx}/workvisa/workVisa/form?id=${workVisa.id}&wf=${workVisa.fullManage.id}&name=view','80%','80%')">
+					${workVisa.visaNumber}
+				</a></td>
+				<td>
+					${workVisa.initiateClient}
+				</td>
+				<td>
+					${workVisa.cprojectName}
+				</td>
+				<td>
+					${workVisa.constructionExample}
+				</td>
+				<td>
+					${workVisa.visaArea}
+				</td>
+				<td>
+					${workVisa.theme}
+				</td>
+				<td>
+					${fns:getDictLabel(workVisa.status, 'workVisa_status', '')}
+				</td>
+				<td>
+					<div style="text-align: center">
+					<c:choose>
+						<c:when test="${workVisa.status eq '1'}">
+							<a href="${ctx}/workvisa/workVisa/startposs?id=${workVisa.id}" onclick="return confirmx('确认要发起签证吗?', this.href)"   class="btn btn-white btn-xs"> 启动流程</a>
+						</c:when>
+						<c:otherwise>
+							<a href="javascript:void(0)" onclick="openDialogView('流程追踪', '${ctx}/workvisa/workVisa/getProcess?id=${workVisa.id}','80%','80%')" class="btn btn-white btn-xs" > 流程追踪</a>
+						</c:otherwise>
+					</c:choose>
+					</div>
+				</td>
+				<%--<td>--%>
+					<%--${workVisa.fullManage.name}--%>
+				<%--</td>--%>
+				<td>
+					<div style="text-align: center">
+					<c:if test="${workVisa.status  == 3 and workVisa.processEnded}">
+						<a href="javascript:void(0)" onclick="openDialogreToo('重新申请工程签证', '${ctx}/workvisa/workVisa/form?id=${workVisa.id}&wf=${workVisa.fullManage.id}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+					</c:if>
+					<c:if test="${workVisa.status == 1 }">
+						<a href="javascript:void(0)" onclick="openDialog('修改工程签证', '${ctx}/workvisa/workVisa/form?id=${workVisa.id}&wf=${workVisa.fullManage.id}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>
+					</c:if>
+
+						<%--${Srole eq '部门负责人' || Sid eq workVisa.createBy}--%>
+					<c:if test="${fn:contains(fullManage.hostMaster, fns:getUser()) or fullManage.createBy.id == fns:getUser() or Sid eq workVisa.createBy or fullManage.updateBy.id == fns:getUser()}">
+						<a href="${ctx}/workvisa/workVisa/delete?id=${workVisa.id}" onclick="return confirmx('确认要删除该工程签证吗?', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
+					</c:if>
+					</div>
+				</td>
+			</tr>
+		</c:forEach>
+		</c:when>
+			<c:otherwise>
+				<tr>
+					<td colspan="15" align="center">
+						暂无数据
+					</td>
+				</tr>
+			</c:otherwise>
+		</c:choose>
+		</tbody>
+	</table>
+	
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 238 - 0
src/main/webapp/webpage/modules/workvisa/workVisaManageList.jsp

@@ -0,0 +1,238 @@
+<%@ 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">
+        $(function(){
+            $("#treeTable").treeTable({expandLevel : 2,column:1}).show();
+        });
+        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
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+	</script>
+</head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+	<div class="ibox">
+		<div class="ibox-title" style="height: 70px;">
+			<h5>
+				<ul class="nav nav-tabs">
+					<li class="active"><a href="${ctx}/workvisamanage/workVisaManage/list">工程签证</a></li>
+					<li><a href="${ctx}/workvisa/workVisa/workVisaTodoList">待办任务</a></li>
+					<li><a href="${ctx}/workvisa/workVisa/workVisaHistoricList">已办任务</a></li>
+					<%--<li><a href="${ctx}/workprequalification/workPrequalification/form">申请资格预审项目</a></li>--%>
+				</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="workFullManage" action="${ctx}/workvisamanage/workVisaManage/" 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">
+			<label>项目编号:</label>
+			<form:input path="fullProjectNumber" htmlEscape="false"    class="form-control required"/>
+			<label>项目名称:</label>
+			<form:input path="fullProjectName" htmlEscape="false"    class="form-control required"/>
+			<label>项目状态:</label>
+			<form:select path="fullProjectStatus" class="form-control required">
+				<form:option value="" label=""/>
+				<form:options items="${fns:getDictList('full_project_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+			</form:select>
+			<p></p>
+		 </div>
+	</form:form>
+	<br/>
+	</div>
+	</div>
+
+	<!-- 工具栏 -->
+	<div class="row">
+	<div class="col-sm-12">
+		<div class="pull-left">
+			<%--<shiro:hasPermission name="workfullmanage:workFullManage:add">--%>
+				<%--<table:addRow url="${ctx}/workfullmanage/workFullManage/form" title="项目登记"></table:addRow><!-- 增加按钮 -->--%>
+			<%--</shiro:hasPermission>--%>
+			<%--<shiro:hasPermission name="workfullmanage:workFullManage:edit">--%>
+			    <%--<table:editRow url="${ctx}/workfullmanage/workFullManage/form" title="项目登记" id="contentTable"></table:editRow><!-- 编辑按钮 -->--%>
+			<%--</shiro:hasPermission>--%>
+			<%--<shiro:hasPermission name="workfullmanage:workFullManage:del">--%>
+				<%--<table:delRow url="${ctx}/workfullmanage/workFullManage/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->--%>
+			<%--</shiro:hasPermission>--%>
+			<%--<shiro:hasPermission name="workfullmanage:workFullManage:import">--%>
+				<%--<table:importExcel url="${ctx}/workfullmanage/workFullManage/import"></table:importExcel><!-- 导入按钮 -->--%>
+			<%--</shiro:hasPermission>--%>
+			<%--<shiro:hasPermission name="workfullmanage:workFullManage:export">--%>
+	       		<%--<table:exportExcel url="${ctx}/workfullmanage/workFullManage/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="treeTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+		<thead>
+			<tr>
+				<%--<th  class="sort-column fullProjectNumber">项目编号</th>--%>
+				<%--<th  class="sort-column totalFullName">总项目名称</th>--%>
+				<th style="text-align: center;width: 20%"  class="sort-column fullProjectName">项目名称</th>
+				<th style="text-align: center;width: 20%"  class="sort-column ciName">客户单位</th>
+				<th style="text-align: center;width: 15%"  class="">项目负责人</th>
+				<th style="text-align: center;width: 13%"  class="sort-column createDate">创建日期</th>
+				<th style="text-align: center;width: 10%"  class="sort-column fullProjectStatus">项目状态</th>
+				<th style="text-align: center;width: 10%"  class="">工程签证单</th>
+				<th style="text-align: center;width: 10%"  class="">工程签证单列表</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:choose>
+		<c:when test="${not empty page.list}">
+		<c:forEach items="${page.list}" var="workFullManage">
+			<tr  id="${workFullManage.id}" pId="${workFullManage.totalFullId ne '1'?workFullManage.totalFullId:'0'}">
+				<%--<td> <input type="checkbox" id="${workFullManage.id}" class="i-checks"></td>--%>
+				<%--<td>--%>
+					<%--<a  href="javascript:void(0)" onclick="openDialogView('查看项目登记', '${ctx}/workfullmanage/workFullManage/form?id=${workFullManage.totalFullId}&tabId=0','80%','80%')">--%>
+						<%--<span title="${workFullManage.totalFullName}">${fns:abbr(workFullManage.totalFullName,30)}</span>--%>
+					<%--</a>--%>
+				<%--</td>--%>
+				<%--<td>--%>
+						<%--${workFullManage.fullProjectNumber}--%>
+				<%--</td>--%>
+				<td>
+					<a  href="javascript:void(0)" onclick="openDialogView('查看项目登记', '${ctx}/workfullmanage/workFullManage/form?id=${workFullManage.id}&tabId=0','80%','80%')">
+						${workFullManage.fullProjectName}
+					</a>
+				</td>
+				<td>
+					${workFullManage.ciName}
+				</td>
+				<td>
+						${workFullManage.hostMasterName}
+				</td>
+				<td>
+					<fmt:formatDate value="${workFullManage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					${fns:getDictLabel(workFullManage.fullProjectStatus, 'full_project_status', '')}
+				</td>
+				<td>
+					<div style="text-align: center">
+					<%--<a href="javascript:void(0)" onclick="openDialogre('工程签证单','${ctx}/workfullmanage/workFullManage/form?id=${workFullManage.id}&tabId=1','80%','80%')" class="btn btn-info btn-sm">项目立项</a>--%>
+						<button class="btn btn-info btn-sm" title="工程签证单" onclick="openDialogre('工程签证单','${ctx}/workvisa/workVisa/form?wf=${workFullManage.id}','80%','80%')">&nbsp;工程签证单</button>
+					</div>
+				</td>
+				<td>
+					<div style="text-align: center">
+					<a  href="javascript:void(0)" style="text-align:center;" onclick="openDialogView('查看签证单列表', '${ctx}/workvisamanage/workVisaManage/workVisaList?wf=${workFullManage.id}','80%','80%')">
+							${workFullManage.workVisaCount}
+					</a>
+					</div>
+				</td>
+				<%--<td>--%>
+					<%--<a href="javascript:void(0)" onclick="openDialogView('项目准备','${ctx}/workfullmanage/workFullManage/form?id=${workFullManage.id}&tabId=2','80%','80%')" class="btn btn-info btn-sm">项目准备</a>--%>
+				<%--</td>--%>
+				<%--<td>--%>
+					<%--<shiro:hasPermission name="workfullmanage:workFullManage:edit">--%>
+    					<%--<a href="javascript:void(0)" onclick="openDialog('修改项目登记', '${ctx}/workfullmanage/workFullManage/form?id=${workFullManage.id}','80%','80%')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a>--%>
+    				<%--</shiro:hasPermission>--%>
+    				<%--<shiro:hasPermission name="workfullmanage:workFullManage:del">--%>
+						<%--<a href="${ctx}/workfullmanage/workFullManage/delete?id=${workFullManage.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>
+		</c:when>
+			<c:otherwise>
+				<tr>
+					<td colspan="15" align="center">
+						暂无数据
+					</td>
+				</tr>
+			</c:otherwise>
+		</c:choose>
+		</tbody>
+	</table>
+
+		<!-- 分页代码 -->
+	<table:page page="${page}"></table:page>
+	<br/>
+	<br/>
+	</div>
+	</div>
+</div>
+</body>
+</html>

+ 15 - 0
src/main/webapp/webpage/modules/workvisa/workVisaTask.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="wrapper wrapper-content">
+        <act:flowChart procInsId="${processInstanceId}"/>
+        <act:histoicFlow procInsId="${processInstanceId}"/>
+	</div>
+</body>
+</html>
+

+ 204 - 0
src/main/webapp/webpage/modules/workvisa/workVisaTodoList.jsp

@@ -0,0 +1,204 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>待审核工程签证管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        $(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 page(n,s){
+            location = '${ctx}/workvisa/workVisa/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}/workvisa/workVisa/workVisaTodoList/';
+                }else{
+                    top.$.jBox.tip('签收失败');
+                }
+            });
+        }
+
+        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
+                    }
+                    return false;
+                },
+                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}/workvisamanage/workVisaManage/list">工程签证</a></li>
+					<li class="active"><a href="${ctx}/workvisa/workVisa/workVisaTodoList">待办任务</a></li>
+					<li><a href="${ctx}/workvisa/workVisa/workVisaHistoricList">已办任务</a></li>
+					<%--<li><a href="${ctx}/workprequalification/workPrequalification/form">申请资格预审项目</a></li>--%>
+				</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}/workvisa/workVisa/workVisaTodoList" 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;width: 8%">流程发起人</th>
+					<th style="text-align: center;width: 10%">当前环节</th>
+					<th style="text-align: center;width: 8%">流程名称</th>
+					<th style="text-align: center;width: 8%">流程版本</th>
+					<th style="text-align: center;width: 10%">发起单位</th>
+					<th style="text-align: center;width: 8%">施工标段</th>
+					<th style="text-align: center;width: 15%">主题内容</th>
+					<th style="text-align: center;width: 13%">创建时间</th>
+					<th style="text-align: center;width: 7%">操作</th>
+					<%--<th>备注信息</th>--%>
+				</tr>
+				</thead>
+				<tbody>
+				<c:forEach items="${list}" var="workVisa">
+					<c:set var="task" value="${workVisa.act.task}" />
+					<c:set var="vars" value="${workVisa.act.vars}" />
+					<c:set var="procDef" value="${workVisa.act.procDef}" />
+					<c:set var="status" value="${workVisa.act.status}" />
+					<tr>
+						<td>${workVisa.act.vars.map.applyUserId}</td>
+						<td>
+							${task.name}
+						</td>
+						<td>${procDef.name}</td>
+						<td><b title='流程版本号'>V: ${procDef.version}</b></td>
+						<td>${workVisa.initiateClient}</td>
+						<td>${workVisa.constructionExample}</td>
+						<td>${workVisa.theme}</td>
+						<%--<td>${workVisa.remarks}</td>--%>
+						<td><fmt:formatDate value="${task.createTime}" type="both"/></td>
+						<td>
+							<div style="text-align: center">
+							<a href="javascript:void(0)" onclick="openDialogre('查看工程签证单', '${ctx}/workvisa/workVisa/applyOnWorkBidProject?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" > 任务办理</a>
+						<%--<c:if test="${empty task.assignee}">
+								<a href="javascript:claim('${task.id}');" class="btn btn-white btn-xs" >签收任务</a>
+							</c:if>
+							<c:if test="${not empty task.assignee}">
+								</c:if>--%>
+							</div>
+						</td>
+					</tr>
+				</c:forEach>
+				</tbody>
+			</table>
+			<!-- 分页代码 -->
+			<table:page page="${page}"></table:page>
+			<br/>
+			<br/>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 276 - 0
src/main/webapp/webpage/modules/workvisa/workVisaView.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"/>
+	<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="workVisa" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="fullManage.id" value="${workFullManage.id}"/>
+		<sys:message content="${message}"/>
+		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
+		   <tbody>
+			   <tr>
+				   <td class="width-20 active" rowspan="7"><label class="pull-right">台账信息</label></td>
+			   </tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">发起单位:</label></td>
+					<td class="width-25">
+						${workVisa.initiateClient}
+					</td>
+					<td class="width-15 active"><label class="pull-right">单位工程名称:</label></td>
+					<td class="width-25">
+							${workVisa.cprojectName}
+					</td>
+				</tr>
+			   <tr>
+					<td class="width-15 active"><label class="pull-right">施工标段:</label></td>
+					<td class="width-25">
+							${workVisa.constructionExample}
+					</td>
+				   <td class="width-15 active"><label class="pull-right">签证单编号:</label></td>
+				   <td class="width-25">
+						   ${workVisa.visaNumber}
+				   </td>
+			   </tr>
+			   <tr>
+					<td class="width-15 active"><label class="pull-right">签证范围:</label></td>
+					<td class="width-25">
+							${workVisa.visaArea}
+					</td>
+				   <td class="width-15 active"><label class="pull-right">主题内容:</label></td>
+				   <td class="width-25">
+						   ${workVisa.theme}
+				   </td>
+			   </tr>
+			   <tr>
+					<td class="width-15 active"><label class="pull-right">签证单主要内容:</label></td>
+					<td class="width-25" colspan="3">
+							${workVisa.visaContent}
+					</td>
+				</tr>
+				<tr>
+					<td class="width-15 active"><label class="pull-right">审价批复意见:</label></td>
+					<td class="width-25" colspan="3">
+							${workVisa.replySuggest}
+					</td>
+					<%--<td class="width-15 active"><label class="pull-right">全过程管理项目:</label></td>--%>
+					<%--<td class="width-35">--%>
+						<%--<sys:gridselect url="${ctx}/workvisa/workVisa/selectfullManage" id="fullManage" name="fullManage.id"  value="${workVisa.fullManage.id}"  title="选择全过程管理项目" labelName="fullManage.id" --%>
+						 <%--labelValue="${workVisa.fullManage.id}" cssClass="form-control required" fieldLabels="全过程项目表" fieldKeys="WorkFullManage" searchLabel="id" searchKey="id" ></sys:gridselect>--%>
+					<%--</td>--%>
+				</tr>
+			 <%--  <tr>
+				   <td class="width-15 active"><label class="pull-right">备注信息:</label></td>
+				   <td class="width-25" colspan="3">
+						   ${workVisa.remarks}
+				   </td>
+			   </tr>--%>
+				<tr>
+					<td class="width-25" colspan="4">
+						<div style="width: 580px; ">
+							<div style="float:left;width: 80px; height: 100%; ">
+								附件
+							</div>
+							<div style="float:left; height: 100%; width: 500px; ">
+								<%--<div style="display: inline-block">--%>
+									<%--<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>--%>
+									<%--<a id="attachment_btn" class="btn btn-info btn-xs" ><i class="fa fa-plus"></i> 添加附件</a>--%>
+									<%--<span id="attachment_title"></span>--%>
+								<%--</div>--%>
+								<%--<table id="listAttachment"  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:forEach items="${workAttachments}" var="attachment" varStatus="index">
+										<tr>
+											<td>${index.index + 1}</td>
+											<td>${attachment.attachmentName}</td>
+											<td>${attachment.attachmentUser}</td>
+											<td><fmt:formatDate value="${attachment.createDate}" pattern="yyyy-MM-dd"/></td>
+											<td>
+												<a href="${attachment.url}">下载</a>
+												&lt;%&ndash;<a href="${ctx}/workvisa/workVisa/deleteFileFromAliyun?attachmentId=${attachment.id}&id=${workVisa.id}">删除</a>&ndash;%&gt;
+											</td>
+										</tr>
+									</c:forEach>
+								</table>--%>
+
+									<table id="contentTable" class="table table-striped table-bordered table-condensed">
+										</tbody>
+										<tr>
+											<th class="hide"></th>
+											<th width="30%">文件名称</th>
+											<th width="30%">上传人</th>
+											<th width="30%">创建时间</th>
+											<th>操作</th>
+										</tr>
+										<c:choose>
+											<c:when test="${not empty workVisa.workAttachments}">
+												<c:forEach items="${workVisa.workAttachments}" var="workClientAttachment">
+													<tr>
+														<td class="hide"></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" 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}','80%','80%','1')">${workClientAttachment.attachmentName}</a></td>
+																	</c:when>
+																	<c:otherwise>
+																		<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','80%','80%')">${workClientAttachment.attachmentName}</a></td>
+																	</c:otherwise>
+																</c:choose>
+															</c:otherwise>
+														</c:choose>
+														<td>${workClientAttachment.createBy.name}</td>
+														<td><fmt:formatDate value="${workVisa.createDate}" pattern="yyyy年MM月dd日" type="date" dateStyle="full"/></td>
+														<td>
+															<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="btn btn-success btn-xs">下载</a>
+
+															<%--<a href="${workClientAttachment.url}">下载</a>--%>
+														</td>
+													</tr>
+												</c:forEach>
+											</c:when>
+											<c:otherwise>
+												<tr>
+													<td colspan="5" align="center">暂无数据</td>
+												</tr>
+											</c:otherwise>
+										</c:choose>
+
+										</tbody>
+										<tbody id="workContractAnnexList">
+										</tbody>
+									</table>
+							</div>
+						</div>
+					</td>
+				</tr>
+			   <tr>
+				   <td class="width-20 active" rowspan="5"><label class="pull-right">项目信息</label></td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">项目编号:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.fullProjectNumber}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">项目来源:</label></td>
+				   <td class="width-25">
+						   ${fns:getDictLabel(workFullManage.fullProjectSource, 'full_project_source', '')}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">项目名称:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.fullProjectName}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">行业分类:</label></td>
+				   <td class="width-25">
+						   ${fns:getDictLabel(workFullManage.fullIndustryType, 'full_industry_type', '')}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">结构类型:</label></td>
+				   <td class="width-25">
+						   ${fns:getDictLabel(workFullManage.fullStructureType, 'full_structure_type', '')}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">投资额(元):</label></td>
+				   <td class="width-25">
+						   ${workFullManage.fullInvestMoney}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-20 active" rowspan="5"><label class="pull-right">客户信息</label></td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">业主单位:</label></td>
+				   <td class="width-25" colspan="3">
+					   <input type="hidden" id="clientId" name="clientId" value="${workFullManage.workClientInfo.id}"/>
+						   ${workFullManage.workClientInfo.name}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">客户信用等级:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.creditRank}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">业主联系人:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.workClientLinkmanList[0].name}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">职务:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.workClientLinkmanList[0].position}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">联系方式:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.workClientLinkmanList[0].linkPhone}
+				   </td>
+			   </tr>
+			   <tr>
+				   <td class="width-15 active"><label class="pull-right">QQ:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.workClientLinkmanList[0].qq}
+				   </td>
+				   <td class="width-15 active"><label class="pull-right">Email:</label></td>
+				   <td class="width-25">
+						   ${workFullManage.workClientInfo.workClientLinkmanList[0].email}
+				   </td>
+			   </tr>
+
+			   <%--<tr>--%>
+					<%--<td class="width-15 active"><label class="pull-right">项目状态:</label></td>--%>
+					<%--<td class="width-35">--%>
+						<%--<form:textarea path="status" htmlEscape="false" rows="4"    class="form-control "/>--%>
+					<%--</td>--%>
+					<%--<td class="width-15 active"></td>--%>
+		   			<%--<td class="width-35" ></td>--%>
+		  		<%--</tr>--%>
+		 	</tbody>
+		</table>
+	</form:form>
+</body>
+</html>