|
@@ -0,0 +1,660 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <span style="float: right; margin-right: 125px;">创建人{{ user }}</span>
|
|
|
+ <span style="float: right; margin-right: 125px;">创建时间:{{ time }}</span>
|
|
|
+ <span style="float: right; margin-right: 125px;">融资编号:{{ number }}</span>
|
|
|
+ <el-form ref="form" label-position="top" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-divider content-position="left">融资信息</el-divider>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="融信编号" prop="zfrFinanceId" >
|
|
|
+ <el-select v-model="form.zfrFinanceId" style="width : 284px" clearable disabled>
|
|
|
+ <el-option
|
|
|
+ v-for="(item,index) in financeInfList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.zfiNumber"
|
|
|
+ :value="item.zfiId"
|
|
|
+ @click.native="amount(item)"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="融资金额" prop="zfrAmount" >
|
|
|
+ <el-input v-model="form.zfrAmount" placeholder="请输入融资金额" style="width: 284px;" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="融资账户" prop="zfrCollectionAccount" v-if="this.form.zfpcrLoantype != '0'" >
|
|
|
+ <el-input v-model="form.zfrCollectionAccount" placeholder="请输入融资账户" style="width: 284px;" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="承诺还款日" prop="zfrRepaymentDate" >
|
|
|
+ <el-input v-model="form.zfrRepaymentDate" placeholder="请输入承诺还款日" style="width: 284px;" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="融资利率" prop="zfrRate" v-if="false" >
|
|
|
+ <el-input v-model="form.zfrRate" placeholder="请输入融资利率" style="width: 284px;" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="融资放款方式" prop="zfpcrLoantype" label-width="90px" v-if="false" >
|
|
|
+ <el-input v-model="form.zfpcrLoantype" placeholder="请输入融资账户" style="width: 284px;" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="融资产品" prop="zfiProductId" v-if="false" >
|
|
|
+ <el-input v-model="form.zfiProductId" placeholder="请输入融资产品" style="width: 284px;" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <el-divider content-position="left">应收账款</el-divider>
|
|
|
+ <span style="float: right; margin-right: 125px;">金额大写:{{ smallToBig(allAmount()) }}</span>
|
|
|
+ <span style="float: right; margin-right: 125px;">消费金额:{{ allAmount() }} 元</span>
|
|
|
+ <el-table :data="billInfList" >
|
|
|
+ <el-table-column label="序号" type="index" width="50" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="编号" align="center" prop="zbiNumber" />
|
|
|
+ <el-table-column label="账款名称" align="center" prop="zbiName" />
|
|
|
+ <el-table-column label="应收企业" align="center" prop="payee" />
|
|
|
+ <el-table-column label="应付企业" align="center" prop="payer" />
|
|
|
+ <el-table-column label="还款时间" align="center" prop="zbiPayDate" />
|
|
|
+ <el-table-column label="金额" align="center" prop="zbiAmount" />
|
|
|
+ </el-table>
|
|
|
+ <!-- 发票附件 -->
|
|
|
+ <el-divider content-position="left">发票附件</el-divider>
|
|
|
+ <el-table :data="invoiceFileList" border style="width: 100%">
|
|
|
+ <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="handleDetail(scope.row)"
|
|
|
+ >下载</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- 合同附件 -->
|
|
|
+ <el-divider content-position="left">合同附件</el-divider>
|
|
|
+ <el-table :data="contractFileList" border style="width: 100%">
|
|
|
+ <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="handleDetail(scope.row)"
|
|
|
+ >下载</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- 其他附件 -->
|
|
|
+ <el-divider content-position="left">其他附件</el-divider>
|
|
|
+ <el-table :data="otherFileList" border style="width: 100%">
|
|
|
+ <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="handleDetail(scope.row)"
|
|
|
+ >下载</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="footer" style="float: right;
|
|
|
+ margin-bottom:2px;">
|
|
|
+ <el-button type="success" @click="getContractFile">预览文件</el-button>
|
|
|
+ <el-button type="primary" @click="selectType">签署</el-button>
|
|
|
+ <el-button @click="cancel">取消</el-button>
|
|
|
+ </div>
|
|
|
+ <el-dialog
|
|
|
+ title="预览"
|
|
|
+ :visible.sync="pdfShowDialog"
|
|
|
+ width="30%">
|
|
|
+ <pdf-show :pdfFileList="pdfFileList">
|
|
|
+ </pdf-show>
|
|
|
+ </el-dialog>
|
|
|
+ <!--选择签署意愿类型-->
|
|
|
+ <el-dialog :visible.sync="confirmIsShow" width="600px" append-to-body :before-close = "cancelUpdate" center>
|
|
|
+ <el-form ref="updateForm" :disabled="false" :model="updateForm" v-if="confirmIsShow" label-width="150px" class="demo-form-inline" :inline="true">
|
|
|
+ <el-radio-group v-model="updateForm.radio">
|
|
|
+ <el-radio label="01">人脸</el-radio>
|
|
|
+ <el-radio label="02">短信</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="confirmSelect">确 定</el-button>
|
|
|
+ <el-button @click="cancelUpdate">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!--短信-->
|
|
|
+ <el-dialog :visible.sync="messageIsShow" width="600px" append-to-body :before-close = "cancelMessage" center>
|
|
|
+ <el-form ref="messageForm" :disabled="false" :model="messageForm" v-if="messageIsShow" label-width="150px" class="demo-form-inline" :inline="true">
|
|
|
+ <el-form-item label="验证码" prop="validCode">
|
|
|
+ <el-input v-model="messageForm.validCode" style="width: 200px" maxlength="6"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="success" @click="send">发送验证码</el-button>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="checkCode">确定</el-button>
|
|
|
+ <el-button @click="cancelMessage">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!--人脸二维码-->
|
|
|
+ <el-dialog :visible.sync="faceIsShow" width="500px" append-to-body :before-close = "cancelFace" center>
|
|
|
+ <img :src="'data:image/jpeg;base64,' + this.fileUrl" style="overflow: auto; width: 100%; height: 100%;"/>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { listRecord, getRecord, delRecord, addRecord, updateRecord ,listBillInf,getContractFile,contractSigning} from "@/api/service/financeRecord/record";
|
|
|
+import { listFinanceInf } from "@/api/common/financeInf";
|
|
|
+import {getCreditDetail,getFile} from "@/api/service/credit/credit";
|
|
|
+import {accAdd} from "@/utils/calculation";
|
|
|
+import {sendMessage,checkCode,faceAuth,checkFaceAuth} from "@/api/service/credit/message";
|
|
|
+import pdfShow from "../credit/pdfShow";
|
|
|
+import {getToken} from "@/utils/auth";
|
|
|
+export default {
|
|
|
+ name: "RecordSeal",
|
|
|
+ components: {pdfShow},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ //融信信息
|
|
|
+ zcFinanceInf:{},
|
|
|
+ //融资编号
|
|
|
+ number: '',
|
|
|
+ //创建时间
|
|
|
+ time: '',
|
|
|
+ //创建人
|
|
|
+ user: '',
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 表单参数
|
|
|
+ form: {
|
|
|
+
|
|
|
+ },
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ },
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ //标题
|
|
|
+ tableTitle:"",
|
|
|
+ //控制收款账号是否显示
|
|
|
+ isShow:false,
|
|
|
+ //获取类型
|
|
|
+ createType:'',
|
|
|
+ //获取融信的类型
|
|
|
+ zfiStatus:'',
|
|
|
+ //融资方审批状态
|
|
|
+ zfiSupplierStatus:'',
|
|
|
+ //合同附件
|
|
|
+ contractFileList:[],
|
|
|
+ //发票附件
|
|
|
+ invoiceFileList:[],
|
|
|
+ //其他文件
|
|
|
+ otherFileList:[],
|
|
|
+
|
|
|
+
|
|
|
+ //融信编号数据
|
|
|
+ financeInfList: [],
|
|
|
+ //应收账款
|
|
|
+ billInfList: [],
|
|
|
+ pdfShowDialog : false,
|
|
|
+ pdfFileList : [],
|
|
|
+ //展示选择意愿
|
|
|
+ confirmIsShow:false,
|
|
|
+ //意愿
|
|
|
+ updateForm:{},
|
|
|
+ //意愿类型
|
|
|
+ zfpAuthType:'',
|
|
|
+ //短信展示
|
|
|
+ messageIsShow:false,
|
|
|
+ //短信
|
|
|
+ messageForm:{validCode:""},
|
|
|
+ //人脸二维码
|
|
|
+ fileUrl:"",
|
|
|
+ //控制人脸二维码是否展示
|
|
|
+ faceIsShow:false,
|
|
|
+ //人脸验证结果
|
|
|
+ faceResult:"",
|
|
|
+ //人脸识别结果传参
|
|
|
+ authForm:{},
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ zfrFinanceId: null,
|
|
|
+ zfrNumber: null,
|
|
|
+ zfrAmount: null,
|
|
|
+ zfrRate: null,
|
|
|
+ zfrHandler: null,
|
|
|
+ zfrRepaymentDate: null,
|
|
|
+ zfrApplyDate: null,
|
|
|
+ zfrLoanDate: null,
|
|
|
+ zfrApplyAmount: null,
|
|
|
+ zfrApplyType: null,
|
|
|
+ zfrStatus: null,
|
|
|
+ zfrApproveStt: null,
|
|
|
+ zfpcrLoantype: null,
|
|
|
+ zfiProductId: null
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ const zfrId = this.$route.params && this.$route.params.zfrId;
|
|
|
+ getRecord(zfrId).then((response) => {
|
|
|
+ debugger
|
|
|
+ this.zcFinanceInf = response.data.zcFinanceInf;
|
|
|
+ this.number = response.data.zfrNumber;
|
|
|
+ //意愿类型
|
|
|
+ this.zfpAuthType = response.data.zfpAuthType;
|
|
|
+ this.time = this.parseTime(new Date(response.data.createTime),'{y}-{m}-{d} {h}:{m}:{s}');
|
|
|
+ this.user = response.data.createUser;
|
|
|
+ const zfrFinanceId = response.data.zfrFinanceId;
|
|
|
+ listFinanceInf(zfrFinanceId).then(response => {
|
|
|
+ this.financeInfList = response.data;
|
|
|
+ })
|
|
|
+ listBillInf(zfrFinanceId).then(response => {
|
|
|
+ this.billInfList = response.data;
|
|
|
+ }).then(() =>{
|
|
|
+ var queryParamsFile = {};
|
|
|
+ queryParamsFile.ticketList = this.billInfList;
|
|
|
+ getFile(queryParamsFile).then((response) => {
|
|
|
+ if(response.data){
|
|
|
+ //获取发票文件
|
|
|
+ this.invoiceFileList = response.data.invoiceFileList;
|
|
|
+ //获取合同文件
|
|
|
+ this.contractFileList = response.data.contractFileList;
|
|
|
+ //获取其他文件
|
|
|
+ this.otherFileList = response.data.otherFileList;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).then(() =>{
|
|
|
+ this.form = response.data;
|
|
|
+ this.$set(this.form, "zfrRepaymentDate", this.parseTime(new Date(response.data.zfrRepaymentDate),'{y}-{m}-{d}'));
|
|
|
+
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
+ this.$router.go(-1);
|
|
|
+ },
|
|
|
+ /* 多选框跨页 */
|
|
|
+ rowkeyCustomer(row) {
|
|
|
+ return row.cciId;
|
|
|
+ },
|
|
|
+ //重新合计
|
|
|
+ getReTotal(chooseTicket){
|
|
|
+ //合计
|
|
|
+ this.checkTotalAmt = "0.00";
|
|
|
+ for(var i = 0; i < chooseTicket.length;i++){
|
|
|
+ this.checkTotalAmt = accAdd(this.checkTotalAmt,chooseTicket[i].zbiAmount,2);
|
|
|
+ }
|
|
|
+ this.checkTotalBigAmt = this.smallToBig(this.checkTotalAmt);
|
|
|
+ this.checkTotalAmt = this.amtFormat(this.checkTotalAmt);
|
|
|
+ },
|
|
|
+ //获取附件信息
|
|
|
+ getFile(datas){
|
|
|
+ var queryParamsFile = {};
|
|
|
+ queryParamsFile.ticketList = datas;
|
|
|
+ getFile(queryParamsFile).then((response) => {
|
|
|
+ if(response.data){
|
|
|
+ //获取发票文件
|
|
|
+ this.invoiceFileList = response.data.invoiceFileList;
|
|
|
+ //获取合同文件
|
|
|
+ this.contractFileList = response.data.contractFileList;
|
|
|
+ //获取其他文件
|
|
|
+ this.otherFileList = response.data.otherFileList;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //格式化金额
|
|
|
+ amtFormat(cellValue) {
|
|
|
+ if(cellValue == null || cellValue== undefined || cellValue == ''){
|
|
|
+ cellValue = '0.00'
|
|
|
+ }
|
|
|
+ cellValue += '';
|
|
|
+ if (!cellValue.includes('.')) {
|
|
|
+ cellValue += '.00';
|
|
|
+ }
|
|
|
+ return cellValue.replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
|
|
|
+ return $1 + ',';
|
|
|
+ }).replace(/\.$/, '');
|
|
|
+ },
|
|
|
+ //应收账款合计
|
|
|
+ allAmount() {
|
|
|
+ var strarr = [0.00];
|
|
|
+ for (let i in this.billInfList) {
|
|
|
+ strarr.push(this.billInfList[i]["zbiAmount"]);
|
|
|
+ }
|
|
|
+ return Math.floor(eval(strarr.join("+")) * 100) / 100; //结果
|
|
|
+ },
|
|
|
+ /* // 将数字金额转换为大写金额 */
|
|
|
+ smallToBig(money) {
|
|
|
+ // 将数字金额转换为大写金额
|
|
|
+ var cnNums = new Array(
|
|
|
+ "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" ); //汉字的数字
|
|
|
+ var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
|
|
|
+ var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
|
|
|
+ var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
|
|
|
+ var cnInteger = "整"; //整数金额时后面跟的字符
|
|
|
+ var cnIntLast = "元"; //整数完以后的单位
|
|
|
+ //最大处理的数字
|
|
|
+ var maxNum = 999999999999999.9999;
|
|
|
+ var integerNum; //金额整数部分
|
|
|
+ var decimalNum; //金额小数部分
|
|
|
+ //输出的中文金额字符串
|
|
|
+ var chineseStr = "";
|
|
|
+ var parts; //分离金额后用的数组,预定义
|
|
|
+ if (money == "" || money == null || money == undefined) {
|
|
|
+ return "零元零角零分";
|
|
|
+ }
|
|
|
+ money = parseFloat(money);
|
|
|
+ if (money >= maxNum) {
|
|
|
+ //超出最大处理数字
|
|
|
+ return "超出最大处理数字";
|
|
|
+ }
|
|
|
+ if (money == 0) {
|
|
|
+ chineseStr = cnNums[0] + cnIntLast + cnInteger;
|
|
|
+ return chineseStr;
|
|
|
+ }
|
|
|
+ //四舍五入保留两位小数,转换为字符串
|
|
|
+ money = Math.round(money * 100).toString();
|
|
|
+ integerNum = money.substr(0, money.length - 2);
|
|
|
+ decimalNum = money.substr(money.length - 2);
|
|
|
+ //获取整型部分转换
|
|
|
+ if (parseInt(integerNum, 10) > 0) {
|
|
|
+ var zeroCount = 0;
|
|
|
+ var IntLen = integerNum.length;
|
|
|
+ for (var i = 0; i < IntLen; i++) {
|
|
|
+ var n = integerNum.substr(i, 1);
|
|
|
+ var p = IntLen - i - 1;
|
|
|
+ var q = p / 4;
|
|
|
+ var m = p % 4;
|
|
|
+ if (n == "0") {
|
|
|
+ zeroCount++;
|
|
|
+ } else {
|
|
|
+ if (zeroCount > 0) {
|
|
|
+ chineseStr += cnNums[0];
|
|
|
+ }
|
|
|
+ //归零
|
|
|
+ zeroCount = 0;
|
|
|
+ chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
|
|
|
+ }
|
|
|
+ if (m == 0 && zeroCount < 4) {
|
|
|
+ chineseStr += cnIntUnits[q];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ chineseStr += cnIntLast;
|
|
|
+ }
|
|
|
+ //小数部分
|
|
|
+ if (decimalNum != "") {
|
|
|
+ var decLen = decimalNum.length;
|
|
|
+ for (var i = 0; i < decLen; i++) {
|
|
|
+ var n = decimalNum.substr(i, 1);
|
|
|
+ if (n != "0") {
|
|
|
+ chineseStr += cnNums[Number(n)] + cnDecUnits[i];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (chineseStr == "") {
|
|
|
+ chineseStr += cnNums[0] + cnIntLast + cnInteger;
|
|
|
+ } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
|
|
|
+ chineseStr += cnInteger;
|
|
|
+ }
|
|
|
+ return chineseStr;
|
|
|
+ },
|
|
|
+ //取消选择意愿
|
|
|
+ cancelUpdate(){
|
|
|
+ this.confirmIsShow = false;
|
|
|
+ this.resetUpdate();
|
|
|
+ },
|
|
|
+ //关闭短信
|
|
|
+ cancelMessage(){
|
|
|
+ this.messageIsShow = false;
|
|
|
+ this.resetMessage();
|
|
|
+ },
|
|
|
+ //关闭二维码
|
|
|
+ cancelFace(){
|
|
|
+ this.faceIsShow = false;
|
|
|
+ },
|
|
|
+ resetUpdate() {
|
|
|
+ this.updateForm = {
|
|
|
+ radio:""
|
|
|
+ };
|
|
|
+ //意愿类型还原为全部
|
|
|
+ this.zfpAuthType ="00";
|
|
|
+ this.resetForm("updateForm");
|
|
|
+ },
|
|
|
+ resetMessage() {
|
|
|
+ this.messageForm = {
|
|
|
+ validCode:""
|
|
|
+ };
|
|
|
+ this.resetForm("messageForm");
|
|
|
+ },
|
|
|
+ //获取合同文件
|
|
|
+ getContractFile(){
|
|
|
+
|
|
|
+ getContractFile(this.zcFinanceInf).then((response) => {
|
|
|
+ if(response.data.list){
|
|
|
+ this.pdfFileList = response.data.list;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //文件存在
|
|
|
+ if(this.pdfFileList.length > 0 ){
|
|
|
+ this.pdfShowDialog = true;
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //选择类型
|
|
|
+ selectType(){
|
|
|
+ //选择签署意愿
|
|
|
+ if(this.zfpAuthType == "00"){
|
|
|
+ this.confirmIsShow = true;
|
|
|
+ }else{
|
|
|
+ this.checking();
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //文件下载
|
|
|
+ handleDownload(row){
|
|
|
+ const pfiUrl = row.pfiUrl;
|
|
|
+ if(pfiUrl != null && pfiUrl != ''){
|
|
|
+ window.open(pfiUrl +"/"+ getToken());
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: '该附件不存在!',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //确认选择
|
|
|
+ confirmSelect(){
|
|
|
+ if(!this.updateForm.radio){
|
|
|
+ this.$message({
|
|
|
+ message: '请选择签署意愿类型',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.confirmIsShow = false;
|
|
|
+ this.zfpAuthType = this.updateForm.radio;
|
|
|
+ //调用人脸识别或者短信验证
|
|
|
+ this.checking();
|
|
|
+ },
|
|
|
+ //去签署
|
|
|
+ checking(){
|
|
|
+ //人脸
|
|
|
+ if(this.zfpAuthType == '01'){
|
|
|
+ //调用人脸识别生成二维码
|
|
|
+ faceAuth().then((response) => {
|
|
|
+ if(response.data){
|
|
|
+ //获取二维码
|
|
|
+ this.fileUrl = response.data.fileUrl;
|
|
|
+ //获取源流水号
|
|
|
+ var originalTxSN = response.data.originalTxSN;
|
|
|
+ this.faceIsShow = true;
|
|
|
+ //每5秒查证人脸识别结果
|
|
|
+ var timeInterval = window.setInterval(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ //源流水不为空并且结果为空
|
|
|
+ if(originalTxSN && !this.faceResult){
|
|
|
+ this.authForm.originalTxSN = originalTxSN;
|
|
|
+ //调用查证方法
|
|
|
+ checkFaceAuth(this.authForm).then((res) => {
|
|
|
+ //认证结果
|
|
|
+ this.faceResult = res.data.Verification;
|
|
|
+ //成功
|
|
|
+ if(this.faceResult == '20'){
|
|
|
+ this.msgSuccess("验证成功");
|
|
|
+ //关闭验证码
|
|
|
+ this.faceIsShow = false;
|
|
|
+ //关闭定时
|
|
|
+ window.clearInterval(timeInterval);
|
|
|
+ //调用盖章
|
|
|
+ this.contractSigning();
|
|
|
+ }else if(this.faceResult == '30'){
|
|
|
+ this.$message({
|
|
|
+ message: "验证失败",
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ //关闭验证码
|
|
|
+ this.faceIsShow = false;
|
|
|
+ window.clearInterval(timeInterval);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, 0)
|
|
|
+ },10000)
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }else if(this.zfpAuthType == '02'){//短信
|
|
|
+ this.messageIsShow = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //发送短信验证码
|
|
|
+ send(){
|
|
|
+ //发送
|
|
|
+ sendMessage().then((response) => {
|
|
|
+ if(response.data){
|
|
|
+ //手机号
|
|
|
+ var newIphone = response.data.newIphone;
|
|
|
+ //结果
|
|
|
+ var result = response.data.result;
|
|
|
+ //成功
|
|
|
+ if("20" == result){
|
|
|
+ this.$message({
|
|
|
+ message: "已向经办人手机号为"+newIphone+"发送短信验证码,请注意查收",
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }else if("10" == result){//失败
|
|
|
+ this.$message({
|
|
|
+ message: "短信发送失败",
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ //校验验证码是否正确
|
|
|
+ checkCode(){
|
|
|
+ if(!this.messageForm.validCode){
|
|
|
+ this.$message({
|
|
|
+ message: "请输入验证码",
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //校验验证码
|
|
|
+ checkCode(this.messageForm).then((response) => {
|
|
|
+ if(response.data){
|
|
|
+ //结果
|
|
|
+ var verification = response.data.verification;
|
|
|
+ //匹配
|
|
|
+ if("20" == verification){
|
|
|
+ //进行下一步-- 盖章
|
|
|
+ this.contractSigning();
|
|
|
+ }else if("30" == verification){//不匹配
|
|
|
+ this.$message({
|
|
|
+ message: "验证有误,请重新输入",
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //盖章
|
|
|
+ contractSigning(){
|
|
|
+ contractSigning(this.zcFinanceInf).then((response) => {
|
|
|
+ this.msgSuccess("盖章成功");
|
|
|
+ if(this.zfpAuthType == '02'){
|
|
|
+ //关闭短信验证
|
|
|
+ this.messageIsShow = false;
|
|
|
+ }else if(this.zfpAuthType == '01'){
|
|
|
+ //关闭人脸二维码
|
|
|
+ this.faceIsShow = false;
|
|
|
+ }
|
|
|
+ this.$store.dispatch(
|
|
|
+ "tagsView/delView",
|
|
|
+ this.$route
|
|
|
+ );
|
|
|
+ this.$router.go(-1);
|
|
|
+ }).catch((response) => {
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+
|
|
|
+.uoloadfj .el-upload--picture-card{
|
|
|
+ width:110px;
|
|
|
+ height:110px;
|
|
|
+ line-height:110px;
|
|
|
+}
|
|
|
+.fjUoloadSty .el-upload--picture-card{
|
|
|
+ display:none;
|
|
|
+}
|
|
|
+
|
|
|
+table th.star div::before {
|
|
|
+ content: '*';
|
|
|
+ color: red;
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|