home.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034
  1. <template >
  2. <div id="" class="zap-home__main">
  3. <!-- 平台 -->
  4. <div v-if="company.scyType == '00'">
  5. <div class="zap-home__title">平台数据统计</div>
  6. <el-row :gutter="20">
  7. <!-- 第一行 -->
  8. <el-col :xs="24" :sm="12" :md="8" :lg="8">
  9. <div class="zap-card">
  10. <div class="zap-card__title">入驻企业总数</div>
  11. <div class="zap-card__wrap zap-card__blue">
  12. <span class="zap-card__num">{{companyNum}}</span>
  13. <span class="zap-card__unit">个</span>
  14. </div>
  15. </div>
  16. </el-col>
  17. <el-col :xs="24" :sm="12" :md="8" :lg="8">
  18. <div class="zap-card">
  19. <div class="zap-card__title">已融资/供应商入驻数量</div>
  20. <div class="zap-card__wrap zap-card__gold">
  21. <span class="zap-card__num">{{financeSupplierNum}}</span>
  22. <span class="zap-card__unit">万</span>
  23. <span class="zap-card__slash">/</span>
  24. <span class="zap-card__num">{{supplierNum}}</span>
  25. <span class="zap-card__unit">个</span>
  26. </div>
  27. </div>
  28. </el-col>
  29. <el-col :xs="24" :sm="12" :md="8" :lg="8">
  30. <div class="zap-card">
  31. <div class="zap-card__title">入驻核心企业数</div>
  32. <div class="zap-card__wrap zap-card__pink">
  33. <span class="zap-card__num">{{coreNum}}</span>
  34. <span class="zap-card__unit">个</span>
  35. </div>
  36. </div>
  37. </el-col>
  38. <!-- 第二行 -->
  39. <el-col :xs="24" :sm="12" :md="8" :lg="8">
  40. <div class="zap-card">
  41. <div class="zap-card__title">总融资金额</div>
  42. <div class="zap-card__wrap zap-card__blue">
  43. <span class="zap-card__num">{{handleInput(getFinancedNum())}}</span>
  44. <span class="zap-card__unit">万</span>
  45. </div>
  46. </div>
  47. </el-col>
  48. <el-col :xs="24" :sm="12" :md="8" :lg="8">
  49. <div class="zap-card">
  50. <div class="zap-card__title">融资中金额</div>
  51. <div class="zap-card__wrap zap-card__gold">
  52. <span class="zap-card__num">{{handleInput(availableBalance)}}</span>
  53. <span class="zap-card__unit">万</span>
  54. </div>
  55. </div>
  56. </el-col>
  57. <el-col :xs="24" :sm="12" :md="8" :lg="8">
  58. <div class="zap-card">
  59. <div class="zap-card__title">已放款金额</div>
  60. <div class="zap-card__wrap zap-card__pink">
  61. <span class="zap-card__num">{{handleInput(loanBalance)}}</span>
  62. <span class="zap-card__unit">个</span>
  63. </div>
  64. </div>
  65. </el-col>
  66. <!-- 第三行 -->
  67. <el-col :xs="24" :sm="12" :md="8" :lg="8">
  68. <div class="zap-card">
  69. <div class="zap-card__title">发起融资业务数</div>
  70. <div class="zap-card__wrap zap-card__blue">
  71. <span class="zap-card__num">{{financeNum}}</span>
  72. <span class="zap-card__unit">笔</span>
  73. </div>
  74. </div>
  75. </el-col>
  76. <el-col :xs="24" :sm="12" :md="8" :lg="8">
  77. <div class="zap-card">
  78. <div class="zap-card__title">核心企业总授信额度</div>
  79. <div class="zap-card__wrap zap-card__gold">
  80. <span class="zap-card__num">{{handleInput(creditLineAll)}}</span>
  81. <span class="zap-card__unit">万</span>
  82. </div>
  83. </div>
  84. </el-col>
  85. <el-col :xs="24" :sm="12" :md="8" :lg="8">
  86. <div class="zap-card">
  87. <div class="zap-card__title">剩余可用授信</div>
  88. <div class="zap-card__wrap zap-card__pink">
  89. <span class="zap-card__num">{{handleInput(getsubNum())}}</span>
  90. <span class="zap-card__unit">万</span>
  91. </div>
  92. </div>
  93. </el-col>
  94. </el-row>
  95. <!-- 平台资金统计扇形图 -->
  96. <el-row class="zap-home-chart">
  97. <el-col>
  98. <div class="zap-home-chart__title">平台资金统计</div>
  99. <div id="echartPie" style="width: 100%;height: 490px"></div>
  100. <!-- <echart-pie :series-data="financeAmountList" :extra-option="extraOption"/> -->
  101. </el-col>
  102. </el-row>
  103. <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
  104. <div slot="header" class="clearfix">
  105. <span style="color: #666ee8; font-weight: bold;">平台用户统计</span>
  106. </div>
  107. <div class="text item" style="height:650px">
  108. <el-select v-model="dateType" @change="getCompanyReport">
  109. <el-option v-for="(item,index) in dateTypeList" :key="index" :label="item.label" :value="item.value">
  110. </el-option>
  111. </el-select>
  112. <echart-bar :series-data="companyDataList" :extra-option="companyExtraOption"/>
  113. </div>
  114. </el-card>
  115. <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
  116. <div slot="header" class="clearfix">
  117. <span style="color: #666ee8; font-weight: bold;">平台业务统计</span>
  118. </div>
  119. <div class="text item" style="height:650px">
  120. <el-select v-model="financeDateType" @change="getFinanceRecordMonth">
  121. <el-option v-for="(item,index) in dateTypeList" :key="index" :label="item.label" :value="item.value">
  122. </el-option>
  123. </el-select>
  124. <echart-bar :series-data="yearDataList" :extra-option="yearExtraOption"/>
  125. </div>
  126. </el-card>
  127. <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
  128. <div slot="header" class="clearfix">
  129. <span style="color: #666ee8; font-weight: bold;">核心企业可用额度比例</span>
  130. </div>
  131. <div class="text item" style="height:650px">
  132. <echart-bar :series-data="coreFinanceAmountList" :extra-option="coreFinanceAmountExtraOption"/>
  133. </div>
  134. </el-card>
  135. </div>
  136. <!-- 核心企业 -->
  137. <div v-if="company.scyType == '01'">
  138. <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
  139. <div slot="header" class="clearfix">
  140. <span style="color: #666ee8; font-weight: bold;">我开立的融信</span>
  141. </div>
  142. <div class="text item" style="height:100px">
  143. <span style="color: #666ee8; font-weight: bold;">{{handleInput(getFinancedNum())}}</span>
  144. </div>
  145. </el-card>
  146. <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
  147. <div slot="header" class="clearfix">
  148. <span style="color: #666ee8; font-weight: bold;">可用授权额度</span>
  149. </div>
  150. <div class="text item" style="height:100px">
  151. <span style="color: #666ee8; font-weight: bold;">{{handleInput(getsubNum())}}</span>
  152. </div>
  153. </el-card>
  154. <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
  155. <div slot="header" class="clearfix">
  156. <span style="color: #666ee8; font-weight: bold;">即将到期付款</span>
  157. </div>
  158. <div class="text item" style="height:100px">
  159. <span style="color: #666ee8; font-weight: bold;">{{handleInput(expiredBalance)}}</span>
  160. </div>
  161. </el-card>
  162. <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
  163. <div slot="header" class="clearfix">
  164. <span style="color: #666ee8; font-weight: bold;">我的代办</span>
  165. </div>
  166. <div class="text item" style="height:100px">
  167. <span style="color: #666ee8; font-weight: bold;">{{workTotal}}</span>
  168. </div>
  169. </el-card>
  170. <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
  171. <div slot="header" class="clearfix">
  172. <span style="color: #666ee8; font-weight: bold;">可用授权额度(正向保理)</span>
  173. </div>
  174. <div class="text item" style="height:100px">
  175. <span style="color: #666ee8; font-weight: bold;">{{handleInput(getsubNumForward())}}</span>
  176. </div>
  177. </el-card>
  178. <el-card class="box-card" style="width:30.2%;margin:0.6%;float:left;">
  179. <div slot="header" class="clearfix">
  180. <span style="color: #666ee8; font-weight: bold;">总授权额度(正向保理)</span>
  181. </div>
  182. <div class="text item" style="height:100px">
  183. <span style="color: #666ee8; font-weight: bold;">{{handleInput(creditLineAllForward)}}</span>
  184. </div>
  185. </el-card>
  186. <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
  187. <div class="text item">
  188. <el-tabs v-model="activeName">
  189. <el-tab-pane label="我的待办" name="first" style="height:400px">
  190. <el-table :data="workList" :show-header="false">
  191. <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
  192. <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true">
  193. <template slot-scope="scope">
  194. <span>{{ parseTime(new Date(scope.row.createTime)) }}</span>
  195. </template>
  196. </el-table-column>
  197. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
  198. <template slot-scope="scope">
  199. <el-button
  200. size="mini"
  201. type="text"
  202. @click="handleDetail(scope.row)"
  203. >去办理</el-button>
  204. <!-- v-if="scope.row.openUrl" -->
  205. </template>
  206. </el-table-column>
  207. </el-table>
  208. <pagination
  209. v-show="workTotal>0"
  210. :total="workTotal"
  211. :page.sync="queryParamsWork.pageNum"
  212. :limit.sync="queryParamsWork.pageSize"
  213. :pager-count="5"
  214. :page-sizes="[5]"
  215. @pagination="getWorkList"
  216. />
  217. </el-tab-pane>
  218. <el-tab-pane label="消息" name="second" style="height:400px">
  219. <el-table :data="noticeList" :show-header="false">
  220. <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
  221. <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true">
  222. <template slot-scope="scope">
  223. <span>{{ parseTime(new Date(scope.row.createTime)) }}</span>
  224. </template>
  225. </el-table-column>
  226. </el-table>
  227. <pagination
  228. v-show="noticeTotal>0"
  229. :total="noticeTotal"
  230. :page.sync="queryParamsNotice.pageNum"
  231. :limit.sync="queryParamsNotice.pageSize"
  232. :pager-count="5"
  233. :page-sizes="[5]"
  234. @pagination="getNoticeList"
  235. />
  236. </el-tab-pane>
  237. </el-tabs>
  238. </div>
  239. </el-card>
  240. <el-card class="box-card" style="width:59%;margin:0.6%;float:left;">
  241. <div slot="header" class="clearfix">
  242. <span style="color: #666ee8; font-weight: bold;">融信授权额度</span>
  243. </div>
  244. <div class="text item">
  245. <echart-pie :series-data="dataList" :extra-option="extraOption" style="height:200px;width:40%;float:left"/>
  246. <div style="height:300px;width:60%;float:right">
  247. <el-table :data="creditLineList">
  248. <el-table-column label="渠道名称" align="center" prop="managementName" :show-overflow-tooltip="true"/>
  249. <el-table-column label="额度" align="center" prop="allAmount" :show-overflow-tooltip="true"/>
  250. <el-table-column label="可用金额" align="center" prop="subAmount" :show-overflow-tooltip="true"/>
  251. <el-table-column label="已用金额" align="center" prop="availableAmount" :show-overflow-tooltip="true"/>
  252. </el-table>
  253. <pagination
  254. v-show="creditLineTotal>0"
  255. :total="creditLineTotal"
  256. :page.sync="queryParams.pageNum"
  257. :limit.sync="queryParams.pageSize"
  258. :pager-count="5"
  259. :page-sizes="[5]"
  260. @pagination="getList"
  261. />
  262. </div>
  263. </div>
  264. </el-card>
  265. <el-card class="box-card" style="width:33%;margin:0.6%;float:left;">
  266. <div slot="header" class="clearfix">
  267. <span style="color: #666ee8; font-weight: bold;">融信统计</span>
  268. </div>
  269. <div class="text item">
  270. <div style="height:300px">
  271. <el-table :data="creditLineNumList">
  272. <el-table-column label="渠道名称" align="center" prop="managementName" :show-overflow-tooltip="true"/>
  273. <el-table-column label="数量" align="center" prop="num" :show-overflow-tooltip="true"/>
  274. <el-table-column label="额度" align="center" prop="allAmount" :show-overflow-tooltip="true"/>
  275. </el-table>
  276. <pagination
  277. v-show="creditLineNumTotal>0"
  278. :total="creditLineNumTotal"
  279. :page.sync="queryParamsNum.pageNum"
  280. :limit.sync="queryParamsNum.pageSize"
  281. :pager-count="5"
  282. :page-sizes="[5]"
  283. @pagination="getNumList"
  284. />
  285. </div>
  286. </div>
  287. </el-card>
  288. <el-card class="box-card" style="width:46%;margin:0.6%;float:left;">
  289. <div slot="header" class="clearfix">
  290. <span style="color: #666ee8; font-weight: bold;">融资开立资金表(年)</span>
  291. </div>
  292. <div class="text item" style="height:300px">
  293. <echart-bar :series-data="monthDataList" :extra-option="monthExtraOption"/>
  294. </div>
  295. </el-card>
  296. <el-card class="box-card" style="width:46%;margin:0.6%;float:left;">
  297. <div slot="header" class="clearfix">
  298. <span style="color: #666ee8; font-weight: bold;">融资开立资金表(7天内)</span>
  299. </div>
  300. <div class="text item" style="height:300px">
  301. <echart-bar :series-data="yearDataList" :extra-option="yearExtraOption"/>
  302. </div>
  303. </el-card>
  304. </div>
  305. <!-- 融资企业 -->
  306. <div v-if="company.scyType == '02'">
  307. <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
  308. <div slot="header" class="clearfix">
  309. <span style="color: #666ee8; font-weight: bold;">持有融信额度</span>
  310. </div>
  311. <div class="text item" style="height:100px">
  312. <span style="color: #666ee8; font-weight: bold;">{{handleInput(effectBalance)}}</span>
  313. </div>
  314. </el-card>
  315. <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
  316. <div slot="header" class="clearfix">
  317. <span style="color: #666ee8; font-weight: bold;">融资中额度</span>
  318. </div>
  319. <div class="text item" style="height:100px">
  320. <span style="color: #666ee8; font-weight: bold;">{{handleInput(availableBalance)}}</span>
  321. </div>
  322. </el-card>
  323. <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
  324. <div slot="header" class="clearfix">
  325. <span style="color: #666ee8; font-weight: bold;">已融资额度</span>
  326. </div>
  327. <div class="text item" style="height:100px">
  328. <span style="color: #666ee8; font-weight: bold;">{{handleInput(getFinancedNum())}}</span>
  329. </div>
  330. </el-card>
  331. <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
  332. <div slot="header" class="clearfix">
  333. <span style="color: #666ee8; font-weight: bold;">即将到期融资额度(30天)</span>
  334. </div>
  335. <div class="text item" style="height:100px">
  336. <span style="color: #666ee8; font-weight: bold;">{{handleInput(expiredBalance)}}</span>
  337. </div>
  338. </el-card>
  339. <el-card class="box-card" style="width:93%;margin:0.6%;float:left;">
  340. <!-- <div slot="header" class="clearfix">
  341. </div> -->
  342. <div class="text item" style="height:auto">
  343. <el-tabs v-model="activeName">
  344. <el-tab-pane label="我的待办" name="first" style="height:400px">
  345. <el-table :data="workList" :show-header="false">
  346. <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
  347. <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true">
  348. <template slot-scope="scope">
  349. <span>{{ parseTime(new Date(scope.row.createTime)) }}</span>
  350. </template>
  351. </el-table-column>
  352. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
  353. <template slot-scope="scope">
  354. <el-button
  355. size="mini"
  356. type="text"
  357. icon="el-icon-info"
  358. @click="handleDetail(scope.row)"
  359. >去办理</el-button>
  360. </template>
  361. </el-table-column>
  362. </el-table>
  363. <pagination
  364. v-show="workTotal>0"
  365. :total="workTotal"
  366. :page.sync="queryParamsWork.pageNum"
  367. :limit.sync="queryParamsWork.pageSize"
  368. :pager-count="5"
  369. :page-sizes="[5]"
  370. @pagination="getWorkList"
  371. />
  372. </el-tab-pane>
  373. <el-tab-pane label="消息" name="second" style="height:400px">
  374. <el-table :data="noticeList" :show-header="false">
  375. <el-table-column label="标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true"/>
  376. <el-table-column label="时间" align="center" prop="createTime" :show-overflow-tooltip="true">
  377. <template slot-scope="scope">
  378. <span>{{ parseTime(new Date(scope.row.createTime)) }}</span>
  379. </template>
  380. </el-table-column>
  381. </el-table>
  382. <pagination
  383. v-show="noticeTotal>0"
  384. :total="noticeTotal"
  385. :page.sync="queryParamsNotice.pageNum"
  386. :limit.sync="queryParamsNotice.pageSize"
  387. :pager-count="5"
  388. :page-sizes="[5]"
  389. @pagination="getNoticeList"
  390. />
  391. </el-tab-pane>
  392. </el-tabs>
  393. </div>
  394. </el-card>
  395. </div>
  396. <!-- 资方 -->
  397. <div v-if="company.scyType == '03'">
  398. <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
  399. <div slot="header" class="clearfix">
  400. <span style="color: #666ee8; font-weight: bold;">持有融信额度</span>
  401. </div>
  402. <div class="text item" style="height:100px">
  403. <span style="color: #666ee8; font-weight: bold;">{{handleInput(effectBalance)}}</span>
  404. </div>
  405. </el-card>
  406. <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
  407. <div slot="header" class="clearfix">
  408. <span style="color: #666ee8; font-weight: bold;">融资中额度</span>
  409. </div>
  410. <div class="text item" style="height:100px">
  411. <span style="color: #666ee8; font-weight: bold;">{{handleInput(availableBalance)}}</span>
  412. </div>
  413. </el-card>
  414. <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
  415. <div slot="header" class="clearfix">
  416. <span style="color: #666ee8; font-weight: bold;">已融资额度</span>
  417. </div>
  418. <div class="text item" style="height:100px">
  419. <span style="color: #666ee8; font-weight: bold;">{{handleInput(getFinancedNum())}}</span>
  420. </div>
  421. </el-card>
  422. <el-card class="box-card" style="width:22.4%;margin:0.6%;float:left;">
  423. <div slot="header" class="clearfix">
  424. <span style="color: #666ee8; font-weight: bold;">即将到期融资额度(30天)</span>
  425. </div>
  426. <div class="text item" style="height:100px">
  427. <span style="color: #666ee8; font-weight: bold;">{{handleInput(expiredBalance)}}</span>
  428. </div>
  429. </el-card>
  430. </div>
  431. <el-dialog title="待办处理" :visible.sync="openWork" width="500px" append-to-body>
  432. <work-deal :tableId="tableId" :workType="workType" :noticeId="noticeId" @cancelOpen="cancel"></work-deal>
  433. </el-dialog>
  434. </div>
  435. </template>
  436. <script>
  437. import * as echarts from 'echarts';
  438. import { getCreditLineAll, getAvailableBalance, getEffectBalance, getLoanBalance, getFinanceAmount, getFinanceAmountAll, getExpiredBalance, getCoreCreditLine, getCreditLineList, getCreditLineNumList, financeRecordMonth } from '@/api/service/report/credit'
  439. import { getCompanyNum, getFinanceSupplier, getFinanceNum, getCompanyReport } from '@/api/service/report/company'
  440. import { getOwnCompany } from "@/api/common/company";
  441. import { accAdd, accSub } from "@/utils/calculation";
  442. import { listNotice } from '@/api/system/notice'
  443. import { amtformat } from "@/utils/amtCommon"
  444. import EchartPie from '@/components/Echart/pie/index'
  445. import EchartBar from '@/components/Echart/bar/index'
  446. import { EventBus } from '@/util/event-bus.js'
  447. import WorkDeal from "@/views/workDeal";
  448. export default {
  449. components: {
  450. EchartPie,
  451. EchartBar,
  452. WorkDeal
  453. },
  454. data() {
  455. return {
  456. widthSize:'500px',
  457. heightSize:'280px',
  458. companyNum: 0,
  459. supplierNum: 0,
  460. coreNum: 0,
  461. financeSupplierNum: 0,
  462. availableBalance: 0,
  463. availableBalanceForward: 0,
  464. loanBalance: 0,
  465. loanBalanceForward: 0,
  466. effectBalance: 0,
  467. effectBalanceForward: 0,
  468. financeNum: 0,
  469. expiredBalance: 0,
  470. financeAmountList: [],
  471. companyDataList:[],
  472. dateType: "00",
  473. financeDateType: "00",
  474. dateTypeList: [
  475. {label:"周",value:"00"},
  476. {label:"年",value:"01"}
  477. ],
  478. companyExtraOption:{
  479. xAxis: [
  480. {
  481. data: [],
  482. }
  483. ],
  484. legend: {
  485. },
  486. },
  487. coreFinanceAmountList: [],
  488. coreFinanceAmountExtraOption:{
  489. yAxis: [
  490. {
  491. type:"category",
  492. data: [],
  493. }
  494. ],
  495. xAxis: [
  496. {
  497. type: "value",
  498. }
  499. ],
  500. legend: {
  501. },
  502. },
  503. dataList:[],
  504. yearDataList:[],
  505. monthDataList:[],
  506. extraOption:{
  507. legend: {
  508. type: 'scroll',
  509. orient: 'vertical',
  510. left: "left",
  511. right: 10,
  512. top: 20,
  513. bottom: 20,
  514. },
  515. },
  516. yearExtraOption:{
  517. xAxis: [
  518. {
  519. data: [],
  520. }
  521. ],
  522. legend: {
  523. },
  524. },
  525. monthExtraOption:{
  526. xAxis: [
  527. {
  528. data: [],
  529. }
  530. ],
  531. legend: {
  532. },
  533. },
  534. creditLineAll: 0,
  535. creditLineAllForward: 0,
  536. creditLineList:[],
  537. creditLineTotal:0,
  538. queryParams:{
  539. pageNum:1,
  540. pageSize:5
  541. },
  542. creditLineNumList:[],
  543. creditLineNumTotal:0,
  544. queryParamsNum:{
  545. pageNum:1,
  546. pageSize:5
  547. },
  548. workList:[],
  549. workTotal: 0,
  550. queryParamsWork:{
  551. pageNum:1,
  552. pageSize:5,
  553. type:'00'
  554. },
  555. noticeList:[],
  556. noticeTotal: 0,
  557. queryParamsNotice:{
  558. pageNum:1,
  559. pageSize:5,
  560. type:'01'
  561. },
  562. activeName:'first',
  563. company:{},
  564. openWork:false,
  565. workUrl:null,
  566. workType:null,
  567. tableId:null,
  568. noticeId:null
  569. }
  570. },
  571. created: function () {
  572. var children = [];
  573. this.$store.state.permission.routes.map((item) => {
  574. if (this.$route.matched[0] && item.alwaysShow && this.$route.matched[0].path == item.path) {
  575. children = item.children
  576. }
  577. });
  578. if(children && children.length != 0){
  579. EventBus.$emit('on-click-higher', {children: children, basepath: this.$route.matched[0].path})
  580. }
  581. this.selectHome()
  582. },
  583. activated () {
  584. this.selectHome()
  585.    }, 
  586. mounted() {
  587. },
  588. methods: {
  589. initChartPie () {
  590. console.log(this.financeAmountList, 9999)
  591. let chartPie = document.getElementById('echartPie');
  592. let myChart = echarts.init(chartPie);
  593. let option = {
  594. tooltip: {
  595. trigger: 'item'
  596. },
  597. color: ["#f9b51d", "#30d894", "#ff6d8a", "#4280f2"],
  598. label: {
  599. alignTo: 'edge',
  600. formatter: '{name|{b}}\n{unit|{c} 万}',
  601. minMargin: 5,
  602. edgeDistance: 10,
  603. rich: {
  604. name: {
  605. lineHeight: 14,
  606. fontSize: 14,
  607. color: '#333'
  608. },
  609. unit: {
  610. lineHeight: 46,
  611. fontSize: 22,
  612. }
  613. }
  614. },
  615. series: [
  616. {
  617. name: '访问来源',
  618. type: 'pie',
  619. radius: '50%',
  620. data: [
  621. {value: 1048, name: '搜索引擎'},
  622. {value: 735, name: '直接访问'},
  623. {value: 580, name: '邮件营销'},
  624. {value: 484, name: '联盟广告'},
  625. {value: 300, name: '视频广告'}
  626. ], // this.financeAmountList
  627. emphasis: {
  628. itemStyle: {
  629. shadowBlur: 10,
  630. shadowOffsetX: 0,
  631. shadowColor: 'rgba(0, 0, 0, 0.5)'
  632. }
  633. }
  634. }
  635. ]
  636. };
  637. myChart.setOption(option);
  638. },
  639. //查询各角色首页模块
  640. selectHome(){
  641. //查询企业类型
  642. getOwnCompany().then((response) => {
  643. this.company = response.data;
  644. }).then((response) => {
  645. //平台
  646. if(this.company.scyType == '00'){
  647. //入驻企业数量
  648. this.getCompanyNum()
  649. //入驻供应商数量
  650. this.getSupplierNum()
  651. //入驻核心企业数量
  652. this.getCoreNum()
  653. //融资开立月度统计 -- 柱状图
  654. this.getFinanceRecordMonth()
  655. //已融资供应商数量
  656. this.getFinanceSupplier()
  657. //融资中金额
  658. this.getAvailableBalance()
  659. //已放款金额
  660. this.getLoanBalance()
  661. //已生效金额
  662. this.getEffectBalance()
  663. //融资业务数量
  664. this.getFinanceNum()
  665. //授信总额度
  666. this.getCreditLineAll()
  667. //平台资金 -- 饼图
  668. this.getFinanceAmount()
  669. //平台用户统计 -- 柱状图
  670. this.getCompanyReport()
  671. //核心企业额度比例 -- 柱状图
  672. this.getFinanceAmountAll()
  673. //核心企业
  674. }else if(this.company.scyType == '01'){
  675. //授信总额度
  676. this.getCreditLineAll()
  677. //授信总额度 -- 正向保理
  678. this.getCreditLineAllForward()
  679. //融资中金额
  680. this.getAvailableBalance()
  681. //融资中金额 -- 正向保理
  682. this.getAvailableBalanceForward()
  683. //已放款金额
  684. this.getLoanBalance()
  685. //已放款金额 -- 正向保理
  686. this.getLoanBalanceForward()
  687. //已生效金额
  688. this.getEffectBalance()
  689. //已生效金额 -- 正向保理
  690. this.getEffectBalanceForward()
  691. //融信授权额度 -- 饼图
  692. this.getCreditLine()
  693. //融信授权额度 -- 列表
  694. this.getList()
  695. //融信统计 -- 列表
  696. this.getNumList()
  697. //融资开立月度统计 -- 柱状图
  698. this.getFinanceRecordMonth()
  699. //融资开立年度统计 -- 柱状图
  700. this.getFinanceRecord()
  701. //即将到期额度(30天)
  702. this.getExpiredBalance()
  703. //查询代办
  704. this.getWorkList()
  705. //查询消息
  706. this.getNoticeList()
  707. //融资企业
  708. }else if(this.company.scyType == '02'){
  709. //授信总额度
  710. this.getCreditLineAll()
  711. //融资中金额
  712. this.getAvailableBalance()
  713. //已放款金额
  714. this.getLoanBalance()
  715. //已生效金额
  716. this.getEffectBalance()
  717. //即将到期额度(30天)
  718. this.getExpiredBalance()
  719. //查询代办
  720. this.getWorkList()
  721. //查询消息
  722. this.getNoticeList()
  723. //资方
  724. }else if(this.company.scyType == '03'){
  725. //授信总额度
  726. this.getCreditLineAll()
  727. //融资中金额
  728. this.getAvailableBalance()
  729. //已放款金额
  730. this.getLoanBalance()
  731. //已生效金额
  732. this.getEffectBalance()
  733. //即将到期额度(30天)
  734. this.getExpiredBalance()
  735. }
  736. });
  737. },
  738. //入驻企业数量
  739. getCompanyNum(){
  740. getCompanyNum().then((response) => {
  741. this.companyNum = response.data.num
  742. });
  743. },
  744. //入驻供应商数量
  745. getSupplierNum(){
  746. let queryParams = {}
  747. queryParams.type = "02"
  748. getCompanyNum(queryParams).then((response) => {
  749. this.supplierNum = response.data.num
  750. });
  751. },
  752. //入驻核心企业数量
  753. getCoreNum(){
  754. let queryParams = {}
  755. queryParams.type = "01"
  756. getCompanyNum(queryParams).then((response) => {
  757. this.coreNum = response.data.num
  758. });
  759. },
  760. //已融资供应商数量
  761. getFinanceSupplier(){
  762. getFinanceSupplier().then((response) => {
  763. this.financeSupplierNum = response.data.num
  764. });
  765. },
  766. //融资中金额
  767. getAvailableBalance(){
  768. getAvailableBalance().then(response => {
  769. console.log(response)
  770. this.availableBalance = response.data.allAmount
  771. })
  772. },
  773. //融资中金额 -- 正向保理
  774. getAvailableBalanceForward(){
  775. let queryParams = {}
  776. queryParams.zfpType = "0"
  777. getAvailableBalance(queryParams).then(res => {
  778. this.availableBalanceForward = res.data.allAmount
  779. })
  780. },
  781. //已生效金额
  782. getEffectBalance(){
  783. getEffectBalance().then(response => {
  784. console.log(response)
  785. this.effectBalance = response.data.allAmount
  786. })
  787. },
  788. //已生效金额 -- 正向保理
  789. getEffectBalanceForward(){
  790. let queryParams = {}
  791. queryParams.zfpType = "0"
  792. getEffectBalance(queryParams).then(res => {
  793. this.effectBalanceForward = res.data.allAmount
  794. })
  795. },
  796. //已放款金额
  797. getLoanBalance(){
  798. getLoanBalance().then(response => {
  799. console.log(response)
  800. this.loanBalance = response.data.allAmount
  801. })
  802. },
  803. //已放款金额 -- 正向保理
  804. getLoanBalanceForward(){
  805. let queryParams = {}
  806. queryParams.zfpType = "0"
  807. getLoanBalance(queryParams).then(res => {
  808. this.loanBalanceForward = res.data.allAmount
  809. })
  810. },
  811. //融资业务数量
  812. getFinanceNum(){
  813. getFinanceNum().then(response => {
  814. console.log(response)
  815. this.financeNum = response.data.num
  816. })
  817. },
  818. //授信总额度
  819. getCreditLineAll(){
  820. getCreditLineAll().then(res => {
  821. this.creditLineAll = res.data.allAmount
  822. })
  823. },
  824. //授信总额度 -- 正向保理
  825. getCreditLineAllForward(){
  826. let queryParams = {}
  827. queryParams.zfpType = "0"
  828. getCreditLineAll(queryParams).then(res => {
  829. this.creditLineAllForward = res.data.allAmount
  830. })
  831. },
  832. //已融资金额
  833. getFinancedNum(){
  834. return accAdd(accAdd(this.effectBalance, this.availableBalance, 2), this.loanBalance, 2)
  835. },
  836. //已融资金额 -- 正向保理
  837. getFinancedNumForward(){
  838. return accAdd(accAdd(this.effectBalanceForward, this.availableBalanceForward, 2), this.loanBalanceForward, 2)
  839. },
  840. //剩余授信额度
  841. getsubNum(){
  842. return accSub(this.creditLineAll, this.getFinancedNum(), 2)
  843. },
  844. //剩余授信额度 -- 正向保理
  845. getsubNumForward(){
  846. return accSub(this.creditLineAllForward, this.getFinancedNumForward(), 2)
  847. },
  848. //平台资金 -- 饼图
  849. getFinanceAmount(){
  850. getFinanceAmount().then(response => {
  851. this.financeAmountList = response.data;
  852. this.initChartPie()
  853. })
  854. },
  855. //平台用户统计 -- 柱状图
  856. getCompanyReport(){
  857. let queryParams = {}
  858. queryParams.dateType = this.dateType
  859. console.log(queryParams,"queryParams")
  860. getCompanyReport(queryParams).then((response) => {
  861. this.companyDataList = response.data.dataList
  862. this.companyExtraOption.xAxis[0].data = response.data.dateList
  863. });
  864. },
  865. //核心企业额度比例 -- 柱状图
  866. getFinanceAmountAll(){
  867. let queryParams = {}
  868. queryParams.pageNum = 1
  869. queryParams.pageSize = 5
  870. getFinanceAmountAll(queryParams).then((response) => {
  871. this.coreFinanceAmountList = response.data.dataList
  872. this.coreFinanceAmountExtraOption.yAxis[0].data = response.data.dateList
  873. });
  874. },
  875. //融资开立月度统计 -- 柱状图
  876. getFinanceRecordMonth(){
  877. let queryParams = {}
  878. queryParams.dateType = this.financeDateType
  879. financeRecordMonth(queryParams).then((response) => {
  880. this.yearDataList = response.data.dataList
  881. this.yearExtraOption.xAxis[0].data = response.data.dateList
  882. });
  883. },
  884. //查询代办
  885. getWorkList(){
  886. listNotice(this.queryParamsWork).then((response) => {
  887. this.workList = response.rows
  888. });
  889. },
  890. //查询消息
  891. getNoticeList(){
  892. listNotice(this.queryParamsNotice).then((response) => {
  893. this.noticeList = response.rows
  894. });
  895. },
  896. //即将到期额度(30天)
  897. getExpiredBalance(){
  898. getExpiredBalance().then(response => {
  899. console.log(response)
  900. this.expiredBalance = response.data.allAmount
  901. })
  902. },
  903. //融资开立年度统计 -- 柱状图
  904. getFinanceRecord(){
  905. let queryParams = {}
  906. queryParams.dateType = "01"
  907. financeRecordMonth(queryParams).then((response) => {
  908. this.monthDataList = response.data.dataList
  909. this.monthExtraOption.xAxis[0].data = response.data.dateList
  910. });
  911. },
  912. //融信授权额度 -- 饼图
  913. getCreditLine(){
  914. getCoreCreditLine().then(response => {
  915. this.dataList = response.data;
  916. })
  917. },
  918. //融信授权额度 -- 列表
  919. getList(){
  920. getCreditLineList(this.queryParams).then(response => {
  921. this.creditLineList = response.data.records;
  922. this.creditLineTotal = response.data.total
  923. })
  924. },
  925. //融信统计 -- 列表
  926. getNumList(){
  927. getCreditLineNumList(this.queryParamsNum).then(response => {
  928. this.creditLineNumList = response.data.records;
  929. this.creditLineNumTotal = response.data.total
  930. })
  931. },
  932. /* 金额展示 */
  933. handleInput(str) {
  934. return amtformat(str,2, ".", ",");
  935. },
  936. /** 详情按钮操作 */
  937. handleDetail(row) {
  938. console.log(row)
  939. if(row.openType == '00'){
  940. this.openWork = true
  941. this.noticeId = row.noticeId
  942. this.workType = row.workType
  943. this.tableId = row.tableId
  944. }else if(row.openType == '01'){
  945. this.$router.push({ path: row.openUrl });
  946. }
  947. },
  948. // 取消按钮
  949. cancel() {
  950. this.openWork = false;
  951. },
  952. },
  953. };
  954. </script>
  955. <style>
  956. .labelData .el-collapse-item__header{
  957. height: 200px;
  958. }
  959. .app-main{
  960. padding: 0 25px 30px 20px;
  961. background-color: #f4f5f6;
  962. }
  963. </style>
  964. <style lang="scss" scroped>
  965. .zap-card{
  966. padding: 40px 28px 42px;
  967. height: 160px;
  968. background-color: #ffffff;
  969. box-sizing: border-box;
  970. }
  971. .zap-card__title{
  972. font-size: 18px;
  973. font-weight: normal;
  974. color: #666666;
  975. }
  976. .zap-card__wrap{
  977. margin-top: 30px;
  978. font-size: 0;
  979. }
  980. .zap-card__slash,
  981. .zap-card__num{
  982. display: inline-block;
  983. line-height: 1;
  984. font-size: 40px;
  985. }
  986. .zap-card__slash{
  987. padding: 0 8px;
  988. }
  989. .zap-card__unit{
  990. display: inline-block;
  991. line-height: 1;
  992. font-size: 20px;
  993. }
  994. .zap-card__blue{
  995. color: #4280f2;
  996. }
  997. .zap-card__gold{
  998. color: #e6a71b;
  999. }
  1000. .zap-card__pink{
  1001. color: #fb738a;
  1002. }
  1003. .zap-home__main{
  1004. .el-col{
  1005. margin-bottom: 20px;
  1006. }
  1007. }
  1008. .zap-home__title{
  1009. padding-top: 30px;
  1010. padding-bottom: 30px;
  1011. font-size: 18px;
  1012. color: #333333;
  1013. }
  1014. .zap-home-chart{
  1015. background-color: #ffffff;
  1016. }
  1017. .zap-home-chart__title{
  1018. padding: 30px;
  1019. font-size: 18px;
  1020. color: #333333;
  1021. }
  1022. </style>