三元财务UI

InvoiceList.js 1.2KB

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