fd3382e0c1e6539206f1c35861056032.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <?php /*a:3:{s:57:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\order\buy.html";i:1591666996;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\header.html";i:1591579556;s:61:"D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\common\footer.html";i:1591579556;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <title><?php echo config('admin.sys_name'); ?>后台管理</title>
  7. <meta name="renderer" content="webkit">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  9. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  11. <meta name="apple-mobile-web-app-capable" content="yes">
  12. <meta name="format-detection" content="telephone=no">
  13. <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all" />
  14. <link rel="stylesheet" href="/static/admin/css/main.css?v=<?php echo time(); ?>" media="all">
  15. <link rel="stylesheet" href="/static/plugins/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
  16. <style id="LM-bg-color">
  17. </style>
  18. </head>
  19. <style>
  20. .upload-wrap {
  21. position: relative;
  22. display: inline-block;
  23. overflow: hidden;
  24. border: 1px solid #2d78f4;
  25. border-radius: 3px;
  26. }
  27. .upload-wrap .file-ele {
  28. position: absolute;
  29. top: 0;
  30. right: 0;
  31. opacity: 0;
  32. height: 100%;
  33. width: 100%;
  34. cursor: pointer;
  35. }
  36. .upload-wrap .file-open {
  37. width: 90px;
  38. height: 30px;
  39. line-height: 30px;
  40. text-align: center;
  41. color: #fff;
  42. background: #3385ff;
  43. }
  44. </style>
  45. <div class="LM-container">
  46. <div class="LM-main">
  47. <fieldset class="layui-elem-field layui-field-title">
  48. <legend>求购订单列表</legend>
  49. <blockquote class="layui-elem-quote">
  50. <div class="LM-table">
  51. </div>
  52. </blockquote>
  53. </fieldset>
  54. <table class="layui-table" id="list" lay-filter="list">
  55. </table>
  56. </div>
  57. </div>
  58. <script type="text/html" id="barDemo">
  59. <!-- <input type="button" class="layui-btn layui-btn-xs" lay-event="del" value="删除">-->
  60. <input type="button" class="layui-btn layui-btn-xs" lay-event="jiaoyi" value="匹配交易">
  61. <!--<a href="addhlep?id={{d.id}}" class="layui-btn layui-btn-xs" >编辑</a>-->
  62. </script>
  63. <script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
  64. <script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
  65. <div class="layui-form-item lianl" style="display: none" >
  66. <label class="layui-form-label">后台账号</label>
  67. <div class="layui-input-block">
  68. <select name="adminid" id="adminid" lay-verify="required">
  69. <?php if(is_array($data) || $data instanceof \think\Collection || $data instanceof \think\Paginator): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vs): $mod = ($i % 2 );++$i;?>
  70. <option value="<?php echo htmlentities($vs['id']); ?>"><?php echo htmlentities($vs['name']); ?></option>
  71. <?php endforeach; endif; else: echo "" ;endif; ?>
  72. </select>
  73. </div>
  74. <div class="layui-form-mid layui-word-aux">
  75. </div>
  76. </div>
  77. <script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
  78. <script>
  79. layui.use(['form', 'table',"layer"], function () {
  80. var $ = layui.jquery,
  81. form = layui.form,
  82. layer = layui.layer,
  83. table = layui.table;
  84. var tableIn = table.render({
  85. elem: '#list',
  86. url: '<?php echo url("buy"); ?>',
  87. method: 'post',
  88. title: '反馈意见',
  89. loading: true,
  90. toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
  91. defaultToolbar: ['filter', 'exports', 'print', "excel", { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可
  92. title: '提示'
  93. , layEvent: 'LAYTABLE_TIPS'
  94. , icon: 'layui-icon-tips'
  95. }],
  96. cols: [[
  97. // {checkbox: true, fixed: true},
  98. {field: 'id', title: 'ID', width: 80, fixed: true, sort: true},
  99. {field: 'buy_user', title: '购买用户id', width: 120, sort: true},
  100. {field: 'user_name', title: '用户', width: 120, sort: true},
  101. {field: 'number', title: '发布数量', width: 120, sort: true},
  102. {field: 'enlarge_quota', title: '放大额度', width: 120, sort: true},
  103. {field: 'order', title: '订单编号', width: 120, sort: true},
  104. {field: 'add_time', title: '添加时间', width: 120, sort: true},
  105. {field: 'status', title: '订单状态', width: 120, sort: true},
  106. {title: '操作', width: 150, align: "center", toolbar: "#barDemo"},
  107. ]],
  108. limits: [10, 15, 20, 25, 50, 100],
  109. limit: 10,
  110. page: true
  111. });
  112. table.on('tool(list)', function (obj) {
  113. var data = obj.data;
  114. let event = obj.event;
  115. switch (event) {
  116. case "jiaoyi":
  117. layer.open({
  118. type: 1,
  119. shade: false,
  120. title: "请选择后台账号",
  121. content: $('.lianl'),
  122. area:["400px","200px"],
  123. btn:["确定","取消"],
  124. yes:function(index,layero){
  125. layer.close(index);
  126. let adminid=$("#adminid").val()
  127. let datas={
  128. order_id:data.id,
  129. user_id:adminid
  130. }
  131. loading = layer.load(1, {shade: [0.1, '#fff']});
  132. $.post("<?php echo url('matching'); ?>", datas, function (res) {
  133. layer.close(loading);
  134. if (res.code ==200) {
  135. layer.msg(res.msg, {time: 1000, icon: 1});
  136. tableIn.reload();
  137. } else {
  138. layer.msg(res.msg, {time: 1000, icon: 2});
  139. }
  140. }, "json")
  141. },
  142. cancel: function(){
  143. // layer.msg('捕获就是从页面已经存在的元素上,包裹layer的结构', {time: 5000, icon:6});
  144. }
  145. });
  146. // layer.confirm('确定要进行这样的操作码', function (index) {
  147. // loading = layer.load(1, {shade: [0.1, '#fff']});
  148. // $.post("<?php echo url('status'); ?>", {id: data.id}, function (res) {
  149. // layer.close(loading);
  150. // layer.close(index);
  151. // if (res.code == 1) {
  152. // layer.msg(res.msg, {time: 1000, icon: 1});
  153. // tableIn.reload();
  154. // } else {
  155. // layer.msg(res.msg, {time: 1000, icon: 2});
  156. // }
  157. // }, "json")
  158. // })
  159. break;
  160. }
  161. });
  162. form.on('switch(status)', function (data) {
  163. });
  164. $('#search').click(function () {
  165. var $keys = $('#name').val();
  166. if (!$keys) {
  167. return layer.msg('请输入关键词');
  168. }
  169. tableIn.reload({page: {page: 1}, where: {name: $keys}});
  170. })
  171. // setInterval(function () {
  172. // tableIn.reload();
  173. // }, 50000)
  174. });
  175. </script>