|
@@ -101,7 +101,7 @@
|
|
|
<div v-if="creAuth !== '2'">
|
|
|
<FormItem label="有效周期" required v-if="creAuth == '1' && (repair !== '2' && repair !== 2)">
|
|
|
<div class="you-xiao" style="display:flex">
|
|
|
- <Input v-model="member.payCycle" type="tel" maxlength="2" @on-keyup="cycleHandler" @on-change="peChange" :placeholder="placed" style="width:376px"></Input>
|
|
|
+ <Input v-model="member.payCycle" type="tel" :maxlength="max_length" @on-keyup="cycleHandler" @on-change="peChange" :placeholder="placed" style="width:376px"></Input>
|
|
|
<Select v-model="member.cycleType" placeholder="请选择单位" @on-change="unitChange" style="width:110px;margin-left:10px">
|
|
|
<Option v-for="item in unitOptions" :value="item.v" :key="item.v">{{ item.n }}</Option>
|
|
|
</Select>
|
|
@@ -776,9 +776,12 @@ export default {
|
|
|
}).get()
|
|
|
},
|
|
|
unitChange(data) {// 有效周期选择单位
|
|
|
- if (data == 0) {
|
|
|
- this.placed = '请输入有效周期(单位(月),最多输入'+this.monthTime+'个月)'
|
|
|
+ if (data == 1) {
|
|
|
+ this.placed = '请输入有效周期(单位(天)'
|
|
|
+ this.max_length=4
|
|
|
+
|
|
|
} else {
|
|
|
+ this.max_length=2
|
|
|
this.placed = '请输入有效周期(单位(月),最多输入'+this.monthTime+'个月)'
|
|
|
}
|
|
|
},
|
|
@@ -1019,7 +1022,8 @@ export default {
|
|
|
this.packsPrice() // 补充包价格
|
|
|
},
|
|
|
cycleHandler() {// 有效周期
|
|
|
- if (this.nums == 0) {
|
|
|
+ if(this.member.cycleType=='0'){//选择月保持原有逻辑
|
|
|
+ if (this.nums == 0) {
|
|
|
if (this.repair == 1) {
|
|
|
if (this.member.payCycle <= 60) {
|
|
|
this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g,'')
|
|
@@ -1047,6 +1051,12 @@ export default {
|
|
|
this.member.payCycle = ''
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ }else{//选择天只过滤字母
|
|
|
+ this.member.payCycle = this.member.payCycle.replace(/[^\d]+/g,'')
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if (!this.member.payCycle) {
|
|
|
this.member.bigMoney = 0
|
|
|
}
|
|
@@ -1605,6 +1615,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ max_length:2,
|
|
|
serData: [],
|
|
|
servedData: [],
|
|
|
pacData: [],
|