follow.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. const _Http = getApp().globalData.http
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. rowData: Object
  8. },
  9. options: {
  10. addGlobalClass:true
  11. },
  12. /**
  13. * 组件的初始数据
  14. */
  15. data: {
  16. isdesc:1,
  17. showWhere:'所有日期',
  18. followList:[],
  19. timeRangeShow:false,
  20. whereType: {
  21. value: "start",
  22. list: {
  23. "start": "",
  24. "end": ""
  25. }
  26. },
  27. where:{}
  28. },
  29. ready () {
  30. setTimeout(() =>{
  31. this.getFollowDetail()
  32. },1000)
  33. },
  34. /**
  35. * 组件的方法列表
  36. */
  37. methods: {
  38. getFollowDetail () {
  39. _Http.basic({
  40. "classname": "webmanage.saletool.orderclue.publicclue.PublicClue",
  41. "method": "getFollowList",
  42. "content": {
  43. "nocache":true,
  44. "sat_orderclueid": this.properties.rowData.sat_orderclueid,
  45. "isdesc": this.data.isdesc,
  46. "where":this.data.where
  47. }
  48. }).then(res => {
  49. console.log(res,'跟进');
  50. this.setData({
  51. followList:res.data
  52. })
  53. })
  54. },
  55. openSelectDate () {
  56. },
  57. changeIsdesc () {
  58. this.setData({
  59. isdesc: this.data.isdesc == 1 ? 0 : 1
  60. });
  61. this.getFollowDetail()
  62. },
  63. /* 打开选择时间 */
  64. openSelectDate() {
  65. this.setData({
  66. timeRangeShow: true
  67. })
  68. },
  69. /* 确定时间范围 */
  70. determineScope() {
  71. const {
  72. list
  73. } = this.data.whereType;
  74. this.setData({
  75. "where": list,
  76. showWhere: list.start + '~' + list.end,
  77. timeRangeShow: false
  78. });
  79. this.getFollowDetail();
  80. },
  81. /* 得到选择时间 */
  82. getDate({
  83. detail
  84. }) {
  85. let obj = this.data.whereType;
  86. obj.list[obj.value] = detail;
  87. this.setData({
  88. whereType: obj
  89. })
  90. },
  91. /* 选择日期类型 */
  92. selectDateType(e) {
  93. const {
  94. name
  95. } = e.target.dataset;
  96. this.setData({
  97. "whereType.value": name
  98. })
  99. },
  100. /* 查看所有日期 */
  101. toSeeAll() {
  102. this.setData({
  103. showWhere: "所有日期"
  104. })
  105. this.timeRangeClose();
  106. this.getFollowDetail();
  107. },
  108. /* 关闭时间范围选择 */
  109. timeRangeClose() {
  110. this.setData({
  111. timeRangeShow: false,
  112. "where": {
  113. "start": "",
  114. "end": ""
  115. }
  116. })
  117. },
  118. }
  119. })