feat(mes): 同步 api 的迁移
parent
dab9509ba0
commit
b9d333f7ec
|
|
@ -0,0 +1,37 @@
|
|||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdItemBatchConfigApi {
|
||||
/** MES 物料批次属性配置 */
|
||||
export interface BatchConfig {
|
||||
id?: number;
|
||||
itemId?: number;
|
||||
produceDateFlag?: boolean;
|
||||
expireDateFlag?: boolean;
|
||||
receiptDateFlag?: boolean;
|
||||
vendorFlag?: boolean;
|
||||
clientFlag?: boolean;
|
||||
salesOrderCodeFlag?: boolean;
|
||||
purchaseOrderCodeFlag?: boolean;
|
||||
workorderFlag?: boolean;
|
||||
taskFlag?: boolean;
|
||||
workstationFlag?: boolean;
|
||||
toolFlag?: boolean;
|
||||
moldFlag?: boolean;
|
||||
lotNumberFlag?: boolean;
|
||||
qualityStatusFlag?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/** 根据物料编号获取批次属性配置 */
|
||||
export function getBatchConfigByItemId(itemId: number) {
|
||||
return requestClient.get<MesMdItemBatchConfigApi.BatchConfig>(
|
||||
`/mes/md/item-batch-config/get-by-item-id?itemId=${itemId}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 保存批次属性配置 */
|
||||
export function saveBatchConfig(
|
||||
data: MesMdItemBatchConfigApi.BatchConfig,
|
||||
) {
|
||||
return requestClient.post('/mes/md/item-batch-config/save', data);
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdItemApi {
|
||||
/** MES 物料产品 */
|
||||
export interface Item {
|
||||
id?: number;
|
||||
code?: string;
|
||||
name?: string;
|
||||
specification?: string;
|
||||
unitMeasureId?: number;
|
||||
unitMeasureName?: string;
|
||||
itemTypeId?: number;
|
||||
itemTypeName?: string;
|
||||
itemOrProduct?: string;
|
||||
status?: number;
|
||||
safeStockFlag?: boolean;
|
||||
minStock?: number;
|
||||
maxStock?: number;
|
||||
highValue?: boolean;
|
||||
batchFlag?: boolean;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
/** 物料导入结果 */
|
||||
export interface ItemImportRespVO {
|
||||
createCodes?: string[];
|
||||
updateCodes?: string[];
|
||||
failureCodes?: Record<string, string>;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询物料产品分页 */
|
||||
export function getItemPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesMdItemApi.Item>>('/mes/md/item/page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询物料产品详情 */
|
||||
export function getItem(id: number) {
|
||||
return requestClient.get<MesMdItemApi.Item>(`/mes/md/item/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增物料产品 */
|
||||
export function createItem(data: MesMdItemApi.Item) {
|
||||
return requestClient.post<number>('/mes/md/item/create', data);
|
||||
}
|
||||
|
||||
/** 修改物料产品 */
|
||||
export function updateItem(data: MesMdItemApi.Item) {
|
||||
return requestClient.put('/mes/md/item/update', data);
|
||||
}
|
||||
|
||||
/** 修改物料产品状态 */
|
||||
export function updateItemStatus(id: number, status: number) {
|
||||
return requestClient.put('/mes/md/item/update-status', undefined, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除物料产品 */
|
||||
export function deleteItem(id: number) {
|
||||
return requestClient.delete(`/mes/md/item/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出物料产品 */
|
||||
export function exportItem(params: any) {
|
||||
return requestClient.download('/mes/md/item/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 下载物料导入模板 */
|
||||
export function importItemTemplate() {
|
||||
return requestClient.download('/mes/md/item/get-import-template');
|
||||
}
|
||||
|
||||
/** 导入物料产品 */
|
||||
export function importItem(file: File, updateSupport: boolean) {
|
||||
return requestClient.upload<MesMdItemApi.ItemImportRespVO>(
|
||||
`/mes/md/item/import?updateSupport=${updateSupport}`,
|
||||
{ file },
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdProductBomApi {
|
||||
/** MES 产品 BOM */
|
||||
export interface ProductBom {
|
||||
id?: number;
|
||||
itemId?: number;
|
||||
bomItemId?: number;
|
||||
quantity?: number;
|
||||
status?: number;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
bomItemCode?: string;
|
||||
bomItemName?: string;
|
||||
bomItemSpecification?: string;
|
||||
unitMeasureName?: string;
|
||||
itemOrProduct?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建产品 BOM */
|
||||
export function createProductBom(data: MesMdProductBomApi.ProductBom) {
|
||||
return requestClient.post('/mes/md/product-bom/create', data);
|
||||
}
|
||||
|
||||
/** 更新产品 BOM */
|
||||
export function updateProductBom(data: MesMdProductBomApi.ProductBom) {
|
||||
return requestClient.put('/mes/md/product-bom/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品 BOM */
|
||||
export function deleteProductBom(id: number) {
|
||||
return requestClient.delete(`/mes/md/product-bom/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获得产品 BOM */
|
||||
export function getProductBom(id: number) {
|
||||
return requestClient.get<MesMdProductBomApi.ProductBom>(
|
||||
`/mes/md/product-bom/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得产品 BOM 分页 */
|
||||
export function getProductBomPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesMdProductBomApi.ProductBom>>(
|
||||
'/mes/md/product-bom/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据物料产品编号获得产品 BOM 列表 */
|
||||
export function getProductBomListByItemId(itemId: number) {
|
||||
return requestClient.get<MesMdProductBomApi.ProductBom[]>(
|
||||
`/mes/md/product-bom/list-by-item-id?itemId=${itemId}`,
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdProductSipApi {
|
||||
/** MES 产品 SIP */
|
||||
export interface ProductSip {
|
||||
id?: number;
|
||||
itemId?: number;
|
||||
sort?: number;
|
||||
processId?: number;
|
||||
title?: string;
|
||||
description?: string;
|
||||
url?: string;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
processCode?: string;
|
||||
processName?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建产品 SIP */
|
||||
export function createProductSip(data: MesMdProductSipApi.ProductSip) {
|
||||
return requestClient.post('/mes/md/product-sip/create', data);
|
||||
}
|
||||
|
||||
/** 更新产品 SIP */
|
||||
export function updateProductSip(data: MesMdProductSipApi.ProductSip) {
|
||||
return requestClient.put('/mes/md/product-sip/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品 SIP */
|
||||
export function deleteProductSip(id: number) {
|
||||
return requestClient.delete(`/mes/md/product-sip/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获得产品 SIP */
|
||||
export function getProductSip(id: number) {
|
||||
return requestClient.get<MesMdProductSipApi.ProductSip>(
|
||||
`/mes/md/product-sip/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得产品 SIP 分页 */
|
||||
export function getProductSipPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesMdProductSipApi.ProductSip>>(
|
||||
'/mes/md/product-sip/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据物料产品编号获得产品 SIP 列表 */
|
||||
export function getProductSipListByItemId(itemId: number) {
|
||||
return requestClient.get<MesMdProductSipApi.ProductSip[]>(
|
||||
`/mes/md/product-sip/list-by-item-id?itemId=${itemId}`,
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdProductSopApi {
|
||||
/** MES 产品 SOP */
|
||||
export interface ProductSop {
|
||||
id?: number;
|
||||
itemId?: number;
|
||||
sort?: number;
|
||||
processId?: number;
|
||||
title?: string;
|
||||
description?: string;
|
||||
url?: string;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
processCode?: string;
|
||||
processName?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建产品 SOP */
|
||||
export function createProductSop(data: MesMdProductSopApi.ProductSop) {
|
||||
return requestClient.post('/mes/md/product-sop/create', data);
|
||||
}
|
||||
|
||||
/** 更新产品 SOP */
|
||||
export function updateProductSop(data: MesMdProductSopApi.ProductSop) {
|
||||
return requestClient.put('/mes/md/product-sop/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品 SOP */
|
||||
export function deleteProductSop(id: number) {
|
||||
return requestClient.delete(`/mes/md/product-sop/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获得产品 SOP */
|
||||
export function getProductSop(id: number) {
|
||||
return requestClient.get<MesMdProductSopApi.ProductSop>(
|
||||
`/mes/md/product-sop/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得产品 SOP 分页 */
|
||||
export function getProductSopPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesMdProductSopApi.ProductSop>>(
|
||||
'/mes/md/product-sop/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据物料产品编号获得产品 SOP 列表 */
|
||||
export function getProductSopListByItemId(itemId: number) {
|
||||
return requestClient.get<MesMdProductSopApi.ProductSop[]>(
|
||||
`/mes/md/product-sop/list-by-item-id?itemId=${itemId}`,
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdUnitMeasureApi {
|
||||
/** MES 计量单位 */
|
||||
export interface UnitMeasure {
|
||||
id: number;
|
||||
code?: string;
|
||||
name?: string;
|
||||
primaryFlag?: boolean;
|
||||
primaryId?: number;
|
||||
changeRate?: number;
|
||||
status?: number;
|
||||
remark?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询计量单位分页 */
|
||||
export function getUnitMeasurePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesMdUnitMeasureApi.UnitMeasure>>(
|
||||
'/mes/md/unit-measure/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询计量单位精简列表 */
|
||||
export function getUnitMeasureSimpleList() {
|
||||
return requestClient.get<MesMdUnitMeasureApi.UnitMeasure[]>(
|
||||
'/mes/md/unit-measure/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询计量单位详情 */
|
||||
export function getUnitMeasure(id: number) {
|
||||
return requestClient.get<MesMdUnitMeasureApi.UnitMeasure>(
|
||||
`/mes/md/unit-measure/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增计量单位 */
|
||||
export function createUnitMeasure(data: MesMdUnitMeasureApi.UnitMeasure) {
|
||||
return requestClient.post('/mes/md/unit-measure/create', data);
|
||||
}
|
||||
|
||||
/** 修改计量单位 */
|
||||
export function updateUnitMeasure(data: MesMdUnitMeasureApi.UnitMeasure) {
|
||||
return requestClient.put('/mes/md/unit-measure/update', data);
|
||||
}
|
||||
|
||||
/** 删除计量单位 */
|
||||
export function deleteUnitMeasure(id: number) {
|
||||
return requestClient.delete(`/mes/md/unit-measure/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出计量单位 */
|
||||
export function exportUnitMeasure(params: any) {
|
||||
return requestClient.download('/mes/md/unit-measure/export-excel', { params });
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesProProcessApi {
|
||||
/** MES 生产工序 */
|
||||
export interface Process {
|
||||
id: number;
|
||||
code?: string;
|
||||
name?: string;
|
||||
attention?: string;
|
||||
status?: number;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询生产工序分页 */
|
||||
export function getProcessPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesProProcessApi.Process>>(
|
||||
'/mes/pro/process/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询生产工序精简列表 */
|
||||
export function getProcessSimpleList() {
|
||||
return requestClient.get<MesProProcessApi.Process[]>(
|
||||
'/mes/pro/process/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询生产工序详情 */
|
||||
export function getProcess(id: number) {
|
||||
return requestClient.get<MesProProcessApi.Process>(
|
||||
`/mes/pro/process/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesWmBarcodeApi {
|
||||
/** MES 条码清单 */
|
||||
export interface Barcode {
|
||||
id?: number;
|
||||
configId?: number;
|
||||
format?: number;
|
||||
bizType?: number;
|
||||
content?: string;
|
||||
bizId?: number;
|
||||
bizCode?: string;
|
||||
bizName?: string;
|
||||
status?: number;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询条码分页 */
|
||||
export function getBarcodePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesWmBarcodeApi.Barcode>>(
|
||||
'/mes/wm/barcode/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询条码详情 */
|
||||
export function getBarcode(id: number) {
|
||||
return requestClient.get<MesWmBarcodeApi.Barcode>(
|
||||
`/mes/wm/barcode/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据业务对象获取条码 */
|
||||
export function getBarcodeByBusiness(bizType: number, bizId: number) {
|
||||
return requestClient.get<MesWmBarcodeApi.Barcode>(
|
||||
'/mes/wm/barcode/get-by-business',
|
||||
{ params: { bizType, bizId } },
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增条码 */
|
||||
export function createBarcode(data: MesWmBarcodeApi.Barcode) {
|
||||
return requestClient.post('/mes/wm/barcode/create', data);
|
||||
}
|
||||
|
||||
/** 修改条码 */
|
||||
export function updateBarcode(data: MesWmBarcodeApi.Barcode) {
|
||||
return requestClient.put('/mes/wm/barcode/update', data);
|
||||
}
|
||||
|
||||
/** 删除条码 */
|
||||
export function deleteBarcode(id: number) {
|
||||
return requestClient.delete(`/mes/wm/barcode/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 生成条码内容 */
|
||||
export function generateBarcodeContent(bizType: number, bizCode: string) {
|
||||
return requestClient.get<string>('/mes/wm/barcode/generate-content', {
|
||||
params: { bizType, bizCode },
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdItemBatchConfigApi {
|
||||
/** MES 物料批次属性配置 */
|
||||
export interface BatchConfig {
|
||||
id?: number;
|
||||
itemId?: number;
|
||||
produceDateFlag?: boolean;
|
||||
expireDateFlag?: boolean;
|
||||
receiptDateFlag?: boolean;
|
||||
vendorFlag?: boolean;
|
||||
clientFlag?: boolean;
|
||||
salesOrderCodeFlag?: boolean;
|
||||
purchaseOrderCodeFlag?: boolean;
|
||||
workorderFlag?: boolean;
|
||||
taskFlag?: boolean;
|
||||
workstationFlag?: boolean;
|
||||
toolFlag?: boolean;
|
||||
moldFlag?: boolean;
|
||||
lotNumberFlag?: boolean;
|
||||
qualityStatusFlag?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/** 根据物料编号获取批次属性配置 */
|
||||
export function getBatchConfigByItemId(itemId: number) {
|
||||
return requestClient.get<MesMdItemBatchConfigApi.BatchConfig>(
|
||||
`/mes/md/item-batch-config/get-by-item-id?itemId=${itemId}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 保存批次属性配置 */
|
||||
export function saveBatchConfig(
|
||||
data: MesMdItemBatchConfigApi.BatchConfig,
|
||||
) {
|
||||
return requestClient.post('/mes/md/item-batch-config/save', data);
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdItemApi {
|
||||
/** MES 物料产品 */
|
||||
export interface Item {
|
||||
id?: number;
|
||||
code?: string;
|
||||
name?: string;
|
||||
specification?: string;
|
||||
unitMeasureId?: number;
|
||||
unitMeasureName?: string;
|
||||
itemTypeId?: number;
|
||||
itemTypeName?: string;
|
||||
itemOrProduct?: string;
|
||||
status?: number;
|
||||
safeStockFlag?: boolean;
|
||||
minStock?: number;
|
||||
maxStock?: number;
|
||||
highValue?: boolean;
|
||||
batchFlag?: boolean;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
/** 物料导入结果 */
|
||||
export interface ItemImportRespVO {
|
||||
createCodes?: string[];
|
||||
updateCodes?: string[];
|
||||
failureCodes?: Record<string, string>;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询物料产品分页 */
|
||||
export function getItemPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesMdItemApi.Item>>('/mes/md/item/page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询物料产品详情 */
|
||||
export function getItem(id: number) {
|
||||
return requestClient.get<MesMdItemApi.Item>(`/mes/md/item/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增物料产品 */
|
||||
export function createItem(data: MesMdItemApi.Item) {
|
||||
return requestClient.post<number>('/mes/md/item/create', data);
|
||||
}
|
||||
|
||||
/** 修改物料产品 */
|
||||
export function updateItem(data: MesMdItemApi.Item) {
|
||||
return requestClient.put('/mes/md/item/update', data);
|
||||
}
|
||||
|
||||
/** 修改物料产品状态 */
|
||||
export function updateItemStatus(id: number, status: number) {
|
||||
return requestClient.put('/mes/md/item/update-status', undefined, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除物料产品 */
|
||||
export function deleteItem(id: number) {
|
||||
return requestClient.delete(`/mes/md/item/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出物料产品 */
|
||||
export function exportItem(params: any) {
|
||||
return requestClient.download('/mes/md/item/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 下载物料导入模板 */
|
||||
export function importItemTemplate() {
|
||||
return requestClient.download('/mes/md/item/get-import-template');
|
||||
}
|
||||
|
||||
/** 导入物料产品 */
|
||||
export function importItem(file: File, updateSupport: boolean) {
|
||||
return requestClient.upload<MesMdItemApi.ItemImportRespVO>(
|
||||
`/mes/md/item/import?updateSupport=${updateSupport}`,
|
||||
{ file },
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdProductBomApi {
|
||||
/** MES 产品 BOM */
|
||||
export interface ProductBom {
|
||||
id?: number;
|
||||
itemId?: number;
|
||||
bomItemId?: number;
|
||||
quantity?: number;
|
||||
status?: number;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
bomItemCode?: string;
|
||||
bomItemName?: string;
|
||||
bomItemSpecification?: string;
|
||||
unitMeasureName?: string;
|
||||
itemOrProduct?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建产品 BOM */
|
||||
export function createProductBom(data: MesMdProductBomApi.ProductBom) {
|
||||
return requestClient.post('/mes/md/product-bom/create', data);
|
||||
}
|
||||
|
||||
/** 更新产品 BOM */
|
||||
export function updateProductBom(data: MesMdProductBomApi.ProductBom) {
|
||||
return requestClient.put('/mes/md/product-bom/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品 BOM */
|
||||
export function deleteProductBom(id: number) {
|
||||
return requestClient.delete(`/mes/md/product-bom/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获得产品 BOM */
|
||||
export function getProductBom(id: number) {
|
||||
return requestClient.get<MesMdProductBomApi.ProductBom>(
|
||||
`/mes/md/product-bom/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得产品 BOM 分页 */
|
||||
export function getProductBomPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesMdProductBomApi.ProductBom>>(
|
||||
'/mes/md/product-bom/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据物料产品编号获得产品 BOM 列表 */
|
||||
export function getProductBomListByItemId(itemId: number) {
|
||||
return requestClient.get<MesMdProductBomApi.ProductBom[]>(
|
||||
`/mes/md/product-bom/list-by-item-id?itemId=${itemId}`,
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdProductSipApi {
|
||||
/** MES 产品 SIP */
|
||||
export interface ProductSip {
|
||||
id?: number;
|
||||
itemId?: number;
|
||||
sort?: number;
|
||||
processId?: number;
|
||||
title?: string;
|
||||
description?: string;
|
||||
url?: string;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
processCode?: string;
|
||||
processName?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建产品 SIP */
|
||||
export function createProductSip(data: MesMdProductSipApi.ProductSip) {
|
||||
return requestClient.post('/mes/md/product-sip/create', data);
|
||||
}
|
||||
|
||||
/** 更新产品 SIP */
|
||||
export function updateProductSip(data: MesMdProductSipApi.ProductSip) {
|
||||
return requestClient.put('/mes/md/product-sip/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品 SIP */
|
||||
export function deleteProductSip(id: number) {
|
||||
return requestClient.delete(`/mes/md/product-sip/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获得产品 SIP */
|
||||
export function getProductSip(id: number) {
|
||||
return requestClient.get<MesMdProductSipApi.ProductSip>(
|
||||
`/mes/md/product-sip/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得产品 SIP 分页 */
|
||||
export function getProductSipPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesMdProductSipApi.ProductSip>>(
|
||||
'/mes/md/product-sip/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据物料产品编号获得产品 SIP 列表 */
|
||||
export function getProductSipListByItemId(itemId: number) {
|
||||
return requestClient.get<MesMdProductSipApi.ProductSip[]>(
|
||||
`/mes/md/product-sip/list-by-item-id?itemId=${itemId}`,
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdProductSopApi {
|
||||
/** MES 产品 SOP */
|
||||
export interface ProductSop {
|
||||
id?: number;
|
||||
itemId?: number;
|
||||
sort?: number;
|
||||
processId?: number;
|
||||
title?: string;
|
||||
description?: string;
|
||||
url?: string;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
processCode?: string;
|
||||
processName?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建产品 SOP */
|
||||
export function createProductSop(data: MesMdProductSopApi.ProductSop) {
|
||||
return requestClient.post('/mes/md/product-sop/create', data);
|
||||
}
|
||||
|
||||
/** 更新产品 SOP */
|
||||
export function updateProductSop(data: MesMdProductSopApi.ProductSop) {
|
||||
return requestClient.put('/mes/md/product-sop/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品 SOP */
|
||||
export function deleteProductSop(id: number) {
|
||||
return requestClient.delete(`/mes/md/product-sop/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获得产品 SOP */
|
||||
export function getProductSop(id: number) {
|
||||
return requestClient.get<MesMdProductSopApi.ProductSop>(
|
||||
`/mes/md/product-sop/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得产品 SOP 分页 */
|
||||
export function getProductSopPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesMdProductSopApi.ProductSop>>(
|
||||
'/mes/md/product-sop/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 根据物料产品编号获得产品 SOP 列表 */
|
||||
export function getProductSopListByItemId(itemId: number) {
|
||||
return requestClient.get<MesMdProductSopApi.ProductSop[]>(
|
||||
`/mes/md/product-sop/list-by-item-id?itemId=${itemId}`,
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MesMdUnitMeasureApi {
|
||||
/** MES 计量单位 */
|
||||
export interface UnitMeasure {
|
||||
id: number;
|
||||
code?: string;
|
||||
name?: string;
|
||||
primaryFlag?: boolean;
|
||||
primaryId?: number;
|
||||
changeRate?: number;
|
||||
status?: number;
|
||||
remark?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询计量单位分页 */
|
||||
export function getUnitMeasurePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MesMdUnitMeasureApi.UnitMeasure>>(
|
||||
'/mes/md/unit-measure/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询计量单位精简列表 */
|
||||
export function getUnitMeasureSimpleList() {
|
||||
return requestClient.get<MesMdUnitMeasureApi.UnitMeasure[]>(
|
||||
'/mes/md/unit-measure/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询计量单位详情 */
|
||||
export function getUnitMeasure(id: number) {
|
||||
return requestClient.get<MesMdUnitMeasureApi.UnitMeasure>(
|
||||
`/mes/md/unit-measure/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增计量单位 */
|
||||
export function createUnitMeasure(data: MesMdUnitMeasureApi.UnitMeasure) {
|
||||
return requestClient.post('/mes/md/unit-measure/create', data);
|
||||
}
|
||||
|
||||
/** 修改计量单位 */
|
||||
export function updateUnitMeasure(data: MesMdUnitMeasureApi.UnitMeasure) {
|
||||
return requestClient.put('/mes/md/unit-measure/update', data);
|
||||
}
|
||||
|
||||
/** 删除计量单位 */
|
||||
export function deleteUnitMeasure(id: number) {
|
||||
return requestClient.delete(`/mes/md/unit-measure/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出计量单位 */
|
||||
export function exportUnitMeasure(params: any) {
|
||||
return requestClient.download('/mes/md/unit-measure/export-excel', { params });
|
||||
}
|
||||
Loading…
Reference in New Issue