From 114dfbe1340b07957b4db72367e1609395ffb2e0 Mon Sep 17 00:00:00 2001 From: zch Date: Tue, 14 Jan 2025 15:10:51 +0800 Subject: [PATCH] =?UTF-8?q?add(mes):=20=E5=B7=A5=E5=BA=8F=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=85=B3=E8=81=94=E4=BA=A7=E7=BA=BF=E5=92=8C=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增关联产线和用户的功能按钮和对话框 - 实现关联产线和关联用户的选择、添加、删除功能 - 新增相关的 API 接口和类型定义 --- src/api/mes/baseProcessInfo/index.ts | 14 +- src/api/mes/baseProcessInfo/types.ts | 83 +++++ src/api/mes/prodBaseProcessProdLine/index.ts | 77 ++++ src/api/mes/prodBaseProcessProdLine/types.ts | 65 ++++ src/api/mes/prodBaseProcessUser/index.ts | 77 ++++ src/api/mes/prodBaseProcessUser/types.ts | 79 +++++ src/views/mes/baseProcessInfo/index.vue | 351 ++++++++++++++++++- 7 files changed, 741 insertions(+), 5 deletions(-) create mode 100644 src/api/mes/prodBaseProcessProdLine/index.ts create mode 100644 src/api/mes/prodBaseProcessProdLine/types.ts create mode 100644 src/api/mes/prodBaseProcessUser/index.ts create mode 100644 src/api/mes/prodBaseProcessUser/types.ts diff --git a/src/api/mes/baseProcessInfo/index.ts b/src/api/mes/baseProcessInfo/index.ts index 79c7585..c39398f 100644 --- a/src/api/mes/baseProcessInfo/index.ts +++ b/src/api/mes/baseProcessInfo/index.ts @@ -45,7 +45,19 @@ export const addBaseProcessInfo = (data: BaseProcessInfoForm) => { */ export const updateBaseProcessInfo = (data: BaseProcessInfoForm) => { return request({ - url: '/mes/baseProcessInfo', + url: '/mes/baseProcessInfo/edit', + method: 'put', + data: data + }); +}; + +/** + * 修改工序信息关联用户 + * @param data + */ +export const updateBaseProcessInfoUser = (data: BaseProcessInfoForm) => { + return request({ + url: '/mes/baseProcessInfo/editUser', method: 'put', data: data }); diff --git a/src/api/mes/baseProcessInfo/types.ts b/src/api/mes/baseProcessInfo/types.ts index b1377e1..31f7586 100644 --- a/src/api/mes/baseProcessInfo/types.ts +++ b/src/api/mes/baseProcessInfo/types.ts @@ -69,6 +69,11 @@ export interface BaseProcessInfoVO { */ updateTime: string; + prodBaseProcessProdlineVoList?: ProdBaseProcessProdLine[]; + prodBaseProcessUserVoList?: ProdBaseProcessUser[]; + prodBaseProcessProdlineBoList?: ProdBaseProcessProdLine[]; + prodBaseProcessUserBoList?: ProdBaseProcessUser[]; + } export interface BaseProcessInfoForm extends BaseEntity { @@ -116,6 +121,11 @@ export interface BaseProcessInfoForm extends BaseEntity { productionTimeHours?: number; productionTimeMinutes?: number; + + prodBaseProcessProdlineVoList?: ProdBaseProcessProdLine[]; + prodBaseProcessUserVoList?: ProdBaseProcessUser[]; + prodBaseProcessProdlineBoList?: ProdBaseProcessProdLine[]; + prodBaseProcessUserBoList?: ProdBaseProcessUser[]; } export interface BaseProcessInfoQuery extends PageQuery { @@ -159,7 +169,80 @@ export interface BaseProcessInfoQuery extends PageQuery { * 日期范围参数 */ params?: any; + + prodBaseProcessProdlineV0List?: ProdBaseProcessProdLine[]; + prodBaseProcessUserV0List?: ProdBaseProcessUser[]; + prodBaseProcessProdlineBoList?: ProdBaseProcessProdLine[]; + prodBaseProcessUserBoList?: ProdBaseProcessUser[]; +} + +export interface ProdBaseProcessProdLine { + /** + * 工序ID + */ + processId: string | number; + + /** + * 所属产线ID + */ + prodLineId: string | number; + + /** + * 租户编号 + */ + tenantId: string | number; + + /** + * 创建人 + */ + createBy: string; + + /** + * 创建时间 + */ + createTime: string; + } + +export interface ProdBaseProcessUser { + /** + * 工序ID + */ + processId: string | number; + + /** + * 用户ID + */ + userId: string | number; + + /** + * 租户编号 + */ + tenantId: string | number; + + /** + * 用户名称 + */ + userName: string; + + /** + * 创建人 + */ + createBy: string; + + /** + * 创建时间 + */ + createTime: string; + +} + + + + + + + diff --git a/src/api/mes/prodBaseProcessProdLine/index.ts b/src/api/mes/prodBaseProcessProdLine/index.ts new file mode 100644 index 0000000..1233267 --- /dev/null +++ b/src/api/mes/prodBaseProcessProdLine/index.ts @@ -0,0 +1,77 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ProdBaseProcessProdLineVO, ProdBaseProcessProdLineForm, ProdBaseProcessProdLineQuery } from '@/api/mes/prodBaseProcessProdLine/types'; + +/** + * 查询工序关联产线列表 + * @param query + * @returns {*} + */ + +export const listProdBaseProcessProdLine = (query?: ProdBaseProcessProdLineQuery): AxiosPromise => { + return request({ + url: '/mes/prodBaseProcessProdLine/list', + method: 'get', + params: query + }); +}; + +/** + * 查询工序关联产线详细 + * @param processId + */ +export const getProdBaseProcessProdLine = (processId: string | number): AxiosPromise => { + return request({ + url: '/mes/prodBaseProcessProdLine/' + processId, + method: 'get' + }); +}; + +/** + * 新增工序关联产线 + * @param data + */ +export const addProdBaseProcessProdLine = (data: ProdBaseProcessProdLineForm) => { + return request({ + url: '/mes/prodBaseProcessProdLine', + method: 'post', + data: data + }); +}; + +/** + * 修改工序关联产线 + * @param data + */ +export const updateProdBaseProcessProdLine = (data: ProdBaseProcessProdLineForm) => { + return request({ + url: '/mes/prodBaseProcessProdLine', + method: 'put', + data: data + }); +}; + +/** + * 删除工序关联产线 + * @param processId + */ +export const delProdBaseProcessProdLine = (processId: string | number | Array) => { + return request({ + url: '/mes/prodBaseProcessProdLine/' + processId, + method: 'delete' + }); +}; + + +/** + * 下拉框查询工序关联产线列表 + * @param query + * @returns {*} + */ +export function getProdBaseProcessProdLineList (query) { + return request({ + url: '/mes/prodBaseProcessProdLine/getProdBaseProcessProdLineList', + method: 'get', + params: query + }); +}; diff --git a/src/api/mes/prodBaseProcessProdLine/types.ts b/src/api/mes/prodBaseProcessProdLine/types.ts new file mode 100644 index 0000000..4be1ed6 --- /dev/null +++ b/src/api/mes/prodBaseProcessProdLine/types.ts @@ -0,0 +1,65 @@ +export interface ProdBaseProcessProdLineVO { + /** + * 工序ID + */ + processId: string | number; + + /** + * 所属产线ID + */ + prodLineId: string | number; + + /** + * 租户编号 + */ + tenantId: string | number; + + /** + * 创建人 + */ + createBy: string; + + /** + * 创建时间 + */ + createTime: string; + +} + +export interface ProdBaseProcessProdLineForm extends BaseEntity { + /** + * 工序ID + */ + processId?: string | number; + + /** + * 所属产线ID + */ + prodLineId?: string | number; + + prodLines?: string[]; + + + +} + +export interface ProdBaseProcessProdLineQuery extends PageQuery { + + /** + * 工序ID + */ + processId?: string | number; + + /** + * 所属产线ID + */ + prodLineId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/api/mes/prodBaseProcessUser/index.ts b/src/api/mes/prodBaseProcessUser/index.ts new file mode 100644 index 0000000..a3f4497 --- /dev/null +++ b/src/api/mes/prodBaseProcessUser/index.ts @@ -0,0 +1,77 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ProdBaseProcessUserVO, ProdBaseProcessUserForm, ProdBaseProcessUserQuery } from '@/api/mes/prodBaseProcessUser/types'; + +/** + * 查询工序关联人员列表 + * @param query + * @returns {*} + */ + +export const listProdBaseProcessUser = (query?: ProdBaseProcessUserQuery): AxiosPromise => { + return request({ + url: '/mes/prodBaseProcessUser/list', + method: 'get', + params: query + }); +}; + +/** + * 查询工序关联人员详细 + * @param processId + */ +export const getProdBaseProcessUser = (processId: string | number): AxiosPromise => { + return request({ + url: '/mes/prodBaseProcessUser/' + processId, + method: 'get' + }); +}; + +/** + * 新增工序关联人员 + * @param data + */ +export const addProdBaseProcessUser = (data: ProdBaseProcessUserForm) => { + return request({ + url: '/mes/prodBaseProcessUser', + method: 'post', + data: data + }); +}; + +/** + * 修改工序关联人员 + * @param data + */ +export const updateProdBaseProcessUser = (data: ProdBaseProcessUserForm) => { + return request({ + url: '/mes/prodBaseProcessUser', + method: 'put', + data: data + }); +}; + +/** + * 删除工序关联人员 + * @param processId + */ +export const delProdBaseProcessUser = (processId: string | number | Array) => { + return request({ + url: '/mes/prodBaseProcessUser/' + processId, + method: 'delete' + }); +}; + + +/** + * 下拉框查询工序关联人员列表 + * @param query + * @returns {*} + */ +export function getProdBaseProcessUserList (query) { + return request({ + url: '/mes/prodBaseProcessUser/getProdBaseProcessUserList', + method: 'get', + params: query + }); +}; diff --git a/src/api/mes/prodBaseProcessUser/types.ts b/src/api/mes/prodBaseProcessUser/types.ts new file mode 100644 index 0000000..289dd84 --- /dev/null +++ b/src/api/mes/prodBaseProcessUser/types.ts @@ -0,0 +1,79 @@ +export interface ProdBaseProcessUserVO { + /** + * 工序ID + */ + processId: string | number; + + /** + * 用户ID + */ + userId: string | number; + + /** + * 租户编号 + */ + tenantId: string | number; + + /** + * 用户名称 + */ + userName: string; + + /** + * 创建人 + */ + createBy: string; + + /** + * 创建时间 + */ + createTime: string; + +} + +export interface ProdBaseProcessUserForm extends BaseEntity { + /** + * 工序ID + */ + processId?: string | number; + + /** + * 用户ID + */ + userId?: string | number; + + /** + * 用户名称 + */ + userName?: string; + + users?: string[]; + + +} + +export interface ProdBaseProcessUserQuery extends PageQuery { + + /** + * 工序ID + */ + processId?: string | number; + + /** + * 用户ID + */ + userId?: string | number; + + /** + * 用户名称 + */ + userName?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/views/mes/baseProcessInfo/index.vue b/src/views/mes/baseProcessInfo/index.vue index 440a584..44110b0 100644 --- a/src/views/mes/baseProcessInfo/index.vue +++ b/src/views/mes/baseProcessInfo/index.vue @@ -78,12 +78,27 @@ @@ -143,12 +158,125 @@ + + + + + + + + + + + + + + + + + 工序关联产线信息 + + + 添加产线 + + + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 工序关联人员信息 + + + 添加人员 + + + 删除 + + + + + + + + + + + + +