index.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <div class="row-content am-cf">
  2. <div class="row">
  3. <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
  4. <div class="widget am-cf">
  5. <div class="widget-head am-cf">
  6. <div class="widget-title am-cf">售后列表</div>
  7. </div>
  8. <div class="widget-body am-fr">
  9. <!-- 工具栏 -->
  10. <div class="page_toolbar am-margin-bottom-xs am-cf">
  11. <form class="toolbar-form" action="">
  12. <input type="hidden" name="s" value="/<?= $request->pathinfo() ?>">
  13. <div class="am-u-sm-12 am-u-md-12">
  14. <div class="am fr">
  15. <div class="am-form-group tpl-form-border-form am-fl">
  16. <input type="text" name="start_time"
  17. class="am-form-field"
  18. value="<?= $request->get('start_time') ?>" placeholder="请选择起始日期"
  19. data-am-datepicker>
  20. </div>
  21. <div class="am-form-group tpl-form-border-form am-fl">
  22. <input type="text" name="end_time"
  23. class="am-form-field"
  24. value="<?= $request->get('end_time') ?>" placeholder="请选择截止日期"
  25. data-am-datepicker>
  26. </div>
  27. <div class="am-form-group am-fl">
  28. <select name="type"
  29. data-am-selected="{btnSize: 'sm', placeholder: '售后类型'}">
  30. <option value=""></option>
  31. <option value="10" <?= $request->get('type') === '10' ? 'selected' : '' ?>>
  32. 退货退款
  33. </option>
  34. <option value="20" <?= $request->get('type') === '20' ? 'selected' : '' ?>>
  35. 换货
  36. </option>
  37. </select>
  38. </div>
  39. <div class="am-form-group am-fl">
  40. <select name="state"
  41. data-am-selected="{btnSize: 'sm', placeholder: '处理状态'}">
  42. <option value=""></option>
  43. <option value="0" <?= $request->get('state') === '0' ? 'selected' : '' ?>>
  44. 进行中
  45. </option>
  46. <option value="10" <?= $request->get('state') === '10' ? 'selected' : '' ?>>
  47. 已拒绝
  48. </option>
  49. <option value="20" <?= $request->get('state') === '20' ? 'selected' : '' ?>>
  50. 已完成
  51. </option>
  52. </select>
  53. </div>
  54. <div class="am-form-group am-fl">
  55. <div class="am-input-group am-input-group-sm tpl-form-border-form">
  56. <input type="text" class="am-form-field" name="order_no"
  57. placeholder="请输入订单号"
  58. value="<?= $request->get('order_no') ?>">
  59. <div class="am-input-group-btn">
  60. <button class="am-btn am-btn-default am-icon-search"
  61. type="submit"></button>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </form>
  68. </div>
  69. <div class="order-list am-scrollable-horizontal am-u-sm-12 am-margin-top-xs">
  70. <table width="100%" class="am-table am-table-centered
  71. am-text-nowrap am-margin-bottom-xs">
  72. <thead>
  73. <tr>
  74. <th width="24%" class="goods-detail">商品信息</th>
  75. <th width="10%">单价/数量</th>
  76. <th width="15%">付款价</th>
  77. <th>买家</th>
  78. <th>售后类型</th>
  79. <th>处理状态</th>
  80. <th>操作</th>
  81. </tr>
  82. </thead>
  83. <tbody>
  84. <?php if (!$list->isEmpty()): foreach ($list as $item): ?>
  85. <tr class="order-empty">
  86. <td colspan="7"></td>
  87. </tr>
  88. <tr>
  89. <td class="am-text-middle am-text-left" colspan="7">
  90. <span class="am-margin-right-lg">售后申请时间:<?= $item['create_time'] ?></span>
  91. <span class="am-margin-right-lg">订单号:<?= $item['order_no'] ?></span>
  92. </td>
  93. </tr>
  94. <tr>
  95. <td class="goods-detail am-text-middle">
  96. <div class="goods-image">
  97. <img src="<?= $item['order_goods']['image']['file_path'] ?>"
  98. alt="">
  99. </div>
  100. <div class="goods-info">
  101. <p class="goods-title"><?= $item['order_goods']['goods_name'] ?></p>
  102. <p class="goods-spec am-link-muted"><?= $item['order_goods']['goods_attr'] ?></p>
  103. </div>
  104. </td>
  105. <td class="am-text-middle">
  106. <p>¥<?= $item['order_goods']['goods_price'] ?></p>
  107. <p>×<?= $item['order_goods']['total_num'] ?></p>
  108. </td>
  109. <td class="am-text-middle">
  110. <p>¥<?= $item['order_goods']['total_pay_price'] ?></p>
  111. </td>
  112. <td class="am-text-middle">
  113. <p><?= $item['user']['nickName'] ?></p>
  114. <p class="am-link-muted">(用户id:<?= $item['user']['user_id'] ?>)</p>
  115. </td>
  116. <td class="am-text-middle">
  117. <span class="am-badge am-badge-secondary"> <?= $item['type']['text'] ?> </span>
  118. </td>
  119. <td class="am-text-middle">
  120. <?php if ($item['status']['value'] == 0): ?>
  121. <!-- 审核状态-->
  122. <p>
  123. <span>商家审核:</span>
  124. <?php if ($item['is_agree']['value'] == 0): ?>
  125. <span class="am-badge"> <?= $item['is_agree']['text'] ?> </span>
  126. <?php elseif ($item['is_agree']['value'] == 10): ?>
  127. <span class="am-badge am-badge-success"> <?= $item['is_agree']['text'] ?> </span>
  128. <?php elseif ($item['is_agree']['value'] == 20): ?>
  129. <span class="am-badge am-badge-warning"> <?= $item['is_agree']['text'] ?> </span>
  130. <?php endif; ?>
  131. </p>
  132. <!-- 发货状态-->
  133. <?php if ($item['type']['value'] == 10 && $item['is_agree']['value'] == 10): ?>
  134. <p>
  135. <span>用户发货:</span>
  136. <?php if ($item['is_user_send'] == 0): ?>
  137. <span class="am-badge"> 待发货 </span>
  138. <?php else: ?>
  139. <span class="am-badge am-badge-success"> 已发货 </span>
  140. <?php endif; ?>
  141. </p>
  142. <?php endif; ?>
  143. <!-- 商家收货状态-->
  144. <?php if (
  145. $item['type']['value'] == 10
  146. && $item['is_agree']['value'] == 10
  147. && $item['is_user_send'] == 1
  148. && $item['is_receipt'] == 0
  149. ): ?>
  150. <p><span>商家收货:</span> <span class="am-badge">待收货</span></p>
  151. <?php endif; ?>
  152. <?php elseif ($item['status']['value'] == 20): ?>
  153. <span class="am-badge am-badge-success"> <?= $item['status']['text'] ?> </span>
  154. <?php elseif ($item['status']['value'] == 10 || $item['status']['value'] == 30): ?>
  155. <span class="am-badge am-badge-warning"> <?= $item['status']['text'] ?> </span>
  156. <?php endif; ?>
  157. </td>
  158. <td class="am-text-middle">
  159. <?php $url = url('order.refund/detail', ['order_refund_id' => $item['order_refund_id']]); ?>
  160. <div class="tpl-table-black-operation">
  161. <?php if (checkPrivilege('order.refund/detail')): ?>
  162. <a class="tpl-table-black-operation-green"
  163. href="<?= $url ?>">售后详情</a>
  164. <?php endif; ?>
  165. <?php if (checkPrivilege(['order.refund/detail', 'order.refund/audit'])): ?>
  166. <?php if ($item['is_agree']['value'] == 0): ?>
  167. <a class="tpl-table-black-operation-del"
  168. href="<?= $url ?>#audit">去审核</a>
  169. <?php endif; ?>
  170. <?php endif; ?>
  171. <?php if (checkPrivilege(['order.refund/detail', 'order.refund/receipt'])): ?>
  172. <?php if (
  173. $item['type']['value'] == 10
  174. && $item['is_agree']['value'] == 10
  175. && $item['is_user_send'] == 1
  176. && $item['is_receipt'] == 0
  177. ): ?>
  178. <a class="tpl-table-black-operation-del"
  179. href="<?= $url ?>#receipt">确认收货</a>
  180. <?php endif; ?>
  181. <?php endif; ?>
  182. </div>
  183. </td>
  184. </tr>
  185. <?php endforeach; else: ?>
  186. <tr>
  187. <td colspan="7" class="am-text-center">暂无记录</td>
  188. </tr>
  189. <?php endif; ?>
  190. </tbody>
  191. </table>
  192. </div>
  193. <div class="am-u-lg-12 am-cf">
  194. <div class="am-fr"><?= $list->render() ?> </div>
  195. <div class="am-fr pagination-total am-margin-right">
  196. <div class="am-vertical-align-middle">总记录:<?= $list->total() ?></div>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. <script>
  205. $(function () {
  206. });
  207. </script>