detailFinanceRecord.vue 29 KB

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