<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <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" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" href="${ctxPlugin}/static/css/reset.css" media="all">
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/dist/viewer.css" media="all">
    <style>
        .layui-form-select dl{
            max-height:200px;
            width: 80%;
        }
        .w-130{width: 130px}
        .ml120 .layui-input-block{margin-left: 130px}
        .ml-130{margin-left:  130px}
        .border-grey{border: 1px solid #DDD; border-radius: 10px;}
        .table-input{width: 90%; border: none; text-align: center; height: 30px; line-height: 30px}
        .layui-elem-field legend{font-size: 16px}
        .img-80{display: flex; justify-content: center;}
        .img-80 .bj-img{margin-right: 0}
        tbody .layui-table-cell{
            padding: 0;
        }
        tbody .table-input{
            width: 90%;
        }
        .layui-table td{
            text-align: center;
        }
        .layui-table th{
            text-align: center;
        }
    </style>
</head>
<body>
<div class="layui-form" id="LAY_app">
    <div class="layui-card mt-10">

        <div class="layui-tab layui-tab-brief over pt-20 pb-40 h-350" lay-filter="docDemoTabBrief" id="detailSet">
          <%--  <ul class="layui-tab-title">
                <li class="layui-this">表单信息</li>
            </ul>--%>
            <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
            <blockquote class="layui-elem-quote">项目信息</blockquote>
            <div class="layui-row ml120 mt-20">
                <div class="layui-col-xs9">
                    <div class="layui-col-xs12 mb-15 pr-30">
                        <label class="layui-form-label w-130">代理商名称：</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" readonly class="layui-input layui-bg-gray" value="${trader.name}">
                        </div>
                    </div>
                    <div class="layui-col-xs12 mb-10 pr-30">
                        <div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">法定代表人：</label>
                            <div class="layui-input-block ">
                                <input type="text" name="contacts" readonly class="layui-input layui-bg-gray" value="${trader.contacts}">
                            </div>
                        </div>
                        <div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">联系电话：</label>
                            <div class="layui-input-block w-200" >
                                <input type="text" name="mobile" readonly class="layui-input layui-bg-gray" value="${trader.mobile}">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 mb-10 pr-30">
                        <div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">实控人：</label>
                            <div class="layui-input-block ">
                                <input type="text" name="actualContacts" readonly class="layui-input layui-bg-gray" value="${trader.actualContacts}">
                            </div>
                        </div>
                        <div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">联系电话：</label>
                            <div class="layui-input-block w-200" >
                                <input type="text" name="telephone" readonly class="layui-input layui-bg-gray" value="${trader.telephone}">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 mb-10 pr-30">
                        <div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">打款保证金：</label>
                            <div class="layui-input-block ">
                                <input type="text" name="bond" readonly class="layui-input layui-bg-gray" value="${trader.bond}">
                                <span class="pos-a h-32 lh-32 layui-span-unit">元</span>
                            </div>
                        </div>
                        <div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">实控人身份证号：</label>
                            <div class="layui-input-block w-200" >
                                <input type="text" name="actualIdCode" readonly class="layui-input layui-bg-gray" value="${trader.actualIdCode}">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 mb-10 pr-30">
                        <div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">开户银行：</label>
                            <div class="layui-input-block ">
                                <input type="text" name="bankName" readonly class="layui-input layui-bg-gray" value="${trader.bankName}">
                            </div>
                        </div>
                        <div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">银行账号：</label>
                            <div class="layui-input-block w-200" >
                                <input type="text" name="bankCode" readonly class="layui-input layui-bg-gray" value="${trader.bankCode}">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 mb-10 pr-30">
                        <div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">统一信用代码：</label>
                            <div class="layui-input-block w-200" >
                                <input type="text" name="taxNumber" readonly class="layui-input layui-bg-gray" value="${trader.taxNumber}">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 mt-10 pr-30">
                        <label class="layui-form-label w-130">代理商地址：</label>
                        <div class="layui-input-block ml-130">
                            <div class="layui-col-xs4 pr-20">
                                <input type="text" readonly class="layui-input layui-bg-gray" value="${trader.province}">
                            </div>
                            <div class="layui-col-xs4 pr-20">
                                <input type="text" readonly class="layui-input layui-bg-gray" value="${trader.city}">
                            </div>
                            <div class="layui-col-xs4">
                                <input type="text" readonly class="layui-input layui-bg-gray" value="${trader.area}">
                            </div>
                            <div class="layui-col-xs12 mt-20">
                                <input type="text" readonly class="layui-input layui-col-lg2 layui-bg-gray"
                                       value="${trader.address}">
                            </div>

                        </div>
                    </div>
                    <div class="layui-col-xs12 mt-20 pr-30">
                        <label class="layui-form-label w-130">收货地址：</label>
                        <div class="layui-input-block ml-130">
                            <div class="layui-col-xs4 pr-20">
                                <input type="text" readonly class="layui-input layui-bg-gray" value="${trader.takeDeliveryProvince}">
                            </div>
                            <div class="layui-col-xs4 pr-20">
                                <input type="text" readonly class="layui-input layui-bg-gray" value="${trader.takeDeliveryCity}">
                            </div>
                            <div class="layui-col-xs4">
                                <input type="text" readonly class="layui-input layui-bg-gray" value="${trader.takeDeliveryArea}">
                            </div>
                            <div class="layui-col-xs12 mt-20">
                                <input type="text" readonly class="layui-input layui-col-lg2 layui-bg-gray"
                                       value="${trader.takeDeliveryAddress}">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs12 mt-20 pr-30">
                        <label class="layui-form-label w-130">备注：</label>
                        <div class="layui-input-block ml-130">
                            <input type="text" name="remarks" readonly class="layui-input layui-bg-gray" value="${trader.remarks}">
                        </div>
                    </div>
                    <div class="layui-col-xs12 mb-20 pr-30" style="margin-top: 10px !important">
                        <%--<div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">外部编码：</label>
                            <div class="layui-input-block ">
                                <input type="text" name="qqCompanyCode" readonly class="layui-input layui-bg-gray" value="${trader.qqCompanyCode}">
                            </div>
                        </div>--%>
                        <div class="layui-inline layui-col-xs6">
                            <label class="layui-form-label w-130">项目编码：</label>
                            <div class="layui-input-block w-200" >
                                <input type="text" name="qqProjectCode" readonly class="layui-input layui-bg-gray" value="${trader.qqProjectCode}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs3">
                    <div class="layui-input-block" style="margin-left: 50px">
                        <div id="imgsDiv" class="img-80">
                            <div class="bj-img imgSpan">
                               <img src="${commonStaticImgPath}${trader.licenseImg}" height="700" width="1200"/>
                               <input type="hidden" class="imgPicker" value="${trader.licenseImg}"/> </div>
                        </div>
                        <div class="upload-container hide" id="uploader" style="margin: 0 auto;">
                            <img src="" alt="img placeholder" id="imgsAdd">
                        </div>
                         <div style="width: 100%; text-align: center; color: #144856">营业执照</div>
                    </div>
                    <%--<div class="layui-input-block" style="margin-left: 50px">
                        <div id="IdFrontimgsDiv" class="img-80">
                            <div class="bj-img imgSpan">
                                <img src="${commonStaticImgPath}${trader.idFrontImg}" height="700" width="1200"/>
                                <input type="hidden" class="imgPicker" value="${trader.idFrontImg}"/> </div>
                        </div>
                        <div class="upload-container hide" id="IdFrontimgsuploader" style="margin: 0 auto;">
                            <img src="" alt="img placeholder" id="IdFrontimgsAdd">
                        </div>
                        <div style="width: 100%; text-align: center; color: #144856">实控人身份证正面</div>
                    </div>
                    <div class="layui-input-block" style="margin-left: 50px">
                        <div id="idOppositeImgDiv" class="img-80">
                            <div class="bj-img imgSpan">
                                <img src="${commonStaticImgPath}${trader.idOppositeImg}" height="700" width="1200"/>
                                <input type="hidden" class="imgPicker" value="${trader.idOppositeImg}"/> </div>
                        </div>
                        <div class="upload-container hide" id="idOppositeImguploader" style="margin: 0 auto;">
                            <img src="" alt="img placeholder" id="idOppositeImgAdd">
                        </div>
                        <div style="width: 100%; text-align: center; color: #144856">实控人身份证反面</div>
                    </div>--%>
                    <div class="layui-input-block" style="margin-left: 50px">
                        <div id="qqjyglwtsImgDiv" class="img-80">
                            <c:if test="${not empty trader.qqjyglwtsImg}">
                                <div class="bj-img imgSpan">
                                    <img src="${commonStaticImgPath}${trader.qqjyglwtsImg}"
                                         data-img="${commonStaticImgPath}${trader.qqjyglwtsImg}" height="700" width="1200"/>
                                    <input type="hidden" class="imgPicker" value="${trader.qqjyglwtsImg}"/>
                                </div>
                            </c:if>
                        </div>
                        <div class="upload-container <c:if test="${not empty trader.qqjyglwtsImg}">hide</c:if>" id="qqjyglwtsImguploader" style="margin: 0 auto;">
                            <img src="" alt="img placeholder" id="qqjyglwtsImgAdd">
                        </div>
                        <div style="width: 100%; text-align: center; color: #144856">全权经营管理委托书</div>
                    </div>
                  <%--  <div class="layui-input-block" style="margin-left: 50px">
                        <div id="bzjdkpzImgDiv" class="img-80">
                            <div class="bj-img imgSpan">
                                <img src="${commonStaticImgPath}${trader.bzjdkpzImg}"
                                     data-img="${commonStaticImgPath}${trader.bzjdkpzImg}" height="700" width="1200"/>
                                <input type="hidden" class="imgPicker" value="${trader.bzjdkpzImg}"/> </div>
                        </div>
                        <div class="upload-container hide" id="bzjdkpzImguploader" style="margin: 0 auto;">
                            <img src="" alt="img placeholder" id="bzjdkpzImgAdd">
                        </div>
                        <div style="width: 100%; text-align: center; color: #144856"><i class="mark">*</i>保证金打款凭证</div>
                    </div>--%>
                    <div class="layui-input-block" style="margin-left: 50px">
                        <div id="sfzfmfyjImgDiv" class="img-80">
                            <div class="bj-img imgSpan">
                                <img src="${commonStaticImgPath}${trader.sfzfmfyjImg}"
                                     data-img="${commonStaticImgPath}${trader.sfzfmfyjImg}" height="700" width="1200"/>
                                <input type="hidden" class="imgPicker" value="${trader.sfzfmfyjImg}"/> </div>
                        </div>
                        <div class="upload-container hide" id="sfzfmfyjImguploader" style="margin: 0 auto;">
                            <img src="" alt="img placeholder" id="sfzfmfyjImgAdd">
                        </div>
                        <div style="width: 100%; text-align: center; color: #144856"><i class="mark">*</i>法定代表人身份证正反面<p>复印件(加盖公章)</p></div>
                    </div>
                    <div class="layui-input-block" style="margin-left: 50px">
                        <div id="sfzzmfyjImgDiv" class="img-80">
                            <div class="bj-img imgSpan">
                                <img src="${commonStaticImgPath}${trader.sfzzmfyjImg}"
                                     data-img="${commonStaticImgPath}${trader.sfzzmfyjImg}" height="700" width="1200"/>
                                <input type="hidden" class="imgPicker" value="${trader.sfzzmfyjImg}"/> </div>
                        </div>
                        <div class="upload-container hide" id="sfzzmfyjImguploader" style="margin: 0 auto;">
                            <img src="" alt="img placeholder" id="sfzzmfyjImgAdd">
                        </div>
                        <div style="width: 100%; text-align: center; color: #144856"><i class="mark">*</i>实控人身份证正反面<p>复印件(加盖公章)</p></div>
                    </div>

                    <div class="layui-input-block" style="margin-left: 50px">
                        <div id="dlszrsqbImgDiv" class="img-80">
                            <c:if test="${not empty  trader.dlszrsqbImg}">
                                <div class="bj-img imgSpan">
                                    <img src="${commonStaticImgPath}${trader.dlszrsqbImg}"
                                         data-img="${commonStaticImgPath}${trader.dlszrsqbImg}" height="700" width="1200"/>
                                    <input type="hidden" class="imgPicker" value="${trader.dlszrsqbImg}"/>
                                </div>
                            </c:if>
                        </div>
                        <div class="upload-container <c:if test="${not empty  trader.dlszrsqbImg}">hide</c:if> " id="dlszrsqbImguploader" style="margin: 0 auto;">
                            <img src="" alt="img placeholder" id="dlszrsqbImgAdd">
                        </div>
                        <div style="width: 100%; text-align: center; color: #144856">代理商准入申请表</div>
                    </div>
                </div>
            </div>
            <%--<div class="layui-col-xs12 mb-20 pr-30 mt-20" id="tb_table">
                <blockquote class="layui-elem-quote">项目信息</blockquote>
                <c:forEach items="${agents}" var="agent">
                <fieldset class="layui-elem-field border-grey layui-field-title entryList" style="margin-top: 20px;">
                    <legend>代理区域</legend>
                    <div class="layui-col-xs12 mb-10 mt-20 pr-30">
                        <label class="layui-form-label">代理区域：</label>
                            <div class="layui-input-block w-200" >
                                <input type="text"  autocomplete="off" class="layui-input layui-bg-gray" readonly value="${agent.columns.agent_province}${agent.columns.agent_city}${agent.columns.agent_area}">
                            </div>
                    </div>
                    <div class="layui-col-xs12 mb-10 pr-30">
                        <label class="layui-form-label">年度任务：</label>
                        <div class="layui-input-block">
                            <table lay-filter="parse-table-demo">
                                <thead>
                                <tr>
                                    <th lay-data="{field:'username', width:130}">2023年</th>
                                    <th lay-data="{field:'joinTime', minWidth:60}">1月</th>
                                    <th lay-data="{field:'january', minWidth: 60}">2月</th>
                                    <th lay-data="{field:'february', minWidth: 60}">3月</th>
                                    <th lay-data="{field:'march', minWidth: 60}">4月</th>
                                    <th lay-data="{field:'april', minWidth: 60}">5月</th>
                                    <th lay-data="{field:'may', minWidth: 60}">6月</th>
                                    <th lay-data="{field:'june', minWidth: 60}">7月</th>
                                    <th lay-data="{field:'august', minWidth: 60}">8月</th>
                                    <th lay-data="{field:'september', minWidth: 60}">9月</th>
                                    <th lay-data="{field:'october', minWidth: 60}">10月</th>
                                    <th lay-data="{field:'november', minWidth: 60}">11月</th>
                                    <th lay-data="{field:'december', minWidth: 60}">12月</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>装机容量(MW)</td>
                                    <td><input type="text" class="table-input january" readonly value="${agent.columns.january}"/></td>
                                    <td><input type="text" class="table-input february" readonly value="${agent.columns.february}"/></td>
                                    <td><input type="text" class="table-input march" readonly value="${agent.columns.march}"/></td>
                                    <td><input type="text" class="table-input april" readonly value="${agent.columns.april}"/></td>
                                    <td><input type="text" class="table-input may" readonly value="${agent.columns.may}"/></td>
                                    <td><input type="text" class="table-input june" readonly value="${agent.columns.june}"/></td>
                                    <td><input type="text" class="table-input july" readonly value="${agent.columns.july}"/></td>
                                    <td><input type="text" class="table-input august" readonly value="${agent.columns.august}"/></td>
                                    <td><input type="text" class="table-input september" readonly value="${agent.columns.september}"/></td>
                                    <td><input type="text" class="table-input october" readonly value="${agent.columns.october}"/></td>
                                    <td><input type="text" class="table-input november" readonly value="${agent.columns.november}"/></td>
                                    <td><input type="text" class="table-input december" readonly value="${agent.columns.december}"/></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </fieldset>
                </c:forEach>
            </div>

            </div>
            </div>--%>
        </div>
            <div  class="openDivBottom">
                <div class="layui-col-xs4">
                    提交人：${trader.creator}
                </div>
                <div class="layui-col-xs4">
                    所属部门：${trader.departmentName}
                </div>
                <div class="layui-col-xs4">
                    申请时间：<fmt:formatDate value="${trader.applyTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                </div>
            </div>
            <div style="height: 20px"></div>


            <input type="hidden" name="id" id="id" value="${trader.id}">
            <input type="hidden" name="licenseImg" id="licenseImg" value="${trader.licenseImg}">
            <input type="hidden" name="idFrontImg" id="idFrontImg" value="${trader.idFrontImg}">
            <input type="hidden" name="idOppositeImg" id="idOppositeImg" value="${trader.idOppositeImg}">
            <input type="hidden" id="status" value="${trader.status}">
            <div class="layui-col-xs12 mb-20 pr-30 mt-20">
            </div>

        <div class="layui-form-item operate-footer" style="text-align: center;">

            <input type="button"   value="取消" class="layui-btn layui-btn-primary " onclick="closeDiv();" >
        </div>
    </div>
        </div>
    </div>
</div>
<div id="lookImg" class="hide pos-r">
    <div style="position:relative;width:90%;height:450px;">
        <div class="w-500 h-450 lookImg">
            <img src="" width="80%" id="image">
        </div>
    </div>
</div>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/data.js"></script>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/dist/viewer.js"></script>
<script type="text/javascript">
    var viewer = new Viewer(document.getElementById('LAY_app'));
    //初始数据
    var $form;
    var form;
    var upload;
    var $;
    layui.use(['form', 'table', 'upload', 'jquery','element'], function () {
        $ = layui.jquery;
        form = layui.form;
        upload = layui.upload;
        $form = $('form');
        var table = layui.table;

        table.init('parse-table-demo',{
            height: 75
        })
    })





    function  closeDiv() {
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.layer.close(index);
    }

    function isBlank(val) {
        if (val == null || val == '' || val == undefined) {
            return true;
        }
        return false;
    }



</script>
</body>
</html>
