remitDetail.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // packageA/remitVoucher/modules/remitDetail.js
  2. const _Http = getApp().globalData.http
  3. Component({
  4. /**
  5. * 组件的属性列表
  6. */
  7. properties: {
  8. detail: {
  9. type: Object
  10. }
  11. },
  12. options: {
  13. addGlobalClass: true,
  14. },
  15. /**
  16. * 组件的初始数据
  17. */
  18. data: {
  19. content: {
  20. nocache: true,
  21. pageNumber: 1,
  22. pageTotal: 1,
  23. total: null
  24. }
  25. },
  26. /**
  27. * 组件的方法列表
  28. */
  29. methods: {
  30. getList(id, init) {
  31. let content = this.data.content;
  32. content.sa_paybillid = id;
  33. if (init) content.pageNumber = 1;
  34. _Http.basic({
  35. "id": "20221227092804",
  36. content
  37. }).then(res => {
  38. console.log("打款明细", res)
  39. if (res.msg != '成功') return wx.showToast({
  40. title: res.msg,
  41. icon: "none"
  42. })
  43. getCurrentPages()[getCurrentPages().length - 1].setData({
  44. "detail.accountname": res.data[0].accountname,
  45. "detail.sa_accountclassid": res.data[0].sa_accountclassid,
  46. "detail.sa_paybilldetailid": res.data[0].sa_paybilldetailid,
  47. })
  48. this.setData({
  49. list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
  50. "content.pageNumber": res.pageNumber + 1,
  51. "content.pageSize": res.pageSize,
  52. "content.pageTotal": res.pageTotal,
  53. "content.total": res.total,
  54. sa_paybillid: id
  55. })
  56. })
  57. }
  58. }
  59. })