From 0a30e8fbb6484f256e4cf2404846ed52fc5891cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Sun, 4 Feb 2024 13:30:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/packageunit/index.ts | 65 +++++ .../itemManage/packageunit/index.vue | 244 ++++++++++++++++++ .../packageunit/packageunit.data.ts | 180 +++++++++++++ 3 files changed, 489 insertions(+) create mode 100644 src/api/wms/packageunit/index.ts create mode 100644 src/views/wms/basicDataManage/itemManage/packageunit/index.vue create mode 100644 src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts diff --git a/src/api/wms/packageunit/index.ts b/src/api/wms/packageunit/index.ts new file mode 100644 index 000000000..df62a5c11 --- /dev/null +++ b/src/api/wms/packageunit/index.ts @@ -0,0 +1,65 @@ +import request from '@/config/axios' + +export interface PackageunitVO { + id: number + code: string + name: string + length: number + width: number + height: number + weight: number + unit: string + available: string + activeTime: Date + expireTime: Date + remark: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: number + siteId: string + desc: string + reuse: string + manageBalance: string +} + +// 查询物品包装规格信息 列表 +export const getPackageunitPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/packageunit/senior', data }) + } else { + return await request.get({ url: `/wms/packageunit/page`, params }) + } +} + +// 查询物品包装规格信息 详情 +export const getPackageunit = async (id: number) => { + return await request.get({ url: `/wms/packageunit/get?id=` + id }) +} + +// 新增物品包装规格信息 +export const createPackageunit = async (data: PackageunitVO) => { + return await request.post({ url: `/wms/packageunit/create`, data }) +} + +// 修改物品包装规格信息 +export const updatePackageunit = async (data: PackageunitVO) => { + return await request.put({ url: `/wms/packageunit/update`, data }) +} + +// 删除物品包装规格信息 +export const deletePackageunit = async (id: number) => { + return await request.delete({ url: `/wms/packageunit/delete?id=` + id }) +} + +// 导出物品包装规格信息 Excel +export const exportPackageunit = async (params) => { + return await request.download({ url: `/wms/packageunit/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/packageunit/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/index.vue b/src/views/wms/basicDataManage/itemManage/packageunit/index.vue new file mode 100644 index 000000000..1a6fde523 --- /dev/null +++ b/src/views/wms/basicDataManage/itemManage/packageunit/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts new file mode 100644 index 000000000..355ef86cb --- /dev/null +++ b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts @@ -0,0 +1,180 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const PackageunitRules = reactive({ + code: [required], + name: [required], + available: [required], + concurrencyStamp: [required], + desc: [required], +}) + +export const Packageunit = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '包装代码', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '包装名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + { + label: '长', + field: 'length', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '宽', + field: 'width', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '高', + field: 'height', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '重量', + field: 'weight', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '单位', + field: 'unit', + sort: 'custom', + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + }, + { + label: '生效时间', + field: 'activeTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + }, + { + label: '删除时间', + field: 'deletionTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '删除者ID', + field: 'deleterId', + sort: 'custom', + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + }, + { + label: '包装描述', + field: 'desc', + sort: 'custom', + isSearch: true, + }, + { + label: '是否重复使用', + field: 'reuse', + sort: 'custom', + isSearch: true, + }, + { + label: '是否管理包装库存', + field: 'manageBalance', + sort: 'custom', + isSearch: true, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))