index.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?php
  2. use app\common\service\wechat\wow\Order as WowOrderService;
  3. ?>
  4. <div class="row-content am-cf">
  5. <div class="row">
  6. <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
  7. <div class="widget am-cf">
  8. <div class="widget-head am-cf">
  9. <div class="widget-title am-cf"> 订单同步记录</div>
  10. </div>
  11. <div class="widget-body am-fr">
  12. <div class="tips am-margin-bottom am-u-sm-12">
  13. <div class="pre">
  14. <p> 注:用户下单(付款)后,自动同步到微信好物圈订单信息。</p>
  15. </div>
  16. </div>
  17. <!-- 工具栏 -->
  18. <div class="page_toolbar am-margin-bottom am-cf">
  19. <form class="toolbar-form" action="">
  20. <input type="hidden" name="s" value="/<?= $request->pathinfo() ?>">
  21. <div class="am-u-sm-12 am-u-md-9 am-u-sm-push-3">
  22. <div class="am fr">
  23. <div class="am-form-group am-fl">
  24. <div class="am-input-group am-input-group-sm tpl-form-border-form">
  25. <input type="text" class="am-form-field" name="search"
  26. placeholder="请输入订单号/用户昵称"
  27. value="<?= $request->get('search') ?>">
  28. <div class="am-input-group-btn">
  29. <button class="am-btn am-btn-default am-icon-search"
  30. type="submit"></button>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. </form>
  37. </div>
  38. <div class="am-scrollable-horizontal am-u-sm-12">
  39. <table width="100%" class="am-table am-table-compact am-table-striped
  40. tpl-table-black am-text-nowrap">
  41. <thead>
  42. <tr>
  43. <th>ID</th>
  44. <th>用户头像</th>
  45. <th>用户昵称</th>
  46. <th>订单编号</th>
  47. <th>付款金额</th>
  48. <th>订单状态</th>
  49. <th>最后同步时间</th>
  50. <th>创建时间</th>
  51. <th>操作</th>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. <?php if (!$list->isEmpty()): foreach ($list as $item): ?>
  56. <tr>
  57. <td class="am-text-middle"><?= $item['id'] ?></td>
  58. <td class="am-text-middle">
  59. <a href="<?= $item['user']['avatarUrl'] ?>" target="_blank">
  60. <img src="<?= $item['user']['avatarUrl'] ?>"
  61. width="70" height="70" alt="用户头像">
  62. </a>
  63. </td>
  64. <td class="am-text-middle">
  65. <p class=""><?= $item['user']['nickName'] ?></p>
  66. <p class="am-link-muted">(用户id:<?= $item['user']['user_id'] ?>)</p>
  67. </td>
  68. <td class="am-text-middle">
  69. <a href="<?= url('order/detail', ['order_id' => $item['order_id']]) ?>"
  70. title="查看订单详情" target="_blank">
  71. <?= $item['order_no'] ?>
  72. </a>
  73. </td>
  74. <td class="am-text-middle"><?= $item['pay_price'] ?></td>
  75. <td class="am-text-middle">
  76. <span class="am-badge am-badge-secondary"><?= WowOrderService::status()[$item['status']] ?></span>
  77. </td>
  78. <td class="am-text-middle"><?= $item['last_time']['text'] ?></td>
  79. <td class="am-text-middle"><?= $item['create_time'] ?></td>
  80. <td class="am-text-middle">
  81. <div class="tpl-table-black-operation">
  82. <?php if (checkPrivilege('apps.wow.order/delete')): ?>
  83. <a href="javascript:void(0);"
  84. class="item-delete tpl-table-black-operation-default"
  85. data-id="<?= $item['id'] ?>">
  86. <i class="am-icon-trash"></i> 取消同步
  87. </a>
  88. <?php endif; ?>
  89. </div>
  90. </td>
  91. </tr>
  92. <?php endforeach; else: ?>
  93. <tr>
  94. <td colspan="9" class="am-text-center">暂无记录</td>
  95. </tr>
  96. <?php endif; ?>
  97. </tbody>
  98. </table>
  99. </div>
  100. <div class="am-u-lg-12 am-cf">
  101. <div class="am-fr"><?= $list->render() ?> </div>
  102. <div class="am-fr pagination-total am-margin-right">
  103. <div class="am-vertical-align-middle">总记录:<?= $list->total() ?></div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <script>
  112. $(function () {
  113. // 删除元素
  114. var url = "<?= url('apps.wow.order/delete') ?>";
  115. $('.item-delete').delete('id', url, '取消后,用户好物圈中将不再显示该订单,确定吗?');
  116. });
  117. </script>