repayment.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350
  1. <template>
  2. <div class="app-container zap-main">
  3. <el-row v-if="activeIndex === '0'" class="zap-table-search">
  4. <div class="zap-padding-end">
  5. <right-toolbar
  6. class="zap-right-toolbar"
  7. :showSearch.sync="showSearch"
  8. @queryTable="getList"
  9. >收起</right-toolbar>
  10. <span class="zap-padding-start zap-font-title">所选条件:</span>
  11. <div style="float: right;margin-right:1%">
  12. <el-button type="cyan" icon="el-icon-search" @click="handleQuery">搜索</el-button>
  13. <el-button icon="el-icon-refresh" @click="resetQuery" style="margin-right: 20px;">重置</el-button>
  14. <column-setting
  15. class="zap-column-setting"
  16. :checkList="checkList"
  17. :tableList="tableList"
  18. :selfDom="selfDom"
  19. :tableId="tableId"
  20. ></column-setting>
  21. </div>
  22. <hr style="margin-top: 16px;" />
  23. <el-form
  24. :model="queryParams"
  25. ref="queryForm"
  26. :inline="true"
  27. v-show="showSearch"
  28. label-width="auto"
  29. >
  30. <el-form-item prop="type" size="large">
  31. <el-select v-model="queryParams.type" placeholder="请选择查询字段" clearable>
  32. <el-option
  33. v-for="dict in typeOptions"
  34. :key="dict.dictValue"
  35. :label="dict.dictLabel"
  36. :value="dict.dictValue"
  37. />
  38. </el-select>
  39. </el-form-item>
  40. <el-form-item prop="value" size="large">
  41. <el-input
  42. v-model="queryParams.value"
  43. placeholder="请输入关键字模糊查询"
  44. clearable
  45. maxlength="30"
  46. @keyup.enter.native="handleQuery"
  47. />
  48. </el-form-item>
  49. <el-form-item label="承诺还款日期" prop="repaymentDate" size="large">
  50. <el-date-picker
  51. clearable
  52. unlink-panels
  53. v-model="queryParams.repaymentDate"
  54. value-format="yyyy-MM-dd"
  55. format="yyyy-MM-dd"
  56. type="daterange"
  57. range-separator="-"
  58. start-placeholder="开始日期"
  59. end-placeholder="结束日期"
  60. ></el-date-picker>
  61. </el-form-item>
  62. </el-form>
  63. </div>
  64. </el-row>
  65. <el-row v-if="activeIndex === '1'" class="zap-table-search">
  66. <div class="zap-padding-end">
  67. <right-toolbar
  68. class="zap-right-toolbar"
  69. :showSearch.sync="showSearch"
  70. @queryTable="getUnpayList"
  71. >收起</right-toolbar>
  72. <span class="zap-padding-start zap-font-title">所选条件:</span>
  73. <div style="float: right;margin-right:1%">
  74. <el-button type="cyan" icon="el-icon-search" @click="secondQuery">搜索</el-button>
  75. <el-button icon="el-icon-refresh" @click="resetSecondQuery" style="margin-right: 20px;">重置</el-button>
  76. <column-setting
  77. class="zap-column-setting"
  78. :checkList="checkList"
  79. :tableList="tableList"
  80. :selfDom="selfDom"
  81. :tableId="tableId"
  82. ></column-setting>
  83. </div>
  84. <hr style="margin-top: 16px;" />
  85. <el-form
  86. :model="unRepayment"
  87. ref="queryForm1"
  88. :inline="true"
  89. v-show="showSearch"
  90. label-width="auto"
  91. >
  92. <el-form-item prop="type" size="large">
  93. <el-select v-model="unRepayment.type" placeholder="请选择查询字段" clearable>
  94. <el-option
  95. v-for="dict in typeOptions"
  96. :key="dict.dictValue"
  97. :label="dict.dictLabel"
  98. :value="dict.dictValue"
  99. />
  100. </el-select>
  101. </el-form-item>
  102. <el-form-item prop="value" size="large">
  103. <el-input
  104. v-model="unRepayment.value"
  105. placeholder="请输入关键字模糊查询"
  106. clearable
  107. maxlength="30"
  108. @keyup.enter.native="secondQuery"
  109. />
  110. </el-form-item>
  111. <el-form-item label="承诺还款日期" prop="repaymentDate" size="large">
  112. <el-date-picker
  113. clearable
  114. unlink-panels
  115. v-model="unRepayment.repaymentDate"
  116. value-format="yyyy-MM-dd"
  117. format="yyyy-MM-dd"
  118. type="daterange"
  119. range-separator="-"
  120. start-placeholder="开始日期"
  121. end-placeholder="结束日期"
  122. ></el-date-picker>
  123. </el-form-item>
  124. </el-form>
  125. </div>
  126. </el-row>
  127. <el-row v-if="activeIndex === '2'" class="zap-table-search">
  128. <div class="zap-padding-end">
  129. <right-toolbar
  130. class="zap-right-toolbar"
  131. :showSearch.sync="showSearch"
  132. @queryTable="getRepayList"
  133. >收起</right-toolbar>
  134. <span class="zap-padding-start zap-font-title">所选条件:</span>
  135. <div style="float: right;margin-right:1%">
  136. <el-button type="cyan" icon="el-icon-search" @click="thirdQuery">搜索</el-button>
  137. <el-button icon="el-icon-refresh" @click="resetThirdQuery" style="margin-right: 20px;">重置</el-button>
  138. <column-setting
  139. class="zap-column-setting"
  140. :checkList="checkList"
  141. :tableList="tableList"
  142. :selfDom="selfDom"
  143. :tableId="tableId"
  144. ></column-setting>
  145. </div>
  146. <hr style="margin-top: 16px;" />
  147. <el-form
  148. :model="repayment"
  149. ref="queryForm2"
  150. :inline="true"
  151. v-show="showSearch"
  152. label-width="auto"
  153. >
  154. <el-form-item prop="type" size="large">
  155. <el-select v-model="repayment.type" placeholder="请选择查询字段" clearable prop="type">
  156. <el-option
  157. v-for="dict in typeOptions"
  158. :key="dict.dictValue"
  159. :label="dict.dictLabel"
  160. :value="dict.dictValue"
  161. />
  162. </el-select>
  163. </el-form-item>
  164. <el-form-item prop="value" size="large">
  165. <el-input
  166. v-model="repayment.value"
  167. prop="value"
  168. placeholder="请输入关键字模糊查询"
  169. clearable
  170. maxlength="30"
  171. @keyup.enter.native="thirdQuery"
  172. />
  173. </el-form-item>
  174. <el-form-item label="承诺还款日期" prop="repaymentDate" size="large">
  175. <el-date-picker
  176. clearable
  177. unlink-panels
  178. v-model="repayment.repaymentDate"
  179. value-format="yyyy-MM-dd"
  180. format="yyyy-MM-dd"
  181. type="daterange"
  182. range-separator="-"
  183. start-placeholder="开始日期"
  184. end-placeholder="结束日期"
  185. ></el-date-picker>
  186. </el-form-item>
  187. </el-form>
  188. </div>
  189. </el-row>
  190. <el-row v-if="activeIndex === '3'" class="zap-table-search">
  191. <div class="zap-padding-end">
  192. <right-toolbar
  193. class="zap-right-toolbar"
  194. :showSearch.sync="showSearch"
  195. @queryTable="getOverdueList"
  196. >收起</right-toolbar>
  197. <span class="zap-padding-start zap-font-title">所选条件:</span>
  198. <div style="float: right;margin-right:1%">
  199. <el-button type="cyan" icon="el-icon-search" @click="fouthQuery">搜索</el-button>
  200. <el-button icon="el-icon-refresh" @click="resetFouthQuery" style="margin-right: 20px;">重置</el-button>
  201. <column-setting
  202. class="zap-column-setting"
  203. :checkList="checkList"
  204. :tableList="tableList"
  205. :selfDom="selfDom"
  206. :tableId="tableId"
  207. ></column-setting>
  208. </div>
  209. <hr style="margin-top: 16px;" />
  210. <el-form
  211. :model="overdue"
  212. ref="queryForm3"
  213. :inline="true"
  214. v-show="showSearch"
  215. label-width="auto"
  216. >
  217. <el-form-item prop="type" size="large">
  218. <el-select v-model=" overdue.type" placeholder="请选择查询字段" clearable prop="type">
  219. <el-option
  220. v-for="dict in typeOptions"
  221. :key="dict.dictValue"
  222. :label="dict.dictLabel"
  223. :value="dict.dictValue"
  224. />
  225. </el-select>
  226. </el-form-item>
  227. <el-form-item prop="value" size="large">
  228. <el-input
  229. v-model=" overdue.value"
  230. prop="value"
  231. placeholder="请输入关键字模糊查询"
  232. clearable
  233. maxlength="30"
  234. @keyup.enter.native="fouthQuery"
  235. />
  236. </el-form-item>
  237. <el-form-item label="承诺还款日期" prop="repaymentDate" size="large">
  238. <el-date-picker
  239. clearable
  240. unlink-panels
  241. v-model=" overdue.repaymentDate"
  242. value-format="yyyy-MM-dd"
  243. format="yyyy-MM-dd"
  244. type="daterange"
  245. range-separator="-"
  246. start-placeholder="开始日期"
  247. end-placeholder="结束日期"
  248. ></el-date-picker>
  249. </el-form-item>
  250. </el-form>
  251. </div>
  252. </el-row>
  253. <el-tabs class="zap-bg zap-margin-top" v-model="activeIndex">
  254. <el-tab-pane label="全部">
  255. <div class="zap-form">
  256. <el-form
  257. :model="amountQueryParams"
  258. ref="amountQueryForm"
  259. :inline="true"
  260. v-show="showSearch"
  261. label-width="auto"
  262. >
  263. <div style="width:20%;height:135px;background:#f2f2f2;float:left;border-radius: 5%; ">
  264. <span>总待还款金额:</span>
  265. <span>{{sumAmount}}</span>
  266. </div>
  267. <div
  268. style="width:20%;height:135px;background:#f2f2f2;float:left;margin-left:10px;border-radius: 5%;"
  269. >
  270. <el-form-item prop="day">
  271. <el-select
  272. v-model="amountQueryParams.day"
  273. size="small"
  274. @change="change(amountQueryParams.day)"
  275. >
  276. <el-option
  277. v-for="dict in dayOptions"
  278. :key="dict.dictValue"
  279. :label="dict.dictLabel"
  280. :value="dict.dictValue"
  281. />
  282. </el-select>
  283. </el-form-item>
  284. <span>待还款金额:</span>
  285. <span>{{amount}}</span>
  286. </div>
  287. </el-form>
  288. <div>
  289. <el-button
  290. type="primary"
  291. icon="el-icon-export"
  292. @click="handleExport"
  293. v-hasPermi="['service:repayment:export']"
  294. >导出待还款数据</el-button>
  295. </div>
  296. <el-table
  297. v-loading="loading"
  298. :data="allRepaymentList"
  299. @selection-change="handleSelectionChange"
  300. stripe
  301. >
  302. <el-table-column label="序号" type="index" width="50" align="center">
  303. <template slot-scope="scope">
  304. <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
  305. </template>
  306. </el-table-column>
  307. <el-table-column
  308. label="融资编号"
  309. align="center"
  310. prop="zfrNumber"
  311. :show-overflow-tooltip="true"
  312. v-if="uncheckList.zfrNumber"
  313. />
  314. <el-table-column
  315. label="融信编号"
  316. align="center"
  317. prop="zfiNumber"
  318. :show-overflow-tooltip="true"
  319. v-if="uncheckList.zfiNumber"
  320. />
  321. <el-table-column
  322. label="最终还款方"
  323. align="center"
  324. prop="core"
  325. :show-overflow-tooltip="true"
  326. v-if="uncheckList.core"
  327. />
  328. <el-table-column
  329. label="融资方"
  330. align="center"
  331. prop="supplier"
  332. :show-overflow-tooltip="true"
  333. v-if="uncheckList.supplier"
  334. />
  335. <el-table-column
  336. label="资金方"
  337. align="center"
  338. prop="scyName"
  339. :show-overflow-tooltip="true"
  340. v-if="uncheckList.scyName"
  341. />
  342. <el-table-column
  343. label="还款金额(元)"
  344. align="center"
  345. prop="zfrLoanAmount"
  346. :show-overflow-tooltip="true"
  347. v-if="uncheckList.zfrLoanAmount"
  348. />
  349. <el-table-column
  350. label="还款银行账户"
  351. align="center"
  352. prop="zfpcrAccount"
  353. :show-overflow-tooltip="true"
  354. v-if="uncheckList.zfpcrAccount"
  355. />
  356. <el-table-column
  357. label="实际还款日期"
  358. align="center"
  359. prop="zfrPayDate"
  360. :show-overflow-tooltip="true"
  361. v-if="uncheckList.zfrPayDate"
  362. />
  363. <el-table-column
  364. label="承诺付款日期"
  365. align="center"
  366. prop="zfrRepaymentDate"
  367. :show-overflow-tooltip="true"
  368. v-if="uncheckList.zfrRepaymentDate"
  369. />
  370. <el-table-column
  371. label="还款状态"
  372. align="center"
  373. prop="zfrApplyStatus"
  374. :formatter="applyStatusFormat"
  375. :show-overflow-tooltip="true"
  376. v-if="uncheckList.zfrApplyStatus"
  377. />
  378. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  379. <template slot-scope="scope">
  380. <el-button
  381. size="mini"
  382. type="text"
  383. icon="el-icon-view"
  384. @click="handleInfo(scope.row)"
  385. v-hasPermi="['service:repayment:query']"
  386. >详情</el-button>
  387. <el-button
  388. size="mini"
  389. type="text"
  390. icon="el-icon-delete"
  391. @click="handleDown(scope.row)"
  392. v-hasPermi="['service:repayment:down']"
  393. >下载</el-button>
  394. <el-button
  395. size="mini"
  396. type="text"
  397. icon="el-icon-delete"
  398. @click="handleUp(scope.row)"
  399. v-hasPermi="['service:repayment:edit']"
  400. v-if="scope.row.zfrApplyStatus != '01'"
  401. >还款登记</el-button>
  402. </template>
  403. </el-table-column>
  404. </el-table>
  405. <pagination
  406. v-show="total>0"
  407. :total="total"
  408. :page.sync="queryParams.pageNum"
  409. :limit.sync="queryParams.pageSize"
  410. @pagination="getList"
  411. />
  412. </div>
  413. </el-tab-pane>
  414. <el-tab-pane label="待还款">
  415. <div class="zap-content">
  416. <el-button
  417. type="primary"
  418. icon="el-icon-export"
  419. @click="handleExport"
  420. v-hasPermi="['service:repayment:export']"
  421. >导出待还款数据</el-button>
  422. </div>
  423. <el-table
  424. v-loading="loading"
  425. :data="unRepaymentList"
  426. @selection-change="handleSelectionChange"
  427. border
  428. >
  429. <el-table-column label="序号" type="index" width="50" align="center">
  430. <template slot-scope="scope">
  431. <span>{{(unRepayment.pageNum - 1) * unRepayment.pageSize + scope.$index + 1}}</span>
  432. </template>
  433. </el-table-column>
  434. <el-table-column
  435. label="融资编号"
  436. align="center"
  437. prop="zfrNumber"
  438. :show-overflow-tooltip="true"
  439. v-if="uncheckList.zfrNumber"
  440. />
  441. <el-table-column
  442. label="融信编号"
  443. align="center"
  444. prop="zfiNumber"
  445. :show-overflow-tooltip="true"
  446. v-if="uncheckList.zfiNumber"
  447. />
  448. <el-table-column
  449. label="最终还款方"
  450. align="center"
  451. prop="core"
  452. :show-overflow-tooltip="true"
  453. v-if="uncheckList.core"
  454. />
  455. <el-table-column
  456. label="融资方"
  457. align="center"
  458. prop="supplier"
  459. :show-overflow-tooltip="true"
  460. v-if="uncheckList.supplier"
  461. />
  462. <el-table-column
  463. label="资金方"
  464. align="center"
  465. prop="scyName"
  466. :show-overflow-tooltip="true"
  467. v-if="uncheckList.scyName"
  468. />
  469. <el-table-column
  470. label="还款金额(元)"
  471. align="center"
  472. prop="zfrLoanAmount"
  473. :show-overflow-tooltip="true"
  474. v-if="uncheckList.zfrLoanAmount"
  475. />
  476. <el-table-column
  477. label="还款银行账户"
  478. align="center"
  479. prop="zfpcrAccount"
  480. :show-overflow-tooltip="true"
  481. v-if="uncheckList.zfpcrAccount"
  482. />
  483. <el-table-column
  484. label="实际还款日期"
  485. align="center"
  486. prop="zfrPayDate"
  487. :show-overflow-tooltip="true"
  488. v-if="uncheckList.zfrPayDate"
  489. />
  490. <el-table-column
  491. label="承诺付款日期"
  492. align="center"
  493. prop="zfrRepaymentDate"
  494. :show-overflow-tooltip="true"
  495. v-if="uncheckList.zfrRepaymentDate"
  496. />
  497. <el-table-column
  498. label="还款状态"
  499. align="center"
  500. prop="zfrApplyStatus"
  501. :formatter="applyStatusFormat"
  502. :show-overflow-tooltip="true"
  503. v-if="uncheckList.zfrApplyStatus"
  504. />
  505. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  506. <template slot-scope="scope">
  507. <el-button
  508. size="mini"
  509. type="text"
  510. icon="el-icon-view"
  511. @click="handleInfo(scope.row)"
  512. v-hasPermi="['service:repayment:query']"
  513. >详情</el-button>
  514. <el-button
  515. size="mini"
  516. type="text"
  517. icon="el-icon-delete"
  518. @click="handleDown(scope.row)"
  519. v-hasPermi="['service:repayment:down']"
  520. >下载</el-button>
  521. <el-button
  522. size="mini"
  523. type="text"
  524. icon="el-icon-delete"
  525. @click="handleUp(scope.row)"
  526. v-hasPermi="['service:repayment:up']"
  527. v-if="scope.row.zfrApplyStatus != '01'"
  528. >还款登记</el-button>
  529. </template>
  530. </el-table-column>
  531. </el-table>
  532. <pagination
  533. v-show="total>0"
  534. :total="total1"
  535. :page.sync="unRepayment.pageNum"
  536. :limit.sync="unRepayment.pageSize"
  537. @pagination="getList"
  538. />
  539. </el-tab-pane>
  540. <el-tab-pane label="已还款">
  541. <div class="zap-content">
  542. <el-button
  543. type="primary"
  544. icon="el-icon-export"
  545. @click="handleExport"
  546. v-hasPermi="['service:repayment:export']"
  547. >导出待还款数据</el-button>
  548. </div>
  549. <el-table
  550. v-loading="loading"
  551. :data="repaymentList"
  552. @selection-change="handleSelectionChange"
  553. border
  554. >
  555. <el-table-column label="序号" type="index" width="50" align="center">
  556. <template slot-scope="scope">
  557. <span>{{(repayment.pageNum - 1) * repayment.pageSize + scope.$index + 1}}</span>
  558. </template>
  559. </el-table-column>
  560. <el-table-column
  561. label="融资编号"
  562. align="center"
  563. prop="zfrNumber"
  564. :show-overflow-tooltip="true"
  565. v-if="uncheckList.zfrNumber"
  566. />
  567. <el-table-column
  568. label="融信编号"
  569. align="center"
  570. prop="zfiNumber"
  571. :show-overflow-tooltip="true"
  572. v-if="uncheckList.zfiNumber"
  573. />
  574. <el-table-column
  575. label="最终还款方"
  576. align="center"
  577. prop="core"
  578. :show-overflow-tooltip="true"
  579. v-if="uncheckList.core"
  580. />
  581. <el-table-column
  582. label="融资方"
  583. align="center"
  584. prop="supplier"
  585. :show-overflow-tooltip="true"
  586. v-if="uncheckList.supplier"
  587. />
  588. <el-table-column
  589. label="资金方"
  590. align="center"
  591. prop="scyName"
  592. :show-overflow-tooltip="true"
  593. v-if="uncheckList.scyName"
  594. />
  595. <el-table-column
  596. label="还款金额(元)"
  597. align="center"
  598. prop="zfrLoanAmount"
  599. :show-overflow-tooltip="true"
  600. v-if="uncheckList.zfrLoanAmount"
  601. />
  602. <el-table-column
  603. label="还款银行账户"
  604. align="center"
  605. prop="zfpcrAccount"
  606. :show-overflow-tooltip="true"
  607. v-if="uncheckList.zfpcrAccount"
  608. />
  609. <el-table-column
  610. label="实际还款日期"
  611. align="center"
  612. prop="zfrPayDate"
  613. :show-overflow-tooltip="true"
  614. v-if="uncheckList.zfrPayDate"
  615. />
  616. <el-table-column
  617. label="承诺付款日期"
  618. align="center"
  619. prop="zfrRepaymentDate"
  620. :show-overflow-tooltip="true"
  621. v-if="uncheckList.zfrRepaymentDate"
  622. />
  623. <el-table-column
  624. label="还款状态"
  625. align="center"
  626. prop="zfrApplyStatus"
  627. :formatter="applyStatusFormat"
  628. :show-overflow-tooltip="true"
  629. v-if="uncheckList.zfrApplyStatus"
  630. />
  631. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  632. <template slot-scope="scope">
  633. <el-button
  634. size="mini"
  635. type="text"
  636. icon="el-icon-view"
  637. @click="handleInfo(scope.row)"
  638. v-hasPermi="['service:repayment:query']"
  639. >详情</el-button>
  640. <el-button
  641. size="mini"
  642. type="text"
  643. icon="el-icon-delete"
  644. @click="handleDown(scope.row)"
  645. v-hasPermi="['service:repayment:down']"
  646. >下载</el-button>
  647. <el-button
  648. size="mini"
  649. type="text"
  650. icon="el-icon-delete"
  651. @click="handleUp(scope.row)"
  652. v-hasPermi="['service:repayment:up']"
  653. v-if="scope.row.zfrApplyStatus != '01'"
  654. >还款登记</el-button>
  655. </template>
  656. </el-table-column>
  657. </el-table>
  658. <pagination
  659. v-show="total>0"
  660. :total="total2"
  661. :page.sync="repayment.pageNum"
  662. :limit.sync="repayment.pageSize"
  663. @pagination="getList"
  664. />
  665. </el-tab-pane>
  666. <el-tab-pane label="逾期">
  667. <div class="zap-content">
  668. <el-button
  669. type="primary"
  670. icon="el-icon-export"
  671. @click="handleExport"
  672. v-hasPermi="['service:repayment:export']"
  673. >导出待还款数据</el-button>
  674. </div>
  675. <el-table
  676. v-loading="loading"
  677. :data="overdueList"
  678. @selection-change="handleSelectionChange"
  679. border
  680. >
  681. <el-table-column label="序号" type="index" width="50" align="center">
  682. <template slot-scope="scope">
  683. <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
  684. </template>
  685. </el-table-column>
  686. <el-table-column
  687. label="融资编号"
  688. align="center"
  689. prop="zfrNumber"
  690. :show-overflow-tooltip="true"
  691. v-if="uncheckList.zfrNumber"
  692. />
  693. <el-table-column
  694. label="融信编号"
  695. align="center"
  696. prop="zfiNumber"
  697. :show-overflow-tooltip="true"
  698. v-if="uncheckList.zfiNumber"
  699. />
  700. <el-table-column
  701. label="最终还款方"
  702. align="center"
  703. prop="core"
  704. :show-overflow-tooltip="true"
  705. v-if="uncheckList.core"
  706. />
  707. <el-table-column
  708. label="融资方"
  709. align="center"
  710. prop="supplier"
  711. :show-overflow-tooltip="true"
  712. v-if="uncheckList.supplier"
  713. />
  714. <el-table-column
  715. label="资金方"
  716. align="center"
  717. prop="scyName"
  718. :show-overflow-tooltip="true"
  719. v-if="uncheckList.scyName"
  720. />
  721. <el-table-column
  722. label="还款金额(元)"
  723. align="center"
  724. prop="zfrLoanAmount"
  725. :show-overflow-tooltip="true"
  726. v-if="uncheckList.zfrLoanAmount"
  727. />
  728. <el-table-column
  729. label="还款银行账户"
  730. align="center"
  731. prop="zfpcrAccount"
  732. :show-overflow-tooltip="true"
  733. v-if="uncheckList.zfpcrAccount"
  734. />
  735. <el-table-column
  736. label="实际还款日期"
  737. align="center"
  738. prop="zfrPayDate"
  739. :show-overflow-tooltip="true"
  740. v-if="uncheckList.zfrPayDate"
  741. />
  742. <el-table-column
  743. label="承诺付款日期"
  744. align="center"
  745. prop="zfrRepaymentDate"
  746. :show-overflow-tooltip="true"
  747. v-if="uncheckList.zfrRepaymentDate"
  748. />
  749. <el-table-column
  750. label="还款状态"
  751. align="center"
  752. prop="zfrApplyStatus"
  753. :formatter="applyStatusFormat"
  754. :show-overflow-tooltip="true"
  755. v-if="uncheckList.zfrApplyStatus"
  756. />
  757. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  758. <template slot-scope="scope">
  759. <el-button
  760. size="mini"
  761. type="text"
  762. icon="el-icon-view"
  763. @click="handleInfo(scope.row)"
  764. v-hasPermi="['service:repayment:query']"
  765. >详情</el-button>
  766. <el-button
  767. size="mini"
  768. type="text"
  769. icon="el-icon-delete"
  770. @click="handleDown(scope.row)"
  771. v-hasPermi="['service:repayment:down']"
  772. >下载</el-button>
  773. <el-button
  774. size="mini"
  775. type="text"
  776. icon="el-icon-delete"
  777. @click="handleUp(scope.row)"
  778. v-hasPermi="['service:repayment:up']"
  779. v-if="scope.row.zfrApplyStatus != '01'"
  780. >还款登记</el-button>
  781. </template>
  782. </el-table-column>
  783. </el-table>
  784. <pagination
  785. v-show="total>0"
  786. :total="total3"
  787. :page.sync="overdue.pageNum"
  788. :limit.sync="overdue.pageSize"
  789. @pagination="getList"
  790. />
  791. </el-tab-pane>
  792. <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
  793. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  794. <el-form-item label="上传附件">
  795. <el-upload
  796. ref="upload"
  797. class="upload-demo"
  798. action
  799. :class="{showUoload:showBtnImg,uoloadSty:noneBtnImg}"
  800. :on-change="dealImgChange"
  801. accept=".jpg, .jpeg, .png, .JPG, .JPEG, .PNG"
  802. :http-request="httpRequest"
  803. :on-preview="handlePictureCardPreview"
  804. :on-remove="handleRemove"
  805. :before-upload="beforeAvatarUpload"
  806. multiple
  807. :limit="1"
  808. :on-exceed="handleExceed"
  809. list-type="picture-card"
  810. :file-list="fileList"
  811. :auto-upload="true"
  812. >
  813. <div slot="trigger" class="zap-contract-add__upload">
  814. <i class="el-icon-upload"></i>
  815. <div class="zap-upload__text">上传文件</div>
  816. </div>
  817. </el-upload>
  818. </el-form-item>
  819. <el-form-item label="融资id" prop="zfrId" label-width="90px" v-if="false">
  820. <el-input v-model="form.zfrId" style="width:284px" />
  821. </el-form-item>
  822. <!-- <el-form-item label="融信id" prop="zfrFinanceId" label-width="90px" v-if="false">
  823. <el-input v-model="form.zfrFinanceId" style="width:284px"/>
  824. </el-form-item>-->
  825. </el-form>
  826. <el-row style="height: 109px;" type="flex" align="middle" justify="center">
  827. <el-button type="primary" plain @click="cancel">取 消</el-button>
  828. <el-button type="primary" @click="submitForm">确 定</el-button>
  829. </el-row>
  830. </el-dialog>
  831. <el-dialog :visible.sync="dialogVisible">
  832. <img width="100%" :src="dialogImageUrl" alt />
  833. </el-dialog>
  834. </el-tabs>
  835. </div>
  836. </template>
  837. <script>
  838. import {
  839. listRepayment,
  840. RepaymentRegistration,
  841. repaymentAmount
  842. } from "@/api/service/repayment/repayment";
  843. import ColumnSetting from "../../../components/Table/columnSetting.vue";
  844. import { columnQuery, columnfilter } from "@/api/common/columnSetting";
  845. import Cookies from "js-cookie";
  846. import { uploadFileNew } from "@/api/common/file";
  847. import { getToken } from "@/utils/auth";
  848. export default {
  849. name: "repayment",
  850. components: {
  851. ColumnSetting
  852. },
  853. data() {
  854. return {
  855. activeIndex: "",
  856. //总代还款金额
  857. sumAmount: 0.0,
  858. //带还款金额
  859. amount: 0.0,
  860. dayOptions: [],
  861. // 遮罩层
  862. loading: true,
  863. // 选中数组
  864. ids: [],
  865. // 非单个禁用
  866. single: true,
  867. // 非多个禁用
  868. multiple: true,
  869. // 显示搜索条件
  870. showSearch: true,
  871. // 总条数
  872. total: 0,
  873. total1: 0,
  874. total2: 0,
  875. total3: 0,
  876. //附件按钮
  877. showBtnImg: true,
  878. noneBtnImg: false,
  879. limitCountImg: 1,
  880. //上传使用
  881. dialogImageUrl: "",
  882. dialogVisible: false,
  883. //附件地址
  884. fileList: [],
  885. // 弹出层标题
  886. title: "",
  887. // 全部还款列表
  888. allRepaymentList: [],
  889. //待还款列表
  890. unRepaymentList: [],
  891. //已还款列表
  892. repaymentList: [],
  893. //逾期列表
  894. overdueList: [],
  895. typeOptions: [],
  896. // 是否显示弹出层
  897. open: false,
  898. // 查询参数
  899. queryParams: {
  900. pageNum: 1,
  901. pageSize: 10,
  902. type: null,
  903. value: null,
  904. repaymentDate: [],
  905. status: null
  906. },
  907. unRepayment: {
  908. pageNum: 1,
  909. pageSize: 10,
  910. type: null,
  911. value: null,
  912. repaymentDate: [],
  913. status: null
  914. },
  915. repayment: {
  916. pageNum: 1,
  917. pageSize: 10,
  918. type: null,
  919. value: null,
  920. repaymentDate: [],
  921. status: null
  922. },
  923. overdue: {
  924. pageNum: 1,
  925. pageSize: 10,
  926. type: null,
  927. value: null,
  928. repaymentDate: [],
  929. status: null
  930. },
  931. amountQueryParams: {
  932. day: "00"
  933. },
  934. // 表单参数
  935. form: {},
  936. amountQueryForm: {
  937. day: "00"
  938. },
  939. // 表单校验
  940. rules: {
  941. // pptName:[
  942. // { required: true, message: "项目类型不能为空", trigger: "blur" },
  943. // ]
  944. },
  945. tableList: [
  946. {
  947. label: "zfrNumber",
  948. value: "融资编号"
  949. },
  950. {
  951. label: "zfiNumber",
  952. value: "融信编号"
  953. },
  954. {
  955. label: "core",
  956. value: "最终还款方"
  957. },
  958. {
  959. label: "supplier",
  960. value: "融资方"
  961. },
  962. {
  963. label: "scyName",
  964. value: "资金方"
  965. },
  966. {
  967. label: "zfrLoanAmount",
  968. value: "还款金额(元)"
  969. },
  970. {
  971. label: "zfpcrAccount",
  972. value: "还款银行账户"
  973. },
  974. {
  975. label: "zfrPayDate",
  976. value: "实际还款日期"
  977. },
  978. {
  979. label: "zfrRepaymentDate",
  980. value: "承诺付款日期"
  981. },
  982. {
  983. label: "zfrApplyStatus",
  984. value: "还款状态"
  985. }
  986. ],
  987. checkList: [], //筛选列选中的数据列表--显示隐藏列用
  988. uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
  989. selfDom: this,
  990. tableId: "/service/repayment/list"
  991. };
  992. },
  993. created() {
  994. this.getList();
  995. this.getUnpayList();
  996. this.getRepayList();
  997. this.getOverdueList();
  998. this.getRepaymentAmount();
  999. this.getDicts("zc_zfr_apply_status").then(response => {
  1000. this.applyStatusOptions = response.data;
  1001. });
  1002. this.getDicts("zc_zfr_type").then(response => {
  1003. this.typeOptions = response.data;
  1004. });
  1005. this.getDicts("zc_repanyment_day").then(response => {
  1006. this.dayOptions = response.data;
  1007. });
  1008. this.amountQueryParams.day = null;
  1009. repaymentAmount(this.amountQueryParams).then(response => {
  1010. this.sumAmount = response.data;
  1011. });
  1012. },
  1013. activated() {
  1014. this.getList();
  1015. },
  1016. mounted() {
  1017. this.columnQuery();
  1018. },
  1019. methods: {
  1020. /** 查询所有还款列表 */
  1021. getList() {
  1022. this.loading = true;
  1023. listRepayment(this.queryParams).then(response => {
  1024. this.allRepaymentList = response.data.records;
  1025. this.total = response.data.total;
  1026. this.loading = false;
  1027. });
  1028. },
  1029. /** 查询未还款列表 */
  1030. getUnpayList() {
  1031. this.loading = true;
  1032. this.unRepayment.status = "00";
  1033. listRepayment(this.unRepayment).then(response => {
  1034. this.unRepaymentList = response.data.records;
  1035. this.total1 = response.data.total;
  1036. this.loading = false;
  1037. });
  1038. },
  1039. /** 查询已还款列表 */
  1040. getRepayList() {
  1041. this.loading = true;
  1042. this.repayment.status = "01";
  1043. listRepayment(this.repayment).then(response => {
  1044. this.repaymentList = response.data.records;
  1045. this.total2 = response.data.total;
  1046. this.loading = false;
  1047. });
  1048. },
  1049. /** 查询逾期列表 */
  1050. getOverdueList() {
  1051. this.loading = true;
  1052. this.overdue.status = "02";
  1053. listRepayment(this.overdue).then(response => {
  1054. this.overdueList = response.data.records;
  1055. this.total3 = response.data.total;
  1056. this.loading = false;
  1057. });
  1058. },
  1059. /** 查询带还款金额 */
  1060. getRepaymentAmount() {
  1061. repaymentAmount(this.amountQueryParams).then(response => {
  1062. this.amount = response.data;
  1063. });
  1064. },
  1065. // 取消按钮
  1066. cancel() {
  1067. this.open = false;
  1068. this.reset();
  1069. },
  1070. // 表单重置
  1071. reset() {
  1072. this.form = {};
  1073. this.fileList = [];
  1074. this.resetForm("form");
  1075. },
  1076. /** 搜索按钮操作 */
  1077. handleQuery() {
  1078. this.queryParams.pageNum = 1;
  1079. this.getList();
  1080. },
  1081. secondQuery() {
  1082. this.unRepayment.pageNum = 1;
  1083. this.getUnpayList();
  1084. },
  1085. thirdQuery() {
  1086. this.repayment.pageNum = 1;
  1087. this.getRepayList();
  1088. },
  1089. fouthQuery() {
  1090. this.overdue.pageNum = 1;
  1091. this.getOverdueList();
  1092. },
  1093. /** 重置按钮操作 */
  1094. resetQuery() {
  1095. this.resetForm("queryForm");
  1096. this.handleQuery();
  1097. },
  1098. resetSecondQuery() {
  1099. this.resetForm("queryForm1");
  1100. this.secondQuery();
  1101. },
  1102. resetThirdQuery() {
  1103. this.resetForm("queryForm2");
  1104. this.thirdQuery();
  1105. },
  1106. resetFouthQuery() {
  1107. this.resetForm("queryForm3");
  1108. this.fouthQuery();
  1109. },
  1110. change(val) {
  1111. this.amountQueryParams.day = val;
  1112. repaymentAmount(this.amountQueryParams).then(response => {
  1113. this.amount = response.data;
  1114. });
  1115. },
  1116. // 多选框选中数据
  1117. handleSelectionChange(selection) {
  1118. /* this.ids = selection.map(item => item.ptcId)
  1119. this.single = selection.length!==1
  1120. this.multiple = !selection.length */
  1121. },
  1122. /** 详情按钮操作 */
  1123. handleInfo(row) {
  1124. const zfrId = row.zfrId;
  1125. this.resetForm("queryForm");
  1126. this.resetForm("queryForm1");
  1127. this.resetForm("queryForm2");
  1128. this.resetForm("queryForm3");
  1129. Cookies.set(
  1130. "/repayment/detailRepayment/" + zfrId + "/",
  1131. this.$route.fullPath
  1132. );
  1133. this.$router.push({ path: "/repayment/detailRepayment/" + zfrId + "/" });
  1134. },
  1135. /** 下载按钮操作 */
  1136. handleDown(row) {
  1137. var zfrId = row.zfrId;
  1138. const loading = this.$loading({
  1139. lock: true,
  1140. text: "Loading",
  1141. spinner: "el-icon-loading",
  1142. background: "rgba(0, 0, 0, 0.7)"
  1143. });
  1144. this.download("sc-service/repayment/export/" + zfrId, {}, `还款明细.doc`);
  1145. setTimeout(() => {
  1146. loading.close();
  1147. this.create = false;
  1148. this.end = true;
  1149. this.active = 1;
  1150. }, 3000);
  1151. },
  1152. //上传附件
  1153. handleUp(row) {
  1154. this.reset();
  1155. this.form.zfrId = row.zfrId || this.ids;
  1156. this.showBtnImg = true;
  1157. this.noneBtnImg = this.fileList.length >= this.limitCountImg;
  1158. this.open = true;
  1159. this.title = "还款登记";
  1160. },
  1161. //上传前校验
  1162. beforeAvatarUpload(file) {
  1163. const isJPG = file.type === "image/jpeg" || file.type === "image/png";
  1164. const isLt2M = file.size / 1024 / 1024 < 2;
  1165. if (!isJPG) {
  1166. this.$message.error("上传图片只能是 JPG/PNG 格式");
  1167. }
  1168. if (!isLt2M) {
  1169. this.$message.error("上传图片大小不能超过 2MB");
  1170. }
  1171. return isJPG && isLt2M;
  1172. },
  1173. //还款状态字典反显
  1174. applyStatusFormat(row, column) {
  1175. return this.selectDictLabel(this.applyStatusOptions, row.zfrApplyStatus);
  1176. },
  1177. //获取当前客户是否之前设置过列展示隐藏
  1178. columnQuery() {
  1179. //获取页面路径
  1180. var psfPagePath = window.location.pathname; //用请求后台的url作为唯一标识
  1181. var psfTableName = this.tableId;
  1182. var columnForm = {};
  1183. columnForm.psfPagePath = psfPagePath;
  1184. columnForm.psfTableName = psfTableName;
  1185. columnQuery(columnForm).then(response => {
  1186. if (response.data && response.data.psfShowData) {
  1187. this.checkList = response.data.psfShowData;
  1188. }
  1189. this.filter();
  1190. });
  1191. }, //控制隐藏显示的函数
  1192. filter(checkList) {
  1193. if (!!checkList) {
  1194. this.checkList = checkList;
  1195. }
  1196. columnfilter(this.selfDom);
  1197. },
  1198. /** 上传图片 */
  1199. submitUpload() {
  1200. this.$refs.upload.submit();
  1201. },
  1202. //文件移除提示
  1203. handleRemove(file, fileList) {
  1204. console.log(file);
  1205. for (let i = 0; i < this.fileList.length; i++) {
  1206. if (file.uid == this.fileList[i].uid) {
  1207. this.fileList.splice(i, 1);
  1208. break;
  1209. }
  1210. }
  1211. this.noneBtnImg = fileList.length >= this.limitCountImg;
  1212. //return this.$confirm(`确定移除 ${ file.name }?`);
  1213. },
  1214. dealImgChange(file, fileList) {
  1215. this.noneBtnImg = fileList.length >= this.limitCountImg;
  1216. },
  1217. handleExceed(files, fileList) {
  1218. this.$message.warning(`当前限制选择 1 个文件`);
  1219. },
  1220. handlePictureCardPreview(file) {
  1221. this.dialogImageUrl = file.url;
  1222. this.dialogVisible = true;
  1223. },
  1224. //手动上传文件触发
  1225. httpRequest(param) {
  1226. let fileObj = param.file; // 相当于input里取得的files
  1227. let fd = new FormData(); // FormData 对象
  1228. fd.append("file", fileObj); // 文件对象
  1229. fd.append("fileType", "00"); //文件类型
  1230. const loading = this.$loading({
  1231. lock: true,
  1232. text: "Loading",
  1233. spinner: "el-icon-loading",
  1234. background: "rgba(0, 0, 0, 0.7)"
  1235. });
  1236. uploadFileNew(fd)
  1237. .then(response => {
  1238. if (response) {
  1239. // this.form.eeiImgUrl = response.url
  1240. this.fileList.push({
  1241. uid: response.fileId,
  1242. url: response.url + "/" + getToken()
  1243. });
  1244. console.log(response.url);
  1245. setTimeout(() => {
  1246. loading.close();
  1247. }, 2000);
  1248. }
  1249. })
  1250. .catch(response => {
  1251. loading.close();
  1252. });
  1253. },
  1254. /** 提交按钮 */
  1255. submitForm() {
  1256. this.$refs["form"].validate(valid => {
  1257. if (valid) {
  1258. if (this.form.zfrId != null) {
  1259. this.form.zfrApplyFile = this.fileList;
  1260. RepaymentRegistration(this.form).then(response => {
  1261. this.msgSuccess("登记成功");
  1262. this.open = false;
  1263. this.getList();
  1264. });
  1265. }
  1266. }
  1267. });
  1268. },
  1269. /** 导出按钮操作 */
  1270. handleExport() {
  1271. const loading = this.$loading({
  1272. lock: true,
  1273. text: "Loading",
  1274. spinner: "el-icon-loading",
  1275. background: "rgba(0, 0, 0, 0.7)"
  1276. });
  1277. this.download(
  1278. "sc-service/repayment/export",
  1279. {
  1280. ...this.queryParams
  1281. },
  1282. `待还款列表.xls`
  1283. );
  1284. setTimeout(() => {
  1285. loading.close();
  1286. this.create = false;
  1287. this.end = true;
  1288. this.active = 1;
  1289. }, 3000);
  1290. }
  1291. }
  1292. };
  1293. </script>
  1294. <style>
  1295. .uoloadSty .el-upload--picture-card {
  1296. display: none;
  1297. }
  1298. </style>
  1299. <style lang="scss" scoped>
  1300. ::v-deep .el-tabs__item {
  1301. width: 105px;
  1302. height: 55px;
  1303. padding: 0;
  1304. line-height: 55px;
  1305. text-align: center;
  1306. font-size: 16px;
  1307. }
  1308. ::v-deep .el-textarea__inner {
  1309. width: 100%;
  1310. height: 106px;
  1311. background-image: linear-gradient(#f4f5f6, #f4f5f6),
  1312. linear-gradient(#71befe, #71befe);
  1313. background-blend-mode: normal, normal;
  1314. border: solid 1px #ebebeb;
  1315. }
  1316. ::v-deep .el-textarea .el-input__count {
  1317. background-color: transparent;
  1318. }
  1319. ::v-deep .el-upload--picture-card{
  1320. border: none;
  1321. }
  1322. .zap-contract-add__upload {
  1323. display: flex;
  1324. flex-direction: column;
  1325. justify-content: center;
  1326. align-items: center;
  1327. width: 148px;
  1328. height: 148px;
  1329. border: dashed 1px #e0e0e0;
  1330. background-color: #f4f5f6;
  1331. }
  1332. .el-icon-upload {
  1333. font-size: 32px;
  1334. color: #02c464;
  1335. }
  1336. .zap-upload__text {
  1337. line-height: 1;
  1338. margin-top: 12px;
  1339. font-size: 12px;
  1340. color: #333333;
  1341. }
  1342. </style>