index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. <template>
  2. <div>
  3. <el-input style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="clearSearchValue" size="small" class="input-with-select inline-16 layout_search__panel mt-10" clearable>
  4. </el-input>
  5. <el-table
  6. ref="table"
  7. :row-class-name="tableClassName"
  8. :data="tableData"
  9. highlight-current-row
  10. size="mini"
  11. :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
  12. :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
  13. border
  14. >
  15. <el-table-column
  16. prop="createby"
  17. :label="$t('跟进人')"
  18. min-width="90">
  19. <template slot-scope="scope">
  20. <div>
  21. {{scope.row.createby}}
  22. <el-tag v-if="scope.row.resource" size="mini" style="color: #3874f6">{{$t(scope.row.resource)}}</el-tag>
  23. </div>
  24. </template>
  25. </el-table-column>
  26. <el-table-column
  27. prop="createdate"
  28. :label="$t(`跟进时间`)"
  29. min-width="139">
  30. </el-table-column>
  31. <el-table-column
  32. v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail' || $route.path === '/funnelProjectDetail'"
  33. prop="type"
  34. :label="$t(`跟进类型`)"
  35. min-width="80"
  36. key="type-column">
  37. </el-table-column>
  38. <el-table-column
  39. prop="contacts"
  40. v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail' || $route.path === '/funnelProjectDetail'"
  41. :label="$t(`跟进对象`)"
  42. min-width="69"
  43. key="contacts-column">
  44. <template slot-scope="scope">
  45. <div v-for="item in scope.row.contacts" :key="item.index">
  46. <span v-if="item.rowindex === scope.row.contacts.length" class="span-style">
  47. {{item.name}}
  48. </span>
  49. <span v-else class="span-style">
  50. {{item.name + ','}}
  51. </span>
  52. </div>
  53. </template>
  54. </el-table-column>
  55. <el-table-column
  56. prop="content"
  57. :label="$t(`跟进内容`)"
  58. min-width="500"
  59. key="content-column"
  60. >
  61. <template slot-scope="scope">
  62. <div v-if="($route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail' || $route.path === '/funnelProjectDetail')">
  63. <div>{{$t(`目的:`)}}{{scope.row.target}}</div>
  64. <div>{{$t(`过程:`)}}{{scope.row.content}}</div>
  65. <div>{{$t(`结果:`)}}{{scope.row.results}}</div>
  66. <div>{{$t(`下次跟进计划:`)}}{{scope.row.nextplan}}</div>
  67. </div>
  68. <div v-else>{{scope.row.content}}</div>
  69. </template>
  70. </el-table-column>
  71. <el-table-column
  72. v-if="$route.path === '/projectChangeDetail' || $route.path === '/funnelProjectDetail'"
  73. prop="squarestage"
  74. :label="$t(`项目阶段`)"
  75. min-width="80"
  76. >
  77. <template slot-scope="scope">
  78. <div>{{scope.row.squarestage?scope.row.squarestage:''}}</div>
  79. </template>
  80. </el-table-column>
  81. <el-table-column
  82. prop="attcount"
  83. :label="$t(`附件数`)"
  84. min-width="69">
  85. <template slot-scope="scope">
  86. <el-button type="text" size="small" @click="showFiles(scope.row)">{{scope.row.attcount}}</el-button>
  87. </template>
  88. </el-table-column>
  89. <el-table-column
  90. v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail' || $route.path === '/funnelProjectDetail'"
  91. prop="salesfeesamount"
  92. :label="$t(`营销费用`)"
  93. min-width="80">
  94. <template slot-scope="scope">
  95. {{scope.row.salesfeesamount?tool.formatAmount(scope.row.salesfeesamount,2,'¥'):'¥0.00'}}
  96. </template>
  97. </el-table-column>
  98. <el-table-column
  99. :label="$t(`操作`)"
  100. fixed="right"
  101. min-width="220">
  102. <template slot-scope="scope">
  103. <el-button type="text" size="small" @click="showReview(scope.row)" class="inline-16">{{$t(`评论`)}}({{scope.row.commentqty}})</el-button>
  104. <editLog v-if="userid === scope.row.createuserid && !disabled" ref="edits" :data="scope.row" :ownertable="ownertable" @onSuccess="onSuccess" :isOperation="true"></editLog>
  105. <el-button type="text" size="small" class="inline-16" @click="onDelFollow(scope.row)" v-if="userid === scope.row.createuserid && !disabled">{{$t(`删除`)}}</el-button>
  106. <marketingExpenses v-if="($route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail' || $route.path === '/funnelProjectDetail') && !disabled"
  107. class="inline-16" :ownertable="scope.row.ownertable" :ownerid="scope.row.sys_datafollowupid" :dataTime="scope.row.createdate" :userid="scope.row.createuserid" :isOperation="true"
  108. @onSuccess="listData"></marketingExpenses>
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. <div class="container normal-panel" style="text-align:right">
  113. <el-pagination
  114. background
  115. @size-change="handleSizeChange"
  116. @current-change="handleCurrentChange"
  117. :current-page="currentPage"
  118. :page-sizes="[20, 50, 100, 200]"
  119. :page-size="100"
  120. layout="total,sizes, prev, pager, next, jumper"
  121. :total="total">
  122. </el-pagination>
  123. </div>
  124. <normalDialog ref="normalDialogFile" title="附件" >
  125. <template slot="content">
  126. <attachmentList style="margin-top: -10px;margin-bottom: 10px" :attinfos="attinfo_attachment" :onlyread="true" minWidth="80">
  127. </attachmentList>
  128. </template>
  129. </normalDialog>
  130. <normalDialog ref="normalDialogReview" title="评论" @closeDialog="closeDialog">
  131. <template slot="content">
  132. <div style="padding: 10px">
  133. <div style="border: 1px solid #9ca3af;padding: 10px;border-radius: 5px">
  134. <el-input type="textarea" style="border: none;margin-bottom: 10px" :rows="1" v-model="content" :placeholder="$t(`我评论`)+':'"></el-input>
  135. <el-divider></el-divider>
  136. <div style="display: flex;justify-content: right">
  137. <el-button type="primary" size="small" :disabled="content.length == 0" @click="onComment">{{$t(`发布`)}}</el-button>
  138. </div>
  139. </div>
  140. </div>
  141. <div style="padding: 0 10px 10px 10px">
  142. <div style="max-height: 360px;min-height:200px;background: #F5F5F5;border-radius: 2px;padding: 10px;overflow:auto">
  143. <div style="color: #333;font-size: 16px;font-weight: bold">{{$t(`评论`)}}({{commentqty}})</div>
  144. <div v-for="item in comment" :key="item.index" style="margin-top: 10px">
  145. <div style="color: #333;font-size: 14px;font-weight: bold;margin-top: 5px">{{item.createby}}</div>
  146. <div style="color:#666;font-size: 14px;margin-top: 5px">{{item.content}}</div>
  147. <div style="display: flex;justify-content: space-between;align-items: center;margin-top: -5px;margin-bottom: -5px">
  148. <div style="display: flex;justify-content: space-between;align-items: center">
  149. <div style="font-size: 12px;color: #999">{{item.createdate}}</div>
  150. <el-button type="text" size="small" class="margin-5" v-if="userid == item.createuserid"><svg style="vertical-align: middle" t="1727053625238" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11334" width="14" height="14"><path d="M343.113143 156.379429h333.897143v-73.142858H343.113143v73.142858zM677.010286 0a83.456 83.456 0 0 1 83.456 83.456v64.146286h215.917714a46.299429 46.299429 0 1 1 0 92.672h-48.64v700.196571a83.456 83.456 0 0 1-83.456 83.456H176.128a83.456 83.456 0 0 1-83.456-83.456V240.054857H47.542857a46.299429 46.299429 0 0 1 0-92.452571h212.114286v-64.146286A83.456 83.456 0 0 1 343.113143 0h333.897143z m156.525714 241.371429H186.587429v688.859428h647.021714v-689.005714zM384.877714 345.6a41.764571 41.764571 0 0 1 41.764572 41.764571v333.897143a41.764571 41.764571 0 0 1-83.456 0V387.364571a41.764571 41.764571 0 0 1 41.691428-41.764571z m250.441143 0a41.764571 41.764571 0 0 1 41.764572 41.764571v333.897143a41.764571 41.764571 0 0 1-83.456 0V387.364571a41.764571 41.764571 0 0 1 41.545142-41.764571z" fill="#999999" p-id="11335"></path></svg>
  151. <span style="color: #666666;font-size: 14px;margin-left: 5px;vertical-align: middle" @click="onDel(item)">{{$t(`删除`)}}</span></el-button>
  152. </div>
  153. <div>
  154. <el-button type="text" v-if="!isContentShow" size="small" @click="isContentShow = true;sys_datacommentid = item.sys_datacommentid">
  155. <svg t="1727055468269" class="icon" style="vertical-align: middle" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11646" width="14" height="14"><path d="M643.657143 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286 36.571429 0 58.514286-29.257143 58.514285-58.514286 0-36.571429-29.257143-58.514286-58.514285-58.514286-29.257143-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11647"></path><path d="M1024 142.774857c0-43.885714-43.885714-87.771429-87.771429-87.771428H87.771429c-43.885714 0-87.771429 36.571429-87.771429 87.771428v621.714286c0 51.2 43.885714 87.771429 87.771429 87.771428h307.2l117.028571 117.028572 117.028571-117.028572h307.2c51.2 0 87.771429-43.885714 87.771429-87.771428v-621.714286z m-65.828571 592.457143c0 29.257143-21.942857 51.2-51.2 51.2H592.457143l-80.457143 80.457143-80.457143-80.457143H117.028571c-29.257143 0-51.2-21.942857-51.2-51.2v-563.2c0-29.257143 21.942857-51.2 51.2-51.2h789.942858c29.257143 0 51.2 21.942857 51.2 51.2v563.2z" fill="#3874F6" p-id="11648"></path><path d="M453.485714 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514286-58.514286c0-36.571429-21.942857-65.828571-58.514286-65.828572s-58.514286 29.257143-58.514286 65.828572M256 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514285-58.514286c0-36.571429-29.257143-58.514286-58.514285-58.514286-36.571429-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11649"></path></svg>
  156. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`回复`)}}</span></el-button>
  157. <el-button type="text" v-if="isContentShow " size="small" @click="isContentShow = false;sys_datacommentid = ''">
  158. <svg t="1727055468269" class="icon" viewBox="0 0 1024 1024" style="vertical-align: middle" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11646" width="14" height="14"><path d="M643.657143 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286 36.571429 0 58.514286-29.257143 58.514285-58.514286 0-36.571429-29.257143-58.514286-58.514285-58.514286-29.257143-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11647"></path><path d="M1024 142.774857c0-43.885714-43.885714-87.771429-87.771429-87.771428H87.771429c-43.885714 0-87.771429 36.571429-87.771429 87.771428v621.714286c0 51.2 43.885714 87.771429 87.771429 87.771428h307.2l117.028571 117.028572 117.028571-117.028572h307.2c51.2 0 87.771429-43.885714 87.771429-87.771428v-621.714286z m-65.828571 592.457143c0 29.257143-21.942857 51.2-51.2 51.2H592.457143l-80.457143 80.457143-80.457143-80.457143H117.028571c-29.257143 0-51.2-21.942857-51.2-51.2v-563.2c0-29.257143 21.942857-51.2 51.2-51.2h789.942858c29.257143 0 51.2 21.942857 51.2 51.2v563.2z" fill="#3874F6" p-id="11648"></path><path d="M453.485714 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514286-58.514286c0-36.571429-21.942857-65.828571-58.514286-65.828572s-58.514286 29.257143-58.514286 65.828572M256 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514285-58.514286c0-36.571429-29.257143-58.514286-58.514285-58.514286-36.571429-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11649"></path></svg>
  159. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`取消回复`)}}</span></el-button>
  160. </div>
  161. </div>
  162. <div style="border: 1px solid #9ca3af;padding: 10px;border-radius: 5px" v-if="isContentShow && sys_datacommentid == item.sys_datacommentid">
  163. <el-input type="textarea" style="border: none;margin-bottom: 10px" :rows="1" v-model="replyContent" :placeholder="$t('我回复')+item.createby+':'"></el-input>
  164. <el-divider></el-divider>
  165. <div style="display: flex;justify-content: right">
  166. <el-button type="primary" size="small" :disabled="replyContent.length == 0" @click="onReply(sys_datafollowupid,item)">{{$t(`发布`)}}</el-button>
  167. </div>
  168. </div>
  169. <div v-if="item.subcomment.length > 0" style="margin-left: 10px;margin-top: 10px">
  170. <div v-for="k in item.subcomment" :key="k.index" style="margin-top: 10px">
  171. <div style="display: flex;justify-content: left;align-items: center">
  172. <div style="font-size: 14px;font-weight: bold;color:#333;">{{k.createby}}</div><i style="margin: 0 10px 0 10px" class="el-icon-caret-right"></i><div style="font-size: 14px;font-weight: bold;color:#333;">{{k.replyusername}}</div>
  173. </div>
  174. <div style="color:#666;font-size: 14px;margin-top: 5px">{{k.content}}</div>
  175. <div style="display: flex;justify-content: space-between;align-items: center;margin-top: -5px;margin-bottom: -5px">
  176. <div style="display: flex;justify-content: space-between;align-items: center">
  177. <div style="font-size: 12px;color:#999;margin-right: 10px">{{k.createdate}}</div>
  178. <el-button type="text" size="small" v-if="userid == k.createuserid"><svg style="vertical-align: middle" t="1727053625238" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11334" width="14" height="14"><path d="M343.113143 156.379429h333.897143v-73.142858H343.113143v73.142858zM677.010286 0a83.456 83.456 0 0 1 83.456 83.456v64.146286h215.917714a46.299429 46.299429 0 1 1 0 92.672h-48.64v700.196571a83.456 83.456 0 0 1-83.456 83.456H176.128a83.456 83.456 0 0 1-83.456-83.456V240.054857H47.542857a46.299429 46.299429 0 0 1 0-92.452571h212.114286v-64.146286A83.456 83.456 0 0 1 343.113143 0h333.897143z m156.525714 241.371429H186.587429v688.859428h647.021714v-689.005714zM384.877714 345.6a41.764571 41.764571 0 0 1 41.764572 41.764571v333.897143a41.764571 41.764571 0 0 1-83.456 0V387.364571a41.764571 41.764571 0 0 1 41.691428-41.764571z m250.441143 0a41.764571 41.764571 0 0 1 41.764572 41.764571v333.897143a41.764571 41.764571 0 0 1-83.456 0V387.364571a41.764571 41.764571 0 0 1 41.545142-41.764571z" fill="#999999" p-id="11335"></path></svg>
  179. <span style="color: #666666;font-size: 14px;margin-left: 5px;vertical-align: middle" @click="onDel(k)">{{$t(`删除`)}}</span></el-button>
  180. </div>
  181. <div>
  182. <el-button type="text" v-if="!isContentShow " size="small" @click="isContentShow = true;sys_datacommentid = k.sys_datacommentid">
  183. <svg t="1727055468269" class="icon" style="vertical-align: middle" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11646" width="14" height="14"><path d="M643.657143 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286 36.571429 0 58.514286-29.257143 58.514285-58.514286 0-36.571429-29.257143-58.514286-58.514285-58.514286-29.257143-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11647"></path><path d="M1024 142.774857c0-43.885714-43.885714-87.771429-87.771429-87.771428H87.771429c-43.885714 0-87.771429 36.571429-87.771429 87.771428v621.714286c0 51.2 43.885714 87.771429 87.771429 87.771428h307.2l117.028571 117.028572 117.028571-117.028572h307.2c51.2 0 87.771429-43.885714 87.771429-87.771428v-621.714286z m-65.828571 592.457143c0 29.257143-21.942857 51.2-51.2 51.2H592.457143l-80.457143 80.457143-80.457143-80.457143H117.028571c-29.257143 0-51.2-21.942857-51.2-51.2v-563.2c0-29.257143 21.942857-51.2 51.2-51.2h789.942858c29.257143 0 51.2 21.942857 51.2 51.2v563.2z" fill="#3874F6" p-id="11648"></path><path d="M453.485714 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514286-58.514286c0-36.571429-21.942857-65.828571-58.514286-65.828572s-58.514286 29.257143-58.514286 65.828572M256 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514285-58.514286c0-36.571429-29.257143-58.514286-58.514285-58.514286-36.571429-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11649"></path></svg>
  184. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`回复`)}}</span></el-button>
  185. <el-button type="text" v-if="isContentShow " size="small" @click="isContentShow = false;sys_datacommentid = ''">
  186. <svg t="1727055468269" style="vertical-align: middle" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11646" width="14" height="14"><path d="M643.657143 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286 36.571429 0 58.514286-29.257143 58.514285-58.514286 0-36.571429-29.257143-58.514286-58.514285-58.514286-29.257143-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11647"></path><path d="M1024 142.774857c0-43.885714-43.885714-87.771429-87.771429-87.771428H87.771429c-43.885714 0-87.771429 36.571429-87.771429 87.771428v621.714286c0 51.2 43.885714 87.771429 87.771429 87.771428h307.2l117.028571 117.028572 117.028571-117.028572h307.2c51.2 0 87.771429-43.885714 87.771429-87.771428v-621.714286z m-65.828571 592.457143c0 29.257143-21.942857 51.2-51.2 51.2H592.457143l-80.457143 80.457143-80.457143-80.457143H117.028571c-29.257143 0-51.2-21.942857-51.2-51.2v-563.2c0-29.257143 21.942857-51.2 51.2-51.2h789.942858c29.257143 0 51.2 21.942857 51.2 51.2v563.2z" fill="#3874F6" p-id="11648"></path><path d="M453.485714 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514286-58.514286c0-36.571429-21.942857-65.828571-58.514286-65.828572s-58.514286 29.257143-58.514286 65.828572M256 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514285-58.514286c0-36.571429-29.257143-58.514286-58.514285-58.514286-36.571429-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11649"></path></svg>
  187. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`取消回复`)}}</span></el-button>
  188. </div>
  189. </div>
  190. <div style="border: 1px solid #9ca3af;padding: 10px;border-radius: 5px" v-if="isContentShow && sys_datacommentid == k.sys_datacommentid">
  191. <el-input type="textarea" style="border: none;margin-bottom: 10px" :rows="1" v-model="replyContent" :placeholder="$t('我回复')+k.createby+':'"></el-input>
  192. <el-divider></el-divider>
  193. <div style="display: flex;justify-content: right">
  194. <el-button type="primary" size="small" :disabled="replyContent.length == 0" @click="onReply(sys_datafollowupid,k)">{{$t(`发布`)}}</el-button>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. </template>
  203. </normalDialog>
  204. </div>
  205. </template>
  206. <script>
  207. import marketingExpenses from '@/components/marketingExpenses/index'
  208. import normalDialog from '@/template/dialogTemplate/normal'
  209. import attachmentList from '@/components/attachment_list/index.vue'
  210. import editLog from '../followUp/editLog'
  211. export default {
  212. name: "index",
  213. props:['ownertable','disabled'],
  214. components:{marketingExpenses,normalDialog,attachmentList,editLog},
  215. data() {
  216. return {
  217. tableData:[],
  218. currentPage:0,
  219. total:0,
  220. attinfo_attachment:[],
  221. content:'',
  222. comment:[],
  223. commentqty:0,
  224. userid:JSON.parse(sessionStorage.getItem('active_account')).userid,
  225. isContentShow:false,
  226. sys_datacommentid:'',
  227. replyContent:'',
  228. sys_datafollowupid:'',
  229. param:{
  230. "id": 20220930121501,
  231. "content": {
  232. "ownertable":'',
  233. "ownerid":'',
  234. "pageNumber": 1,
  235. "pageSize": 50,
  236. "where":{
  237. "condition":''
  238. }
  239. }
  240. }
  241. }
  242. },
  243. methods:{
  244. async listData(type,id){
  245. this.param.content.ownerid = this.$route.query.id
  246. this.param.content.ownertable = this.ownertable
  247. const res = await this.$api.requested(this.param)
  248. this.tableData = res.data
  249. this.total = res.total
  250. this.currentPage = res.pageNumber
  251. if (type){
  252. this.tableData.forEach(item=>{
  253. if (item.sys_datafollowupid == id){
  254. this.comment = item.comment
  255. this.commentqty = item.commentqty
  256. }
  257. })
  258. }
  259. },
  260. handleSizeChange(val) {
  261. // console.log(`每页 ${val} 条`);
  262. this.param.content.pageSize = val
  263. this.listData()
  264. },
  265. handleCurrentChange(val) {
  266. // console.log(`当前页: ${val}`);
  267. this.param.content.pageNumber = val
  268. this.listData()
  269. },
  270. tableClassName({ row, rowIndex }) {
  271. row.index = rowIndex;
  272. },
  273. clearSearchValue () {
  274. this.$store.dispatch('clearSearchValue')
  275. this.listData(this.param.content.pageNumber = 1)
  276. },
  277. showFiles(data){
  278. this.$refs.normalDialogFile.dialogVisible = true
  279. this.attinfo_attachment = data.attinfos
  280. },
  281. showReview(data){
  282. this.$refs.normalDialogReview.dialogVisible = true
  283. this.comment = data.comment
  284. this.commentqty = data.commentqty
  285. this.sys_datafollowupid = data.sys_datafollowupid
  286. },
  287. onDel(data){
  288. console.log(data,'删除')
  289. this.$confirm(this.$t('确定删除该评论吗')+'?', this.$t('提示'), {
  290. confirmButtonText: this.$t('确定'),
  291. cancelButtonText: this.$t('取消'),
  292. type: 'warning'
  293. }).then(async() => {
  294. const res = await this.$api.requested({
  295. "id": 20240429161701,
  296. "content": {
  297. "sys_datacommentid":data.sys_datacommentid
  298. }
  299. })
  300. this.tool.showMessage(res,()=>{
  301. this.listData('删除',this.sys_datafollowupid)
  302. this.$emit('newFollow')
  303. })
  304. }).catch(() => {
  305. this.$message({
  306. type: 'info',
  307. message: this.$t('已取消删除'),
  308. });
  309. });
  310. },
  311. async onReply(id,data){
  312. const res = await this.$api.requested({
  313. "id": 20240429161601,
  314. "content": {
  315. "ownertable":'sys_datafollowup',//数据表
  316. "ownerid":id,//数据id
  317. "content":this.replyContent,//内容
  318. "replyid":data.sys_datacommentid//被回复评论id
  319. }
  320. })
  321. this.tool.showMessage(res,()=>{
  322. this.replyContent = ''
  323. this.isContentShow = false
  324. this.sys_datacommentid = ''
  325. this.listData('回复',this.sys_datafollowupid)
  326. this.$emit('newFollow')
  327. })
  328. },
  329. async onComment(){
  330. const res = await this.$api.requested({
  331. "id": 20240429161601,
  332. "content": {
  333. "ownertable":'sys_datafollowup',//数据表
  334. "ownerid":this.sys_datafollowupid,//数据id
  335. "content":this.content,//内容
  336. "replyid":"0"//被回复评论id
  337. }
  338. })
  339. this.tool.showMessage(res,()=>{
  340. this.content = ''
  341. this.sys_datacommentid = ''
  342. this.listData('回复',this.sys_datafollowupid)
  343. this.$emit('newFollow')
  344. })
  345. },
  346. closeDialog(){
  347. this.content = ''
  348. this.replyContent = ''
  349. this.isContentShow = false
  350. },
  351. onSuccess(){
  352. this.listData()
  353. this.$emit('newFollow')
  354. },
  355. onDelFollow(val){
  356. this.$confirm(this.$t('确定删除该跟进动态吗?'), this.$t('提示'), {
  357. confirmButtonText: this.$t('确定'),
  358. cancelButtonText: this.$t('取消'),
  359. type: 'warning'
  360. }).then(async() => {
  361. const res = await this.$api.requested({
  362. "id": 20220930121701,
  363. "content": {
  364. "sys_datafollowupid":val.sys_datafollowupid
  365. }
  366. })
  367. this.tool.showMessage(res,()=>{
  368. this.listData()
  369. this.$emit('newFollow')
  370. })
  371. }).catch(() => {
  372. this.$message({
  373. type: 'info',
  374. message: '已取消删除'
  375. });
  376. });
  377. }
  378. },
  379. mounted() {
  380. this.listData()
  381. }
  382. }
  383. </script>
  384. <style scoped>
  385. .table-style{
  386. width: 100%;
  387. height: calc(100vh - 390px);
  388. }
  389. /deep/ .el-table .cell.el-tooltip {
  390. white-space: break-spaces;
  391. min-width: 50px;
  392. }
  393. </style>