pdfShow.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755
  1. <template>
  2. <div>
  3. <!-- <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button> -->
  4. <!-- <el-dialog :visible.sync="dialogVisible" width="80%" height="1080px;" :before-close="handleClose" append-to-body > -->
  5. <el-tabs v-model="activeName" type="card">
  6. <el-tab-pane v-for="item in pdfFileList" :key="item.value" label="合同信息" name="first" style="height:500px;">
  7. <embed :src="'data:application/pdf;base64,' + item.base64" type="application/pdf" title="Embedded PDF" style="overflow: auto; width: 100%; height: 100%;"/>
  8. </el-tab-pane>
  9. <!-- <el-tab-pane label="申请协议" name="first" style="height:780px;">
  10. 招采融信申请协议
  11. 编号:ZCRXKL-20210712001
  12. 本《供应链金融服务平台融信转让协议》(以下简称为“本协议”、“《融信转让
  13. 协议》”)由融信转让人、融信受让人于本协议约定的时间在北京市东城区签署:
  14. 融信转让人:B 供应商 2_TSCF 培训专用
  15. 住所:成都市高新区新园南二路一号
  16. 法定代表人:张健
  17. 融信受让人:B 供应商 1_TSCF 培训专用
  18. 住所:成都市高新区新园南二路一号
  19. 法定代表人:张健 鉴于:
  20. (A) 融信反向保理平台由中粮资本科技有限责任公司建设并运营,向用户提供
  21. 应收账款管理、转让、融资等服务。
  22. (B) 融信转让人与融信受让人(以下简称为“双方”)均为融信反向保理平台的
  23. 用户。
  24. (C) 融信转让人现持有融信,享有融信项下的应收账款债权。
  25. (D) 双方均同意使用融信反向保理平台的服务,现融信转让人拟将融信项下应
  26. 收账款债权全部或部分通过融信反向保理平台转让给融信受让人,融信受
  27. 因此,经双方协商一致,签订本协议,约定如下:
  28. </el-tab-pane>
  29. <el-tab-pane label="配置管理" name="second" style="height:780px;">
  30. 住所:成都市高新区新园南二路一号
  31. 法定代表人:张健
  32. 融信受让人:B 供应商 1_TSCF 培训专用
  33. 住所:成都市高新区新园南二路一号
  34. 法定代表人:张健 鉴于:
  35. (A) 融信反向保理平台由中粮资本科技有限责任公司建设并运营,向用户提供
  36. 应收账款管理、转让、融资等服务。
  37. (B) 融信转让人与融信受让人(以下简称为“双方”)均为融信反向保理平台的
  38. 用户。
  39. (C) 融信转让人现持有融信,享有融信项下的应收账款债权。
  40. (D) 双方均同意使用融信反向保理平台的服务,现融信转让人拟将融信项下应
  41. 收账款债权全部或部分通过融信反向保理平台转让给融信受让人,融信受
  42. 因此,经双方协商一致,签订本协议,约定如下:</el-tab-pane> -->
  43. </el-tabs>
  44. <span slot="footer" class="dialog-footer" style="float: right;">
  45. <!-- <el-button type="primary" @click="selectType" size="mini">签署</el-button> -->
  46. <el-button @click="closePdfShow()" size="mini">取 消</el-button>
  47. </span>
  48. <!-- <span slot="footer" class="dialog-footer">
  49. <el-button @click="dialogVisible = false">取 消</el-button>
  50. </span> -->
  51. <!-- </el-dialog> -->
  52. <div>
  53. <!--选择签署意愿类型-->
  54. <el-dialog :visible.sync="confirmIsShow" width="600px" append-to-body :before-close = "cancelUpdate" center>
  55. <el-form ref="updateForm" :disabled="false" :model="updateForm" v-if="confirmIsShow" label-width="150px" class="demo-form-inline" :inline="true">
  56. <el-radio-group v-model="updateForm.radio">
  57. <el-radio label="01">人脸</el-radio>
  58. <el-radio label="02">短信</el-radio>
  59. </el-radio-group>
  60. </el-form>
  61. <div slot="footer" class="dialog-footer">
  62. <el-button type="primary" @click="confirmSelect">确 定</el-button>
  63. <el-button @click="cancelUpdate">取 消</el-button>
  64. </div>
  65. </el-dialog>
  66. <!--短信-->
  67. <el-dialog :visible.sync="messageIsShow" width="800px" append-to-body :before-close = "cancelMessage" center>
  68. <el-form ref="messageForm" :disabled="false" :model="messageForm" v-if="messageIsShow" label-width="150px" class="demo-form-inline" :inline="true" @submit.native.prevent>
  69. <el-form-item label="验证码" prop="validCode">
  70. <el-input v-model="messageForm.validCode" style="width: 200px" maxlength="6" oninput="value=value.replace(/[^\d]/g,'')"/>
  71. </el-form-item>
  72. <el-form-item>
  73. <el-button v-show="messShow" type="success" @click="send">点击获取验证码</el-button>
  74. <el-button v-show="!messShow" type="success" disabled><span>{{timer}}</span>秒后重新获取</el-button>
  75. </el-form-item>
  76. </el-form>
  77. <div slot="footer" class="dialog-footer">
  78. <el-button type="primary" @click="checkCode">确定</el-button>
  79. <el-button @click="cancelMessage">取 消</el-button>
  80. </div>
  81. </el-dialog>
  82. <!--授权编号的短信框-->
  83. <el-dialog :title="授权短信验证" :visible.sync="projectIsShow" width="800px" append-to-body :before-close = "cancelProject" center>
  84. <el-form ref="projectForm" :disabled="false" :model="projectForm" v-if="projectIsShow" label-width="150px" class="demo-form-inline" :inline="true">
  85. <el-form-item label="验证码" prop="code">
  86. <el-input v-model="projectForm.code" style="width: 200px" maxlength="6" oninput="value=value.replace(/[^\d]/g,'')"/>
  87. </el-form-item>
  88. <el-form-item>
  89. <el-button v-show="proShow" type="success" @click="proSend">点击获取验证码</el-button>
  90. <el-button v-show="!proShow" type="success" disabled><span>{{proTimer}}</span>秒后重新获取</el-button>
  91. </el-form-item>
  92. </el-form>
  93. <div slot="footer" class="dialog-footer">
  94. <el-button type="primary" @click="checkProCode">确定</el-button>
  95. <el-button @click="cancelProject">取 消</el-button>
  96. </div>
  97. </el-dialog>
  98. <!--人脸二维码-->
  99. <el-dialog :visible.sync="faceIsShow" width="500px" append-to-body :before-close = "cancelFace" center>
  100. <img :src="'data:image/jpeg;base64,' + this.fileUrl" style="overflow: auto; width: 100%; height: 100%;"/>
  101. </el-dialog>
  102. <!--去融资-->
  103. <el-dialog :visible.sync="goShow" width="300px" append-to-body :before-close = "cancelGo" center>
  104. <!-- <p>恭喜您成功签收一笔融信</p> -->
  105. <el-form ref="financeSignForm" :model="financeSignForm" label-width="auto" :inline="true">
  106. <el-row>
  107. <el-form-item label="融信编号:">{{financeSignForm.zfiNumber}}</el-form-item>
  108. <el-form-item label="融信金额:">{{handleInput(financeSignForm.zfiAmount)}}</el-form-item>
  109. <el-form-item label="大写:">{{smallToBig(financeSignForm.zfiAmount)}}</el-form-item>
  110. </el-row>
  111. <el-row>
  112. <el-form-item label="融信利率:">{{financeSignForm.zfiRate}}</el-form-item>
  113. <el-form-item label="最长融信期限:">{{financeSignForm.intervalTime + "天"}}</el-form-item>
  114. <el-form-item label="融信有效期:">{{financeSignForm.validity}}</el-form-item>
  115. </el-row>
  116. </el-form>
  117. <div slot="footer" class="dialog-footer">
  118. <el-button type="primary" @click="goFinance">去融资</el-button>
  119. <el-button @click="cancelGo">取 消</el-button>
  120. </div>
  121. </el-dialog>
  122. </div>
  123. </div>
  124. </template>
  125. <script>
  126. import {sendMessage,checkCode,faceAuth,checkFaceAuth,contractSigning} from "@/api/service/credit/message";
  127. import {cfcaProjectNo,projectSendMessage,checkProCode} from "@/api/service/credit/cfcaProject";
  128. import {getCreditDetail,getFinanceSign} from "@/api/service/credit/credit";
  129. import { amtformat } from "@/utils/amtCommon";
  130. import Cookies from 'js-cookie';
  131. export default {
  132. props : ['pdfFileList','zfiId', 'parent'],
  133. data() {
  134. return {
  135. activeName: "first",
  136. dialogVisible: false,
  137. dialogTableVisible: false,
  138. dialogFormVisible: false,
  139. form: {
  140. name: "",
  141. region: "",
  142. date1: "",
  143. date2: "",
  144. delivery: false,
  145. type: [],
  146. resource: "",
  147. desc: "",
  148. },
  149. formLabelWidth: "120px",
  150. //展示选择意愿
  151. confirmIsShow:false,
  152. //意愿
  153. updateForm:{},
  154. financeSignForm:{},
  155. //意愿类型
  156. zfpAuthTypeInit:'',
  157. zfpAuthType:'',
  158. //短信展示
  159. messageIsShow:false,
  160. //短信
  161. messageForm:{validCode:""},
  162. //人脸二维码
  163. fileUrl:"",
  164. //控制人脸二维码是否展示
  165. faceIsShow:false,
  166. //人脸验证结果
  167. faceResult:"",
  168. //人脸识别结果传参
  169. authForm:{},
  170. //控制短信验证码倒计时是否展示
  171. messShow:true,
  172. timer:60,
  173. openFile:false,
  174. wordUrl: "",
  175. show:false,
  176. heid:false,
  177. auth_timer : null,
  178. //融资方审批状态
  179. zfiSupplierStatus:'',
  180. //核心审批状态
  181. zfiCoreStatus:'',
  182. //平台审批状态
  183. zfiPlatformStatus:'',
  184. //融信状态
  185. zfiStatus:'',
  186. //盖章文件
  187. creditSealList:[],
  188. //生成授权编号的短信框
  189. projectIsShow:false,
  190. //短信
  191. projectForm:{code:""},
  192. //控制倒计时是否展示
  193. proShow:true,
  194. //时间
  195. proTimer:60,
  196. //项目编号
  197. projectCode:"",
  198. //融信信息
  199. financeData:{},
  200. //接收方
  201. receiveName:"",
  202. //开立方
  203. openName:"",
  204. //显示去融资框
  205. goShow:false
  206. };
  207. },
  208. created() {
  209. // getCreditDetail(this.zfiId).then((response) => {
  210. // if(response.data){
  211. // //融信状态
  212. // this.zfiStatus = response.data.financeInf.zfiStatus;
  213. // //融资方审批状态
  214. // this.zfiSupplierStatus = response.data.financeInf.zfiSupplierStatus;
  215. // //平台审批状态
  216. // this.zfiPlatformStatus = response.data.financeInf.zfiPlatformStatus;
  217. // //核心审批状态
  218. // this.zfiCoreStatus = response.data.financeInf.zfiCoreStatus;
  219. // //意愿类型
  220. // this.zfpAuthType = response.data.zfpAuthType;
  221. // this.zfpAuthTypeInit = response.data.zfpAuthType;
  222. // //融信信息
  223. // this.financeData = response.data.financeInf;
  224. // //接收方
  225. // this.receiveName = response.data.receiveName;
  226. // //开立方
  227. // this.openName = response.data.openName;
  228. // }
  229. // })
  230. this.dialogVisible = true;
  231. for(var i = 0 ; i < this.pdfFileList.length; i++){
  232. var base64 = this.pdfFileList[i].base64;
  233. <embed src="data:application/pdf;base64," type="application/pdf" title="Embedded PDF" style="overflow: auto; width: 100%; height: 100%;"/>
  234. }
  235. },
  236. methods: {
  237. handleClose(done) {
  238. this.$confirm("确认关闭?")
  239. .then((_) => {
  240. done();
  241. })
  242. .catch((_) => {});
  243. },
  244. selectChildType(){
  245. this.$parent.selectType();
  246. },
  247. //取消选择意愿
  248. cancelUpdate(){
  249. this.confirmIsShow = false;
  250. this.resetUpdate();
  251. },
  252. //关闭短信
  253. cancelMessage(){
  254. this.messageIsShow = false;
  255. this.resetMessage();
  256. },
  257. //关闭短信
  258. cancelProject(){
  259. this.projectIsShow = false;
  260. this.resetProject();
  261. },
  262. //关闭二维码
  263. cancelFace(){
  264. this.faceIsShow = false;
  265. },
  266. //回到父页
  267. cancelGo(){
  268. this.goShow = false;
  269. this.$store.dispatch(
  270. "tagsView/delView",
  271. this.$route
  272. );
  273. this.$router.go(-1);
  274. },
  275. resetUpdate() {
  276. this.updateForm = {
  277. radio:""
  278. };
  279. //意愿类型还原为全部
  280. this.zfpAuthType = this.zfpAuthTypeInit;
  281. this.resetForm("updateForm");
  282. this.messShow = true;
  283. clearInterval(this.auth_timer);
  284. this.timer = 60;
  285. this.proShow = true;
  286. clearInterval(this.auth_pro_timer);
  287. this.proTimer = 60;
  288. },
  289. resetMessage() {
  290. this.messageForm = {
  291. validCode:""
  292. };
  293. this.resetForm("messageForm");
  294. },
  295. resetProject(){
  296. this.projectForm = {
  297. code:""
  298. };
  299. this.resetForm("projectForm");
  300. },
  301. //选择类型
  302. selectType(){
  303. //查询当前企业是否存在企业授权编号
  304. cfcaProjectNo().then((response) => {
  305. //存在授权编号
  306. if(response.data.scyCfcaAuthNumber){
  307. /**
  308. * 申请确权:融资审批通过+核心通过+平台通过+融信待确权||
  309. * 核心开立:核心审批通过+其余状态为空
  310. * 融资开立:融资通过+平台通过+其余状态为空
  311. *
  312. */
  313. this.resetUpdate();
  314. //调用人脸
  315. if( (this.zfiSupplierStatus == '01' && this.zfiCoreStatus == '01' && this.zfiPlatformStatus == '01' && this.zfiStatus == '00') ||
  316. (this.zfiCoreStatus == '01' && (this.zfiSupplierStatus == '' || this.zfiSupplierStatus == null || this.zfiSupplierStatus == 'null') && (this.zfiPlatformStatus == '' || this.zfiPlatformStatus == null || this.zfiPlatformStatus == 'null') && (this.zfiStatus == '' || this.zfiStatus == null || this.zfiStatus == 'null'))||
  317. (this.zfiSupplierStatus == '01' && this.zfiPlatformStatus == '01' && (this.zfiCoreStatus == '' || this.zfiCoreStatus == null || this.zfiCoreStatus == 'null') && (this.zfiStatus == '' || this.zfiStatus == null || this.zfiStatus == 'null'))){
  318. //选择签署意愿
  319. if(this.zfpAuthType == "00"){
  320. this.confirmIsShow = true;
  321. }else{
  322. this.checking();
  323. }
  324. }else{
  325. //直接盖章
  326. this.contractSigning();
  327. }
  328. }else{
  329. //不存在授权编号
  330. //发送短信验证码认证
  331. this.projectIsShow = true;
  332. }
  333. });
  334. },
  335. //确认选择
  336. confirmSelect(){
  337. if(!this.updateForm.radio){
  338. this.$message({
  339. message: '请选择签署意愿类型',
  340. type: 'warning'
  341. });
  342. return;
  343. }
  344. this.confirmIsShow = false;
  345. this.zfpAuthType = this.updateForm.radio;
  346. //调用人脸识别或者短信验证
  347. this.checking();
  348. },
  349. //去签署
  350. checking(){
  351. //人脸
  352. if(this.zfpAuthType == '01'){
  353. //调用人脸识别生成二维码
  354. faceAuth().then((response) => {
  355. if(response.data){
  356. //获取二维码
  357. this.fileUrl = response.data.fileUrl;
  358. //获取源流水号
  359. var originalTxSN = response.data.originalTxSN;
  360. this.faceIsShow = true;
  361. //每10秒查证人脸识别结果
  362. var timeInterval = window.setInterval(() => {
  363. setTimeout(() => {
  364. //源流水不为空并且结果为空
  365. if(originalTxSN && !this.faceResult){
  366. this.authForm.originalTxSN = originalTxSN;
  367. //调用查证方法
  368. checkFaceAuth(this.authForm).then((res) => {
  369. //认证结果
  370. this.faceResult = res.data.Verification;
  371. //成功
  372. if(this.faceResult == '20'){
  373. this.msgSuccess("验证成功");
  374. //关闭验证码
  375. this.faceIsShow = false;
  376. //关闭定时
  377. window.clearInterval(timeInterval);
  378. //调用盖章
  379. this.contractSigning();
  380. }else if(this.faceResult == '30'){
  381. this.$message({
  382. message: "验证失败",
  383. type: 'warning'
  384. });
  385. //关闭验证码
  386. this.faceIsShow = false;
  387. window.clearInterval(timeInterval);
  388. }
  389. });
  390. }
  391. }, 0)
  392. },10000)
  393. }
  394. });
  395. }else if(this.zfpAuthType == '02'){//短信
  396. this.messageIsShow = true;
  397. }
  398. },
  399. //发送短信验证码
  400. send(){
  401. //发送
  402. sendMessage().then((response) => {
  403. if(response.data){
  404. //手机号
  405. var newIphone = response.data.newIphone;
  406. //结果
  407. var result = response.data.result;
  408. this.messShow = false;
  409. this.auth_timer = window.setInterval(() => {
  410. this.messShow = false;
  411. setTimeout(() => {
  412. this.timer--;
  413. if(this.timer <= 0 ){
  414. this.messShow = true;
  415. clearInterval(this.auth_timer);
  416. }
  417. }, 0)
  418. },1000)
  419. //成功
  420. if("20" == result){
  421. this.$message({
  422. message: "已向经办人手机号为"+newIphone+"发送短信验证码,请注意查收",
  423. type: 'warning'
  424. });
  425. }else if("10" == result){//失败
  426. this.$message({
  427. message: "短信发送失败",
  428. type: 'warning'
  429. });
  430. }
  431. }
  432. });
  433. },
  434. //生成项目授权编号发送短信
  435. proSend(){
  436. //发送
  437. projectSendMessage().then((response) => {
  438. if(response.data){
  439. //手机号
  440. var newIphone = response.data.newIphone;
  441. //结果
  442. var result = response.data.result;
  443. //项目编号
  444. this.projectCode = response.data.projectCode;
  445. this.proShow = false;
  446. this.auth_pro_timer = window.setInterval(() => {
  447. this.proShow = false;
  448. setTimeout(() => {
  449. this.timer--;
  450. if(this.timer <= 0 ){
  451. this.proShow = true;
  452. clearInterval(this.auth_pro_timer);
  453. }
  454. }, 0)
  455. },1000)
  456. //成功
  457. if("60000000" == result){
  458. this.$message({
  459. message: "已向经办人手机号为"+newIphone+"发送短信验证码,请注意查收",
  460. type: 'warning'
  461. });
  462. }else{//失败
  463. this.$message({
  464. message: "短信发送失败",
  465. type: 'warning'
  466. });
  467. }
  468. }
  469. });
  470. },
  471. //校验验证码是否正确
  472. checkCode(){
  473. if(!this.messageForm.validCode){
  474. this.$message({
  475. message: "请输入验证码",
  476. type: 'warning'
  477. });
  478. return;
  479. }
  480. //校验验证码
  481. checkCode(this.messageForm).then((response) => {
  482. if(response.data){
  483. //结果
  484. var verification = response.data.verification;
  485. //匹配
  486. if("20" == verification){
  487. //进行下一步-- 盖章
  488. this.contractSigning();
  489. }else if("30" == verification){//不匹配
  490. this.$message({
  491. message: "验证有误,请重新输入",
  492. type: 'warning'
  493. });
  494. }
  495. }
  496. });
  497. },
  498. //盖章
  499. contractSigning(){
  500. const loading = this.$loading({
  501. lock: true,
  502. text: 'Loading',
  503. background: 'rgba(0, 0, 0,0)'
  504. });
  505. contractSigning(this.financeData).then((response) => {
  506. loading.close();
  507. if(this.zfpAuthType == '02'){
  508. //关闭短信验证
  509. this.messageIsShow = false;
  510. }else if(this.zfpAuthType == '01'){
  511. //关闭人脸二维码
  512. this.faceIsShow = false;
  513. }
  514. //关闭文件弹框
  515. this.closePdfShow();
  516. //确权:状态为待确权
  517. if(this.zfiStatus == '00'){
  518. if(this.zfiCreateType == '0'){//申请
  519. this.msgSuccess("确权成功,融信已提交,"+this.receiveName+"签收");
  520. this.goParent();
  521. }else if(this.zfiCreateType == '2'){//供应商开立
  522. getFinanceSign(this.zfiId).then((response) => {
  523. //融信编号
  524. this.financeSignForm.zfiNumber = response.data.zfiNumber;
  525. //融信金额
  526. this.financeSignForm.zfiAmount = response.data.zfiAmount;
  527. //利率
  528. this.financeSignForm.zfiRate = response.data.zfiRate;
  529. //最长融信期限
  530. this.financeSignForm.intervalTime = response.data.intervalTime;
  531. //融信有效期
  532. this.financeSignForm.validity = response.data.validity;
  533. this.goShow = true;
  534. });
  535. }
  536. }else if(this.zfiStatus == '01' && this.zfiCreateType == '0'){//签收
  537. getFinanceSign(this.zfiId).then((response) => {
  538. //融信编号
  539. this.financeSignForm.zfiNumber = response.data.zfiNumber;
  540. //融信金额
  541. this.financeSignForm.zfiAmount = response.data.zfiAmount;
  542. //利率
  543. this.financeSignForm.zfiRate = response.data.zfiRate;
  544. //最长融信期限
  545. this.financeSignForm.intervalTime = response.data.intervalTime;
  546. //融信有效期
  547. this.financeSignForm.validity = response.data.validity;
  548. this.goShow = true;
  549. });
  550. }else if(this.zfiCreateType == '1' && this.zfiCoreStatus == '01' && !this.zfiStatus){//核心开立
  551. this.msgSuccess("开立成功,融信已提交"+this.receiveName+"签收");
  552. this.goParent();
  553. }else if(this.zfiCreateType == '2' && this.zfiPlatformStatus == '01' && this.zfiSupplierStatus == '01' && !this.zfiStatus){
  554. //融资开立盖章
  555. this.msgSuccess("开立成功,待:"+this.openName+"确权;确权结果请留意待办事项与站内消息");
  556. this.goParent();
  557. }else if(scope.row.zfiCreateType == '1' && this.zfiSupplierStatus == '01' && this.zfiPlatformStatus == '01'){//补充资料
  558. getFinanceSign(this.zfiId).then((response) => {
  559. //融信编号
  560. this.financeSignForm.zfiNumber = response.data.zfiNumber;
  561. //融信金额
  562. this.financeSignForm.zfiAmount = response.data.zfiAmount;
  563. //利率
  564. this.financeSignForm.zfiRate = response.data.zfiRate;
  565. //最长融信期限
  566. this.financeSignForm.intervalTime = response.data.intervalTime;
  567. //融信有效期
  568. this.financeSignForm.validity = response.data.validity;
  569. this.goShow = true;
  570. });
  571. }
  572. }).catch((response) => {
  573. loading.close();
  574. });
  575. },
  576. //校验授权编号验证码
  577. checkProCode(){
  578. if(!this.projectForm.code){
  579. this.$message({
  580. message: "请输入验证码",
  581. type: 'warning'
  582. });
  583. return;
  584. }
  585. //项目编号
  586. this.projectForm.projectCode = this.projectCode;
  587. //校验验证码
  588. checkProCode(this.projectForm).then((response) => {
  589. if(response.data){
  590. //结果
  591. var verification = response.data.verification;
  592. //匹配
  593. if("60000000" == verification){
  594. //关闭弹框
  595. this.projectIsShow = false;
  596. /**
  597. * 申请确权:融资审批通过+核心通过+平台通过+融信待确权||
  598. * 核心开立:核心审批通过+其余状态为空
  599. * 融资开立:融资通过+平台通过+其余状态为空
  600. *
  601. */
  602. this.resetUpdate();
  603. //调用人脸
  604. if( (this.zfiSupplierStatus == '01' && this.zfiCoreStatus == '01' && this.zfiPlatformStatus == '01' && this.zfiStatus == '00') ||
  605. (this.zfiCoreStatus == '01' && (this.zfiSupplierStatus == '' || this.zfiSupplierStatus == null || this.zfiSupplierStatus == 'null') && (this.zfiPlatformStatus == '' || this.zfiPlatformStatus == null || this.zfiPlatformStatus == 'null') && (this.zfiStatus == '' || this.zfiStatus == null || this.zfiStatus == 'null'))||
  606. (this.zfiSupplierStatus == '01' && this.zfiPlatformStatus == '01' && (this.zfiCoreStatus == '' || this.zfiCoreStatus == null || this.zfiCoreStatus == 'null') && (this.zfiStatus == '' || this.zfiStatus == null || this.zfiStatus == 'null'))){
  607. //选择签署意愿
  608. if(this.zfpAuthType == "00"){
  609. this.confirmIsShow = true;
  610. }else{
  611. this.checking();
  612. }
  613. }else{
  614. //直接盖章
  615. this.contractSigning();
  616. }
  617. }else {//不匹配
  618. this.$message({
  619. message: "验证有误,请重新输入",
  620. type: 'warning'
  621. });
  622. }
  623. }
  624. });
  625. },
  626. closePdfShow(){
  627. this.parent.closePdfShow();
  628. },
  629. //返回到列表页
  630. goParent(){
  631. this.parent.goParent();
  632. },
  633. //去融资
  634. goFinance(){
  635. //关闭当前页
  636. this.$store.dispatch(
  637. "tagsView/delView",
  638. this.$route
  639. );
  640. //关闭弹框
  641. this.goShow = false;
  642. //关闭文件弹框
  643. this.closePdfShow();
  644. Cookies.set("/credit/goFinance/"+this.zfiId + "/", this.$route.fullPath)
  645. this.$router.push({ path: "/credit/goFinance/"+this.zfiId + "/" });
  646. },
  647. /* 金额展示 */
  648. handleInput(str) {
  649. return amtformat(str, 2, ".", ",");
  650. },
  651. /* // 将数字金额转换为大写金额 */
  652. smallToBig(money) {
  653. // 将数字金额转换为大写金额
  654. var cnNums = new Array(
  655. "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" ); //汉字的数字
  656. var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
  657. var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
  658. var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
  659. var cnInteger = "整"; //整数金额时后面跟的字符
  660. var cnIntLast = "元"; //整数完以后的单位
  661. //最大处理的数字
  662. var maxNum = 999999999999999.9999;
  663. var integerNum; //金额整数部分
  664. var decimalNum; //金额小数部分
  665. //输出的中文金额字符串
  666. var chineseStr = "";
  667. var parts; //分离金额后用的数组,预定义
  668. if (money == "" || money == null || money == undefined) {
  669. return "零元零角零分";
  670. }
  671. money = parseFloat(money);
  672. if (money >= maxNum) {
  673. //超出最大处理数字
  674. return "超出最大处理数字";
  675. }
  676. if (money == 0) {
  677. chineseStr = cnNums[0] + cnIntLast + cnInteger;
  678. return chineseStr;
  679. }
  680. //四舍五入保留两位小数,转换为字符串
  681. money = Math.round(money * 100).toString();
  682. integerNum = money.substr(0, money.length - 2);
  683. decimalNum = money.substr(money.length - 2);
  684. //获取整型部分转换
  685. if (parseInt(integerNum, 10) > 0) {
  686. var zeroCount = 0;
  687. var IntLen = integerNum.length;
  688. for (var i = 0; i < IntLen; i++) {
  689. var n = integerNum.substr(i, 1);
  690. var p = IntLen - i - 1;
  691. var q = p / 4;
  692. var m = p % 4;
  693. if (n == "0") {
  694. zeroCount++;
  695. } else {
  696. if (zeroCount > 0) {
  697. chineseStr += cnNums[0];
  698. }
  699. //归零
  700. zeroCount = 0;
  701. chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
  702. }
  703. if (m == 0 && zeroCount < 4) {
  704. chineseStr += cnIntUnits[q];
  705. }
  706. }
  707. chineseStr += cnIntLast;
  708. }
  709. //小数部分
  710. if (decimalNum != "") {
  711. var decLen = decimalNum.length;
  712. for (var i = 0; i < decLen; i++) {
  713. var n = decimalNum.substr(i, 1);
  714. if (n != "0") {
  715. chineseStr += cnNums[Number(n)] + cnDecUnits[i];
  716. }
  717. }
  718. }
  719. if (chineseStr == "") {
  720. chineseStr += cnNums[0] + cnIntLast + cnInteger;
  721. } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
  722. chineseStr += cnInteger;
  723. }
  724. return chineseStr;
  725. },
  726. },
  727. };
  728. </script>