|
@@ -34,8 +34,21 @@
|
|
</view>
|
|
</view>
|
|
<u-radio name="shouxin" :disabled="balanceInfo.grantSurplus<params.payAmount" activeColor="#1677FF" size="36rpx"></u-radio>
|
|
<u-radio name="shouxin" :disabled="balanceInfo.grantSurplus<params.payAmount" activeColor="#1677FF" size="36rpx"></u-radio>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="repayment-time pay-way-item u-flex u-row-between" @click="showDate = true" v-if="params.paymentMode === 'shouxin'">
|
|
|
|
+ <view class="label">账期</view>
|
|
|
|
+ <view class="value">{{ params.rePaymentTime||'请选择账期' }}</view>
|
|
|
|
+ </view>
|
|
</u-radio-group>
|
|
</u-radio-group>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-datetime-picker
|
|
|
|
+ :show="showDate"
|
|
|
|
+ :value="params.rePaymentTime"
|
|
|
|
+ mode="date"
|
|
|
|
+ @confirm="confirmDateChange"
|
|
|
|
+ @cancel="showDate = false"
|
|
|
|
+ :minDate="minDate"
|
|
|
|
+ :maxDate="maxDate"
|
|
|
|
+ ></u-datetime-picker>
|
|
<view class="full-btn" v-if="params.paymentMode&&cansubmit" @click="payRoute">去支付<text>¥ {{params.payAmount}}</text></view>
|
|
<view class="full-btn" v-if="params.paymentMode&&cansubmit" @click="payRoute">去支付<text>¥ {{params.payAmount}}</text></view>
|
|
<view class="full-btn gray" v-else>去支付<text>¥ {{params.payAmount}}</text></view>
|
|
<view class="full-btn gray" v-else>去支付<text>¥ {{params.payAmount}}</text></view>
|
|
<u-popup :show="checkPassShow" @close="checkPassClose" mode="center">
|
|
<u-popup :show="checkPassShow" @close="checkPassClose" mode="center">
|
|
@@ -87,6 +100,7 @@
|
|
openid:'',
|
|
openid:'',
|
|
payAmount:'',
|
|
payAmount:'',
|
|
payResult:{},
|
|
payResult:{},
|
|
|
|
+ rePaymentTime: '',
|
|
},
|
|
},
|
|
checkPassShow:false,
|
|
checkPassShow:false,
|
|
paypass:'',
|
|
paypass:'',
|
|
@@ -101,6 +115,9 @@
|
|
cansubmit:true,
|
|
cansubmit:true,
|
|
needPayQuery:0,
|
|
needPayQuery:0,
|
|
payerId:'',
|
|
payerId:'',
|
|
|
|
+ showDate: false,
|
|
|
|
+ minDate: new Date().getTime(),
|
|
|
|
+ maxDate: new Date(new Date().getFullYear() + 1, 11, 31).getTime(),
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow(page) {
|
|
onShow(page) {
|
|
@@ -157,12 +174,19 @@
|
|
this.checkPassShow = false;
|
|
this.checkPassShow = false;
|
|
},
|
|
},
|
|
payRoute(){
|
|
payRoute(){
|
|
- this.cansubmit = false;
|
|
|
|
if(this.params.paymentMode!='wx'){
|
|
if(this.params.paymentMode!='wx'){
|
|
|
|
+ if(this.params.paymentMode=='shouxin'&&!this.params.rePaymentTime){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请选择账期',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
this.checkExistPayPassword();
|
|
this.checkExistPayPassword();
|
|
}else{
|
|
}else{
|
|
this.gotoPay();
|
|
this.gotoPay();
|
|
}
|
|
}
|
|
|
|
+ this.cansubmit = false;
|
|
},
|
|
},
|
|
checkExistPayPassword(){
|
|
checkExistPayPassword(){
|
|
if(this.balanceInfo.isSetPayPassword==0){
|
|
if(this.balanceInfo.isSetPayPassword==0){
|
|
@@ -268,11 +292,13 @@
|
|
},1500)
|
|
},1500)
|
|
}).catch(err=>{
|
|
}).catch(err=>{
|
|
console.log('balancePay',err.data);
|
|
console.log('balancePay',err.data);
|
|
|
|
+ }).finally(()=>{
|
|
|
|
+ this.cansubmit = true;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
gotoQuotaPay(){
|
|
gotoQuotaPay(){
|
|
let that = this;
|
|
let that = this;
|
|
- this.$u.api.quotaPay({orderId:this.params.orderId,payerId:this.payerId}).then(res=>{
|
|
|
|
|
|
+ this.$u.api.quotaPay({orderId:this.params.orderId,payerId:this.payerId,rePaymentTime:this.params.rePaymentTime}).then(res=>{
|
|
// console.log('res',res);
|
|
// console.log('res',res);
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title:res.msg,
|
|
title:res.msg,
|
|
@@ -285,6 +311,8 @@
|
|
},1500)
|
|
},1500)
|
|
}).catch(err=>{
|
|
}).catch(err=>{
|
|
console.log('quotaPay',err.data);
|
|
console.log('quotaPay',err.data);
|
|
|
|
+ }).finally(()=>{
|
|
|
|
+ this.cansubmit = true;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
wxPay(){
|
|
wxPay(){
|
|
@@ -406,7 +434,12 @@
|
|
selectPayment(paymentType) {
|
|
selectPayment(paymentType) {
|
|
this.params.paymentMode = paymentType;
|
|
this.params.paymentMode = paymentType;
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ confirmDateChange(e) {
|
|
|
|
+ console.log('confirmDateChange',e);
|
|
|
|
+ this.params.rePaymentTime = this.$u.timeFormat(e.value, 'yyyy-mm-dd');
|
|
|
|
+ console.log('this.params.rePaymentTime',this.params.rePaymentTime);
|
|
|
|
+ this.showDate = false;
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -440,6 +473,9 @@
|
|
color: #D8D8D8;
|
|
color: #D8D8D8;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ &.repayment-time{
|
|
|
|
+ padding-bottom: 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.left{
|
|
.left{
|
|
font-size: 30rpx;
|
|
font-size: 30rpx;
|
|
@@ -492,4 +528,13 @@
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.repayment-time {
|
|
|
|
+ .label {
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #333333;
|
|
|
|
+ line-height: 42rpx;
|
|
|
|
+ margin-bottom: 10rpx;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|