| 12345678910111213141516171819202122232425 |
- import request from '@/utils/request';
- function unwrap(response) {
- const result = response?.data || {};
- if (Number(result.code) === 0) return result.data;
- const error = new Error(result.message || '服务调用失败');
- if (response?.__toastShown) error.__toastShown = true;
- return Promise.reject(error);
- }
- /**
- * 管理端:统一申请详情(M09 员工自助申请索引主键)
- * GET /hr/ess/admin/applications/{id}
- *
- * 该视图只返回「来源引用 + 脱敏摘要 + 状态 + 当前节点」,
- * 业务明细需要按返回的 businessId 走对应来源业务接口。
- */
- export async function getAdminApplicationDetail(id) {
- if (id === undefined || id === null || id === '') return null;
- const response = await request({
- url: `/hr/ess/admin/applications/${encodeURIComponent(String(id))}`,
- method: 'get'
- });
- return unwrap(response);
- }
|