pdfShow.vue 32 KB

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