微信小程序
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

detail.js 2.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. // pages/transaction/transactionDetail/transactionDetail.js
  2. import * as UTIL from '../../../utils/util.js';
  3. import * as API from '../../../utils/API.js';
  4. let EVN_CONFIG = require('../../../env/env');
  5. const app = getApp();
  6. Page({
  7. /**
  8. * 页面的初始数据
  9. */
  10. data: {
  11. isIPX: app.globalData.isIPX,
  12. form:{}
  13. },
  14. /**
  15. * 生命周期函数--监听页面加载
  16. */
  17. onLoad(options) {
  18. var that = this ;
  19. let array = JSON.parse(options.options);
  20. // 账户分类 字典查询
  21. UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'town_account_type', {method:'GET'}, {
  22. success: (res) => {
  23. that.setData({
  24. townAccountTypeOptions:res.data,
  25. })
  26. }
  27. })
  28. // 管控类型 字典查询
  29. UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'cashier_account_management_control_type', {method:'GET'}, {
  30. success: (res) => {
  31. that.setData({
  32. managementControlTypeOptions:res.data,
  33. })
  34. array.managementControlTypeText = UTIL.getTransform(array.managementControlType,res.data);
  35. }
  36. })
  37. //中心账套查询
  38. UTIL.httpRequest(API.URL_GET_GETTACCOUNTCENTRAL, {method:'GET'}, {
  39. success: (res2) => {
  40. array.centralBookIdText = res2.data.filter(function (e) { return e.id == array.centralBookId; })[0].bookName;
  41. that.setData({
  42. centralBookIdOptions:res2.data,
  43. })
  44. }
  45. })
  46. if (array.managementControlType == 2) {
  47. //会计科目查询
  48. UTIL.httpRequest(API.URL_GET_GETACCOUNTCENTRAL, {method:'GET',bookId:array.centralBookId}, {
  49. success: (res2) => {
  50. array.centralSubjectIdText = res2.data.filter(function (e) { return e.subjectId == array.centralSubjectId; })[0].subjectName;
  51. that.setData({
  52. centralSubjectIdOptions:res2.data,
  53. })
  54. }
  55. })
  56. }
  57. setTimeout(function(){
  58. that.setData({
  59. form:array
  60. })
  61. },3000)
  62. },
  63. back:function(){
  64. wx.navigateBack({
  65. delta: 1
  66. })
  67. },
  68. /**
  69. * 生命周期函数--监听页面初次渲染完成
  70. */
  71. onReady() {
  72. },
  73. /**
  74. * 生命周期函数--监听页面显示
  75. */
  76. onShow() {
  77. },
  78. /**
  79. * 生命周期函数--监听页面隐藏
  80. */
  81. onHide() {
  82. },
  83. /**
  84. * 生命周期函数--监听页面卸载
  85. */
  86. onUnload() {
  87. },
  88. /**
  89. * 页面相关事件处理函数--监听用户下拉动作
  90. */
  91. onPullDownRefresh() {
  92. },
  93. /**
  94. * 页面上拉触底事件的处理函数
  95. */
  96. onReachBottom() {
  97. },
  98. /**
  99. * 用户点击右上角分享
  100. */
  101. onShareAppMessage() {
  102. }
  103. })