clue.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <template>
  2. <div>
  3. <el-scrollbar >
  4. <div style="margin: auto;" >
  5. <div id="clueAddFull" style="background: #FFFFFF" :style="{padding:isFull ?'16px':0}">
  6. <div style="display: flex;justify-content: space-between">
  7. <div>
  8. <span style="font-size: 16px;color: #333">新增线索</span>
  9. </div>
  10. <div>
  11. <quickDate class="inline-16" ref="quickAdd" @selectQuick="selectQuickAdd" :disabled="disabled"></quickDate>
  12. <fullScreen ref="addFullRef" class="inline-16" domId="clueAddFull" @onFull="onAddFull" @backFull="backAddFull"></fullScreen>
  13. </div>
  14. </div>
  15. <tableLayout style="margin-top: 10px" :layout="tablecolsAdd" :data="listAdd" :opwidth="200" :custom="true" :height="isFull ?'calc(100vh - 150px)':tableHeight">
  16. <template v-slot:customcol="scope">
  17. <p>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
  18. </template>
  19. </tableLayout>
  20. <div class="container normal-panel" style="text-align:right">
  21. <el-pagination
  22. background
  23. @size-change="handleSizeChangeAdd"
  24. @current-change="handleCurrentChangeAdd"
  25. :current-page="currentPageAdd"
  26. :page-sizes="isFull ?[100,150, 200, 250]:[10,20, 50, 100, 200]"
  27. :page-size="isFull ?100:10"
  28. layout="total,sizes, prev, pager, next, jumper"
  29. :total="totalAdd">
  30. </el-pagination>
  31. </div>
  32. </div>
  33. <div id="clueUpdFull" style="background: #FFFFFF" :style="{padding:isFull ?'16px':0}">
  34. <div style="display: flex;justify-content: space-between">
  35. <div>
  36. <span style="font-size: 16px;color: #333">更新线索</span>
  37. </div>
  38. <div>
  39. <quickDate class="inline-16" ref="quickUpd" @selectQuick="selectQuickUpd" ></quickDate>
  40. <fullScreen class="inline-16" domId="clueUpdFull" @onFull="onUpdFull" @backFull="backUpdFull"></fullScreen>
  41. </div>
  42. </div>
  43. <tableLayout style="margin-top: 10px" :layout="tablecolsUpdate" :data="listUpdate" :opwidth="200" :custom="true" :height="isFull ?'calc(100vh - 150px)':tableHeight">
  44. <template v-slot:customcol="scope">
  45. <p>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'&#45;&#45;'}}</p>
  46. </template>
  47. </tableLayout>
  48. <div class="container normal-panel" style="text-align:right">
  49. <el-pagination
  50. background
  51. @size-change="handleSizeChangeUpdate"
  52. @current-change="handleCurrentChangeUpdate"
  53. :current-page="currentPageUpdate"
  54. :page-sizes="isFull ?[100,150, 200, 250]:[10,20, 50, 100, 200]"
  55. :page-size="isFull ?100:10"
  56. layout="total,sizes, prev, pager, next, jumper"
  57. :total="totalUpdate">
  58. </el-pagination>
  59. </div>
  60. </div>
  61. <div id="clueFollowFull" style="background: #FFFFFF" :style="{padding:isFull ?'16px':0}">
  62. <div style="display: flex;justify-content: space-between">
  63. <div>
  64. <span style="font-size: 16px;color: #333">跟进线索</span>
  65. </div>
  66. <div>
  67. <quickDate class="inline-16" ref="quickFow" @selectQuick="selectQuickFow" :disabled="disabled"></quickDate>
  68. <fullScreen ref="fowFullRef" class="inline-16" domId="clueFollowFull" @onFull="onFowFull" @backFull="backFowFull"></fullScreen>
  69. </div>
  70. </div>
  71. <tableLayout style="margin-top: 10px" :layout="tablecolsFollow" :data="listFollow" :opwidth="200" :custom="true" :height="isFull ?'calc(100vh - 150px)':tableHeight">
  72. <template v-slot:customcol="scope">
  73. <p>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'&#45;&#45;'}}</p>
  74. </template>
  75. </tableLayout>
  76. <div class="container normal-panel" style="text-align:right">
  77. <el-pagination
  78. background
  79. @size-change="handleSizeChangeFollow"
  80. @current-change="handleCurrentChangeFollow"
  81. :current-page="currentPageFollow"
  82. :page-sizes="isFull ?[100,150, 200, 250]:[10,20, 50, 100, 200]"
  83. :page-size="isFull?100:10"
  84. layout="total,sizes, prev, pager, next, jumper"
  85. :total="totalFollow">
  86. </el-pagination>
  87. </div>
  88. </div>
  89. </div>
  90. </el-scrollbar>
  91. </div>
  92. </template>
  93. <script>
  94. import quickDate from "@/HDrpManagement/dataanalysis/components/quickDate";
  95. import tableLayout from '@/components/table/index9'
  96. import fullScreen from "@/views/salesData/components/fullScreen";
  97. export default {
  98. name: "clue",
  99. props:['param','isDep','dataid','isPerson'],
  100. components:{quickDate,tableLayout,fullScreen},
  101. data() {
  102. return {
  103. disabled:false,
  104. listAdd:[],
  105. tablecolsAdd:[],
  106. listUpdate:[],
  107. tablecolsUpdate:[],
  108. /*tableHieght:'50px',*/
  109. tableHeight:'',
  110. currentPageAdd:0,
  111. totalAdd:0,
  112. currentPageUpdate:0,
  113. totalUpdate:0,
  114. listFollow:[],
  115. tablecolsFollow:[],
  116. currentPageFollow:0,
  117. totalFollow:0,
  118. begindate:'',
  119. enddate:'',
  120. selectAdd:'周',
  121. selectUpd:'周',
  122. selectFow:'周',
  123. sort:[
  124. {
  125. reversed : 0,
  126. sorted: 1,
  127. sortid: 207,
  128. sortname: "新增,更新排序"
  129. },
  130. {
  131. reversed : 0,
  132. sorted: 1,
  133. sortid: 208,
  134. sortname: "跟进排序"
  135. }
  136. ],
  137. isFull:false,
  138. clueAddParam:{
  139. "id": 20230617143104,
  140. "content": {
  141. "pageNumber": 1,
  142. "pageSize": 10,
  143. "dataType":"1",//1 线索新增列表 2 线索更新列表 3 线索跟进列表4 客户新增列表 5 客户更新列表 6 客户跟进列表 7 项目新增列表8 项目更新列表 9 项目跟进列表 10 报价单列表 11 合同列表
  144. "type":'',//0 按人搜素 1 按部门搜索
  145. "dataid":"",// 人员id或部门id
  146. "dateType":'',
  147. "where":{
  148. "begindate":"",
  149. "enddate":"",
  150. "isleave":"1"
  151. }
  152. }
  153. },
  154. clueUpdParam:{
  155. "id": 20230617143104,
  156. "content": {
  157. "pageNumber": 1,
  158. "pageSize": 10,
  159. "dataType":"2",//1 线索新增列表 2 线索更新列表 3 线索跟进列表4 客户新增列表 5 客户更新列表 6 客户跟进列表 7 项目新增列表8 项目更新列表 9 项目跟进列表 10 报价单列表 11 合同列表
  160. "type":'',//0 按人搜素 1 按部门搜索
  161. "dataid":"",// 人员id或部门id
  162. "dateType":'',
  163. "where":{
  164. "begindate":"",
  165. "enddate":"",
  166. "isleave":"1"
  167. }
  168. }
  169. },
  170. clueFowParam:{
  171. "id": 20230617143104,
  172. "content": {
  173. "pageNumber": 1,
  174. "pageSize": 10,
  175. "dataType":"3",//1 线索新增列表 2 线索更新列表 3 线索跟进列表4 客户新增列表 5 客户更新列表 6 客户跟进列表 7 项目新增列表8 项目更新列表 9 项目跟进列表 10 报价单列表 11 合同列表
  176. "type":'',//0 按人搜素 1 按部门搜索
  177. "dataid":"",// 人员id或部门id
  178. "dateType":'',
  179. "where":{
  180. "begindate":"",
  181. "enddate":"",
  182. "isleave":"1"
  183. }
  184. }
  185. }
  186. }
  187. },
  188. methods:{
  189. async queryAdd(){
  190. this.clueAddParam.content.dataType = 1
  191. this.clueAddParam.content.where.begindate = this.selectAdd ? '' :this.begindate
  192. this.clueAddParam.content.where.enddate = this.selectAdd ? '' : this.enddate
  193. this.clueAddParam.content.dateType = this.selectAdd
  194. this.clueAddParam.content.sort = [this.sort[0]]
  195. const res = await this.$api.requested(this.clueAddParam)
  196. this.listAdd = res.data
  197. this.currentPageAdd = res.pageNumber
  198. this.totalAdd = res.total
  199. },
  200. handleSizeChangeAdd(val) {
  201. // console.log(`每页 ${val} 条`);
  202. this.clueAddParam.content.pageSize = val
  203. this.queryAdd()
  204. },
  205. handleCurrentChangeAdd(val) {
  206. // console.log(`当前页: ${val}`);
  207. this.clueAddParam.content.pageNumber = val
  208. this.queryAdd()
  209. },
  210. async queryUpdate(){
  211. this.clueUpdParam.content.dataType = 2
  212. this.clueUpdParam.content.where.begindate = this.selectUpd ? '' :this.begindate
  213. this.clueUpdParam.content.where.enddate = this.selectUpd ? '' : this.enddate
  214. this.clueUpdParam.content.dateType = this.selectUpd
  215. this.clueUpdParam.content.sort = [this.sort[0]]
  216. const res = await this.$api.requested(this.clueUpdParam)
  217. this.listUpdate = res.data
  218. this.currentPageUpdate = res.pageNumber
  219. this.totalUpdate = res.total
  220. },
  221. handleSizeChangeUpdate(val) {
  222. // console.log(`每页 ${val} 条`);
  223. this.clueUpdParam.content.pageSize = val
  224. this.queryUpdate()
  225. },
  226. handleCurrentChangeUpdate(val) {
  227. // console.log(`当前页: ${val}`);
  228. this.clueUpdParam.content.pageNumber = val
  229. this.queryUpdate()
  230. },
  231. async queryFollow(){
  232. this.clueFowParam.content.dataType = 3
  233. this.clueFowParam.content.where.begindate = this.selectFow ? '' :this.begindate
  234. this.clueFowParam.content.where.enddate = this.selectFow ? '' : this.enddate
  235. this.clueFowParam.content.dateType = this.selectFow
  236. this.clueFowParam.content.sort = [this.sort[1]]
  237. const res = await this.$api.requested(this.clueFowParam)
  238. this.listFollow = res.data
  239. this.currentPageFollow = res.pageNumber
  240. this.totalFollow = res.total
  241. },
  242. handleSizeChangeFollow(val) {
  243. // console.log(`每页 ${val} 条`);
  244. this.clueFowParam.content.pageSize = val
  245. this.queryFollow()
  246. },
  247. handleCurrentChangeFollow(val) {
  248. // console.log(`当前页: ${val}`);
  249. this.clueFowParam.content.pageNumber = val
  250. this.queryFollow()
  251. },
  252. /*日期筛选*/
  253. selectQuickAdd(begindate,enddate,select){
  254. this.begindate = begindate
  255. this.enddate = enddate
  256. this.selectAdd = select
  257. this.queryAdd(this.param.content.pageNumber = 1)
  258. },
  259. selectQuickUpd(begindate,enddate,select){
  260. this.begindate = begindate
  261. this.enddate = enddate
  262. this.selectUpd = select
  263. this.queryUpdate(this.param.content.pageNumber = 1)
  264. },
  265. selectQuickFow(begindate,enddate,select){
  266. this.begindate = begindate
  267. this.enddate = enddate
  268. this.selectFow = select
  269. this.queryFollow(this.param.content.pageNumber = 1)
  270. },
  271. /*全屏*/
  272. onAddFull(){
  273. this.clueAddParam.content.dataType = 1
  274. this.clueAddParam.content.pageNumber = 1
  275. this.clueAddParam.content.pageSize = 100
  276. this.queryAdd()
  277. this.isFull = true
  278. },
  279. onUpdFull(){
  280. this.clueUpdParam.content.dataType = 2
  281. this.clueUpdParam.content.pageNumber = 1
  282. this.clueUpdParam.content.pageSize = 100
  283. this.queryUpdate()
  284. this.isFull = true
  285. },
  286. onFowFull(){
  287. this.clueFowParam.content.dataType = 3
  288. this.clueFowParam.content.pageNumber = 1
  289. this.clueFowParam.content.pageSize = 100
  290. this.queryFollow()
  291. this.isFull = true
  292. },
  293. /*退出全屏*/
  294. backAddFull(){
  295. this.clueAddParam.content.dataType = 1
  296. this.clueAddParam.content.pageNumber = 1
  297. this.clueAddParam.content.pageSize = 10
  298. this.disabled = false
  299. this.queryAdd()
  300. this.isFull = false
  301. },
  302. backUpdFull(){
  303. this.clueUpdParam.content.dataType = 2
  304. this.clueUpdParam.content.pageNumber = 1
  305. this.clueUpdParam.content.pageSize = 10
  306. this.queryUpdate()
  307. this.isFull = false
  308. },
  309. backFowFull(){
  310. this.clueFowParam.content.dataType = 3
  311. this.clueFowParam.content.pageNumber = 1
  312. this.clueFowParam.content.pageSize = 10
  313. this.queryFollow()
  314. this.isFull = false
  315. }
  316. },
  317. created() {
  318. this.tablecolsAdd = this.tool.tabelCol(this.$route.name).clueAdd.tablecols
  319. this.tablecolsUpdate = this.tool.tabelCol(this.$route.name).clueUpdate.tablecols
  320. this.tablecolsFollow = this.tool.tabelCol(this.$route.name).clueFollow.tablecols
  321. }
  322. }
  323. </script>
  324. <style scoped>
  325. </style>