李红攀:V2.0.001小程序的采摘管理
This commit is contained in:
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')
|
||||
}
|
||||
Reference in New Issue
Block a user