diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index b0ccae2f..1b96d3be 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -2007,7 +2007,11 @@ export default { validatorDeviceCodeRequired: '编码不能为空', gjTitle: '选择关键件', bjTitle: '选择备件', + all: '全部', normal: '正常', + disabled: '停用', + scheduled: '已排产', + unscheduled: '未排产', stop: '停用', maintenance: '维修', scrap: '报废', @@ -2149,6 +2153,7 @@ export default { // 任务管理 TaskManagement: { + all: '全部', name: '名称', taskType: '类型', taskTypeInspect: '点检', @@ -2159,6 +2164,7 @@ export default { planEndDate: '计划结束时间', cronExpression: 'cron 表达式', enabled: '启用', + disabled: '未启用', creatorName: '创建人', createTime: '创建时间', updateTime: '更新时间', @@ -2199,11 +2205,17 @@ export default { // 工单管理 WorkOrderManagement: { + all: '全部', basicInfo: '基本信息', planNo: '单号', planType: '类型', planTypeInspect: '点检', planTypeMaintain: '保养', + unworked: '未作业', + worked: '已作业', + overtimeUnworked: '超时未作业', + overtimeWorked: '超时已作业', + canceled: '取消', jobStatus: '作业状态', jobResult: '结果', deviceName: '设备名称', @@ -2253,6 +2265,7 @@ export default { // 维修单 DvRepair: { + all: '全部', repairCode: '维修单号', repairName: '维修单', machineryName: '设备名称', @@ -3115,6 +3128,7 @@ export default { }, MoldRepair: { + all: '全部', moduleName: '维修单', basicInfo: '基本信息', faultInfo: '故障信息', @@ -3322,12 +3336,18 @@ export default { }, MoldWorkOrderInquiry: { + all: '全部', moduleName: '工单查询', basicInfo: '基本信息', planNo: '单号', planType: '类型', planTypeInspect: '点检', planTypeMaintain: '保养', + unworked: '未作业', + worked: '已作业', + overtimeUnworked: '超时未作业', + overtimeWorked: '超时已作业', + canceled: '取消', jobStatus: '作业状态', jobResult: '结果', jobResultOk: '通过', diff --git a/src/views/erp/mold/index.vue b/src/views/erp/mold/index.vue index 776a03dd..5cc8210d 100644 --- a/src/views/erp/mold/index.vue +++ b/src/views/erp/mold/index.vue @@ -230,9 +230,9 @@ const onKeywordClear = () => { const statusCards = computed(() => [ { key: 'all', label: t('MoldManagement.MoldBrandPage.all'), value: counters.allCount, status: undefined }, - { key: 'onMachine', label: t('MoldManagement.MoldBrandPage.onMachine'), value: counters.onMachineCount, status: 1 }, + { key: 'onMachine', label: t('MoldManagement.MoldBrandPage.onMachine'), value: counters.onMachineCount, status: 0 }, { key: 'inStock', label: t('MoldManagement.MoldBrandPage.inStock'), value: counters.inStockCount, status: 4 }, - { key: 'standby', label: t('MoldManagement.MoldBrandPage.standby'), value: counters.standbyCount, status: 0 }, + { key: 'standby', label: t('MoldManagement.MoldBrandPage.standby'), value: counters.standbyCount, status: 1 }, { key: 'repairing', label: t('MoldManagement.MoldBrandPage.repairing'), value: counters.repairingCount, status: 2 }, { key: 'scrapped', label: t('MoldManagement.MoldBrandPage.scrapped'), value: counters.scrappedCount, status: 3 } ]) @@ -458,12 +458,12 @@ onBeforeUnmount(() => { diff --git a/src/views/erp/stock/overview/index.vue b/src/views/erp/stock/overview/index.vue index b35b8fe4..1cb72397 100644 --- a/src/views/erp/stock/overview/index.vue +++ b/src/views/erp/stock/overview/index.vue @@ -33,8 +33,7 @@
- +
{{ item.title }}
@@ -45,7 +44,7 @@
{{ item.tip }}
- +
@@ -507,13 +506,22 @@ onMounted(async () => { } .stock-overview__card-wrap { + padding: 16px 18px; + border: 1px solid var(--el-border-color-light); + border-radius: 12px; + background: #fff; + cursor: pointer; + transition: box-shadow 0.2s ease; margin-bottom: 0 !important; + + &:hover { + box-shadow: 0 10px 24px rgba(64, 158, 255, 0.12); + } } .stock-overview__card { display: flex; justify-content: space-between; - min-height: 174px; } .stock-overview__card-main { diff --git a/src/views/mes/deviceledger/index.vue b/src/views/mes/deviceledger/index.vue index 09fd7cde..67a622ba 100644 --- a/src/views/mes/deviceledger/index.vue +++ b/src/views/mes/deviceledger/index.vue @@ -143,12 +143,19 @@
+
+
+
{{ card.label }}
+
{{ card.value }}
+
+
- + + + + + {{ showAllFilters ? t('FactoryModeling.FactoryStructure.collapseText') : t('FactoryModeling.FactoryStructure.expandText') }} + + @@ -678,20 +695,47 @@ const loading = ref(true) // 列表的加载中 const list = ref([]) // 列表的数据 const total = ref(0) // 列表的总页数 const selectedDeviceLineId = ref(undefined) +const currentStatusKey = ref('all') +const counters = reactive({ + allCount: 0, + normalCount: 0, + disabledCount: 0, + scheduledCount: 0, + unscheduledCount: 0 +}) +const statusCards = computed(() => [ + { key: 'all', label: t('EquipmentManagement.EquipmentLedger.all'), value: counters.allCount, status: undefined, isSchedueld: undefined }, + { key: 'normal', label: t('EquipmentManagement.EquipmentLedger.normal'), value: counters.normalCount, status: 0, isSchedueld: undefined }, + { key: 'disabled', label: t('EquipmentManagement.EquipmentLedger.disabled'), value: counters.disabledCount, status: 1, isSchedueld: undefined }, + { key: 'scheduled', label: t('EquipmentManagement.EquipmentLedger.scheduled'), value: counters.scheduledCount, status: undefined, isSchedueld: 1 }, + { key: 'unscheduled', label: t('EquipmentManagement.EquipmentLedger.unscheduled'), value: counters.unscheduledCount, status: undefined, isSchedueld: 0 } +]) +const changeStatus = (key: string, status?: number, isSchedueld?: number) => { + currentStatusKey.value = key + queryParams.deviceStatus = status + queryParams.isSchedueld = isSchedueld + handleQuery() +} const queryParams = reactive({ pageNo: 1, pageSize: 10, deviceCode: undefined, deviceName: undefined, - deviceStatus: undefined, + deviceStatus: undefined as number | undefined, deviceBrand: undefined, sn: undefined, outgoingTime: undefined, deviceType: undefined as string | undefined, - deviceLine: undefined as string | undefined + deviceLine: undefined as string | undefined, + isSchedueld: undefined as number | undefined }) const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) +const showAllFilters = ref(false) +const filterCount = 7 +const toggleFilters = () => { + showAllFilters.value = !showAllFilters.value +} const tableRef = ref() const planTableMaxHeight = ref(520) @@ -1012,10 +1056,16 @@ const getList = async () => { sn: queryParams.sn, outgoingTime: queryParams.outgoingTime, deviceType: queryParams.deviceType, - deviceLine: queryParams.deviceLine + deviceLine: queryParams.deviceLine, + isScheduled: queryParams.isSchedueld }) - list.value = data.list - total.value = data.total + list.value = data.list ?? [] + total.value = data.total ?? 0 + counters.allCount = Number(data?.allCount ?? data?.total ?? 0) + counters.normalCount = Number(data?.normalCount ?? 0) + counters.disabledCount = Number(data?.disabledCount ?? 0) + counters.scheduledCount = Number(data?.scheduledCount ?? 0) + counters.unscheduledCount = Number(data?.unscheduledCount ?? 0) } finally { loading.value = false updatePlanTableMaxHeight() @@ -1031,6 +1081,9 @@ const handleQuery = () => { /** 重置按钮操作 */ const resetQuery = () => { queryFormRef.value.resetFields() + currentStatusKey.value = 'all' + queryParams.deviceStatus = undefined + queryParams.isSchedueld = undefined handleQuery() } @@ -1122,6 +1175,45 @@ onBeforeUnmount(() => { min-width: 0; } +.device-ledger__header { + display: grid; + grid-template-columns: repeat(5, minmax(0, 1fr)); + gap: 12px; + width: 100%; + margin-bottom: 16px; +} + +.device-ledger__stat { + padding: 16px 18px; + border: 1px solid var(--el-border-color-light); + border-radius: 12px; + cursor: pointer; + transition: box-shadow 0.2s ease; + background: #fff; + + &:hover { + box-shadow: 0 10px 24px rgba(64, 158, 255, 0.12); + } + + &.is-active { + border-color: var(--el-color-primary); + box-shadow: 0 10px 24px rgba(64, 158, 255, 0.12); + } +} + +.device-ledger__stat-title { + color: var(--el-text-color-regular); + font-size: 14px; +} + +.device-ledger__stat-value { + margin-top: 8px; + color: var(--el-text-color-primary); + font-size: 28px; + font-weight: 700; + line-height: 1; +} + .simple-grid-view { background-color: #fff; border-radius: 4px; diff --git a/src/views/mes/dvrepair/DvRepairForm.vue b/src/views/mes/dvrepair/DvRepairForm.vue index 8386317e..7d7d6219 100644 --- a/src/views/mes/dvrepair/DvRepairForm.vue +++ b/src/views/mes/dvrepair/DvRepairForm.vue @@ -727,14 +727,14 @@ const ensureDeviceOptionsLoaded = async () => { } } -const deviceTypeNameMap = ref>({}) +const deviceTypeNameMap = ref>({}) const buildDeviceTypeNameMap = (nodes: DeviceTypeTreeVO[]) => { - const map: Record = {} + const map: Record = {} const walk = (list: DeviceTypeTreeVO[]) => { list.forEach((node) => { - if (typeof node?.id === 'number') { - map[node.id] = node.name ?? '' + if (node?.id != null) { + map[String(node.id)] = node.name ?? '' } if (Array.isArray(node?.children)) walk(node.children) }) @@ -744,8 +744,9 @@ const buildDeviceTypeNameMap = (nodes: DeviceTypeTreeVO[]) => { } const getDeviceTypeName = (value: any) => { - const id = typeof value === 'number' ? value : Number(value) - if (!Number.isNaN(id) && deviceTypeNameMap.value[id]) return deviceTypeNameMap.value[id] + if (value == null || value === '') return '-' + const key = String(value) + if (deviceTypeNameMap.value[key]) return deviceTypeNameMap.value[key] return value ?? '-' } diff --git a/src/views/mes/dvrepair/index.vue b/src/views/mes/dvrepair/index.vue index ca8f25c3..28c54a9f 100644 --- a/src/views/mes/dvrepair/index.vue +++ b/src/views/mes/dvrepair/index.vue @@ -2,6 +2,13 @@