添加设备进站、治具进站、主材进站接口

优化错误拦截逻辑
This commit is contained in:
tao
2025-12-29 08:58:38 +08:00
parent b54233e2e2
commit eeb3f850e9
7 changed files with 154 additions and 1 deletions

View File

@@ -0,0 +1,63 @@
import request from "@/api/request";
import type { ID } from "@/api/common";
import type { MesStationQuery, MesStationData } from "./model";
// 查询站点列表
export function listStation(params: MesStationQuery) {
return request({
url: "/mes/station/list",
method: "get",
params,
});
}
// 高级查询站点列表
export function advListStation(params: MesStationQuery) {
return request({
url: "/mes/station/advList",
method: "get",
params,
});
}
// 查询站点详细
export function getStation(id: ID) {
return request({
url: "/mes/station/" + id,
method: "get",
});
}
// 新增站点
export function addStation(data: MesStationData) {
return request({
url: "/mes/station",
method: "post",
data,
});
}
// 修改站点
export function updateStation(data: MesStationData) {
return request({
url: "/mes/station",
method: "put",
data,
});
}
// 删除站点
export function delStation(id: ID) {
return request({
url: "/mes/station/" + id,
method: "delete",
});
}
// 站点开工
export function startStation(id: ID) {
return request({
url: "/mes/station/" + id + "/start",
method: "put",
});
}

71
src/api/pwoManage/station/model.d.ts vendored Normal file
View File

@@ -0,0 +1,71 @@
import { BaseEntity, PageQuery, type ID } from "@/api/common";
/**
* 站点查询参数
*/
export interface MesStationQuery extends PageQuery {
/** 随工单ID */
traceOrderId?: number;
/** 随工单编码 */
traceOrderCode?: string;
/** 站点序号 */
seqNo?: number;
/** 站点名称 */
name?: string;
/** 站点编码 */
code?: string;
/** 状态 */
status?: string;
/** 计划数量最小值 */
planQtyMin?: number;
/** 计划数量最大值 */
planQtyMax?: number;
/** 合格数量最小值 */
okQtyMin?: number;
/** 合格数量最大值 */
okQtyMax?: number;
/** 不合格数量最小值 */
ngQtyMin?: number;
/** 不合格数量最大值 */
ngQtyMax?: number;
/** 进站时间范围开始 */
arrivalTimeStart?: string;
/** 进站时间范围结束 */
arrivalTimeEnd?: string;
/** 出战时间范围开始 */
departureTimeStart?: string;
/** 出战时间范围结束 */
departureTimeEnd?: string;
/** 删除标志 */
delStatus?: string;
}
/**
* 站点数据
*/
export interface MesStationData extends BaseEntity {
/** 主键ID */
id?: number;
/** 随工单ID */
traceOrderId?: number;
/** 站点序号 */
seqNo?: number;
/** 站点名称 */
name?: string;
/** 站点编码 */
code?: string;
/** 状态 */
status?: string;
/** 计划数量 */
planQty?: number;
/** 合格数量 */
okQty?: number;
/** 不合格数量 */
ngQty?: number;
/** 进站时间 */
arrivalTime?: string;
/** 出战时间 */
departureTime?: string;
/** 删除标志 */
delStatus?: string;
}

View File

@@ -0,0 +1,61 @@
import request from "@/api/request";
import type { ID } from "@/api/common";
// 查询主材进站列表
export function listMainMaterialEntryLog(params: any) {
return request({
url: "/mes/station/entry-log/main-material/list",
method: "get",
params,
});
}
// 查询主材进站详细
export function getMainMaterialEntryLog(id: ID) {
return request({
url: "/mes/station/entry-log/main-material/" + id,
method: "get",
});
}
// 新增主材Wafer进站
export function addWaferEntryLog(data: any) {
return request({
url: "/mes/station/entry-log/main-material/wafer",
method: "post",
data,
});
}
// 通过载具新增主材Wafer进站
export function addWaferEntryLogByCarrier(data: any) {
return request({
url: "/mes/station/entry-log/main-material/wafer/by-carrier",
method: "post",
data,
});
}
// 新增主材Die进站
export function addDieEntryLog(data: any) {
return request({
url: "/mes/station/entry-log/main-material/die",
method: "post",
data,
});
}
// 通过载具新增主材Die进站
export function addDieEntryLogByCarrier(data: any) {
return request({
url: "/mes/station/entry-log/main-material/die/by-carrier",
method: "post",
data,
});
}
// 删除主材进站
export function delMainMaterialEntryLog(id: ID) {
return request({
url: "/mes/station/entry-log/main-material/" + id,
method: "delete",
});
}