diff --git a/src/api/mes/wm/itemreceipt/detail/index.ts b/src/api/mes/wm/itemreceipt/detail/index.ts new file mode 100644 index 000000000..085c2fa86 --- /dev/null +++ b/src/api/mes/wm/itemreceipt/detail/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +// MES 采购入库明细 VO +export interface WmItemReceiptDetailVO { + id: number + lineId: number + receiptId: number + itemId: number + itemCode: string + itemName: string + specification: string + unitMeasureName: string + quantity: number + batchId: number + warehouseId: number + warehouseName: string + locationId: number + locationName: string + areaId: number + areaName: string + remark: string + createTime: string +} + +// MES 采购入库明细 API +export const WmItemReceiptDetailApi = { + // 查询采购入库明细分页 + getItemReceiptDetailPage: async (params: any) => { + return await request.get({ url: '/mes/wm/item-receipt-detail/page', params }) + }, + + // 查询采购入库明细详情 + getItemReceiptDetail: async (id: number) => { + return await request.get({ url: '/mes/wm/item-receipt-detail/get?id=' + id }) + }, + + // 新增采购入库明细 + createItemReceiptDetail: async (data: WmItemReceiptDetailVO) => { + return await request.post({ url: '/mes/wm/item-receipt-detail/create', data }) + }, + + // 修改采购入库明细 + updateItemReceiptDetail: async (data: WmItemReceiptDetailVO) => { + return await request.put({ url: '/mes/wm/item-receipt-detail/update', data }) + }, + + // 删除采购入库明细 + deleteItemReceiptDetail: async (id: number) => { + return await request.delete({ url: '/mes/wm/item-receipt-detail/delete?id=' + id }) + } +} diff --git a/src/api/mes/wm/itemreceipt/index.ts b/src/api/mes/wm/itemreceipt/index.ts new file mode 100644 index 000000000..cce441b79 --- /dev/null +++ b/src/api/mes/wm/itemreceipt/index.ts @@ -0,0 +1,73 @@ +import request from '@/config/axios' + +// MES 采购入库单 VO +export interface WmItemReceiptVO { + id: number + code: string + name: string + iqcId: number + iqcCode: string + noticeId: number + noticeCode: string + purchaseOrderCode: string + vendorId: number + vendorName: string + warehouseId: number + warehouseName: string + locationId: number + locationName: string + areaId: number + areaName: string + receiptDate: string + status: number + remark: string + createTime: string +} + +// MES 采购入库单 API +export const WmItemReceiptApi = { + // 查询采购入库单分页 + getItemReceiptPage: async (params: any) => { + return await request.get({ url: '/mes/wm/item-receipt/page', params }) + }, + + // 查询采购入库单详情 + getItemReceipt: async (id: number) => { + return await request.get({ url: '/mes/wm/item-receipt/get?id=' + id }) + }, + + // 新增采购入库单 + createItemReceipt: async (data: WmItemReceiptVO) => { + return await request.post({ url: '/mes/wm/item-receipt/create', data }) + }, + + // 修改采购入库单 + updateItemReceipt: async (data: WmItemReceiptVO) => { + return await request.put({ url: '/mes/wm/item-receipt/update', data }) + }, + + // 删除采购入库单 + deleteItemReceipt: async (id: number) => { + return await request.delete({ url: '/mes/wm/item-receipt/delete?id=' + id }) + }, + + // 提交采购入库单 + submitItemReceipt: async (id: number) => { + return await request.put({ url: '/mes/wm/item-receipt/submit?id=' + id }) + }, + + // 审批采购入库单 + approveItemReceipt: async (id: number) => { + return await request.put({ url: '/mes/wm/item-receipt/approve?id=' + id }) + }, + + // 执行入库 + executeItemReceipt: async (id: number) => { + return await request.put({ url: '/mes/wm/item-receipt/execute?id=' + id }) + }, + + // 导出采购入库单 Excel + exportItemReceipt: async (params: any) => { + return await request.download({ url: '/mes/wm/item-receipt/export-excel', params }) + } +} diff --git a/src/api/mes/wm/itemreceipt/line/index.ts b/src/api/mes/wm/itemreceipt/line/index.ts new file mode 100644 index 000000000..eff3577c7 --- /dev/null +++ b/src/api/mes/wm/itemreceipt/line/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +// MES 采购入库单行 VO +export interface WmItemReceiptLineVO { + id: number + receiptId: number + noticeLineId: number + itemId: number + itemCode: string + itemName: string + specification: string + unitMeasureName: string + receivedQuantity: number + batchId: number + warehouseId: number + warehouseName: string + locationId: number + locationName: string + areaId: number + areaName: string + productionDate: string + expireDate: string + productionBatchNumber: string + iqcCheckFlag: boolean + iqcId: number + iqcCode: string + remark: string + createTime: string +} + +// MES 采购入库单行 API +export const WmItemReceiptLineApi = { + // 查询采购入库单行分页 + getItemReceiptLinePage: async (params: any) => { + return await request.get({ url: '/mes/wm/item-receipt-line/page', params }) + }, + + // 查询采购入库单行详情 + getItemReceiptLine: async (id: number) => { + return await request.get({ url: '/mes/wm/item-receipt-line/get?id=' + id }) + }, + + // 新增采购入库单行 + createItemReceiptLine: async (data: WmItemReceiptLineVO) => { + return await request.post({ url: '/mes/wm/item-receipt-line/create', data }) + }, + + // 修改采购入库单行 + updateItemReceiptLine: async (data: WmItemReceiptLineVO) => { + return await request.put({ url: '/mes/wm/item-receipt-line/update', data }) + }, + + // 删除采购入库单行 + deleteItemReceiptLine: async (id: number) => { + return await request.delete({ url: '/mes/wm/item-receipt-line/delete?id=' + id }) + } +}