阜外心血管项目前端

InvoiceList.js 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. mui.init({})
  2. var openid = helper.cookies.get("openid");
  3. var turn = helper.request.queryString("turn");
  4. if (turn) {
  5. $(".mui-nav").show();
  6. }else{
  7. $(".cont-margin").css("margin-top","0px");
  8. }
  9. Ajax();
  10. function Ajax() {
  11. //$(".order").remove();
  12. $.ajax({
  13. url: huayi.config.callcenter_url + 'WxLogin/GetBillList',
  14. data: {
  15. openid: openid, //微信openid,
  16. },
  17. async: true,
  18. dataType: 'json',
  19. type: 'get', //HTTP请求类型
  20. success: function(data) {
  21. if(data.rows && data.rows.length > 0) {
  22. $(data.rows).each(function(i, n) {
  23. console.log(n.Customer);
  24. $('<li class="mui-table-view-cell order" data-index="' + n.F_ID + '">' +
  25. '<div class="mui-table">' +
  26. '<div class="mui-table-cell mui-col-xs-10">' +
  27. '<h4 class="mui-ellipsis">' + n.F_ProName +
  28. '</h4><h5>' + n.F_BillingTime +
  29. '</h5></div></div></li>').appendTo('#OA_task');
  30. });
  31. //工单跳转
  32. $('.order').on('tap', function() {
  33. var index = $(this).attr('data-index');
  34. window.location.href = "invoiceDetail.html?id=" + index;
  35. });
  36. } else {
  37. $(".noinfor").text("暂无信息");
  38. }
  39. },
  40. error: function(xhr, type, errorThrown) {
  41. //异常处理;
  42. }
  43. })
  44. }