diff --git a/src/views/sunVillage_info/bankAgriculture/paymentPending/approvalDetail.vue b/src/views/sunVillage_info/bankAgriculture/paymentPending/approvalDetail.vue index 05b919fd..b2cf6d30 100644 --- a/src/views/sunVillage_info/bankAgriculture/paymentPending/approvalDetail.vue +++ b/src/views/sunVillage_info/bankAgriculture/paymentPending/approvalDetail.vue @@ -126,7 +126,7 @@
-
+
@@ -168,11 +168,11 @@ name: "approvalDetail", data() { return { - clickOut:true, payStatus:false, smsStatus:false, sms_disabled:false, getPayStatus:false, + heilongjiang:false, smsText:'发送验证码', paySubmitDisabled:true, paySubmitDisabled1:false, @@ -208,6 +208,7 @@ transferStatusOptions:[], projectFundTypeDictionaries:[], projectList:[], + bankTypeList:[], chargeItme:[], chargeItmeShow:[], @@ -274,8 +275,10 @@ this.paySubmitDisabled1 = true; const id = this.form.id; this.queryParams.id = id; + this.queryParams.uuid = this.form.uuid; this.queryParams.alternateField1 = this.form.alternateField1; let queryParams = this.queryParams; + const bankType = this.form.bankType; var that = this; // that.payLoading = this.$loading({ // lock: true, @@ -283,68 +286,123 @@ // spinner: 'el-icon-loading', // background: 'rgba(0, 0, 0, 0.7)' // }); - pay(queryParams).then((response) => { - // that.payLoading.close(); - this.$toast.success("支付成功,请等待银行进行处理,稍后可通过查询结果按钮查询银行处理结果。"); - clearTimeout(this.sms_timer); - this.open = false; - this.smsStatus = false; - this.sms_disabled = false; - this.smsText = "发送验证码"; - setTimeout(function(){ - history.go(-1) - },1000) - }) - .catch((err) => { - // that.payLoading.close(); - if(err.toString().indexOf('错误代码:-1') == -1 && err.toString().indexOf('错误代码:-2') == -1){ - this.getList(); + if(bankType == "8"){ + sendSms(queryParams).then(res=>{ + that.$toast.success(res.msg); clearTimeout(this.sms_timer); - this.open = false; this.smsStatus = false; this.sms_disabled = false; this.smsText = "发送验证码"; - } - setTimeout(function(){ - history.go(-1) - },2000) - }); + setTimeout(function(){ + history.go(-1) + },1000) + }).catch((err) => { + // that.payLoading.close(); + if(err.toString().indexOf('验证码') !== -1){ + this.paySubmitDisabled = false; + return + }else if(err.toString().indexOf('错误代码:-1') == -1 && err.toString().indexOf('错误代码:-2') == -1){ + this.getList(); + clearTimeout(this.sms_timer); + this.smsStatus = false; + this.sms_disabled = false; + this.smsText = "发送验证码"; + } + setTimeout(function(){ + history.go(-1) + },2000) + }); + }else{ + pay(queryParams).then((response) => { + // that.payLoading.close(); + this.$toast.success("支付成功,请等待银行进行处理,稍后可通过查询结果按钮查询银行处理结果。"); + clearTimeout(this.sms_timer); + this.smsStatus = false; + this.sms_disabled = false; + this.smsText = "发送验证码"; + setTimeout(function(){ + history.go(-1) + },1000) + }) + .catch((err) => { + // that.payLoading.close(); + if(err.toString().indexOf('验证码') !== -1){ + this.paySubmitDisabled = false; + return + }else if(err.toString().indexOf('错误代码:-1') == -1 && err.toString().indexOf('错误代码:-2') == -1){ + this.getList(); + clearTimeout(this.sms_timer); + this.smsStatus = false; + this.sms_disabled = false; + this.smsText = "发送验证码"; + } + setTimeout(function(){ + history.go(-1) + },2000) + }); + } }, getSendSms(){ + var that = this; clearTimeout(this.sms_timer); this.form.alternateField1 = ''; this.sms_time = 60; - this.clickOut = false; this.sms_disabled = true; const id = this.form.id; const bankType = this.form.bankType; this.queryParams.id = id; this.queryParams.bankType = bankType; let queryParams = this.queryParams; - sendSms(queryParams).then(res=>{ - console.log(res.msg) - if (res.msg.indexOf('短信发送失败') == -1){ - this.paySubmitDisabled = false; - this.$toast.success(res.msg); - this.smsStatus = true; - this.smsText = this.sms_time+'s后可重新发送'; - this.sms_timer = setInterval(()=>{ - this.sms_time--; + if(bankType == "8"){ + return pay(queryParams).then((res) => { + this.paySubmitDisabled = false; + this.smsStatus = true; this.smsText = this.sms_time+'s后可重新发送'; - if (this.sms_time == 0){ - clearInterval(this.sms_timer); - this.sms_time = 60 ; - this.smsText = '发送验证码'; - this.sms_disabled = false; - this.clickOut = true; - } - },1000) - }else{ - this.sms_disabled = false; + this.sms_timer = setInterval(()=>{ + this.sms_time--; + this.smsText = this.sms_time+'s后可重新发送'; + if (this.sms_time == 0){ + clearInterval(this.sms_timer); + this.sms_time = 60 ; + this.smsText = '发送验证码'; + this.sms_disabled = false; + } + },1000) + this.$toast.success("手机验证码已发送"); + }) + }else{ + sendSms(queryParams).then(res=>{ console.log(res.msg) - this.$toast.error(res.msg); - } - }); + if (res.msg.indexOf('短信发送失败') == -1){ + if(this.form.bankType == '7' && !this.heilongjiang){ + var uuid = res.msg; + this.form.uuid = uuid; + this.$toast.success("短信发送成功,请注意查收。"); + }else{ + this.$toast.success(res.msg); + } + this.paySubmitDisabled = false; + this.smsStatus = true; + this.smsText = this.sms_time+'s后可重新发送'; + this.sms_timer = setInterval(()=>{ + this.sms_time--; + this.smsText = this.sms_time+'s后可重新发送'; + if (this.sms_time == 0){ + clearInterval(this.sms_timer); + this.sms_time = 60 ; + this.smsText = '发送验证码'; + this.sms_disabled = false; + } + },1000) + } + }).catch((err) => { + clearInterval(this.sms_timer); + that.sms_time = 60 ; + that.smsText = '发送验证码'; + that.sms_disabled = false; + this.msgError(res.msg); + }); + } }, editDoubleConfirmationStatus(){ let id = this.form.id @@ -523,6 +581,11 @@ for (var i = 0; i < res.data.length; i++) { this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); } + res.data.map(res => { + if(res.dictValue == 7 && res.dictLabel.includes("黑龙江")){ + this.heilongjiang = true; + } + }); for (var j = 0 ; j < response.rows.length ; j++){ response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); response.rows[j].transferStatus = this.selectDictLabel(this.transferStatusOptions, response.rows[j].transferStatus);