pdfShow.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  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. //意愿类型
  154. zfpAuthTypeInit:'',
  155. zfpAuthType:'',
  156. //短信展示
  157. messageIsShow:false,
  158. //短信
  159. messageForm:{validCode:""},
  160. //人脸二维码
  161. fileUrl:"",
  162. //控制人脸二维码是否展示
  163. faceIsShow:false,
  164. //人脸验证结果
  165. faceResult:"",
  166. //人脸识别结果传参
  167. authForm:{},
  168. financeSignForm:{},
  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. zfiCreateType:""
  207. };
  208. },
  209. created() {
  210. getCreditDetail(this.zfiId).then((response) => {
  211. if(response.data){
  212. //融信状态
  213. this.zfiStatus = response.data.financeInf.zfiStatus;
  214. //融资方审批状态
  215. this.zfiSupplierStatus = response.data.financeInf.zfiSupplierStatus;
  216. //平台审批状态
  217. this.zfiPlatformStatus = response.data.financeInf.zfiPlatformStatus;
  218. //核心审批状态
  219. this.zfiCoreStatus = response.data.financeInf.zfiCoreStatus;
  220. //意愿类型
  221. this.zfpAuthType = response.data.zfpAuthType;
  222. this.zfpAuthTypeInit = response.data.zfpAuthType;
  223. //融信信息
  224. this.financeData = response.data.financeInf;
  225. //接收方
  226. this.receiveName = response.data.receiveName;
  227. //开立方
  228. this.openName = response.data.openName;
  229. //融信类型
  230. this.zfiCreateType = response.data.financeInf.zfiCreateType;
  231. }
  232. })
  233. this.dialogVisible = true;
  234. for(var i = 0 ; i < this.pdfFileList.length; i++){
  235. var base64 = this.pdfFileList[i].base64;
  236. <embed src="data:application/pdf;base64," type="application/pdf" title="Embedded PDF" style="overflow: auto; width: 100%; height: 100%;"/>
  237. }
  238. },
  239. methods: {
  240. handleClose(done) {
  241. this.$confirm("确认关闭?")
  242. .then((_) => {
  243. done();
  244. })
  245. .catch((_) => {});
  246. },
  247. selectChildType(){
  248. this.$parent.selectType();
  249. },
  250. //取消选择意愿
  251. cancelUpdate(){
  252. this.confirmIsShow = false;
  253. this.resetUpdate();
  254. },
  255. //关闭短信
  256. cancelMessage(){
  257. this.messageIsShow = false;
  258. this.resetMessage();
  259. },
  260. //关闭短信
  261. cancelProject(){
  262. this.projectIsShow = false;
  263. this.resetProject();
  264. },
  265. //关闭二维码
  266. cancelFace(){
  267. this.faceIsShow = false;
  268. },
  269. //回到父页
  270. cancelGo(){
  271. this.goShow = false;
  272. this.goParent();
  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. this.msgSuccess("确权成功,融信已生效");
  522. this.goParent();
  523. }
  524. }else if(this.zfiStatus == '01' && this.zfiCreateType == '0'){//签收
  525. getFinanceSign(this.zfiId).then((response) => {
  526. //融信编号
  527. this.financeSignForm.zfiNumber = response.data.zfiNumber;
  528. //融信金额
  529. this.financeSignForm.zfiAmount = response.data.zfiAmount;
  530. //利率
  531. this.financeSignForm.zfiRate = response.data.zfiRate;
  532. //最长融信期限
  533. this.financeSignForm.intervalTime = response.data.intervalTime;
  534. //融信有效期
  535. this.financeSignForm.validity = response.data.validity;
  536. this.goShow = true;
  537. });
  538. }else if(this.zfiCreateType == '1' && this.zfiCoreStatus == '01' && !this.zfiStatus){//核心开立
  539. this.msgSuccess("开立成功,融信已提交"+this.receiveName+"签收");
  540. this.goParent();
  541. }else if(this.zfiCreateType == '2' && this.zfiPlatformStatus == '01' && this.zfiSupplierStatus == '01' && !this.zfiStatus){
  542. //融资开立盖章
  543. this.msgSuccess("开立成功,待:"+this.openName+"确权;确权结果请留意待办事项与站内消息");
  544. this.goParent();
  545. }else if(this.zfiCreateType == '1' && this.zfiSupplierStatus == '01' && this.zfiPlatformStatus == '01'){//补充资料
  546. getFinanceSign(this.zfiId).then((response) => {
  547. //融信编号
  548. this.financeSignForm.zfiNumber = response.data.zfiNumber;
  549. //融信金额
  550. this.financeSignForm.zfiAmount = response.data.zfiAmount;
  551. //利率
  552. this.financeSignForm.zfiRate = response.data.zfiRate;
  553. //最长融信期限
  554. this.financeSignForm.intervalTime = response.data.intervalTime;
  555. //融信有效期
  556. this.financeSignForm.validity = response.data.validity;
  557. this.goShow = true;
  558. });
  559. }
  560. }).catch((response) => {
  561. loading.close();
  562. });
  563. },
  564. //校验授权编号验证码
  565. checkProCode(){
  566. if(!this.projectForm.code){
  567. this.$message({
  568. message: "请输入验证码",
  569. type: 'warning'
  570. });
  571. return;
  572. }
  573. //项目编号
  574. this.projectForm.projectCode = this.projectCode;
  575. //校验验证码
  576. checkProCode(this.projectForm).then((response) => {
  577. if(response.data){
  578. //结果
  579. var verification = response.data.verification;
  580. //匹配
  581. if("60000000" == verification){
  582. //关闭弹框
  583. this.projectIsShow = false;
  584. /**
  585. * 申请确权:融资审批通过+核心通过+平台通过+融信待确权||
  586. * 核心开立:核心审批通过+其余状态为空
  587. * 融资开立:融资通过+平台通过+其余状态为空
  588. *
  589. */
  590. this.resetUpdate();
  591. //调用人脸
  592. if( (this.zfiSupplierStatus == '01' && this.zfiCoreStatus == '01' && this.zfiPlatformStatus == '01' && this.zfiStatus == '00') ||
  593. (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'))||
  594. (this.zfiSupplierStatus == '01' && this.zfiPlatformStatus == '01' && (this.zfiCoreStatus == '' || this.zfiCoreStatus == null || this.zfiCoreStatus == 'null') && (this.zfiStatus == '' || this.zfiStatus == null || this.zfiStatus == 'null'))){
  595. //选择签署意愿
  596. if(this.zfpAuthType == "00"){
  597. this.confirmIsShow = true;
  598. }else{
  599. this.checking();
  600. }
  601. }else{
  602. //直接盖章
  603. this.contractSigning();
  604. }
  605. }else {//不匹配
  606. this.$message({
  607. message: "验证有误,请重新输入",
  608. type: 'warning'
  609. });
  610. }
  611. }
  612. });
  613. },
  614. closePdfShow(){
  615. this.parent.closePdfShow();
  616. },
  617. //返回到列表页
  618. goParent(){
  619. this.parent.goParent();
  620. },
  621. //去融资
  622. goFinance(){
  623. //关闭弹框
  624. this.goShow = false;
  625. this.goParent();
  626. Cookies.set("/credit/goFinance/"+this.zfiId + "/", this.$route.fullPath)
  627. this.$router.push({ path: "/credit/goFinance/"+this.zfiId + "/" });
  628. },
  629. /* 金额展示 */
  630. handleInput(str) {
  631. return amtformat(str, 2, ".", ",");
  632. },
  633. //格式化金额
  634. amtFormat(cellValue) {
  635. if(cellValue == null || cellValue== undefined || cellValue == ''){
  636. cellValue = '0.00'
  637. }
  638. cellValue += '';
  639.       if (!cellValue.includes('.')) {
  640. cellValue += '.00';
  641. }
  642.       return cellValue.replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
  643.         return $1 + ',';
  644.       }).replace(/\.$/, '');
  645. },
  646. /* // 将数字金额转换为大写金额 */
  647. smallToBig(money) {
  648. // 将数字金额转换为大写金额
  649. var cnNums = new Array(
  650. "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" ); //汉字的数字
  651. var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
  652. var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
  653. var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
  654. var cnInteger = "整"; //整数金额时后面跟的字符
  655. var cnIntLast = "元"; //整数完以后的单位
  656. //最大处理的数字
  657. var maxNum = 999999999999999.9999;
  658. var integerNum; //金额整数部分
  659. var decimalNum; //金额小数部分
  660. //输出的中文金额字符串
  661. var chineseStr = "";
  662. var parts; //分离金额后用的数组,预定义
  663. if (money == "" || money == null || money == undefined) {
  664. return "零元零角零分";
  665. }
  666. money = parseFloat(money);
  667. if (money >= maxNum) {
  668. //超出最大处理数字
  669. return "超出最大处理数字";
  670. }
  671. if (money == 0) {
  672. chineseStr = cnNums[0] + cnIntLast + cnInteger;
  673. return chineseStr;
  674. }
  675. //四舍五入保留两位小数,转换为字符串
  676. money = Math.round(money * 100).toString();
  677. integerNum = money.substr(0, money.length - 2);
  678. decimalNum = money.substr(money.length - 2);
  679. //获取整型部分转换
  680. if (parseInt(integerNum, 10) > 0) {
  681. var zeroCount = 0;
  682. var IntLen = integerNum.length;
  683. for (var i = 0; i < IntLen; i++) {
  684. var n = integerNum.substr(i, 1);
  685. var p = IntLen - i - 1;
  686. var q = p / 4;
  687. var m = p % 4;
  688. if (n == "0") {
  689. zeroCount++;
  690. } else {
  691. if (zeroCount > 0) {
  692. chineseStr += cnNums[0];
  693. }
  694. //归零
  695. zeroCount = 0;
  696. chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
  697. }
  698. if (m == 0 && zeroCount < 4) {
  699. chineseStr += cnIntUnits[q];
  700. }
  701. }
  702. chineseStr += cnIntLast;
  703. }
  704. //小数部分
  705. if (decimalNum != "") {
  706. var decLen = decimalNum.length;
  707. for (var i = 0; i < decLen; i++) {
  708. var n = decimalNum.substr(i, 1);
  709. if (n != "0") {
  710. chineseStr += cnNums[Number(n)] + cnDecUnits[i];
  711. }
  712. }
  713. }
  714. if (chineseStr == "") {
  715. chineseStr += cnNums[0] + cnIntLast + cnInteger;
  716. } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
  717. chineseStr += cnInteger;
  718. }
  719. return chineseStr;
  720. },
  721. },
  722. };
  723. </script>