pdfShow.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  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 Cookies from 'js-cookie';
  130. export default {
  131. props : ['pdfFileList','zfiId', 'parent'],
  132. data() {
  133. return {
  134. activeName: "first",
  135. dialogVisible: false,
  136. dialogTableVisible: false,
  137. dialogFormVisible: false,
  138. form: {
  139. name: "",
  140. region: "",
  141. date1: "",
  142. date2: "",
  143. delivery: false,
  144. type: [],
  145. resource: "",
  146. desc: "",
  147. },
  148. formLabelWidth: "120px",
  149. //展示选择意愿
  150. confirmIsShow:false,
  151. //意愿
  152. updateForm:{},
  153. financeSignForm:{},
  154. //意愿类型
  155. zfpAuthTypeInit:'',
  156. zfpAuthType:'',
  157. //短信展示
  158. messageIsShow:false,
  159. //短信
  160. messageForm:{validCode:""},
  161. //人脸二维码
  162. fileUrl:"",
  163. //控制人脸二维码是否展示
  164. faceIsShow:false,
  165. //人脸验证结果
  166. faceResult:"",
  167. //人脸识别结果传参
  168. authForm:{},
  169. //控制短信验证码倒计时是否展示
  170. messShow:true,
  171. timer:60,
  172. openFile:false,
  173. wordUrl: "",
  174. show:false,
  175. heid:false,
  176. auth_timer : null,
  177. //融资方审批状态
  178. zfiSupplierStatus:'',
  179. //核心审批状态
  180. zfiCoreStatus:'',
  181. //平台审批状态
  182. zfiPlatformStatus:'',
  183. //融信状态
  184. zfiStatus:'',
  185. //盖章文件
  186. creditSealList:[],
  187. //生成授权编号的短信框
  188. projectIsShow:false,
  189. //短信
  190. projectForm:{code:""},
  191. //控制倒计时是否展示
  192. proShow:true,
  193. //时间
  194. proTimer:60,
  195. //项目编号
  196. projectCode:"",
  197. //融信信息
  198. financeData:{},
  199. //接收方
  200. receiveName:"",
  201. //开立方
  202. openName:"",
  203. //显示去融资框
  204. goShow:false
  205. };
  206. },
  207. created() {
  208. // getCreditDetail(this.zfiId).then((response) => {
  209. // if(response.data){
  210. // //融信状态
  211. // this.zfiStatus = response.data.financeInf.zfiStatus;
  212. // //融资方审批状态
  213. // this.zfiSupplierStatus = response.data.financeInf.zfiSupplierStatus;
  214. // //平台审批状态
  215. // this.zfiPlatformStatus = response.data.financeInf.zfiPlatformStatus;
  216. // //核心审批状态
  217. // this.zfiCoreStatus = response.data.financeInf.zfiCoreStatus;
  218. // //意愿类型
  219. // this.zfpAuthType = response.data.zfpAuthType;
  220. // this.zfpAuthTypeInit = response.data.zfpAuthType;
  221. // //融信信息
  222. // this.financeData = response.data.financeInf;
  223. // //接收方
  224. // this.receiveName = response.data.receiveName;
  225. // //开立方
  226. // this.openName = response.data.openName;
  227. // }
  228. // })
  229. this.dialogVisible = true;
  230. for(var i = 0 ; i < this.pdfFileList.length; i++){
  231. var base64 = this.pdfFileList[i].base64;
  232. <embed src="data:application/pdf;base64," type="application/pdf" title="Embedded PDF" style="overflow: auto; width: 100%; height: 100%;"/>
  233. }
  234. },
  235. methods: {
  236. handleClose(done) {
  237. this.$confirm("确认关闭?")
  238. .then((_) => {
  239. done();
  240. })
  241. .catch((_) => {});
  242. },
  243. selectChildType(){
  244. this.$parent.selectType();
  245. },
  246. //取消选择意愿
  247. cancelUpdate(){
  248. this.confirmIsShow = false;
  249. this.resetUpdate();
  250. },
  251. //关闭短信
  252. cancelMessage(){
  253. this.messageIsShow = false;
  254. this.resetMessage();
  255. },
  256. //关闭短信
  257. cancelProject(){
  258. this.projectIsShow = false;
  259. this.resetProject();
  260. },
  261. //关闭二维码
  262. cancelFace(){
  263. this.faceIsShow = false;
  264. },
  265. //回到父页
  266. cancelGo(){
  267. this.goShow = false;
  268. this.$store.dispatch(
  269. "tagsView/delView",
  270. this.$route
  271. );
  272. this.$router.go(-1);
  273. },
  274. resetUpdate() {
  275. this.updateForm = {
  276. radio:""
  277. };
  278. //意愿类型还原为全部
  279. this.zfpAuthType = this.zfpAuthTypeInit;
  280. this.resetForm("updateForm");
  281. this.messShow = true;
  282. clearInterval(this.auth_timer);
  283. this.timer = 60;
  284. this.proShow = true;
  285. clearInterval(this.auth_pro_timer);
  286. this.proTimer = 60;
  287. },
  288. resetMessage() {
  289. this.messageForm = {
  290. validCode:""
  291. };
  292. this.resetForm("messageForm");
  293. },
  294. resetProject(){
  295. this.projectForm = {
  296. code:""
  297. };
  298. this.resetForm("projectForm");
  299. },
  300. //选择类型
  301. selectType(){
  302. //查询当前企业是否存在企业授权编号
  303. cfcaProjectNo().then((response) => {
  304. //存在授权编号
  305. if(response.data.scyCfcaAuthNumber){
  306. /**
  307. * 申请确权:融资审批通过+核心通过+平台通过+融信待确权||
  308. * 核心开立:核心审批通过+其余状态为空
  309. * 融资开立:融资通过+平台通过+其余状态为空
  310. *
  311. */
  312. this.resetUpdate();
  313. //调用人脸
  314. if( (this.zfiSupplierStatus == '01' && this.zfiCoreStatus == '01' && this.zfiPlatformStatus == '01' && this.zfiStatus == '00') ||
  315. (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'))||
  316. (this.zfiSupplierStatus == '01' && this.zfiPlatformStatus == '01' && (this.zfiCoreStatus == '' || this.zfiCoreStatus == null || this.zfiCoreStatus == 'null') && (this.zfiStatus == '' || this.zfiStatus == null || this.zfiStatus == 'null'))){
  317. //选择签署意愿
  318. if(this.zfpAuthType == "00"){
  319. this.confirmIsShow = true;
  320. }else{
  321. this.checking();
  322. }
  323. }else{
  324. //直接盖章
  325. this.contractSigning();
  326. }
  327. }else{
  328. //不存在授权编号
  329. //发送短信验证码认证
  330. this.projectIsShow = true;
  331. }
  332. });
  333. },
  334. //确认选择
  335. confirmSelect(){
  336. if(!this.updateForm.radio){
  337. this.$message({
  338. message: '请选择签署意愿类型',
  339. type: 'warning'
  340. });
  341. return;
  342. }
  343. this.confirmIsShow = false;
  344. this.zfpAuthType = this.updateForm.radio;
  345. //调用人脸识别或者短信验证
  346. this.checking();
  347. },
  348. //去签署
  349. checking(){
  350. //人脸
  351. if(this.zfpAuthType == '01'){
  352. //调用人脸识别生成二维码
  353. faceAuth().then((response) => {
  354. if(response.data){
  355. //获取二维码
  356. this.fileUrl = response.data.fileUrl;
  357. //获取源流水号
  358. var originalTxSN = response.data.originalTxSN;
  359. this.faceIsShow = true;
  360. //每10秒查证人脸识别结果
  361. var timeInterval = window.setInterval(() => {
  362. setTimeout(() => {
  363. //源流水不为空并且结果为空
  364. if(originalTxSN && !this.faceResult){
  365. this.authForm.originalTxSN = originalTxSN;
  366. //调用查证方法
  367. checkFaceAuth(this.authForm).then((res) => {
  368. //认证结果
  369. this.faceResult = res.data.Verification;
  370. //成功
  371. if(this.faceResult == '20'){
  372. this.msgSuccess("验证成功");
  373. //关闭验证码
  374. this.faceIsShow = false;
  375. //关闭定时
  376. window.clearInterval(timeInterval);
  377. //调用盖章
  378. this.contractSigning();
  379. }else if(this.faceResult == '30'){
  380. this.$message({
  381. message: "验证失败",
  382. type: 'warning'
  383. });
  384. //关闭验证码
  385. this.faceIsShow = false;
  386. window.clearInterval(timeInterval);
  387. }
  388. });
  389. }
  390. }, 0)
  391. },10000)
  392. }
  393. });
  394. }else if(this.zfpAuthType == '02'){//短信
  395. this.messageIsShow = true;
  396. }
  397. },
  398. //发送短信验证码
  399. send(){
  400. //发送
  401. sendMessage().then((response) => {
  402. if(response.data){
  403. //手机号
  404. var newIphone = response.data.newIphone;
  405. //结果
  406. var result = response.data.result;
  407. this.messShow = false;
  408. this.auth_timer = window.setInterval(() => {
  409. this.messShow = false;
  410. setTimeout(() => {
  411. this.timer--;
  412. if(this.timer <= 0 ){
  413. this.messShow = true;
  414. clearInterval(this.auth_timer);
  415. }
  416. }, 0)
  417. },1000)
  418. //成功
  419. if("20" == result){
  420. this.$message({
  421. message: "已向经办人手机号为"+newIphone+"发送短信验证码,请注意查收",
  422. type: 'warning'
  423. });
  424. }else if("10" == result){//失败
  425. this.$message({
  426. message: "短信发送失败",
  427. type: 'warning'
  428. });
  429. }
  430. }
  431. });
  432. },
  433. //生成项目授权编号发送短信
  434. proSend(){
  435. //发送
  436. projectSendMessage().then((response) => {
  437. if(response.data){
  438. //手机号
  439. var newIphone = response.data.newIphone;
  440. //结果
  441. var result = response.data.result;
  442. //项目编号
  443. this.projectCode = response.data.projectCode;
  444. this.proShow = false;
  445. this.auth_pro_timer = window.setInterval(() => {
  446. this.proShow = false;
  447. setTimeout(() => {
  448. this.timer--;
  449. if(this.timer <= 0 ){
  450. this.proShow = true;
  451. clearInterval(this.auth_pro_timer);
  452. }
  453. }, 0)
  454. },1000)
  455. //成功
  456. if("60000000" == result){
  457. this.$message({
  458. message: "已向经办人手机号为"+newIphone+"发送短信验证码,请注意查收",
  459. type: 'warning'
  460. });
  461. }else{//失败
  462. this.$message({
  463. message: "短信发送失败",
  464. type: 'warning'
  465. });
  466. }
  467. }
  468. });
  469. },
  470. //校验验证码是否正确
  471. checkCode(){
  472. if(!this.messageForm.validCode){
  473. this.$message({
  474. message: "请输入验证码",
  475. type: 'warning'
  476. });
  477. return;
  478. }
  479. //校验验证码
  480. checkCode(this.messageForm).then((response) => {
  481. if(response.data){
  482. //结果
  483. var verification = response.data.verification;
  484. //匹配
  485. if("20" == verification){
  486. //进行下一步-- 盖章
  487. this.contractSigning();
  488. }else if("30" == verification){//不匹配
  489. this.$message({
  490. message: "验证有误,请重新输入",
  491. type: 'warning'
  492. });
  493. }
  494. }
  495. });
  496. },
  497. //盖章
  498. contractSigning(){
  499. const loading = this.$loading({
  500. lock: true,
  501. text: 'Loading',
  502. background: 'rgba(0, 0, 0,0)'
  503. });
  504. contractSigning(this.financeData).then((response) => {
  505. loading.close();
  506. if(this.zfpAuthType == '02'){
  507. //关闭短信验证
  508. this.messageIsShow = false;
  509. }else if(this.zfpAuthType == '01'){
  510. //关闭人脸二维码
  511. this.faceIsShow = false;
  512. }
  513. //关闭文件弹框
  514. this.closePdfShow();
  515. //确权:状态为待确权
  516. if(this.zfiStatus == '00'){
  517. if(this.zfiCreateType == '0'){//申请
  518. this.msgSuccess("确权成功,融信已提交,"+this.receiveName+"签收");
  519. this.goParent();
  520. }else if(this.zfiCreateType == '2'){//供应商开立
  521. getFinanceSign(this.zfiId).then((response) => {
  522. //融信编号
  523. this.financeSignForm.zfiNumber = response.data.zfiNumber;
  524. //融信金额
  525. this.financeSignForm.zfiAmount = response.data.zfiAmount;
  526. //利率
  527. this.financeSignForm.zfiRate = response.data.zfiRate;
  528. //最长融信期限
  529. this.financeSignForm.intervalTime = response.data.intervalTime;
  530. //融信有效期
  531. this.financeSignForm.validity = response.data.validity;
  532. this.goShow = true;
  533. });
  534. }
  535. }else if(this.zfiStatus == '01' && this.zfiCreateType == '0'){//签收
  536. getFinanceSign(this.zfiId).then((response) => {
  537. //融信编号
  538. this.financeSignForm.zfiNumber = response.data.zfiNumber;
  539. //融信金额
  540. this.financeSignForm.zfiAmount = response.data.zfiAmount;
  541. //利率
  542. this.financeSignForm.zfiRate = response.data.zfiRate;
  543. //最长融信期限
  544. this.financeSignForm.intervalTime = response.data.intervalTime;
  545. //融信有效期
  546. this.financeSignForm.validity = response.data.validity;
  547. this.goShow = true;
  548. });
  549. }else if(this.zfiCreateType == '1' && this.zfiCoreStatus == '01' && !this.zfiStatus){//核心开立
  550. this.msgSuccess("开立成功,融信已提交"+this.receiveName+"签收");
  551. this.goParent();
  552. }else if(this.zfiCreateType == '2' && this.zfiPlatformStatus == '01' && this.zfiSupplierStatus == '01' && !this.zfiStatus){
  553. //融资开立盖章
  554. this.msgSuccess("开立成功,待:"+this.openName+"确权;确权结果请留意待办事项与站内消息");
  555. this.goParent();
  556. }else if(scope.row.zfiCreateType == '1' && this.zfiSupplierStatus == '01' && this.zfiPlatformStatus == '01'){//补充资料
  557. getFinanceSign(this.zfiId).then((response) => {
  558. //融信编号
  559. this.financeSignForm.zfiNumber = response.data.zfiNumber;
  560. //融信金额
  561. this.financeSignForm.zfiAmount = response.data.zfiAmount;
  562. //利率
  563. this.financeSignForm.zfiRate = response.data.zfiRate;
  564. //最长融信期限
  565. this.financeSignForm.intervalTime = response.data.intervalTime;
  566. //融信有效期
  567. this.financeSignForm.validity = response.data.validity;
  568. this.goShow = true;
  569. });
  570. }
  571. }).catch((response) => {
  572. loading.close();
  573. });
  574. },
  575. //校验授权编号验证码
  576. checkProCode(){
  577. if(!this.projectForm.code){
  578. this.$message({
  579. message: "请输入验证码",
  580. type: 'warning'
  581. });
  582. return;
  583. }
  584. //项目编号
  585. this.projectForm.projectCode = this.projectCode;
  586. //校验验证码
  587. checkProCode(this.projectForm).then((response) => {
  588. if(response.data){
  589. //结果
  590. var verification = response.data.verification;
  591. //匹配
  592. if("60000000" == verification){
  593. //关闭弹框
  594. this.projectIsShow = false;
  595. /**
  596. * 申请确权:融资审批通过+核心通过+平台通过+融信待确权||
  597. * 核心开立:核心审批通过+其余状态为空
  598. * 融资开立:融资通过+平台通过+其余状态为空
  599. *
  600. */
  601. this.resetUpdate();
  602. //调用人脸
  603. if( (this.zfiSupplierStatus == '01' && this.zfiCoreStatus == '01' && this.zfiPlatformStatus == '01' && this.zfiStatus == '00') ||
  604. (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'))||
  605. (this.zfiSupplierStatus == '01' && this.zfiPlatformStatus == '01' && (this.zfiCoreStatus == '' || this.zfiCoreStatus == null || this.zfiCoreStatus == 'null') && (this.zfiStatus == '' || this.zfiStatus == null || this.zfiStatus == 'null'))){
  606. //选择签署意愿
  607. if(this.zfpAuthType == "00"){
  608. this.confirmIsShow = true;
  609. }else{
  610. this.checking();
  611. }
  612. }else{
  613. //直接盖章
  614. this.contractSigning();
  615. }
  616. }else {//不匹配
  617. this.$message({
  618. message: "验证有误,请重新输入",
  619. type: 'warning'
  620. });
  621. }
  622. }
  623. });
  624. },
  625. closePdfShow(){
  626. this.parent.closePdfShow();
  627. },
  628. //返回到列表页
  629. goParent(){
  630. this.parent.goParent();
  631. },
  632. //去融资
  633. goFinance(){
  634. //关闭当前页
  635. this.$store.dispatch(
  636. "tagsView/delView",
  637. this.$route
  638. );
  639. //关闭弹框
  640. this.goShow = false;
  641. //关闭文件弹框
  642. this.closePdfShow();
  643. Cookies.set("/credit/goFinance/"+this.zfiId + "/", this.$route.fullPath)
  644. this.$router.push({ path: "/credit/goFinance/"+this.zfiId + "/" });
  645. },
  646. /* 金额展示 */
  647. handleInput(str) {
  648. return amtformat(str, 2, ".", ",");
  649. },
  650. //格式化金额
  651. amtFormat(cellValue) {
  652. if(cellValue == null || cellValue== undefined || cellValue == ''){
  653. cellValue = '0.00'
  654. }
  655. cellValue += '';
  656.       if (!cellValue.includes('.')) {
  657. cellValue += '.00';
  658. }
  659.       return cellValue.replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
  660.         return $1 + ',';
  661.       }).replace(/\.$/, '');
  662. },
  663. /* // 将数字金额转换为大写金额 */
  664. smallToBig(money) {
  665. // 将数字金额转换为大写金额
  666. var cnNums = new Array(
  667. "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" ); //汉字的数字
  668. var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
  669. var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
  670. var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
  671. var cnInteger = "整"; //整数金额时后面跟的字符
  672. var cnIntLast = "元"; //整数完以后的单位
  673. //最大处理的数字
  674. var maxNum = 999999999999999.9999;
  675. var integerNum; //金额整数部分
  676. var decimalNum; //金额小数部分
  677. //输出的中文金额字符串
  678. var chineseStr = "";
  679. var parts; //分离金额后用的数组,预定义
  680. if (money == "" || money == null || money == undefined) {
  681. return "零元零角零分";
  682. }
  683. money = parseFloat(money);
  684. if (money >= maxNum) {
  685. //超出最大处理数字
  686. return "超出最大处理数字";
  687. }
  688. if (money == 0) {
  689. chineseStr = cnNums[0] + cnIntLast + cnInteger;
  690. return chineseStr;
  691. }
  692. //四舍五入保留两位小数,转换为字符串
  693. money = Math.round(money * 100).toString();
  694. integerNum = money.substr(0, money.length - 2);
  695. decimalNum = money.substr(money.length - 2);
  696. //获取整型部分转换
  697. if (parseInt(integerNum, 10) > 0) {
  698. var zeroCount = 0;
  699. var IntLen = integerNum.length;
  700. for (var i = 0; i < IntLen; i++) {
  701. var n = integerNum.substr(i, 1);
  702. var p = IntLen - i - 1;
  703. var q = p / 4;
  704. var m = p % 4;
  705. if (n == "0") {
  706. zeroCount++;
  707. } else {
  708. if (zeroCount > 0) {
  709. chineseStr += cnNums[0];
  710. }
  711. //归零
  712. zeroCount = 0;
  713. chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
  714. }
  715. if (m == 0 && zeroCount < 4) {
  716. chineseStr += cnIntUnits[q];
  717. }
  718. }
  719. chineseStr += cnIntLast;
  720. }
  721. //小数部分
  722. if (decimalNum != "") {
  723. var decLen = decimalNum.length;
  724. for (var i = 0; i < decLen; i++) {
  725. var n = decimalNum.substr(i, 1);
  726. if (n != "0") {
  727. chineseStr += cnNums[Number(n)] + cnDecUnits[i];
  728. }
  729. }
  730. }
  731. if (chineseStr == "") {
  732. chineseStr += cnNums[0] + cnIntLast + cnInteger;
  733. } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
  734. chineseStr += cnInteger;
  735. }
  736. return chineseStr;
  737. },
  738. },
  739. };
  740. </script>