From 28b7b76815db25431ed8b676f41cd6416727908c Mon Sep 17 00:00:00 2001 From: souplearn Date: Sat, 25 Jul 2026 05:47:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B1=95=E7=A4=BA=E6=8A=A5=E5=B7=A5?= =?UTF-8?q?=E5=BD=92=E5=B1=9E=E6=8B=86=E5=88=86=E6=91=98=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/dashboard/dashboard.wxml | 1 + pages/dashboard/dashboard.wxss | 8 ++++++++ pages/review/review.wxml | 1 + pages/review/review.wxss | 8 ++++++++ utils/api.js | 18 ++++++++++++++++++ 5 files changed, 36 insertions(+) diff --git a/pages/dashboard/dashboard.wxml b/pages/dashboard/dashboard.wxml index 1c581ae..8c82cbd 100644 --- a/pages/dashboard/dashboard.wxml +++ b/pages/dashboard/dashboard.wxml @@ -47,6 +47,7 @@ {{item.employeeName}} · {{item.reportDate}} + 原始报工日期 {{item.sourceReportDatesText}} 考勤点 {{item.attendancePointName || '-'}} {{item.employeePhone}} · {{item.projectNo}} / {{item.productName}} {{item.processDisplayName || item.productName || '-'}} diff --git a/pages/dashboard/dashboard.wxss b/pages/dashboard/dashboard.wxss index dc45135..4520c79 100644 --- a/pages/dashboard/dashboard.wxss +++ b/pages/dashboard/dashboard.wxss @@ -21,6 +21,14 @@ overflow: hidden; } +.allocation-summary { + display: block; + margin-top: 6rpx; + color: #4b5563; + font-size: 24rpx; + line-height: 1.45; +} + .cleaning-watermark { position: absolute; right: 28rpx; diff --git a/pages/review/review.wxml b/pages/review/review.wxml index 104056c..4cb012b 100644 --- a/pages/review/review.wxml +++ b/pages/review/review.wxml @@ -51,6 +51,7 @@ 考勤点 {{item.attendancePointName || '-'}} {{item.timeRangeText}} {{item.metrics.shiftDistributionText || ''}} + 归属拆分:{{item.allocationSummaryText}} {{item.statusName}} diff --git a/pages/review/review.wxss b/pages/review/review.wxss index a9c7fb5..ca3558d 100644 --- a/pages/review/review.wxss +++ b/pages/review/review.wxss @@ -53,6 +53,14 @@ border-color: #aebbd0; } +.allocation-summary { + display: block; + margin-top: 6rpx; + color: #4b5563; + font-size: 24rpx; + line-height: 1.45; +} + .cleaning-watermark { position: absolute; right: 28rpx; diff --git a/utils/api.js b/utils/api.js index b77fa3b..8d06d8a 100644 --- a/utils/api.js +++ b/utils/api.js @@ -544,6 +544,19 @@ const formatWorkTime = minutes => { return `${Math.round(safeMinutes * 100) / 100}分钟` } +const toCamelAllocation = row => ({ + allocationDate: row.allocation_date || '', + dayMinutes: Number(row.day_minutes || 0), + overtimeMinutes: Number(row.overtime_minutes || 0), + nightMinutes: Number(row.night_minutes || 0), + effectiveMinutes: Number(row.effective_minutes || 0), + goodQty: Number(row.good_qty || 0), + defectQty: Number(row.defect_qty || 0), + scrapQty: Number(row.scrap_qty || 0), + changeoverCount: Number(row.changeover_count || 0), + referenceWage: Number(row.reference_wage || 0), +}) + const toCamelReportItem = row => { const defectQty = Number(row.defect_qty || 0) const scrapQty = Number(row.scrap_qty || 0) @@ -620,6 +633,7 @@ const toCamelReportItem = row => { corrections, correctionPairs, hasCorrections: correctionPairs.length > 0, + allocations: (row.allocations || []).map(toCamelAllocation), } } @@ -714,6 +728,7 @@ const toCamelReport = row => { canUnvoid: !!row.can_unvoid, canEdit: !!row.can_edit, isModified: !!row.is_modified, + allocationSummaryText: row.allocation_summary_text || '', deviceSegments, items, isCleaning, @@ -1555,6 +1570,9 @@ const listDashboard = async (filters = {}) => { reportCount: row.report_count, effectiveMinutes: row.effective_minutes, shiftDistributionText: row.shift_distribution_text || '', + sourceReportDate: row.source_report_date || '', + sourceReportDates: row.source_report_dates || [], + sourceReportDatesText: (row.source_report_dates || []).join('、'), shiftDayMinutes: row.shift_day_minutes || 0, shiftOvertimeMinutes: row.shift_overtime_minutes || 0, shiftNightMinutes: row.shift_night_minutes || 0,