From 2b3e9d0308152ffb58670a93389c19b45ad9ecef Mon Sep 17 00:00:00 2001 From: chenfang Date: Fri, 5 Jul 2024 10:47:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E7=B1=BB=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/mstr/index.ts | 56 +++++ .../basicDataManage/subject/mstr/index.vue | 236 ++++++++++++++++++ .../basicDataManage/subject/mstr/mstr.data.ts | 67 +++++ 3 files changed, 359 insertions(+) create mode 100644 src/api/wms/mstr/index.ts create mode 100644 src/views/wms/basicDataManage/subject/mstr/index.vue create mode 100644 src/views/wms/basicDataManage/subject/mstr/mstr.data.ts diff --git a/src/api/wms/mstr/index.ts b/src/api/wms/mstr/index.ts new file mode 100644 index 000000000..f34bc2a89 --- /dev/null +++ b/src/api/wms/mstr/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface MstrVO { + id: number + hflccHflcd: string + plProdLine: string + plDesc: string + plMvarAcct: string + plCchgAcct: string + type: string + remark: string + extraProperties: string + concurrencyStamp: number + siteId: string +} + +// 查询产品类信息列表 +export const getMstrPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/mstr/senior', data }) + } else { + return await request.get({ url: `/wms/mstr/page`, params }) + } +} + +// 查询产品类信息详情 +export const getMstr = async (id: number) => { + return await request.get({ url: `/wms/mstr/get?id=` + id }) +} + +// 新增产品类信息 +export const createMstr = async (data: MstrVO) => { + return await request.post({ url: `/wms/mstr/create`, data }) +} + +// 修改产品类信息 +export const updateMstr = async (data: MstrVO) => { + return await request.put({ url: `/wms/mstr/update`, data }) +} + +// 删除产品类信息 +export const deleteMstr = async (id: number) => { + return await request.delete({ url: `/wms/mstr/delete?id=` + id }) +} + +// 导出产品类信息 Excel +export const exportMstr = async (params) => { + return await request.download({ url: `/wms/mstr/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/mstr/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/subject/mstr/index.vue b/src/views/wms/basicDataManage/subject/mstr/index.vue new file mode 100644 index 000000000..67ea231af --- /dev/null +++ b/src/views/wms/basicDataManage/subject/mstr/index.vue @@ -0,0 +1,236 @@ + + + diff --git a/src/views/wms/basicDataManage/subject/mstr/mstr.data.ts b/src/views/wms/basicDataManage/subject/mstr/mstr.data.ts new file mode 100644 index 000000000..da3628962 --- /dev/null +++ b/src/views/wms/basicDataManage/subject/mstr/mstr.data.ts @@ -0,0 +1,67 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const MstrRules = reactive({ + hflccHflcd: [required], + plProdLine: [required], + plMvarAcct: [required], + plCchgAcct: [required], + concurrencyStamp: [required], +}) + +export const Mstr = useCrudSchemas(reactive([ + { + label: '域代码', + field: 'hflccHflcd', + sort: 'custom', + isSearch: true, + }, + { + label: '产品类', + field: 'plProdLine', + sort: 'custom', + isSearch: true, + }, + { + label: '产品描述', + field: 'plDesc', + sort: 'custom', + }, + { + label: '物料差异账户', + field: 'plMvarAcct', + sort: 'custom', + isSearch: true, + }, + { + label: '成本重估账户', + field: 'plCchgAcct', + sort: 'custom', + isSearch: true, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))