index.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. const _Http = getApp().globalData.http;
  2. Component({
  3. properties: {
  4. list: Array
  5. },
  6. data: {
  7. viewIndex: null
  8. },
  9. methods: {
  10. handleDetail(e) {
  11. const {
  12. index
  13. } = e.currentTarget.dataset,
  14. item = this.data.list[index],
  15. pages = getCurrentPages(),
  16. page = pages[pages.length - 1];
  17. _Http.basic({
  18. "id": 20221128144904,
  19. "content": {
  20. "sa_projectid": page.data.detail.sa_projectid,
  21. "sa_projtaskmagid": item.sa_projtaskmagid,
  22. "sa_projstagemagid": item.sa_projtaskmagid || 0,
  23. "pageNumber": 1,
  24. "pageSize": 999
  25. }
  26. }).then(res => {
  27. console.log(res)
  28. if (res.msg != '成功') return wx.showToast({
  29. title: res.msg,
  30. icon: "none"
  31. });
  32. this.setData({
  33. viewIndex: index == this.data.viewIndex ? null : index,
  34. workList: res.data
  35. })
  36. })
  37. },
  38. selectClient(e) {
  39. const {
  40. item
  41. } = e.currentTarget.dataset,
  42. pages = getCurrentPages(),
  43. page = pages[pages.length - 1];
  44. console.log(item)
  45. wx.navigateTo({
  46. url: '/packageA/select/setclient/select?params=' + JSON.stringify({
  47. id: 20221129152204,
  48. model: "#Task",
  49. content: {
  50. nocache: true,
  51. sa_projectid: page.data.detail.sa_projectid,
  52. "sa_projtaskmagid": item.sa_projtaskmagid,
  53. pageNumber: 1,
  54. pageTotal: 1,
  55. pageSize: 20,
  56. total: null,
  57. where: {
  58. condition: "",
  59. }
  60. },
  61. }),
  62. })
  63. },
  64. }
  65. })