潘的第一次 commit

This commit is contained in:
panchengyong
2026-02-27 23:50:25 +08:00
commit 10b6d0099a
117 changed files with 32547 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
import request from './request'
export interface CheckinLine {
lineId: number
checkinId: number
checkinCode: string
lineNo: number
orderLineId?: number
trackCode?: string
itemId: number
itemCode: string
itemName: string
specification?: string
unitName?: string
orderQuantity?: number
quantity: number
stockedQuantity?: number
remark?: string
}
export interface Checkin {
checkinId: number
checkinCode: string
checkinDate: string
status: string
businessType: string
orderId?: number
orderCode?: string
supplierId?: number
supplierName?: string
warehouseId?: number
warehouseName?: string
totalQuantity?: number
stockedQuantity?: number
remark?: string
operatorName?: string
approverName?: string
approveDate?: string
lines: CheckinLine[]
createTime?: string
}
export interface CheckinQuery {
trackCode?: string
checkinCode?: string
supplierName?: string
itemCode?: string
itemName?: string
beginDate?: string
endDate?: string
status?: string
pageNum?: number
pageSize?: number
}
export interface CheckinListResponse {
rows: Checkin[]
total: number
}
// 获取采购到货单列表
export function getCheckinList(params: CheckinQuery): Promise<CheckinListResponse> {
return request.get('/erp/po/checkin/list', { params }).then((res: any) => {
return {
rows: res.rows || [],
total: res.total || 0
}
})
}
// 获取采购到货单详情
export function getCheckinDetail(checkinId: number): Promise<Checkin> {
return request.get(`/erp/po/checkin/${checkinId}`).then((res: any) => {
return res.data
})
}
// 新增采购到货单
export function createCheckin(data: Partial<Checkin>): Promise<void> {
return request.post('/erp/po/checkin', data)
}
// 更新采购到货单
export function updateCheckin(data: Partial<Checkin>): Promise<void> {
return request.put('/erp/po/checkin', data)
}
// 删除采购到货单
export function deleteCheckin(checkinIds: string): Promise<void> {
return request.delete(`/erp/po/checkin/${checkinIds}`)
}
// 注意:采购到货单审核接口后端暂未实现
// export function approveCheckin(checkinId: number): Promise<void> {
// return request.post(`/erp/po/checkin/audit/${checkinId}`)
// }