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.
 
 
 
 

164 lines
5.6 KiB

  1. var login_data = getStorJson("login_data");
  2. var curpage = 1;
  3. var pagesize = 10;
  4. $(document).ready(function(){
  5. order_list();
  6. $(window).scroll(function() {
  7. if ($(document).scrollTop() >= $(document).height() - $(window).height()) {
  8. curpage += 1;
  9. order_list();
  10. }
  11. });
  12. })
  13. function order_list(){
  14. $.ajax({
  15. url:'./zz-fx/control.php',
  16. data:{type:"distribut_OrderList",currpage:curpage,pagesize:pagesize},
  17. type:"post",
  18. dataType: "json",
  19. success: function (data) {
  20. console.log(data);
  21. if(data.code == 0){
  22. createHtml(data.searchInfo);
  23. }
  24. },
  25. fail: function (date) {
  26. alert("数据加载失败");
  27. }
  28. });
  29. }
  30. function createHtml(data){
  31. var temp="";
  32. var ind = "";
  33. for(var i = 0;i<data.length;i++){
  34. if(data[i].go_pay==0){
  35. ind = "";
  36. }else if(data[i].go_pay==1){
  37. ind = '<div style="width:1%;" order_id="'+data[i].order_id+'" ifdisney="'+data[i].ifdisney+'" class="ub-f1 text_middle ui_btn_border ui_p_l10 ui_p_r10 ui_p_t05 ui_p_b05 gopay_ticket">去支付</div>'
  38. }else{
  39. ind = '<div style="width:1%;" order_id="'+data[i].order_id+'" class="ub-f1 text_middle ui_btn_border ui_p_l10 ui_p_r10 ui_p_t05 ui_p_b05 exit_ticket">退票</div>'
  40. }
  41. if(data[i].ifdisney==1){
  42. temp += '<div class="umar-a-15 sg-bg ub ub-ver">'
  43. + '<div class="ub ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border">'
  44. + '<div style="width: 1%;" class="ub-f2 ui_p_t15 ui_p_b15">'
  45. +'<span>'+data[i].pic_type+'</span><span>('+data[i].order_id+')</span>'
  46. + '</div>'
  47. + '<div style="width: 1%;" class="ub-f1 text_right ui_p_t15 ui_p_b15">'+data[i].order_pay_type+'</div>'
  48. + '<div style="width: 1%;" class="ub-f1 text_right ui_p_t15 ui_p_b15">'+data[i].order_status+'</div>'
  49. + '</div>'
  50. + '<div class="ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border ">'
  51. + '<div class=" ui_p_t15 ">'+data[i].product_info+'</div>'
  52. + '<div class=" ui_p_t10 ui_p_b15">'
  53. + '<span>'+data[i].run_time+' 出发</span>'
  54. + '<span class="ui_p_l20">'+data[i].tic_info+'</span>'
  55. + '</div>'
  56. + '</div>'
  57. + '<div class="ub ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border">'
  58. + '<div class="ui_p_b15 ui_p_t15" id="">'
  59. + '<div id="">'
  60. + '<span>联 系 人:</span>'
  61. + '<span class="ui_p_l10">'+data[i].customer_name+'</span>'
  62. + '<span class="ui_p_l15">'+data[i].customer_mobile+'</span>'
  63. + '</div>'
  64. + '</div>'
  65. + '</div>'
  66. + '<div class="ub ub-f1 ui_m_l10 ui_m_r10">'
  67. + '<div class="ub ub-f1 ui_p_b10 ui_p_t10" id="">'
  68. + '<div class="ub-f3 ui_p_t05 ui_p_b05" style="font-size: 0.14rem;width:1%;">¥'+data[i].order_pay+'</div>'
  69. + ind
  70. + '</div>'
  71. + '</div>'
  72. + '</div>'
  73. }else if(data[i].ifdisney==0){
  74. temp += '<div class="umar-a-15 sg-bg ub ub-ver">'
  75. + '<div class="ub ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border">'
  76. + '<div style="width: 1%;" class="ub-f2 ui_p_t15 ui_p_b15">'
  77. + '<span>'+data[i].pic_type+'</span><span>('+data[i].order_id+')</span>'
  78. + '</div>'
  79. + '<div style="width: 1%;" class="ub-f1 text_right ui_p_t15 ui_p_b15">'+data[i].order_pay_type+'</div>'
  80. + '<div style="width: 1%;" class="ub-f1 text_right ui_p_t15 ui_p_b15">'+data[i].order_status+'</div>'
  81. + '</div>'
  82. + '<div class="ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border ">'
  83. + '<div class=" ui_p_t15 ">'
  84. + '<span>'+data[i].product_info+'</span>'
  85. + '<span class="ui_p_l20">7月28日 出发</span>'
  86. + '</div>'
  87. + '<div class=" ui_p_t10 ui_p_b15">'
  88. + '<span>'+data[i].tic_info+'</span>'
  89. + '</div>'
  90. + '</div>'
  91. + '<div class="ub ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border">'
  92. + '<div class="ub-f1 ui_p_b15 ui_p_t10 " id="">'
  93. + '<span>联系人:</span>'
  94. + '</div>'
  95. + '<div class="ub-f3">'
  96. + '<div class=" ui_p_t10">'
  97. + '<span class="">'+data[i].customer_name+'</span>'
  98. + '<span class="ui_p_l15">'+data[i].customer_mobile+'</span>'
  99. + '</div>'
  100. + '<div class="ui_p_b15 ui_p_t10" id="">'
  101. + '<span>证件号</span>'
  102. + '<span class="ui_p_l10">'+data[i].customer_id_no+'</span>'
  103. + '</div>'
  104. + '</div>'
  105. + '</div>'
  106. + '<div class="ub ub-f1 ui_m_l10 ui_m_r10">'
  107. + '<div class="ub ub-f1 ui_p_b10 ui_p_t10" id="">'
  108. + '<div class="ub-f3 ui_p_t05 ui_p_b05" style="font-size: 0.14rem;width:1%;">¥'+data[i].order_pay+'</div>'
  109. + ind
  110. + '</div>'
  111. + '</div>'
  112. + '</div>'
  113. }
  114. }
  115. $("#order_list").append(temp);
  116. $(".gopay_ticket").click(function(){
  117. var order_id = $(this).attr("order_id");
  118. var ifdisney = $(this).attr("ifdisney");
  119. $.ajax({
  120. url:'./zz-fx/Api/heyk_pay_detail_info.php', //请求地址
  121. type: "post", //请求方式
  122. data:{
  123. order_id:order_id,
  124. ifdisney:ifdisney
  125. },
  126. dataType: "json",
  127. success: function (data) {
  128. console.log(data);
  129. if(data.code == 0){
  130. if(ifdisney==0){
  131. setStorJson("resever_succsee",data);
  132. window.location.href="pay_order_disney.html";
  133. }else{
  134. setStorJson("submite_success",data);
  135. window.location.href="pay_order.html";
  136. }
  137. }else if(data.code == 1){
  138. alert(data.info);
  139. }
  140. },
  141. fail: function (date) {
  142. // 此处放失败后执行的代码
  143. }
  144. });
  145. })
  146. $(".exit_ticket").click(function(){
  147. setStorage("order_id",$(this).attr("order_id"));
  148. window.location.href="refund_ticket.html";
  149. })
  150. }