微信小程序
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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