Authored by jiran.zhao

申请提现 限制时间取值

@@ -8,6 +8,8 @@ export default function() { @@ -8,6 +8,8 @@ export default function() {
8 endStr: '', 8 endStr: '',
9 beginTimeStr: '', 9 beginTimeStr: '',
10 endTimeStr: '', 10 endTimeStr: '',
  11 + beginTimeOptions: {},
  12 + endTimeOptions: {},
11 submitDisabled: false, 13 submitDisabled: false,
12 withdrawRules: { 14 withdrawRules: {
13 withdrawAmount: [{ required: true, message: '提现金额不能为空', trigger: 'blur' }], 15 withdrawAmount: [{ required: true, message: '提现金额不能为空', trigger: 'blur' }],
@@ -15,8 +15,21 @@ @@ -15,8 +15,21 @@
15 <span>{{ endTimeStr }}</span> 15 <span>{{ endTimeStr }}</span>
16 <br /> 16 <br />
17 <span>请选择账单日期</span> 17 <span>请选择账单日期</span>
18 - <Date-picker v-model="beginStr" type="date" placeholder="选择日期时间" @on-change="changeBeginStr" />  
19 - <Date-picker v-model="endStr" type="date" placeholder="选择日期时间" @on-change="changeEndStr" /> 18 + <Date-picker
  19 + v-model="beginStr"
  20 + type="date"
  21 + :options="beginTimeOptions"
  22 + placeholder="选择日期时间"
  23 + @on-change="changeBeginStr"
  24 + />
  25 + ~
  26 + <Date-picker
  27 + v-model="endStr"
  28 + type="date"
  29 + :options="endTimeOptions"
  30 + placeholder="选择日期时间"
  31 + @on-change="changeEndStr"
  32 + />
20 </Form-item> 33 </Form-item>
21 <Form-item label="提现金额" prop="withdrawAmount"> 34 <Form-item label="提现金额" prop="withdrawAmount">
22 <input v-model="data.withdrawAmount" disabled placeholder="请选择日期获取提现金额" /> 35 <input v-model="data.withdrawAmount" disabled placeholder="请选择日期获取提现金额" />
@@ -68,6 +81,16 @@ export default { @@ -68,6 +81,16 @@ export default {
68 this.data.beginTime = result.data.billBeginTime; 81 this.data.beginTime = result.data.billBeginTime;
69 this.data.endTime = result.data.billEndTime; 82 this.data.endTime = result.data.billEndTime;
70 this.data.withdrawAmount = result.data.withdrawAmount ? result.data.withdrawAmount : 0; 83 this.data.withdrawAmount = result.data.withdrawAmount ? result.data.withdrawAmount : 0;
  84 + this.beginTimeOptions = {
  85 + disabledDate(date) {
  86 + return date && date.valueOf() < result.data.billBeginTime * 1000 - 86400000;
  87 + },
  88 + };
  89 + this.endTimeOptions = {
  90 + disabledDate(date) {
  91 + return date && date.valueOf() > result.data.billEndTime * 1000;
  92 + },
  93 + };
71 } 94 }
72 }) 95 })
73 .catch(() => { 96 .catch(() => {