<style>
    body ,ul ,li ,div  {
        margin: 0;
        padding: 0;
    }
    ul {
        display: flex;
        flex-wrap: wrap;
        margin-left: 0mm;
        margin-right: 0mm;
        margin-top: 0mm;
        width: 183mm;
    }
    ul >li {
        position: relative;
        overflow: hidden;
        width:36.6mm;
        height: 25.5mm;
        text-align: center;
        line-height: 25.5mm;
        /*box-sizing: border-box;*/
        padding: -2mm 0 -2mm 0;
        border: 0px solid #000;

    }
    .clearfix:after {
        clear: both;
    }
    .clearfix:after,
    .clearfix:before {
        display: table;
        content: " ";
    }
    .clearfix {
        zoom: 1;
        margin-top:-2mm;
    }
    ul li > div {
        font-weight: bold;
        font-size: 4.5mm;
        font-family:"宋体";
    }
    ul li:nth-child(5n-4) div{
        margin-left: -25px;
    }
    ul li:nth-child(5n) div{
        margin-left: -15px;
    }
</style>
<ul class="clearfix" id="view">
    <!--<li>-->
    <!--<div>A711/1-2版:1</div>-->
    <!--<div>A711/1-2版:1</div>-->
    <!--<div>A711/1-2版:1</div>-->
    <!--</li>-->

</ul>
<script id="bookMarkTemp" type="text/html">
    {{#  layui.each(d, function(index, item){ }}
    <li>
        <div>{{ item.bookno.split("/")[0] || ""}}</div>
        <div>{{ item.bookno.split("/")[1] || "" }}</div>
        <div>{{ item.barcode || "" }}</div>
    </li>
    {{#  }); }}
</script>
<script id="bookMarkNo" type="text/html">
    {{#  layui.each(d, function(index, item){ }}
    <li>
        <!--<div>{{ item.bookno.split("/")[0] || ""}}</div>-->
        <div>{{ item.bookno || "" }}</div>
        <!--<div>{{ item.barcode || "" }}</div>-->
    </li>
    {{#  }); }}
</script>
<script id="bookMarkSort" type="text/html">
    {{#  layui.each(d, function(index, item){ }}

    <li>
        <div>{{ item.bookno.split("/")[0] || ""}}</div>
        <div>{{ item.bookno.split("/")[1] || "" }}</div>
        <!--<div>{{ item.barcode || "" }}</div>-->
    </li>
    {{#  }); }}
</script>
<script type="text/javascript" src="/lib/layui/layui.all.js"></script>
<script>
    var $ = layui.$;
    var laytpl = layui.laytpl;
    function markList(res){
        laytpl(bookMarkTemp.innerHTML).render(res.data, function(html){
            document.getElementById('view').innerHTML = html;
        });
        initpage();
        $("#view").css("margin-top","-5.5mm");
    }
    function markListNo(res){
        laytpl(bookMarkNo.innerHTML).render(res.data, function(html){
            document.getElementById('view').innerHTML = html;
        });
        initpage();
        $("#view").css("margin-top","-2mm");
    }
    function markListSort(res){
        laytpl(bookMarkSort.innerHTML).render(res.data, function(html){
            document.getElementById('view').innerHTML = html;
        });
        initpage();
        $("#view").css("margin-top","-2mm");
    }
    function kuandujia(){
        $('ul >li').each(function(){
            $(this).width($(this).width()+1);
            localStorage.setItem("subiaokuan",$(this).width()+1);
        });
    }
    function kuandujian(){
        $('ul >li').each(function(){
            $(this).width($(this).width()-1);
            localStorage.setItem("subiaokuan",$(this).width()-1);
        });
    }
    function gaodujia(){
        $('ul >li').each(function(){
            $(this).height($(this).height()+1);
            localStorage.setItem("subiaogao",$(this).height()+1);
        });
    }
    function gaodujian(){
        $('ul >li').each(function(){
            $(this).height($(this).height()-1);
            localStorage.setItem("subiaogao",$(this).height()-1);
        });
    }
    function initpage() {
        $('ul >li').each(function () {
            if(localStorage.getItem("subiaokuan") != null && localStorage.getItem("subiaokuan") != undefined) {
                $(this).width(localStorage.getItem("subiaokuan"));
            }
            if(localStorage.getItem("subiaogao") != null && localStorage.getItem("subiaogao") != undefined) {
                $(this).height(localStorage.getItem("subiaogao"));
            }
        });
    }
</script>