merge: t21 员工端存档确认与归档动作

This commit is contained in:
2026-10-30 21:17:18 +08:00
2 changed files with 158 additions and 1 deletions
+26
View File
@@ -44,6 +44,32 @@ export async function rejectTask(id: number, opinion: string) {
return Promise.reject(new Error(res.data.message));
}
/**
* 存档确认(无意见,只能确认)
*/
export async function confirmTask(id: number) {
const res = await request.post<ApiResult<ApprovalInstance>>(
THINK_API_URL + '/approval/task/' + id + '/confirm'
);
if (res.data.code === 0 && res.data.data) {
return res.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 归档(或签,归档后单据只读)
*/
export async function archiveTask(id: number) {
const res = await request.post<ApiResult<ApprovalInstance>>(
THINK_API_URL + '/approval/task/' + id + '/archive'
);
if (res.data.code === 0 && res.data.data) {
return res.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 撤回
*/