控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {extend name="admin@index_layout"/}
  2. {block name="main"}
  3. <div class="layui-card">
  4. <div class="layui-card-header">订单列表</div>
  5. <div class="layui-card-body">
  6. <table class="layui-hide" id="currentTable" lay-filter="currentTable" data-auth-delete="{:$auth->check('cms.order/del')}"></table>
  7. </div>
  8. </div>
  9. {/block}
  10. {block name="script"}
  11. <script>
  12. layui.use('yznTable', function() {
  13. var yznTable = layui.yznTable;
  14. var init = {
  15. table_elem: '#currentTable',
  16. table_render_id: 'currentTable',
  17. delete_url: "{:url('del')}",
  18. };
  19. yznTable.render({
  20. init: init,
  21. toolbar: ['refresh'],
  22. url: '{:url("index")}',
  23. cols: [
  24. [
  25. { field: 'id', width: 60, title: 'ID' },
  26. { field: 'trade_sn',width: 250,align: "left", title: '订单ID' },
  27. { field: 'title', title: '标题' },
  28. { field: 'user_id', width: 80,title: '会员id' },
  29. { field: 'catid', width: 80,title: '栏目id' },
  30. { field: 'contentid', width: 80,title: '内容id' },
  31. { field: 'pay_price', width: 120, title: '支付金额', templet: '<div>{{ d.pay_price }} {{# if(d.type==1){ }} 元 {{# } else { }} 点 {{# } }}</div>' },
  32. { field: 'pay_type', width: 100, title: '支付类型'},
  33. { field: 'pay_time', width: 180, title: '支付时间',search: 'range',templet: yznTable.formatter.datetime },
  34. { field: 'create_time', width: 180, title: '创建时间' , search: 'range'},
  35. { field: 'status', width: 90, title: '订单状态',templet: yznTable.formatter.label,selectList:{'succ':'成功','failed':'失败','error':'异常','cancel':'取消','unpay':'待支付'},custom:{'succ':"green",'failed':"red",'error':"orange",'unpay':"red"}},
  36. { width:60, title: '操作',templet: yznTable.formatter.tool,operat: ['delete']}
  37. ]
  38. ],
  39. page: {}
  40. });
  41. yznTable.bindevent();
  42. });
  43. </script>
  44. {/block}