marketEfficiency.vue 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. <template>
  2. <div class="app-container organization-index">
  3. <div class="title-container">
  4. <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
  5. </div>
  6. <div>
  7. <el-tabs v-model="activeTabName" @tab-click="tabClick" type="border-card">
  8. <el-tab-pane label="市场部效率值表" name="department">
  9. <div style="width: 100%; height: 50px;">
  10. <el-date-picker style="margin-right: 20px;float: left;" v-model="selectDate1" type="daterange"
  11. :picker-options="pickerOptions" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd"
  12. range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right">
  13. </el-date-picker>
  14. <el-select v-model="listQueryByDepartment.departmentId" filterable placeholder="下单部门"
  15. style=" width: 200px;margin-left: 10px;float: left;">
  16. <el-option v-for="(d, id) in marketDepartment" :label="d.name" :value="d.id"></el-option>
  17. </el-select>
  18. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary"
  19. @click="searchList1()" round>搜索
  20. </el-button>
  21. <el-button class="filter-item" round type="success" @click="resetParams1()">重置
  22. </el-button>
  23. <el-button class="filter-item" round type="info" @click="exportMajorMarketDepEfficiency()"
  24. :disabled="exportStatus">导出
  25. </el-button>
  26. </div>
  27. <el-table :data="depEfficiency" fit stripe highlight-current-row
  28. :header-row-style="{ color: '#333333', 'font-size': '14px' }" :header-cell-style="{ 'text-align': 'center' }"
  29. :cell-style="{ 'text-align': 'center' }" style=" width: 100%; float: right;
  30. border-left: 1px solid #ebeced;
  31. border-right: 1px solid #ebeced;
  32. color: #333333; font-size: 14px;"
  33. v-loading="departmentLoading"
  34. element-loading-text="报表查询中...">
  35. <el-table-column label="部门名称" width="150">
  36. <template slot-scope="{row}">
  37. <span>{{ row.departmentName }}</span>
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="下单量">
  41. <el-table-column label="当期">
  42. <template slot-scope="{row}">
  43. <el-link v-if="row.currentPeriodOrderVolume > 0"
  44. @click="setListQueryParms('order', row.departmentId, listQueryByDepartment.startTime, listQueryByDepartment.endTime)">
  45. {{ row.currentPeriodOrderVolume }}
  46. </el-link>
  47. <span v-else>{{ row.currentPeriodOrderVolume }}</span>
  48. </template>
  49. </el-table-column>
  50. <el-table-column label="同比(%)">
  51. <template slot-scope="{row}">
  52. <span>{{ row.YoYOrderVolume }}</span>
  53. </template>
  54. </el-table-column>
  55. <el-table-column label="环比(%)">
  56. <template slot-scope="{row}">
  57. <span>{{ row.QoQOrderVolume }}</span>
  58. </template>
  59. </el-table-column>
  60. </el-table-column>
  61. <el-table-column label="预评(意见书)">
  62. <el-table-column label="当期">
  63. <template slot-scope="{row}">
  64. <el-link v-if="row.currentPeriodStatementVolume > 0"
  65. @click="setListQueryParms('statement', row.departmentId, listQueryByDepartment.startTime, listQueryByDepartment.endTime)">
  66. {{ row.currentPeriodStatementVolume }}
  67. </el-link>
  68. <span v-else>{{ row.currentPeriodStatementVolume }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="同比(%)">
  72. <template slot-scope="{row}">
  73. <span>{{ row.YoYStatementVolume }}</span>
  74. </template>
  75. </el-table-column>
  76. <el-table-column label="环比(%)">
  77. <template slot-scope="{row}">
  78. <span>{{ row.QoQStatementVolume }}</span>
  79. </template>
  80. </el-table-column>
  81. </el-table-column>
  82. <el-table-column label="报告(咨询、评估、意见函)">
  83. <el-table-column label="当期">
  84. <template slot-scope="{row}">
  85. <el-link v-if="row.currentPeriodReportVolume > 0"
  86. @click="setListQueryParms('report', row.departmentId, listQueryByDepartment.startTime, listQueryByDepartment.endTime)">
  87. {{ row.currentPeriodReportVolume }}
  88. </el-link>
  89. <span v-else>{{ row.currentPeriodReportVolume }}</span>
  90. </template>
  91. </el-table-column>
  92. <el-table-column label="同比(%)">
  93. <template slot-scope="{row}">
  94. <span>{{ row.YoYReportVolume }}</span>
  95. </template>
  96. </el-table-column>
  97. <el-table-column label="环比(%)">
  98. <template slot-scope="{row}">
  99. <span>{{ row.QoQReportVolume }}</span>
  100. </template>
  101. </el-table-column>
  102. </el-table-column>
  103. <el-table-column label="应收款">
  104. <el-table-column label="当期">
  105. <template slot-scope="{row}">
  106. <el-link v-if="row.currentPeriodShouldAmountSum > 0"
  107. @click="setListQueryParms('should', row.departmentId, listQueryByDepartment.startTime, listQueryByDepartment.endTime)">
  108. {{ row.currentPeriodShouldAmountSum }}
  109. </el-link>
  110. <span v-else>{{ row.currentPeriodShouldAmountSum }}</span>
  111. </template>
  112. </el-table-column>
  113. <el-table-column label="同比(%)">
  114. <template slot-scope="{row}">
  115. <span>{{ row.YoYShouldAmountSum }}</span>
  116. </template>
  117. </el-table-column>
  118. <el-table-column label="环比(%)">
  119. <template slot-scope="{row}">
  120. <span>{{ row.QoQShouldAmountSum }}</span>
  121. </template>
  122. </el-table-column>
  123. </el-table-column>
  124. <el-table-column label="实收款">
  125. <el-table-column label="当期">
  126. <template slot-scope="{row}">
  127. <el-link v-if="row.currentPeriodRealAmountSum > 0"
  128. @click="setListQueryParms('real', row.departmentId, listQueryByDepartment.startTime, listQueryByDepartment.endTime)">
  129. {{ row.currentPeriodRealAmountSum }}
  130. </el-link>
  131. <span v-else>{{ row.currentPeriodRealAmountSum }}</span>
  132. </template>
  133. </el-table-column>
  134. <el-table-column label="同比(%)">
  135. <template slot-scope="{row}">
  136. <span>{{ row.YoYRealAmountSum }}</span>
  137. </template>
  138. </el-table-column>
  139. <el-table-column label="环比(%)">
  140. <template slot-scope="{row}">
  141. <span>{{ row.QoQRealAmountSum }}</span>
  142. </template>
  143. </el-table-column>
  144. </el-table-column>
  145. <el-table-column label="实收款总计">
  146. <template slot-scope="{row}">
  147. <span>{{ row.totalRealAmountSum }}</span>
  148. </template>
  149. </el-table-column>
  150. <el-table-column label="出单率">
  151. <el-table-column label="当期(%)">
  152. <template slot-scope="{row}">
  153. <span>{{ row.currentPeriodOrderHasReportVolume }}</span>
  154. </template>
  155. </el-table-column>
  156. <el-table-column label="同比(%)">
  157. <template slot-scope="{row}">
  158. <span>{{ row.YoYOrderHasReportVolume }}</span>
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="环比(%)">
  162. <template slot-scope="{row}">
  163. <span>{{ row.QoQOrderHasReportVolume }}</span>
  164. </template>
  165. </el-table-column>
  166. </el-table-column>
  167. <el-table-column label="死单率A(%)" width="98">
  168. <template slot-scope="{row}">
  169. <span>{{ row.deadOrderVolumeA }}</span>
  170. </template>
  171. </el-table-column>
  172. <el-table-column label="死单率B(%)">
  173. <template slot-scope="{row}">
  174. <span>{{ row.deadOrderVolumeB }}</span>
  175. </template>
  176. </el-table-column>
  177. <el-table-column label="死单率C(%)">
  178. <template slot-scope="{row}">
  179. <span>{{ row.deadOrderVolumeC }}</span>
  180. </template>
  181. </el-table-column>
  182. </el-table>
  183. </el-tab-pane>
  184. <el-tab-pane label="客户经理效率值表" name="personal">
  185. <div style="width: 100%; height: 50px;">
  186. <el-date-picker style="margin-right: 20px;float: left;" v-model="selectDate2" type="daterange"
  187. :picker-options="pickerOptions" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd"
  188. range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right">
  189. </el-date-picker>
  190. <el-select v-model="listQueryByManager.departmentId" filterable placeholder="下单部门"
  191. style=" width: 200px;margin-left: 10px;float: left;">
  192. <el-option v-for="(d, id) in marketDepartment" :label="d.name" :value="d.id"></el-option>
  193. </el-select>
  194. <el-input v-model="listQueryByManager.userName" placeholder="姓名" clearable
  195. style="margin-left: 20px;width: 200px;float: left;">
  196. </el-input>
  197. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary"
  198. @click="searchList2()" round>搜索
  199. </el-button>
  200. <el-button class="filter-item" round type="success" @click="resetParams2()">重置
  201. </el-button>
  202. <el-button class="filter-item" round type="info" @click="exportMajorMarketPerEfficiency()"
  203. :disabled="exportStatus">导出
  204. </el-button>
  205. </div>
  206. <el-table :data="perEfficiency" fit stripe highlight-current-row
  207. :header-row-style="{ color: '#333333', 'font-size': '14px' }" :header-cell-style="{ 'text-align': 'center' }"
  208. :cell-style="{ 'text-align': 'center' }" style=" width: 100%; float: right;
  209. border-left: 1px solid #ebeced;
  210. border-right: 1px solid #ebeced;
  211. color: #333333; font-size: 14px;"
  212. v-loading="personalLoading"
  213. element-loading-text="报表查询中...">
  214. <el-table-column label="评估人员" width="150">
  215. <template slot-scope="{row}">
  216. <span>{{ row.userName }}</span>
  217. </template>
  218. </el-table-column>
  219. <el-table-column label="部门名称" width="150">
  220. <template slot-scope="{row}">
  221. <span>{{ row.departmentName }}</span>
  222. </template>
  223. </el-table-column>
  224. <el-table-column label="接单数">
  225. <el-table-column label="当期">
  226. <template slot-scope="{row}">
  227. <el-link v-if="row.currentPeriodOrderVolume > 0"
  228. @click="setListQueryParms('order', null, listQueryByManager.startTime, listQueryByManager.endTime, row.userId)">
  229. {{ row.currentPeriodOrderVolume }}
  230. </el-link>
  231. <span v-else>{{ row.currentPeriodOrderVolume }}</span>
  232. </template>
  233. </el-table-column>
  234. <el-table-column label="同比(%)">
  235. <template slot-scope="{row}">
  236. <span>{{ row.YoYOrderVolume }}</span>
  237. </template>
  238. </el-table-column>
  239. <el-table-column label="环比(%)">
  240. <template slot-scope="{row}">
  241. <span>{{ row.QoQOrderVolume }}</span>
  242. </template>
  243. </el-table-column>
  244. </el-table-column>
  245. <el-table-column label="预评(意见书)">
  246. <el-table-column label="当期">
  247. <template slot-scope="{row}">
  248. <el-link v-if="row.currentPeriodStatementVolume > 0"
  249. @click="setListQueryParms('statement', null, listQueryByManager.startTime, listQueryByManager.endTime, row.userId)">
  250. {{ row.currentPeriodStatementVolume }}
  251. </el-link>
  252. <span v-else>{{ row.currentPeriodStatementVolume }}</span>
  253. </template>
  254. </el-table-column>
  255. <el-table-column label="同比(%)">
  256. <template slot-scope="{row}">
  257. <span>{{ row.YoYStatementVolume }}</span>
  258. </template>
  259. </el-table-column>
  260. <el-table-column label="环比(%)">
  261. <template slot-scope="{row}">
  262. <span>{{ row.QoQStatementVolume }}</span>
  263. </template>
  264. </el-table-column>
  265. </el-table-column>
  266. <el-table-column label="报告(咨询、评估、意见函)">
  267. <el-table-column label="当期">
  268. <template slot-scope="{row}">
  269. <el-link v-if="row.currentPeriodReportVolume > 0"
  270. @click="setListQueryParms('report', null, listQueryByManager.startTime, listQueryByManager.endTime, row.userId)">
  271. {{ row.currentPeriodReportVolume }}
  272. </el-link>
  273. <span v-else>{{ row.currentPeriodReportVolume }}</span>
  274. </template>
  275. </el-table-column>
  276. <el-table-column label="同比(%)">
  277. <template slot-scope="{row}">
  278. <span>{{ row.YoYReportVolume }}</span>
  279. </template>
  280. </el-table-column>
  281. <el-table-column label="环比(%)">
  282. <template slot-scope="{row}">
  283. <span>{{ row.QoQReportVolume }}</span>
  284. </template>
  285. </el-table-column>
  286. </el-table-column>
  287. <el-table-column label="应收款">
  288. <el-table-column label="当期">
  289. <template slot-scope="{row}">
  290. <el-link v-if="row.currentPeriodShouldAmountSum > 0"
  291. @click="setListQueryParms('should', null, listQueryByManager.startTime, listQueryByManager.endTime, row.userId)">
  292. {{ row.currentPeriodShouldAmountSum }}
  293. </el-link>
  294. <span v-else>{{ row.currentPeriodShouldAmountSum }}</span>
  295. </template>
  296. </el-table-column>
  297. <el-table-column label="同比(%)">
  298. <template slot-scope="{row}">
  299. <span>{{ row.YoYShouldAmountSum }}</span>
  300. </template>
  301. </el-table-column>
  302. <el-table-column label="环比(%)">
  303. <template slot-scope="{row}">
  304. <span>{{ row.QoQShouldAmountSum }}</span>
  305. </template>
  306. </el-table-column>
  307. </el-table-column>
  308. <el-table-column label="实收款">
  309. <el-table-column label="当期">
  310. <template slot-scope="{row}">
  311. <el-link v-if="row.currentPeriodRealAmountSum > 0"
  312. @click="setListQueryParms('real', null, listQueryByManager.startTime, listQueryByManager.endTime, row.userId)">
  313. {{ row.currentPeriodRealAmountSum }}
  314. </el-link>
  315. <span v-else>{{ row.currentPeriodRealAmountSum }}</span>
  316. </template>
  317. </el-table-column>
  318. <el-table-column label="同比(%)">
  319. <template slot-scope="{row}">
  320. <span>{{ row.YoYRealAmountSum }}</span>
  321. </template>
  322. </el-table-column>
  323. <el-table-column label="环比(%)">
  324. <template slot-scope="{row}">
  325. <span>{{ row.QoQRealAmountSum }}</span>
  326. </template>
  327. </el-table-column>
  328. </el-table-column>
  329. <el-table-column label="实收款总计">
  330. <template slot-scope="{row}">
  331. <span>{{ row.totalRealAmountSum }}</span>
  332. </template>
  333. </el-table-column>
  334. <el-table-column label="出单率">
  335. <el-table-column label="当期(%)">
  336. <template slot-scope="{row}">
  337. <span>{{ row.currentPeriodOrderHasReportVolume }}</span>
  338. </template>
  339. </el-table-column>
  340. <el-table-column label="同比(%)">
  341. <template slot-scope="{row}">
  342. <span>{{ row.YoYOrderHasReportVolume }}</span>
  343. </template>
  344. </el-table-column>
  345. <el-table-column label="环比(%)">
  346. <template slot-scope="{row}">
  347. <span>{{ row.QoQOrderHasReportVolume }}</span>
  348. </template>
  349. </el-table-column>
  350. </el-table-column>
  351. </el-table>
  352. </el-tab-pane>
  353. </el-tabs>
  354. </div>
  355. <el-dialog title="大中型订单列表" :visible.sync="dialogVisible" width="70%" @open="getMajorEfficiencyDetailVO()">
  356. <y-page-list-layout :get-page-list="getMajorEfficiencyDetailVO" :page-list="pageData" :page-para="listQueryDetail">
  357. <template slot="left">
  358. <el-button class="filter-item" round type="info" @click="exportMajorEvaEffDetail()">导出
  359. </el-button>
  360. </template>
  361. <parentTable ref="table" :data="pageData.records" v-loading="dialogLoading" element-loading-text="报表查询中..." slot="table" style="width: 100%;" :isBoard=800
  362. class="tableFull">
  363. <el-table-column label="项目编号" align="center">
  364. <template slot-scope="{row}">
  365. <span>{{ row.orderId }}</span>
  366. </template>
  367. </el-table-column>
  368. <el-table-column label="项目名称" align="center">
  369. <template slot-scope="{row}">
  370. <span>{{ row.projectName }}</span>
  371. </template>
  372. </el-table-column>
  373. <el-table-column label="客户名称" align="center">
  374. <template slot-scope="{row}">
  375. <span>{{ row.customerName }}</span>
  376. </template>
  377. </el-table-column>
  378. <el-table-column label="业务来源" align="center">
  379. <template slot-scope="{row}">
  380. <span>{{ row.customerSubName }}</span>
  381. </template>
  382. </el-table-column>
  383. <el-table-column label="客户联系人名" align="center">
  384. <template slot-scope="{row}">
  385. <span>{{ row.linkmanName }}</span>
  386. </template>
  387. </el-table-column>
  388. <el-table-column label="委托人" align="center">
  389. <template slot-scope="{row}">
  390. <span>{{ row.bailor }}</span>
  391. </template>
  392. </el-table-column>
  393. <el-table-column label="报告号" align="center">
  394. <template slot-scope="{row}">
  395. <span>{{ row.reportNo }}</span>
  396. </template>
  397. </el-table-column>
  398. <el-table-column label="项目负责人" align="center">
  399. <template slot-scope="{row}">
  400. <span>{{ row.principalName }}</span>
  401. </template>
  402. </el-table-column>
  403. <el-table-column label="项目参与人" align="center">
  404. <template slot-scope="{row}">
  405. <span>{{ row.members }}</span>
  406. </template>
  407. </el-table-column>
  408. <el-table-column label="客户经理名" align="center">
  409. <template slot-scope="{row}">
  410. <span>{{ row.clientManagerName }}</span>
  411. </template>
  412. </el-table-column>
  413. <el-table-column label="评估金额(万元)" align="center">
  414. <template slot-scope="{row}">
  415. <span>{{ row.checkValueSum }}</span>
  416. </template>
  417. </el-table-column>
  418. <el-table-column label="实勘时间" align="center">
  419. <template slot-scope="{row}">
  420. <span>{{ row.reconnaissanceDate }}</span>
  421. </template>
  422. </el-table-column>
  423. <el-table-column label="出意见书时间" align="center">
  424. <template slot-scope="{row}">
  425. <span>{{ row.writeStatementDate }}</span>
  426. </template>
  427. </el-table-column>
  428. <el-table-column label="出报告时间" align="center">
  429. <template slot-scope="{row}">
  430. <span>{{ row.writeReportDate }}</span>
  431. </template>
  432. </el-table-column>
  433. <el-table-column label="订单应收款(元)" align="center">
  434. <template slot-scope="{row}">
  435. <span>{{ row.shouldAmount }}</span>
  436. </template>
  437. </el-table-column>
  438. <el-table-column label="订单实收款(元)" align="center">
  439. <template slot-scope="{row}">
  440. <span>{{ row.realAmount }}</span>
  441. </template>
  442. </el-table-column>
  443. <el-table-column label="当前实例节点名称" align="center">
  444. <template slot-scope="{row}">
  445. <span>{{ row.currentNodeName }}</span>
  446. </template>
  447. </el-table-column>
  448. <el-table-column label="当前节点处理人" align="center">
  449. <template slot-scope="{row}">
  450. <span>{{ row.handlerName }}</span>
  451. </template>
  452. </el-table-column>
  453. </parentTable>
  454. </y-page-list-layout>
  455. </el-dialog>
  456. </div>
  457. </template>
  458. <script>
  459. import Breadcrumb from '@/components/Breadcrumb'
  460. import YPageListLayout from '@/components/YPageListLayout'
  461. export default {
  462. name: 'majorEvaluateEfficiency',
  463. components: {
  464. Breadcrumb,
  465. YPageListLayout
  466. },
  467. data() {
  468. return {
  469. dialogLoading: false,
  470. activeTabName: 'department',
  471. dialogVisible: false,
  472. listLoading: false,
  473. // 时间
  474. selectDate1: [],
  475. selectDate2: [],
  476. listQueryByDepartment: {
  477. // 开始时间
  478. startTime: null,
  479. // 结束时间
  480. endTime: null,
  481. // 部门id
  482. departmentId: null
  483. },
  484. listQueryByManager: {
  485. // 开始时间
  486. startTime: null,
  487. // 结束时间
  488. endTime: null,
  489. // 部门id
  490. departmentId: null,
  491. // 评估人员姓名
  492. userName: null
  493. },
  494. listQueryDetail: {
  495. page: 1,
  496. size: 10,
  497. current: 1,
  498. // 效率类型(接单:order、预评:statement、报告:report、应收款:should、实收款:real)
  499. efficiencyType: null,
  500. // 开始时间
  501. startTime: null,
  502. // 结束时间
  503. endTime: null,
  504. // 市场部门id
  505. marketDepartmentId: null,
  506. // 客户经理id
  507. clientManagerId: null
  508. },
  509. // 下单部门
  510. marketDepartment: [],
  511. pickerOptions: {
  512. shortcuts: [{
  513. text: '最近一周',
  514. onClick(picker) {
  515. const end = new Date();
  516. const start = new Date();
  517. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  518. picker.$emit('pick', [start, end]);
  519. }
  520. }, {
  521. text: '最近一个月',
  522. onClick(picker) {
  523. const end = new Date();
  524. const start = new Date();
  525. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  526. picker.$emit('pick', [start, end]);
  527. }
  528. }, {
  529. text: '最近三个月',
  530. onClick(picker) {
  531. const end = new Date();
  532. const start = new Date();
  533. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  534. picker.$emit('pick', [start, end]);
  535. }
  536. }]
  537. },
  538. exportStatus: true,
  539. depEfficiency: [],
  540. perEfficiency: [],
  541. pageData: { records: [] },
  542. departmentLoading: false,
  543. personalLoading: false
  544. }
  545. },
  546. created() {
  547. this.selectDate1.push(this.getDefaultStartDate());
  548. this.selectDate1.push(this.getDefaultEndDate());
  549. this.selectDate2.push(this.getDefaultStartDate());
  550. this.selectDate2.push(this.getDefaultEndDate());
  551. this.getMajorMarketDepartment();
  552. this.getMajorMarketDepEfficiencyVO();
  553. },
  554. methods: {
  555. getDefaultStartDate() {
  556. let currentDate = new Date();
  557. let currentYear = currentDate.getFullYear();
  558. var currentMonth = String(currentDate.getMonth()).padStart(2, "0");
  559. if (currentMonth=='00'){
  560. currentYear = currentYear-1;
  561. currentMonth = 12
  562. }
  563. return currentYear + '-' + currentMonth + '-' + '23'
  564. },
  565. getDefaultEndDate() {
  566. const currentDate = new Date();
  567. const currentYear = currentDate.getFullYear();
  568. var currentMonth = String(currentDate.getMonth() + 1).padStart(2, "0");
  569. return currentYear + '-' + currentMonth + '-' + '22'
  570. },
  571. tabClick(tab, event) {
  572. if (tab.name === 'department') {
  573. this.getMajorMarketDepEfficiencyVO();
  574. }
  575. if (tab.name === 'personal') {
  576. this.getMajorMarketPerEfficiencyVO();
  577. }
  578. },
  579. // 条件查询
  580. searchList1() {
  581. this.getMajorMarketDepEfficiencyVO()
  582. },
  583. // 重置搜索条件
  584. resetParams1() {
  585. this.exportStatus = true;
  586. this.listQueryByDepartment = {
  587. // 开始时间
  588. startTime: null,
  589. // 结束时间
  590. endTime: null,
  591. // 部门id
  592. departmentId: null
  593. };
  594. this.selectDate1 = [];
  595. this.selectDate1.push(this.getDefaultStartDate());
  596. this.selectDate1.push(this.getDefaultEndDate());
  597. this.getMajorMarketDepEfficiencyVO();
  598. },
  599. getMajorMarketDepEfficiencyVO() {
  600. this.departmentLoading = true;
  601. if (this.selectDate1) {
  602. this.listQueryByDepartment.startTime = this.selectDate1[0] + ' 00:00:00';
  603. this.listQueryByDepartment.endTime = this.selectDate1[1] + ' 23:59:59';
  604. }
  605. this.$api.statistical.getMajorMarketDepEfficiencyVO(this.listQueryByDepartment).then(res => {
  606. if (res.code === 200) {
  607. this.depEfficiency = res.data;
  608. if (this.listQueryByDepartment.startTime !== null && this.listQueryByDepartment.endTime !== null && res.data.length > 0) {
  609. this.exportStatus = false;
  610. } else {
  611. this.exportStatus = true;
  612. }
  613. }
  614. this.departmentLoading = false;
  615. })
  616. },
  617. exportMajorMarketDepEfficiency() {
  618. this.$utils.exportUtil(
  619. "major/statisticalStatement/market/dep/getEfficiencyVO/export", this.listQueryByDepartment,
  620. "导出"
  621. );
  622. },
  623. // 获取部门下拉列表
  624. getMajorMarketDepartment() {
  625. this.$api.assets.getAssetsMarketDepartment().then(res => {
  626. if (res.code === 200) {
  627. this.marketDepartment = res.data;
  628. }
  629. })
  630. },
  631. // 条件查询
  632. searchList2() {
  633. this.getMajorMarketPerEfficiencyVO()
  634. },
  635. // 重置搜索条件
  636. resetParams2() {
  637. this.exportStatus = true;
  638. this.listQueryByManager = {
  639. // 开始时间
  640. startTime: null,
  641. // 结束时间
  642. endTime: null,
  643. // 部门id
  644. departmentId: null
  645. };
  646. this.selectDate2 = [];
  647. this.selectDate2.push(this.getDefaultStartDate());
  648. this.selectDate2.push(this.getDefaultEndDate());
  649. this.getMajorMarketPerEfficiencyVO();
  650. },
  651. getMajorMarketPerEfficiencyVO() {
  652. this.personalLoading = true;
  653. if (this.selectDate2) {
  654. this.listQueryByManager.startTime = this.selectDate2[0] + ' 00:00:00';
  655. this.listQueryByManager.endTime = this.selectDate2[1] + ' 23:59:59';
  656. }
  657. this.$api.statistical.getMajorMarketPerEfficiencyVO(this.listQueryByManager).then(res => {
  658. if (res.code === 200) {
  659. this.perEfficiency = res.data;
  660. if (this.listQueryByManager.startTime !== null && this.listQueryByManager.endTime !== null && res.data.length > 0) {
  661. this.exportStatus = false;
  662. } else {
  663. this.exportStatus = true;
  664. }
  665. }
  666. this.personalLoading = false;
  667. })
  668. },
  669. exportMajorMarketPerEfficiency() {
  670. this.$utils.exportUtil(
  671. "major/statisticalStatement/market/per/getEfficiencyVO/export", this.listQueryByManager,
  672. "导出"
  673. );
  674. },
  675. setListQueryParms(efficiencyType, departmentId, startTime, endTime, userId) {
  676. this.dialogVisible = true;
  677. this.listQueryDetail.page = 1;
  678. this.listQueryDetail.size = 10;
  679. this.listQueryDetail.current = 1;
  680. this.listQueryDetail.efficiencyType = efficiencyType;
  681. if(departmentId) {
  682. this.listQueryDetail.marketDepartmentId = departmentId;
  683. }
  684. this.listQueryDetail.startTime = startTime;
  685. this.listQueryDetail.endTime = endTime;
  686. if (userId) {
  687. this.listQueryDetail.clientManagerId = userId;
  688. }else{
  689. this.listQueryDetail.clientManagerId = null;
  690. }
  691. },
  692. // 效率详情列表查询
  693. getMajorEfficiencyDetailVO() {
  694. this.dialogLoading = true;
  695. this.$api.statistical.getMajorEfficiencyDetailVO(this.listQueryDetail).then(res => {
  696. if (res.code === 200) {
  697. this.pageData = res.data;
  698. }
  699. this.dialogLoading = false;
  700. })
  701. },
  702. // 效率详情列表查询导出
  703. exportMajorEvaEffDetail() {
  704. this.$utils.exportUtil(
  705. "major/statisticalStatement/evaluate/getMajorEfficiencyDetailVO/export", this.listQueryDetail,
  706. "导出"
  707. );
  708. }
  709. }
  710. }
  711. </script>
  712. <style scoped lang="scss">
  713. /* el-table 列数据为空自动显示 - */
  714. .tableFull :empty::before{
  715. content:'-';
  716. color:gray;
  717. }
  718. </style>