<style>
    body ,ul ,li ,div  {
        margin: 0;
        padding: 0;
    }
    ul {
        margin-left: 13mm;
        margin-right: 14mm;
        /*margin-top: 5mm;*/
        width: 210mm;
    }
    ul >li {

        display: flex;
        justify-content: space-between;
        overflow: hidden;
        text-align: left;
        box-sizing: border-box;
        padding: 8mm 0 2mm 0;
        /*border: 1px solid #000;*/

    }
    .clearfix{
        border: 1px solid #CCCCCC;
    }

    ul li > div {

        font-weight: bold;
        font-size: 4.5mm;
        height: 4.5mm;
        line-height: 4.5mm;
        font-family:"宋体";
    }
    table{width: 100%; border-collapse: collapse; border-spacing: 0;}
    th,td{line-height: 20px; padding: 9px 15px; border: 1px solid #ccc; text-align: left; font-size: 12px; color: #666;}
</style>
<table class="clearfix" id="view">
    <!--<li>-->
    <!--<div>A711/1-2版:1</div>-->
    <!--<div>A711/1-2版:1</div>-->
    <!--<div>A711/1-2版:1</div>-->
    <!--</li>-->

</table>
<script id="bookMarkTemp" type="text/html">
    {{#  layui.each(d, function(index, item){ }}
    <tr>
        <td>{{ item.bookno || ""}}</td>
    </tr>
    {{#  }); }}
</script>
<script id="bookMarkNo" type="text/html">
    {{#  layui.each(d, function(index, item){ }}
    <tr>
        <td>{{ item.bookno || "" }}</td>
        <td>{{ item.zhongcihao|| "" }}</td>
    </tr>
    {{#  }); }}
</script>
<script id="bookMarkSort" type="text/html">

    {{#  layui.each(d, function(index, item){ }}
    <tr>
        <td>{{ item.barcode || ""}}</td>
        <td>{{ item.kanming|| "" }}</td>
        <td>{{ item.bianjibu || "" }}</td>
        <td>{{ item.bookno || ""}}</td>
        <td>{{ item.price|| "" }}</td>
        <td>{{ item.library || "" }}</td>
        <td>{{ item.reason || ""}}</td>
        <td>{{ item.createtime|| "" }}</td>
    </tr>
    {{#  }); }}
</script>
<script type="text/javascript" src="/lib/layui/layui.all.js"></script>
<script>
    var $ = layui.$;
    var laytpl = layui.laytpl;
    function markList(res){

        console.log(res.data)
        laytpl(bookMarkTemp.innerHTML).render(res.data, function(html){
            console.log(res.data)
            document.getElementById('view').innerHTML = html;
        });
    }
    function markListNo(res){

        console.log(res.data)
        laytpl(bookMarkNo.innerHTML).render(res.data, function(html){
            document.getElementById('view').innerHTML = html;
        });
    }
    function markListSort(res){
        console.log(res.data.list)
        laytpl(bookMarkSort.innerHTML).render(res.data.list, function(html){
            document.getElementById('view').innerHTML = html;
        });
    }
</script>