diff --git a/src/api/mes/device-ledger.ts b/src/api/mes/device-ledger.ts
new file mode 100644
index 00000000..6c71f1e7
--- /dev/null
+++ b/src/api/mes/device-ledger.ts
@@ -0,0 +1,47 @@
+import request from '@/config/axios'
+
+export interface CapacityReportVO {
+ id: number
+ deviceCode: string
+ deviceName: string
+ typeName: string
+ deviceStatus: number
+ ratedCapacity: number
+ reportCapacity: number
+ actualCapacity: number
+ workshopName: string
+}
+
+export interface CapacityReportQuery {
+ pageNo: number
+ pageSize: number
+ deviceCode?: string
+ deviceName?: string
+ deviceType?: string
+ deviceStatus?: string
+ workshop?: string
+ ids?: string
+}
+
+export const DeviceLedgerApi = {
+ /**
+ * 产能报表分页查询
+ */
+ getCapacityReportPage: async (params: CapacityReportQuery) => {
+ return await request.get({ url: '/mes/device-ledger/capacity-report/page', params })
+ },
+
+ /**
+ * 产能报表导出
+ */
+ exportCapacityReport: async (params: { ids?: string }) => {
+ return await request.download({ url: '/mes/device-ledger/capacity-report/export-excel', params })
+ },
+
+ /**
+ * 更新设备状态
+ */
+ updateDeviceLedger: async (data: { id: number; deviceStatus: number }) => {
+ return await request.put({ url: '/mes/device-ledger/update', data })
+ }
+}
diff --git a/src/locales/en.ts b/src/locales/en.ts
index 9e8e2f79..6211aad3 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -1335,10 +1335,34 @@ export default {
validatorDeviceCodeRequired: 'Code can not be empty',
gjTitle: 'Select key components',
bjTitle: 'Select spare parts',
+ normal: 'Normal',
+ stop: 'Stopped',
+ maintenance: 'Maintenance',
+ scrap: 'Scrap',
+ placeholderWorkshop: 'Please input workshop',
+ reportCapacity: 'Report Capacity',
+ actualCapacity: 'Actual Capacity',
Detail: {
invalidId: 'Invalid device ID'
}
},
+ // Capacity Report
+ CapacityReport: {
+ deviceCode: 'Device Code',
+ deviceName: 'Device Name',
+ deviceType: 'Device Type',
+ deviceStatus: 'Device Status',
+ workshop: 'Workshop',
+ ratedCapacity: 'Rated Capacity',
+ reportCapacity: 'Report Capacity',
+ actualCapacity: 'Actual Capacity',
+ placeholderDeviceCode: 'Please input device code',
+ placeholderDeviceName: 'Please input device name',
+ placeholderDeviceType: 'Please input device type',
+ placeholderDeviceStatus: 'Please select device status',
+ placeholderWorkshop: 'Please input workshop',
+ exportFilename: 'Capacity Report.xls'
+ },
// Critical Component
EquipmentKeyItems: {
code: 'Code',
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index c4c7f58c..58df282a 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -1325,10 +1325,34 @@ export default {
validatorDeviceCodeRequired: '编码不能为空',
gjTitle: '选择关键件',
bjTitle: '选择备件',
+ normal: '正常',
+ stop: '停用',
+ maintenance: '维修',
+ scrap: '报废',
+ placeholderWorkshop: '请输入所属车间',
+ reportCapacity: '报工产能',
+ actualCapacity: '实际产能',
Detail: {
invalidId: '无效的设备ID'
}
},
+ // 产能报表
+ CapacityReport: {
+ deviceCode: '设备编码',
+ deviceName: '设备名称',
+ deviceType: '设备类型',
+ deviceStatus: '设备状态',
+ workshop: '所属车间',
+ ratedCapacity: '额定产能',
+ reportCapacity: '报工产能',
+ actualCapacity: '实际产能',
+ placeholderDeviceCode: '请输入设备编码',
+ placeholderDeviceName: '请输入设备名称',
+ placeholderDeviceType: '请输入设备类型',
+ placeholderDeviceStatus: '请选择设备状态',
+ placeholderWorkshop: '请输入所属车间',
+ exportFilename: '产能报表.xls'
+ },
// 设备关键件
EquipmentKeyItems: {
count: '数量',
diff --git a/src/views/mes/capacityReport/index.vue b/src/views/mes/capacityReport/index.vue
new file mode 100644
index 00000000..46a4edbd
--- /dev/null
+++ b/src/views/mes/capacityReport/index.vue
@@ -0,0 +1,223 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('common.query') }}
+
+
+ {{ t('common.reset') }}
+
+
+ {{ t('EquipmentManagement.EquipmentLedger.export') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ handleDeviceStatusChange(scope.row, val)"
+ />
+
+
+
+
+
+
+
+
+
+
+
+