Files
im-uniapp/api/hrm/seal.js
砂糖 955d20413b feat(HRM): 新增HRM办公审批模块及相关功能组件
新增HRM办公审批模块,包括审批中心、抄送我的、我的申请等功能页面和组件。主要变更包括:

1. 添加审批相关API接口文件
2. 新增审批详情展示组件
3. 实现审批流程操作功能
4. 添加Vuex状态管理
5. 新增相关静态资源图片
6. 配置页面路由
7. 实现审批列表展示和筛选功能
8. 添加审批操作弹窗和状态管理
2026-02-05 10:42:50 +08:00

100 lines
2.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import request from "@/util/oaRequest"
// 用印申请
export function listSealReq(query) {
return request({
url: '/hrm/seal/list',
method: 'get',
params: query
})
}
export function getSealReq(bizId) {
return request({
url: `/hrm/seal/${bizId}`,
method: 'get'
})
}
export function addSealReq(data) {
return request({
url: '/hrm/seal',
method: 'post',
data
})
}
export function editSealReq(data) {
return request({
url: '/hrm/seal',
method: 'put',
data
})
}
export function delSealReq(bizIds) {
return request({
url: `/hrm/seal/${bizIds}`,
method: 'delete'
})
}
export function approveSealReq(bizId) {
return request({
url: `/hrm/seal/${bizId}/approve`,
method: 'post'
})
}
export function rejectSealReq(bizId) {
return request({
url: `/hrm/seal/${bizId}/reject`,
method: 'post'
})
}
export function cancelSealReq(bizId) {
return request({
url: `/hrm/seal/${bizId}/cancel`,
method: 'post'
})
}
export function stampSealJava(bizId, data) {
// 确保数据正确序列化,特别是 0 值
const payload = {
targetFileUrl: String(data.targetFileUrl || ''),
stampImageUrl: String(data.stampImageUrl || ''),
pageNo: Number(data.pageNo) || 1,
xPx: Number(data.xPx) || 0,
yPx: Number(data.yPx) || 0,
viewportWidth: data.viewportWidth !== undefined && data.viewportWidth !== null ? Number(data.viewportWidth) : undefined,
viewportHeight: data.viewportHeight !== undefined && data.viewportHeight !== null ? Number(data.viewportHeight) : undefined
}
// 可选字段
if (data.widthPx !== undefined && data.widthPx !== null) {
payload.widthPx = Number(data.widthPx)
}
if (data.heightPx !== undefined && data.heightPx !== null) {
payload.heightPx = Number(data.heightPx)
}
// viewportWidth/Height如果是 undefined 则不传(兼容后端校验)
if (payload.viewportWidth === undefined) delete payload.viewportWidth
if (payload.viewportHeight === undefined) delete payload.viewportHeight
console.log('stampSealJava API call, payload:', JSON.stringify(payload, null, 2))
console.log('yPx in API:', typeof payload.yPx, payload.yPx)
return request({
url: `/hrm/seal/${bizId}/stamp/java`,
method: 'post',
data: payload
})
}
export function stampSealPython(bizId, data) {
return request({
url: `/hrm/seal/${bizId}/stamp/python`,
method: 'post',
data
})
}