From 1cd7cbf82aff501471bd99e274fe5c22dc80de05 Mon Sep 17 00:00:00 2001 From: hwj Date: Tue, 21 Apr 2026 17:37:12 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E7=94=9F=E4=BA=A7=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=E9=80=82=E9=85=8D=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en.ts | 137 ++++++++++++++++++ src/locales/zh-CN.ts | 137 ++++++++++++++++++ .../components/ProductInfoDialog.vue | 23 +-- .../components/ProductionPlanCard.vue | 31 ++-- .../components/ProductionPlanTimeline.vue | 66 ++++----- .../ProductionReportBaogongInfo.vue | 46 +++--- .../components/ProductionReportBasicInfo.vue | 28 ++-- .../ProductionReportQualityInfo.vue | 71 +++++---- .../ProductionReportRelatedPlan.vue | 13 +- src/views/mes/productionReport/index.vue | 109 ++++++-------- 10 files changed, 447 insertions(+), 214 deletions(-) diff --git a/src/locales/en.ts b/src/locales/en.ts index 6781d569..7f007775 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -4269,5 +4269,142 @@ export default { messageDeviceNoParams: 'No parameters under this device', messageFetchChartFailed: 'Failed to load chart data' } + }, + ProductionReport: { + Index: { + searchCodeLabel: 'Task Code', + searchCodePlaceholder: 'Please enter task code', + searchOrderDateLabel: 'Order Date', + searchDeliveryDateLabel: 'Delivery Date', + searchRemarkLabel: 'Remark', + searchRemarkPlaceholder: 'Please enter remark', + searchCreateTimeLabel: 'Create Time', + startDatePlaceholder: 'Start Date', + endDatePlaceholder: 'End Date', + buttonSearch: 'Search', + buttonReset: 'Reset', + buttonExport: 'Export', + tabAll: 'All', + tabIssued: 'Issued', + tabPartialScheduled: 'Partial Scheduled', + tabPendingProduction: 'Pending', + tabInProduction: 'In Production', + tabCompleted: 'Completed', + tableCode: 'Task Code', + tableOrderDate: 'Order Date', + tableDeliveryDate: 'Delivery Date', + tableStatus: 'Status', + tableIsScheduled: 'Scheduled', + tableProductionProgress: 'Progress', + tableRemark: 'Remark', + yes: 'Yes', + no: 'No', + detailTabBasicInfo: 'Basic Info', + detailTabRelatedPlan: 'Related Plans', + detailTabQualityInfo: 'Quality Info', + detailTabBaogongInfo: 'Work Report', + exportFilename: 'ProductionReport' + }, + BasicInfo: { + buttonRefresh: 'Refresh', + tableTaskCode: 'Task Code', + tableProductCode: 'Product Code', + tableProductName: 'Product Name', + tableTotalNumber: 'Total Qty', + tablePlanNumber: 'Planned Qty', + tableUnplannedNumber: 'Unplanned Qty', + tableOperate: 'Operate', + buttonViewProductInfo: 'View Product' + }, + ProductInfo: { + dialogTitle: 'Product Info', + labelProductCode: 'Product Code', + labelProductName: 'Product Name', + labelNumber: 'Quantity', + labelUnit: 'Unit', + labelSpecification: 'Specification', + tableMaterialCode: 'Material Code', + tableMaterialName: 'Material Name', + tableRequiredQuantity: 'Required Qty', + tableUnit: 'Unit' + }, + BaogongInfo: { + dateRangeSeparator: 'To', + startDatePlaceholder: 'Start Date', + endDatePlaceholder: 'End Date', + buttonToday: 'Today', + buttonLast7Days: 'Last 7 Days', + buttonLast30Days: 'Last 30 Days', + buttonReset: 'Reset', + buttonRefresh: 'Refresh', + tableTaskCode: 'Task Code', + tablePlanCode: 'Plan Code', + tableEmployeeId: 'Employee ID', + tableEmployeeName: 'Employee Name', + tableProductName: 'Product Name', + tableProductCode: 'Product Code', + tableBaogongNumber: 'Report Qty', + tablePassNumber: 'Pass Qty', + tableNoPassNumber: 'Fail Qty', + tablePassRate: 'Pass Rate%', + tableNoPassReason: 'Fail Reason', + tableBaogongTime: 'Report Time' + }, + QualityInfo: { + buttonRefresh: 'Refresh', + expandTableName: 'Inspection Item', + expandTableMethod: 'Method', + expandTableStandard: 'Standard', + expandTableUnit: 'Unit', + expandTableUpperLimit: 'Upper Limit', + expandTableLowerLimit: 'Lower Limit', + expandTableInputValue: 'Input Value', + expandTableImage: 'Image', + expandTablePreview: 'Preview', + expandTableResult: 'Result', + expandTableRemark: 'Remark', + tableCode: 'Inspection Code', + tableCategory: 'Category', + tableStatus: 'Status', + tableTicketCode: 'Ticket Code', + tableProcess: 'Process', + tableSchema: 'Inspection Schema', + tableManager: 'Manager', + tableExecutor: 'Executor', + tableExecuteTime: 'Execute Time', + tableRemark: 'Remark', + tableResult: 'Result', + resultPass: 'Pass', + resultFail: 'Fail', + inspectionPending: 'Pending', + inspectionPass: 'Passed', + inspectionFail: 'Failed', + unknown: 'Unknown' + }, + RelatedPlan: { + buttonRefresh: 'Refresh', + emptyDescription: 'No related plans' + }, + PlanCard: { + labelProductName: 'Product Name', + labelDeviceName: 'Device Name', + labelPlanStartTime: 'Plan Start Time', + labelPlanEndTime: 'Plan End Time', + labelLatestStartTime: 'Latest Start Time', + statPlanNumber: 'Planned Qty', + statWangongNumber: 'Completed Qty', + statPassNumber: 'Pass Qty', + statNoPassNumber: 'Fail Qty', + statPassRate: 'Pass Rate', + emptyDescription: 'No data' + }, + Timeline: { + unknown: 'Unknown', + statusScheduled: 'Scheduled', + statusPaused: 'Paused', + statusPendingStorage: 'Pending Storage', + statusStored: 'Stored', + statusStarted: 'Started' + } } } diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 5a47a5ce..e64fb5c0 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -4486,6 +4486,143 @@ export default { } + } + }, + ProductionReport: { + Index: { + searchCodeLabel: '任务单编码', + searchCodePlaceholder: '请输入任务单编码', + searchOrderDateLabel: '下达日期', + searchDeliveryDateLabel: '交货日期', + searchRemarkLabel: '备注', + searchRemarkPlaceholder: '请输入备注', + searchCreateTimeLabel: '创建时间', + startDatePlaceholder: '开始日期', + endDatePlaceholder: '结束日期', + buttonSearch: '搜索', + buttonReset: '重置', + buttonExport: '导出', + tabAll: '全部', + tabIssued: '已下达', + tabPartialScheduled: '部分排产', + tabPendingProduction: '待生产', + tabInProduction: '生产中', + tabCompleted: '已完成', + tableCode: '任务单编码', + tableOrderDate: '下达日期', + tableDeliveryDate: '交货日期', + tableStatus: '状态', + tableIsScheduled: '是否排产', + tableProductionProgress: '生产进度', + tableRemark: '备注', + yes: '是', + no: '否', + detailTabBasicInfo: '基础信息', + detailTabRelatedPlan: '关联计划', + detailTabQualityInfo: '质检信息', + detailTabBaogongInfo: '报工信息', + exportFilename: '生产报表' + }, + BasicInfo: { + buttonRefresh: '刷新', + tableTaskCode: '任务单编码', + tableProductCode: '产品编码', + tableProductName: '产品名称', + tableTotalNumber: '总数量', + tablePlanNumber: '已计划数量', + tableUnplannedNumber: '未计划数量', + tableOperate: '操作', + buttonViewProductInfo: '查看产品信息' + }, + ProductInfo: { + dialogTitle: '产品信息', + labelProductCode: '产品编码', + labelProductName: '产品名称', + labelNumber: '数量', + labelUnit: '单位', + labelSpecification: '规格', + tableMaterialCode: '原料编码', + tableMaterialName: '原料名称', + tableRequiredQuantity: '需求量', + tableUnit: '单位' + }, + BaogongInfo: { + dateRangeSeparator: '至', + startDatePlaceholder: '开始日期', + endDatePlaceholder: '结束日期', + buttonToday: '今日', + buttonLast7Days: '近七天', + buttonLast30Days: '近30日', + buttonReset: '重置', + buttonRefresh: '刷新', + tableTaskCode: '任务单编码', + tablePlanCode: '计划编码', + tableEmployeeId: '员工ID', + tableEmployeeName: '员工名称', + tableProductName: '产品名称', + tableProductCode: '产品编码', + tableBaogongNumber: '报工数量', + tablePassNumber: '合格数量', + tableNoPassNumber: '不合格数量', + tablePassRate: '合格率%', + tableNoPassReason: '不合格原因', + tableBaogongTime: '报工时间' + }, + QualityInfo: { + buttonRefresh: '刷新', + expandTableName: '检验项名称', + expandTableMethod: '检验方式', + expandTableStandard: '判定基准', + expandTableUnit: '单位', + expandTableUpperLimit: '上限值', + expandTableLowerLimit: '下限值', + expandTableInputValue: '输入值', + expandTableImage: '图片', + expandTablePreview: '预览', + expandTableResult: '检验结果', + expandTableRemark: '备注', + tableCode: '质检编码', + tableCategory: '质检分类', + tableStatus: '状态', + tableTicketCode: '工单编码', + tableProcess: '工序', + tableSchema: '检验方案', + tableManager: '负责人', + tableExecutor: '执行人', + tableExecuteTime: '执行时间', + tableRemark: '备注', + tableResult: '结果', + resultPass: '通过', + resultFail: '不通过', + inspectionPending: '待检测', + inspectionPass: '检测通过', + inspectionFail: '检测不通过', + unknown: '未知' + }, + RelatedPlan: { + buttonRefresh: '刷新', + emptyDescription: '暂无关联计划' + }, + PlanCard: { + labelProductName: '产品名称', + labelDeviceName: '设备名称', + labelPlanStartTime: '计划开始时间', + labelPlanEndTime: '计划结束时间', + labelLatestStartTime: '最晚开始时间', + statPlanNumber: '计划数量', + statWangongNumber: '完工数量', + statPassNumber: '合格数量', + statNoPassNumber: '不合格数量', + statPassRate: '合格率', + emptyDescription: '暂无数据' + }, + Timeline: { + unknown: '未知', + statusScheduled: '已排产', + statusPaused: '暂停', + statusPendingStorage: '待入库', + statusStored: '已入库', + statusStarted: '已开工' } } } diff --git a/src/views/mes/productionReport/components/ProductInfoDialog.vue b/src/views/mes/productionReport/components/ProductInfoDialog.vue index 2826fd88..e111ff30 100644 --- a/src/views/mes/productionReport/components/ProductInfoDialog.vue +++ b/src/views/mes/productionReport/components/ProductInfoDialog.vue @@ -1,26 +1,29 @@ @@ -221,7 +210,6 @@ export default {} min-height: v-bind('`${containerHeight}px`'); } -// SVG 背景 .timeline-svg { position: absolute; top: 0; @@ -231,7 +219,6 @@ export default {} pointer-events: none; } -// 时间线节点 .timeline-node { display: flex; flex-direction: column; @@ -239,7 +226,6 @@ export default {} gap: 8px; } -// 节点圆圈 .node-dot { width: 50px; height: 50px; @@ -257,23 +243,23 @@ export default {} z-index: 2; &.status-1 { - background: #409eff; // 已排产 - 蓝色 + background: #409eff; } &.status-3 { - background: #e6a23c; // 暂停 - 橙色 + background: #e6a23c; } &.status-4 { - background: #f56c6c; // 待入库 - 红色 + background: #f56c6c; } &.status-5 { - background: #67c23a; // 已入库 - 绿色 + background: #67c23a; } &.status-8 { - background: #409eff; // 已开工 - 蓝色 + background: #409eff; } } @@ -282,7 +268,6 @@ export default {} line-height: 1; } -// 节点标签 .node-label { text-align: center; width: 130px; @@ -308,7 +293,6 @@ export default {} white-space: pre-line; } -// 响应式 @media (max-width: 1200px) { .timeline-wrapper { overflow-x: auto; diff --git a/src/views/mes/productionReport/components/ProductionReportBaogongInfo.vue b/src/views/mes/productionReport/components/ProductionReportBaogongInfo.vue index 08152eb0..51afa7f9 100644 --- a/src/views/mes/productionReport/components/ProductionReportBaogongInfo.vue +++ b/src/views/mes/productionReport/components/ProductionReportBaogongInfo.vue @@ -5,48 +5,47 @@ - 今日 - 近七天 - 近30日 + {{ t('ProductionReport.BaogongInfo.buttonToday') }} + {{ t('ProductionReport.BaogongInfo.buttonLast7Days') }} + {{ t('ProductionReport.BaogongInfo.buttonLast30Days') }} - 重置 + {{ t('ProductionReport.BaogongInfo.buttonReset') }} - 刷新 + {{ t('ProductionReport.BaogongInfo.buttonRefresh') }} - - - - - - - - - - + + + + + + + + + + - - + + - import dayjs from 'dayjs' import { BaogongRecordApi } from '@/api/mes/baogongrecord' +import { useI18n } from '@/hooks/web/useI18n' defineOptions({ name: 'ProductionReportBaogongInfo' }) +const { t } = useI18n() + const props = defineProps<{ taskId?: number }>() @@ -95,7 +97,6 @@ const getList = async () => { } } -/** 监听任务ID变化 */ watch( () => props.taskId, (val: number | undefined) => { @@ -158,7 +159,6 @@ const handleReset = () => { handleRefresh() } -/** 格式化日期时间 */ const formatDateTime = (value: string | Date | null) => { if (!value) return '-' return dayjs(value).format('YYYY-MM-DD HH:mm:ss') diff --git a/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue b/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue index dbd06fe3..92fd920c 100644 --- a/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue +++ b/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue @@ -2,33 +2,31 @@
- 刷新 + {{ t('ProductionReport.BasicInfo.buttonRefresh') }}
- - - - - - - + + + + + + - + -
@@ -36,11 +34,14 @@