followRecords.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <view class="todo-list">
  3. <u-empty mode="list" text="暂无记录" v-if="followList.length == 0"></u-empty>
  4. <view v-else v-for="(v, i) in followList" :key="i">
  5. <view class="follow-date">
  6. <u-text :bold="true" size="26rpx" :text="v.followDay"></u-text>
  7. </view>
  8. <view class="todo-item" v-for="item in v.followupList" :key="item.id">
  9. <u-row>
  10. <u-col span="12">
  11. <view class="header">
  12. <u-row>
  13. <u-col span="12">
  14. <view class="flex_l">
  15. <text class="tit-txt text-ellipsis flex_1">
  16. {{ item.contactsName }} 跟进({{ formatType(item.followType) }})
  17. </text>
  18. </view>
  19. </u-col>
  20. </u-row>
  21. <view class="content flex">
  22. <text>{{ item.followContent }}</text>
  23. </view>
  24. <view class="content-footer flex1">
  25. <text class="date">{{ item.followDate }}</text>
  26. <view class="flex flex-middle">
  27. <text class="user-txt">联系人:{{ item.contactsName }}</text>
  28. </view>
  29. </view>
  30. </view>
  31. </u-col>
  32. </u-row>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import to from 'await-to-js'
  39. import followApi from '../../../api/follow'
  40. export default {
  41. name: 'OmsCustomerDetail',
  42. props: {
  43. customerId: {
  44. type: [String, Number],
  45. default: '0',
  46. },
  47. },
  48. data() {
  49. return {
  50. followList: [],
  51. }
  52. },
  53. mounted() {
  54. this.getRecords()
  55. console.log('customerId', this.customerId)
  56. },
  57. methods: {
  58. async getRecords() {
  59. let params = {
  60. custId: '' + this.customerId,
  61. DaysBeforeToday: 9999,
  62. }
  63. const [err, res] = await to(followApi.getListByDay(params))
  64. if (err) return
  65. if (res.code == 200) this.followList = res.data.list || []
  66. },
  67. formatType(val) {
  68. let str = ''
  69. if (val == 10) str = '电话'
  70. else if (val == 20) str = '邮件'
  71. else if (val == 30) str = '拜访'
  72. return str
  73. },
  74. },
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .todo-list {
  79. height: 100%;
  80. overflow: auto;
  81. .follow-date {
  82. padding: 20rpx 0 20rpx 20rpx;
  83. }
  84. .todo-item {
  85. padding: 12rpx 40rpx 12rpx 46rpx;
  86. background: #f2f3f5;
  87. border-radius: 15rpx;
  88. margin-bottom: 32rpx;
  89. .tit-txt {
  90. font-size: 28rpx;
  91. font-weight: bold;
  92. color: #323232;
  93. }
  94. .content {
  95. padding: 10rpx 0;
  96. font-size: 28rpx;
  97. color: #646464;
  98. }
  99. .content-footer {
  100. padding: 0 0 12rpx 0;
  101. font-size: 24rpx;
  102. .date {
  103. color: #969696;
  104. }
  105. .user-img {
  106. width: 46rpx;
  107. height: 46rpx;
  108. border-radius: 50%;
  109. margin-right: 15rpx;
  110. }
  111. }
  112. }
  113. }
  114. </style>