goFinance.vue 28 KB

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