followRecords.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 mb5 text-ellipsis flex_1">
  16. {{ item.contactsName }} 跟进({{ formatType(item.followType) }})
  17. </text>
  18. </view>
  19. </u-col>
  20. </u-row>
  21. <view class="tit-txt mb5">跟进内容:</view>
  22. <view class="content flex">
  23. <text>{{ item.followContent }}</text>
  24. </view>
  25. <view class="tit-txt mb5">达成效果:</view>
  26. <view class="content flex">
  27. <text>{{ item.effect }}</text>
  28. </view>
  29. <view class="tit-txt mb5">问题或困难:</view>
  30. <view class="content flex">
  31. <text>{{ item.issue }}</text>
  32. </view>
  33. <view class="tit-txt mb5">下一步跟进计划和目标:</view>
  34. <view class="content flex">
  35. <text>{{ item.furtherPlan }}</text>
  36. </view>
  37. <view class="content-footer flex1">
  38. <text class="date">{{ item.followDate }}</text>
  39. <view class="flex flex-middle">
  40. <text class="user-txt">联系人:{{ item.contactsName }}</text>
  41. </view>
  42. </view>
  43. </view>
  44. </u-col>
  45. </u-row>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. import to from 'await-to-js'
  52. import followApi from '../../../api/follow'
  53. export default {
  54. name: 'OmsCustomerDetail',
  55. props: {
  56. targetId: {
  57. type: [String, Number],
  58. default: '0',
  59. },
  60. },
  61. data() {
  62. return {
  63. followList: [],
  64. }
  65. },
  66. mounted() {
  67. this.getRecords()
  68. },
  69. methods: {
  70. async getRecords() {
  71. let params = {
  72. targetId: '' + this.targetId,
  73. targetType: '70',
  74. DaysBeforeToday: 9999,
  75. }
  76. const [err, res] = await to(followApi.getListByDay(params))
  77. if (err) return
  78. if (res.code == 200) this.followList = res.data.list || []
  79. },
  80. formatType(val) {
  81. let str = ''
  82. if (val == 10) str = '电话'
  83. else if (val == 20) str = '邮件'
  84. else if (val == 30) str = '拜访'
  85. return str
  86. },
  87. },
  88. }
  89. </script>
  90. <style lang="scss" scoped>
  91. .todo-list {
  92. height: 100%;
  93. overflow: auto;
  94. .follow-date {
  95. padding: 20rpx 0 20rpx 20rpx;
  96. }
  97. .todo-item {
  98. padding: 12rpx 40rpx 12rpx 46rpx;
  99. background: #f2f3f5;
  100. border-radius: 15rpx;
  101. margin-bottom: 32rpx;
  102. .tit-txt {
  103. font-size: 28rpx;
  104. font-weight: bold;
  105. color: #323232;
  106. }
  107. .content {
  108. margin-bottom: 5px;
  109. // padding: 10rpx 0;
  110. font-size: 28rpx;
  111. color: #646464;
  112. }
  113. .content-footer {
  114. padding: 0 0 12rpx 0;
  115. font-size: 24rpx;
  116. .date {
  117. color: #969696;
  118. }
  119. .user-img {
  120. width: 46rpx;
  121. height: 46rpx;
  122. border-radius: 50%;
  123. margin-right: 15rpx;
  124. }
  125. }
  126. }
  127. }
  128. </style>