index.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {extend name='admin@main'}
  2. {block name="content"}
  3. <div class="think-box-shadow">
  4. <table class="layui-table margin-top-20" lay-skin="line">
  5. <thead>
  6. <tr>
  7. <th class='text-left nowrap' >用户信息</th>
  8. <th class='text-left nowrap' >抬头信息</th>
  9. <th class="text-left nowrap">操作</th>
  10. </tr>
  11. </thead>
  12. <tbody>
  13. {foreach $list as $key=>$vo}
  14. <tr>
  15. <td class='text-left'>
  16. <img data-tips-image style="width:50px;height:50px" src="{$vo.headimg|default=''}" class="margin-right-5 text-top">
  17. <div class="inline-block">
  18. 记录ID:{$vo.id}<br>
  19. 用户ID:{$vo.user_id|default='--'}<br>
  20. 用户昵称:{$vo.user_name|default='--'}
  21. </div>
  22. </td>
  23. <td class='text-left nowrap'>{$vo.create_at}</td>
  24. <td class='text-left' >
  25. <a data-title="查 看" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>查 看</a>
  26. <span class="layui-btn layui-btn-sm layui-btn-danger" onclick="btn_confirm('删除','remove','{$vo.id}');">删 除</span>
  27. </td>
  28. </tr>
  29. {/foreach}
  30. </tbody>
  31. </table>
  32. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  33. </div>
  34. <script>
  35. function btn_confirm(msg,fun,id) {
  36. layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
  37. var url = "/synth/bill_header/"+fun;
  38. layer.closeAll();
  39. $.ajax({
  40. type: "post",
  41. url: url,
  42. data: {id:id},
  43. dataType: "json",
  44. async: false,
  45. success: function (data) {
  46. layer.msg(data.info);
  47. setTimeout(function () {
  48. window.location.reload();
  49. },1000)
  50. }
  51. });
  52. });
  53. }
  54. </script>
  55. {/block}