李红攀:V2.0.001仓库管理
This commit is contained in:
64
src/api/erp/stock-move/index.ts
Normal file
64
src/api/erp/stock-move/index.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 调拨单项 */
|
||||
export interface StockMoveItem {
|
||||
id?: number
|
||||
stockMoveId?: number
|
||||
fromWarehouseId?: number
|
||||
fromWarehouseName?: string
|
||||
toWarehouseId?: number
|
||||
toWarehouseName?: string
|
||||
productId?: number
|
||||
productName?: string
|
||||
productUnitName?: string
|
||||
count?: number
|
||||
productPrice?: number
|
||||
totalPrice?: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
/** 调拨单信息 */
|
||||
export interface StockMove {
|
||||
id?: number
|
||||
no?: string
|
||||
moveTime?: string
|
||||
totalCount?: number
|
||||
totalPrice?: number
|
||||
status?: number
|
||||
remark?: string
|
||||
items?: StockMoveItem[]
|
||||
productNames?: string
|
||||
creatorName?: string
|
||||
createTime?: number
|
||||
}
|
||||
|
||||
/** 获取调拨单分页列表 */
|
||||
export function getStockMovePage(params: PageParam) {
|
||||
return http.get<PageResult<StockMove>>('/erp/stock-move/page', params)
|
||||
}
|
||||
|
||||
/** 获取调拨单详情 */
|
||||
export function getStockMove(id: number) {
|
||||
return http.get<StockMove>(`/erp/stock-move/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建调拨单 */
|
||||
export function createStockMove(data: StockMove) {
|
||||
return http.post<number>('/erp/stock-move/create', data)
|
||||
}
|
||||
|
||||
/** 更新调拨单 */
|
||||
export function updateStockMove(data: StockMove) {
|
||||
return http.put<boolean>('/erp/stock-move/update', data)
|
||||
}
|
||||
|
||||
/** 更新调拨单状态 */
|
||||
export function updateStockMoveStatus(id: number, status: number) {
|
||||
return http.put<boolean>('/erp/stock-move/update-status', undefined, { id, status })
|
||||
}
|
||||
|
||||
/** 删除调拨单 */
|
||||
export function deleteStockMove(ids: number[]) {
|
||||
return http.delete<boolean>('/erp/stock-move/delete', undefined, { ids: ids.join(',') })
|
||||
}
|
||||
Reference in New Issue
Block a user