出库操作逻辑上面实现,成功跑通
This commit is contained in:
@ -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: {
|
||||
|
||||
@ -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',
|
||||
// ★★★ [修改] 去掉开头的 /api,Axios 会自动拼接 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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user