瀏覽代碼

TASK 42268 右江银农:广西农商行支付对接短信

rongxin_dev
yangfuda 2 月之前
父節點
當前提交
1cda066931
共有 1 個檔案被更改,包括 110 行新增47 行删除
  1. +110
    -47
      src/views/sunVillage_info/bankAgriculture/paymentPending/approvalDetail.vue

+ 110
- 47
src/views/sunVillage_info/bankAgriculture/paymentPending/approvalDetail.vue 查看文件

@@ -126,7 +126,7 @@
</div>
</div>
<div v-if="form.doubleConfirmationStatus != 'Y' || !(form.doubleConfirmationUser == '' || form.doubleConfirmationUser == null)">
<div v-if="form.bankType == '1' || form.bankType == '2' || form.bankType == '3' || form.bankType == '5' || form.bankType == '9' || form.bankType == '10' || form.bankType == '18'">
<div v-if="form.bankType == '1' || form.bankType == '2' || form.bankType == '3' || form.bankType == '5' || (form.bankType == 7 && heilongjiang) || form.bankType == '9' || form.bankType == '10' || form.bankType == '18'">
<van-field label="支付口令" required :rules="[{ required: true , message:'请输入支付口令' }]" v-model="form.accountPassword" placeholder="请输入支付口令"
input-align="right" label-width="auto"/>
<div style="margin-top: 10xp;">
@@ -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);


Loading…
取消
儲存