微信小程序
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

liist.js 5.9 KiB

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