From 15d64fe7723ec58c572be479aa8c18c250c47f6c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 15 Feb 2026 23:34:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(mes):=20=E6=96=B0=E5=A2=9E=20MES=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=A1=A8=20DDL=E3=80=81=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E3=80=81=E8=8F=9C=E5=8D=95=E6=9D=83=E9=99=90=E4=B8=8E=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 建表 mes_md_client(含逻辑删除、多租户字段) - 字典 mes_client_type:企业客户(1)、个人(2) - 菜单权限 5140~5146:查询/创建/更新/删除/导出/导入 - 测试数据:比亚迪、博世、德力西 --- src/api/mes/md/client/index.ts | 73 ++++ src/utils/dict.ts | 3 +- src/views/mes/md/client/MdClientForm.vue | 315 ++++++++++++++++++ .../mes/md/client/MdClientImportForm.vue | 138 ++++++++ src/views/mes/md/client/index.vue | 248 ++++++++++++++ src/views/mes/md/item/MdItemImportForm.vue | 138 ++++++++ 6 files changed, 914 insertions(+), 1 deletion(-) create mode 100644 src/api/mes/md/client/index.ts create mode 100644 src/views/mes/md/client/MdClientForm.vue create mode 100644 src/views/mes/md/client/MdClientImportForm.vue create mode 100644 src/views/mes/md/client/index.vue create mode 100644 src/views/mes/md/item/MdItemImportForm.vue diff --git a/src/api/mes/md/client/index.ts b/src/api/mes/md/client/index.ts new file mode 100644 index 000000000..1fe9c1518 --- /dev/null +++ b/src/api/mes/md/client/index.ts @@ -0,0 +1,73 @@ +import request from '@/config/axios' + +// MES 客户 VO +export interface MdClientVO { + id: number // 客户编号 + code: string // 客户编码 + name: string // 客户名称 + nickname: string // 客户简称 + englishName: string // 客户英文名称 + description: string // 客户简介 + logo: string // 客户LOGO地址 + type: number // 客户类型 + address: string // 客户地址 + website: string // 客户官网地址 + email: string // 客户邮箱地址 + telephone: string // 客户电话 + contact1Name: string // 联系人1 + contact1Telephone: string // 联系人1-电话 + contact1Email: string // 联系人1-邮箱 + contact2Name: string // 联系人2 + contact2Telephone: string // 联系人2-电话 + contact2Email: string // 联系人2-邮箱 + creditCode: string // 统一社会信用代码 + attribute1: string // 预留字段1 + attribute2: string // 预留字段2 + attribute3: number // 预留字段3 + attribute4: number // 预留字段4 + status: number // 状态 + remark: string // 备注 +} + +// MES 客户 API +export const MdClientApi = { + // 查询客户分页 + getClientPage: async (params: any) => { + return await request.get({ url: `/mes/md-client/page`, params }) + }, + + // 查询客户精简列表 + getClientSimpleList: async () => { + return await request.get({ url: `/mes/md-client/simple-list` }) + }, + + // 查询客户详情 + getClient: async (id: number) => { + return await request.get({ url: `/mes/md-client/get?id=` + id }) + }, + + // 新增客户 + createClient: async (data: MdClientVO) => { + return await request.post({ url: `/mes/md-client/create`, data }) + }, + + // 修改客户 + updateClient: async (data: MdClientVO) => { + return await request.put({ url: `/mes/md-client/update`, data }) + }, + + // 删除客户 + deleteClient: async (id: number) => { + return await request.delete({ url: `/mes/md-client/delete?id=` + id }) + }, + + // 导出客户 Excel + exportClient: async (params: any) => { + return await request.download({ url: `/mes/md-client/export-excel`, params }) + }, + + // 下载客户导入模板 + importTemplate: async () => { + return await request.download({ url: `/mes/md-client/get-import-template` }) + } +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index a9b203eef..8cde79df9 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -253,5 +253,6 @@ export enum DICT_TYPE { IOT_MODBUS_FRAME_FORMAT = 'iot_modbus_frame_format', // IoT Modbus 帧格式 // ========== MES - 制造执行系统模块 ========== - MES_CLIENT_TYPE = 'mes_client_type' // MES 客户类型 + MES_CLIENT_TYPE = 'mes_client_type', // MES 客户类型 + MES_VENDOR_LEVEL = 'mes_vendor_level' // MES 供应商级别 } diff --git a/src/views/mes/md/client/MdClientForm.vue b/src/views/mes/md/client/MdClientForm.vue new file mode 100644 index 000000000..0f1b694d9 --- /dev/null +++ b/src/views/mes/md/client/MdClientForm.vue @@ -0,0 +1,315 @@ + + diff --git a/src/views/mes/md/client/MdClientImportForm.vue b/src/views/mes/md/client/MdClientImportForm.vue new file mode 100644 index 000000000..9d1268057 --- /dev/null +++ b/src/views/mes/md/client/MdClientImportForm.vue @@ -0,0 +1,138 @@ + + diff --git a/src/views/mes/md/client/index.vue b/src/views/mes/md/client/index.vue new file mode 100644 index 000000000..edccfbf70 --- /dev/null +++ b/src/views/mes/md/client/index.vue @@ -0,0 +1,248 @@ + + + diff --git a/src/views/mes/md/item/MdItemImportForm.vue b/src/views/mes/md/item/MdItemImportForm.vue new file mode 100644 index 000000000..afa308a30 --- /dev/null +++ b/src/views/mes/md/item/MdItemImportForm.vue @@ -0,0 +1,138 @@ + +