截流自动化的商城平台
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.

detail.html 8.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. {layout name="layout2" /}
  2. <style>
  3. .div-flex {
  4. display: flex;
  5. align-items: center;
  6. justify-content: left;
  7. }
  8. .width-160 {
  9. width: 200px;
  10. }
  11. .layui-table th {
  12. text-align: center;
  13. }
  14. .table-margin{
  15. margin-left: 50px;
  16. margin-right: 50px;
  17. text-align: center;
  18. }
  19. .image{
  20. height:80px;
  21. width: 80px;
  22. }
  23. .mt50{
  24. margin-left: 50px;
  25. }
  26. </style>
  27. <div class="layui-card-body" >
  28. <!--基本信息-->
  29. <div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order" >
  30. <input type="hidden" class="id" name="id" value="{$detail.id}">
  31. <div class="layui-form-item">
  32. <fieldset class="layui-elem-field layui-field-title">
  33. <legend>订单信息</legend>
  34. </fieldset>
  35. </div>
  36. <div class="layui-form-item div-flex">
  37. <label class="layui-form-label ">订单编号:</label>
  38. <div class="width-160">{$detail.order_sn}</div>
  39. <label class="layui-form-label ">兑换类型:</label>
  40. <div class="width-160">{$detail.type_desc}</div>
  41. <label class="layui-form-label ">下单时间:</label>
  42. <div class="width-160">{$detail.create_time}</div>
  43. </div>
  44. <div class="layui-form-item div-flex">
  45. <label class="layui-form-label ">支付状态:</label>
  46. <div class="width-160">{$detail.pay_status_desc}</div>
  47. <label class="layui-form-label ">订单状态:</label>
  48. <div class="width-160">{$detail.order_status_desc}</div>
  49. <label class="layui-form-label ">支付方式:</label>
  50. <div class="width-160">{$detail.pay_way_desc}</div>
  51. </div>
  52. <div class="layui-form-item div-flex">
  53. <label class="layui-form-label ">支付时间:</label>
  54. <div class="width-160">{$detail.pay_time}</div>
  55. <label class="layui-form-label ">完成时间:</label>
  56. <div class="width-160">{$detail.confirm_time}</div>
  57. </div>
  58. <div class="layui-form-item">
  59. <fieldset class="layui-elem-field layui-field-title">
  60. <legend>会员信息</legend>
  61. </fieldset>
  62. </div>
  63. <div class="layui-form-item div-flex">
  64. <label class="layui-form-label ">会员编号:</label>
  65. <div class="width-160">{$detail.user.sn}</div>
  66. <label class="layui-form-label ">会员昵称:</label>
  67. <div class="width-160">{$detail.user.nickname}</div>
  68. <label class="layui-form-label ">手机号码:</label>
  69. <div class="width-160">{$detail.user.mobile}</div>
  70. </div>
  71. <div class="layui-form-item div-flex">
  72. <label class="layui-form-label ">性别:</label>
  73. <div class="width-160">{$detail.user.sex}</div>
  74. <label class="layui-form-label ">注册时间:</label>
  75. <div class="width-160">{$detail.user.create_time}</div>
  76. </div>
  77. <div class="layui-form-item">
  78. <fieldset class="layui-elem-field layui-field-title">
  79. <legend>收货信息</legend>
  80. </fieldset>
  81. </div>
  82. <div class="layui-form-item div-flex">
  83. <label class="layui-form-label ">收货人:</label>
  84. <div class="width-160">{$detail.consignee}</div>
  85. <label class="layui-form-label ">手机号:</label>
  86. <div class="width-160">{$detail.mobile}</div>
  87. <label class="layui-form-label ">收货地址:</label>
  88. <div class="width-160">{$detail.delivery_address}</div>
  89. </div>
  90. <div class="layui-form-item">
  91. <fieldset class="layui-elem-field layui-field-title">
  92. <legend>商品信息</legend>
  93. </fieldset>
  94. </div>
  95. <div class="layui-form-item table-margin">
  96. <table class="layui-table">
  97. <colgroup>
  98. <col width="250">
  99. <col width="100">
  100. <col width="200">
  101. <col width="100">
  102. <col width="100">
  103. <col width="200">
  104. </colgroup>
  105. <thead>
  106. <tr>
  107. <th>商品名称</th>
  108. <th>市场价</th>
  109. <th>兑换积分</th>
  110. <th>数量</th>
  111. <th>运费</th>
  112. <th>实付</th>
  113. </tr>
  114. </thead>
  115. <tbody>
  116. <tr>
  117. <td>
  118. <div style="text-align: left">
  119. <div class="layui-col-md4" >
  120. <img src="{$detail.goods_snap.image}" class="image-show image" >
  121. </div>
  122. <div class="layui-col-md8" >
  123. <p style="margin-top: 10px; margin-left: 10px">{$detail.goods_snap.name}</p>
  124. </div>
  125. </div>
  126. </td>
  127. <td>¥{$detail.goods_snap.market_price}</td>
  128. <td>{$detail.goods_snap.need_integral}积分{if $detail.goods_snap.exchange_way == 2}+{$detail.goods_snap.need_money}元{/if}</td>
  129. <td>{$detail.total_num}</td>
  130. <td>¥{$detail.shipping_price}</td>
  131. <td>{$detail.order_integral}积分{if $detail.order_amount > 0}+{$detail.order_amount}元{/if}</td>
  132. </tr>
  133. </tbody>
  134. </table>
  135. </div>
  136. <div class="layui-form-item">
  137. <fieldset class="layui-elem-field layui-field-title">
  138. <legend>买家留言</legend>
  139. </fieldset>
  140. </div>
  141. <div class="layui-form-item table-margin">
  142. <textarea class="layui-textarea" disabled>{$detail.user_remark}</textarea>
  143. </div>
  144. <div class="layui-form-item">
  145. <fieldset class="layui-elem-field layui-field-title">
  146. <legend>订单操作</legend>
  147. </fieldset>
  148. </div>
  149. <div class="layui-form-item div-flex ">
  150. <div class="layui-input-block ">
  151. {if $detail.order_status == 1 && $detail.delivery_way == 1}
  152. <button type="button" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="delivery">发货</button>
  153. {/if}
  154. {if $detail.order_status == 2 && $detail.delivery_way == 1}
  155. <button type="button" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="confirm">确认收货</button>
  156. {/if}
  157. <button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 " id="back">返回</button>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. <script type="text/javascript">
  163. //注意:选项卡 依赖 element 模块,否则无法进行功能性操作
  164. layui.config({
  165. version:"{$front_version}",
  166. base: '/static/lib/' //静态资源所在路径
  167. }).use(['form'], function(){
  168. var $ = layui.$;
  169. //主图放大
  170. $(document).on('click', '.image-show', function () {
  171. var src = $(this).attr('src');
  172. like.showImg(src,400);
  173. });
  174. $('#back').click(function () {
  175. var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
  176. parent.layer.close(index);
  177. parent.layui.table.reload('order-lists');
  178. return true;
  179. });
  180. //发货
  181. $('#delivery').click(function () {
  182. var id = $('.id').val();
  183. layer.open({
  184. type: 2
  185. ,title: '订单发货'
  186. ,content: '{:url("integral.IntegralOrder/delivery")}?id='+id
  187. ,area: ['90%', '90%']
  188. ,yes: function(index, layero){
  189. }
  190. })
  191. });
  192. //确认收货
  193. $('#confirm').click(function () {
  194. var id = $('.id').val();
  195. layer.confirm('确认订单商品已收货吗??', {
  196. btn: ['确认','取消'] //按钮
  197. }, function(){
  198. like.ajax({
  199. url: '{:url("integral.IntegralOrder/confirm")}'
  200. , data: {'id': id}
  201. , type: 'post'
  202. , success: function (res) {
  203. if (res.code == 1) {
  204. layui.layer.msg(res.msg, {
  205. offset: '15px'
  206. , icon: 1
  207. , time: 1000
  208. },function () {
  209. location.reload();
  210. });
  211. }
  212. },
  213. });
  214. });
  215. });
  216. });
  217. </script>