优化接口文件结构
更新接口文件
This commit is contained in:
8
src/api/common/model.d.ts
vendored
8
src/api/common/model.d.ts
vendored
@@ -1,8 +0,0 @@
|
||||
export interface ApiResponse<T = any> {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
data?: T;
|
||||
rows?: T[];
|
||||
total?: number;
|
||||
token?: string;
|
||||
}
|
||||
81
src/api/pwoManage/fixtureCombination/index.ts
Normal file
81
src/api/pwoManage/fixtureCombination/index.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
import request from "@/api/request";
|
||||
import type { FixtureCombinationData, FixtureCombinationQuery } from "./model";
|
||||
import type { ID } from "@/api/common";
|
||||
|
||||
// 查询治具组合列表
|
||||
export function listMaskCombination(params: FixtureCombinationQuery) {
|
||||
return request({
|
||||
url: "/tpm/mask/combination/list",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询治具组合包含的治具列表
|
||||
export function listCombinationAssignMask(id: ID, params: FixtureCombinationQuery) {
|
||||
return request({
|
||||
url: "/tpm/mask/combination/" + id + "/masks",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 高级查询治具组合列表
|
||||
export function advListMaskCombination(params: FixtureCombinationQuery) {
|
||||
return request({
|
||||
url: "/tpm/mask/combination/advList",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询治具组合详细
|
||||
export function getMaskCombination(id: ID) {
|
||||
return request({
|
||||
url: "/tpm/mask/combination/" + id,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增治具组合
|
||||
export function addMaskCombination(data: FixtureCombinationData) {
|
||||
return request({
|
||||
url: "/tpm/mask/combination",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改治具组合
|
||||
export function updateMaskCombination(data: FixtureCombinationData) {
|
||||
return request({
|
||||
url: "/tpm/mask/combination",
|
||||
method: "put",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除治具组合
|
||||
export function delMaskCombination(id: ID) {
|
||||
return request({
|
||||
url: "/tpm/mask/combination/" + id,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增治具组合与治具关联关系
|
||||
export function addMaskCombinationAssignment(data: FixtureCombinationData) {
|
||||
return request({
|
||||
url: "/tpm/mask/combination/assignment",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除治具组合与治具关联关系
|
||||
export function delMaskCombinationAssignment(id: ID) {
|
||||
return request({
|
||||
url: "/tpm/mask/combination/assignment/" + id,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
||||
26
src/api/pwoManage/fixtureCombination/model.d.ts
vendored
Normal file
26
src/api/pwoManage/fixtureCombination/model.d.ts
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import { BaseEntity, PageQuery, type ID } from "@/api/common";
|
||||
/**
|
||||
* 治具组合查询参数
|
||||
*/
|
||||
export interface FixtureCombinationQuery extends PageQuery {
|
||||
combinationName?: string;
|
||||
combinationCode?: string;
|
||||
combinationStatus?: string;
|
||||
remark?: string;
|
||||
searchValue?: string;
|
||||
tempId?: string;
|
||||
timeRange?: [string, string];
|
||||
}
|
||||
|
||||
/**
|
||||
* 治具组合数据
|
||||
*/
|
||||
export interface FixtureCombinationData extends BaseEntity {
|
||||
combinationName?: string;
|
||||
combinationCode?: string;
|
||||
combinationStatus?: string;
|
||||
remark?: string;
|
||||
searchValue?: string;
|
||||
tempId?: string;
|
||||
timeRange?: [string, string];
|
||||
}
|
||||
63
src/api/pwoManage/index.ts
Normal file
63
src/api/pwoManage/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from "@/api/request";
|
||||
import type { LotTraceOrderData, LotTraceOrderQuery } from "./model";
|
||||
import type { ID } from "@/api/common";
|
||||
|
||||
// 查询随工单列表
|
||||
export function listLotTraceOrder(params: LotTraceOrderQuery) {
|
||||
return request({
|
||||
url: "/mes/lot-trace-order/list",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 高级查询随工单列表
|
||||
export function advListLotTraceOrder(params: LotTraceOrderQuery) {
|
||||
return request({
|
||||
url: "/mes/lot-trace-order/advList",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询随工单详细
|
||||
export function getLotTraceOrder(id: ID) {
|
||||
return request({
|
||||
url: "/mes/lot-trace-order/" + id,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增随工单
|
||||
export function addLotTraceOrder(data: LotTraceOrderData) {
|
||||
return request({
|
||||
url: "/mes/lot-trace-order",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改随工单
|
||||
export function updateLotTraceOrder(data: LotTraceOrderData) {
|
||||
return request({
|
||||
url: "/mes/lot-trace-order",
|
||||
method: "put",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除随工单
|
||||
export function delLotTraceOrder(id: ID) {
|
||||
return request({
|
||||
url: "/mes/lot-trace-order/" + id,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
||||
|
||||
// 关闭随工单
|
||||
export function closeLotTraceOrder(id: ID) {
|
||||
return request({
|
||||
url: "/mes/lot-trace-order/close/" + id,
|
||||
method: "put",
|
||||
});
|
||||
}
|
||||
188
src/api/pwoManage/model.d.ts
vendored
Normal file
188
src/api/pwoManage/model.d.ts
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
import { BaseEntity, PageQuery, type ID } from "@/api/common";
|
||||
/**
|
||||
* 随工单查询参数
|
||||
*/
|
||||
export interface LotTraceOrderQuery extends PageQuery {
|
||||
/** 编码 */
|
||||
code?: string;
|
||||
/** 状态 */
|
||||
status?: string;
|
||||
/** 主生产计划的ID */
|
||||
mpsId?: number;
|
||||
/** 主生产计划编码 */
|
||||
mpsCode?: string;
|
||||
/** 订单类型 */
|
||||
orderType?: string;
|
||||
/** 主生产计划明细ID */
|
||||
mpsDetailId?: number;
|
||||
/** 批号 */
|
||||
batchNo?: string;
|
||||
/** 主生产计划明细序号 */
|
||||
mpsDetailSeq?: number;
|
||||
/** 目标产品ID */
|
||||
tarMaterialId?: number;
|
||||
/** 主物料ID */
|
||||
masterMaterialId?: number;
|
||||
/** 生产版本ID */
|
||||
prodVersionId?: number;
|
||||
/** 计划数量 */
|
||||
planQty?: number;
|
||||
/** OK数量 */
|
||||
okQty?: number;
|
||||
/** NG数量 */
|
||||
ngQty?: number;
|
||||
/** 未完成数量 */
|
||||
unfinishedQty?: number;
|
||||
/** 单位ID */
|
||||
unitId?: number;
|
||||
/** 计划开始时间范围 */
|
||||
planStartTimeRange?: [string, string];
|
||||
/** 计划结束时间范围 */
|
||||
planEndTimeRange?: [string, string];
|
||||
/** 扩展字段1 */
|
||||
extStr1?: string;
|
||||
/** 扩展字段2 */
|
||||
extStr2?: string;
|
||||
/** 扩展字段3 */
|
||||
extStr3?: string;
|
||||
/** 扩展字段4 */
|
||||
extStr4?: string;
|
||||
/** 扩展字段5 */
|
||||
extStr5?: string;
|
||||
/** 扩展字段6 */
|
||||
extStr6?: string;
|
||||
/** 扩展字段7 */
|
||||
extStr7?: string;
|
||||
/** 扩展字段8 */
|
||||
extStr8?: string;
|
||||
/** 扩展字段9 */
|
||||
extStr9?: string;
|
||||
/** 扩展字段10 */
|
||||
extStr10?: string;
|
||||
/** 扩展字段11 */
|
||||
extStr11?: string;
|
||||
/** 扩展字段12 */
|
||||
extStr12?: string;
|
||||
/** 扩展字段13 */
|
||||
extStr13?: string;
|
||||
/** 扩展字段14 */
|
||||
extStr14?: string;
|
||||
/** 扩展字段15 */
|
||||
extStr15?: string;
|
||||
/** 扩展字段16 */
|
||||
extStr16?: string;
|
||||
/** 扩展整型1 */
|
||||
extInt1?: number;
|
||||
/** 扩展整型2 */
|
||||
extInt2?: number;
|
||||
/** 扩展小数1 */
|
||||
extDec1?: number;
|
||||
/** 扩展小数2 */
|
||||
extDec2?: number;
|
||||
/** 扩展日期1范围 */
|
||||
extDate1Range?: [string, string];
|
||||
/** 扩展日期2范围 */
|
||||
extDate2Range?: [string, string];
|
||||
/** 删除标志 */
|
||||
delStatus?: string;
|
||||
/** 创建时间范围 */
|
||||
createTimeRange?: [string, string];
|
||||
/** 更新时间范围 */
|
||||
updateTimeRange?: [string, string];
|
||||
}
|
||||
|
||||
/**
|
||||
* 随工单数据
|
||||
*/
|
||||
export interface LotTraceOrderData extends BaseEntity {
|
||||
/** 主键ID */
|
||||
id?: ID;
|
||||
/** 编码 */
|
||||
code?: string;
|
||||
/** 状态 */
|
||||
status?: string;
|
||||
/** 主生产计划的ID */
|
||||
mpsId?: number;
|
||||
/** 主生产计划编码 */
|
||||
mpsCode?: string;
|
||||
/** 订单类型 */
|
||||
orderType?: string;
|
||||
/** 主生产计划明细ID */
|
||||
mpsDetailId?: number;
|
||||
/** 批号 */
|
||||
batchNo?: string;
|
||||
/** 主生产计划明细序号 */
|
||||
mpsDetailSeq?: number;
|
||||
/** 目标产品ID */
|
||||
tarMaterialId?: number;
|
||||
/** 目标产品名称 */
|
||||
tarMaterialName?: string;
|
||||
/** 目标产品编码 */
|
||||
tarMaterialCode?: string;
|
||||
/** 主物料ID */
|
||||
masterMaterialId?: number;
|
||||
/** 生产版本ID */
|
||||
prodVersionId?: number;
|
||||
/** 计划数量 */
|
||||
planQty?: number;
|
||||
/** OK数量 */
|
||||
okQty?: number;
|
||||
/** NG数量 */
|
||||
ngQty?: number;
|
||||
/** 未完成数量 */
|
||||
unfinishedQty?: number;
|
||||
/** 单位ID */
|
||||
unitId?: number;
|
||||
/** 计划开始时间 */
|
||||
planStartTime?: string;
|
||||
/** 计划结束时间 */
|
||||
planEndTime?: string;
|
||||
/** 扩展字段1 */
|
||||
extStr1?: string;
|
||||
/** 扩展字段2 */
|
||||
extStr2?: string;
|
||||
/** 扩展字段3 */
|
||||
extStr3?: string;
|
||||
/** 扩展字段4 */
|
||||
extStr4?: string;
|
||||
/** 扩展字段5 */
|
||||
extStr5?: string;
|
||||
/** 扩展字段6 */
|
||||
extStr6?: string;
|
||||
/** 扩展字段7 */
|
||||
extStr7?: string;
|
||||
/** 扩展字段8 */
|
||||
extStr8?: string;
|
||||
/** 扩展字段9 */
|
||||
extStr9?: string;
|
||||
/** 扩展字段10 */
|
||||
extStr10?: string;
|
||||
/** 扩展字段11 */
|
||||
extStr11?: string;
|
||||
/** 扩展字段12 */
|
||||
extStr12?: string;
|
||||
/** 扩展字段13 */
|
||||
extStr13?: string;
|
||||
/** 扩展字段14 */
|
||||
extStr14?: string;
|
||||
/** 扩展字段15 */
|
||||
extStr15?: string;
|
||||
/** 扩展字段16 */
|
||||
extStr16?: string;
|
||||
/** 扩展整型1 */
|
||||
extInt1?: number;
|
||||
/** 扩展整型2 */
|
||||
extInt2?: number;
|
||||
/** 扩展小数1 */
|
||||
extDec1?: number;
|
||||
/** 扩展小数2 */
|
||||
extDec2?: number;
|
||||
/** 扩展日期1 */
|
||||
extDate1?: string;
|
||||
/** 扩展日期2 */
|
||||
extDate2?: string;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 删除标志 */
|
||||
delStatus?: string;
|
||||
}
|
||||
55
src/api/station/index.ts
Normal file
55
src/api/station/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
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",
|
||||
});
|
||||
}
|
||||
71
src/api/station/model.d.ts
vendored
Normal file
71
src/api/station/model.d.ts
vendored
Normal 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;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import request from '../request'
|
||||
import request from '@/api/request'
|
||||
import type { LoginInfo } from './model';
|
||||
|
||||
// 用户登录
|
||||
@@ -16,4 +16,12 @@ export function getCaptcha() {
|
||||
url: '/captchaImage',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 退出登录
|
||||
export function logout() {
|
||||
return request({
|
||||
url: '/logout',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user