detailFinanceRecord.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939
  1. <template>
  2. <div class="app-container zap-main">
  3. <!-- 添加或修改融资记录对话框 -->
  4. <div class="zap-No">
  5. <el-row type="flex" align="middle" :gutter="10">
  6. <el-col :span="8">
  7. <el-row type="flex" align="middle">
  8. <img class="icon" src="../../../assets/images/icon_contract_no.png" alt />
  9. <span class="label">融资编号</span>
  10. <span class="value">{{number}}</span>
  11. </el-row>
  12. </el-col>
  13. <el-col :span="8">
  14. <el-row type="flex" align="middle">
  15. <img class="icon" src="../../../assets/images/icon_calendar.png" alt />
  16. <span class="label">创建时间</span>
  17. <span class="value">{{time}}</span>
  18. </el-row>
  19. </el-col>
  20. <el-col :span="8">
  21. <el-row type="flex" align="middle">
  22. <img class="icon" src="../../../assets/images/icon_person.png" alt />
  23. <span class="label">创建人</span>
  24. <span class="value">{{user}}</span>
  25. </el-row>
  26. </el-col>
  27. </el-row>
  28. </div>
  29. <el-form
  30. class="zap-form"
  31. ref="form"
  32. :model="form"
  33. :inline="true"
  34. :rules="rules"
  35. label-width="auto"
  36. >
  37. <div class="contain">
  38. <p>资方拒绝放款:
  39. </p>
  40. <p>
  41. 原因:{{reason ? reason : "暂无"}};
  42. </p>
  43. <p>
  44. 注:本次融资申请已作废,请完善或达成相应融资条件后,再使用本融信发起融资;
  45. </p>
  46. </div>
  47. <div class="zap-title zap-margin-top">融资详情</div>
  48. <el-row class="zap-form" style="padding-bottom: 0;">
  49. <el-col :span="12">
  50. <el-form-item label="选择融信:" prop="zfrFinanceId" size="large">
  51. <el-select v-model="form.zfrFinanceId" clearable @clear="clearBoth" disabled>
  52. <el-option v-for="(item,index) in financeInfList" :key="index" :label="item.zfiNumber" :value="item.zfiId" @click.native="amount(item)"></el-option>
  53. </el-select>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="12">
  57. <el-form-item label="融资收款账户:" prop="zfrCollectionAccount" size="large" label-width="101px">
  58. <el-input v-model="form.zfrCollectionAccount" clearable placeholder="请输入融资账户" maxlength="25" readonly />
  59. </el-form-item>
  60. </el-col>
  61. </el-row>
  62. <el-row class="zap-form" style="padding-bottom: 0;">
  63. <el-col :span="12">
  64. <el-form-item label="融信金额:" prop="zfiAmount" size="large">
  65. <el-input v-model="form.zfiAmount" clearable placeholder="请输入融信金额" maxlength="25" readonly />
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="12">
  69. <el-form-item label="申请融资方:" prop="companyName" size="large">
  70. <el-input v-model="form.companyName" clearable placeholder="请输入申请融资方" maxlength="25" readonly />
  71. </el-form-item>
  72. </el-col>
  73. </el-row>
  74. <el-row class="zap-form" style="padding-bottom: 0;">
  75. <el-col :span="12">
  76. <el-form-item label="融资金额:" prop="zfrAmount" size="large">
  77. <el-input v-model="form.zfrAmount" clearable placeholder="请输入融资金额" maxlength="25" readonly />
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="12">
  81. <el-form-item label="融资利率:" prop="zfrRate" size="large">
  82. <el-input v-model="form.zfrRate" clearable placeholder="请输入融资利率" maxlength="25" readonly />
  83. </el-form-item>
  84. </el-col>
  85. </el-row>
  86. <el-row class="zap-form" style="padding-bottom: 0;">
  87. <el-col :span="12">
  88. <el-form-item label="承诺还款日期:" prop="zfrRepaymentDate" size="large" label-width="101px">
  89. <el-input v-model="form.zfrRepaymentDate" clearable placeholder="请输入承诺还款日期" maxlength="25" readonly />
  90. </el-form-item>
  91. </el-col>
  92. <el-col :span="12">
  93. <el-form-item label="服务费率:" prop="zfpcrChargeRate" size="large">
  94. <el-input v-model="form.zfpcrChargeRate" clearable placeholder="请输入服务费率" maxlength="25" readonly />
  95. </el-form-item>
  96. </el-col>
  97. </el-row>
  98. <el-row class="zap-form" style="padding-bottom: 0;">
  99. <el-col :span="12">
  100. <el-form-item label="预计融资成本:" prop="cost" size="large" label-width="101px" v-if="this.status != '01'">
  101. <el-input v-model="form.cost" clearable placeholder="请输入预计融资成本" maxlength="25" readonly />
  102. </el-form-item>
  103. </el-col>
  104. <el-col :span="12">
  105. <el-form-item label="预计融资期限:" prop="term" size="large" label-width="101px" v-if="this.status != '01'">
  106. <el-input v-model="form.term" clearable placeholder="请输入预计融资期限" maxlength="25" readonly />
  107. </el-form-item>
  108. </el-col>
  109. </el-row>
  110. <el-row class="zap-form" style="padding-bottom: 0;">
  111. <el-col :span="12">
  112. <el-form-item label="预计净融资额:" prop="amount" size="large" label-width="101px" v-if="this.status != '01'">
  113. <el-input v-model="form.amount" clearable placeholder="请输入预计净融资额" maxlength="25" readonly />
  114. </el-form-item>
  115. </el-col>
  116. <el-col :span="12">
  117. <el-form-item label="融资状态:" prop="zfrStatus" size="large" label-width="101px" v-if="this.status != '01'">
  118. <el-input v-model="form.zfrStatus" clearable placeholder="请输入融资状态" maxlength="25" readonly />
  119. </el-form-item>
  120. </el-col>
  121. </el-row>
  122. <el-row class="zap-form" style="padding-bottom: 0;">
  123. <el-col :span="12">
  124. <el-form-item label="融资成本:" prop="cost" size="large" label-width="101px" v-if="this.status == '01'">
  125. <el-input v-model="form.costIng" clearable placeholder="请输入融资成本" maxlength="25" readonly />
  126. </el-form-item>
  127. </el-col>
  128. <el-col :span="12">
  129. <el-form-item label="融资期限:" prop="term" size="large" label-width="101px" v-if="this.status == '01'">
  130. <el-input v-model="form.termIng" clearable placeholder="请输入融资期限" maxlength="25" readonly />
  131. </el-form-item>
  132. </el-col>
  133. </el-row>
  134. <el-row class="zap-form" style="padding-bottom: 0;">
  135. <el-col :span="12">
  136. <el-form-item label="净融资额:" prop="amount" size="large" label-width="101px" v-if="this.status == '01'">
  137. <el-input v-model="form.amountIng" clearable placeholder="请输入净融资额" maxlength="25" readonly />
  138. </el-form-item>
  139. </el-col>
  140. <el-col :span="12">
  141. <el-form-item label="融资状态:" prop="zfrStatus" size="large" label-width="101px" v-if="this.status == '01'">
  142. <el-select v-model="form.zfrStatus" placeholder="请选择状态" clearable>
  143. <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  144. </el-select>
  145. </el-form-item>
  146. </el-col>
  147. </el-row>
  148. <!-- <el-form-item label="融信编号" prop="zfrFinanceId" size="large">
  149. <el-select v-model="form.zfrFinanceId" clearable @clear="clearBoth" disabled>
  150. <el-option
  151. v-for="(item,index) in financeInfList"
  152. :key="index"
  153. :label="item.zfiNumber"
  154. :value="item.zfiId"
  155. @click.native="amount(item)"
  156. ></el-option>
  157. </el-select>
  158. </el-form-item>
  159. <el-form-item label="融资金额" prop="zfrAmount" size="large">
  160. <el-input v-model="form.zfrAmount" placeholder="请输入融资金额" readonly>
  161. <template slot="append">元</template>
  162. </el-input>
  163. </el-form-item>
  164. <el-form-item label="融资账户" prop="zfrCollectionAccount" size="large">
  165. <el-input v-model="form.zfrCollectionAccount" placeholder="请输入融资账户" disabled />
  166. </el-form-item>
  167. <el-form-item label="承诺还款日" prop="zfrRepaymentDate" size="large">
  168. <el-input v-model="form.zfrRepaymentDate" placeholder="请输入承诺还款日" disabled />
  169. </el-form-item>
  170. <el-form-item label="融资利率" prop="zfrRate" v-if="false" size="large">
  171. <el-input v-model="form.zfrRate" placeholder="请输入融资利率" disabled />
  172. </el-form-item>
  173. <el-form-item label="融资放款方式" prop="zfpcrLoantype" v-if="false" size="large">
  174. <el-input v-model="form.zfpcrLoantype" placeholder="请输入融资账户" disabled />
  175. </el-form-item>
  176. <el-form-item label="融资产品" prop="zfiProductId" v-if="false" size="large">
  177. <el-input v-model="form.zfiProductId" placeholder="请输入融资产品" disabled />
  178. </el-form-item> -->
  179. </el-form>
  180. <div class="zap-title">融信信息</div>
  181. <el-row class="zap-form">
  182. <el-col>
  183. <span style="font-size: 14px;color: #333333;">融信凭证</span>
  184. </el-col>
  185. <table class="gridtable" style="width:80%;text-align:center" align="center">
  186. <tr>
  187. <td rowspan="4">开立方</td>
  188. <td>全称</td>
  189. <td>{{openName}}</td>
  190. <td rowspan="4">接收方</td>
  191. <td>全称</td>
  192. <td>{{receiveName}}</td>
  193. </tr>
  194. <tr>
  195. <td>社会统一码</td>
  196. <td>{{openCode}}</td>
  197. <td>社会统一码</td>
  198. <td>{{receiverCode}}</td>
  199. </tr>
  200. <tr>
  201. <td>开户银行</td>
  202. <td>{{openBank}}</td>
  203. <td>开户银行</td>
  204. <td>{{receiverBank}}</td>
  205. </tr>
  206. <tr>
  207. <td>账号</td>
  208. <td>{{openAccount}}</td>
  209. <td>账号</td>
  210. <td>{{receiverAccount}}</td>
  211. </tr>
  212. <tr>
  213. <td colspan="2">粮信金额</td>
  214. <td colspan="4">人民币(大写):{{issuedAmount}}<br>人民币(小写)¥{{form.zfiAmount}}</td>
  215. </tr>
  216. <tr>
  217. <td colspan="2">起止日期</td>
  218. <td colspan="4">{{stopDate}}</td>
  219. </tr>
  220. </table>
  221. </el-row>
  222. <div class="zap-title zap-margin-top">资产信息</div>
  223. <el-row class="zap-form zap-padding-bottom">
  224. <el-row class="zap-accounts-receivable">
  225. <el-col>
  226. <el-row type="flex" align="middle" style="height: 36px;">
  227. <span class="label">金额大写:</span>
  228. <span class="value" style="margin-right: 40px;">{{ smallToBig(allAmount()) }}</span>
  229. <span class="label">消费金额:</span>
  230. <span class="value">{{ allAmount() }} 元</span>
  231. </el-row>
  232. </el-col>
  233. </el-row>
  234. <el-table :data="billInfList" stripe>
  235. <el-table-column label="序号" type="index" width="50" align="center">
  236. <template slot-scope="scope">
  237. <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
  238. </template>
  239. </el-table-column>
  240. <el-table-column label="编号" align="center" prop="zbiNumber" />
  241. <el-table-column label="账款名称" align="center" prop="zbiName" />
  242. <el-table-column label="应收企业" align="center" prop="payee" />
  243. <el-table-column label="应付企业" align="center" prop="payer" />
  244. <el-table-column label="还款时间" align="center" prop="zbiPayDate" />
  245. <el-table-column label="金额" align="center" prop="zbiAmount" />
  246. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
  247. <template slot-scope="scope">
  248. <el-button
  249. size="mini"
  250. type="text"
  251. icon="el-icon-view"
  252. @click="handleDetail(scope.$index, billInfList)"
  253. >详情</el-button>
  254. </template>
  255. </el-table-column>
  256. </el-table>
  257. </el-row>
  258. <!-- 发票附件 -->
  259. <!-- <div class="zap-title zap-margin-top">发票附件</div>
  260. <el-row class="zap-form zap-padding-bottom">
  261. <el-table :data="invoiceFileList" style="width: 100%" stripe>
  262. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  263. <el-table-column
  264. label="操作"
  265. align="center"
  266. class-name="small-padding fixed-width"
  267. width="300"
  268. fixed="right"
  269. >
  270. <template slot-scope="scope">
  271. <el-button
  272. size="mini"
  273. type="text"
  274. icon="el-icon-view"
  275. @click="handlePreview(scope.row)"
  276. >预览</el-button>
  277. </template>
  278. </el-table-column>
  279. </el-table>
  280. </el-row> -->
  281. <!-- 合同附件 -->
  282. <!-- <div class="zap-title zap-margin-top">合同附件</div>
  283. <el-row class="zap-form zap-padding-bottom">
  284. <el-table :data="contractFileList" border style="width: 100%">
  285. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  286. <el-table-column
  287. label="操作"
  288. align="center"
  289. class-name="small-padding fixed-width"
  290. width="300"
  291. fixed="right"
  292. >
  293. <template slot-scope="scope">
  294. <el-button
  295. size="mini"
  296. type="text"
  297. icon="el-icon-view"
  298. @click="handlePreview(scope.row)"
  299. >预览</el-button>
  300. </template>
  301. </el-table-column>
  302. </el-table>
  303. </el-row> -->
  304. <!-- 其他附件 -->
  305. <!-- <div class="zap-title zap-margin-top">其他附件</div>
  306. <el-row class="zap-form zap-padding-bottom">
  307. <el-table :data="otherFileList" border style="width: 100%">
  308. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  309. <el-table-column
  310. label="操作"
  311. align="center"
  312. class-name="small-padding fixed-width"
  313. width="300"
  314. fixed="right"
  315. >
  316. <template slot-scope="scope">
  317. <el-button
  318. size="mini"
  319. type="text"
  320. icon="el-icon-view"
  321. @click="handlePreview(scope.row)"
  322. >预览</el-button>
  323. </template>
  324. </el-table-column>
  325. </el-table>
  326. </el-row> -->
  327. <div class="zap-title zap-margin-top">盖章附件</div>
  328. <el-row>
  329. <img
  330. style="width:50px;height:50px;"
  331. :key="dict.pfiFileId"
  332. src="../../../assets/images/pdf.png"
  333. v-for="dict in recordSealList"
  334. @click="handlePreview(dict)"
  335. :title="dict.pfiFileName"
  336. />
  337. </el-row>
  338. <el-row type="flex" align="middle" justify="center" style="height: 77px;">
  339. <el-button type="primary" plain @click="cancel">取消</el-button>
  340. <!-- <el-button type="success" @click="submitForm"
  341. >提交</el-button>-->
  342. </el-row>
  343. <!-- 附件详情 -->
  344. <el-dialog title="详情" :visible.sync="openDetailBill" width="1120px" append-to-body>
  345. <detail-bill :zbiId="this.zbiId" v-if="openDetailBill"></detail-bill>
  346. </el-dialog>
  347. <!--预览-->
  348. <el-dialog :visible.sync="openFile" width="900px" append-to-body>
  349. <img :src="wordUrl" v-if="show" width="800px" height="500px" />
  350. <iframe :src="wordUrl" width="800px" height="500px" frameborder="1" v-if="heid" />
  351. </el-dialog>
  352. </div>
  353. </template>
  354. <script>
  355. import {
  356. getRecord,
  357. listBillInf,
  358. listAccInf,
  359. getRecordSealFile
  360. } from "@/api/service/financeRecord/record";
  361. import { listFinanceInf } from "@/api/common/financeInf";
  362. import { getFile } from "@/api/service/credit/credit";
  363. import { getToken } from "@/utils/auth";
  364. import { getUserProfile } from "@/api/system/user";
  365. import {getCreditDetail} from "@/api/service/credit/credit";
  366. import DetailBill from "@/views/service/credit/billDetail";
  367. export default {
  368. name: "financeRecord",
  369. components: {DetailBill},
  370. data() {
  371. return {
  372. //往来账款id
  373. zbiId: '',
  374. //融资状态
  375. status: "",
  376. //融资编号
  377. number: "",
  378. //创建时间
  379. time: "",
  380. //创建人
  381. user: "",
  382. // 遮罩层
  383. loading: true,
  384. // 选中数组
  385. ids: [],
  386. // 非单个禁用
  387. single: true,
  388. // 非多个禁用
  389. multiple: true,
  390. // 显示搜索条件
  391. showSearch: true,
  392. // 总条数
  393. total: 0,
  394. // 全部融资记录表格数据
  395. recordList: [],
  396. //融信编号数据
  397. financeInfList: [],
  398. //应收账款
  399. billInfList: [],
  400. //合同附件
  401. contractFileList: [],
  402. //发票附件
  403. invoiceFileList: [],
  404. //其他文件
  405. otherFileList: [],
  406. //盖章文件
  407. recordSealList: [],
  408. //开立方
  409. openName:"",
  410. //开立社会码
  411. openCode:"",
  412. //开立银行
  413. openBank:"",
  414. //开立账户
  415. openAccount:"",
  416. //接收方
  417. receiveName:"",
  418. //接收方社会统一码
  419. receiverCode:"",
  420. //接收方银行
  421. receiverBank:"",
  422. //接收方账户
  423. receiverAccount:"",
  424. //起止日期
  425. stopDate:"",
  426. //签发金额大写
  427. issuedAmount: "零元整",
  428. //拒绝放款原因
  429. reason: "暂无",
  430. // 弹出层标题
  431. title: "",
  432. // 是否显示弹出层
  433. open: false,
  434. openDetailBill: false,
  435. //融资状态数据字典
  436. statusOptions: [],
  437. // 查询参数
  438. queryParams: {
  439. pageNum: 1,
  440. pageSize: 10,
  441. zfrFinanceId: null,
  442. zfrNumber: null,
  443. zfrAmount: null,
  444. zfrRate: null,
  445. zfrHandler: null,
  446. zfrRepaymentDate: null,
  447. zfrApplyDate: null,
  448. zfrLoanDate: null,
  449. zfrApplyAmount: null,
  450. zfrApplyType: null,
  451. zfrStatus: null,
  452. zfrApproveStt: null,
  453. zfpcrLoantype: null,
  454. zfiProductId: null
  455. },
  456. // 表单参数
  457. form: {},
  458. // 表单校验
  459. rules: {
  460. zfrFinanceId: [
  461. { required: true, message: "融信编号不能为空", trigger: "blur" }
  462. ],
  463. zfrAmount: [
  464. { required: true, message: "融资金额不能为空", trigger: "blur" }
  465. ]
  466. },
  467. openFile: false,
  468. wordUrl: "",
  469. show: false,
  470. heid: false
  471. };
  472. },
  473. created() {
  474. this.getDicts("ser_zfr_status").then(response => {
  475. this.statusOptions = response.data;
  476. });
  477. const zfrId = this.$route.params && this.$route.params.zfrId;
  478. getRecord(zfrId).then(response => {
  479. debugger
  480. this.number = response.data.zfrNumber;
  481. this.status = response.data.zfrStatus;
  482. this.reason = response.data.zfrReason;
  483. this.time = this.parseTime(
  484. new Date(response.data.createTime),
  485. "{y}-{m}-{d} {h}:{m}:{s}"
  486. );
  487. this.user = response.data.createUser;
  488. const zfrFinanceId = response.data.zfrFinanceId;
  489. this.form.zfrFinanceId = response.data.zfrFinanceId;
  490. this.form.zfrStatus = response.data.zfrStatus;
  491. listFinanceInf(zfrFinanceId).then(response => {
  492. if (response.data) {
  493. this.financeInfList = response.data;
  494. for (let item of this.financeInfList) {
  495. if (item.zfiId == zfrFinanceId) {
  496. this.amount(item);
  497. }
  498. }
  499. }
  500. });
  501. listBillInf(zfrFinanceId)
  502. .then(response => {
  503. this.billInfList = response.data;
  504. this.loading = false;
  505. })
  506. .then(() => {
  507. var queryParamsFile = {};
  508. queryParamsFile.ticketList = this.billInfList;
  509. getFile(queryParamsFile).then(response => {
  510. if (response.data) {
  511. //获取发票文件
  512. this.invoiceFileList = response.data.invoiceFileList;
  513. //获取合同文件
  514. this.contractFileList = response.data.contractFileList;
  515. //获取其他文件
  516. this.otherFileList = response.data.otherFileList;
  517. }
  518. });
  519. })
  520. .then(() => {
  521. //this.form = response.data;
  522. // this.$set(
  523. // this.form,
  524. // "zfrRepaymentDate",
  525. // this.parseTime(
  526. // new Date(response.data.zfrRepaymentDate),
  527. // "{y}-{m}-{d}"
  528. // )
  529. // );
  530. this.getRecordSealFile();
  531. });
  532. });
  533. getUserProfile().then(response => {
  534. if(response.company){
  535. this.$set(this.form, "companyName", response.company.scyName);
  536. }
  537. });
  538. // this.getFinanceInf();
  539. },
  540. methods: {
  541. /** 查询融信编号 */
  542. getFinanceInf() {
  543. this.loading = true;
  544. listFinanceInf().then(response => {
  545. this.financeInfList = response.data;
  546. this.loading = false;
  547. });
  548. },
  549. // 取消按钮
  550. cancel() {
  551. this.reset();
  552. this.$store.dispatch("tagsView/delView", this.$route);
  553. this.$router.go(-1);
  554. this.open = false;
  555. },
  556. // 表单重置
  557. reset() {
  558. this.form = {
  559. zfrId: null,
  560. zfrFinanceId: null,
  561. zfrNumber: null,
  562. zfrAmount: null,
  563. zfrRate: null,
  564. zfrHandler: null,
  565. zfrRepaymentDate: null,
  566. zfrApplyDate: null,
  567. zfrLoanDate: null,
  568. zfrApplyAmount: null,
  569. zfrApplyType: null,
  570. zfrStatus: "00",
  571. zfrApproveStt: null,
  572. zfrProfitSpare1: null,
  573. zfrProfitSpare2: null,
  574. zfrProfitSpare3: null,
  575. zfrProfitSpare4: null,
  576. zfrProfitSpare5: null,
  577. zfrProfitSpare6: null,
  578. zfrProfitSpare7: null,
  579. zfrProfitSpare8: null,
  580. zfrProfitSpare9: null,
  581. createBy: null,
  582. createTime: null,
  583. updateBy: null,
  584. updateTime: null
  585. };
  586. this.resetForm("form");
  587. },
  588. /** 全部搜索按钮操作 */
  589. handleQuery() {
  590. this.queryParams.pageNum = 1;
  591. this.getList();
  592. },
  593. /** 全部重置按钮操作 */
  594. resetQuery() {
  595. this.resetForm("queryForm");
  596. this.handleQuery();
  597. },
  598. //全部 多选框选中数据
  599. handleSelectionChange(selection) {
  600. this.ids = selection.map(item => item.zfrId);
  601. this.single = selection.length !== 1;
  602. this.multiple = !selection.length;
  603. },
  604. /* 融信编号赋值融资金额 */
  605. amount(item) {
  606. debugger
  607. this.$set(this.form, "zfrAmount", item.zfiAmount);
  608. this.$set(this.form, "zfiAmount", item.zfiAmount);
  609. this.$set(this.form, "zfrRepaymentDate", item.zfiExpireDate);
  610. this.$set(this.form, "zfrRate", item.zfpcrRate);
  611. this.$set(this.form, "zfpcrLoanType", item.zfpcrLoanType);
  612. this.$set(this.form, "zfiProductId", item.zfiProductId);
  613. this.$set(this.form, "zfpcrChargeRate", item.zfpcrChargeRate);
  614. this.$set(this.form, "cost", item.cost);
  615. this.$set(this.form, "term", item.term);
  616. this.$set(this.form, "amountIng", item.amountIng);
  617. this.$set(this.form, "costIng", item.costIng);
  618. this.$set(this.form, "termIng", item.termIng);
  619. this.$set(this.form, "amountIng", item.amountIng);
  620. if (item.zfiId) {
  621. this.loading = true;
  622. listBillInf(item.zfiId)
  623. .then(response => {
  624. this.billInfList = response.data;
  625. this.loading = false;
  626. })
  627. .then(() => {
  628. var queryParamsFile = {};
  629. queryParamsFile.ticketList = this.billInfList;
  630. getFile(queryParamsFile).then(response => {
  631. if (response.data) {
  632. //获取发票文件
  633. this.invoiceFileList = response.data.invoiceFileList;
  634. //获取合同文件
  635. this.contractFileList = response.data.contractFileList;
  636. //获取其他文件
  637. this.otherFileList = response.data.otherFileList;
  638. }
  639. });
  640. if (item.zfpcrLoanType == "0") {
  641. listAccInf(item.zfiProductId).then(response => {
  642. this.$set(this.form, "zfrCollectionAccount", response.msg);
  643. });
  644. }
  645. });
  646. getCreditDetail(item.zfiId).then((response) => {
  647. debugger
  648. if(response.data){
  649. //签发金额大写
  650. this.issuedAmount = this.smallToBig(response.data.financeInf.zfiAmount);
  651. //给表格赋值
  652. this.openName = response.data.openName;
  653. this.openCode = response.data.openCode;
  654. this.openBank = response.data.openBank;
  655. this.openAccount = response.data.openAccount;
  656. this.receiveName = response.data.receiveName;
  657. this.receiverCode = response.data.receiverCode;
  658. this.receiverBank = response.data.receiverBank;
  659. this.receiverAccount = response.data.receiverAccount;
  660. this.stopDate = response.data.stopDate;
  661. this.zfiRate = response.data.financeInf.zfiRate;
  662. }
  663. })
  664. }
  665. },
  666. //详情按钮
  667. handleDetail(index, rows){
  668. this.zbiId = rows[index].zbiId
  669. this.openDetailBill = true
  670. },
  671. /** 提交按钮 */
  672. submitForm() {
  673. this.$refs["form"].validate(valid => {
  674. if (valid) {
  675. const loading = this.$loading({
  676. lock: true,
  677. text: "Loading",
  678. spinner: "el-icon-loading",
  679. background: "rgba(0, 0, 0, 0.7)"
  680. });
  681. addRecord(this.form)
  682. .then(response => {
  683. this.msgSuccess("新增成功");
  684. loading.close();
  685. this.$store.dispatch("tagsView/delView", this.$route);
  686. this.$router.go(-1);
  687. })
  688. .catch(response => {
  689. loading.close();
  690. });
  691. }
  692. });
  693. },
  694. /* 清空 */
  695. clearBoth() {
  696. this.form.zfrAmount = "";
  697. this.form, (zfrRepaymentDate = "");
  698. this.form.zfrRate = "";
  699. this.form.zfpcrLoantype = "";
  700. this.billInfList = [];
  701. this.contractFileList = [];
  702. this.invoiceFileList = [];
  703. this.otherFileList = [];
  704. },
  705. //预览
  706. handlePreview(row) {
  707. const pfiUrl = row.pfiUrl;
  708. const pfiFileName = row.pfiFileName;
  709. if (row.pfiUrl) {
  710. console.log(pfiFileName.substr(-3));
  711. if (pfiFileName.substr(-3) == "pdf") {
  712. this.wordUrl = pfiUrl + "/" + getToken();
  713. this.show = false;
  714. this.heid = true;
  715. } else if (
  716. pfiFileName.substr(-3) == "jpg" ||
  717. pfiFileName.substr(-3) == "png" ||
  718. pfiFileName.substr(-3) == "JPG" ||
  719. pfiFileName.substr(-3) == "PNG" ||
  720. pfiFileName.substr(-4) == "jpeg" ||
  721. pfiFileName.substr(-3) == "JPEG"
  722. ) {
  723. this.wordUrl = pfiUrl + "/" + getToken();
  724. this.show = true;
  725. this.heid = false;
  726. console.log("====>", this.wordUrl);
  727. } else if (
  728. pfiFileName.substr(-3) == "doc" ||
  729. pfiFileName.substr(-3) == "DOC" ||
  730. pfiFileName.substr(-4) == "docx" ||
  731. pfiFileName.substr(-3) == "DOCX"
  732. ) {
  733. this.wordUrl =
  734. "https://view.officeapps.live.com/op/view.aspx?src=" +
  735. pfiUrl +
  736. "/" +
  737. getToken() +
  738. "/" +
  739. pfiFileName;
  740. this.show = false;
  741. this.heid = true;
  742. console.log("====>", this.wordUrl);
  743. } else {
  744. this.$message({
  745. message: "暂不支持该类型文件预览",
  746. type: "warning"
  747. });
  748. return;
  749. }
  750. }
  751. this.openFile = true;
  752. },
  753. //获取盖章文件
  754. getRecordSealFile() {
  755. getRecordSealFile(this.form).then(response => {
  756. debugger;
  757. if (response.data.list) {
  758. this.recordSealList = response.data.list;
  759. }
  760. });
  761. },
  762. //应收账款合计
  763. allAmount() {
  764. var strarr = [0.0];
  765. for (let i in this.billInfList) {
  766. strarr.push(this.billInfList[i]["zbiAmount"]);
  767. }
  768. return Math.floor(eval(strarr.join("+")) * 100) / 100; //结果
  769. },
  770. /* // 将数字金额转换为大写金额 */
  771. smallToBig(money) {
  772. // 将数字金额转换为大写金额
  773. var cnNums = new Array(
  774. "零",
  775. "壹",
  776. "贰",
  777. "叁",
  778. "肆",
  779. "伍",
  780. "陆",
  781. "柒",
  782. "捌",
  783. "玖"
  784. ); //汉字的数字
  785. var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
  786. var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
  787. var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
  788. var cnInteger = "整"; //整数金额时后面跟的字符
  789. var cnIntLast = "元"; //整数完以后的单位
  790. //最大处理的数字
  791. var maxNum = 999999999999999.9999;
  792. var integerNum; //金额整数部分
  793. var decimalNum; //金额小数部分
  794. //输出的中文金额字符串
  795. var chineseStr = "";
  796. var parts; //分离金额后用的数组,预定义
  797. if (money == "" || money == null || money == undefined) {
  798. return "零元零角零分";
  799. }
  800. money = parseFloat(money);
  801. if (money >= maxNum) {
  802. //超出最大处理数字
  803. return "超出最大处理数字";
  804. }
  805. if (money == 0) {
  806. chineseStr = cnNums[0] + cnIntLast + cnInteger;
  807. return chineseStr;
  808. }
  809. //四舍五入保留两位小数,转换为字符串
  810. money = Math.round(money * 100).toString();
  811. integerNum = money.substr(0, money.length - 2);
  812. decimalNum = money.substr(money.length - 2);
  813. //获取整型部分转换
  814. if (parseInt(integerNum, 10) > 0) {
  815. var zeroCount = 0;
  816. var IntLen = integerNum.length;
  817. for (var i = 0; i < IntLen; i++) {
  818. var n = integerNum.substr(i, 1);
  819. var p = IntLen - i - 1;
  820. var q = p / 4;
  821. var m = p % 4;
  822. if (n == "0") {
  823. zeroCount++;
  824. } else {
  825. if (zeroCount > 0) {
  826. chineseStr += cnNums[0];
  827. }
  828. //归零
  829. zeroCount = 0;
  830. chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
  831. }
  832. if (m == 0 && zeroCount < 4) {
  833. chineseStr += cnIntUnits[q];
  834. }
  835. }
  836. chineseStr += cnIntLast;
  837. }
  838. //小数部分
  839. if (decimalNum != "") {
  840. var decLen = decimalNum.length;
  841. for (var i = 0; i < decLen; i++) {
  842. var n = decimalNum.substr(i, 1);
  843. if (n != "0") {
  844. chineseStr += cnNums[Number(n)] + cnDecUnits[i];
  845. }
  846. }
  847. }
  848. if (chineseStr == "") {
  849. chineseStr += cnNums[0] + cnIntLast + cnInteger;
  850. } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
  851. chineseStr += cnInteger;
  852. }
  853. return chineseStr;
  854. },
  855. /** 导出按钮操作 */
  856. handleExport() {
  857. this.download(
  858. "sc-service/record/export",
  859. {
  860. ...this.queryParams
  861. },
  862. `sc-service_record.xlsx`
  863. );
  864. }
  865. }
  866. };
  867. </script>
  868. <style lang="scss" scoped>
  869. .zap-No {
  870. padding: 14px 25px;
  871. background-color: #ffffff;
  872. .icon {
  873. width: 18px;
  874. margin-right: 10px;
  875. }
  876. .label {
  877. white-space: nowrap;
  878. margin-right: 8px;
  879. font-size: 14px;
  880. color: #999999;
  881. }
  882. .value {
  883. font-size: 14px;
  884. color: #333333;
  885. }
  886. }
  887. .zap-title {
  888. padding: 25px;
  889. font-size: 16px;
  890. color: #333333;
  891. background-color: #ffffff;
  892. }
  893. .zap-form {
  894. padding: 0 25px;
  895. background-color: #ffffff;
  896. }
  897. .zap-table ::v-deep .el-form-item__content {
  898. width: 100%;
  899. }
  900. .zap-accounts-receivable {
  901. height: 36px;
  902. .label {
  903. font-size: 12px;
  904. color: #999999;
  905. }
  906. .value {
  907. font-size: 14px;
  908. color: #333333;
  909. }
  910. }
  911. </style>
  912. <style type="text/css">
  913. table.gridtable {
  914. font-size:11px;
  915. color:#333333;
  916. border-width: 1px;
  917. border-collapse: collapse;
  918. }
  919. table.gridtable th {
  920. border-width: 1px;
  921. padding: 8px;
  922. border-style: solid;
  923. background-color: #dedede;
  924. }
  925. table.gridtable td {
  926. border-width: 1px;
  927. padding: 8px;
  928. border-style: solid;
  929. }
  930. </style>