feat: 展示报工归属拆分摘要
This commit is contained in:
parent
5f6deee796
commit
28b7b76815
@ -47,6 +47,7 @@
|
|||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="row-left">
|
<view class="row-left">
|
||||||
<text class="value">{{item.employeeName}} · {{item.reportDate}}</text>
|
<text class="value">{{item.employeeName}} · {{item.reportDate}}</text>
|
||||||
|
<text wx:if="{{item.sourceReportDatesText}}" class="allocation-summary">原始报工日期 {{item.sourceReportDatesText}}</text>
|
||||||
<text class="subtitle">考勤点 {{item.attendancePointName || '-'}}</text>
|
<text class="subtitle">考勤点 {{item.attendancePointName || '-'}}</text>
|
||||||
<text class="subtitle">{{item.employeePhone}} · {{item.projectNo}} / {{item.productName}}</text>
|
<text class="subtitle">{{item.employeePhone}} · {{item.projectNo}} / {{item.productName}}</text>
|
||||||
<text class="subtitle">{{item.processDisplayName || item.productName || '-'}}</text>
|
<text class="subtitle">{{item.processDisplayName || item.productName || '-'}}</text>
|
||||||
|
|||||||
@ -21,6 +21,14 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.allocation-summary {
|
||||||
|
display: block;
|
||||||
|
margin-top: 6rpx;
|
||||||
|
color: #4b5563;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 1.45;
|
||||||
|
}
|
||||||
|
|
||||||
.cleaning-watermark {
|
.cleaning-watermark {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 28rpx;
|
right: 28rpx;
|
||||||
|
|||||||
@ -51,6 +51,7 @@
|
|||||||
<text class="subtitle">考勤点 {{item.attendancePointName || '-'}}</text>
|
<text class="subtitle">考勤点 {{item.attendancePointName || '-'}}</text>
|
||||||
<text class="subtitle">{{item.timeRangeText}}</text>
|
<text class="subtitle">{{item.timeRangeText}}</text>
|
||||||
<text class="subtitle">{{item.metrics.shiftDistributionText || ''}}</text>
|
<text class="subtitle">{{item.metrics.shiftDistributionText || ''}}</text>
|
||||||
|
<text wx:if="{{item.allocationSummaryText}}" class="allocation-summary">归属拆分:{{item.allocationSummaryText}}</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="pill {{item.status === 'approved' ? 'success' : 'warn'}}">{{item.statusName}}</text>
|
<text class="pill {{item.status === 'approved' ? 'success' : 'warn'}}">{{item.statusName}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -53,6 +53,14 @@
|
|||||||
border-color: #aebbd0;
|
border-color: #aebbd0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.allocation-summary {
|
||||||
|
display: block;
|
||||||
|
margin-top: 6rpx;
|
||||||
|
color: #4b5563;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 1.45;
|
||||||
|
}
|
||||||
|
|
||||||
.cleaning-watermark {
|
.cleaning-watermark {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 28rpx;
|
right: 28rpx;
|
||||||
|
|||||||
18
utils/api.js
18
utils/api.js
@ -544,6 +544,19 @@ const formatWorkTime = minutes => {
|
|||||||
return `${Math.round(safeMinutes * 100) / 100}分钟`
|
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 toCamelReportItem = row => {
|
||||||
const defectQty = Number(row.defect_qty || 0)
|
const defectQty = Number(row.defect_qty || 0)
|
||||||
const scrapQty = Number(row.scrap_qty || 0)
|
const scrapQty = Number(row.scrap_qty || 0)
|
||||||
@ -620,6 +633,7 @@ const toCamelReportItem = row => {
|
|||||||
corrections,
|
corrections,
|
||||||
correctionPairs,
|
correctionPairs,
|
||||||
hasCorrections: correctionPairs.length > 0,
|
hasCorrections: correctionPairs.length > 0,
|
||||||
|
allocations: (row.allocations || []).map(toCamelAllocation),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -714,6 +728,7 @@ const toCamelReport = row => {
|
|||||||
canUnvoid: !!row.can_unvoid,
|
canUnvoid: !!row.can_unvoid,
|
||||||
canEdit: !!row.can_edit,
|
canEdit: !!row.can_edit,
|
||||||
isModified: !!row.is_modified,
|
isModified: !!row.is_modified,
|
||||||
|
allocationSummaryText: row.allocation_summary_text || '',
|
||||||
deviceSegments,
|
deviceSegments,
|
||||||
items,
|
items,
|
||||||
isCleaning,
|
isCleaning,
|
||||||
@ -1555,6 +1570,9 @@ const listDashboard = async (filters = {}) => {
|
|||||||
reportCount: row.report_count,
|
reportCount: row.report_count,
|
||||||
effectiveMinutes: row.effective_minutes,
|
effectiveMinutes: row.effective_minutes,
|
||||||
shiftDistributionText: row.shift_distribution_text || '',
|
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,
|
shiftDayMinutes: row.shift_day_minutes || 0,
|
||||||
shiftOvertimeMinutes: row.shift_overtime_minutes || 0,
|
shiftOvertimeMinutes: row.shift_overtime_minutes || 0,
|
||||||
shiftNightMinutes: row.shift_night_minutes || 0,
|
shiftNightMinutes: row.shift_night_minutes || 0,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user