forgetCustomer.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view class="uni-app">
  3. <view class="status-bar" />
  4. <view class="main-container">
  5. <wk-nav-bar :title="title" />
  6. <view class="list-view">
  7. <wk-scroll-view
  8. :status="listStatus"
  9. class="list-scroll"
  10. @refresh="getList({}, true)"
  11. @loadmore="getList()">
  12. <customer-item
  13. v-for="(item, index) in listData"
  14. :key="index"
  15. :item-data="item" />
  16. </wk-scroll-view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import {ForgetList, ForgetCustomerList} from 'API/crm/work'
  23. import CustomerItem from '../customer/components/customerItem.vue'
  24. import mainListMixins from '@/mixins/mainList.js'
  25. export default {
  26. name: 'ForgetCustomer',
  27. components: {
  28. CustomerItem
  29. },
  30. mixins: [mainListMixins],
  31. data() {
  32. return {
  33. title: '',
  34. day: null,
  35. queryData: {},
  36. dayMap: {
  37. 7: '超过7天未联系的客户',
  38. 15: '超过15天未联系的客户',
  39. 30: '超过30天未联系的客户',
  40. 90: '超过3个月未联系的客户',
  41. 180: '超过6个月未联系的客户',
  42. 0: '逾期未联系的客户'
  43. }
  44. }
  45. },
  46. computed: {
  47. GetListFn() {
  48. if (!this.queryData || !this.queryData.hasOwnProperty('day')) return null
  49. if (this.queryData.day == 0) return ForgetCustomerList
  50. return ForgetList
  51. }
  52. },
  53. onLoad(options) {
  54. this.queryData = options
  55. this.title = this.dayMap[this.queryData.day]
  56. this.getList()
  57. },
  58. methods: {
  59. getParams() {
  60. const params = {
  61. ...this.queryData
  62. }
  63. if (params.day == 0) {
  64. delete params.day
  65. }
  66. return params
  67. }
  68. }
  69. }
  70. </script>
  71. <style scoped lang="scss">
  72. .list-view {
  73. flex: 1;
  74. overflow: hidden;
  75. margin-top: 20rpx;
  76. .list-scroll {
  77. position: relative;
  78. width: 100%;
  79. height: 100%;
  80. overflow: hidden;
  81. }
  82. }
  83. </style>