32a3cf5de3549d36d493da9672893728.php 5.1 KB

12345678910111213141516171819202122
  1. <?php /*a:3:{s:68:"D:\project\gyx\gaoyixia\application\operate\view\supplier\index.html";i:1699858976;s:56:"D:\project\gyx\gaoyixia\application\admin\view\main.html";i:1699858976;s:75:"D:\project\gyx\gaoyixia\application\operate\view\supplier\index_search.html";i:1699858976;}*/ ?>
  2. <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-open='<?php echo url("add"); ?>?suppe' 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">&#xe615;</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 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 htmlentities((isset($vo['label']) && ($vo['label'] !== '')?$vo['label']:'--')); ?></td><td class='text-left'><?php echo htmlentities((isset($vo['create_at']) && ($vo['create_at'] !== '')?$vo['create_at']:'--')); ?></td><td class='text-left' style="width: 20%"><a data-title="编辑" class="layui-btn layui-btn-sm" data-open='<?php echo url("edit"); ?>?id=<?php echo htmlentities($vo['id']); ?>'>编 辑</a><?php if($vo['status'] == 1): ?><span class="layui-btn layui-btn-sm layui-btn-warm" onclick="btn_confirm('禁用','forbidden','<?php echo htmlentities($vo['id']); ?>');" >禁 用</span><?php else: ?><span class="layui-btn layui-btn-sm" onclick="btn_confirm('启用','enable','<?php echo htmlentities($vo['id']); ?>');">启 用</span><?php endif; ?><a data-title="产品合集" class="layui-btn layui-btn-sm" data-open='<?php echo url("/operate/supplier_goods/index"); ?>?supplier_id=<?php echo htmlentities($vo['id']); ?>&source=1'>产品合集</a><span class="layui-btn layui-btn-sm layui-btn-danger" onclick="btn_confirm('删除','del','<?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) {
  3. layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
  4. var url = "/operate/supplier/"+fun;
  5. layer.closeAll();
  6. $.ajax({
  7. type: "post",
  8. url: url,
  9. data: {id:id},
  10. dataType: "json",
  11. async: false,
  12. success: function (data) {
  13. layer.msg(data.info);
  14. setTimeout(function () {
  15. window.location.reload();
  16. },1000)
  17. }
  18. });
  19. });
  20. }
  21. </script></div></div>