financeRecord.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  1. <template>
  2. <el-tabs type="border-card">
  3. <!-- 全部table页 -->
  4. <el-tab-pane label="全部">
  5. <el-card class="fiche">
  6. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
  7. <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
  8. <div style="float: right;margin-right:1%">
  9. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  10. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" style="float: ;">重置</el-button>
  11. </div>
  12. <hr style="margin-top: 16px;">
  13. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  14. <el-form-item label="融资编号" prop="zfrNumber">
  15. <el-input
  16. v-model="queryParams.zfrNumber"
  17. placeholder="请输入融资编号"
  18. clearable
  19. size="small"
  20. @keyup.enter.native="handleQuery"
  21. />
  22. </el-form-item>
  23. </el-form>
  24. </el-card>
  25. <el-row :gutter="10" class="mb8">
  26. <el-col :span="1.5">
  27. <el-button
  28. type="primary"
  29. icon="el-icon-plus"
  30. size="mini"
  31. @click="handleAdd"
  32. v-hasPermi="['finance:record:add']"
  33. >申请融资</el-button>
  34. </el-col>
  35. </el-row>
  36. <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
  37. <el-table-column label="序号" type="index" width="50" align="center">
  38. <template slot-scope="scope">
  39. <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
  40. </template>
  41. </el-table-column>
  42. <el-table-column label="融信编号" align="center" prop="zfiNumner" />
  43. <el-table-column label="融资编号" align="center" prop="zfrNumber" />
  44. <el-table-column label="开立方" align="center" prop="coreScyName" />
  45. <el-table-column label="融资金额" align="center" prop="zfrAmount" />
  46. <el-table-column label="融资利率" align="center" prop="zfrRate" />
  47. <el-table-column label="经办人" align="center" prop="zfrHandler" />
  48. <el-table-column label="承诺还款时间" align="center" prop="zfrRepaymentDate" width="180"/>
  49. <el-table-column label="融资申请日期" align="center" prop="zfrApplyDate" width="180"/>
  50. <el-table-column label="融资放款日期" align="center" prop="zfrLoanDate" width="180"/>
  51. <el-table-column label="融资状态" align="center" prop="zfrStatus" />
  52. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  53. <template slot-scope="scope">
  54. <el-button
  55. size="mini"
  56. type="text"
  57. icon="el-icon-edit"
  58. @click="handleDetail(scope.row)"
  59. v-hasPermi="['finance:record:query']"
  60. >详情</el-button>
  61. <el-button
  62. size="mini"
  63. type="text"
  64. icon="el-icon-delete"
  65. @click="handleDelete(scope.row)"
  66. v-hasPermi="['sc-service:record:remove']"
  67. >删除</el-button>
  68. </template>
  69. </el-table-column>
  70. </el-table>
  71. <pagination
  72. v-show="total>0"
  73. :total="total"
  74. :page.sync="queryParams.pageNum"
  75. :limit.sync="queryParams.pageSize"
  76. @pagination="getList"
  77. />
  78. </el-tab-pane>
  79. <!-- 融资中table页 -->
  80. <el-tab-pane label="融资中">
  81. <el-card class="fiche">
  82. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
  83. <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
  84. <div style="float: right;margin-right:1%">
  85. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQueryIng">搜索</el-button>
  86. <el-button icon="el-icon-refresh" size="mini" @click="resetQueryIng" style="float: ;">重置</el-button>
  87. </div>
  88. <hr style="margin-top: 16px;">
  89. <el-form :model="queryParamsIng" ref="queryFormIng" :inline="true" v-show="showSearch" label-width="68px">
  90. <el-form-item label="融资编号" prop="zfrNumber">
  91. <el-input
  92. v-model="queryParamsIng.zfrNumber"
  93. placeholder="请输入融资编号"
  94. clearable
  95. size="small"
  96. @keyup.enter.native="handleQueryIng"
  97. />
  98. </el-form-item>
  99. </el-form>
  100. </el-card>
  101. <el-row :gutter="10" class="mb8">
  102. <el-col :span="1.5">
  103. <el-button
  104. type="primary"
  105. icon="el-icon-plus"
  106. size="mini"
  107. @click="handleAdd"
  108. v-hasPermi="['finance:record:add']"
  109. >申请融资</el-button>
  110. </el-col>
  111. </el-row>
  112. <el-table v-loading="loadingIng" :data="recordIngList" @selection-change="handleSelectionChangeIng">
  113. <el-table-column label="序号" type="index" width="50" align="center">
  114. <template slot-scope="scope">
  115. <span>{{(queryParamsIng.pageNum - 1) * queryParamsIng.pageSize + scope.$index + 1}}</span>
  116. </template>
  117. </el-table-column>
  118. <el-table-column label="融信编号" align="center" prop="zfiNumner" />
  119. <el-table-column label="融资编号" align="center" prop="zfrNumber" />
  120. <el-table-column label="开立方" align="center" prop="coreScyName" />
  121. <el-table-column label="融资金额" align="center" prop="zfrAmount" />
  122. <el-table-column label="融资利率" align="center" prop="zfrRate" />
  123. <el-table-column label="经办人" align="center" prop="zfrHandler" />
  124. <el-table-column label="承诺还款时间" align="center" prop="zfrRepaymentDate" width="180"/>
  125. <el-table-column label="融资申请日期" align="center" prop="zfrApplyDate" width="180"/>
  126. <el-table-column label="融资放款日期" align="center" prop="zfrLoanDate" width="180"/>
  127. <el-table-column label="融资状态" align="center" prop="zfrStatus" />
  128. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  129. <template slot-scope="scope">
  130. <el-button
  131. size="mini"
  132. type="text"
  133. icon="el-icon-edit"
  134. @click="handleUpdate(scope.row)"
  135. v-hasPermi="['sc-service:record:edit']"
  136. >修改</el-button>
  137. <el-button
  138. size="mini"
  139. type="text"
  140. icon="el-icon-delete"
  141. @click="handleDelete(scope.row)"
  142. v-hasPermi="['sc-service:record:remove']"
  143. >删除</el-button>
  144. </template>
  145. </el-table-column>
  146. </el-table>
  147. <pagination
  148. v-show="totalIng>0"
  149. :total="totalIng"
  150. :page.sync="queryParamsIng.pageNum"
  151. :limit.sync="queryParamsIng.pageSize"
  152. @pagination="getList"
  153. />
  154. </el-tab-pane>
  155. <!-- 已放款table页 -->
  156. <el-tab-pane label="已放款">
  157. <el-card class="fiche">
  158. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
  159. <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
  160. <div style="float: right;margin-right:1%">
  161. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQueryEnd">搜索</el-button>
  162. <el-button icon="el-icon-refresh" size="mini" @click="resetQueryEnd" style="float: ;">重置</el-button>
  163. </div>
  164. <hr style="margin-top: 16px;">
  165. <el-form :model="queryParamsEnd" ref="queryFormEnd" :inline="true" v-show="showSearch" label-width="68px">
  166. <el-form-item label="融资编号" prop="zfrNumber">
  167. <el-input
  168. v-model="queryParamsEnd.zfrNumber"
  169. placeholder="请输入融资编号"
  170. clearable
  171. size="small"
  172. @keyup.enter.native="handleQueryEnd"
  173. />
  174. </el-form-item>
  175. </el-form>
  176. </el-card>
  177. <el-row :gutter="10" class="mb8">
  178. <el-col :span="1.5">
  179. <el-button
  180. type="primary"
  181. icon="el-icon-plus"
  182. size="mini"
  183. @click="handleAdd"
  184. v-hasPermi="['finance:record:add']"
  185. >申请融资</el-button>
  186. </el-col>
  187. </el-row>
  188. <el-table v-loading="loadingEnd" :data="recordEndList" @selection-change="handleSelectionChange">
  189. <el-table-column label="序号" type="index" width="50" align="center">
  190. <template slot-scope="scope">
  191. <span>{{(queryParamsEnd.pageNum - 1) * queryParamsEnd.pageSize + scope.$index + 1}}</span>
  192. </template>
  193. </el-table-column>
  194. <el-table-column label="融信编号" align="center" prop="zfiNumner" />
  195. <el-table-column label="融资编号" align="center" prop="zfrNumber" />
  196. <el-table-column label="开立方" align="center" prop="coreScyName" />
  197. <el-table-column label="融资金额" align="center" prop="zfrAmount" />
  198. <el-table-column label="融资利率" align="center" prop="zfrRate" />
  199. <el-table-column label="经办人" align="center" prop="zfrHandler" />
  200. <el-table-column label="承诺还款时间" align="center" prop="zfrRepaymentDate" width="180"/>
  201. <el-table-column label="融资申请日期" align="center" prop="zfrApplyDate" width="180"/>
  202. <el-table-column label="融资放款日期" align="center" prop="zfrLoanDate" width="180"/>
  203. <el-table-column label="融资状态" align="center" prop="zfrStatus" />
  204. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  205. <template slot-scope="scope">
  206. <el-button
  207. size="mini"
  208. type="text"
  209. icon="el-icon-edit"
  210. @click="handleUpdate(scope.row)"
  211. v-hasPermi="['sc-service:record:edit']"
  212. >修改</el-button>
  213. <el-button
  214. size="mini"
  215. type="text"
  216. icon="el-icon-delete"
  217. @click="handleDelete(scope.row)"
  218. v-hasPermi="['sc-service:record:remove']"
  219. >删除</el-button>
  220. </template>
  221. </el-table-column>
  222. </el-table>
  223. <pagination
  224. v-show="totalEnd>0"
  225. :total="totalEnd"
  226. :page.sync="queryParamsEnd.pageNum"
  227. :limit.sync="queryParamsEnd.pageSize"
  228. @pagination="getList"
  229. />
  230. </el-tab-pane>
  231. <!-- 融资失败table页 -->
  232. <el-tab-pane label="融资失败">
  233. <el-card class="fiche">
  234. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
  235. <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
  236. <div style="float: right;margin-right:1%">
  237. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQueryLose">搜索</el-button>
  238. <el-button icon="el-icon-refresh" size="mini" @click="resetQueryLose" style="float: ;">重置</el-button>
  239. </div>
  240. <hr style="margin-top: 16px;">
  241. <el-form :model="queryParamsLose" ref="queryFormLose" :inline="true" v-show="showSearch" label-width="68px">
  242. <el-form-item label="融资编号" prop="zfrNumber">
  243. <el-input
  244. v-model="queryParamsLose.zfrNumber"
  245. placeholder="请输入融资编号"
  246. clearable
  247. size="small"
  248. @keyup.enter.native="handleQueryLose"
  249. />
  250. </el-form-item>
  251. </el-form>
  252. </el-card>
  253. <el-row :gutter="10" class="mb8">
  254. <el-col :span="1.5">
  255. <el-button
  256. type="primary"
  257. icon="el-icon-plus"
  258. size="mini"
  259. @click="handleAdd"
  260. v-hasPermi="['finance:record:add']"
  261. >申请融资</el-button>
  262. </el-col>
  263. </el-row>
  264. <el-table v-loading="loadingLose" :data="recordLoseList" @selection-change="handleSelectionChange">
  265. <el-table-column label="序号" type="index" width="50" align="center">
  266. <template slot-scope="scope">
  267. <span>{{(queryParamsLose.pageNum - 1) * queryParamsLose.pageSize + scope.$index + 1}}</span>
  268. </template>
  269. </el-table-column>
  270. <el-table-column label="融信编号" align="center" prop="zfiNumner" />
  271. <el-table-column label="融资编号" align="center" prop="zfrNumber" />
  272. <el-table-column label="开立方" align="center" prop="coreScyName" />
  273. <el-table-column label="融资金额" align="center" prop="zfrAmount" />
  274. <el-table-column label="融资利率" align="center" prop="zfrRate" />
  275. <el-table-column label="经办人" align="center" prop="zfrHandler" />
  276. <el-table-column label="承诺还款时间" align="center" prop="zfrRepaymentDate" width="180"/>
  277. <el-table-column label="融资申请日期" align="center" prop="zfrApplyDate" width="180"/>
  278. <el-table-column label="融资放款日期" align="center" prop="zfrLoanDate" width="180"/>
  279. <el-table-column label="融资状态" align="center" prop="zfrStatus" />
  280. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  281. <template slot-scope="scope">
  282. <el-button
  283. size="mini"
  284. type="text"
  285. icon="el-icon-edit"
  286. @click="handleDetail(scope.row)"
  287. v-hasPermi="['finance:record:query']"
  288. >详情</el-button>
  289. <el-button
  290. size="mini"
  291. type="text"
  292. icon="el-icon-delete"
  293. @click="handleDelete(scope.row)"
  294. v-hasPermi="['sc-service:record:remove']"
  295. >删除</el-button>
  296. </template>
  297. </el-table-column>
  298. </el-table>
  299. <pagination
  300. v-show="totalLose>0"
  301. :total="totalLose"
  302. :page.sync="queryParamsLose.pageNum"
  303. :limit.sync="queryParamsLose.pageSize"
  304. @pagination="getList"
  305. />
  306. </el-tab-pane>
  307. <!-- 添加或修改融资记录对话框 -->
  308. <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
  309. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  310. <el-form-item label="融信ID(zc_finance_inf.zfi_id)" prop="zfrFinanceId">
  311. <el-input v-model="form.zfrFinanceId" placeholder="请输入融信ID(zc_finance_inf.zfi_id)" />
  312. </el-form-item>
  313. <el-form-item label="融资编号" prop="zfrNumber">
  314. <el-input v-model="form.zfrNumber" placeholder="请输入融资编号" />
  315. </el-form-item>
  316. <el-form-item label="融资金额" prop="zfrAmount">
  317. <el-input v-model="form.zfrAmount" placeholder="请输入融资金额" />
  318. </el-form-item>
  319. <el-form-item label="融资利率" prop="zfrRate">
  320. <el-input v-model="form.zfrRate" placeholder="请输入融资利率" />
  321. </el-form-item>
  322. <el-form-item label="经办人" prop="zfrHandler">
  323. <el-input v-model="form.zfrHandler" placeholder="请输入经办人" />
  324. </el-form-item>
  325. <el-form-item label="承诺还款时间" prop="zfrRepaymentDate">
  326. <el-date-picker clearable size="small"
  327. v-model="form.zfrRepaymentDate"
  328. type="date"
  329. value-format="yyyy-MM-dd"
  330. placeholder="选择承诺还款时间">
  331. </el-date-picker>
  332. </el-form-item>
  333. <el-form-item label="融资申请日期" prop="zfrApplyDate">
  334. <el-date-picker clearable size="small"
  335. v-model="form.zfrApplyDate"
  336. type="date"
  337. value-format="yyyy-MM-dd"
  338. placeholder="选择融资申请日期">
  339. </el-date-picker>
  340. </el-form-item>
  341. <el-form-item label="融资放款日期" prop="zfrLoanDate">
  342. <el-date-picker clearable size="small"
  343. v-model="form.zfrLoanDate"
  344. type="date"
  345. value-format="yyyy-MM-dd"
  346. placeholder="选择融资放款日期">
  347. </el-date-picker>
  348. </el-form-item>
  349. <el-form-item label="已还款金额" prop="zfrApplyAmount">
  350. <el-input v-model="form.zfrApplyAmount" placeholder="请输入已还款金额" />
  351. </el-form-item>
  352. <el-form-item label="还款方式(0:线下, 1:线上)" prop="zfrApplyType">
  353. <el-select v-model="form.zfrApplyType" placeholder="请选择还款方式(0:线下, 1:线上)">
  354. <el-option label="请选择字典生成" value="" />
  355. </el-select>
  356. </el-form-item>
  357. <el-form-item label="状态">
  358. <el-radio-group v-model="form.zfrStatus">
  359. <el-radio label="1">请选择字典生成</el-radio>
  360. </el-radio-group>
  361. </el-form-item>
  362. <el-form-item label="审批状态(00:审核中 01:审批退回)" prop="zfrApproveStt">
  363. <el-input v-model="form.zfrApproveStt" placeholder="请输入审批状态(00:审核中 01:审批退回)" />
  364. </el-form-item>
  365. </el-form>
  366. <div slot="footer" class="dialog-footer">
  367. <el-button type="primary" @click="submitForm">确 定</el-button>
  368. <el-button @click="cancel">取 消</el-button>
  369. </div>
  370. </el-dialog>
  371. </el-tabs>
  372. </template>
  373. <script>
  374. import { listRecord, getRecord, delRecord, addRecord, updateRecord } from "@/api/service/financeRecord/record";
  375. import Cookies from 'js-cookie'
  376. export default {
  377. name: "finaceRecord",
  378. components: {
  379. },
  380. data() {
  381. return {
  382. // 遮罩层
  383. loading: true,
  384. loadingIng: true,
  385. loadingEnd: true,
  386. loadingLose: true,
  387. // 选中数组
  388. ids: [],
  389. // 非单个禁用
  390. single: true,
  391. // 非多个禁用
  392. multiple: true,
  393. // 显示搜索条件
  394. showSearch: true,
  395. // 总条数
  396. total: 0,
  397. totalIng: 0,
  398. totalEnd: 0,
  399. totalLose: 0,
  400. // 全部融资记录表格数据
  401. recordList: [],
  402. // 融资中融资记录表格数据
  403. recordIngList: [],
  404. // 已放款融资记录表格数据
  405. recordEndList: [],
  406. // 融资失败融资记录表格数据
  407. recordLoseList: [],
  408. // 弹出层标题
  409. title: "",
  410. // 是否显示弹出层
  411. open: false,
  412. // 查询参数
  413. queryParams: {
  414. pageNum: 1,
  415. pageSize: 10,
  416. zfrFinanceId: null,
  417. zfrNumber: null,
  418. zfrAmount: null,
  419. zfrRate: null,
  420. zfrHandler: null,
  421. zfrRepaymentDate: null,
  422. zfrApplyDate: null,
  423. zfrLoanDate: null,
  424. zfrApplyAmount: null,
  425. zfrApplyType: null,
  426. zfrStatus: null,
  427. zfrApproveStt: null,
  428. },
  429. queryParamsIng: {
  430. pageNum: 1,
  431. pageSize: 10,
  432. zfrFinanceId: null,
  433. zfrNumber: null,
  434. zfrAmount: null,
  435. zfrRate: null,
  436. zfrHandler: null,
  437. zfrRepaymentDate: null,
  438. zfrApplyDate: null,
  439. zfrLoanDate: null,
  440. zfrApplyAmount: null,
  441. zfrApplyType: null,
  442. zfrStatus: null,
  443. zfrApproveStt: null,
  444. },
  445. queryParamsEnd: {
  446. pageNum: 1,
  447. pageSize: 10,
  448. zfrFinanceId: null,
  449. zfrNumber: null,
  450. zfrAmount: null,
  451. zfrRate: null,
  452. zfrHandler: null,
  453. zfrRepaymentDate: null,
  454. zfrApplyDate: null,
  455. zfrLoanDate: null,
  456. zfrApplyAmount: null,
  457. zfrApplyType: null,
  458. zfrStatus: null,
  459. zfrApproveStt: null,
  460. },
  461. queryParamsLose: {
  462. pageNum: 1,
  463. pageSize: 10,
  464. zfrFinanceId: null,
  465. zfrNumber: null,
  466. zfrAmount: null,
  467. zfrRate: null,
  468. zfrHandler: null,
  469. zfrRepaymentDate: null,
  470. zfrApplyDate: null,
  471. zfrLoanDate: null,
  472. zfrApplyAmount: null,
  473. zfrApplyType: null,
  474. zfrStatus: null,
  475. zfrApproveStt: null,
  476. },
  477. // 表单参数
  478. form: {},
  479. // 表单校验
  480. rules: {
  481. zfrFinanceId: [
  482. { required: true, message: "融信ID(zc_finance_inf.zfi_id)不能为空", trigger: "blur" }
  483. ],
  484. zfrAmount: [
  485. { required: true, message: "融资金额不能为空", trigger: "blur" }
  486. ],
  487. zfrRate: [
  488. { required: true, message: "融资利率不能为空", trigger: "blur" }
  489. ],
  490. zfrHandler: [
  491. { required: true, message: "经办人不能为空", trigger: "blur" }
  492. ],
  493. zfrStatus: [
  494. { required: true, message: "状态不能为空", trigger: "blur" }
  495. ],
  496. }
  497. };
  498. },
  499. created() {
  500. this.getList();
  501. this.getIngList();
  502. this.getEndList();
  503. this.getLoseList();
  504. },
  505. methods: {
  506. /** 查询全部融资记录列表 */
  507. getList() {
  508. this.loading = true;
  509. listRecord(this.queryParams).then(response => {
  510. debugger
  511. this.recordList = response.data.records;
  512. this.total = response.data.total;
  513. this.loading = false;
  514. });
  515. },
  516. /** 查询融资中融资记录列表 */
  517. getIngList() {
  518. this.loadingIng = true;
  519. this.queryParamsIng.zfrStatus = '00';
  520. listRecord(this.queryParamsIng).then(response => {
  521. this.recordIngList = response.data.records;
  522. this.totalIng = response.data.total;
  523. this.loadingIng = false;
  524. });
  525. },
  526. /** 查询已放款融资记录列表 */
  527. getEndList() {
  528. this.loadingEnd = true;
  529. this.queryParamsEnd.zfrStatus = '01';
  530. listRecord(this.queryParamsEnd).then(response => {
  531. this.recordEndList = response.data.records;
  532. this.totalIng = response.data.total;
  533. this.loadingEnd = false;
  534. });
  535. },
  536. /** 查询融资失败融资记录列表 */
  537. getLoseList() {
  538. this.loadingLose = true;
  539. this.queryParamsLose.zfrStatus = '02';
  540. listRecord(this.queryParamsLose).then(response => {
  541. this.recordLoseList = response.data.records;
  542. this.totalEnd = response.data.total;
  543. this.loadingLose = false;
  544. });
  545. },
  546. // 取消按钮
  547. cancel() {
  548. this.open = false;
  549. this.reset();
  550. },
  551. // 表单重置
  552. reset() {
  553. this.form = {
  554. zfrId: null,
  555. zfrFinanceId: null,
  556. zfrNumber: null,
  557. zfrAmount: null,
  558. zfrRate: null,
  559. zfrHandler: null,
  560. zfrRepaymentDate: null,
  561. zfrApplyDate: null,
  562. zfrLoanDate: null,
  563. zfrApplyAmount: null,
  564. zfrApplyType: null,
  565. zfrStatus: "0",
  566. zfrApproveStt: null,
  567. zfrProfitSpare1: null,
  568. zfrProfitSpare2: null,
  569. zfrProfitSpare3: null,
  570. zfrProfitSpare4: null,
  571. zfrProfitSpare5: null,
  572. zfrProfitSpare6: null,
  573. zfrProfitSpare7: null,
  574. zfrProfitSpare8: null,
  575. zfrProfitSpare9: null,
  576. createBy: null,
  577. createTime: null,
  578. updateBy: null,
  579. updateTime: null
  580. };
  581. this.resetForm("form");
  582. },
  583. /** 全部搜索按钮操作 */
  584. handleQuery() {
  585. this.queryParams.pageNum = 1;
  586. this.getList();
  587. },
  588. /** 全部重置按钮操作 */
  589. resetQuery() {
  590. this.resetForm("queryForm");
  591. this.handleQuery();
  592. },
  593. /** 融资中搜索按钮操作 */
  594. handleQueryIng() {
  595. this.queryParamsIng.pageNum = 1;
  596. this.getList();
  597. },
  598. /**融资中重置按钮操作 */
  599. resetQueryIng() {
  600. this.resetForm("queryFormIng");
  601. this.handleQueryIng();
  602. },
  603. /** 已放款搜索按钮操作 */
  604. handleQueryEnd() {
  605. this.queryParamsEnd.pageNum = 1;
  606. this.getList();
  607. },
  608. /**已放款重置按钮操作 */
  609. resetQueryEnd() {
  610. this.resetForm("queryFormEnd");
  611. this.handleQueryEnd();
  612. },
  613. /** 融资失败搜索按钮操作 */
  614. handleQueryLose() {
  615. this.queryParamsLose.pageNum = 1;
  616. this.getList();
  617. },
  618. /*融资失败重置按钮操作 */
  619. resetQueryLose() {
  620. this.resetForm("queryFormLose");
  621. this.handleQueryLose();
  622. },
  623. //全部 多选框选中数据
  624. handleSelectionChange(selection) {
  625. this.ids = selection.map(item => item.zfrId)
  626. this.single = selection.length!==1
  627. this.multiple = !selection.length
  628. },
  629. // 融资中多选框选中数据
  630. handleSelectionChangeIng(selection) {
  631. this.ids = selection.map(item => item.zfrId)
  632. this.single = selection.length!==1
  633. this.multiple = !selection.length
  634. },
  635. /** 新增按钮操作 */
  636. handleAdd() {
  637. Cookies.set("/financeRecord/addFinanceRecord/", this.$route.fullPath)
  638. this.$router.push("/financeRecord/addFinanceRecord/");
  639. // this.reset();
  640. // this.open = true;
  641. // this.title = "添加融资记录";
  642. },
  643. /** 修改按钮操作 */
  644. handleUpdate(row) {
  645. this.reset();
  646. const zfrId = row.zfrId || this.ids
  647. getRecord(zfrId).then(response => {
  648. this.form = response.data;
  649. this.open = true;
  650. this.title = "修改融资记录";
  651. });
  652. },
  653. handleDetail(row){
  654. this.reset();
  655. const zfrId = row.zfrId || this.ids
  656. Cookies.set("/financeRecord/detailFinanceRecord/" + zfrId, this.$route.fullPath)
  657. this.$router.push("/financeRecord/detailFinanceRecord/" + zfrId);
  658. },
  659. /** 提交按钮 */
  660. submitForm() {
  661. this.$refs["form"].validate(valid => {
  662. if (valid) {
  663. if (this.form.zfrId != null) {
  664. updateRecord(this.form).then(response => {
  665. this.msgSuccess("修改成功");
  666. this.open = false;
  667. this.getList();
  668. });
  669. } else {
  670. addRecord(this.form).then(response => {
  671. this.msgSuccess("新增成功");
  672. this.open = false;
  673. this.getList();
  674. });
  675. }
  676. }
  677. });
  678. },
  679. /** 删除按钮操作 */
  680. handleDelete(row) {
  681. const zfrIds = row.zfrId || this.ids;
  682. this.$confirm('是否确认删除融资记录编号为"' + zfrIds + '"的数据项?', "警告", {
  683. confirmButtonText: "确定",
  684. cancelButtonText: "取消",
  685. type: "warning"
  686. }).then(function() {
  687. return delRecord(zfrIds);
  688. }).then(() => {
  689. this.getList();
  690. this.msgSuccess("删除成功");
  691. })
  692. },
  693. /** 导出按钮操作 */
  694. handleExport() {
  695. this.download('sc-service/record/export', {
  696. ...this.queryParams
  697. }, `sc-service_record.xlsx`)
  698. }
  699. }
  700. };
  701. </script>