Authored by jiran.zhao

申请提现 限制时间取值

... ... @@ -8,6 +8,8 @@ export default function() {
endStr: '',
beginTimeStr: '',
endTimeStr: '',
beginTimeOptions: {},
endTimeOptions: {},
submitDisabled: false,
withdrawRules: {
withdrawAmount: [{ required: true, message: '提现金额不能为空', trigger: 'blur' }],
... ...
... ... @@ -15,8 +15,21 @@
<span>{{ endTimeStr }}</span>
<br />
<span>请选择账单日期</span>
<Date-picker v-model="beginStr" type="date" placeholder="选择日期时间" @on-change="changeBeginStr" />
<Date-picker v-model="endStr" type="date" placeholder="选择日期时间" @on-change="changeEndStr" />
<Date-picker
v-model="beginStr"
type="date"
:options="beginTimeOptions"
placeholder="选择日期时间"
@on-change="changeBeginStr"
/>
~
<Date-picker
v-model="endStr"
type="date"
:options="endTimeOptions"
placeholder="选择日期时间"
@on-change="changeEndStr"
/>
</Form-item>
<Form-item label="提现金额" prop="withdrawAmount">
<input v-model="data.withdrawAmount" disabled placeholder="请选择日期获取提现金额" />
... ... @@ -68,6 +81,16 @@ export default {
this.data.beginTime = result.data.billBeginTime;
this.data.endTime = result.data.billEndTime;
this.data.withdrawAmount = result.data.withdrawAmount ? result.data.withdrawAmount : 0;
this.beginTimeOptions = {
disabledDate(date) {
return date && date.valueOf() < result.data.billBeginTime * 1000 - 86400000;
},
};
this.endTimeOptions = {
disabledDate(date) {
return date && date.valueOf() > result.data.billEndTime * 1000;
},
};
}
})
.catch(() => {
... ...