style:申请查询记录功能的完善
Showing
1 changed file
with
24 additions
and
2 deletions
... | @@ -36,14 +36,14 @@ | ... | @@ -36,14 +36,14 @@ |
36 | <el-row> | 36 | <el-row> |
37 | <el-col :span="6"> | 37 | <el-col :span="6"> |
38 | <el-form-item label="开始日期" class="marginbtm0"> | 38 | <el-form-item label="开始日期" class="marginbtm0"> |
39 | <el-date-picker class="width100" v-model="queryForm.kssj" type="date" placeholder="开始日期" | 39 | <el-date-picker class="width100" v-model="queryForm.startTime" :picker-options="pickerOptionsStart" type="date" placeholder="开始日期" |
40 | value-format="yyyy-MM-dd" clearable> | 40 | value-format="yyyy-MM-dd" clearable> |
41 | </el-date-picker> | 41 | </el-date-picker> |
42 | </el-form-item> | 42 | </el-form-item> |
43 | </el-col> | 43 | </el-col> |
44 | <el-col :span="6"> | 44 | <el-col :span="6"> |
45 | <el-form-item label="结束日期" class="marginbtm0"> | 45 | <el-form-item label="结束日期" class="marginbtm0"> |
46 | <el-date-picker class="width100" v-model="queryForm.jssj" type="date" placeholder="结束日期" | 46 | <el-date-picker class="width100" v-model="queryForm.endTime" :picker-options="pickerOptionsEnd" type="date" placeholder="结束日期" |
47 | value-format="yyyy-MM-dd" clearable> | 47 | value-format="yyyy-MM-dd" clearable> |
48 | </el-date-picker> | 48 | </el-date-picker> |
49 | </el-form-item> | 49 | </el-form-item> |
... | @@ -79,10 +79,32 @@ | ... | @@ -79,10 +79,32 @@ |
79 | }, | 79 | }, |
80 | data () { | 80 | data () { |
81 | return { | 81 | return { |
82 | // 开始结束日期限制 | ||
83 | pickerOptionsStart: { | ||
84 | disabledDate: (time) => { | ||
85 | if (this.queryForm.endTime) { | ||
86 | return ( | ||
87 | time.getTime() >= new Date(this.queryForm.endTime).getTime() | ||
88 | ); | ||
89 | } | ||
90 | } | ||
91 | }, | ||
92 | // 结束日期限制 | ||
93 | pickerOptionsEnd: { | ||
94 | disabledDate: (time) => { | ||
95 | if (this.queryForm.startTime) { | ||
96 | return ( | ||
97 | time.getTime() <= new Date(this.queryForm.startTime).getTime() | ||
98 | ); | ||
99 | } | ||
100 | } | ||
101 | }, | ||
82 | queryForm: { | 102 | queryForm: { |
83 | cxbh: "", | 103 | cxbh: "", |
84 | sqr: "", | 104 | sqr: "", |
85 | ywh: "", | 105 | ywh: "", |
106 | startTime: "", | ||
107 | endTime: "" | ||
86 | }, | 108 | }, |
87 | tableData: { | 109 | tableData: { |
88 | columns: datas.columns(), | 110 | columns: datas.columns(), | ... | ... |
-
Please register or sign in to post a comment