12345678910111213141516171819202122 |
- <?php /*a:2:{s:77:"D:\project\gyx\gaoyixia\application\operate\view\supplier_classify\index.html";i:1699858976;s:56:"D:\project\gyx\gaoyixia\application\admin\view\main.html";i:1699858976;}*/ ?>
- <div class="layui-card layui-bg-gray"><?php if(!(empty($title) || (($title instanceof \think\Collection || $title instanceof \think\Paginator ) && $title->isEmpty()))): ?><div class="layui-card-header layui-anim layui-anim-fadein notselect"><span class="layui-icon layui-icon-next font-s10 color-desc margin-right-5"></span><?php echo htmlentities((isset($title) && ($title !== '')?$title:'')); ?><div class="pull-right"><button data-action='<?php echo url("remove"); ?>' data-confirm="确定要删除吗?" data-csrf="<?php echo systoken('remove'); ?>" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</button><button data-modal='<?php echo url("add"); ?>&lev=1' data-title="添加分类" class='layui-btn layui-btn-sm layui-btn-primary'>添加分类</button></div></div><?php endif; ?><div class="layui-card-body layui-anim layui-anim-upbit"><div class="think-box-shadow"><fieldset><legend>条件搜索</legend><form class="layui-form layui-form-pane form-search" action="<?php echo request()->url(); ?>" onsubmit="return false" method="get" autocomplete="off"><div class="layui-form-item layui-inline"><label class="layui-form-label">名称</label><div class="layui-input-inline"><input name="title" value="<?php echo htmlentities((app('request')->get('title') ?: '')); ?>" placeholder="请输入分类名称" class="layui-input"></div></div><div class="layui-form-item layui-inline"><button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button></div></form><script>form.render()</script></fieldset><table class="layui-table margin-top-20" lay-skin="line"><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='list-table-sort-td'><button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button></th><th class='text-left nowrap'>ID</th><th class='text-left nowrap'>名称</th><th class='text-left nowrap'>状态</th><th class="text-left" style="width: 20%">操作</th></tr></thead><tbody><?php foreach($list as $key=>$vo): ?><tr><td class='list-table-check-td think-checkbox'><input class="list-check-box" value='<?php echo htmlentities($vo['id']); ?>' type='checkbox'></td><td class='list-table-sort-td'><input data-action-blur="<?php echo request()->url(); ?>" data-value="id#<?php echo htmlentities($vo['id']); ?>;action#sort;sort#{value}" data-loading="false" value="<?php echo htmlentities($vo['sort']); ?>" class="list-sort-input"></td><td class='text-left nowrap'><?php echo htmlentities((isset($vo['id']) && ($vo['id'] !== '')?$vo['id']:'')); ?></td><td class='text-left nowrap'><?php echo htmlentities((isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:'')); ?></td><td class='text-left nowrap'><?php echo $vo['status']==1 ? '已启用' : '已禁用'; ?></td><td class='text-left' style="width: 20%"><a data-title="编辑分类" class="layui-btn layui-btn-xs" data-modal='<?php echo url("edit"); ?>?id=<?php echo htmlentities($vo['id']); ?>'>编 辑</a><?php if($vo['pid'] == 0): ?><a data-title="查看" class="layui-btn layui-btn-xs" data-open='<?php echo url("second"); ?>?pid=<?php echo htmlentities($vo['id']); ?>'>二级分类</a><?php endif; ?><!-- <a data-title="产品合集" class="layui-btn layui-btn-xs" data-open='<?php echo url("/operate/supplier_goods/index"); ?>?first_classify=<?php echo htmlentities($vo['id']); ?>&source=1'>产品合集</a>--><?php if($vo['status'] == 1): ?><span class="layui-btn layui-btn-xs layui-btn-warm" onclick="btn_confirm('禁用','forbid','<?php echo htmlentities($vo['id']); ?>');" >禁 用</span><?php else: ?><span class="layui-btn layui-btn-xs layui-btn-xs" onclick="btn_confirm('启用','resume','<?php echo htmlentities($vo['id']); ?>');">启 用</span><?php endif; ?><span class="layui-btn layui-btn-xs layui-btn-danger" onclick="btn_confirm('删除','remove','<?php echo htmlentities($vo['id']); ?>');">删 除</span></td></tr><?php endforeach; ?></tbody></table><?php if(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty())): ?><span class="notdata">没有记录哦</span><?php else: ?><?php echo (isset($pagehtml) && ($pagehtml !== '')?$pagehtml:''); ?><?php endif; ?></div><script> function btn_confirm(msg,fun,id) {
- layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
- var url = "/operate/supplier_classify/"+fun;
- layer.closeAll();
- $.ajax({
- type: "post",
- url: url,
- data: {id:id},
- dataType: "json",
- async: false,
- success: function (data) {
- layer.msg(data.info);
- setTimeout(function () {
- window.location.reload();
- },1000)
- }
- });
- });
- }
- </script></div></div>
|