<!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">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
    <style type="text/css">
        .tenant-li {
            margin: 10px
        }

        img {
            width: 40%;
            height: 30%;
            margin-bottom: 20px;
        }
        /*企业营业执照样式*/
        .imgStyle{
            width: 100px;
            height: 100px;
        }
    </style>
</head>
<body>

<div class="layui-tab layui-tab-card">
    <ul class="layui-tab-title">
        <li class="layui-this">租户详情</li>
        <li>充值记录</li>
    </ul>
    <div class="layui-tab-content" style="background-color: #fff;">
        <div id="tenant_detail" class="layui-tab-item layui-show"></div>
        <div id="invest_record" class="layui-tab-item"></div>

        <script id="tenant_detail_demo" type="text/html">
            <div class="layui-tab-item layui-show">
                <ui>
                    <li class="tenant-li">
                        <h3>单位名称：{{ d.company_name }}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>单位编码：{{ d.company_no }}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>组织代码：{{ d.organ_code }}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>联系人姓名：{{ d.name }}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>联系人电话：{{ d.tel }}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>租户到期日期：{{ d.end_date }}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>申请时间：{{ d.create_time }}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>审核状态：{{ d.status_text }}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>管理员账号：{{ d.username }}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>续费时间：{{ d.renew_time || ''}}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>续费金额：{{ d.renew_amount || '' }}</h3>
                    </li>
                    <li class="tenant-li">
                        <h3>拒绝原因：{{ d.reject_reason  || ''}}</h3>
                    </li>
                    {{# if(d.image){ }}
                    <li class="tenant-li">
                        <h3>企业营业执照：</h3>
                        <img src="{{d.image}}" class="imgStyle" />
                    </li>
                    {{# } }}
                </ui>
            </div>
        </script>
        <script id="invest_record_demo" type="text/html">
            <div class="layui-tab-item layui-show">
                <ul class="layui-timeline">
                    <li class="layui-timeline-item">
                        <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                        <div class="layui-timeline-content layui-text">
                        </div>
                    </li>
                </ul>
            </div>
        </script>
    </div>
</div>


<script src="../../layuiadmin/layui/layui.js"></script>

<script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index',
    }).use(['index',  'laytpl'], function () {
        var $ = layui.$
            , laytpl = layui.laytpl;
        var data = JSON.parse(JSON.stringify(parent.layui.table.editdata)); // 框架有Bug所以这么转换

        var getTpl = tenant_detail_demo.innerHTML
            , tenant_detail = document.getElementById('tenant_detail');
        laytpl(getTpl).render(data, function (html) {
            tenant_detail.innerHTML = html;
        });
        // admin.req({
        //     url: '/tenant/repair_order/get_repair_order_record/'
        //     , data: {order_id: data.id}
        //     , type: 'get'
        //     , done: function (res) {
        //        var getTpl2 = invest_record_demo.innerHTML
        //            , invest_record = document.getElementById('invest_record');
        //          laytpl(getTpl2).render(res.data, function (html) {
        //          invest_record.innerHTML = html;
        //         });
        //     }
        // });
    });
</script>
</body>
</html>
