This commit is contained in:
zlwu committed 2026-06-16 19:24:53 +08:00
1 parent c1832f9d03
commit e7d080c9d3
27 files changed
+5168 -4954

No files matched your search

@@ -75,3 +75,23 @@ export function isGateTriggerSource(source?: string | null) {
const ts = (source || 'reception').trim()
return ts === 'reception' || ts === 'schedule'
}
/** 临时质检:是否由生产工单派发 */
export function isTemporaryQcFromProduction(row: QcWorkOrder) {
return (row.triggerSource || '') === 'production' || !!(row.productionWorkOrderId || '').trim()
}
export function temporaryQcSourceLabel(row: QcWorkOrder) {
return isTemporaryQcFromProduction(row) ? '生产派发' : '手动创建'
}
export function temporaryQcSourceTagType(row: QcWorkOrder): 'warning' | 'info' {
return isTemporaryQcFromProduction(row) ? 'warning' : 'info'
}
export function matchesTemporaryQcSourceFilter(row: QcWorkOrder, filterValue?: string) {
if (!filterValue) return true
if (filterValue === 'production') return isTemporaryQcFromProduction(row)
if (filterValue === 'manual') return !isTemporaryQcFromProduction(row)
return (row.triggerSource || '') === filterValue
}