<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>项目立项</title>
	<meta name="decorator" content="default"/>
	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
	<style type="text/css">
		.table{
			margin-bottom: 0px;
		}
		.workfull>.form-horizontal{
			margin: 0;
			padding: 0;
		}
	</style>
	<script type="text/javascript">
        $(function(){
            var oneSize = $(".oneTab").size();
            for(var i = 0;i < oneSize;i++){
                var hei = $(".oneTab:eq("+i+")").parent().height();
                $(".oneTab:eq("+i+")").css("height",hei)
                    .css("vertical-align","middle")
                    .css("line-height",hei+"px")
            }
        })
        var validateForm;
        function doSubmit(){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
            if(validateForm.form()){
                var maId = "${workFullRecord.manageId}";
                var cuId = "${fns:getUser()}";
                if(maId != cuId){
                    parent.layer.msg("您不是档案管理员，无法操作",{icon:2});
                    return false;
				}
                $("#inputForm").submit();
                return true;
            }
            return false;
        }
        $(document).ready(function() {
            validateForm = $("#inputForm").validate({
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
	</script>
</head>
<body class="hideScroll">
<div class="row">
	<div class="col-sm-12 m-t-md m-l-sm">
		<div class="col-sm-2 gray-bg text-center oneTab">
			<label>项目信息</label>
		</div>
		<div class="col-sm-10" >
			<!-- 表格 -->
			<table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
				<tbody>
				<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">
						<fmt:formatDate value="${workFullManage.createDate}" pattern="yyyy-MM-dd HH:mm:ss" />
					</td>
					<%--<td>--%>
						<%--<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=7','80%','80%')" class="btn btn-info btn-xs">查看</a>--%>
					<%--</td>--%>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">项目名称：</label></td>
					<td class="width-25" colspan="3">
						${workFullManage.fullProjectName}
					</td>
					<%--<td>--%>
						<%--<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=8','80%','80%')" class="btn btn-info btn-xs">查看</a>--%>
					<%--</td>--%>
				</tr>
				<tr>
					<td colspan="4" style="background:white;">
						<table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
							<thead>
								<tr>
									<%--<th>序号</th>--%>
									<th>文件名称</th>
									<th>上传人</th>
									<th>上传时间</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${workFullManage.workClientAttachmentList}" varStatus="status" var="workClientAttachment">
									<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" 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="${workClientAttachment.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
										<td>
											<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${workClientAttachment.url}" class="btn btn-success btn-xs">下载</a>
										</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
					</td>
				</tr>
				</tbody>
			</table>
		</div>
	</div>
	<div class="col-sm-12 m-t-xs m-l-sm">
		<div class="col-sm-2 gray-bg text-center oneTab">
			<label>报告列表</label>
		</div>
		<div class="col-sm-10 " >
			<table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
				<thead>
					<tr>
						<th>序号</th>
						<th>报告名称</th>
						<th>编制人</th>
						<th>上传时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${list}" varStatus="status" var="workAttach">
						<tr>
							<td>${status.index + 1}</td>
							<td>${workAttach.attachmentName}</td>
							<td>${workAttach.createBy.name}</td>
							<td><fmt:formatDate value="${workAttach.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
							<td>
								<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${workAttach.url}" class="btn btn-info btn-xs">下载</a>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
	<div class="col-sm-12 m-t-xs m-l-sm">
		<div class="col-sm-2 gray-bg text-center oneTab">
			<label>归档资料</label>
		</div>
		<div class="col-sm-10 " >
			<label>项目竣工</label>
			<table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
				<thead>
					<tr>
						<th>序号</th>
						<th>文件类型</th>
						<th>附件表</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>1</td>
						<td>结算阶段初审</td>
						<td></td>
						<td>
							<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=58','80%','80%')" class="btn btn-info btn-xs">查看</a>
						</td>
					</tr>
					<tr>
						<td>2</td>
						<td>送审结算清单</td>
						<td></td>
						<td>
							<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=59','80%','80%')" class="btn btn-info btn-xs">查看</a>
						</td>
					</tr>
				</tbody>
			</table>
			<p></p>
			<label>工程咨询结果</label>
			<table class="table table-striped table-bordered table-hover table-condensed dataTables-example">
				<thead>
				<tr>
					<th>序号</th>
					<th>文件类型</th>
					<th>附件表</th>
					<th>操作</th>
				</tr>
				</thead>
				<tbody>
				<tr>
					<td>1</td>
					<td>专题会议纪要</td>
					<td></td>
					<td>
						<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=50','80%','80%')" class="btn btn-info btn-xs">查看</a>
					</td>
				</tr>
				<tr>
					<td>2</td>
					<td>审计方案</td>
					<td></td>
					<td>
						<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=51','80%','80%')" class="btn btn-info btn-xs">查看</a>
					</td>
				</tr>
				<tr>
					<td>3</td>
					<td>审计管理建议</td>
					<td></td>
					<td>
						<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=52','80%','80%')" class="btn btn-info btn-xs">查看</a>
					</td>
				</tr>
				<tr>
					<td>4</td>
					<td>审计周报</td>
					<td></td>
					<td>
						<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=53','80%','80%')" class="btn btn-info btn-xs">查看</a>
					</td>
				</tr>
				<tr>
					<td>5</td>
					<td>审计月报</td>
					<td></td>
					<td>
						<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=54','80%','80%')" class="btn btn-info btn-xs">查看</a>
					</td>
				</tr>
				<tr>
					<td>6</td>
					<td>审计汇总表</td>
					<td></td>
					<td>
						<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=55','80%','80%')" class="btn btn-info btn-xs">查看</a>
					</td>
				</tr>
				<tr>
					<td>7</td>
					<td>总结</td>
					<td></td>
					<td>
						<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=56','80%','80%')" class="btn btn-info btn-xs">查看</a>
					</td>
				</tr>
				<tr>
					<td>8</td>
					<td>其他</td>
					<td></td>
					<td>
						<a href="javascript:void(0)" onclick="openDialogView('附件信息','${ctx}/workfullmanage/workFullManage/queryInfoToFile?id=${workFullManage.id}&attachment=57','80%','80%')" class="btn btn-info btn-xs">查看</a>
					</td>
				</tr>
				</tbody>
			</table>
		</div>
	</div>
	<div class="col-sm-12 m-t-xs m-l-sm">
		<div class="col-sm-2 gray-bg text-center oneTab">
			<label>档案信息</label>
		</div>
		<div class="col-sm-10 workfull" >
			<form:form id="inputForm" modelAttribute="workFullRecord" action="${ctx}/workfullmanage/workFullRecord/save" method="post" class="form-horizontal">
				<form:hidden path="id"/>
				<sys:message content="${message}"/>
				<input type="hidden" id="status" value="${workFullManage.fullProjectStatus}">
				<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="recordName" htmlEscape="false"    class="form-control required" readonly="true" value="${workFullManage.fullProjectName}"/>
						</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="recordNumber" htmlEscape="false" readonly="true" value="${workFullManage.fullProjectNumber}"   class="form-control "/>
							<input type="hidden" name="workFullManage.id" value="${workFullManage.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="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="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="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="backRecordDept.id" value="${workFullRecord.backRecordDept.id}" labelName="backRecordDept.name" labelValue="${workFullRecord.backRecordDept.name}"
											title="部门" url="/sys/office/treeData?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="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" style="display: inline-block;">
								<%--<input id="startTime" name="startTime" type="text" maxlength="20" class="laydate-icon form-control layer-date "--%>
								<%--value="<fmt:formatDate value="${workFullRecord.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>--%>
								<%--<input id="endTime" name="endTime" type="text" maxlength="20" class="laydate-icon form-control layer-date "--%>
								<%--value="/>--%>
							<div class="col-sm-5" style="padding: 0;">
								<input class="form-control layer-date laydate-icon required" id="startTime" name="startTime" value="<fmt:formatDate value="${workFullRecord.endTime}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
							</div>
							<div class="col-sm-2 text-center" style="padding: 0;vertical-align: middle;line-height: 30px;">
								至
							</div>
							<div class="col-sm-5" style="padding: 0;">
								<input class="form-control layer-date laydate-icon required" id="endTime" name="endTime" value="<fmt:formatDate value="${workFullRecord.endTime}" pattern="yyyy-MM-dd"/>" onclick="laydate({istime: false, format: 'YYYY-MM-DD'})">
							</div>
						</td>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>保管期限：</label></td>
						<td class="width-25">
							<form:select path="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">
							<form:select path="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>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>全宗号：</label></td>
						<td class="width-25">
							<form:input path="fondsNumber" 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="listsNumber" 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="recordProNumber" 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="strongboxNumber" 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="microNumber" 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="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>
						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>凭证编号：</label></td>
						<td class="width-25">
							<div class="col-sm-5" style="padding: 0;">
								<form:input path="ekkoBstypOne" htmlEscape="false" class="form-control required"/>
							</div>
							<div class="col-sm-2 text-center" style="padding: 0;vertical-align: middle;line-height: 30px;">
								至
							</div>
							<div class="col-sm-5" style="padding: 0;">
								<form:input path="ekkoBstypTwo" htmlEscape="false"  class="form-control required"/>
							</div>
						</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="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="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="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="remarks" htmlEscape="false" rows="4"    class="form-control "/>
						</td>
					</tr>
					</tbody>
				</table>
			</form:form>
		</div>
	</div>
</div>
</body>
</html>