<!--{include file="<!--{$salepath}-->public/header.tpl"}-->
	<body>
			<div class="wrap-container clearfix">
				<div class="column-content-detail">
					<form class="layui-form" action="" id="forms">
                                            <input type="hidden" name="c" value="Product">
						<div class="layui-form-item">
							<div class="layui-inline tool-btn">
                                                            <button type="button" class="layui-btn layui-btn-small layui-btn-normal addBtn" data-url="sale.php?c=Product&a=add" data-text="产品添加"><i class="layui-icon">&#xe654;</i></button>
								<button class="layui-btn layui-btn-small layui-btn-danger delBtn"  data-url="sale.php?c=Product&a=del"><i class="layui-icon">&#xe640;</i></button>	
                                                        </div>
							<div class="layui-inline">
								<input type="text" name="title"  placeholder="请输入产品名称" autocomplete="off" class="layui-input" value="<!--{$sname}-->">
							</div>
							<div class="layui-inline">
								<select name="catid" lay-filter="status">
									<option value="">请选择一个分类</option>
                                        <option value="0">全部</option>
									    <!--{assign var='productcategory' value=vo_category("type={treecat} rootid={2}")}-->
                                        <!--{foreach $productcategory as $parent}-->
                                            <option value="<!--{$parent.catid}-->" <!--{if $parent.catid==<!--{$scatid}-->}-->selected<!--{/if}-->><!--{$parent.catname}--></option>
                                        <!--{/foreach}-->
								</select>
							</div>
							<button type="button" class="layui-btn layui-btn-normal" id="search">搜索</button>
						</div>
					</form>
					<div class="layui-form" id="table-list">
						<table class="layui-table" lay-even lay-skin="nob">
							<colgroup>
								<col width="50">
								<col width="100">
								<col class="hidden-xs" width="80">
								<col width="80">
								<col width="150">
							</colgroup>
							<thead>
								<tr>
									<th><input type="checkbox" lay-skin="primary" lay-filter="allChoose" data-id=""></th>
									
									<th>产品名称</th>
									<th class="hidden-xs">所属分类</th>
									<th>当前库存</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
                                                             <!--{if empty($product)}-->
                                                                    <tr>
                                                                           <td colspan="5" style="text-align: center;">没有符合条件的信息！</td>
                                                                    </tr>
                                                       <!--{else}-->
                                                              
                                                               <!--{foreach $product as $key=>$volist}-->
                                                                <tr>
                                                                       <td><input type="checkbox"  lay-skin="primary" data-id="<!--{$volist.productid}-->"></td>
									<td><!--{$volist.productname}--></td>
									<td class="hidden-xs">    <!--{$volist.catname}--></td>
                                                                        <!--{if $volist.stock < '10'}-->
                                                                        <td style="color: red;"><!--{$volist.stock}--></td>
                                                                        <!--{else}-->
                                                                        <td><!--{$volist.stock}--></td>
                                                                        <!--{/if}-->
									
									<td>
										<div class="layui-inline">
											<button class="layui-btn layui-btn-small layui-btn-normal addBtn" data-id="<!--{$volist.productid}-->" data-url="sale.php?c=Product&a=edit&id=<!--{$volist.productid}-->" data-text='产品修改'><i class="layui-icon">&#xe642;</i></button>
											<button class="layui-btn layui-btn-small layui-btn-danger del-btn" data-id="<!--{$volist.productid}-->" data-url="sale.php?c=Product&a=del"><i class="layui-icon">&#xe640;</i></button>
										</div>
									</td>
  </tr>
                                                               <!--{/foreach}--> 


                                                             
                                                          <!--{/if}-->
								
							
							</tbody>
						</table>
						<div class="page-wrap">
							<ul class="pagination">
                                                            <!--{$showpage}-->
								 <!--<li class="disabled"><span>«</span></li>
								<li class="active"><span>1</span></li>
								<li>
									<a href="#">2</a>
								</li>
								<li>
									<a href="#">»</a>
								</li>-->
							</ul>
						</div>
					</div>
				</div>
		</div>
	
		
		<script src="<!--{$salepath}-->static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="<!--{$salepath}-->static/js/common.js" type="text/javascript" charset="utf-8"></script>
                  <script src="<!--{$salepath}-->static/js/jquery-3.2.1.js" type="text/javascript" charset="utf-8"></script>
                  <script type="text/javascript">
                            $(document).ready(function () { 
                            $("#search").click(function(){
                                    document.getElementById("forms").submit();
                                           
                            }); 
                    }); 

		</script>
	</body>
</html>
