李红攀:V2.0.001小程序的采摘管理
This commit is contained in:
13
src/api/erp/box/index.ts
Normal file
13
src/api/erp/box/index.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 框管理记录 */
|
||||
export interface Box {
|
||||
id?: number
|
||||
boxNumber: string
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
/** 获取框管理分页列表(用于提取框编号) */
|
||||
export function getBoxPage(params?: Record<string, any>) {
|
||||
return http.get<{ list: Box[], total: number }>('/erp/box/page', { pageNo: 1, pageSize: 100, ...params })
|
||||
}
|
||||
13
src/api/erp/farming/index.ts
Normal file
13
src/api/erp/farming/index.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 田间管理记录 */
|
||||
export interface FarmingManagement {
|
||||
id?: number
|
||||
code: string
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
/** 获取田间管理分页列表(用于提取田间编号) */
|
||||
export function getFarmingManagementPage(params?: Record<string, any>) {
|
||||
return http.get<{ list: FarmingManagement[], total: number }>('/erp/farming-management/page', { pageNo: 1, pageSize: 100, ...params })
|
||||
}
|
||||
85
src/api/erp/pick-broccoli/index.ts
Normal file
85
src/api/erp/pick-broccoli/index.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 西兰花采摘记录信息 */
|
||||
export interface PickBroccoli {
|
||||
id?: number
|
||||
pickCode?: string
|
||||
userId?: number
|
||||
userName?: string
|
||||
fieldCode?: string
|
||||
fieldName?: string
|
||||
basketCode?: string
|
||||
basketWeight?: number
|
||||
licensePlate?: string
|
||||
pickTime?: string
|
||||
loadTime?: string
|
||||
loaderId?: number
|
||||
loaderName?: string
|
||||
status?: number
|
||||
unloadTime?: string
|
||||
unloaderId?: number
|
||||
unloaderName?: string
|
||||
warehouseId?: string
|
||||
warehouseName?: string
|
||||
unloadBatch?: string
|
||||
productId?: number
|
||||
productName?: string
|
||||
remark?: string
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/** 获取采摘记录分页列表 */
|
||||
export function getPickBroccoliPage(params: PageParam) {
|
||||
return http.get<PageResult<PickBroccoli>>('/erp/pick-broccoli/page', params)
|
||||
}
|
||||
|
||||
/** 获取采摘记录详情 */
|
||||
export function getPickBroccoli(id: number) {
|
||||
return http.get<PickBroccoli>(`/erp/pick-broccoli/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建采摘记录 */
|
||||
export function createPickBroccoli(data: PickBroccoli) {
|
||||
return http.post<number>('/erp/pick-broccoli/create', data)
|
||||
}
|
||||
|
||||
/** 更新采摘记录 */
|
||||
export function updatePickBroccoli(data: PickBroccoli) {
|
||||
return http.put<boolean>('/erp/pick-broccoli/update', data)
|
||||
}
|
||||
|
||||
/** 删除采摘记录 */
|
||||
export function deletePickBroccoli(id: number) {
|
||||
return http.delete<boolean>(`/erp/pick-broccoli/delete?id=${id}`)
|
||||
}
|
||||
|
||||
/** 更新采摘记录状态 */
|
||||
export function updatePickBroccoliStatus(id: number, status: number) {
|
||||
return http.put<boolean>(`/erp/pick-broccoli/update-status?id=${id}&status=${status}`)
|
||||
}
|
||||
|
||||
/** 装车操作 */
|
||||
export function loadTruck(id: number, licensePlate: string, loaderId: number, loaderName: string) {
|
||||
return http.put<boolean>(`/erp/pick-broccoli/load-truck?id=${id}&licensePlate=${licensePlate}&loaderId=${loaderId}&loaderName=${loaderName}`)
|
||||
}
|
||||
|
||||
/** 卸车入库操作 */
|
||||
export function unloadTruck(licensePlate: string, unloaderId: number, unloaderName: string, warehouseId: string, warehouseName: string) {
|
||||
return http.put<boolean>(`/erp/pick-broccoli/unload-truck?licensePlate=${licensePlate}&unloaderId=${unloaderId}&unloaderName=${unloaderName}&warehouseId=${warehouseId}&warehouseName=${warehouseName}`)
|
||||
}
|
||||
|
||||
/** 获取已装车车辆列表 */
|
||||
export function getLoadedTrucks() {
|
||||
return http.get<any[]>('/erp/pick-broccoli/list-loaded-trucks')
|
||||
}
|
||||
|
||||
/** 卸车预览 */
|
||||
export function getUnloadPreview(licensePlate: string) {
|
||||
return http.get<any>(`/erp/pick-broccoli/unload-preview?licensePlate=${licensePlate}`)
|
||||
}
|
||||
|
||||
/** 生成采摘编号 */
|
||||
export function generatePickCode() {
|
||||
return http.get<{ code: string }>('/erp/pick-broccoli/generate-code')
|
||||
}
|
||||
22
src/api/erp/product/index.ts
Normal file
22
src/api/erp/product/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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 function getProductSimpleList() {
|
||||
return http.get<ProductSimple[]>('/erp/product/simple-list')
|
||||
}
|
||||
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(',')}`)
|
||||
}
|
||||
12
src/api/erp/supplier/index.ts
Normal file
12
src/api/erp/supplier/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 供应商精简信息 */
|
||||
export interface SupplierSimple {
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
|
||||
/** 获取供应商精简列表 */
|
||||
export function getSupplierSimpleList() {
|
||||
return http.get<SupplierSimple[]>('/erp/supplier/simple-list')
|
||||
}
|
||||
Reference in New Issue
Block a user