领料办理-增加默认时间查询2个月内
This commit is contained in:
parent
0a831b2842
commit
f6c384e163
|
|
@ -409,6 +409,10 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
// this.getStatusList();
|
// this.getStatusList();
|
||||||
this.getList();
|
this.getList();
|
||||||
// this.getTypeList()
|
// this.getTypeList()
|
||||||
|
|
@ -422,6 +426,12 @@ export default {
|
||||||
// this.modelList = response.data
|
// this.modelList = response.data
|
||||||
// })
|
// })
|
||||||
// },
|
// },
|
||||||
|
format(date) {
|
||||||
|
const y = date.getFullYear()
|
||||||
|
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
return `${y}-${m}-${day}`
|
||||||
|
},
|
||||||
|
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
|
|
@ -468,9 +478,12 @@ export default {
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams.time = [];
|
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.queryParams.keyWord = "";
|
this.queryParams.keyWord = "";
|
||||||
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue