Commit 10d41ddc by 吕明尚

保洁管理增加时间查询,修改导出地址

parent de0b0605
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="100px" size="small">
<el-form-item label="所属门店" prop="storeId">
<el-select v-model="queryParams.storeId" placeholder="请选择所属门店" @change="onGetRoomListByStoreId">
<el-option
......@@ -22,13 +22,37 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker clearable
v-model="queryParams.createTime"
type="date"
<!-- <el-form-item label="保洁生成时间" prop="createTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="queryParams.createTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择保洁生成时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<el-form-item label="保洁生成时间">
<el-date-picker
v-model="dateValue"
:default-time="['00:00:00', '23:59:59']"
end-placeholder="结束日期"
range-separator="至"
start-placeholder="开始日期"
value-format="yyyy-MM-dd"
placeholder="请选择创建时间">
type="daterange">
</el-date-picker>
</el-form-item>
<el-form-item label="保洁时间">
<el-date-picker
v-model="preDate"
:default-time="['00:00:00', '23:59:59']"
end-placeholder="结束日期"
range-separator="至"
start-placeholder="开始日期"
type="daterange"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="保洁状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择保洁状态" clearable>
......@@ -231,6 +255,8 @@ export default {
showSearch: true,
// 总条数
total: 0,
dateValue: null,
preDate: null,
// 保洁记录表格数据
recordsList: [],
options: [],
......@@ -244,7 +270,9 @@ export default {
pageNum: 1,
pageSize: 10,
startDate: null,
startTime: null,
endDate: null,
endTime: null,
createTime: null,
status: null,
storeId: null,
......@@ -276,6 +304,21 @@ export default {
/** 查询保洁记录列表 */
getList() {
this.loading = true;
if (this.dateValue && this.dateValue.length > 0) {
this.queryParams.startTime = this.dateValue[0];
this.queryParams.endTime = this.dateValue[1];
} else {
this.queryParams.startTime = null;
this.queryParams.endTime = null;
}
if (this.preDate && this.preDate.length > 0) {
this.queryParams.startDate = this.preDate[0];
this.queryParams.endDate = this.preDate[1];
} else {
this.queryParams.startDate = null;
this.queryParams.endDate = null;
}
listCleanRecords(this.queryParams).then(response => {
this.recordsList = response.rows;
this.total = response.total;
......@@ -315,6 +358,8 @@ export default {
resetQuery() {
this.resetForm("queryForm");
this.rooms = [];
this.dateValue = null;
this.preDate = null;
this.handleQuery();
},
// 多选框选中数据
......@@ -371,9 +416,9 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('system/records/export', {
this.download('system/cleanRecords/export', {
...this.queryParams
}, `records_${new Date().getTime()}.xlsx`)
}, `cleanRecords_${new Date().getTime()}.xlsx`)
},
onGetRoomListByStoreId(id) {
this.queryParams.roomId = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment