<?php include ADMIN_COMMON_PATH.'/header.html';?>
<div class="layui-container fly-marginTop fly-user-main">
    <?php include ADMIN_COMMON_PATH.'/products-nav.html';?>
    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-tab layui-tab-brief" lay-filter="user">
            <ul class="layui-tab-title" id="LAY_mine">
                <li class="layui-this" lay-id="info">商品管理</li>
                <li class="" lay-id="info"><a href="/<?php echo ADMIN_DIR;?>/products/add/">添加</a></li>
            </ul>
            <div class="layui-tab-content" style="padding: 20px 0;">
                <div class="layui-form layui-form-pane layui-tab-item layui-show">
                    <div class="layui-form-item layui-show">
                    <blockquote class="layui-elem-quote">
                        <p> 注意事项： </p>
                        <p> 商品删除前，请提前将对应卡密删除或者导出，否则无法删除;</p>
                    </blockquote>
                        <table class="layui-table" id="table" lay-filter="table"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="auto">
    {{# if(d.auto >0){ }}
    <span class="layui-badge layui-bg-green">自动发货</span>
    {{# } else { }}
    <span class="layui-badge layui-bg-gray">手工发货</span>
    {{# } }}
</script>
<script type="text/html" id="qty">
    {{# if(d.stockcontrol >0){ }}
        {{d.qty}}
    {{# } else { }}
        <span class="layui-badge layui-bg-gray">不限量</span>
    {{# } }}
</script>
<script type="text/html" id="active">
    {{# if(d.active >0){ }}
    <span class="layui-badge layui-bg-green">在售</span>
    {{# } else { }}
    <span class="layui-badge layui-bg-gray">停售</span>
    {{# } }}
</script>
<script type="text/html" id="pifa">
    <a class="layui-btn layui-btn-normal layui-btn-xs" href="/<?php echo ADMIN_DIR;?>/productspifa/?id={{d.id}}">批发</a>
</script>
<script type="text/html" id="opt">
    <a class="layui-btn layui-btn-warm layui-btn-xs" href="/<?php echo ADMIN_DIR;?>/products/edit/?id={{d.id}}">编辑</a>
	{{# if(d.active == 0){ }}
	<a data-href="/<?php echo ADMIN_DIR;?>/products/delete/?id={{d.id}}" class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
	 {{# } else { }}
	 {{# } }}
</script>
<!--引入公共底文件-->
<?php include ADMIN_COMMON_PATH.'/footer.html';?>
<script>
layui.use('adminproducts');
</script>