申请分期添加注册资本,修改费率范围

feature/scanCodeOrder
游梦婷 10 months ago
parent c6215013a5
commit 21f8def0bb
  1. 8
      pages/welcome/welcome.vue
  2. 66
      subpackages/applyPeriod/applyPeriod.vue

@ -17,10 +17,10 @@
}, },
onLoad(options) { onLoad(options) {
uni.reLaunch({ // uni.reLaunch({
url: '/pages/login/login' // url: '/pages/login/login'
}) // })
return // return
let that = this; let that = this;

@ -25,36 +25,54 @@
</view> </view>
<switch disabled :checked="periodData.openUnionpay" @change="switch1Change" /> <switch disabled :checked="periodData.openUnionpay" @change="switch1Change" />
</view> </view>
<!-- 注册资本 -->
<view class="dis-flex pd-main bor-botm1 flex-sp">
<view class=" fontwig6 flex-s0">注册资本:
</view>
<input type="text" class=" flex-1 fotrt" v-model.trim="periodData.authCapital" placeholder-class="corf6 font15 fotrt"
placeholder="请输入注册资本">
</view>
<!-- 银联贴息方式可多选 --> <!-- 银联贴息方式可多选 -->
<view class=" pd-main bor-botm1 "> <view class=" pd-main bor-botm1 ">
<view class=" fontwig6 marb10 ">银联贴息方式(可多选): <view class=" fontwig6 marb10 ">银联贴息方式(可多选):
</view> </view>
<checkbox-group @change="checkBoxChange"> <!-- <checkbox-group @change="checkBoxChange">
<view class="dis-flex flex-sp flex-wrap"> <view class="dis-flex flex-sp flex-wrap">
<label v-for="(item,index) in unionpayFeePaidList" class=" marb5"> <label v-for="(item,index) in unionpayFeePaidList" class=" marb5">
<checkbox :value="item.id+''" :checked="item.isSelect" :disabled="!isShowMethodToUpdate" />{{item.name}} <checkbox :value="item.id+''" :checked="item.isSelect" :disabled="!isShowMethodToUpdate" />{{item.name}}
</label> </label>
</view> </view>
</checkbox-group> </checkbox-group> -->
<radio-group @change="checkBoxChange">
<view class="dis-flex flex-sp flex-wrap ">
<label v-for="(item,index) in unionpayFeePaidList" class="marb5">
<radio :value="item.id+''" :checked="item.isSelect" />{{item.name}}
</label>
</view>
</radio-group>
</view> </view>
<!-- 银联分期费率 --> <!-- 银联分期费率 -->
<view class=" pd-main bor-botm1 "> <view class=" pd-main bor-botm1 ">
<view class=" fontwig6 marb10 ">银联分期费率(1类银行):<text class="fn">范围(0~20)</text> <view class=" fontwig6 marb10 ">银联分期费率(1类银行):<text class="fn">范围(0~1)最多保留3位小数</text>
</view> </view>
<view class="dis-flex flex-center marb10" v-for="(item,index) in periodData.unionpayRate1" :key="index"> <view class="dis-flex flex-center marb10" v-for="(item,index) in periodData.unionpayRate1" :key="index">
<view class="paddtright10">{{item.periodNum}}</view> <view class="paddtright10">{{item.periodNum}}</view>
<input type="digit" v-model.trim="item.rate" :disabled="!isShowMethodToUpdate" placeholder-class="corf6 font15" <input class="rate" type="digit" v-model.trim="item.rate" :disabled="!isShowMethodToUpdate" placeholder-class="corf6 font15"
placeholder="请输入费率"> placeholder="请输入费率">
<!-- <view v-else class="corf6 font15 rate">{{item.rate}}</view> --> <!-- <view v-else class="corf6 font15 rate">{{item.rate}}</view> -->
</view> </view>
</view> </view>
<view class=" pd-main bor-botm1 "> <view class=" pd-main bor-botm1 ">
<view class=" fontwig6 marb10 ">银联分期费率(2类银行):<text class="fn">范围(0~20)</text> <view class=" fontwig6 marb10 ">银联分期费率(2类银行):<text class="fn ">范围(0~1)最多保留3位小数</text>
</view> </view>
<view class="dis-flex flex-center marb10" v-for="(item,index) in periodData.unionpayRate2" :key="index"> <view class="dis-flex flex-center marb10" v-for="(item,index) in periodData.unionpayRate2" :key="index">
<view class=" paddtright10">{{item.periodNum}}</view> <view class=" paddtright10">{{item.periodNum}}</view>
<input type="digit" v-model.trim="item.rate" :disabled="!isShowMethodToUpdate" placeholder-class="corf6 font15" <input class="rate" type="digit" v-model.trim="item.rate" :disabled="!isShowMethodToUpdate" placeholder-class="corf6 font15"
placeholder="请输入费率"> placeholder="请输入费率">
<!-- <view v-else class="corf6 font15 rate">{{item.rate}}</view> --> <!-- <view v-else class="corf6 font15 rate">{{item.rate}}</view> -->
</view> </view>
@ -125,6 +143,7 @@
unionpayRate1: [], //1 unionpayRate1: [], //1
unionpayRate2: [], //2 unionpayRate2: [], //2
agreementPics: '', // agreementPics: '', //
authCapital:'',//
}, },
periodNumList:[],// periodNumList:[],//
@ -198,6 +217,7 @@
this.periodData.unionpayRate1 =this.handleUnionpayRate(this.showItem.unionpayRate1); this.periodData.unionpayRate1 =this.handleUnionpayRate(this.showItem.unionpayRate1);
this.periodData.unionpayRate2 = this.handleUnionpayRate(this.showItem.unionpayRate2); this.periodData.unionpayRate2 = this.handleUnionpayRate(this.showItem.unionpayRate2);
this.periodData.agreementPics = this.showItem.platformPeriod.agreementPics; this.periodData.agreementPics = this.showItem.platformPeriod.agreementPics;
this.periodData.authCapital = this.showItem.platformPeriod.authCapital;
this.imgValue =this.periodData.agreementPics.split(','); this.imgValue =this.periodData.agreementPics.split(',');
}else{ }else{
this.periodData.openUnionpay = true; this.periodData.openUnionpay = true;
@ -205,19 +225,18 @@
this.periodData.unionpayRate1 = this.handleUnionpayRate(this.periodNumList); this.periodData.unionpayRate1 = this.handleUnionpayRate(this.periodNumList);
this.periodData.unionpayRate2 =this.handleUnionpayRate(this.periodNumList); this.periodData.unionpayRate2 =this.handleUnionpayRate(this.periodNumList);
this.periodData.agreementPics = ""; this.periodData.agreementPics = "";
this.periodData.authCapital ="";
this.imgValue =[]; this.imgValue =[];
} }
let arr = this.periodData.unionpayFeePaid.split(",");
this.unionpayFeePaidList.forEach(item => { this.unionpayFeePaidList.forEach(item => {
item.isSelect = false; item.isSelect = false;
arr.forEach(item2 => { if(this.periodData.unionpayFeePaid==item.id){
if (item.id == item2) {
item.isSelect = true; item.isSelect = true;
} }
}) })
})
}, },
handleUnionpayRate(arr){ handleUnionpayRate(arr){
@ -235,8 +254,13 @@
/* 贴息方式change */ /* 贴息方式change */
checkBoxChange(e) { checkBoxChange(e) {
let selectArr = e.detail.value;
this.periodData.unionpayFeePaid = selectArr.join(','); console.log(e.detail.value)
this.periodData.unionpayFeePaid = e.detail.value;
// let selectArr = e.detail.value;
// this.periodData.unionpayFeePaid = selectArr.join(',');
}, },
/* 点击申请分期 */ /* 点击申请分期 */
apply() { apply() {
@ -282,7 +306,19 @@
return false return false
} }
var reg = /^(([0-9]|[1][0-9])([.][0-9]{1,2})|([0-9]|1[0-9]|20))$/; if(this.periodData.authCapital == ''){
uni.showToast({
title: '请输入注册资本',
icon: 'none'
})
return false
}
// var reg = /^(([0-9]|[1][0-9])([.][0-9]{1,2})|([0-9]|1[0-9]|20))$/;
/* 0-1:最多保留三位小数 */
let reg = /^((0+(\.\d{0,3})?)|1(\.0{0,3})?)$/;
let unionpayRate1Bool = this.periodData.unionpayRate1.every((item) => { let unionpayRate1Bool = this.periodData.unionpayRate1.every((item) => {
if (!reg.test(item.rate)) { if (!reg.test(item.rate)) {
@ -485,6 +521,8 @@
.fn { .fn {
font-weight: normal; font-weight: normal;
font-size: 12px;
color: #3c3c3c;
} }
.down { .down {
@ -497,7 +535,7 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
border-radius: 20rpx; border-radius: 20rpx;
input,.rate { .rate {
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
border-radius: 10px; border-radius: 10px;

Loading…
Cancel
Save