<!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>
        .input {
            border-radius: 2px;
            height: 38px;
            border-width: 1px;
            border-color: lightgray;
            border-style: solid;
            background-color: white;
            padding-left: 3px;
        }
    </style>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-card">
            <div class="layui-card-body" pad15>
                <div id="tableDom"></div>
                <h3 style="margin: 40px 0 10px 0">潜客跟踪报告</h3>
                <table class="layui-hide" id="customer_datagrid" lay-filter="customer-operate"></table>
            </div>
        </div>
    </div>
</div>
<script id="demo" type="text/html">
    <table class="layui-table">
          <tbody>
            <tr>
              <td style="background: #f8f8f8; width: 70px">姓名：</td>
              <td>{{ d.name }}</td>
              <td style="background: #f8f8f8; width: 70px">性别：</td>
              <td>{{ d.gender_text }}</td>
            </tr>
            <tr>
              <td style="background: #f8f8f8; width: 70px">电话：</td>
              <td>{{ d.tel }}</td>
              <td style="background: #f8f8f8; width: 70px">地址：</td>
              <td>{{ d.address }}</td>
            </tr>
            <tr>
              <td style="background: #f8f8f8; width: 70px">小区：</td>
              <td>{{ d.village }}</td>
              <td style="background: #f8f8f8; width: 70px">来源：</td>
              <td>{{ d.source_text }}</td>
            </tr>
            <tr>
              <td style="background: #f8f8f8; width: 70px">备注：</td>
              <td colspan="3">{{ d.notes || ""}}</td>
            </tr>
          </tbody>
        </table>
</script>
<script src="../../layuiadmin/layui/layui.js"></script>
<script>
    layui.link('../../../layuiadmin/style/autocomplete.css');
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
        , autocomplete: 'autocomplete'
    }).extend({
        index: 'lib/index',
        formSelects: 'formSelects-v4'
    }).use(['index', 'table', 'form', 'autocomplete', 'formSelects', 'laytpl' ], function () {
        var $ = layui.$
            , table = layui.table
            , admin = layui.admin
            , laytpl = layui.laytpl
            , formSelects = layui.formSelects
            , form = layui.form;

        editdata = JSON.parse(JSON.stringify(parent.layui.table.editdata)); // 框架有Bug所以这么转换
        var data = editdata;
        var getTpl = demo.innerHTML
        ,tableDom = document.getElementById('tableDom');
        laytpl(getTpl).render(data, function(html){
          tableDom.innerHTML = html;
        });
        table.render({
            elem: '#customer_datagrid'
            , url: '/api/dataTable.json'
            , cols: [[
                {field: 'follow_user', title: '跟踪人', width: 100}
                , {field: 'follow_time', title: "跟踪时间", width: 110}
                , {field: 'connect_status', title: '沟通情况', width: 100}
                , {field: 'rank', title: '客户级别', width: 100}
                , {field: 'application', title: '申请事项', width: 200}
                , {field: 'check_status', title: '审核状态', width: 100}
            ]]
            , page: true
        });

    });
</script>
</body>
</html>
