feat: 展示报工归属拆分摘要
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user