goFinance.vue 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660
  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
  17. v-model="form.zfrFinanceId"
  18. clearable
  19. @clear="clearBoth"
  20. :disabled="true"
  21. >
  22. <el-option
  23. v-for="(item, index) in financeInfList"
  24. :key="index"
  25. :label="item.zfiNumber"
  26. :value="item.zfiId"
  27. @click.native="amount(item)"
  28. disabled
  29. ></el-option>
  30. </el-select>
  31. </el-form-item>
  32. </el-col>
  33. <el-col :span="12">
  34. <el-form-item
  35. label="融资收款账户:"
  36. prop="zfrCollectionAccount"
  37. size="large"
  38. label-width="101px"
  39. >
  40. <el-input
  41. v-model="form.zfrCollectionAccount"
  42. clearable
  43. placeholder="请输入融资账户"
  44. maxlength="25"
  45. :readonly="onlyRead"
  46. />
  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="zfiAmount" size="large">
  53. <el-input
  54. v-model="form.zfiAmount"
  55. clearable
  56. placeholder="请输入融信金额"
  57. maxlength="25"
  58. readonly
  59. >
  60. <template slot="append">元</template>
  61. </el-input>
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="12">
  65. <el-form-item label="申请融资方:" prop="companyName" size="large">
  66. <el-input
  67. v-model="form.companyName"
  68. clearable
  69. placeholder="请输入申请融资方"
  70. maxlength="25"
  71. readonly
  72. />
  73. </el-form-item>
  74. </el-col>
  75. </el-row>
  76. <el-row class="zap-form" style="padding-bottom: 0">
  77. <el-col :span="12">
  78. <el-form-item label="融资金额:" prop="zfrAmount" size="large">
  79. <el-input
  80. v-model="form.zfrAmount"
  81. clearable
  82. placeholder="请输入融资金额"
  83. maxlength="25"
  84. readonly
  85. >
  86. <template slot="append">元</template>
  87. </el-input>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="12">
  91. <el-form-item label="融资利率:" prop="zfrRate" size="large">
  92. <el-input
  93. v-model="form.zfrRate"
  94. clearable
  95. placeholder="请输入融资利率"
  96. maxlength="25"
  97. readonly
  98. >
  99. <template slot="append">%</template>
  100. </el-input>
  101. </el-form-item>
  102. </el-col>
  103. </el-row>
  104. <el-row class="zap-form" style="padding-bottom: 0">
  105. <el-col :span="12">
  106. <el-form-item
  107. label="承诺还款日期:"
  108. prop="zfrRepaymentDate"
  109. size="large"
  110. label-width="101px"
  111. >
  112. <el-input
  113. v-model="form.zfrRepaymentDate"
  114. clearable
  115. placeholder="请输入承诺还款日期"
  116. maxlength="25"
  117. readonly
  118. />
  119. </el-form-item>
  120. </el-col>
  121. <el-col :span="12">
  122. <el-form-item label="服务费率:" prop="zfpcrChargeRate" size="large">
  123. <el-input
  124. v-model="form.zfpcrChargeRate"
  125. clearable
  126. placeholder="请输入服务费率"
  127. maxlength="25"
  128. readonly
  129. >
  130. <template slot="append">%</template>
  131. </el-input>
  132. </el-form-item>
  133. </el-col>
  134. </el-row>
  135. <el-row class="zap-form" style="padding-bottom: 0">
  136. <el-col :span="12">
  137. <el-form-item
  138. label="预计融资成本:"
  139. prop="cost"
  140. size="large"
  141. label-width="101px"
  142. >
  143. <el-input
  144. v-model="form.cost"
  145. clearable
  146. placeholder="请输入预计融资成本"
  147. maxlength="25"
  148. readonly
  149. >
  150. <template slot="append">元</template>
  151. </el-input>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="12">
  155. <el-form-item
  156. label="预计融资期限:"
  157. prop="term"
  158. size="large"
  159. label-width="101px"
  160. >
  161. <el-input
  162. v-model="form.term"
  163. clearable
  164. placeholder="请输入预计融资期限"
  165. maxlength="25"
  166. readonly
  167. >
  168. <template slot="append">天</template>
  169. </el-input>
  170. </el-form-item>
  171. </el-col>
  172. </el-row>
  173. <el-row class="zap-form" style="padding-bottom: 0">
  174. <el-col :span="12">
  175. <el-form-item
  176. label="预计净融资额:"
  177. prop="amount"
  178. size="large"
  179. label-width="101px"
  180. >
  181. <el-input
  182. v-model="form.amount"
  183. clearable
  184. placeholder="请输入预计净融资额"
  185. maxlength="25"
  186. readonly
  187. >
  188. <template slot="append">元</template>
  189. </el-input>
  190. </el-form-item>
  191. </el-col>
  192. </el-row>
  193. <div class="contain">
  194. <p>说明:</p>
  195. <p>1. 因银行结算原因,资金到账可能会在申请日期后2-5工作日;</p>
  196. <p>
  197. 2.
  198. 申请融资时,预计融资成本、预计融资期限、预计净融资额,由申请日期单日开始计算;准确数值以银行实际放款日期为准;
  199. </p>
  200. <p>
  201. 3.
  202. 因填写融资收款账户错误,或其他原因导致银行无法正常放款,款项将汇入备用收款账户,可在电子账户管理查看;
  203. </p>
  204. <p>4. 服务费缴纳与退还要求,可详细阅读《融信产品使用协议》</p>
  205. </div>
  206. </el-form>
  207. <div class="zap-title">融信信息</div>
  208. <el-row class="zap-form">
  209. <el-col>
  210. <span style="font-size: 14px; color: #333333">融信凭证</span>
  211. </el-col>
  212. <table
  213. class="gridtable"
  214. style="width: 80%; text-align: center"
  215. align="center"
  216. >
  217. <tr>
  218. <td rowspan="4">开立方</td>
  219. <td>全称</td>
  220. <td>{{ openName }}</td>
  221. <td rowspan="4">接收方</td>
  222. <td>全称</td>
  223. <td>{{ receiveName }}</td>
  224. </tr>
  225. <tr>
  226. <td>社会统一码</td>
  227. <td>{{ openCode }}</td>
  228. <td>社会统一码</td>
  229. <td>{{ receiverCode }}</td>
  230. </tr>
  231. <tr>
  232. <td>开户银行</td>
  233. <td>{{ openBank }}</td>
  234. <td>开户银行</td>
  235. <td>{{ receiverBank }}</td>
  236. </tr>
  237. <tr>
  238. <td>账号</td>
  239. <td>{{ openAccount }}</td>
  240. <td>账号</td>
  241. <td>{{ receiverAccount }}</td>
  242. </tr>
  243. <tr>
  244. <td colspan="2">粮信金额</td>
  245. <td colspan="4">
  246. 人民币(大写):{{ issuedAmount }}<br />人民币(小写)¥{{
  247. amtFormat(form.zfiAmount)
  248. }}
  249. </td>
  250. </tr>
  251. <tr>
  252. <td colspan="2">起止日期</td>
  253. <td colspan="4">{{ stopDate }}</td>
  254. </tr>
  255. </table>
  256. </el-row>
  257. <div class="zap-title zap-margin-top">资产信息</div>
  258. <el-row class="zap-form zap-padding-bottom">
  259. <el-row class="zap-accounts-receivable">
  260. <el-col>
  261. <el-row type="flex" align="middle" style="height: 36px">
  262. <span class="label">金额大写:</span>
  263. <span class="value" style="margin-right: 40px">{{
  264. smallToBig(allAmount())
  265. }}</span>
  266. <span class="label">消费金额:</span>
  267. <span class="value">{{ amtFormat(allAmount()) }} 元</span>
  268. </el-row>
  269. </el-col>
  270. </el-row>
  271. <el-table :data="billInfList" stripe>
  272. <el-table-column label="序号" type="index" width="50" align="center">
  273. <template slot-scope="scope">
  274. <span>{{
  275. (queryParams.pageNum - 1) * queryParams.pageSize +
  276. scope.$index +
  277. 1
  278. }}</span>
  279. </template>
  280. </el-table-column>
  281. <el-table-column label="编号" align="center" prop="zbiNumber" />
  282. <el-table-column label="账款名称" align="center" prop="zbiName" />
  283. <el-table-column label="应收企业" align="center" prop="payee" />
  284. <el-table-column label="应付企业" align="center" prop="payer" />
  285. <el-table-column label="还款时间" align="center" prop="zbiPayDate" />
  286. <el-table-column label="金额" align="center" prop="zbiAmount" />
  287. <el-table-column
  288. label="操作"
  289. align="center"
  290. class-name="small-padding fixed-width"
  291. width="250"
  292. >
  293. <template slot-scope="scope">
  294. <el-button
  295. size="mini"
  296. type="text"
  297. icon="el-icon-view"
  298. @click="handleDetail(scope.$index, billInfList)"
  299. >详情</el-button
  300. >
  301. </template>
  302. </el-table-column>
  303. </el-table>
  304. </el-row>
  305. <!-- 签署合同 -->
  306. <el-row class="zap-margin-top zap-form">
  307. <div class="zap-title">签署合同</div>
  308. <el-table :data="creditSealList" style="width: 100%">
  309. <el-table-column
  310. label="文件名称"
  311. align="center"
  312. prop="pfiFileName"
  313. show-overflow-tooltip
  314. >
  315. <template slot-scope="scope">
  316. <img
  317. style="width: 30px; height: 30px"
  318. src="../../../assets/images/pdf.png"
  319. />
  320. <span>{{ scope.row.pfiFileName }} </span>
  321. </template>
  322. </el-table-column>
  323. <el-table-column
  324. label="操作"
  325. align="center"
  326. class-name="small-padding fixed-width"
  327. width="300"
  328. fixed="right"
  329. >
  330. <template slot-scope="scope">
  331. <el-button
  332. size="mini"
  333. type="text"
  334. icon="el-icon-view"
  335. @click="handleDownload(scope.row)"
  336. >下载</el-button
  337. >
  338. <el-button
  339. size="mini"
  340. type="text"
  341. icon="el-icon-view"
  342. @click="handlePreview(scope.row)"
  343. >预览</el-button
  344. >
  345. </template>
  346. </el-table-column>
  347. </el-table>
  348. </el-row>
  349. <!-- 发票附件 -->
  350. <!-- <div class="zap-title zap-margin-top">发票附件</div>
  351. <el-row class="zap-form">
  352. <el-table :data="invoiceFileList" style="width: 100%" stripe>
  353. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  354. <el-table-column
  355. label="操作"
  356. align="center"
  357. class-name="small-padding fixed-width"
  358. width="300"
  359. fixed="right"
  360. >
  361. <template slot-scope="scope">
  362. <el-button
  363. size="mini"
  364. type="text"
  365. icon="el-icon-view"
  366. @click="handleDownload(scope.row)"
  367. >下载</el-button>
  368. <el-button
  369. size="mini"
  370. type="text"
  371. icon="el-icon-view"
  372. @click="handlePreview(scope.row)"
  373. >预览</el-button>
  374. </template>
  375. </el-table-column>
  376. </el-table>
  377. </el-row> -->
  378. <!-- 合同附件 -->
  379. <!-- <div class="zap-title zap-margin-top">合同附件</div>
  380. <el-row class="zap-form">
  381. <el-table :data="contractFileList" style="width: 100%" stripe>
  382. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  383. <el-table-column
  384. label="操作"
  385. align="center"
  386. class-name="small-padding fixed-width"
  387. width="300"
  388. fixed="right"
  389. >
  390. <template slot-scope="scope">
  391. <el-button
  392. size="mini"
  393. type="text"
  394. icon="el-icon-view"
  395. @click="handleDownload(scope.row)"
  396. >下载</el-button>
  397. <el-button
  398. size="mini"
  399. type="text"
  400. icon="el-icon-view"
  401. @click="handlePreview(scope.row)"
  402. >预览</el-button>
  403. </template>
  404. </el-table-column>
  405. </el-table>
  406. </el-row> -->
  407. <!-- 其他附件 -->
  408. <!-- <div class="zap-title zap-margin-top">其他附件</div>
  409. <el-row class="zap-form">
  410. <el-table :data="otherFileList" style="width: 100%" stripe>
  411. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  412. <el-table-column
  413. label="操作"
  414. align="center"
  415. class-name="small-padding fixed-width"
  416. width="300"
  417. fixed="right"
  418. >
  419. <template slot-scope="scope">
  420. <el-button
  421. size="mini"
  422. type="text"
  423. icon="el-icon-view"
  424. @click="handleDownload(scope.row)"
  425. >下载</el-button>
  426. <el-button
  427. size="mini"
  428. type="text"
  429. icon="el-icon-view"
  430. @click="handlePreview(scope.row)"
  431. >预览</el-button>
  432. </template>
  433. </el-table-column>
  434. </el-table>
  435. </el-row> -->
  436. <el-row style="height: 109px" type="flex" align="middle" justify="center">
  437. <el-button type="primary" plain @click="cancel">取 消</el-button>
  438. <el-button type="primary" @click="submitForm" v-if="!zfrId"
  439. >确 定</el-button
  440. >
  441. </el-row>
  442. <!-- 附件详情 -->
  443. <el-dialog
  444. title="详情"
  445. :visible.sync="openDetailBill"
  446. width="1120px"
  447. append-to-body
  448. >
  449. <detail-bill :zbiId="this.zbiId" v-if="openDetailBill"></detail-bill>
  450. </el-dialog>
  451. <!--预览-->
  452. <el-dialog :visible.sync="openFile" width="900px" append-to-body>
  453. <img :src="wordUrl" v-if="show" width="800px" height="500px" />
  454. <iframe
  455. :src="wordUrl"
  456. width="800px"
  457. height="500px"
  458. frameborder="1"
  459. v-if="heid"
  460. />
  461. </el-dialog>
  462. <!-- 合同预览 -->
  463. <el-dialog title="预览" :visible.sync="pdfShowDialog" width="60%" append-to-body :show-close="pdfIsShow">
  464. <pdf-show
  465. :pdfFileList="pdfFileList"
  466. :zfiId="this.form.zfiId"
  467. :parent="parent"
  468. ></pdf-show>
  469. <span slot="footer" class="dialog-footer" style="float: right">
  470. <el-button type="primary" @click="selectType" v-if="pdfIsShow">签署</el-button>
  471. <el-button type="primary" plain="" @click="pdfShowDialog = false" v-if="pdfIsShow">取消</el-button>
  472. <el-button type="primary" @click="closePDF" v-if="!pdfIsShow">确定</el-button>
  473. </span>
  474. </el-dialog>
  475. <!--选择签署意愿类型-->
  476. <el-dialog
  477. :visible.sync="confirmIsShow"
  478. width="600px"
  479. append-to-body
  480. :before-close="cancelUpdate"
  481. center
  482. >
  483. <el-form
  484. ref="updateForm"
  485. :disabled="false"
  486. :model="updateForm"
  487. v-if="confirmIsShow"
  488. label-width="150px"
  489. class="demo-form-inline"
  490. :inline="true"
  491. >
  492. <el-radio-group v-model="updateForm.radio">
  493. <el-radio label="01">人脸</el-radio>
  494. <el-radio label="02">短信</el-radio>
  495. </el-radio-group>
  496. </el-form>
  497. <div slot="footer" class="dialog-footer">
  498. <el-button type="primary" @click="confirmSelect">确 定</el-button>
  499. <el-button @click="cancelUpdate">取 消</el-button>
  500. </div>
  501. </el-dialog>
  502. <!--盖章短信-->
  503. <el-dialog
  504. :visible.sync="messageIsShow"
  505. width="600px"
  506. append-to-body
  507. :before-close="cancelMessage"
  508. center
  509. >
  510. <el-form
  511. ref="messageForm"
  512. :disabled="false"
  513. :model="messageForm"
  514. v-if="messageIsShow"
  515. label-width="150px"
  516. class="demo-form-inline"
  517. :inline="true"
  518. @submit.native.prevent
  519. >
  520. <el-form-item label="验证码" prop="validCode">
  521. <el-input
  522. v-model="messageForm.validCode"
  523. style="width: 200px"
  524. maxlength="6"
  525. />
  526. </el-form-item>
  527. <el-form-item>
  528. <el-button :disabled="!showCode" type="success" @click="send">
  529. 点击获取验证码
  530. <span v-show="!showCode" class="count">{{ count }} s</span>
  531. </el-button>
  532. </el-form-item>
  533. </el-form>
  534. <div slot="footer" class="dialog-footer">
  535. <el-button type="primary" @click="checkCode">确定</el-button>
  536. <el-button @click="cancelMessage">取 消</el-button>
  537. </div>
  538. </el-dialog>
  539. <!--授权编号激活短信-->
  540. <el-dialog
  541. :visible.sync="messageIfShow"
  542. width="600px"
  543. append-to-body
  544. :before-close="cancelMessages"
  545. center
  546. >
  547. <el-divider content-position="left">cfca签章授权编号激活</el-divider>
  548. <el-form
  549. ref="messageForm"
  550. :disabled="false"
  551. :model="messagesForm"
  552. v-if="messageIfShow"
  553. label-width="150px"
  554. class="demo-form-inline"
  555. :inline="true"
  556. @submit.native.prevent
  557. >
  558. <el-form-item label="验证码" prop="validCode">
  559. <el-input
  560. v-model="messagesForm.validCode"
  561. style="width: 200px"
  562. maxlength="6"
  563. />
  564. </el-form-item>
  565. <el-form-item>
  566. <el-button :disabled="!showCodes" type="success" @click="proSend">
  567. 点击获取验证码
  568. <span v-show="!showCodes" class="count">{{ countCode }} s</span>
  569. </el-button>
  570. </el-form-item>
  571. </el-form>
  572. <div slot="footer" class="dialog-footer">
  573. <el-button type="primary" @click="checkProCode">确定</el-button>
  574. <el-button @click="cancelMessages">取 消</el-button>
  575. </div>
  576. </el-dialog>
  577. <!--人脸二维码-->
  578. <el-dialog
  579. :visible.sync="faceIsShow"
  580. width="500px"
  581. append-to-body
  582. :before-close="cancelFace"
  583. center
  584. >
  585. <img
  586. :src="'data:image/jpeg;base64,' + this.fileUrl"
  587. style="overflow: auto; width: 100%; height: 100%"
  588. />
  589. </el-dialog>
  590. </div>
  591. </template>
  592. <script>
  593. import {
  594. addRecord,
  595. listBillInf,
  596. listAccInf,
  597. getContractFile,
  598. getRecord,
  599. contractSigning,
  600. updateChargeStatus,
  601. listChargeStatus,
  602. cancelContract,
  603. listStamped
  604. } from "@/api/service/financeRecord/record";
  605. import { listFinanceInf } from "@/api/common/financeInf";
  606. import { getFile } from "@/api/service/credit/credit";
  607. import { getToken } from "@/utils/auth";
  608. import { getUserProfile } from "@/api/system/user";
  609. import { getCreditDetail } from "@/api/service/credit/credit";
  610. import DetailBill from "@/views/service/credit/billDetail";
  611. import { getCreditSealFile } from "@/api/service/credit/creditHandle";
  612. import { isOpenApproval } from "@/api/service/credit/approvalRelatedCredit";
  613. import { listCompanyHandler } from "@/api/common/companyHandler";
  614. import {
  615. sendMessage,
  616. checkCode,
  617. faceAuth,
  618. checkFaceAuth,
  619. } from "@/api/service/credit/message";
  620. import {
  621. cfcaProjectNo,
  622. projectSendMessage,
  623. checkProCode,
  624. } from "@/api/service/credit/cfcaProject";
  625. import { balance, transfer } from "@/api/bank/bankInterface";
  626. import pdfShow from "@/views/service/financeRecord/pdfShow";
  627. export default {
  628. name: "financeRecord",
  629. components: { DetailBill, pdfShow },
  630. data() {
  631. return {
  632. pdfIsShow: true,
  633. //往来账款id
  634. zbiId: "",
  635. //融资账户是够编辑
  636. onlyRead: false,
  637. labelPosition: "top",
  638. // 遮罩层
  639. loading: true,
  640. // 选中数组
  641. ids: [],
  642. // 非单个禁用
  643. single: true,
  644. // 非多个禁用
  645. multiple: true,
  646. // 显示搜索条件
  647. showSearch: true,
  648. // 总条数
  649. total: 0,
  650. // 全部融资记录表格数据
  651. recordList: [],
  652. //融信编号数据
  653. financeInfList: [],
  654. //应收账款
  655. billInfList: [],
  656. //合同附件
  657. contractFileList: [],
  658. //发票附件
  659. invoiceFileList: [],
  660. //其他文件
  661. otherFileList: [],
  662. //盖章文件
  663. creditSealList: [],
  664. //开立方
  665. openName: "",
  666. //开立社会码
  667. openCode: "",
  668. //开立银行
  669. openBank: "",
  670. //开立账户
  671. openAccount: "",
  672. //接收方
  673. receiveName: "",
  674. //接收方社会统一码
  675. receiverCode: "",
  676. //接收方银行
  677. receiverBank: "",
  678. //接收方账户
  679. receiverAccount: "",
  680. //起止日期
  681. stopDate: "",
  682. //签发金额大写
  683. issuedAmount: "零元整",
  684. // 弹出层标题
  685. title: "",
  686. // 是否显示弹出层
  687. open: false,
  688. openDetailBill: false,
  689. // 查询参数
  690. queryParams: {
  691. pageNum: 1,
  692. pageSize: 10,
  693. zfrFinanceId: null,
  694. zfrNumber: null,
  695. zfrAmount: null,
  696. zfrRate: null,
  697. zfrHandler: null,
  698. zfrRepaymentDate: null,
  699. zfrApplyDate: null,
  700. zfrLoanDate: null,
  701. zfrApplyAmount: null,
  702. zfrApplyType: null,
  703. zfrStatus: null,
  704. zfrApproveStt: null,
  705. zfpcrLoanType: null,
  706. zfiProductId: null,
  707. },
  708. queryParamsDown: {
  709. pfiFileUrl: null,
  710. },
  711. // 表单参数
  712. form: {},
  713. forms: {},
  714. openFile: false,
  715. wordUrl: "",
  716. show: false,
  717. heid: false,
  718. // 表单校验
  719. rules: {
  720. zfrFinanceId: [
  721. { required: true, message: "融信编号不能为空", trigger: "blur" },
  722. ],
  723. zfrAmount: [
  724. { required: true, message: "融资金额不能为空", trigger: "blur" },
  725. ],
  726. },
  727. //盖章预览
  728. parent: this,
  729. pdfShowDialog: false,
  730. pdfFileList: [],
  731. confirmIsShow: false,
  732. messageIsShow: false,
  733. messageIfShow: false,
  734. faceIsShow: false,
  735. fileUrl: "",
  736. //意愿
  737. updateForm: {},
  738. messageForm: {},
  739. messagesForm: {},
  740. count: "",
  741. timer: null,
  742. //授权编号激活短信验证码倒计时
  743. //项目编号
  744. projectCode: "",
  745. showCode: true,
  746. showCodes: true,
  747. countCode: "",
  748. timerCode: null,
  749. zfrId: null,
  750. };
  751. },
  752. created() {
  753. const zfiId = this.$route.params && this.$route.params.zfiId;
  754. this.$set(this.form, "zfrFinanceId", zfiId);
  755. this.getFinanceInf(zfiId);
  756. this.getUserProfile();
  757. },
  758. methods: {
  759. //格式化金额
  760. amtFormat(cellValue) {
  761. if (cellValue == null || cellValue == undefined || cellValue == "") {
  762. cellValue = "0.00";
  763. }
  764. cellValue += "";
  765. if (!cellValue.includes(".")) {
  766. cellValue += ".00";
  767. }
  768. console.log(cellValue);
  769. return cellValue
  770. .replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
  771. return $1 + ",";
  772. })
  773. .replace(/\.$/, "");
  774. },
  775. /** 查询融信编号 */
  776. getFinanceInf(zfrFinanceId) {
  777. this.loading = true;
  778. listFinanceInf(zfrFinanceId).then((response) => {
  779. if (response.data) {
  780. this.financeInfList = response.data;
  781. for (let item of this.financeInfList) {
  782. if (item.zfiId == zfrFinanceId) {
  783. this.amount(item);
  784. }
  785. }
  786. this.loading = false;
  787. }
  788. });
  789. },
  790. getUserProfile() {
  791. getUserProfile().then((response) => {
  792. if (response.company) {
  793. this.$set(this.form, "companyName", response.company.scyName);
  794. }
  795. });
  796. },
  797. //获取盖章文件
  798. getCreditSealFile() {
  799. getCreditSealFile(this.forms).then((response) => {
  800. if (response.data.list) {
  801. this.creditSealList = response.data.list;
  802. }
  803. });
  804. },
  805. // 取消按钮
  806. cancel() {
  807. this.$store.dispatch("tagsView/delView", this.$route);
  808. this.$router.go(-1);
  809. },
  810. //文件下载
  811. handleDownload(row) {
  812. const pfiFileUrl = row.pfiFileUrl;
  813. if (pfiFileUrl != null && pfiFileUrl != "") {
  814. const pfiFileName = row.pfiFileName;
  815. this.queryParamsDown.pfiFileUrl = pfiFileUrl;
  816. this.download(
  817. "sc-service/creditLine/jpgAuthorization",
  818. {
  819. ...this.queryParamsDown,
  820. },
  821. pfiFileName
  822. );
  823. // window.open(pfiUrl + "/" + getToken());
  824. } else {
  825. this.$message({
  826. message: "该附件不存在!",
  827. type: "warning",
  828. });
  829. return;
  830. }
  831. },
  832. // 表单重置
  833. reset() {
  834. this.form = {
  835. zfrId: null,
  836. zfrFinanceId: null,
  837. zfrNumber: null,
  838. zfrAmount: null,
  839. zfrRate: null,
  840. zfrHandler: null,
  841. zfrRepaymentDate: null,
  842. zfrApplyDate: null,
  843. zfrLoanDate: null,
  844. zfrApplyAmount: null,
  845. zfrApplyType: null,
  846. zfrStatus: "00",
  847. zfrApproveStt: null,
  848. zfrProfitSpare1: null,
  849. zfrProfitSpare2: null,
  850. zfrProfitSpare3: null,
  851. zfrProfitSpare4: null,
  852. zfrProfitSpare5: null,
  853. zfrProfitSpare6: null,
  854. zfrProfitSpare7: null,
  855. zfrProfitSpare8: null,
  856. zfrProfitSpare9: null,
  857. createBy: null,
  858. createTime: null,
  859. updateBy: null,
  860. updateTime: null,
  861. };
  862. this.resetForm("form");
  863. },
  864. /** 全部搜索按钮操作 */
  865. handleQuery() {
  866. this.queryParams.pageNum = 1;
  867. this.getList();
  868. },
  869. /** 全部重置按钮操作 */
  870. resetQuery() {
  871. this.resetForm("queryForm");
  872. this.handleQuery();
  873. },
  874. //全部 多选框选中数据
  875. handleSelectionChange(selection) {
  876. this.ids = selection.map((item) => item.zfrId);
  877. this.single = selection.length !== 1;
  878. this.multiple = !selection.length;
  879. },
  880. /* 融信编号赋值融资金额 */
  881. amount(item) {
  882. this.$set(this.form, "zfiAmount", item.zfiAmount);
  883. this.$set(this.form, "zfrAmount", item.zfiAmount);
  884. this.$set(this.form, "zfrRepaymentDate", item.zfiExpireDate);
  885. this.$set(this.form, "zfrRate", item.zfpcrRate);
  886. this.$set(this.form, "zfpcrLoanType", item.zfpcrLoanType);
  887. this.$set(this.form, "zfiProductId", item.zfiProductId);
  888. this.$set(this.form, "zfpcrChargeRate", item.zfpcrChargeRate);
  889. this.$set(this.form, "cost", item.cost);
  890. this.$set(this.form, "term", item.term);
  891. this.$set(this.form, "amount", item.amount);
  892. if (item.zfiId) {
  893. this.loading = true;
  894. listBillInf(item.zfiId)
  895. .then((response) => {
  896. this.billInfList = response.data;
  897. this.loading = false;
  898. })
  899. .then(() => {
  900. var queryParamsFile = {};
  901. queryParamsFile.ticketList = this.billInfList;
  902. getFile(queryParamsFile).then((response) => {
  903. if (response.data) {
  904. //获取发票文件
  905. this.invoiceFileList = response.data.invoiceFileList;
  906. //获取合同文件
  907. this.contractFileList = response.data.contractFileList;
  908. //获取其他文件
  909. this.otherFileList = response.data.otherFileList;
  910. }
  911. });
  912. if (item.zfpcrLoanType == "0") {
  913. listAccInf(item.zfiProductId).then((response) => {
  914. this.$set(this.form, "zfrCollectionAccount", response.msg);
  915. this.onlyRead = true;
  916. });
  917. }
  918. });
  919. getCreditDetail(item.zfiId).then((response) => {
  920. if (response.data) {
  921. this.forms = response.data.financeInf;
  922. //签发金额大写
  923. this.issuedAmount = this.smallToBig(this.form.zfiAmount);
  924. //给表格赋值
  925. this.openName = response.data.openName;
  926. this.openCode = response.data.openCode;
  927. this.openBank = response.data.openBank;
  928. this.openAccount = response.data.openAccount;
  929. this.receiveName = response.data.receiveName;
  930. this.receiverCode = response.data.receiverCode;
  931. this.receiverBank = response.data.receiverBank;
  932. this.receiverAccount = response.data.receiverAccount;
  933. this.stopDate = response.data.stopDate;
  934. this.zfiRate = response.data.financeInf.zfiRate;
  935. }
  936. //盖章合同
  937. this.getCreditSealFile();
  938. });
  939. }
  940. },
  941. //详情按钮
  942. handleDetail(index, rows) {
  943. this.zbiId = rows[index].zbiId;
  944. this.openDetailBill = true;
  945. },
  946. /** 提交按钮 */
  947. submitForm() {
  948. this.$refs["form"].validate((valid) => {
  949. if (valid) {
  950. const loading = this.$loading({
  951. lock: true,
  952. text: "Loading",
  953. spinner: "el-icon-loading",
  954. background: "rgba(0, 0, 0, 0.7)",
  955. });
  956. console.log(this.form, "AAHAHAHAH");
  957. addRecord(this.form)
  958. .then((response) => {
  959. console.log(response);
  960. loading.close();
  961. this.zfrId = response.data.zfrId;
  962. this.isOpenApproval();
  963. // this.msgSuccess("融资申请成功");
  964. // this.$store.dispatch("tagsView/delView", this.$route);
  965. // this.$router.go(-1);
  966. })
  967. .catch((response) => {
  968. loading.close();
  969. });
  970. }
  971. });
  972. },
  973. /* 清空 */
  974. clearBoth() {
  975. this.form.zfrAmount = "";
  976. this.form, (zfrRepaymentDate = "");
  977. this.form.zfrRate = "";
  978. this.form.zfpcrLoanType = "";
  979. this.billInfList = [];
  980. this.contractFileList = [];
  981. this.invoiceFileList = [];
  982. this.otherFileList = [];
  983. },
  984. //应收账款合计
  985. allAmount() {
  986. var strarr = [0.0];
  987. for (let i in this.billInfList) {
  988. strarr.push(this.billInfList[i]["zbiAmount"]);
  989. }
  990. return Math.floor(eval(strarr.join("+")) * 100) / 100; //结果
  991. },
  992. /* // 将数字金额转换为大写金额 */
  993. smallToBig(money) {
  994. // 将数字金额转换为大写金额
  995. var cnNums = new Array(
  996. "零",
  997. "壹",
  998. "贰",
  999. "叁",
  1000. "肆",
  1001. "伍",
  1002. "陆",
  1003. "柒",
  1004. "捌",
  1005. "玖"
  1006. ); //汉字的数字
  1007. var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
  1008. var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
  1009. var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
  1010. var cnInteger = "整"; //整数金额时后面跟的字符
  1011. var cnIntLast = "元"; //整数完以后的单位
  1012. //最大处理的数字
  1013. var maxNum = 999999999999999.9999;
  1014. var integerNum; //金额整数部分
  1015. var decimalNum; //金额小数部分
  1016. //输出的中文金额字符串
  1017. var chineseStr = "";
  1018. var parts; //分离金额后用的数组,预定义
  1019. if (money == "" || money == null || money == undefined) {
  1020. return "零元零角零分";
  1021. }
  1022. money = parseFloat(money);
  1023. if (money >= maxNum) {
  1024. //超出最大处理数字
  1025. return "超出最大处理数字";
  1026. }
  1027. if (money == 0) {
  1028. chineseStr = cnNums[0] + cnIntLast + cnInteger;
  1029. return chineseStr;
  1030. }
  1031. //四舍五入保留两位小数,转换为字符串
  1032. money = Math.round(money * 100).toString();
  1033. integerNum = money.substr(0, money.length - 2);
  1034. decimalNum = money.substr(money.length - 2);
  1035. //获取整型部分转换
  1036. if (parseInt(integerNum, 10) > 0) {
  1037. var zeroCount = 0;
  1038. var IntLen = integerNum.length;
  1039. for (var i = 0; i < IntLen; i++) {
  1040. var n = integerNum.substr(i, 1);
  1041. var p = IntLen - i - 1;
  1042. var q = p / 4;
  1043. var m = p % 4;
  1044. if (n == "0") {
  1045. zeroCount++;
  1046. } else {
  1047. if (zeroCount > 0) {
  1048. chineseStr += cnNums[0];
  1049. }
  1050. //归零
  1051. zeroCount = 0;
  1052. chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
  1053. }
  1054. if (m == 0 && zeroCount < 4) {
  1055. chineseStr += cnIntUnits[q];
  1056. }
  1057. }
  1058. chineseStr += cnIntLast;
  1059. }
  1060. //小数部分
  1061. if (decimalNum != "") {
  1062. var decLen = decimalNum.length;
  1063. for (var i = 0; i < decLen; i++) {
  1064. var n = decimalNum.substr(i, 1);
  1065. if (n != "0") {
  1066. chineseStr += cnNums[Number(n)] + cnDecUnits[i];
  1067. }
  1068. }
  1069. }
  1070. if (chineseStr == "") {
  1071. chineseStr += cnNums[0] + cnIntLast + cnInteger;
  1072. } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
  1073. chineseStr += cnInteger;
  1074. }
  1075. return chineseStr;
  1076. },
  1077. /** 导出按钮操作 */
  1078. handleExport() {
  1079. this.download(
  1080. "sc-service/record/export",
  1081. {
  1082. ...this.queryParams,
  1083. },
  1084. `sc-service_record.xlsx`
  1085. );
  1086. },
  1087. //预览
  1088. handlePreview(row) {
  1089. const pfiUrl = row.pfiUrl;
  1090. const pfiFileName = row.pfiFileName;
  1091. if (row.pfiUrl) {
  1092. console.log(pfiFileName.substr(-3));
  1093. if (pfiFileName.substr(-3) == "pdf") {
  1094. this.wordUrl = pfiUrl + "/" + getToken();
  1095. this.show = false;
  1096. this.heid = true;
  1097. } else if (
  1098. pfiFileName.substr(-3) == "jpg" ||
  1099. pfiFileName.substr(-3) == "png" ||
  1100. pfiFileName.substr(-3) == "JPG" ||
  1101. pfiFileName.substr(-3) == "PNG" ||
  1102. pfiFileName.substr(-4) == "jpeg" ||
  1103. pfiFileName.substr(-3) == "JPEG"
  1104. ) {
  1105. this.wordUrl = pfiUrl + "/" + getToken();
  1106. this.show = true;
  1107. this.heid = false;
  1108. console.log("====>", this.wordUrl);
  1109. } else if (
  1110. pfiFileName.substr(-3) == "doc" ||
  1111. pfiFileName.substr(-3) == "DOC" ||
  1112. pfiFileName.substr(-4) == "docx" ||
  1113. pfiFileName.substr(-3) == "DOCX"
  1114. ) {
  1115. this.wordUrl =
  1116. "https://view.officeapps.live.com/op/view.aspx?src=" +
  1117. pfiUrl +
  1118. "/" +
  1119. getToken() +
  1120. "/" +
  1121. pfiFileName;
  1122. this.show = false;
  1123. this.heid = true;
  1124. console.log("====>", this.wordUrl);
  1125. } else {
  1126. this.$message({
  1127. message: "暂不支持该类型文件预览",
  1128. type: "warning",
  1129. });
  1130. return;
  1131. }
  1132. }
  1133. this.openFile = true;
  1134. },
  1135. // 取消按钮
  1136. cancelFtp() {
  1137. let form = {};
  1138. form.zfrId = this.zfrId;
  1139. cancelContract(form).then((response) => {
  1140. this.cancel();
  1141. });
  1142. this.pdfShowDialog = false;
  1143. },
  1144. //查询有无融资内部审批
  1145. isOpenApproval() {
  1146. var confirmParam = {};
  1147. confirmParam.menuId = "1000000006";
  1148. isOpenApproval(confirmParam).then((response) => {
  1149. var result = response.data.isOpen;
  1150. //有融资内部审批
  1151. if (true == result) {
  1152. this.msgSuccess("已提交内部审批,请内部审批通过后签署融资协议");
  1153. this.cancel();
  1154. } else {
  1155. //无融资内部审批,显示融资合同预览页面
  1156. // this.zfrId = '2c83a92dc238468aabd9cd3261748ae0'
  1157. getRecord(this.zfrId).then((response) => {
  1158. this.zcFinanceInf = response.data.zcFinanceInf;
  1159. this.needPay = response.data.needPay;
  1160. //意愿类型
  1161. this.zfpAuthType = response.data.zfpAuthType;
  1162. this.selectPayment();
  1163. });
  1164. }
  1165. });
  1166. },
  1167. //取消选择意愿
  1168. cancelUpdate() {
  1169. this.confirmIsShow = false;
  1170. this.resetUpdate();
  1171. },
  1172. //关闭盖章短信
  1173. cancelMessage() {
  1174. this.messageIsShow = false;
  1175. this.resetMessage();
  1176. },
  1177. //关闭授权编号激活短信
  1178. cancelMessages() {
  1179. this.messageIfShow = false;
  1180. this.resetMessages();
  1181. },
  1182. //关闭二维码
  1183. cancelFace() {
  1184. this.faceIsShow = false;
  1185. },
  1186. closePdfShow() {
  1187. this.pdfShowDialog = false;
  1188. },
  1189. resetUpdate() {
  1190. this.updateForm = {
  1191. radio: "",
  1192. };
  1193. //意愿类型还原为全部
  1194. this.zfpAuthType = "00";
  1195. this.resetForm("updateForm");
  1196. },
  1197. resetMessage() {
  1198. this.messageForm = {
  1199. validCode: "",
  1200. };
  1201. this.resetForm("messageForm");
  1202. },
  1203. resetMessages() {
  1204. this.messagesForm = {
  1205. validCode: "",
  1206. };
  1207. this.resetForm("messagesForm");
  1208. },
  1209. //获取合同文件
  1210. getContractFile() {
  1211. const loading = this.$loading({
  1212. lock: true,
  1213. text: "Loading",
  1214. background: "rgba(0, 0, 0,0)",
  1215. });
  1216. getContractFile(this.zcFinanceInf)
  1217. .then((response) => {
  1218. loading.close();
  1219. if (response.data.list) {
  1220. this.pdfFileList = response.data.list;
  1221. }
  1222. //文件存在
  1223. if (this.pdfFileList.length > 0) {
  1224. this.pdfShowDialog = true;
  1225. } else {
  1226. this.$message({
  1227. message: "文件不存在!",
  1228. type: "warning",
  1229. });
  1230. }
  1231. })
  1232. .catch((response) => {
  1233. loading.close();
  1234. });
  1235. },
  1236. //缴费查询
  1237. selectPayment() {
  1238. listCompanyHandler().then((response) => {
  1239. var self = this;
  1240. // self.paiAccno = '3115730025233104147';
  1241. if (response.data == true) {
  1242. cfcaProjectNo().then((response) => {
  1243. if (response.data.scyCfcaAuthNumber == null) {
  1244. this.messageIfShow = true;
  1245. } else {
  1246. var zfrId = self.zfrId;
  1247. listChargeStatus(zfrId).then((response) => {
  1248. if (response.data.accInfList[0]) {
  1249. self.paiAccno = response.data.accInfList[0].paiAccno;
  1250. }
  1251. if (response.data.chargeInfList[0]) {
  1252. if (response.data.chargeInfList[0].zciStatus == "00") {
  1253. self.zciId = response.data.chargeInfList[0].zciId;
  1254. self
  1255. .$confirm("请缴纳手续费" + self.needPay + "元", "警告", {
  1256. confirmButtonText: "去缴费",
  1257. cancelButtonText: "取消",
  1258. type: "warning",
  1259. })
  1260. .then(function () {
  1261. const loading = self.$loading({
  1262. lock: true,
  1263. text: "Loading",
  1264. spinner: "el-icon-loading",
  1265. background: "rgba(0, 0, 0, 0.7)",
  1266. });
  1267. if (self.paiAccno) {
  1268. balance(self.paiAccno)
  1269. .then((response) => {
  1270. if (
  1271. eval(self.needPay) > eval(response.data.kyAmt)
  1272. ) {
  1273. self.$message({
  1274. message:
  1275. "余额为" +
  1276. response.data.kyAmt +
  1277. "不足以抵扣本次缴费费用,请及时充值",
  1278. type: "warning",
  1279. });
  1280. loading.close();
  1281. } else {
  1282. console.log();
  1283. var map = {
  1284. recvAccNo: "",
  1285. recvAccNm: "",
  1286. tranAmt: self.needPay,
  1287. businessId: self.zciId,
  1288. type: "00",
  1289. };
  1290. transfer(map)
  1291. .then((response) => {
  1292. loading.close();
  1293. setTimeout(() => {
  1294. if (response.data.status == "1") {
  1295. self.msgSuccess("缴费成功");
  1296. updateChargeStatus(zfrId, "02").then(
  1297. (res) => {
  1298. self.getContractFile();
  1299. }
  1300. );
  1301. } else if (response.data.status == "0") {
  1302. self.message("正在缴费中,请稍后再试");
  1303. updateChargeStatus(zfrId, "01").then(
  1304. (res) => {}
  1305. );
  1306. } else if (response.data.status == "2") {
  1307. self.msgError(
  1308. "缴费失败,前去费用管理再次缴费"
  1309. );
  1310. updateChargeStatus(zfrId, "05").then(
  1311. (res) => {}
  1312. );
  1313. }
  1314. }, 1000);
  1315. })
  1316. .catch(() => {
  1317. loading.close();
  1318. });
  1319. }
  1320. })
  1321. .catch(() => {
  1322. loading.close();
  1323. });
  1324. } else {
  1325. self.$message({
  1326. message: "您还没有电子账户,请联系平台开通电子账户",
  1327. type: "warning",
  1328. });
  1329. loading.close();
  1330. }
  1331. });
  1332. } else {
  1333. self.getContractFile();
  1334. }
  1335. } else {
  1336. self.getContractFile();
  1337. }
  1338. });
  1339. }
  1340. });
  1341. } else {
  1342. this.$message.error("此操作需经办人权限,请确认您是否是经办人");
  1343. }
  1344. });
  1345. },
  1346. //缴费
  1347. selectType() {
  1348. //选择签署意愿
  1349. if (this.zfpAuthType == "00") {
  1350. this.confirmIsShow = true;
  1351. } else {
  1352. this.checking();
  1353. }
  1354. },
  1355. //确认选择
  1356. confirmSelect() {
  1357. if (!this.updateForm.radio) {
  1358. this.$message({
  1359. message: "请选择签署意愿类型",
  1360. type: "warning",
  1361. });
  1362. return;
  1363. }
  1364. this.confirmIsShow = false;
  1365. this.zfpAuthType = this.updateForm.radio;
  1366. //调用人脸识别或者短信验证
  1367. this.checking();
  1368. },
  1369. //去签署
  1370. checking() {
  1371. //人脸
  1372. if (this.zfpAuthType == "01") {
  1373. //调用人脸识别生成二维码
  1374. faceAuth().then((response) => {
  1375. if (response.data) {
  1376. //获取二维码
  1377. this.fileUrl = response.data.fileUrl;
  1378. //获取源流水号
  1379. var originalTxSN = response.data.originalTxSN;
  1380. this.faceIsShow = true;
  1381. //每5秒查证人脸识别结果
  1382. var timeInterval = window.setInterval(() => {
  1383. setTimeout(() => {
  1384. //源流水不为空并且结果为空
  1385. if (originalTxSN && !this.faceResult) {
  1386. this.authForm.originalTxSN = originalTxSN;
  1387. //调用查证方法
  1388. checkFaceAuth(this.authForm).then((res) => {
  1389. //认证结果
  1390. this.faceResult = res.data.Verification;
  1391. //成功
  1392. if (this.faceResult == "20") {
  1393. this.msgSuccess("验证成功");
  1394. //关闭验证码
  1395. this.faceIsShow = false;
  1396. //关闭定时
  1397. window.clearInterval(timeInterval);
  1398. //调用盖章
  1399. this.contractSigning();
  1400. } else if (this.faceResult == "30") {
  1401. this.$message({
  1402. message: "验证失败",
  1403. type: "warning",
  1404. });
  1405. //关闭验证码
  1406. this.faceIsShow = false;
  1407. window.clearInterval(timeInterval);
  1408. }
  1409. });
  1410. }
  1411. }, 0);
  1412. }, 10000);
  1413. }
  1414. });
  1415. } else if (this.zfpAuthType == "02") {
  1416. //短信
  1417. this.messageIsShow = true;
  1418. }
  1419. },
  1420. //发送短信验证码
  1421. send() {
  1422. //发送
  1423. sendMessage().then((response) => {
  1424. if (response.data) {
  1425. //手机号
  1426. var newIphone = response.data.newIphone;
  1427. //结果
  1428. var result = response.data.result;
  1429. //倒计时
  1430. const TIME_COUNT = 60;
  1431. if (!this.timer) {
  1432. this.count = TIME_COUNT;
  1433. this.showCode = false;
  1434. this.timer = setInterval(() => {
  1435. if (this.count > 0 && this.count <= TIME_COUNT) {
  1436. this.count--;
  1437. } else {
  1438. this.showCode = true;
  1439. clearInterval(this.timer);
  1440. this.timer = null;
  1441. }
  1442. }, 1000);
  1443. }
  1444. //成功
  1445. if ("20" == result) {
  1446. this.$message({
  1447. message:
  1448. "已向经办人手机号为" + newIphone + "发送短信验证码,请注意查收",
  1449. type: "warning",
  1450. });
  1451. } else if ("10" == result) {
  1452. //失败
  1453. this.$message({
  1454. message: "短信发送失败",
  1455. type: "warning",
  1456. });
  1457. }
  1458. }
  1459. });
  1460. },
  1461. //校验验证码是否正确
  1462. checkCode() {
  1463. if (!this.messageForm.validCode) {
  1464. this.$message({
  1465. message: "请输入验证码",
  1466. type: "warning",
  1467. });
  1468. return;
  1469. }
  1470. //校验验证码
  1471. checkCode(this.messageForm).then((response) => {
  1472. if (response.data) {
  1473. //结果
  1474. var verification = response.data.verification;
  1475. //匹配
  1476. if ("20" == verification) {
  1477. //进行下一步-- 盖章
  1478. this.contractSigning();
  1479. } else if ("30" == verification) {
  1480. //不匹配
  1481. this.$message({
  1482. message: "验证有误,请重新输入",
  1483. type: "warning",
  1484. });
  1485. }
  1486. }
  1487. });
  1488. },
  1489. //生成项目授权编号发送短信
  1490. proSend() {
  1491. //发送
  1492. projectSendMessage().then((response) => {
  1493. if (response.data) {
  1494. //手机号
  1495. var newIphone = response.data.newIphone;
  1496. //结果
  1497. var result = response.data.result;
  1498. //项目编号
  1499. this.projectCode = response.data.projectCode;
  1500. //倒计时
  1501. const TIME_COUNT = 60;
  1502. if (!this.timerCode) {
  1503. this.countCode = TIME_COUNT;
  1504. this.showCodes = false;
  1505. this.timerCode = setInterval(() => {
  1506. if (this.countCode > 0 && this.countCode <= TIME_COUNT) {
  1507. this.countCode--;
  1508. } else {
  1509. this.showCodes = true;
  1510. clearInterval(this.timerCode);
  1511. this.timerCode = null;
  1512. }
  1513. }, 1000);
  1514. }
  1515. //成功
  1516. if ("60000000" == result) {
  1517. this.$message({
  1518. message:
  1519. "已向经办人手机号为" + newIphone + "发送短信验证码,请注意查收",
  1520. type: "warning",
  1521. });
  1522. } else {
  1523. //失败
  1524. this.$message({
  1525. message: "短信发送失败",
  1526. type: "warning",
  1527. });
  1528. }
  1529. }
  1530. });
  1531. },
  1532. //校验授权编号验证码
  1533. checkProCode() {
  1534. if (!this.projectForm.code) {
  1535. this.$message({
  1536. message: "请输入验证码",
  1537. type: "warning",
  1538. });
  1539. return;
  1540. }
  1541. //项目编号
  1542. this.projectForm.projectCode = this.projectCode;
  1543. //校验验证码
  1544. checkProCode(this.projectForm).then((response) => {
  1545. if (response.data) {
  1546. //结果
  1547. var verification = response.data.verification;
  1548. //匹配
  1549. if ("60000000" == verification) {
  1550. var zfrId = this.zfrId;
  1551. listChargeStatus(zfrId).then((response) => {
  1552. if (response.data[0]) {
  1553. if (response.data[0].zciStatus == "00") {
  1554. this.$confirm("请缴纳手续费" + this.needPay + "元", "警告", {
  1555. confirmButtonText: "去缴费",
  1556. cancelButtonText: "取消",
  1557. type: "warning",
  1558. })
  1559. .then(function () {
  1560. return updateChargeStatus(zfrId);
  1561. })
  1562. .then(() => {
  1563. this.getContractFile();
  1564. });
  1565. } else {
  1566. this.getContractFile();
  1567. }
  1568. } else {
  1569. this.getContractFile();
  1570. }
  1571. });
  1572. } else {
  1573. //不匹配
  1574. this.$message({
  1575. message: "验证有误,请重新输入",
  1576. type: "warning",
  1577. });
  1578. }
  1579. }
  1580. });
  1581. },
  1582. //盖章
  1583. contractSigning() {
  1584. var self = this;
  1585. const loading = this.$loading({
  1586. lock: true,
  1587. text: "Loading",
  1588. background: "rgba(0, 0, 0,0)",
  1589. });
  1590. self.zcFinanceInf.zfrId = self.zfrId;
  1591. contractSigning(self.zcFinanceInf)
  1592. .then((response) => {
  1593. loading.close();
  1594. self.msgSuccess("盖章成功");
  1595. if (self.zfpAuthType == "02") {
  1596. //关闭短信验证
  1597. self.messageIsShow = false;
  1598. } else if (self.zfpAuthType == "01") {
  1599. //关闭人脸二维码
  1600. self.faceIsShow = false;
  1601. }
  1602. //self.closePdfShow();
  1603. //self.$router.push({ path: "/Bill/financeRecord"});
  1604. //self.cancel();
  1605. let queryStamped = {};
  1606. queryStamped.zfrId = this.zfrId
  1607. const load = self.$loading({
  1608. lock: true,
  1609. text: "Loading",
  1610. background: "rgba(0, 0, 0,0)",
  1611. });
  1612. listStamped(queryStamped).then((response) =>{
  1613. if(response.data){
  1614. self.pdfFileList = response.data.list;
  1615. }
  1616. self.pdfShowDialog = true;
  1617. self.pdfIsShow = false;
  1618. load.close()
  1619. }).catch((response) => {
  1620. load.close();
  1621. });
  1622. })
  1623. .catch((response) => {
  1624. loading.close();
  1625. });
  1626. },
  1627. closePDF(){
  1628. //关闭预览合同
  1629. this.closePdfShow();
  1630. this.$router.push({ path: "/Bill/financeRecord"});
  1631. }
  1632. },
  1633. };
  1634. </script>
  1635. <style type="text/css">
  1636. table.gridtable {
  1637. font-size: 11px;
  1638. color: #333333;
  1639. border-width: 1px;
  1640. border-collapse: collapse;
  1641. }
  1642. table.gridtable th {
  1643. border-width: 1px;
  1644. padding: 8px;
  1645. border-style: solid;
  1646. background-color: #dedede;
  1647. }
  1648. table.gridtable td {
  1649. border-width: 1px;
  1650. padding: 8px;
  1651. border-style: solid;
  1652. }
  1653. </style>