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

3 年前
3 年前
3 年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. // pages/handle/liist.js
  2. import * as UTIL from '../../utils/util.js';
  3. import * as API from '../../utils/API.js';
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. active:"",
  10. pageTitle:"",
  11. // 待办列表
  12. todoList:[],
  13. // 已办列表
  14. doneList:[],
  15. // 已发起
  16. yfqList:[],
  17. // 已制单
  18. yzdList:[],
  19. //待办数量
  20. todoNum:0,
  21. //已办数量
  22. doneNum:0,
  23. //已发起数量
  24. yfqNum:0,
  25. //已制单数量
  26. yzdNum:0,
  27. index:0,
  28. array:["未提交","待审核","已审核","已挂起"],
  29. //字典
  30. transferType:[
  31. {"dictVale":1,"dictLabel":"村账户转账"},
  32. {"dictVale":2,"dictLabel":"公务卡转账"},
  33. {"dictVale":3,"dictLabel":"虚拟挂账"},
  34. {"dictVale":4,"dictLabel":"代管账户转账"},
  35. {"dictVale":5,"dictLabel":"母子转账"},
  36. {"dictVale":10,"dictLabel":"现金提现"},
  37. {"dictVale":11,"dictLabel":"现金使用"},
  38. {"dictVale":12,"dictLabel":"汇票支出"}
  39. ]
  40. },
  41. /**
  42. * 生命周期函数--监听页面加载
  43. */
  44. onLoad: function (options) {
  45. this.setData({active:options.active})
  46. if(options.active==1||options.active==2){
  47. this.setData({pageTitle:"待办/已办"})
  48. }else{
  49. this.setData({pageTitle:"发起/制单"})
  50. }
  51. //查询待办
  52. this.getTaskList();
  53. //查询已办
  54. this.getTaskDoneList();
  55. //查询已发起
  56. this.getTransferList();
  57. this.getTransferList1();
  58. //查询已制单
  59. this.getTransferList2();
  60. },
  61. bindPickerChange:function(e){zhibob
  62. this.setData({index:e.detail.value});
  63. },
  64. switchTab:function(e){
  65. this.setData({
  66. active:e.currentTarget.dataset.gid
  67. })
  68. },
  69. dictTranslate(d,value){
  70. let val = ""
  71. for(var index in d){
  72. if(d[index].dictVale==value){
  73. return val = d[index].dictLabel
  74. }
  75. }
  76. },
  77. getTaskList:function(e){
  78. let data = {
  79. pageNum:1,
  80. pageSize:10,
  81. orderByColumn:"A.ID_",
  82. isAsc:"desc",
  83. systemType:4,
  84. method:"GET"
  85. }
  86. UTIL.httpRequest(API.URL_GET_TASKLIST,data, {
  87. success: (res) => {
  88. if (res.code == API.SUCCESS_CODE) {
  89. this.setData({todoNum:res.total})
  90. this.setData({todoList:res.rows})
  91. }
  92. }, fail: (res) => {
  93. console.log(res);
  94. },
  95. complete: (res) => {
  96. console.log(res);
  97. }
  98. })
  99. },
  100. getTaskDoneList:function(e){
  101. let data = {
  102. pageNum:1,
  103. pageSize:10,
  104. orderByColumn:"A.ID_",
  105. isAsc:"desc",
  106. systemType:4,
  107. method:"GET"
  108. }
  109. UTIL.httpRequest(API.URL_GET_TASKDONELIST,data, {
  110. success: (res) => {
  111. if (res.code == API.SUCCESS_CODE) {
  112. this.setData({doneNum:res.total})
  113. this.setData({doneList:res.rows})
  114. }
  115. }, fail: (res) => {
  116. console.log(res);
  117. },
  118. complete: (res) => {
  119. console.log(res);
  120. }
  121. })
  122. },
  123. getTransferList:function(e){
  124. let data = {
  125. // pageNum:1,
  126. // pageSize:10,
  127. transferType:"1",
  128. auditStatus:"2",
  129. method:"GET",
  130. capitalExpenditureType:(this.data.index+1)
  131. }
  132. UTIL.httpRequest(API.URL_GET_TRANSFERLIST,data, {
  133. success: (res) => {
  134. if (res.code == API.SUCCESS_CODE) {
  135. console.log(res);
  136. let a = this.data.yfqNum+res.total
  137. this.setData({yfqNum:a})
  138. this.setData({yfqList:res.rows})
  139. }
  140. }, fail: (res) => {
  141. console.log(res);
  142. },
  143. complete: (res) => {
  144. console.log(res);
  145. }
  146. })
  147. },
  148. getTransferList1:function(e){
  149. let data = {
  150. // pageNum:1,
  151. // pageSize:10,
  152. transferType:"1",
  153. auditStatus:"3",
  154. method:"GET"
  155. }
  156. UTIL.httpRequest(API.URL_GET_TRANSFERLIST,data, {
  157. success: (res) => {
  158. if (res.code == API.SUCCESS_CODE) {
  159. console.log();
  160. let a = this.data.yfqNum+res.total
  161. this.setData({yfqNum:a})
  162. this.setData({yfqList:res.rows})
  163. }
  164. }, fail: (res) => {
  165. console.log(res);
  166. },
  167. complete: (res) => {
  168. console.log(res);
  169. }
  170. })
  171. },
  172. //已制单
  173. getTransferList2:function(e){
  174. let data = {
  175. // pageNum:1,
  176. // pageSize:10,
  177. transferType:"1",
  178. auditStatus:"0",
  179. method:"GET"
  180. }
  181. UTIL.httpRequest(API.URL_GET_TRANSFERLIST,data, {
  182. success: (res) => {
  183. if (res.code == API.SUCCESS_CODE) {
  184. this.setData({yzdNum:res.total})
  185. this.setData({yzdList:res.rows})
  186. }
  187. }, fail: (res) => {
  188. console.log(res);
  189. },
  190. complete: (res) => {
  191. console.log(res);
  192. }
  193. })
  194. },
  195. back:function(){
  196. wx.navigateBack({
  197. delta: 1
  198. })
  199. },
  200. /**
  201. * 生命周期函数--监听页面初次渲染完成
  202. */
  203. onReady: function () {
  204. },
  205. /**
  206. * 生命周期函数--监听页面显示
  207. */
  208. onShow: function () {
  209. },
  210. /**
  211. * 生命周期函数--监听页面隐藏
  212. */
  213. onHide: function () {
  214. },
  215. /**
  216. * 生命周期函数--监听页面卸载
  217. */
  218. onUnload: function () {
  219. },
  220. /**
  221. * 页面相关事件处理函数--监听用户下拉动作
  222. */
  223. onPullDownRefresh: function () {
  224. },
  225. /**
  226. * 页面上拉触底事件的处理函数
  227. */
  228. onReachBottom: function () {
  229. },
  230. /**
  231. * 用户点击右上角分享
  232. */
  233. onShareAppMessage: function () {
  234. }
  235. })