<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>电站详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="decorator" content="base"/>
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/static/css/reset.css"/>
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/dist/viewer.css" media="all">
    <style>
        html {
            background-color: #fff;
            padding-bottom: 50px;
        }

        .page-iframe {
            border: none;
        }
        .pd-10{
            padding: 10px;
        }

        .layui-tab-title{
            margin: 0 0 0 20px;
        }
        .layui-tab-content{
            margin: 0 0 0 20px;
        }

        input[disabled]{
            color: white !important;
            background-color: rgb(188, 188, 188) !important;
        }
        .layui-form-item .layui-input-inline {
            float: left;
            width: 300px;
            margin-right: 10px;
        }

        html, body, iframe {
            /* 在style中设置iframe的高度,不用在标签里面设置 */
            height: 90vh;
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<script>
</script>
<body>
<div class="layui-fluid">
    <div class="order-win layui-form" id="LAY_app">
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
            <ul class="layui-tab-title">
                <c:forEach items="${examine}" var="examine" varStatus="vs">
                    <li class=" <c:if test="${examine.columns.id eq id}">layui-this</c:if>">审核${vs.index+1}</li>
                </c:forEach>
            </ul>
            <c:forEach items="${examine}" var="examine" varStatus="vsr">
                <div class="layui-tab-content <c:if test="${examine.columns.id ne id}">layui-hide</c:if>">
                    <c:choose>
                        <%--设计审核--%>
                        <c:when test="${examine.columns.formKey eq '91'}">
                            <iframe class="page-iframe" width="100%" height="90%" src="${ctx}/customerEntry/toExamineForm?type=2&entryId=${examine.columns.application_id}"></iframe>
                        </c:when>
                        <%--档案审核--%>
                        <c:when test="${examine.columns.formKey eq '92'}">
                            <iframe class="page-iframe" width="100%" height="90%" src="${ctx}/customer/org/files/toFileReviewForm?entryId=${examine.columns.application_id}"></iframe>
                        </c:when>
                        <%--安装验收--%>
                        <c:when test="${examine.columns.formKey eq '93'}">
                            <iframe class="page-iframe" width="100%" height="90%" src="${ctx}/customerEntry/toCheckAccept?id=${examine.columns.application_id}"></iframe>
                        </c:when>
                        <%--并网验收--%>
                        <c:when test="${examine.columns.formKey eq '94'}">
                            <iframe class="page-iframe" width="100%" height="90%" src="${ctx}/customerEntry/toMergeAccept?opt=TwoMergeAccept&id=${examine.columns.application_id}"></iframe>
                        </c:when>
                        <%--勘测信息变更--%>
                        <c:when test="${examine.columns.formKey eq '95'}">
                            <iframe class="page-iframe" width="100%" height="90%" src="${ctx}/customer/entry/change/survey/surveyAudit/${examine.columns.process_instance_id}"></iframe>
                        </c:when>
                        <%--完工信息变更--%>
                        <c:when test="${examine.columns.formKey eq '96'}">
                            <iframe class="page-iframe" width="100%" height="90%" src="${ctx}/completion/change/audit/${examine.columns.process_instance_id}"></iframe>
                        </c:when>
                        <%--设计信息变更--%>
                        <c:when test="${examine.columns.formKey eq '97'}">
                            <iframe class="page-iframe" width="100%" height="90%" src="${ctx}/entryChanges/designInfo/toAuditPage/${examine.columns.process_instance_id}/${examine.columns.partner_id}"></iframe>
                        </c:when>
                        <%--客户信息变更--%>
                        <c:when test="${examine.columns.formKey eq '98'}">
                            <iframe class="page-iframe" width="100%" height="90%" src="${ctx}/entryChanges/customerInformationChange/toChangeAudit?id=${examine.columns.process_instance_id}"></iframe>
                        </c:when>
                        <%--物料信息变更--%>
                        <c:when test="${examine.columns.formKey eq '99'}">
                            <iframe class="page-iframe" width="100%" height="90%" src="${ctx}/entryChanges/materialInformationChange/materialAudit/${examine.columns.process_instance_id}"></iframe>
                        </c:when>
                        <%--并网信息变更--%>
                        <c:when test="${examine.columns.formKey eq '100'}">
                            <iframe class="page-iframe" width="100%" height="90%" src="${ctx}/onGridInfo/change/audit/${examine.columns.process_instance_id}"></iframe>
                        </c:when>
                    </c:choose>
                </div>
            </c:forEach>
        </div>
    </div>
</div>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/dist/viewer.js"></script>
<script src="${ctxPlugin}/lib/base64.js"></script>
<script>
    //图片查看效果
    var viewer = new Viewer(document.getElementById('LAY_app'));
    layui.config({
        base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'element', 'tableExt', 'jquery', 'layer', 'laypage', 'laydate', 'form'], function () {
        //layui.use(['table','layer','laypage','laydate','form'], function(){
        $ = layui.$;
        tableExt = layui.tableExt;
        layer = layui.layer;
        laypage = layui.laypage;
        laydate = layui.laydate;
        form = layui.form;
        table = tableExt.getLayTable();
        var element = layui.element;

        // 禁用滚动条样式
        element.render('scrollbar', false);

        element.on('tab(docDemoTabBrief)', function (data) {
            console.log(data);
            $('.layui-tab-content').eq(data.index).removeClass('layui-hide').siblings('.layui-tab-content').addClass('layui-hide');
        });

        // 关闭弹框
        function cancel() {
            var index = parent.layer.getFrameIndex(window.name);//先得到当前iframe层的索引
            parent.layer.close(index); //再执行关闭
        }

    });
</script>