daeea3a2 by renchao@pashanhoo.com

style:申请查询记录功能的完善

1 parent 01a048ed
......@@ -36,14 +36,14 @@
<el-row>
<el-col :span="6">
<el-form-item label="开始日期" class="marginbtm0">
<el-date-picker class="width100" v-model="queryForm.kssj" type="date" placeholder="开始日期"
<el-date-picker class="width100" v-model="queryForm.startTime" :picker-options="pickerOptionsStart" type="date" placeholder="开始日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="结束日期" class="marginbtm0">
<el-date-picker class="width100" v-model="queryForm.jssj" type="date" placeholder="结束日期"
<el-date-picker class="width100" v-model="queryForm.endTime" :picker-options="pickerOptionsEnd" type="date" placeholder="结束日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
......@@ -79,10 +79,32 @@
},
data () {
return {
// 开始结束日期限制
pickerOptionsStart: {
disabledDate: (time) => {
if (this.queryForm.endTime) {
return (
time.getTime() >= new Date(this.queryForm.endTime).getTime()
);
}
}
},
// 结束日期限制
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.queryForm.startTime) {
return (
time.getTime() <= new Date(this.queryForm.startTime).getTime()
);
}
}
},
queryForm: {
cxbh: "",
sqr: "",
ywh: "",
startTime: "",
endTime: ""
},
tableData: {
columns: datas.columns(),
......