push.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. {include file="common/header"/}
  2. <style>
  3. .upload-wrap {
  4. position: relative;
  5. display: inline-block;
  6. overflow: hidden;
  7. border: 1px solid #2d78f4;
  8. border-radius: 3px;
  9. }
  10. .upload-wrap .file-ele {
  11. position: absolute;
  12. top: 0;
  13. right: 0;
  14. opacity: 0;
  15. height: 100%;
  16. width: 100%;
  17. cursor: pointer;
  18. }
  19. .upload-wrap .file-open {
  20. width: 90px;
  21. height: 30px;
  22. line-height: 30px;
  23. text-align: center;
  24. color: #fff;
  25. background: #3385ff;
  26. }
  27. </style>
  28. <div class="LM-container">
  29. <div class="LM-main">
  30. <fieldset class="layui-elem-field layui-field-title">
  31. <legend>用户交易记录</legend>
  32. <blockquote class="layui-elem-quote">
  33. <a href="{:url('index')}" class="layui-btn layui-btn-xs" lay-event="update_pwd">返回</a>
  34. </blockquote>
  35. </fieldset>
  36. <table class="layui-table" id="list" lay-filter="list">
  37. </table>
  38. </div>
  39. </div>
  40. <script type="text/html" id="image">
  41. {{# layui.each(d.image, function(index, item){ }}
  42. <img src="/static/admin/images/image.gif" onmouseover="layer.tips('<img src={{item}}>',this,{tips: [1, '#fff']});" onmouseout="layer.closeAll();">
  43. {{# });
  44. }}
  45. </script>
  46. <script type="text/html" id="barDemo">
  47. <!-- <input type="button" class="layui-btn layui-btn-xs" lay-event="del" value="删除">-->
  48. <!--<a href="addhlep?id={{d.id}}" class="layui-btn layui-btn-xs" >编辑</a>-->
  49. </script>
  50. {include file="common/footer"/}
  51. <script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
  52. <script>
  53. layui.use(['form', 'table'], function () {
  54. var $ = layui.jquery,
  55. form = layui.form,
  56. table = layui.table;
  57. let user_id= {:$user_id};
  58. var tableIn = table.render({
  59. elem: '#list',
  60. url: '{:url("push")}',
  61. where:{user_id:user_id},
  62. method: 'post',
  63. title: '反馈意见',
  64. loading: true,
  65. toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
  66. defaultToolbar: ['filter', 'exports', 'print', "excel", { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可
  67. title: '提示'
  68. , layEvent: 'LAYTABLE_TIPS'
  69. , icon: 'layui-icon-tips'
  70. }],
  71. cols: [[
  72. // {checkbox: true, fixed: true},
  73. {field: 'id', title: 'ID', width: 20, fixed: true, sort: true},
  74. {field: 'biaoshu', title: '类型', width: 80, sort: true},
  75. {field: 'buy_user', title: '购买用户id', width: 80, sort: true},
  76. {field: 'push_user', title: '卖出用户id', width: 80, sort: true},
  77. // {field: 'user_name', title: '用户', width: 120, sort: true},
  78. {field: 'number', title: '发布数量', width: 80, sort: true},
  79. {field: 'enlarge_quota', title: '放大额度', width: 80, sort: true},
  80. {field: 'order', title: '订单编号', width: 100, sort: true},
  81. {field: 'add_time', title: '添加时间', width: 150, sort: true},
  82. {field: 'stat_time', title: '未支付结束时间', width: 150, sort: true},
  83. {field: 'end_time', title: '完成时间', width: 150, sort: true},
  84. {field: 'msg', title: '失败原因', width: 150, sort: true},
  85. {field: 'image', title: '凭证', width: 150, templet: '#image'},
  86. {field: 'status', title: '订单状态', width: 150, sort: true},
  87. // {title: '操作', width: 150, align: "center", toolbar: "#barDemo"},
  88. ]],
  89. limits: [10, 15, 20, 25, 50, 100],
  90. limit: 10,
  91. page: true
  92. });
  93. table.on('tool(list)', function (obj) {
  94. var data = obj.data;
  95. let event = obj.event;
  96. switch (event) {
  97. case "check":
  98. layer.confirm('确定要进行这样的操作码', function (index) {
  99. loading = layer.load(1, {shade: [0.1, '#fff']});
  100. $.post("{:url('status')}", {id: data.id}, function (res) {
  101. layer.close(loading);
  102. layer.close(index);
  103. if (res.code == 1) {
  104. layer.msg(res.msg, {time: 1000, icon: 1});
  105. tableIn.reload();
  106. } else {
  107. layer.msg(res.msg, {time: 1000, icon: 2});
  108. }
  109. }, "json")
  110. })
  111. break;
  112. }
  113. });
  114. form.on('switch(status)', function (data) {
  115. });
  116. $('#search').click(function () {
  117. var $keys = $('#name').val();
  118. if (!$keys) {
  119. return layer.msg('请输入关键词');
  120. }
  121. tableIn.reload({page: {page: 1}, where: {name: $keys}});
  122. })
  123. // setInterval(function () {
  124. // tableIn.reload();
  125. // }, 50000)
  126. });
  127. </script>