微信小程序
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
2.7 KiB

  1. // pages/apply/index.js
  2. const app = getApp();
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. isIPX: app.globalData.isIPX,
  9. <<<<<<< Updated upstream
  10. show:false
  11. =======
  12. show:false,
  13. accountList:[],
  14. bookName:''
  15. >>>>>>> Stashed changes
  16. },
  17. /**
  18. * 生命周期函数--监听页面加载
  19. */
  20. onLoad: function (options) {
  21. },
  22. //跳转支出申请
  23. swichPaymentApply:function(e){
  24. console.log(e.currentTarget.dataset.current);
  25. // let cur = e.currentTarget.dataset.current;
  26. // if (this.data.currentTaB == cur) {
  27. // return false;
  28. // }else{
  29. // wx.navigateTo({
  30. // url: '../inCome/index?id=' + id,
  31. // })
  32. // }
  33. wx.navigateTo({
  34. url: '/pages/apply/paymentTemplate/add/add',
  35. })
  36. },
  37. openBox:function(){
  38. var that = this ;
  39. that.setData({
  40. show: true,
  41. })
  42. },
  43. closeBox:function(){
  44. var that = this ;
  45. that.setData({
  46. show: false,
  47. })
  48. },
  49. goTemplate:function(){
  50. wx.navigateTo({
  51. url: 'paymentTemplate/paymentTemplate'
  52. })
  53. },
  54. back:function(){
  55. wx.navigateBack({
  56. delta: 1
  57. })
  58. },
  59. /**
  60. * 生命周期函数--监听页面初次渲染完成
  61. */
  62. onReady: function () {
  63. },
  64. /**
  65. * 生命周期函数--监听页面显示
  66. */
  67. onShow: function () {
  68. <<<<<<< Updated upstream
  69. =======
  70. var that = this;
  71. var sendData = {
  72. pageNum:'1',
  73. pageSize:'100',
  74. accountName:'',
  75. bankAccountNumber:'',
  76. status:'N',
  77. method:'GET'
  78. }
  79. UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, {
  80. success: (res) => {
  81. if (res.code == API.SUCCESS_CODE) {
  82. this.setData({bookName:res.user.bookName})
  83. }
  84. }
  85. })
  86. UTIL.httpRequest(API.URL_GET_APPROVALITEMSLIST, {method:'GET',dataType:'1'}, {
  87. success: (res) => {
  88. if (res.code == API.SUCCESS_CODE) {
  89. }
  90. }
  91. })
  92. UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData,{
  93. success: (res) => {
  94. for (let i = 0; i < res.rows.length; i++) {
  95. res.rows[i].bankAccountNumber = res.rows[i].bankAccountNumber.replace(/(\d{4})(?=\d)/g, "$1 ")
  96. }
  97. console.log(res.rows)
  98. that.setData({
  99. accountList:res.rows
  100. })
  101. }
  102. })
  103. >>>>>>> Stashed changes
  104. },
  105. /**
  106. * 生命周期函数--监听页面隐藏
  107. */
  108. onHide: function () {
  109. },
  110. /**
  111. * 生命周期函数--监听页面卸载
  112. */
  113. onUnload: function () {
  114. },
  115. /**
  116. * 页面相关事件处理函数--监听用户下拉动作
  117. */
  118. onPullDownRefresh: function () {
  119. },
  120. /**
  121. * 页面上拉触底事件的处理函数
  122. */
  123. onReachBottom: function () {
  124. },
  125. /**
  126. * 用户点击右上角分享
  127. */
  128. onShareAppMessage: function () {
  129. }
  130. })