customerEfficiency.vue 38 KB

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