{extend name="crm@Public/base" /}
{block name="css"}
<link rel="stylesheet" href="__PUBLIC__/item/css/layui.css?v={$Think.const.APP_VERSION}">
<link rel="stylesheet" href="__PUBLIC__/css/customer.css?v={$Think.const.APP_VERSION}">
<link rel="stylesheet" href="__PUBLIC__/css/set.css?v={$Think.const.APP_VERSION}">
<style>
    .layui-table-page {
        height: 26px;
        margin-top: -14px;
    }
</style>
{/block}
{block name="js"}
<script>
    $(function(){
        // $(".nul_bli").eq(8).find(".navb").addClass("active");
//        $(".navb.active").parent().find(".nul_s .nul_sli").eq(13).find(".navs").addClass("active");
    })
</script>
{/block}
{block name="main"}
<div class="if_wrap">
    <div class="cus-con">
        <div class="set_tit"><span>提报列表</span></div>
        <table class="layui-table" lay-data="{height:700,limit:30,page:true,url:'', id:'idTest'}" lay-filter="demo">
            <thead>
            <tr>
                <th lay-data="{sort:true,align:'center',width:100,field:'',sort: true,templet: '#titleTpl'}">序号</th>
                <th lay-data="{sort:true,align:'center',width:110,field:'is_in',toolbar: '#is_in'}">是否重复</th>
                <th lay-data="{sort:true,align:'center',width:150,field:'create_time'}">填写时间</th>
                <th lay-data="{align:'center',width:100,field:'customer_channel'}">渠道</th>
                <th lay-data="{align:'center',width:120,field:'customer_name'}">姓名</th>
                <th lay-data="{align:'center',width:120,field:'customer_tel'}">手机</th>
                <th lay-data="{align:'center',width:100,field:'customer_wechat'}">微信</th>
                <th lay-data="{align:'center',width:100,field:'add_shop_name'}">提报店</th>
                <th lay-data="{align:'center',width:200,field:'form_content'}">咨询内容</th>
                <th lay-data="{align:'center',width:150,field:'ip'}">IP</th>
                <th lay-data="{align:'center',width:500,field:'from_address'}">来源网站</th>
            </tr>
            </thead>
        </table>

    </div>
</div>
<script type="text/html" id="titleTpl">
    {{d.LAY_TABLE_INDEX+1}}
</script>
<script type="text/html" id="is_in">
    {{#  if(d.is_in == 1){ }}
    <span class="layui-btn-mini" style="color:#01b88a;">否</span>
    {{#  } else { }}
    <span class="layui-btn-mini" style="color:#fe4951;">是</span>
    {{#  } }}
</script>
<script>
    layui.use(['laydate', 'laypage', 'layer', 'table', 'carousel', 'upload', 'element'], function(){
        var laydate = layui.laydate //日期
                ,laypage = layui.laypage //分页
        layer = layui.layer //弹层
                ,table = layui.table //表格
                ,carousel = layui.carousel //轮播
                ,upload = layui.upload //上传
                ,element = layui.element; //元素操作
        table.reload('idTest', {
            url: 'customerListJSON'
            ,where: {advert_code:"{$advert_code}",is_in:"{$is_in}"} //设定异步数据接口的额外参数
            //,height: 300
        });
        //分页
        laypage.render({
            elem: 'pageDemo' //分页容器的id
            ,count: 100 //总页数
            ,skin: '#1E9FFF' //自定义选中色值
            //,skip: true //开启跳页
            ,jump: function(obj, first){
                if(!first){
                    layer.msg('第'+ obj.curr +'页');
                }
            }
        });
    })
</script>
{/block}