From fb5bc181c75934d0351142bd0deb3d9ca9243cd3 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 3 Sep 2024 14:58:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=BA=E9=99=B7:HL-5807?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/recommendLocationHistory/index.ts | 57 ++++ .../recommendLocationHistory/index.vue | 244 ++++++++++++++++++ .../recommendLocationHistory.data.ts | 93 +++++++ 3 files changed, 394 insertions(+) create mode 100644 src/api/wms/recommendLocationHistory/index.ts create mode 100644 src/views/wms/agvManage/recommendLocationHistory/index.vue create mode 100644 src/views/wms/agvManage/recommendLocationHistory/recommendLocationHistory.data.ts diff --git a/src/api/wms/recommendLocationHistory/index.ts b/src/api/wms/recommendLocationHistory/index.ts new file mode 100644 index 000000000..f19147d5d --- /dev/null +++ b/src/api/wms/recommendLocationHistory/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface RecommendLocationHistoryVO { + id: number + businessNumber: string + businessId: number + toLocation: string + ruleName: string + priority: string + locationCollect: string + balanceLocationCollect: string + expectinLocationCollect: string + remark: string + extraProperties: string + concurrencyStamp: number +} + +// 查询推荐库位推荐记录列表 +export const getRecommendLocationHistoryPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/recommend-location-history/senior', data }) + } else { + return await request.get({ url: `/wms/recommend-location-history/page`, params }) + } +} + +// 查询推荐库位推荐记录详情 +export const getRecommendLocationHistory = async (id: number) => { + return await request.get({ url: `/wms/recommend-location-history/get?id=` + id }) +} + +// 新增推荐库位推荐记录 +export const createRecommendLocationHistory = async (data: RecommendLocationHistoryVO) => { + return await request.post({ url: `/wms/recommend-location-history/create`, data }) +} + +// 修改推荐库位推荐记录 +export const updateRecommendLocationHistory = async (data: RecommendLocationHistoryVO) => { + return await request.put({ url: `/wms/recommend-location-history/update`, data }) +} + +// 删除推荐库位推荐记录 +export const deleteRecommendLocationHistory = async (id: number) => { + return await request.delete({ url: `/wms/recommend-location-history/delete?id=` + id }) +} + +// 导出推荐库位推荐记录 Excel +export const exportRecommendLocationHistory = async (params) => { + return await request.download({ url: `/wms/recommend-location-history/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/recommend-location-history/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/agvManage/recommendLocationHistory/index.vue b/src/views/wms/agvManage/recommendLocationHistory/index.vue new file mode 100644 index 000000000..9c060f5f4 --- /dev/null +++ b/src/views/wms/agvManage/recommendLocationHistory/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/agvManage/recommendLocationHistory/recommendLocationHistory.data.ts b/src/views/wms/agvManage/recommendLocationHistory/recommendLocationHistory.data.ts new file mode 100644 index 000000000..da69e3332 --- /dev/null +++ b/src/views/wms/agvManage/recommendLocationHistory/recommendLocationHistory.data.ts @@ -0,0 +1,93 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const RecommendLocationHistoryRules = reactive({ + concurrencyStamp: [required], +}) + +export const RecommendLocationHistory = useCrudSchemas(reactive([ + { + label: '业务编号', + field: 'businessNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '业务ID', + field: 'businessId', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '推荐的库位', + field: 'toLocation', + sort: 'custom', + isSearch: true, + }, + { + label: '规则名称', + field: 'ruleName', + sort: 'custom', + }, + { + label: '规则优先级', + field: 'priority', + sort: 'custom', + }, + { + label: '规则可选库位集合', + field: 'locationCollect', + sort: 'custom', + }, + { + label: '库存余额库位集合', + field: 'balanceLocationCollect', + sort: 'custom', + }, + { + label: '预计入库位集合', + field: 'expectinLocationCollect', + sort: 'custom', + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + }, + { + 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: 'extraProperties', + sort: 'custom', + isTable:false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isTable:false, + form: { + component: 'InputNumber', + value: 0 + }, + }, +]))