wfwzxxcx.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. // pages/minePages/wfwzxxcx/wfwzxxcx.js
  2. import {
  3. xcxGetCompanyList,
  4. } from "../../../apis/index"
  5. import {
  6. illegalInformationSelect,
  7. } from "../../../apis/smzc"
  8. Page({
  9. /**
  10. * 页面的初始数据
  11. */
  12. data: {
  13. enterpriceTypeShow: false,
  14. enterPriceList: [],
  15. enterPrice: {},
  16. startDate: "",
  17. endDate: "",
  18. resultList: []
  19. },
  20. /**
  21. * 生命周期函数--监听页面加载
  22. */
  23. onLoad(options) {
  24. let that = this
  25. that.init()
  26. },
  27. init() {
  28. let that = this
  29. let date = new Date()
  30. let y = date.getFullYear()
  31. let m = date.getMonth() + 1
  32. m = m < 10 ? '0' + m : m
  33. let d = date.getDate()
  34. d = d < 10 ? '0' + d : d
  35. let start = `${y-1}-${m}-${d}`
  36. let end = `${y}-${m}-${d}`
  37. that.setData({
  38. startDate: start,
  39. endDate: end
  40. })
  41. that.cx()
  42. },
  43. selectEnterprice() {
  44. let that = this
  45. wx.showLoading({
  46. title: '正在获取企业信息',
  47. })
  48. that.setData({
  49. enterpriceTypeShow: true
  50. })
  51. xcxGetCompanyList({
  52. xm: wx.getStorageSync('USERINFO').name,
  53. sfzjhm: wx.getStorageSync('USERINFO').idcard
  54. }).then(res => {
  55. wx.hideLoading()
  56. if (res.code == 200) {
  57. that.setData({
  58. enterPriceList: res.list
  59. })
  60. } else {
  61. wx.showToast({
  62. title: res.msg || res.message,
  63. icon: "none",
  64. duration: 5000
  65. })
  66. }
  67. })
  68. },
  69. selectedEnterprice(e) {
  70. let that = this
  71. let item = e.currentTarget.dataset.item
  72. that.setData({
  73. enterpriceTypeShow: false,
  74. enterPrice: item
  75. })
  76. that.cx()
  77. },
  78. close() {
  79. let that = this
  80. that.setData({
  81. enterpriceTypeShow: false
  82. })
  83. },
  84. cx() {
  85. let that = this
  86. let enterprice = that.data.enterPrice
  87. if (enterprice.djxh) {
  88. wx.showLoading({
  89. title: '正在查询...',
  90. })
  91. let form = {
  92. sjgsdq: "",
  93. dqrq: "",
  94. djxh: that.data.enterPrice.djxh,
  95. nsrsbh: that.data.enterPrice.nsrsbh,
  96. headVo: {
  97. jqbh: null,
  98. sjjg: "16109970500",
  99. sjry: "96109970015",
  100. }
  101. }
  102. illegalInformationSelect(form).then(res => {
  103. wx.hideLoading()
  104. if (res.code == 200) {
  105. that.setData({
  106. resultList: res.data.wfwzxxGridlb
  107. })
  108. } else {
  109. wx.showToast({
  110. title: res.msg || res.message,
  111. icon: "none",
  112. duration: 3000
  113. })
  114. }
  115. })
  116. }
  117. },
  118. /**
  119. * 生命周期函数--监听页面初次渲染完成
  120. */
  121. onReady() {
  122. },
  123. /**
  124. * 生命周期函数--监听页面显示
  125. */
  126. onShow() {
  127. },
  128. /**
  129. * 生命周期函数--监听页面隐藏
  130. */
  131. onHide() {
  132. },
  133. /**
  134. * 生命周期函数--监听页面卸载
  135. */
  136. onUnload() {
  137. },
  138. /**
  139. * 页面相关事件处理函数--监听用户下拉动作
  140. */
  141. onPullDownRefresh() {
  142. },
  143. /**
  144. * 页面上拉触底事件的处理函数
  145. */
  146. onReachBottom() {
  147. },
  148. /**
  149. * 用户点击右上角分享
  150. */
  151. onShareAppMessage() {
  152. }
  153. })