detail.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!-- <link href="__CDN__/assets/libs/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> -->
  2. <script src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
  3. <script src="__CDN__/assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
  4. <table class="table table-striped">
  5. <thead>
  6. <tr>
  7. <th>{:__('订单ID')}</th>
  8. <th>{:__('订单号')}</th>
  9. <th>{:__('商品')}</th>
  10. <th>{:__('图片')}</th>
  11. <th>{:__('状态')}</th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. {volist name="row" id="vo" }
  16. <tr>
  17. <td>{$vo.id}</td>
  18. <td>{$vo.order_no}</td>
  19. <td>{$vo.zh_name|htmlentities}</td>
  20. <td><img src="{$vo.thum|htmlentities}" width="100px" height="80px"></td>
  21. <td>
  22. {switch name="vo.status"}
  23. {case value="0"}
  24. <span class="label label-success">{$vo.status_txt}</span>
  25. {/case}
  26. {case value="1"}
  27. <span class="label label-success">{$vo.status_txt}</span>
  28. {/case}
  29. {case value="2"}
  30. <span class="label label-success">{$vo.status_txt}</span>
  31. {/case}
  32. {case value="3"}
  33. <span class="label label-success">{$vo.status_txt}</span>
  34. {/case}
  35. {case value="4"}
  36. <span class="label label-danger">{$vo.status_txt}</span>
  37. {/case}
  38. {case value="5"}
  39. <span class="label label-default">{$vo.status_txt}</span>
  40. {/case}
  41. {case value="6"}
  42. <span class="label label-success">{$vo.status_txt}</span>
  43. {eq name="userpledge_status" value="0"}
  44. <a href="javascript:;" class="btn btn-xs btn-danger cancelStorage" data-id="{$vo.id}">{:__('Cancel storage')}</a>
  45. {/eq}
  46. {/case}
  47. {default /}
  48. {/switch}
  49. </td>
  50. </tr>
  51. {/volist}
  52. </tbody>
  53. </table>
  54. <div class="hide layer-footer">
  55. <label class="control-label col-xs-12 col-sm-2"></label>
  56. <div class="col-xs-12 col-sm-8">
  57. <button type="reset" class="btn btn-primary btn-embossed btn-close"
  58. onclick="Layer.closeAll();">{:__('Close')}</button>
  59. </div>
  60. </div>
  61. <script>
  62. $(function () {
  63. $(".cancelStorage").click(function () {
  64. var id = $(this).data('id');
  65. $.ajax({
  66. url: "user/Userpledge/cancelStorage",
  67. type: "POST",
  68. data: { id: id },
  69. dataType: "json",
  70. success: function(response) {
  71. if(response==1){
  72. window.location.reload(); // 刷新父页面
  73. }
  74. },
  75. error: function(xhr, status, error) {
  76. console.error("请求失败", error);
  77. },
  78. complete: function() {
  79. console.log("请求完成(无论成功/失败)");
  80. }
  81. });
  82. })
  83. })
  84. </script>