index.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Page({
  2. data: {
  3. ownertable: null,
  4. ownerid: null,
  5. detail: {},
  6. tabbarList: [{
  7. icon: "icon-bianji",
  8. label: "编辑"
  9. }, {
  10. icon: "icon-shanchu",
  11. label: "作废"
  12. }]
  13. },
  14. onLoad(options) {
  15. this.setData({
  16. ownertable: options.ownertable,
  17. ownerid: options.ownerid,
  18. detail: {
  19. ...wx.getStorageSync('temporary')
  20. }
  21. })
  22. wx.removeStorage("temporary");
  23. },
  24. tabbarOnClick({
  25. detail
  26. }) {
  27. const pages = getCurrentPages(),
  28. item = this.data.detail;
  29. switch (detail.label) {
  30. case "编辑":
  31. wx.navigateTo({
  32. url: `/packageA/setclient/modules/trace/add/index?ownertable=${this.data.ownertable}&ownerid=${this.data.ownerid}&content=${item.content}&type=${item.type}&sys_datafollowupid=${item.sys_datafollowupid}`
  33. });
  34. break;
  35. case "作废":
  36. wx.navigateTo({
  37. url: `/packageA/setclient/modules/trace/list/delete?item=${JSON.stringify({
  38. "sys_datafollowupid": item.sys_datafollowupid,
  39. "ownertable": this.data.ownertable,
  40. "ownerid": this.data.ownerid
  41. })}`,
  42. })
  43. break;
  44. }
  45. },
  46. onShareAppMessage() {}
  47. })