followDetail.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <div class="normal-card" style="padding-right:0">
  3. <p class="title">跟进记录<i class="el-icon-sort" @click="sortFun"></i></p>
  4. <div class="select">
  5. <span class="demonstration">日期范围:</span>
  6. <time-select @clearSelect="clearSelect" @timeChange="timeChange"></time-select>
  7. </div>
  8. <div class="detail" v-if="follow.length > 0">
  9. <div class="item" v-for="(item,index) in follow" :key="index">
  10. <p>{{index + 1}}.{{item.createdate}},由经销商端<span style="font-weight:bold;margin:0 6px;font-size:13px">{{item.createby}}</span>开始跟进,跟进方式:<span style="font-weight:bold;margin:0 5px">{{item.followupmode}}</span>,{{handleTxt[item.logtype]}}</p>
  11. <div class="content">
  12. <div style="margin-bottom:10px">
  13. <p v-if="item.competitor">已购买品牌:{{item.competitor}}</p>
  14. {{item.content}}
  15. </div>
  16. <file-item
  17. :marginRight="20"
  18. :rowCount="5"
  19. :isDownLoad="true"
  20. :fileData="item.attinfo"
  21. @deleteSuccess="deleteFile">
  22. </file-item>
  23. </div>
  24. </div>
  25. </div>
  26. <el-empty title="暂无数据" v-else></el-empty>
  27. <div style="margin-top:16px;text-align:right">
  28. <el-pagination
  29. background
  30. small
  31. @size-change="handleSizeChange"
  32. @current-change="handleCurrentChange"
  33. :current-page="param.content.pageNumber"
  34. :page-size="param.content.pageSize"
  35. layout="total, prev, pager, next"
  36. :total="total">
  37. </el-pagination>
  38. </div>
  39. </div>
  40. </template>
  41. <script>
  42. import FileItem from '../../orderclue/components/file/index2'
  43. import TimeSelect from '@/SManagement/submitedit_one/components/TimeSelect'
  44. import { log } from '@antv/g2plot/lib/utils';
  45. export default {
  46. name: 'followDetail',
  47. data() {
  48. return {
  49. param: {
  50. "id": "20221101094602",
  51. "version":1,
  52. "content": {
  53. "sat_orderclueid": this.$route.query.id,
  54. "isdesc": 1,
  55. "pageNumber":1,
  56. "pageSize":20,
  57. "where": {
  58. "start": "",
  59. "end": ""
  60. }
  61. }
  62. },
  63. handleTxt:{
  64. '跟进中':'跟进内容',
  65. '成交':'成交操作,添加备注',
  66. '丢单':'丢单操作,具体原因如下',
  67. '无效':'无效操作,具体原因如下',
  68. },
  69. follow:[],
  70. timeArr:[],
  71. total:0
  72. };
  73. },
  74. components:{ TimeSelect , FileItem},
  75. computed:{
  76. },
  77. watch:{
  78. },
  79. created() {
  80. this.getFollowDetail()
  81. },
  82. methods: {
  83. async getFollowDetail() {
  84. let res = await this.$api.requested(this.param)
  85. this.follow = res.data
  86. this.total = res.total
  87. this.follow.forEach(item => {
  88. item.attinfo = this.fileType.fileList(item.attinfo)
  89. })
  90. console.log(this.follow);
  91. },
  92. handleCurrentChange(n) {
  93. this.param.content.pageNumber = n
  94. this.getFollowDetail()
  95. },
  96. clearSelect() {
  97. this.param.content.where.start = ''
  98. this.param.content.where.end = ''
  99. this.param.content.pageNumber = 1
  100. this.getFollowDetail()
  101. },
  102. timeChange(result) {
  103. this.param.content.where.start = result[0]
  104. this.param.content.where.end = result[1]
  105. this.param.content.pageNumber = 1
  106. this.getFollowDetail()
  107. },
  108. sortFun() {
  109. this.param.content.isdesc = this.param.content.isdesc == 1 ? this.param.content.isdesc = 0 : this.param.content.isdesc = 1
  110. this.getFollowDetail()
  111. },
  112. deleteFile (data) {
  113. this.follow.forEach(item => {
  114. item.attinfo.forEach((item2,index) => {
  115. if(item2.linksid == data.linksid) {
  116. console.log(item2,data);
  117. item.attinfo.splice(index,1)
  118. }
  119. })
  120. })
  121. },
  122. handleSizeChange(val) {
  123. // console.log(`每页 ${val} 条`);
  124. this.param.content.pageSize = val
  125. this.getFollowDetail()
  126. },
  127. handleCurrentChange(val) {
  128. // console.log(`当前页: ${val}`);
  129. this.param.content.pageNumber = val
  130. this.getFollowDetail()
  131. },
  132. },
  133. };
  134. </script>
  135. <style scoped>
  136. *{
  137. box-sizing: border-box;
  138. }
  139. .normal-card .title {
  140. font-size: 16px;
  141. color: #000000;
  142. font-weight: bold;
  143. }
  144. .normal-card .select {
  145. margin: 25px 10px 15px 0;
  146. display: flex;
  147. align-items: center;
  148. }
  149. .normal-card .select .demonstration {
  150. font-size: 14px;
  151. margin-right: 10px;
  152. }
  153. .normal-card .detail {
  154. font-size: 14px;
  155. overflow-y: scroll;
  156. height: calc(100vh - 400px);
  157. padding-right: 10px;
  158. }
  159. .normal-card .detail .content {
  160. margin: 10px 0 16px 0;
  161. background: #F2F2F2;
  162. padding: 16px;
  163. border-radius: 5px;
  164. font-size: 14px;
  165. }
  166. </style>