12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- {extend name='admin@main'}
- {block name="button"}
- {if auth("add")}
- <button class='layui-btn layui-btn-sm layui-btn-primary' data-modal='{:url("add")}'>添 加</button>
- {/if}
- {if auth("remove")}
- <button class="layui-btn layui-btn-sm layui-btn-primary" data-confirm="确定要删除吗?" data-action="{:url('remove')}" data-rule="id#{key}" data-csrf="{:systoken('remove')}">删 除</button>
- {/if}
- {/block}
- {block name="content"}
- <div class="think-box-shadow">
- {include file='goods/index_search'}
- <table class="layui-table margin-top-10" lay-skin="line">
- {notempty name='list'}
- <thead>
- <tr>
- <th class='list-table-check-td think-checkbox'>
- <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
- </th>
- <th class='text-left nowrap'>商品ID</th>
- <th class='text-left nowrap'>商品分类</th>
- <th class='text-left nowrap'>商品编号</th>
- <th class='text-left nowrap'>商品名称</th>
- <th class='text-left nowrap'>商品品牌</th>
- <th class='text-left nowrap'>商品规格</th>
- <th class='text-left nowrap'>权重</th>
- <th class='text-left nowrap'>状态</th>
- <th class='text-left nowrap'>创建时间</th>
- <th class="text-left nowrap">操作</th>
- </tr>
- </thead>
- {/notempty}
- <tbody>
- {foreach $list as $key=>$vo}
- <tr>
- <td class='list-table-check-td think-checkbox'>
- <input class="list-check-box" value='{$vo.id}' type='checkbox'>
- </td>
- <td class='text-left nowrap'>{$vo.id|default='--'}</td>
- <td class='text-left nowrap'>{$vo.goods_category_one.name|default='--'} - {$vo.goods_category.name|default='--'}</td>
- <td class='text-left nowrap'>{$vo.goods_no|default='--'}</td>
- <td class='text-left nowrap'>{$vo.goods_name|default='--'}</td>
- <td class='text-left nowrap'>{$vo.goods_brand|default='--'}</td>
- <td class='text-left nowrap'>
- {foreach $vo.goods_stock as $k=>$v}
- <p><span class="color-desc">{$v.name}</span><span> 库存:{$v.stock}</span><span> 冻结库存:{$v.freeze_stock}</span></p>
- {/foreach}
- </td>
- <td class='list-table-sort-td'>
- <input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input">
- </td>
- <td class='text-left nowrap'>
- {eq name='vo.status' value='0'}<strong class="color-red">已下架</strong>{else}<strong class="color-green">正常</strong>{/eq}
- </td>
- <td class='text-left nowrap'>{$vo.create_at|default=''}</td>
- <td class='text-left nowrap'>
- <a class="layui-btn layui-btn-xs layui-bg-blue"
- data-open="{:url('goods_stock_log/index')}?goods_id={$vo.id}">入库记录</a>
- <a class="layui-btn layui-btn-xs layui-btn-danger"
- data-open="{:url('goods_use_log/index')}?goods_id={$vo.id}">出库记录</a>
- {if $vo.status eq 1 and auth("forbid")}
- <a class="layui-btn layui-btn-xs layui-btn-warm" data-confirm="确定要禁用该账号吗?" data-action="{:url('forbid')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('forbid')}">禁 用</a>
- {elseif auth("resume")}
- <a class="layui-btn layui-btn-xs layui-bg-blue" data-confirm="确定要启用该账号吗?" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('resume')}">启 用</a>
- {/if}
- {if auth("edit")}
- <a class="layui-btn layui-btn-xs" data-modal="{:url('edit')}?id={$vo.id}">编 辑</a>
- {/if}
- {if auth("remove")}
- <a class="layui-btn layui-btn-xs layui-btn-danger" data-confirm="确定要删除该用户吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
- {/if}
- </td>
- </tr>
- {/foreach}
- </tbody>
- </table>
- {empty name='list'}<span class="notdata">没 有 记 录 哦!</span>{else}{$pagehtml|raw|default=''}{/empty}
- </div>
- {/block}
|