李红攀:V2.0.001小程序的采摘管理
This commit is contained in:
90
src/api/erp/purchase-order/index.ts
Normal file
90
src/api/erp/purchase-order/index.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 采购订单项 */
|
||||
export interface PurchaseOrderItem {
|
||||
id?: number
|
||||
productId: number
|
||||
productUnitId: number
|
||||
productPrice?: number
|
||||
count: number
|
||||
taxPercent?: number
|
||||
taxPrice?: number
|
||||
remark?: string
|
||||
inCount?: number
|
||||
returnCount?: number
|
||||
supplierId?: number
|
||||
supplierName?: string
|
||||
productName?: string
|
||||
productBarCode?: string
|
||||
productUnitName?: string
|
||||
stockCount?: number
|
||||
productSpec?: string
|
||||
}
|
||||
|
||||
/** 采购订单信息 */
|
||||
export interface PurchaseOrder {
|
||||
id?: number
|
||||
no?: string
|
||||
status?: number
|
||||
supplierId?: number
|
||||
supplierName?: string
|
||||
accountId?: number
|
||||
orderTime?: string
|
||||
totalCount?: number
|
||||
totalPrice?: number
|
||||
totalProductPrice?: number
|
||||
totalTaxPrice?: number
|
||||
discountPercent?: number
|
||||
discountPrice?: number
|
||||
depositPrice?: number
|
||||
fileUrl?: string
|
||||
remark?: string
|
||||
creator?: string
|
||||
creatorName?: string
|
||||
createTime?: string
|
||||
items?: PurchaseOrderItem[]
|
||||
productNames?: string
|
||||
inCount?: number
|
||||
returnCount?: number
|
||||
auditorId?: number
|
||||
auditorName?: string
|
||||
purchaseRequisitionId?: number
|
||||
purchaseRequisitionNo?: string
|
||||
invoiceType?: number
|
||||
invoiceTypeName?: string
|
||||
freightPayer?: number
|
||||
freightPayerName?: string
|
||||
settlementMethod?: number
|
||||
settlementMethodName?: string
|
||||
}
|
||||
|
||||
/** 获取采购订单分页列表 */
|
||||
export function getPurchaseOrderPage(params: PageParam) {
|
||||
return http.get<PageResult<PurchaseOrder>>('/erp/purchase-order/page', params)
|
||||
}
|
||||
|
||||
/** 获取采购订单详情 */
|
||||
export function getPurchaseOrder(id: number) {
|
||||
return http.get<PurchaseOrder>(`/erp/purchase-order/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建采购订单 */
|
||||
export function createPurchaseOrder(data: PurchaseOrder) {
|
||||
return http.post<number>('/erp/purchase-order/create', data)
|
||||
}
|
||||
|
||||
/** 更新采购订单 */
|
||||
export function updatePurchaseOrder(data: PurchaseOrder) {
|
||||
return http.put<boolean>('/erp/purchase-order/update', data)
|
||||
}
|
||||
|
||||
/** 更新采购订单状态 */
|
||||
export function updatePurchaseOrderStatus(id: number, status: number) {
|
||||
return http.put<boolean>(`/erp/purchase-order/update-status?id=${id}&status=${status}`)
|
||||
}
|
||||
|
||||
/** 删除采购订单 */
|
||||
export function deletePurchaseOrder(ids: number[]) {
|
||||
return http.delete<boolean>(`/erp/purchase-order/delete?ids=${ids.join(',')}`)
|
||||
}
|
||||
Reference in New Issue
Block a user