2026-05-20 18:13:15 +08:00

92 lines
2.2 KiB
TypeScript
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 '@/utils/request'
const v = "1.0"
/** storage.entry.list 查询参数(pagination / where / sort) */
export type StorageEntryListPagination = {
page?: number
pageSize?: number
}
export type StorageEntryListWhere = Record<string, unknown>
export type StorageEntryListSort = {
sortField?: string
sortOrder?: 'asc' | 'desc' | 'ASC' | 'DESC'
}
export type StorageEntryListParams = {
pagination?: StorageEntryListPagination
where?: StorageEntryListWhere
sort?: StorageEntryListSort
}
export function getEntryList(data: StorageEntryListParams = {}): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.entry.list',
v,
timestamp: new Date().getTime()
},
data: data
})
}
export function getEntryDetail(data:any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.entry.get',
v,
timestamp: new Date().getTime()
},
data: data
})
}
export function cancelEntry(data:any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.entry.cancel',
v,
timestamp: new Date().getTime()
},
data: data
})
}
export function completeEntry(data:any): Promise<any> {
return request({
url: '/system',
method: 'post',
params: {
method: 'storage.entry.completeEntry',
v,
timestamp: new Date().getTime()
},
data: data
})
}
// 废弃接口,不再使用
export function createEntry(data:any): Promise<any> {
return Promise.reject(new Error('storage.entry.create 已下线,请使用 quickPutaway / matchPutaway 流程'))
}
export function addDetail(data:any): Promise<any> {
return Promise.reject(new Error('storage.entry.addDetail 已下线,入库单明细不再对外编辑'))
}
export function deleteDetail(data:any): Promise<any> {
return Promise.reject(new Error('storage.entry.deleteDetail 已下线,入库单明细不再对外编辑'))
}
export function detailChange(data:any): Promise<any> {
return Promise.reject(new Error('storage.entry.detailChange 已下线,入库单明细不再对外编辑'))
}