材料员确认增加默认时间

This commit is contained in:
bb_pan 2025-07-26 10:55:32 +08:00
parent 256bb708a7
commit 6aa13bff21
2 changed files with 16 additions and 3 deletions

View File

@ -544,9 +544,19 @@ export default {
if (this.$route.query.code) {
this.queryParams.keyWord = this.$route.query.code
}
const end = new Date()
let start = new Date()
start.setMonth(start.getMonth() - 1)
this.queryParams.time = [this.format(start), this.format(end)]
this.getList()
},
methods: {
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}`
},
getList() {
this.loading = true
const params = {
@ -575,7 +585,10 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.time = []
const end = new Date()
let start = new Date()
start.setMonth(start.getMonth() - 1)
this.queryParams.time = [this.format(start), this.format(end)]
this.queryParams.taskStatus = ''
this.queryParams.keyWord = ''
this.queryParams.isConfirm = ''

View File

@ -115,11 +115,11 @@
prop="preCountNum"
></el-table-column>
<el-table-column
<!-- <el-table-column
label="已出库数量"
align="center"
prop="alNum"
></el-table-column>
></el-table-column> -->
<el-table-column label="领料人" align="center" prop="leasePerson" />