From 3d103f1f46aaf87f0a087bcad18dbe2373671107 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 16 Feb 2026 00:28:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(mes):=20=E6=96=B0=E5=A2=9E=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E7=AE=A1=E7=90=86=E5=89=8D=E7=AB=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增供应商管理的前端代码,参照客户模块风格: - 列表页:编码/名称/简称/等级/评分/电话/状态/备注,支持搜索与分页 - 表单弹窗:完整字段编辑,支持编码自动生成(VD前缀) - 导入弹窗:Excel 文件上传,支持更新已存在数据,下载导入模板 - API 定义:完整 CRUD + 导出 + 导入模板接口 --- src/api/mes/md/vendor/index.ts | 74 ++++ src/views/mes/md/vendor/MdVendorForm.vue | 321 ++++++++++++++++++ .../mes/md/vendor/MdVendorImportForm.vue | 138 ++++++++ src/views/mes/md/vendor/index.vue | 241 +++++++++++++ 4 files changed, 774 insertions(+) create mode 100644 src/api/mes/md/vendor/index.ts create mode 100644 src/views/mes/md/vendor/MdVendorForm.vue create mode 100644 src/views/mes/md/vendor/MdVendorImportForm.vue create mode 100644 src/views/mes/md/vendor/index.vue diff --git a/src/api/mes/md/vendor/index.ts b/src/api/mes/md/vendor/index.ts new file mode 100644 index 000000000..2e7fa6a1b --- /dev/null +++ b/src/api/mes/md/vendor/index.ts @@ -0,0 +1,74 @@ +import request from '@/config/axios' + +// MES 供应商 VO +export interface MdVendorVO { + id: number // 供应商编号 + code: string // 供应商编码 + name: string // 供应商名称 + nickname: string // 供应商简称 + englishName: string // 供应商英文名称 + description: string // 供应商简介 + logo: string // 供应商LOGO地址 + level: string // 供应商等级 + score: 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 MdVendorApi = { + // 查询供应商分页 + getVendorPage: async (params: any) => { + return await request.get({ url: `/mes/md-vendor/page`, params }) + }, + + // 查询供应商精简列表 + getVendorSimpleList: async () => { + return await request.get({ url: `/mes/md-vendor/simple-list` }) + }, + + // 查询供应商详情 + getVendor: async (id: number) => { + return await request.get({ url: `/mes/md-vendor/get?id=` + id }) + }, + + // 新增供应商 + createVendor: async (data: MdVendorVO) => { + return await request.post({ url: `/mes/md-vendor/create`, data }) + }, + + // 修改供应商 + updateVendor: async (data: MdVendorVO) => { + return await request.put({ url: `/mes/md-vendor/update`, data }) + }, + + // 删除供应商 + deleteVendor: async (id: number) => { + return await request.delete({ url: `/mes/md-vendor/delete?id=` + id }) + }, + + // 导出供应商 Excel + exportVendor: async (params: any) => { + return await request.download({ url: `/mes/md-vendor/export-excel`, params }) + }, + + // 下载供应商导入模板 + importTemplate: async () => { + return await request.download({ url: `/mes/md-vendor/get-import-template` }) + } +} diff --git a/src/views/mes/md/vendor/MdVendorForm.vue b/src/views/mes/md/vendor/MdVendorForm.vue new file mode 100644 index 000000000..887a25d52 --- /dev/null +++ b/src/views/mes/md/vendor/MdVendorForm.vue @@ -0,0 +1,321 @@ + + diff --git a/src/views/mes/md/vendor/MdVendorImportForm.vue b/src/views/mes/md/vendor/MdVendorImportForm.vue new file mode 100644 index 000000000..f1cf6055a --- /dev/null +++ b/src/views/mes/md/vendor/MdVendorImportForm.vue @@ -0,0 +1,138 @@ + + diff --git a/src/views/mes/md/vendor/index.vue b/src/views/mes/md/vendor/index.vue new file mode 100644 index 000000000..4431e7eba --- /dev/null +++ b/src/views/mes/md/vendor/index.vue @@ -0,0 +1,241 @@ + + +