<%@ page import="com.lightinit.hsdataplatformresdir.dictionary.DicResourceCatelogType" %>
<%@ page import="com.lightinit.hsdataplatformresdir.dictionary.DicResourceState" %>
<%@ page import="com.lightinit.hsdataplatformresdir.dictionary.DicResourceAuditResult" %>
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
    String basePath = request.getContextPath();
%>
<jsp:include page="../../../common/admin/modal_content_pre.jsp"><jsp:param name="modal_title" value="编辑"/></jsp:include>
<form id="formAudit" action="<%=basePath%>/admin/data_register/audit.action" method="post" class="form-horizontal">
    <input type="hidden" name="id" value="${busiModel.id}" />
    <input type="hidden" name="auditResult" />
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">数据名称：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.resourceName}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">数据摘要：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.resourceSummary}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">数据项：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.dataItem}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">注册日期：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static"><fmt:formatDate value="${busiModel.registerDate}" pattern="yyyy-MM-dd"/></p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">所属单位：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.belongTo}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">目录分类：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.catelogType}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label text-right">基础分类</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.catelogBasic}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">部门分类</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.catelogSector}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">主题分类</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.catelogTheme}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">自定义分类</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.catelogCustom}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">数据标签：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.dataTag}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">共享类型：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.shareType}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">开放类型：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.openType}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">是否可交易：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static">${busiModel.allowDeal == 0 ? "否" : "是"}</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">数据文件：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static"></p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">示例文件：</label>
        <div class="col-md-7 col-sm-7">
            <p class="form-control-static"></p>
        </div>
    </div>
    <div class="form-group">
        <label for="auditOpinion" class="col-md-3 col-sm-3 control-label">审核意见：</label>
        <div class="col-md-7 col-sm-7">
            <textarea id="auditOpinion" name="auditOpinion" class="form-control" rows="3"></textarea>
            <span class="help-block"></span>
        </div>
    </div>
</form>
<jsp:include page="../../../common/admin/modal_content_post.jsp"></jsp:include>
<jsp:include page="../../../common/admin/modal_footer_pre.jsp"></jsp:include>
<button type="button" id="btnApprove" class="btn btn-success"><i class="fa fa-check"></i>审核通过</button>
<button type="button" id="btnReject" class="btn btn-danger"><i class="fa fa-exclamation"></i>审核不通过</button>
<jsp:include page="../../../common/admin/modal_footer_post.jsp"></jsp:include>
<script type="text/javascript">
    $("#btnApprove").click(function() {
        $("input[name=auditResult]").val("<%=DicResourceAuditResult.APPROVED%>");
        $('#formAudit').ajaxSubmitCloseRefresh();
    });

    $("#btnReject").click(function() {
        $("input[name=auditResult]").val("<%=DicResourceAuditResult.REJECTED%>");
        $('#formAudit').ajaxSubmitCloseRefresh();
    });

    $(".input-group.date").datetimepicker({
        format: "YYYY-MM-DD",
        locale: "zh-cn"
    });
</script>