出库操作逻辑上面实现,成功跑通

This commit is contained in:
dxc
2026-02-05 10:20:52 +08:00
parent 797b611530
commit f3b60dfc54
8 changed files with 337 additions and 117 deletions

View File

@ -9,7 +9,8 @@ export function uploadFile(file: File) {
formData.append('file', file)
return request({
url: '/api/v1/common/upload',
// ★★★ [修改] 去掉开头的 /api适配 request.ts 的 baseURL
url: '/v1/common/upload',
method: 'post',
data: formData,
headers: {

View File

@ -22,6 +22,7 @@ export interface ScanResult {
available_quantity: number
batch_number?: string
warehouse_location?: string
barcode?: string
}
/**
@ -30,7 +31,8 @@ export interface ScanResult {
*/
export function getStockByBarcode(barcode: string) {
return request<any, ScanResult>({
url: '/api/v1/outbound/scan',
// ★★★ [修改] 去掉开头的 /apiAxios 会自动拼接 baseURL
url: '/v1/outbound/scan',
method: 'get',
params: { barcode }
})
@ -41,7 +43,8 @@ export function getStockByBarcode(barcode: string) {
*/
export function submitOutbound(data: OutboundSubmitData) {
return request({
url: '/api/v1/outbound',
// ★★★ [修改] 去掉开头的 /api
url: '/v1/outbound',
method: 'post',
data
})
@ -52,7 +55,8 @@ export function submitOutbound(data: OutboundSubmitData) {
*/
export function getOutboundList(params: any) {
return request({
url: '/api/v1/outbound',
// ★★★ [修改] 去掉开头的 /api
url: '/v1/outbound',
method: 'get',
params
})