<!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: 200px;
            height: auto;
        }
    </style>
</head>
<body>
<div class="layui-card" style="min-height: 400px; padding: 10px" id="tenant_detail"></div>
<script id="tenant_detail_demo" type="text/html">
    <div class="layui-tab-item layui-show">
        <ui>
            <li class="tenant-li layui-col-md6">
                <h3>名称：{{ d.invoice_name }}</h3>
            </li>
            <li class="tenant-li">
                <h3>税号：{{ d.tax_no }}</h3>
            </li>
            <li class="tenant-li">
                <h3>单位地址：{{ d.company_address }}</h3>
            </li>
            <li class="tenant-li">
                <h3>电话号码：{{ d.phone_no }}</h3>
            </li>
            <li class="tenant-li">
                <h3>开户银行：{{ d.deposit_bank }}</h3>
            </li>
            <li class="tenant-li">
                <h3>银行账户：{{ d.bank_account }}</h3>
            </li>
            <li class="tenant-li">
                <h3>发票金额：{{ d.invoice_sum }}</h3>
            </li>
            <li class="tenant-li">
                <h3>状态：<span style="color: {{color}}">{{ d.status_text }}</span></h3>
            </li>
            <li class="tenant-li">
                <h3>操作时间：{{ d.use_time }}</h3>
            </li>
            <li class="tenant-li">
                <h3>说明：{{ d.reject_reason || ""  }}</h3>
            </li>
            <li class="tenant-li">
                <h3>收件人：{{ d.consignee }}</h3>
            </li>
            <li class="tenant-li">
                <h3>收件人电话：{{ d.consignee_tel }}</h3>
            </li>
            <li class="tenant-li">
                <h3>收件地址：{{ d.consignee_address }}</h3>
            </li>
            <li class="tenant-li">
                <h3>快递公司：{{ d.express_company || "" }}</h3>
            </li>
            <li class="tenant-li">
                <h3>快递单号：{{ d.express_number || "" }}</h3>
            </li>
        </ui>
    </div>
</script>


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

<script>
    // 设置状态值的颜色
    let color = '';
    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所以这么转换
        if(data.status == 0){
            color = 'red'
        }else if(data.status == 1){
            color = 'green'
        }else if(data.status == 2){
            color = '#38A5FB'
        }else{
            color = 'red'
        }
        var getTpl = tenant_detail_demo.innerHTML
            , tenant_detail = document.getElementById('tenant_detail');
        laytpl(getTpl).render(data, function (html) {
            tenant_detail.innerHTML = html;
        });
    });
</script>
</body>
</html>
