From 7a2c4ff50092864036c764a511b10b7e4d9ead55 Mon Sep 17 00:00:00 2001 From: chenfang Date: Thu, 28 Mar 2024 16:41:30 +0800 Subject: [PATCH] =?UTF-8?q?AGV=E5=BA=93=E4=BD=8D=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E8=A1=A8=20=20=E5=89=8D=E7=AB=AF=E4=BB=A3=E7=A0=81=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/agvLocationrelation/index.ts | 59 ++++ .../agvLocationrelation.data.ts | 151 ++++++++++ .../agvManage/agvLocationrelation/index.vue | 267 ++++++++++++++++++ .../workstation/workstation.data.ts | 1 - 4 files changed, 477 insertions(+), 1 deletion(-) create mode 100644 src/api/wms/agvLocationrelation/index.ts create mode 100644 src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts create mode 100644 src/views/wms/agvManage/agvLocationrelation/index.vue diff --git a/src/api/wms/agvLocationrelation/index.ts b/src/api/wms/agvLocationrelation/index.ts new file mode 100644 index 000000000..5422aac82 --- /dev/null +++ b/src/api/wms/agvLocationrelation/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export interface AgvLocationrelationVO { + id: number + reqCode: string + positionCode: string + positionArea: string + wmsArea: string + wmsPosition: string + available: string + remark: string +} + +// 查询AGV库位转换列表 +export const getAgvLocationrelationPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/agv-locationrelation/senior', data }) + } else { + return await request.get({ url: `/wms/agv-locationrelation/page`, params }) + } +} + +// 查询AGV库位转换详情 +export const getAgvLocationrelation = async (id: number) => { + return await request.get({ url: `/wms/agv-locationrelation/get?id=` + id }) +} + +// 新增AGV库位转换 +export const createAgvLocationrelation = async (data: AgvLocationrelationVO) => { + return await request.post({ url: `/wms/agv-locationrelation/create`, data }) +} + +// 修改AGV库位转换 +export const updateAgvLocationrelation = async (data: AgvLocationrelationVO) => { + return await request.put({ url: `/wms/agv-locationrelation/update`, data }) +} + +// 删除AGV库位转换 +export const deleteAgvLocationrelation = async (id: number) => { + return await request.delete({ url: `/wms/agv-locationrelation/delete?id=` + id }) +} + +// 导出AGV库位转换 Excel +export const exportAgvLocationrelation = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/agv-locationrelation/export-excel-senior', data }) + } else { + return await request.download({ url: `/wms/agv-locationrelation/export-excel`, params }) + } +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/agv-locationrelation/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts b/src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts new file mode 100644 index 000000000..656e96bf8 --- /dev/null +++ b/src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts @@ -0,0 +1,151 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as AreaApi from '@/api/wms/areabasic' +import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data' +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' + +// 表单校验 +export const AgvLocationrelationRules = reactive({ + positionCode: [ + { required: true, message: '请填写AGV点位', trigger: 'change' } + ], + positionArea: [ + { required: true, message: '请填写AGV库区', trigger: 'change' } + ], + wmsArea: [ + { required: true, message: '请填写WMS库区', trigger: 'change' } + ], + wmsPosition: [ + { required: true, message: '请填写WMS库位', trigger: 'change' } + ] +}) + +export const AgvLocationrelation = useCrudSchemas(reactive([ + { + label: '单据号', + field: 'reqCode', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: 'AGV点位', + field: 'positionCode', + sort: 'custom', + isSearch: false, + }, + { + label: 'AGV库区', + field: 'positionArea', + sort: 'custom', + isSearch: false, + }, + { + label: 'WMS库区', + field: 'wmsArea', + sort: 'custom', + isSearch: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库区代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库区信息', // 查询弹窗标题 + searchAllSchemas: Area.allSchemas, // 查询弹窗所需类 + searchPage: AreaApi.getAreaPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: 'WMS库位', + field: 'wmsPosition', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择库位代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '库位信息', // 查询弹窗标题 + searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 + searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'areaCode', + value: "wmsArea", + message: '请选择库区代码!', + isMainValue: true + }] + } + } + }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: true, + isSearch: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + 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')] + } + }, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + isDetail: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/wms/agvManage/agvLocationrelation/index.vue b/src/views/wms/agvManage/agvLocationrelation/index.vue new file mode 100644 index 000000000..0431f7339 --- /dev/null +++ b/src/views/wms/agvManage/agvLocationrelation/index.vue @@ -0,0 +1,267 @@ + + + diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts index 3b96a657c..4e3b6a855 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts @@ -109,7 +109,6 @@ export const Workstation = useCrudSchemas(reactive([ } } }, - { label: '原料库位', field: 'rawLocationCode',