1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- {extend name='admin@main'}
- {block name="button"}
- {if auth("resume")}
- <button class="layui-btn layui-btn-sm layui-btn-primary" data-confirm="确定要批量启用吗?" data-action="{:url('resume')}" data-rule="id#{key}" data-csrf="{:systoken('resume')}">批量启用</button>
- {/if}
- {if auth("forbid")}
- <button class="layui-btn layui-btn-sm layui-btn-primary" data-confirm="确定要批量禁用吗?" data-action="{:url('forbid')}" data-rule="id#{key}" data-csrf="{:systoken('forbid')}">批量禁用</button>
- {/if}
- {if auth("add")}
- <button class='layui-btn layui-btn-sm layui-btn-primary' data-open='{: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>规格ID:{$v.id|default='--'}</p>
- <p class="color-desc">规格名称:{$v.name}</p>
- <p class="color-desc"><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-btn-danger"
- data-open="{:url('goods_stock_log/index')}?goods_id={$vo.id}">入库出库记录</a>
- {if auth("forbid") and $vo.status eq 1}
- <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") and $vo.status eq 0}
- <a class="layui-btn layui-btn-xs" data-open="{:url('edit')}?id={$vo.id}">编 辑</a>
- {else/}
- <a class="layui-btn layui-btn-xs" data-open="{:url('edit')}?id={$vo.id}&type=1">详 情</a>
- {/if}
- {if auth("remove") and $vo.status eq 0}
- <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}
|