39 lines
852 B
TypeScript
39 lines
852 B
TypeScript
import { http } from '@/http/http'
|
|
|
|
/** 产品精简信息 */
|
|
export interface ProductSimple {
|
|
id: number
|
|
name: string
|
|
barCode?: string
|
|
unitId?: number
|
|
unitName?: string
|
|
standard?: string
|
|
purchasePrice?: number
|
|
salePrice?: number
|
|
minPrice?: number
|
|
supplierId?: number
|
|
supplierName?: string
|
|
weight?: number
|
|
}
|
|
|
|
/** 按条码查询的产品信息 */
|
|
export interface ProductByBarCode {
|
|
id: number
|
|
name: string
|
|
barCode?: string
|
|
unitId?: number
|
|
unitName?: string
|
|
standard?: string
|
|
minPrice?: number
|
|
}
|
|
|
|
/** 获取产品精简列表 */
|
|
export function getProductSimpleList() {
|
|
return http.get<ProductSimple[]>('/erp/product/simple-list')
|
|
}
|
|
|
|
/** 按条码查询启用中的产品 */
|
|
export function getProductByBarCode(barCode: string) {
|
|
return http.get<ProductByBarCode>('/erp/product/get-by-barcode', { barCode })
|
|
}
|