<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>合同管理审批</title>
	<meta name="decorator" content="default"/>
	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
	<script type="text/javascript">
        var validateForm;
        function doSubmit(obj){
            // 回调函数，在编辑和保存动作时，供openDialog调用提交表单。
			if (validateForm.form()) {
				if (obj == 1) {
					$("#flag").val("yes");
				} else {
					$("#flag").val("no");
				}
				$("#inputForm").submit();
				return true;
			} else {
				parent.layer.msg("信息未填写完整!", {icon: 5});
			}
            return false;
        }
        $(document).ready(function() {
            validateForm = $("#inputForm").validate({
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
	</script>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
	<div class="ibox">
		<div class="ibox-tools">
			<a class="collapse-link">
				<i class="fa fa-chevron-up"></i>
			</a>
			<a class="close-link">
				<i class="fa fa-times"></i>
			</a>
		</div>
		<div class="ibox-title">
		</div>
		<div class="ibox-content">
			<sys:message content="${message}"/>
			<form:form id="inputForm" modelAttribute="workContractInfo" enctype="multipart/form-data" action="${ctx}/workcontractinfo/workContractInfo/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="${workContractInfo.act.status}" />
				<table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
					<tbody>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>案卷名称：</label></td>
						<td class="width-25" colspan="3">
							<form:input path="workFullRecord.recordName" htmlEscape="false"    class="form-control required" readonly="true" value="${workContractInfo.name}"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>案卷号：</label></td>
						<td class="width-35">
							<form:input path="workFullRecord.recordNumber" htmlEscape="false" readonly="true" value="${workContractInfo.contractNum}"   class="form-control "/>
							<input type="hidden" name="workFullManage.id" value="${workContractInfo.id}"   class="form-control "/>
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>归档号：</label></td>
						<td class="width-35">
							<form:input path="workFullRecord.backRecordNumber" htmlEscape="false"    class="form-control required"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>所属卷库：</label></td>
						<td class="width-25">
							<form:select path="workFullRecord.recordLibNumber" class="form-control required">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('record_lib_number')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>归档年代：</label></td>
						<td class="width-25">
							<form:input path="workFullRecord.backRecordYear" htmlEscape="false"    class="form-control required"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>所属部门：</label></td>
						<td class="width-25">
							<sys:treeselect id="backRecordDept" name="workFullRecord.backRecordDept.id" value="${workFullRecord.backRecordDept.id}" labelName="workFullRecord.backRecordDept.name" labelValue="${workFullRecord.backRecordDept.name}"
											title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control required" allowClear="true" notAllowSelectParent="true"/>
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>编制结构：</label></td>
						<td class="width-25">
							<form:input path="workFullRecord.compleOrganization" htmlEscape="false"    class="form-control required"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>开始日期：</label></td>
						<td class="width-25">
								<input class="form-control layer-date laydate-icon required" id="startTime" name="workFullRecord.startTime" value="<fmt:formatDate value="${workFullRecord.endTime}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>保管期限：</label></td>
						<td class="width-25">
							<form:select path="workFullRecord.retentionPeriod" class="form-control required">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('retention_period')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>结束日期：</label></td>
						<td class="width-25">
							<input class="form-control layer-date laydate-icon required" id="endTime" name="workFullRecord.endTime" value="<fmt:formatDate value="${workFullRecord.endTime}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>案卷密级：</label></td>
						<td class="width-25">
							<form:select path="workFullRecord.recordSecretLevel" class="form-control required">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('record_secret_level')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
						</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="workFullRecord.fondsNumber" htmlEscape="false"    class="form-control required"/>
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>目录号：</label></td>
						<td class="width-25">
							<form:input path="workFullRecord.listsNumber" htmlEscape="false"    class="form-control required"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>归档馆号：</label></td>
						<td class="width-25">
							<form:input path="workFullRecord.recordProNumber" htmlEscape="false"    class="form-control required"/>
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>保险箱号：</label></td>
						<td class="width-25">
							<form:input path="workFullRecord.strongboxNumber" htmlEscape="false"    class="form-control required"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>缩微号：</label></td>
						<td class="width-25">
							<form:input path="workFullRecord.microNumber" htmlEscape="false"    class="form-control required"/>
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>凭证类别：</label></td>
						<td class="width-25">
							<form:select path="workFullRecord.ekkoType" class="form-control required">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('ekko_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
						</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="workFullRecord.ekkoBstypOne" htmlEscape="false" class="form-control required"/>
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>凭证编号结束：</label></td>
						<td class="width-25">
							<form:input path="workFullRecord.ekkoBstypTwo" htmlEscape="false"  class="form-control required"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>报告号：</label></td>
						<td class="width-25">
							<form:input path="workFullRecord.reportNumber" htmlEscape="false"    class="form-control required"/>
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>页数：</label></td>
						<td class="width-25">
							<form:input path="workFullRecord.pageNumber" htmlEscape="false"    class="form-control required"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>案卷管理员：</label></td>
						<td class="width-25">
							<form:input path="workFullRecord.manageUser" id="manageUser" htmlEscape="false" readonly="true" class="form-control required"/>
							<input type="hidden" id="manageId" name="manageId" value="${workFullRecord.manageId}">
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">备注：</label></td>
						<td class="width-25" colspan="3">
							<form:textarea path="workFullRecord.remarks" 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="act.comment" htmlEscape="false" rows="4"  maxlength="127"  class="form-control"/>
						</td>
					</tr>
					</tbody>
				</table>
				<act:flowChart procInsId="${processInstanceId}"/>
				<act:histoicFlow procInsId="${processInstanceId}"/>
			</form:form>
		</div>
	</div>
</div>
</body>
</html>