From efaf527d8052898652fda45b6bbb6f0c59c76017 Mon Sep 17 00:00:00 2001 From: hwj Date: Fri, 24 Apr 2026 14:49:29 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat=EF=BC=9A=E5=BA=93=E5=8C=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF/=E5=BA=93=E4=BD=8D=E4=BF=A1=E6=81=AF-=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/stock/warehousearea/index.ts | 34 +++ src/api/erp/stock/warehouselocation/index.ts | 40 +++ src/locales/en.ts | 54 ++++ src/locales/zh-CN.ts | 54 ++++ .../erp/warehousearea/WarehouseAreaForm.vue | 148 ++++++++++ src/views/erp/warehousearea/index.vue | 201 +++++++++++++ .../WarehouseLocationForm.vue | 227 +++++++++++++++ src/views/erp/warehouselocation/index.vue | 263 ++++++++++++++++++ 8 files changed, 1021 insertions(+) create mode 100644 src/api/erp/stock/warehousearea/index.ts create mode 100644 src/api/erp/stock/warehouselocation/index.ts create mode 100644 src/views/erp/warehousearea/WarehouseAreaForm.vue create mode 100644 src/views/erp/warehousearea/index.vue create mode 100644 src/views/erp/warehouselocation/WarehouseLocationForm.vue create mode 100644 src/views/erp/warehouselocation/index.vue diff --git a/src/api/erp/stock/warehousearea/index.ts b/src/api/erp/stock/warehousearea/index.ts new file mode 100644 index 00000000..5d0b9296 --- /dev/null +++ b/src/api/erp/stock/warehousearea/index.ts @@ -0,0 +1,34 @@ +import request from '@/config/axios' + +export interface WarehouseAreaVO { + id: number + warehouseId: number + areaCode: string + areaName: string + areaSize: number + description: string + status: number + createTime: string +} + +export const WarehouseAreaApi = { + getWarehouseAreaPage: async (params: any) => { + return await request.get({ url: `/erp/warehouse-area/page`, params }) + }, + + getWarehouseArea: async (id: number) => { + return await request.get({ url: `/erp/warehouse-area/get?id=` + id }) + }, + + createWarehouseArea: async (data: WarehouseAreaVO) => { + return await request.post({ url: `/erp/warehouse-area/create`, data }) + }, + + updateWarehouseArea: async (data: WarehouseAreaVO) => { + return await request.put({ url: `/erp/warehouse-area/update`, data }) + }, + + deleteWarehouseArea: async (id: number) => { + return await request.delete({ url: `/erp/warehouse-area/delete?id=` + id }) + } +} diff --git a/src/api/erp/stock/warehouselocation/index.ts b/src/api/erp/stock/warehouselocation/index.ts new file mode 100644 index 00000000..5bb7a0a1 --- /dev/null +++ b/src/api/erp/stock/warehouselocation/index.ts @@ -0,0 +1,40 @@ +import request from '@/config/axios' + +export interface WarehouseLocationVO { + id: number + warehouseId: number + areaId: number + code: string + name: string + areaSize: number + maxLoadWeight: number + positionX: number + positionY: number + positionZ: number + allowProductMix: boolean + allowBatchMix: boolean + status: number + createTime: string +} + +export const WarehouseLocationApi = { + getWarehouseLocationPage: async (params: any) => { + return await request.get({ url: `/erp/warehouse-location/page`, params }) + }, + + getWarehouseLocation: async (id: number) => { + return await request.get({ url: `/erp/warehouse-location/get?id=` + id }) + }, + + createWarehouseLocation: async (data: WarehouseLocationVO) => { + return await request.post({ url: `/erp/warehouse-location/create`, data }) + }, + + updateWarehouseLocation: async (data: WarehouseLocationVO) => { + return await request.put({ url: `/erp/warehouse-location/update`, data }) + }, + + deleteWarehouseLocation: async (id: number) => { + return await request.delete({ url: `/erp/warehouse-location/delete?id=` + id }) + } +} diff --git a/src/locales/en.ts b/src/locales/en.ts index 5c7a1810..59c1851d 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -59,6 +59,8 @@ export default { copy: 'Copy', copySuccess: 'Copy Success', copyError: 'Copy Error', + yes: 'Yes', + no: 'No', code:'Auto-generate on Save' }, ReportDashboard: { @@ -287,6 +289,58 @@ export default { cancel: 'cancel', exportName: 'Warehouse.xls' }, + WarehouseArea: { + warehouseId: 'Warehouse', + areaCode: 'Area Code', + areaName: 'Area Name', + areaSize: 'Area Size (㎡)', + description: 'Description', + status: 'Status', + createTime: 'Create Time', + placeholderWarehouseId: 'Please select warehouse', + placeholderAreaCode: 'Please enter area code', + placeholderAreaName: 'Please enter area name', + placeholderAreaSize: 'Please enter area size', + placeholderDescription: 'Please enter description', + placeholderStatus: 'Please select status', + validatorWarehouseIdRequired: 'Warehouse is required', + validatorAreaCodeRequired: 'Area code is required', + validatorAreaNameRequired: 'Area name is required', + validatorStatusRequired: 'Status is required' + }, + WarehouseLocation: { + warehouseId: 'Warehouse', + areaId: 'Area', + code: 'Location Code', + name: 'Location Name', + areaSize: 'Area Size (㎡)', + maxLoadWeight: 'Max Load Weight', + position: 'Position (X,Y,Z)', + positionX: 'Position X', + positionY: 'Position Y', + positionZ: 'Position Z', + allowProductMix: 'Allow Product Mix', + allowBatchMix: 'Allow Batch Mix', + status: 'Status', + createTime: 'Create Time', + placeholderWarehouseId: 'Please select warehouse', + placeholderAreaId: 'Please select area', + placeholderCode: 'Please enter location code', + placeholderName: 'Please enter location name', + placeholderAreaSize: 'Please enter area size', + placeholderMaxLoadWeight: 'Please enter max load weight', + placeholderPositionX: 'Please enter position X', + placeholderPositionY: 'Please enter position Y', + placeholderPositionZ: 'Please enter position Z', + placeholderStatus: 'Please select status', + validatorWarehouseIdRequired: 'Warehouse is required', + validatorAreaIdRequired: 'Area is required', + validatorCodeRequired: 'Location code is required', + validatorNameRequired: 'Location name is required', + validatorAllowProductMixRequired: 'Allow product mix is required', + validatorAllowBatchMixRequired: 'Allow batch mix is required', + validatorStatusRequired: 'Status is required' + }, Stock: { product: 'Product', warehouse: 'Warehouse', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 8b896efa..d52c723e 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -59,6 +59,8 @@ export default { copy: '复制', copySuccess: '复制成功', copyError: '复制失败', + yes: '是', + no: '否', code: '编码保存后自动生成' }, ReportDashboard: { @@ -287,6 +289,58 @@ export default { cancel: '取消', exportName: '仓库.xls' }, + WarehouseArea: { + warehouseId: '所属仓库', + areaCode: '库区编码', + areaName: '库区名称', + areaSize: '面积(㎡)', + description: '库区描述', + status: '开启状态', + createTime: '创建时间', + placeholderWarehouseId: '请选择所属仓库', + placeholderAreaCode: '请输入库区编码', + placeholderAreaName: '请输入库区名称', + placeholderAreaSize: '请输入面积', + placeholderDescription: '请输入库区描述', + placeholderStatus: '请选择开启状态', + validatorWarehouseIdRequired: '所属仓库不能为空', + validatorAreaCodeRequired: '库区编码不能为空', + validatorAreaNameRequired: '库区名称不能为空', + validatorStatusRequired: '开启状态不能为空' + }, + WarehouseLocation: { + warehouseId: '所属仓库', + areaId: '所属库区', + code: '库位编码', + name: '库位名称', + areaSize: '面积(㎡)', + maxLoadWeight: '最大载重量', + position: '库位位置(X,Y,Z)', + positionX: '位置X', + positionY: '位置Y', + positionZ: '位置Z', + allowProductMix: '允许产品混放', + allowBatchMix: '允许批次混放', + status: '开启状态', + createTime: '创建时间', + placeholderWarehouseId: '请选择所属仓库', + placeholderAreaId: '请选择所属库区', + placeholderCode: '请输入库位编码', + placeholderName: '请输入库位名称', + placeholderAreaSize: '请输入面积', + placeholderMaxLoadWeight: '请输入最大载重量', + placeholderPositionX: '请输入位置X', + placeholderPositionY: '请输入位置Y', + placeholderPositionZ: '请输入位置Z', + placeholderStatus: '请选择开启状态', + validatorWarehouseIdRequired: '所属仓库不能为空', + validatorAreaIdRequired: '所属库区不能为空', + validatorCodeRequired: '库位编码不能为空', + validatorNameRequired: '库位名称不能为空', + validatorAllowProductMixRequired: '是否允许产品混放不能为空', + validatorAllowBatchMixRequired: '是否允许批次混放不能为空', + validatorStatusRequired: '开启状态不能为空' + }, Stock: { product: '产品', warehouse: '仓库', diff --git a/src/views/erp/warehousearea/WarehouseAreaForm.vue b/src/views/erp/warehousearea/WarehouseAreaForm.vue new file mode 100644 index 00000000..83e87a00 --- /dev/null +++ b/src/views/erp/warehousearea/WarehouseAreaForm.vue @@ -0,0 +1,148 @@ + + + diff --git a/src/views/erp/warehousearea/index.vue b/src/views/erp/warehousearea/index.vue new file mode 100644 index 00000000..1feed687 --- /dev/null +++ b/src/views/erp/warehousearea/index.vue @@ -0,0 +1,201 @@ + + + diff --git a/src/views/erp/warehouselocation/WarehouseLocationForm.vue b/src/views/erp/warehouselocation/WarehouseLocationForm.vue new file mode 100644 index 00000000..f2fe9a1d --- /dev/null +++ b/src/views/erp/warehouselocation/WarehouseLocationForm.vue @@ -0,0 +1,227 @@ + + + diff --git a/src/views/erp/warehouselocation/index.vue b/src/views/erp/warehouselocation/index.vue new file mode 100644 index 00000000..9d92f67c --- /dev/null +++ b/src/views/erp/warehouselocation/index.vue @@ -0,0 +1,263 @@ + + + From 8a0c72e6ebd3bd8b2de945c1ab73f7fc8f110377 Mon Sep 17 00:00:00 2001 From: hwj Date: Fri, 24 Apr 2026 15:47:01 +0800 Subject: [PATCH 2/6] =?UTF-8?q?feat=EF=BC=9A=E4=BB=93=E5=BA=93=E4=BF=A1?= =?UTF-8?q?=E6=81=AF-=E6=B7=BB=E5=8A=A0=E8=AF=A6=E6=83=85=E5=BC=B9?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/stock/warehouse/index.ts | 26 +++++++ src/views/erp/stock/warehouse/index.vue | 98 +++++++++++++++++++++++++ 2 files changed, 124 insertions(+) diff --git a/src/api/erp/stock/warehouse/index.ts b/src/api/erp/stock/warehouse/index.ts index 114cfa00..b953eeb2 100644 --- a/src/api/erp/stock/warehouse/index.ts +++ b/src/api/erp/stock/warehouse/index.ts @@ -13,6 +13,32 @@ export interface WarehouseVO { status: number // 开启状态 defaultStatus: boolean // 是否默认 warehouseId:number + areaList?: Array<{ + id: number + warehouseId: number + areaCode: string + areaName: string + areaSize: number + description: string + status: number + createTime: number + }> + locationList?: Array<{ + id: number + warehouseId: number + areaId: number + code: string + name: string + areaSize: number + maxLoadWeight: number + positionX: number + positionY: number + positionZ: number + allowProductMix: boolean + allowBatchMix: boolean + status: number + createTime: number + }> } // ERP 仓库 API diff --git a/src/views/erp/stock/warehouse/index.vue b/src/views/erp/stock/warehouse/index.vue index c3ad9b7d..2d740bb7 100644 --- a/src/views/erp/stock/warehouse/index.vue +++ b/src/views/erp/stock/warehouse/index.vue @@ -117,6 +117,13 @@ > {{ t('action.edit') }} + + {{ t('action.detail') }} + + + + +
+ + {{ detailData.name }} + {{ detailData.address }} + {{ detailData.principal }} + {{ detailData.remark || '-' }} + {{ detailData.sort }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/src/views/mes/productionReport/index.vue b/src/views/mes/productionReport/index.vue index ed786dd7..04815c51 100644 --- a/src/views/mes/productionReport/index.vue +++ b/src/views/mes/productionReport/index.vue @@ -90,8 +90,6 @@ :data="list" :stripe="true" :show-overflow-tooltip="true" - highlight-current-row - @current-change="handleCurrentChange" > @@ -128,6 +126,13 @@ + + + - - - - - - - - - - - - - - - - - + + From 79280c5acef427193013c283c1055b65d4cdc422 Mon Sep 17 00:00:00 2001 From: hwj Date: Wed, 6 May 2026 11:44:20 +0800 Subject: [PATCH 6/6] =?UTF-8?q?feat=EF=BC=9A=E8=AE=BE=E5=A4=87=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6-=E6=B7=BB=E5=8A=A0=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en.ts | 5 +- src/locales/zh-CN.ts | 7 +- src/router/modules/remaining.ts | 11 + src/views/mes/deviceledger/detail/index.vue | 938 ++++++++++++++++ src/views/mes/deviceledger/index.vue | 1062 +------------------ 5 files changed, 962 insertions(+), 1061 deletions(-) create mode 100644 src/views/mes/deviceledger/detail/index.vue diff --git a/src/locales/en.ts b/src/locales/en.ts index 34e8de34..de7ad477 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -1335,7 +1335,10 @@ export default { qrcodeEmpty: 'No QR code', validatorDeviceCodeRequired: 'Code can not be empty', gjTitle: 'Select key components', - bjTitle: 'Select spare parts' + bjTitle: 'Select spare parts', + Detail: { + invalidId: 'Invalid device ID' + } }, // Critical Component EquipmentKeyItems: { diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 6538189a..de80fcf7 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1249,7 +1249,7 @@ export default { statusDisabled: '不启用', deviceType: '类型', deviceSpec: '规格型号', - /* deviceModel: '型号',*/ + deviceModel: '型号', isSchedueld: '是否排产', ratedCapacity: '额定产能', yes: '是', @@ -1324,7 +1324,10 @@ export default { qrcodeEmpty: '暂无二维码', validatorDeviceCodeRequired: '编码不能为空', gjTitle: '选择关键件', - bjTitle: '选择备件' + bjTitle: '选择备件', + Detail: { + invalidId: '无效的设备ID' + } }, // 设备关键件 EquipmentKeyItems: { diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index a35d03d5..e6609c3f 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -683,6 +683,17 @@ const remainingRouter: AppRouteRecordRaw[] = [ activeMenu: '/mes/productionReport' }, component: () => import('@/views/mes/productionReport/detail/index.vue') + }, + { + path: 'device-ledger/detail/:id', + name: 'MesDeviceLedgerDetail', + meta: { + title: '设备台账详情', + noCache: true, + hidden: true, + activeMenu: '/mes/deviceledger' + }, + component: () => import('@/views/mes/deviceledger/detail/index.vue') } ] } diff --git a/src/views/mes/deviceledger/detail/index.vue b/src/views/mes/deviceledger/detail/index.vue new file mode 100644 index 00000000..360de443 --- /dev/null +++ b/src/views/mes/deviceledger/detail/index.vue @@ -0,0 +1,938 @@ + + + + + diff --git a/src/views/mes/deviceledger/index.vue b/src/views/mes/deviceledger/index.vue index a49541c8..76c94b6c 100644 --- a/src/views/mes/deviceledger/index.vue +++ b/src/views/mes/deviceledger/index.vue @@ -245,459 +245,6 @@ - - -
-
{{ - t('EquipmentManagement.EquipmentLedger.detail') - }} -
- - - -
- - - {{ detailData?.deviceCode ?? '' }} - - - {{ detailData?.deviceName ?? '' }} - - - - - - - {{ detailData?.deviceModel ?? '' }} - - - {{ detailData?.deviceSpec ?? '' }} - - - {{ - getDeviceTypeName(detailData?.deviceTypeName ?? detailData?.deviceType) - }} - - - - - - - {{ detailData?.deviceLocation ?? '' }} - - - {{ detailData?.deviceManagerName ?? '' }} - - - {{ formatDetailDate(detailData?.productionDate) }} - - - {{ - formatDetailDate(detailData?.factoryEntryDate) - }} - - {{ - detailData?.remark ?? detailData?.deviceRemark ?? '' - }} - - - {{ detailData?.creatorName ?? '' }} - - - {{ formatDetailDate(detailData?.createTime) }} - - - {{ formatDetailDate(detailData?.updateTime) }} - - - - - - - - -
- -
- - -
- - {{ - t('common.query') - }} - - {{ t('common.reset') }} - - - {{ t('action.export') }} - -
- - - - - - - -
- -
- - {{ - t('common.query') - }} - - {{ t('common.reset') }} - - - {{ t('action.export') }} - -
- - - - - - - -
- -
- - {{ - t('common.query') - }} - - {{ t('common.reset') }} - - - {{ t('action.export') }} - -
- - - - -
-
-
- {{ row.subjectCode ?? '-' }} - {{ - row.subjectName ?? '-' - }} -
-
-
- {{ - t('EquipmentManagement.EquipmentLedger.projectName') - }} - {{ - row.subjectContent ?? '-' - }} -
-
- {{ - t('EquipmentManagement.EquipmentLedger.repairResult') - }} - - - {{ getResultLabel(row.repairResult ?? row.result) }} - - -
-
- {{ - t('EquipmentManagement.EquipmentLedger.remark') - }} - {{ - row.remark ?? '-' - }} -
-
- {{ - t('EquipmentManagement.EquipmentLedger.finishDate') - }} - {{ - String(formatHistoryTime(row.finishDate)).split(' ')[0] - }} -
-
- - - -
-
-
-
-
-
-
- -
- - - {{ t('action.export') }} - -
- - - - - - - -
- -
- - - {{ t('action.export') }} - -
- - - - - - - -
- - - - - - - - - -
-
@@ -706,18 +253,13 @@