This commit is contained in:
2026-03-18 16:23:54 +08:00
parent 8f8729d2b2
commit 8df6ff1576
13 changed files with 1821 additions and 0 deletions

View File

@@ -0,0 +1,97 @@
import request from '@/utils/request'
// 用印申请
export function listSealReq(query) {
return request({
url: '/wms/seal/list',
method: 'get',
params: query
})
}
export function getSealReq(bizId) {
return request({
url: `/wms/seal/${bizId}`,
method: 'get'
})
}
export function addSealReq(data) {
return request({
url: '/wms/seal',
method: 'post',
data
})
}
export function editSealReq(data) {
return request({
url: '/wms/seal',
method: 'put',
data
})
}
export function delSealReq(bizIds) {
return request({
url: `/wms/seal/${bizIds}`,
method: 'delete'
})
}
export function approveSealReq(bizId, approvalOpinion) {
return request({
url: `/wms/seal/${bizId}/approve`,
method: 'post',
params: { approvalOpinion }
})
}
export function rejectSealReq(bizId, approvalOpinion) {
return request({
url: `/wms/seal/${bizId}/reject`,
method: 'post',
params: { approvalOpinion }
})
}
export function cancelSealReq(bizId) {
return request({
url: `/wms/seal/${bizId}/cancel`,
method: 'post'
})
}
export function stampSealJava(bizId, data) {
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)
}
if (payload.viewportWidth === undefined) delete payload.viewportWidth
if (payload.viewportHeight === undefined) delete payload.viewportHeight
return request({
url: `/wms/seal/${bizId}/stamp/java`,
method: 'post',
data: payload
})
}
export function stampSealPython(bizId, data) {
return request({
url: `/wms/seal/${bizId}/stamp/python`,
method: 'post',
data
})
}