<!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">
    <link rel="stylesheet" type="text/css" href="../../layuiadmin/style/formSelects-v4.css"/>
    <style type="text/css">
        .baoxiu-li {
            margin: 10px
        }

        img {
            width: 40%;
            height: 30%;
            margin-bottom: 20px;
        }
    </style>
</head>
<body>

<div class="layui-tab-card" id="order_detail" style="background-color: #fff;">
    <ui>
        <li class="baoxiu-li">
            <h3>报销单号：{{ d.no }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>地点：{{ d.device_address }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>问题描述：{{ d.fault_des }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>报修类型：{{ d.repair_type }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>报修人：{{ d.name }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>报修电话：{{ d.tel }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>报修时间：{{ d.create_time }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>报修状态：{{ d.status_text }}</h3>
        </li>
        {{# layui.each(d.images, function(index, item){ }}
        <li>
            <img class="layui-upload-img" src={{ item.picture }}>
        </li>
        {{# }); }}
    </ui>
</div>

<script id="order_detail_demo" type="text/html">
    <ui>
        <li class="baoxiu-li">
            <h3>报销单号：{{ d.no }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>地点：{{ d.device_address }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>问题描述：{{ d.problem }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>报修类型：{{ d.repair_type }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>巡检人员：{{ d.user_name }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>巡检电话：{{ d.user_tel }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>巡检时间：{{ d.create_time }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>报修状态：{{ d.status_text }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>转报修人：{{ d.turn_repair_user_name || '' }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>转报修时间：{{ d.turn_repair_time || '' }}</h3>
        </li>
        <li class="baoxiu-li">
            <h3>报修单号：{{ d.repair_order || '' }}</h3>
        </li>
        {{# layui.each(d.images, function(index, item){ }}
        <li>
            <img class="layui-upload-img" src={{ item.picture }}>
        </li>
        {{# }); }}
    </ui>
</script>

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

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

        var getTpl = order_detail_demo.innerHTML
            , order_detail = document.getElementById('order_detail');
        laytpl(getTpl).render(data, function (html) {
            order_detail.innerHTML = html;
        });
    })
    ;
</script>
</body>
</html>
