提交审批检验时效
This commit is contained in:
1 parent
42ecacdac6
commit
6123323572
1 file changed
+14
@@ -580,6 +580,20 @@ class TaskService extends Service {
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
async checkTimeliness() {
|
||||
const { jianghuKnex } = this.app;
|
||||
const { actionData } = this.ctx.request.body.appData;
|
||||
const { updateItem } = actionData;
|
||||
const { taskId, operationAt } = updateItem
|
||||
|
||||
const curTask = await jianghuKnex('task').where({ taskId }).select().first();
|
||||
const { operationAt: curOperationAt } = curTask
|
||||
|
||||
if (!dayjs(operationAt).isSame(dayjs(curOperationAt))) {
|
||||
throw new Error("审批信息已更新,请重新刷新页面!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = TaskService;
|
||||
Reference in new issue
Block a user