addFinanceRecord.vue 32 KB

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