repayment.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. <template>
  2. <el-tabs type="border-card">
  3. <el-tab-pane label="全部">
  4. <el-card class="fiche">
  5. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
  6. <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
  7. <div style="float: right;margin-right:1%">
  8. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  9. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" style="float: ;">重置</el-button>
  10. <column-setting :checkList="checkList":tableList="tableList":selfDom="selfDom":tableId="tableId"></column-setting>
  11. </div>
  12. <hr style="margin-top: 16px;">
  13. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
  14. <el-form-item prop="type">
  15. <el-select v-model="queryParams.type" placeholder="请选择查询字段" clearable size="small" >
  16. <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  17. </el-select>
  18. </el-form-item>
  19. <el-form-item prop="value">
  20. <el-input v-model="queryParams.value" placeholder="请输入关键字模糊查询" clearable size="small" maxlength="30" @keyup.enter.native="handleQuery"/>
  21. </el-form-item>
  22. <el-form-item label="承诺还款日期" prop="repaymentDate">
  23. <el-date-picker clearable unlink-panels v-model="queryParams.repaymentDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
  24. </el-date-picker>
  25. </el-form-item>
  26. </el-form>
  27. </el-card>  
  28. <el-form :model="amountQueryParams" ref="amountQueryForm" :inline="true" v-show="showSearch" label-width="100px">       
  29. <div style="width:20%;height:135px;background:#f2f2f2;float:left;border-radius: 5%; ">
  30. <span>总待还款金额:</span><span>{{sumAmount}}</span>
  31.             </div>
  32.             <div style="width:20%;height:135px;background:#f2f2f2;float:left;margin-left:10px;border-radius: 5%;">
  33. <el-form-item prop="day">
  34. <el-select v-model="amountQueryParams.day" size="small" @change="change(amountQueryParams.day)">
  35. <el-option v-for="dict in dayOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  36. </el-select>
  37. </el-form-item>
  38. <span>待还款金额:</span></span><span>{{amount}}</span>
  39.             </div>
  40. </el-form>
  41. <div>
  42. <el-button type="primary" icon="el-icon-export" size="mini" @click="handleExport" v-hasPermi="['service:repayment:export']">导出待还款数据</el-button>
  43. </div>
  44. <el-table v-loading="loading" :data="allRepaymentList" @selection-change="handleSelectionChange" border>
  45. <el-table-column label="序号" type="index" width="50" align="center">
  46. <template slot-scope="scope">
  47. <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
  48. </template>
  49. </el-table-column>
  50. <el-table-column label="融信编号" align="center" prop="zfiNumber" :show-overflow-tooltip="true" v-if="uncheckList.zfiNumber" />
  51. <el-table-column label="最终还款方" align="center" prop="core" :show-overflow-tooltip="true" v-if="uncheckList.core" />
  52. <el-table-column label="还款金额(元)" align="center" prop="zfrLoanAmount" :show-overflow-tooltip="true" v-if="uncheckList.zfrLoanAmount" />
  53. <el-table-column label="还款银行账户" align="center" prop="zfpcrAccount" :show-overflow-tooltip="true" v-if="uncheckList.zfpcrAccount" />
  54. <el-table-column label="实际还款日期" align="center" prop="zfrPayDate" :show-overflow-tooltip="true" v-if="uncheckList.zfrPayDate" />
  55. <el-table-column label="承诺付款日期" align="center" prop="zfrRepaymentDate" :show-overflow-tooltip="true" v-if="uncheckList.zfrRepaymentDate" />
  56. <el-table-column label="还款状态" align="center" prop="zfrApplyStatus" :formatter="applyStatusFormat" :show-overflow-tooltip="true" v-if="uncheckList.zfrApplyStatus" />
  57. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  58. <template slot-scope="scope">
  59. <el-button size="mini" type="text" icon="el-icon-view" @click="handleInfo(scope.row)" v-hasPermi="['service:repayment:query']">详情</el-button>
  60. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDown(scope.row)" v-hasPermi="['service:repayment:down']">下载</el-button>
  61. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleUp(scope.row)" v-hasPermi="['service:repayment:edit']" v-if="scope.row.zfrApplyStatus != '01'">还款登记</el-button>
  62. </template>
  63. </el-table-column>
  64. </el-table>
  65. <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
  66. </el-tab-pane>
  67. <el-tab-pane label="待还款">
  68. <el-card class="fiche">
  69. <right-toolbar :showSearch.sync="showSearch" @queryTable="getUnpayList">收起</right-toolbar>
  70. <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
  71. <div style="float: right;margin-right:1%">
  72. <el-button type="cyan" icon="el-icon-search" size="mini" @click="secondQuery">搜索</el-button>
  73. <el-button icon="el-icon-refresh" size="mini" @click="resetSecondQuery" style="float: ;">重置</el-button>
  74. <column-setting :checkList=checkList :tableList=tableList :selfDom=selfDom :tableId=tableId> </column-setting>
  75. </div>
  76. <hr style="margin-top: 16px;">
  77. <el-form :model="unRepayment" ref="queryForm1" :inline="true" v-show="showSearch" label-width="100px">
  78. <el-form-item prop="type">
  79. <el-select v-model="unRepayment.type" placeholder="请选择查询字段" clearable size="small" >
  80. <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  81. </el-select>
  82. </el-form-item>
  83. <el-form-item prop="value">
  84. <el-input v-model="unRepayment.value" placeholder="请输入关键字模糊查询" clearable size="small" maxlength="30" @keyup.enter.native="secondQuery" />
  85. </el-form-item>
  86. <el-form-item label="承诺还款日期" prop="repaymentDate">
  87. <el-date-picker clearable unlink-panels v-model="unRepayment.repaymentDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
  88. </el-date-picker>
  89. </el-form-item>
  90. </el-form>
  91. </el-card>
  92. <el-row :gutter="10" class="mb8">
  93. <el-col :span="1.5">
  94. <el-button type="primary" icon="el-icon-export" size="mini" @click="handleExport" v-hasPermi="['service:repayment:export']">导出待还款数据</el-button>
  95. </el-col>
  96. </el-row>
  97. <el-table v-loading="loading" :data="unRepaymentList" @selection-change="handleSelectionChange" border>
  98. <el-table-column label="序号" type="index" width="50" align="center">
  99. <template slot-scope="scope">
  100. <span>{{(unRepayment.pageNum - 1) * unRepayment.pageSize + scope.$index + 1}}</span>
  101. </template>
  102. </el-table-column>
  103. <el-table-column label="融信编号" align="center" prop="zfiNumber" :show-overflow-tooltip="true" v-if="uncheckList.zfiNumber" />
  104. <el-table-column label="最终还款方" align="center" prop="core" :show-overflow-tooltip="true" v-if="uncheckList.core" />
  105. <el-table-column label="还款金额(元)" align="center" prop="zfrLoanAmount" :show-overflow-tooltip="true" v-if="uncheckList.zfrLoanAmount" />
  106. <el-table-column label="还款银行账户" align="center" prop="zfpcrAccount" :show-overflow-tooltip="true" v-if="uncheckList.zfpcrAccount" />
  107. <el-table-column label="实际还款日期" align="center" prop="zfrPayDate" :show-overflow-tooltip="true" v-if="uncheckList.zfrPayDate" />
  108. <el-table-column label="承诺付款日期" align="center" prop="zfrRepaymentDate" :show-overflow-tooltip="true" v-if="uncheckList.zfrRepaymentDate" />
  109. <el-table-column label="还款状态" align="center" prop="zfrApplyStatus" :formatter="applyStatusFormat" :show-overflow-tooltip="true" v-if="uncheckList.zfrApplyStatus" />
  110. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  111. <template slot-scope="scope">
  112. <el-button size="mini" type="text" icon="el-icon-view" @click="handleInfo(scope.row)" v-hasPermi="['service:repayment:query']">详情</el-button>
  113. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDown(scope.row)" v-hasPermi="['service:repayment:down']">下载</el-button>
  114. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleUp(scope.row)" v-hasPermi="['service:repayment:up']" v-if="scope.row.zfrApplyStatus != '01'">还款登记</el-button>
  115. </template>
  116. </el-table-column>
  117. </el-table>
  118. <pagination v-show="total>0" :total="total1" :page.sync="unRepayment.pageNum" :limit.sync="unRepayment.pageSize" @pagination="getList" />
  119. </el-tab-pane>
  120. <el-tab-pane label="已还款">
  121. <el-card class="fiche">
  122. <right-toolbar :showSearch.sync="showSearch" @queryTable="getRepayList">收起</right-toolbar>
  123. <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
  124. <div style="float: right;margin-right:1%">
  125. <el-button type="cyan" icon="el-icon-search" size="mini" @click="thirdQuery">搜索</el-button>
  126. <el-button icon="el-icon-refresh" size="mini" @click="resetThirdQuery" style="float: ;">重置</el-button>
  127. <column-setting :checkList=checkList :tableList=tableList :selfDom=selfDom :tableId=tableId></column-setting>
  128. </div>
  129. <hr style="margin-top: 16px;">
  130. <el-form :model="repayment" ref="queryForm2" :inline="true" v-show="showSearch" label-width="100px">
  131. <el-form-item prop="type">
  132. <el-select v-model="repayment.type" placeholder="请选择查询字段" clearable size="small" prop="type">
  133. <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  134. </el-select>
  135. </el-form-item>
  136. <el-form-item prop="value">
  137. <el-input v-model="repayment.value" prop="value" placeholder="请输入关键字模糊查询" clearable size="small" maxlength="30" @keyup.enter.native="thirdQuery" />
  138. </el-form-item>
  139. <el-form-item label="承诺还款日期" prop="repaymentDate">
  140. <el-date-picker clearable unlink-panels v-model="repayment.repaymentDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
  141. </el-date-picker>
  142. </el-form-item>
  143. </el-form>
  144. </el-card>
  145. <el-row :gutter="10" class="mb8">
  146. <el-col :span="1.5">
  147. <el-button type="primary" icon="el-icon-export" size="mini" @click="handleExport" v-hasPermi="['service:repayment:export']">导出待还款数据</el-button>
  148. </el-col>
  149. </el-row>
  150. <el-table v-loading="loading" :data="repaymentList" @selection-change="handleSelectionChange" border>
  151. <el-table-column label="序号" type="index" width="50" align="center">
  152. <template slot-scope="scope">
  153. <span>{{(repayment.pageNum - 1) * repayment.pageSize + scope.$index + 1}}</span>
  154. </template>
  155. </el-table-column>
  156. <el-table-column label="融信编号" align="center" prop="zfiNumber" :show-overflow-tooltip="true" v-if="uncheckList.zfiNumber" />
  157. <el-table-column label="最终还款方" align="center" prop="core" :show-overflow-tooltip="true" v-if="uncheckList.core" />
  158. <el-table-column label="还款金额(元)" align="center" prop="zfrLoanAmount" :show-overflow-tooltip="true" v-if="uncheckList.zfrLoanAmount" />
  159. <el-table-column label="还款银行账户" align="center" prop="zfpcrAccount" :show-overflow-tooltip="true" v-if="uncheckList.zfpcrAccount" />
  160. <el-table-column label="实际还款日期" align="center" prop="zfrPayDate" :show-overflow-tooltip="true" v-if="uncheckList.zfrPayDate" />
  161. <el-table-column label="承诺付款日期" align="center" prop="zfrRepaymentDate" :show-overflow-tooltip="true" v-if="uncheckList.zfrRepaymentDate" />
  162. <el-table-column label="还款状态" align="center" prop="zfrApplyStatus" :formatter="applyStatusFormat" :show-overflow-tooltip="true" v-if="uncheckList.zfrApplyStatus" />
  163. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  164. <template slot-scope="scope">
  165. <el-button size="mini" type="text" icon="el-icon-view" @click="handleInfo(scope.row)" v-hasPermi="['service:repayment:query']">详情</el-button>
  166. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDown(scope.row)" v-hasPermi="['service:repayment:down']">下载</el-button>
  167. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleUp(scope.row)" v-hasPermi="['service:repayment:up']" v-if="scope.row.zfrApplyStatus != '01'">还款登记</el-button>
  168. </template>
  169. </el-table-column>
  170. </el-table>
  171. <pagination v-show="total>0" :total="total2" :page.sync="repayment.pageNum" :limit.sync="repayment.pageSize" @pagination="getList" />
  172. </el-tab-pane>
  173. <el-tab-pane label="逾期">
  174. <el-card class="fiche">
  175. <right-toolbar :showSearch.sync="showSearch" @queryTable="getOverdueList">收起</right-toolbar>
  176. <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
  177. <div style="float: right;margin-right:1%">
  178. <el-button type="cyan" icon="el-icon-search" size="mini" @click="fouthQuery">搜索</el-button>
  179. <el-button icon="el-icon-refresh" size="mini" @click="resetFouthQuery" style="float: ;">重置</el-button>
  180. <column-setting :checkList=checkList :tableList=tableList :selfDom=selfDom :tableId=tableId></column-setting>
  181. </div>
  182. <hr style="margin-top: 16px;">
  183. <el-form :model="overdue" ref="queryForm3" :inline="true" v-show="showSearch" label-width="100px">
  184. <el-form-item prop="type">
  185. <el-select v-model=" overdue.type" placeholder="请选择查询字段" clearable size="small" prop="type">
  186. <el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  187. </el-select>
  188. </el-form-item>
  189. <el-form-item prop="value">
  190. <el-input v-model=" overdue.value" prop="value" placeholder="请输入关键字模糊查询" clearable size="small" maxlength="30" @keyup.enter.native="fouthQuery" />
  191. </el-form-item>
  192. <el-form-item label="承诺还款日期" prop="repaymentDate">
  193. <el-date-picker clearable unlink-panels v-model=" overdue.repaymentDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
  194. </el-date-picker>
  195. </el-form-item>
  196. </el-form>
  197. </el-card>
  198. <el-row :gutter="10" class="mb8">
  199. <el-col :span="1.5">
  200. <el-button type="primary" icon="el-icon-export" size="mini" @click="handleExport" v-hasPermi="['service:repayment:export']">导出待还款数据</el-button>
  201. </el-col>
  202. </el-row>
  203. <el-table v-loading="loading" :data="overdueList" @selection-change="handleSelectionChange" border>
  204. <el-table-column label="序号" type="index" width="50" align="center">
  205. <template slot-scope="scope">
  206. <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
  207. </template>
  208. </el-table-column>
  209. <el-table-column label="融信编号" align="center" prop="zfiNumber" :show-overflow-tooltip="true" v-if="uncheckList.zfiNumber" />
  210. <el-table-column label="最终还款方" align="center" prop="core" :show-overflow-tooltip="true" v-if="uncheckList.core" />
  211. <el-table-column label="还款金额(元)" align="center" prop="zfrLoanAmount" :show-overflow-tooltip="true" v-if="uncheckList.zfrLoanAmount" />
  212. <el-table-column label="还款银行账户" align="center" prop="zfpcrAccount" :show-overflow-tooltip="true" v-if="uncheckList.zfpcrAccount" />
  213. <el-table-column label="实际还款日期" align="center" prop="zfrPayDate" :show-overflow-tooltip="true" v-if="uncheckList.zfrPayDate" />
  214. <el-table-column label="承诺付款日期" align="center" prop="zfrRepaymentDate" :show-overflow-tooltip="true" v-if="uncheckList.zfrRepaymentDate" />
  215. <el-table-column label="还款状态" align="center" prop="zfrApplyStatus" :formatter="applyStatusFormat" :show-overflow-tooltip="true" v-if="uncheckList.zfrApplyStatus" />
  216. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  217. <template slot-scope="scope">
  218. <el-button size="mini" type="text" icon="el-icon-view" @click="handleInfo(scope.row)" v-hasPermi="['service:repayment:query']">详情</el-button>
  219. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDown(scope.row)" v-hasPermi="['service:repayment:down']">下载</el-button>
  220. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleUp(scope.row)" v-hasPermi="['service:repayment:up']" v-if="scope.row.zfrApplyStatus != '01'">还款登记</el-button>
  221. </template>
  222. </el-table-column>
  223. </el-table>
  224. <pagination v-show="total>0" :total="total3" :page.sync="overdue.pageNum" :limit.sync="overdue.pageSize" @pagination="getList" />
  225. </el-tab-pane>
  226. <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
  227. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  228. <el-form-item label="上传附件">
  229. <el-upload
  230. ref="upload"
  231. class="upload-demo"
  232. action=""
  233. :class="{showUoload:showBtnImg,uoloadSty:noneBtnImg}"
  234. :on-change="dealImgChange"
  235. accept=".jpg, .jpeg, .png, .JPG, .JPEG, .PNG"
  236. :http-request="httpRequest"
  237. :on-preview="handlePictureCardPreview"
  238. :on-remove="handleRemove"
  239. :before-upload="beforeAvatarUpload"
  240. multiple
  241. :limit="1"
  242. :on-exceed="handleExceed"
  243. list-type="picture-card"
  244. :file-list="fileList"
  245. :auto-upload="true">
  246. <el-button slot="trigger" size="small" type="primary">点击选择</el-button>
  247. <!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
  248. </el-upload>
  249. </el-form-item>
  250. <el-form-item label="融资id" prop="zfrId" label-width="90px" v-if="false">
  251. <el-input v-model="form.zfrId" style="width:284px"/>
  252. </el-form-item>
  253. <!-- <el-form-item label="融信id" prop="zfrFinanceId" label-width="90px" v-if="false">
  254. <el-input v-model="form.zfrFinanceId" style="width:284px"/>
  255. </el-form-item> -->
  256. </el-form>
  257. <div slot="footer" class="dialog-footer">
  258. <el-button type="primary" @click="submitForm">确 定</el-button>
  259. <el-button @click="cancel">取 消</el-button>
  260. </div>
  261. </el-dialog>
  262. <el-dialog :visible.sync="dialogVisible">
  263. <img width="100%" :src="dialogImageUrl" alt="">
  264. </el-dialog>
  265. </el-tabs>
  266. </template>
  267. <script>
  268. import { listRepayment,RepaymentRegistration,repaymentAmount } from "@/api/service/repayment/repayment";
  269. import ColumnSetting from "../../../components/Table/columnSetting.vue";
  270. import { columnQuery, columnfilter } from "@/api/common/columnSetting";
  271. import Cookies from 'js-cookie'
  272. import { uploadFileNew } from "@/api/common/file";
  273. import { getToken } from "@/utils/auth";
  274. export default {
  275. name: "repayment",
  276. components: {
  277. ColumnSetting,
  278. },
  279. data() {
  280. return {
  281. //总代还款金额
  282. sumAmount:0.00,
  283. //带还款金额
  284. amount:0.00,
  285. dayOptions:[],
  286. // 遮罩层
  287. loading: true,
  288. // 选中数组
  289. ids: [],
  290. // 非单个禁用
  291. single: true,
  292. // 非多个禁用
  293. multiple: true,
  294. // 显示搜索条件
  295. showSearch: true,
  296. // 总条数
  297. total: 0,
  298. total1: 0,
  299. total2: 0,
  300. total3: 0,
  301. //附件按钮
  302. showBtnImg:true,
  303. noneBtnImg:false,
  304. limitCountImg:1,
  305. //上传使用
  306. dialogImageUrl: '',
  307. dialogVisible: false,
  308. //附件地址
  309. fileList:[],
  310. // 弹出层标题
  311. title: "",
  312. // 全部还款列表
  313. allRepaymentList: [],
  314. //待还款列表
  315. unRepaymentList: [],
  316. //已还款列表
  317. repaymentList: [],
  318. //逾期列表
  319. overdueList: [],
  320. typeOptions: [],
  321. // 是否显示弹出层
  322. open: false,
  323. // 查询参数
  324. queryParams: {
  325. pageNum: 1,
  326. pageSize: 10,
  327. type: null,
  328. value: null,
  329. repaymentDate: [],
  330. status: null,
  331. },
  332. unRepayment: {
  333. pageNum: 1,
  334. pageSize: 10,
  335. type: null,
  336. value: null,
  337. repaymentDate: [],
  338. status: null,
  339. },
  340. repayment: {
  341. pageNum: 1,
  342. pageSize: 10,
  343. type: null,
  344. value: null,
  345. repaymentDate: [],
  346. status: null,
  347. },
  348. overdue: {
  349. pageNum: 1,
  350. pageSize: 10,
  351. type: null,
  352. value: null,
  353. repaymentDate: [],
  354. status: null,
  355. },
  356. amountQueryParams:{
  357. day:"00",
  358. },
  359. // 表单参数
  360. form: {
  361. },
  362. amountQueryForm:{
  363. day:"00"
  364. },
  365. // 表单校验
  366. rules: {
  367. // pptName:[
  368. // { required: true, message: "项目类型不能为空", trigger: "blur" },
  369. // ]
  370. },
  371. tableList: [
  372. {
  373. label: "zfiNumber",
  374. value: "融信编号",
  375. },
  376. {
  377. label: "core",
  378. value: "最终还款方",
  379. },
  380. {
  381. label: "zfrLoanAmount",
  382. value: "还款金额(元)",
  383. },
  384. {
  385. label: "zfpcrAccount",
  386. value: "还款银行账户",
  387. },
  388. {
  389. label: "zfrPayDate",
  390. value: "实际还款日期",
  391. },
  392. {
  393. label: "zfrRepaymentDate",
  394. value: "承诺付款日期",
  395. },
  396. {
  397. label: "zfrApplyStatus",
  398. value: "还款状态",
  399. },
  400. ],
  401. checkList: [], //筛选列选中的数据列表--显示隐藏列用
  402. uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
  403. selfDom: this,
  404. tableId: "/service/repayment/list",
  405. };
  406. },
  407. created() {
  408. this.getList();
  409. this.getUnpayList();
  410. this.getRepayList();
  411. this.getOverdueList();
  412. this.getRepaymentAmount();
  413. this.getDicts("zc_zfr_apply_status").then((response) => {
  414. this.applyStatusOptions = response.data;
  415. });
  416. this.getDicts("zc_zfr_type").then((response) => {
  417. this.typeOptions = response.data;
  418. });
  419. this.getDicts("zc_repanyment_day").then((response) => {
  420. this.dayOptions = response.data;
  421. });
  422. this.amountQueryParams.day = null;
  423. repaymentAmount(this.amountQueryParams).then((response)=>{
  424. this.sumAmount = response.data;
  425. })
  426. },
  427. activated() {
  428. this.getList();
  429. },
  430. mounted() {
  431. this.columnQuery();
  432. },
  433. methods: {
  434. /** 查询所有还款列表 */
  435. getList() {
  436. this.loading = true;
  437. listRepayment(this.queryParams).then((response) => {
  438. this.allRepaymentList = response.data.records;
  439. this.total = response.data.total;
  440. this.loading = false;
  441. });
  442. },
  443. /** 查询未还款列表 */
  444. getUnpayList() {
  445. this.loading = true;
  446. this.unRepayment.status = "00";
  447. listRepayment(this.unRepayment).then((response) => {
  448. this.unRepaymentList = response.data.records;
  449. this.total1 = response.data.total;
  450. this.loading = false;
  451. });
  452. },
  453. /** 查询已还款列表 */
  454. getRepayList() {
  455. this.loading = true;
  456. this.repayment.status = "01";
  457. listRepayment(this.repayment).then((response) => {
  458. this.repaymentList = response.data.records;
  459. this.total2 = response.data.total;
  460. this.loading = false;
  461. });
  462. },
  463. /** 查询逾期列表 */
  464. getOverdueList() {
  465. this.loading = true;
  466. this.overdue.status = "02";
  467. listRepayment(this.overdue).then((response) => {
  468. this.overdueList = response.data.records;
  469. this.total3 = response.data.total;
  470. this.loading = false;
  471. });
  472. },
  473. /** 查询带还款金额 */
  474. getRepaymentAmount(){
  475. repaymentAmount(this.amountQueryParams).then((response)=>{
  476. this.amount = response.data;
  477. })
  478. },
  479. // 取消按钮
  480. cancel() {
  481. this.open = false;
  482. this.reset();
  483. },
  484. // 表单重置
  485. reset() {
  486. this.form = {};
  487. this.fileList = [];
  488. this.resetForm("form");
  489. },
  490. /** 搜索按钮操作 */
  491. handleQuery() {
  492. this.queryParams.pageNum = 1;
  493. this.getList();
  494. },
  495. secondQuery(){
  496. this.unRepayment.pageNum = 1;
  497. this.getUnpayList();
  498. },
  499. thirdQuery(){
  500. this.repayment.pageNum = 1;
  501. this.getRepayList();
  502. },
  503. fouthQuery(){
  504. this.overdue.pageNum = 1;
  505. this.getOverdueList();
  506. },
  507. /** 重置按钮操作 */
  508. resetQuery() {
  509. this.resetForm("queryForm");
  510. this.handleQuery();
  511. },
  512. resetSecondQuery() {
  513. this.resetForm("queryForm1");
  514. this.secondQuery();
  515. },
  516. resetThirdQuery() {
  517. this.resetForm("queryForm2");
  518. this.thirdQuery();
  519. },
  520. resetFouthQuery() {
  521. this.resetForm("queryForm3");
  522. this.fouthQuery();
  523. },
  524. change(val){
  525. this.amountQueryParams.day = val;
  526. repaymentAmount(this.amountQueryParams).then((response)=>{
  527. this.amount = response.data;
  528. })
  529. },
  530. // 多选框选中数据
  531. handleSelectionChange(selection) {
  532. /* this.ids = selection.map(item => item.ptcId)
  533. this.single = selection.length!==1
  534. this.multiple = !selection.length */
  535. },
  536. /** 详情按钮操作 */
  537. handleInfo(row) {
  538. const zfrId = row.zfrId;
  539. this.resetQuery();
  540. Cookies.set("/repayment/detailRepayment/"+zfrId+"/", this.$route.fullPath);
  541. this.$router.push({path:"/repayment/detailRepayment/"+zfrId+"/"});
  542. },
  543. /** 下载按钮操作 */
  544. handleDown(row) {
  545. var zfrId = row.zfrId;
  546. const loading = this.$loading({
  547. lock: true,
  548. text: 'Loading',
  549. spinner: 'el-icon-loading',
  550. background: 'rgba(0, 0, 0, 0.7)'
  551. });
  552. this.download('sc-service/repayment/export/'+zfrId, {
  553. }, `还款明细.docx`);
  554. setTimeout(() => {
  555. loading.close();
  556. this.create = false;
  557. this.end = true;
  558. this.active = 1;
  559. }, 3000);
  560. },
  561. //上传附件
  562. handleUp(row){
  563. this.reset();
  564. this.form.zfrId = row.zfrId || this.ids;
  565. this.showBtnImg = true;
  566. this.noneBtnImg = this.fileList.length >= this.limitCountImg;
  567. debugger
  568. this.open = true;
  569. this.title = "还款登记";
  570. },
  571. //上传前校验
  572. beforeAvatarUpload(file) {
  573. const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
  574. const isLt2M = file.size / 1024 / 1024 < 2;
  575. if (!isJPG) {
  576. this.$message.error('上传图片只能是 JPG/PNG 格式');
  577. }
  578. if (!isLt2M) {
  579. this.$message.error('上传图片大小不能超过 2MB');
  580. }
  581. return isJPG && isLt2M;
  582. },
  583. //还款状态字典反显
  584. applyStatusFormat(row, column) {
  585. return this.selectDictLabel(
  586. this.applyStatusOptions,
  587. row.zfrApplyStatus
  588. );
  589. },
  590. //获取当前客户是否之前设置过列展示隐藏
  591. columnQuery() {
  592. //获取页面路径
  593. var psfPagePath = window.location.pathname; //用请求后台的url作为唯一标识
  594. var psfTableName = this.tableId;
  595. var columnForm = {};
  596. columnForm.psfPagePath = psfPagePath;
  597. columnForm.psfTableName = psfTableName;
  598. columnQuery(columnForm).then((response) => {
  599. if (response.data && response.data.psfShowData) {
  600. this.checkList = response.data.psfShowData;
  601. }
  602. this.filter();
  603. });
  604. }, //控制隐藏显示的函数
  605. filter(checkList) {
  606. if (!!checkList) {
  607. this.checkList = checkList;
  608. }
  609. columnfilter(this.selfDom);
  610. },
  611. /** 上传图片 */
  612. submitUpload(){
  613. this.$refs.upload.submit();
  614. },
  615. //文件移除提示
  616. handleRemove(file, fileList) {
  617. console.log(file)
  618. for(let i = 0;i< this.fileList.length;i++){
  619. if(file.uid == this.fileList[i].uid){
  620. this.fileList.splice(i, 1);
  621. break;
  622. }
  623. }
  624. this.noneBtnImg = fileList.length >= this.limitCountImg;
  625. //return this.$confirm(`确定移除 ${ file.name }?`);
  626. },
  627. dealImgChange(file, fileList){
  628. this.noneBtnImg = fileList.length >= this.limitCountImg;
  629. },
  630. handleExceed(files, fileList) {
  631. this.$message.warning(`当前限制选择 1 个文件`);
  632. },
  633. handlePictureCardPreview(file) {
  634. this.dialogImageUrl = file.url;
  635. this.dialogVisible = true;
  636. },
  637. //手动上传文件触发
  638. httpRequest(param) {
  639. let fileObj = param.file // 相当于input里取得的files
  640. let fd = new FormData()// FormData 对象
  641. fd.append('file', fileObj)// 文件对象
  642. fd.append('fileType','00')//文件类型
  643. const loading = this.$loading({
  644. lock: true,
  645. text: 'Loading',
  646. spinner: 'el-icon-loading',
  647. background: 'rgba(0, 0, 0, 0.7)'
  648. });
  649. uploadFileNew(fd).then(response => {
  650. if(response){
  651. // this.form.eeiImgUrl = response.url
  652. this.fileList.push({uid : response.fileId,url:response.url+'/'+getToken()})
  653. console.log(response.url)
  654. setTimeout(() => {
  655. loading.close();
  656. }, 2000);
  657. }
  658. }).catch(response => {
  659. loading.close();
  660. })
  661. },
  662. /** 提交按钮 */
  663. submitForm() {
  664. this.$refs["form"].validate(valid => {
  665. if (valid) {
  666. if (this.form.zfrId != null) {
  667. this.form.zfrApplyFile = this.fileList;
  668. RepaymentRegistration(this.form).then(response => {
  669. this.msgSuccess("登记成功");
  670. this.open = false;
  671. this.getList();
  672. });
  673. }
  674. }
  675. });
  676. },
  677. /** 导出按钮操作 */
  678. handleExport() {
  679. const loading = this.$loading({
  680. lock: true,
  681. text: 'Loading',
  682. spinner: 'el-icon-loading',
  683. background: 'rgba(0, 0, 0, 0.7)'
  684. });
  685. this.download('sc-service/repayment/export', {
  686. ...this.queryParams
  687. }, `待还款列表.xls`);
  688. setTimeout(() => {
  689. loading.close();
  690. this.create = false;
  691. this.end = true;
  692. this.active = 1;
  693. }, 3000);
  694. },
  695. },
  696. };
  697. </script>
  698. <style>
  699. .showUoload .el-upload--picture-card {
  700. width: 110px;
  701. height: 110px;
  702. line-height: 110px;
  703. }
  704. .uoloadSty .el-upload--picture-card {
  705. display: none;
  706. }
  707. </style>