fix:子卷下线加上事务;一键设置加上dtl_id筛选;任务取消按钮加上权限设置

This commit is contained in:
zhouz
2026-01-06 10:04:46 +08:00
parent 1abe523c23
commit 2f73c81aaf
15 changed files with 120 additions and 43 deletions

View File

@@ -170,6 +170,7 @@
@click="doOperate(scope.row, 'a')"
>完成</el-button>
<el-button
v-permission="['instruction:del']"
type="text"
icon="el-icon-error"
@click="doOperate(scope.row, 'b')"
@@ -270,26 +271,33 @@ export default {
this.finishTypeList = data
})
const today = new Date()
const threeDaysAgo = new Date(today)
threeDaysAgo.setDate(today.getDate() - 3)
const year = today.getFullYear()
const month = String(today.getMonth() + 1).padStart(2, '0')
const beforeDay = String(threeDaysAgo.getDate()).padStart(2, '0')
const day = String(today.getDate()).padStart(2, '0')
// 2. 构造固定时分秒的时间字符串符合datetime-local格式
const startTime = `${year}-${month}-${day - 3} 00:00:00`
const startTime = `${year}-${month}-${beforeDay} 00:00:00`
const endTime = `${year}-${month}-${day} 23:59:59`
this.crud.query.createTime = [startTime, endTime]
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
debugger
if (this.query_flag) {
const today = new Date()
const threeDaysAgo = new Date(today) // 复制今天日期,避免修改原对象
threeDaysAgo.setDate(today.getDate() - 3) // 正确减去3天
const year = today.getFullYear()
const month = String(today.getMonth() + 1).padStart(2, '0')
const day = String(today.getDate()).padStart(2, '0')
const beforeDay = String(threeDaysAgo.getDate()).padStart(2, '0')
// 2. 构造固定时分秒的时间字符串符合datetime-local格式
const startTime = `${year}-${month}-${day - 3} 00:00:00`
const startTime = `${year}-${month}-${beforeDay} 00:00:00`
const endTime = `${year}-${month}-${day} 23:59:59`
this.crud.query.createTime = [startTime, endTime]
this.crud.query.begin_time = startTime