提交
This commit is contained in:
1 parent
4daf990fab
commit
1ca2668112
219 files changed
+29817
-20945
No files matched your search
@@ -245,7 +245,8 @@
|
||||
<el-date-picker
|
||||
v-model="formData.sampleCollectTime"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
placeholder="选择采集时间"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@@ -255,7 +256,8 @@
|
||||
<el-date-picker
|
||||
v-model="formData.maternalBloodCollectTime"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
placeholder="选择采集时间"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@@ -883,6 +885,7 @@
|
||||
} from '@/api/collection-protocol'
|
||||
import { fetchUploadAttachment } from '@/api/business'
|
||||
import { downloadAttachmentFile } from '@/utils/download-attachment'
|
||||
import { formatDatetimeToMinute } from '@/utils/chinese-datetime-parse'
|
||||
import {
|
||||
fetchCustomerList,
|
||||
fetchUserList,
|
||||
@@ -1670,8 +1673,8 @@
|
||||
formData.hospitalId = String(ci.hospitalId || '')
|
||||
formData.medicalStaff = String(ci.medicalStaff || '')
|
||||
formData.salesUserId = String(ci.salesUserId || '')
|
||||
formData.sampleCollectTime = String(ci.sampleCollectTime || '')
|
||||
formData.maternalBloodCollectTime = String(ci.maternalBloodCollectTime || '')
|
||||
formData.sampleCollectTime = formatDatetimeToMinute(String(ci.sampleCollectTime || ''))
|
||||
formData.maternalBloodCollectTime = formatDatetimeToMinute(String(ci.maternalBloodCollectTime || ''))
|
||||
}
|
||||
|
||||
const samples = bundle.samples as Array<Record<string, any>> | null
|
||||
|
||||
@@ -285,12 +285,6 @@
|
||||
<div class="data-label">样本编码</div>
|
||||
<div class="data-value data-value--code">{{ dash(row.sampleCode) }}</div>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">采集量</div>
|
||||
<div class="data-value"
|
||||
>{{ dash(row.collectAmount) }} {{ unitName(row.unitId, row.unitName) }}</div
|
||||
>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">原价格(元)</div>
|
||||
<div class="data-value data-value--price">{{
|
||||
@@ -335,7 +329,7 @@
|
||||
<div class="data-label">预计到达</div>
|
||||
<div class="data-value">{{ dash(row.transport?.etaTime) }}</div>
|
||||
</div>
|
||||
<div class="data-item data-item--full">
|
||||
<div class="data-item">
|
||||
<div class="data-label">快递/携带</div>
|
||||
<div class="data-value">{{ sampleTransportExtra(row.transport) }}</div>
|
||||
</div>
|
||||
|
||||
@@ -725,6 +725,7 @@
|
||||
fetchUpdateStorageFacility,
|
||||
fetchDeleteStorageFacility,
|
||||
fetchStorageSlotList,
|
||||
fetchStorageSlotStats,
|
||||
fetchBatchCreateSlots,
|
||||
fetchClearStorageSlots,
|
||||
fetchInsertStorageSlotRow,
|
||||
@@ -842,26 +843,23 @@
|
||||
}
|
||||
})
|
||||
|
||||
/** 加载所有叶子节点的格子统计 */
|
||||
/** 加载所有叶子节点的格子统计(单次聚合接口) */
|
||||
const loadAllSlotStats = async () => {
|
||||
const leafNodes = flatList.value.filter((item) => item.isLeaf === 1)
|
||||
if (leafNodes.length === 0) return
|
||||
const results = await Promise.allSettled(
|
||||
leafNodes.map(async (node) => {
|
||||
const res: any = await fetchStorageSlotList({ facilityNodeId: node.id })
|
||||
const list = res?.list || res || []
|
||||
const total = list.length
|
||||
const occupied = list.filter((s: any) => s.slotStatus === '占用').length
|
||||
return { id: node.id, total, occupied, empty: total - occupied }
|
||||
})
|
||||
)
|
||||
const map: Record<string, any> = { ...slotStatsMap.value }
|
||||
results.forEach((r) => {
|
||||
if (r.status === 'fulfilled') {
|
||||
map[r.value.id] = r.value
|
||||
try {
|
||||
const res: any = await fetchStorageSlotStats()
|
||||
const list = Array.isArray(res) ? res : res?.list || []
|
||||
const map: Record<string, { total: number; occupied: number; empty: number }> = {}
|
||||
for (const item of list) {
|
||||
const nodeId = item?.facilityNodeId
|
||||
if (!nodeId) continue
|
||||
const total = Number(item.total) || 0
|
||||
const occupied = Number(item.occupied) || 0
|
||||
map[nodeId] = { total, occupied, empty: Number(item.empty) || total - occupied }
|
||||
}
|
||||
})
|
||||
slotStatsMap.value = map
|
||||
slotStatsMap.value = map
|
||||
} catch (error) {
|
||||
console.error('加载格子统计失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
const handleNodeClick = (data: any) => {
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
{{ row.expectedCellCount ?? '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="viability" label="活性(%)" min-width="90" align="center">
|
||||
<el-table-column prop="viability" label="活率(%)" min-width="90" align="center">
|
||||
<template #default="{ row }">
|
||||
{{ row.viability != null ? row.viability : '—' }}
|
||||
</template>
|
||||
@@ -319,7 +319,7 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="活性(%)" prop="viability">
|
||||
<el-form-item label="活率(%)" prop="viability">
|
||||
<el-input-number
|
||||
v-model="formData.viability"
|
||||
:min="0"
|
||||
@@ -600,7 +600,7 @@
|
||||
}}</div>
|
||||
</div>
|
||||
<div class="cell-product-basic__field">
|
||||
<div class="cell-product-basic__field-label">活性(%)</div>
|
||||
<div class="cell-product-basic__field-label">活率(%)</div>
|
||||
<div class="cell-product-basic__field-value">{{
|
||||
viewRow.viability != null ? String(viewRow.viability) : '—'
|
||||
}}</div>
|
||||
|
||||
@@ -168,25 +168,40 @@
|
||||
<div class="route-config-step-order">{{ index + 1 }}</div>
|
||||
<div class="route-config-step-info">
|
||||
<div class="route-config-step-name">{{ element.processName || '未命名步骤' }}</div>
|
||||
<div class="route-config-step-desc">{{ element.description || '' }}</div>
|
||||
<div v-if="element.description" class="route-config-step-desc">{{
|
||||
element.description
|
||||
}}</div>
|
||||
<div
|
||||
v-if="stepAssigneeText(element) || stepPlannedStartText(element)"
|
||||
class="route-config-step-meta"
|
||||
>
|
||||
<span v-if="stepAssigneeText(element)" class="route-config-step-meta-item">
|
||||
负责人:{{ stepAssigneeText(element) }}
|
||||
</span>
|
||||
<span v-if="stepPlannedStartText(element)" class="route-config-step-meta-item">
|
||||
计划开始时间:{{ stepPlannedStartText(element) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="route-config-step-actions">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
title="复制步骤"
|
||||
@click.stop="editor.handleCopyStep(element)"
|
||||
>
|
||||
<el-icon><CopyDocument /></el-icon>
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
size="small"
|
||||
@click.stop="editor.handleDeleteStep(element)"
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
title="复制步骤"
|
||||
@click.stop="editor.handleCopyStep(element)"
|
||||
>
|
||||
<el-icon><CopyDocument /></el-icon>
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
size="small"
|
||||
@click.stop="editor.handleDeleteStep(element)"
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</draggable>
|
||||
<div v-if="!stepList.length && !stepListLoading" class="route-config-center-empty">
|
||||
@@ -207,7 +222,11 @@
|
||||
import { Rank, Plus, CopyDocument, Delete, Close, Check } from '@element-plus/icons-vue'
|
||||
import { VueDraggable as draggable } from 'vue-draggable-plus'
|
||||
import { fetchCreateProductionTask } from '@/api/production-task'
|
||||
import { productionTaskTypeForWorkOrder } from '@/utils/production-labels'
|
||||
import {
|
||||
productionTaskTypeForWorkOrder,
|
||||
productionStepAssigneeText,
|
||||
productionStepPlannedStartText
|
||||
} from '@/utils/production-labels'
|
||||
import { fetchProcessRouteList } from '@/api/production'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { useTaskStepEditor } from './useTaskStepEditor'
|
||||
@@ -241,6 +260,8 @@
|
||||
const phase = ref<'form' | 'edit'>('form')
|
||||
const createdTaskName = ref('')
|
||||
const submitting = ref(false)
|
||||
/** 创建或变更任务后,关闭弹窗再刷新列表(避免编辑阶段触发大量列表接口) */
|
||||
const pendingListRefresh = ref(false)
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
const routeOptions = ref<any[]>([])
|
||||
@@ -266,6 +287,9 @@
|
||||
filteredProcessLibrary
|
||||
} = editor
|
||||
|
||||
const stepAssigneeText = productionStepAssigneeText
|
||||
const stepPlannedStartText = productionStepPlannedStartText
|
||||
|
||||
function resolveCreatedTaskId(task: Record<string, any> | null | undefined) {
|
||||
const raw = task?.id ?? task?.taskId ?? task?.data?.id
|
||||
return String(raw || '').trim()
|
||||
@@ -302,6 +326,7 @@
|
||||
}
|
||||
|
||||
function handleClose() {
|
||||
const shouldRefresh = pendingListRefresh.value
|
||||
dialogVisible.value = false
|
||||
phase.value = 'form'
|
||||
createdTaskName.value = ''
|
||||
@@ -309,6 +334,10 @@
|
||||
form.routeId = ''
|
||||
form.description = ''
|
||||
form.remark = ''
|
||||
pendingListRefresh.value = false
|
||||
if (shouldRefresh) {
|
||||
emit('success')
|
||||
}
|
||||
}
|
||||
|
||||
async function handleCreateTask() {
|
||||
@@ -347,7 +376,7 @@
|
||||
presetSteps: stepList.value
|
||||
})
|
||||
}
|
||||
emit('success')
|
||||
pendingListRefresh.value = true
|
||||
} catch {
|
||||
/* global error handling */
|
||||
} finally {
|
||||
|
||||
+18
-3
@@ -206,12 +206,16 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<section class="production-work-order-card__tasks">
|
||||
<section
|
||||
v-loading="!isMineMode && tasksBatchLoading"
|
||||
class="production-work-order-card__tasks"
|
||||
>
|
||||
<WorkOrderTaskSubList
|
||||
v-if="isMineMode || tasksBatchReady"
|
||||
embedded
|
||||
:work-order="row"
|
||||
:list-mode="isMineMode ? 'mine' : 'workOrder'"
|
||||
:preset-tasks="isMineMode ? presetTasksByWorkOrderId?.[row.id] : undefined"
|
||||
:preset-tasks="resolvePresetTasks(row.id)"
|
||||
:refresh-token="resolveTaskRefreshToken(row.id)"
|
||||
@changed="(detail) => emit('tasks-changed', detail)"
|
||||
@counts-changed="emit('counts-changed')"
|
||||
@@ -269,10 +273,14 @@
|
||||
selectedIds?: string[]
|
||||
pageMode?: 'manage' | 'mine'
|
||||
presetTasksByWorkOrderId?: Record<string, Record<string, any>[]>
|
||||
tasksBatchReady?: boolean
|
||||
tasksBatchLoading?: boolean
|
||||
}>(),
|
||||
{
|
||||
selectedIds: () => [],
|
||||
pageMode: 'manage'
|
||||
pageMode: 'manage',
|
||||
tasksBatchReady: false,
|
||||
tasksBatchLoading: false
|
||||
}
|
||||
)
|
||||
|
||||
@@ -339,6 +347,13 @@
|
||||
return String(props.taskRefreshToken)
|
||||
}
|
||||
|
||||
function resolvePresetTasks(workOrderId: string) {
|
||||
if (isMineMode.value || props.tasksBatchReady) {
|
||||
return props.presetTasksByWorkOrderId?.[workOrderId] ?? []
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
function visibleMetaFields(row: ProductionWorkOrderItem) {
|
||||
return cardMeta.value.metaFields.filter((field) => !field.visible || field.visible(row))
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
<el-form-item
|
||||
v-if="editor.canEditStepDispatch() && !readonly"
|
||||
label="负责人"
|
||||
class="step-form-col-half"
|
||||
>
|
||||
<el-select
|
||||
v-model="editor.selectedStep.value.assigneeUserIds"
|
||||
@@ -80,6 +79,7 @@
|
||||
:loading="editor.stepAssigneeUserOptionsLoading.value"
|
||||
:remote-method="editor.remoteSearchStepAssigneeUsers"
|
||||
@visible-change="editor.onStepAssigneeSelectVisible"
|
||||
@change="editor.onStepAssigneeIdsChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="u in editor.mergedStepAssigneeUserOptions(editor.selectedStep.value)"
|
||||
@@ -98,7 +98,6 @@
|
||||
<el-form-item
|
||||
v-else-if="editor.mode.value === 'edit' || editor.mode.value === 'execution'"
|
||||
label="负责人"
|
||||
class="step-form-col-half"
|
||||
>
|
||||
<template v-if="(editor.selectedStep.value.assignees || []).length">
|
||||
<el-tag
|
||||
@@ -115,7 +114,6 @@
|
||||
<el-form-item
|
||||
v-if="editor.canEditStepDispatch() && !readonly"
|
||||
label="计划开始时间"
|
||||
class="step-form-col-half"
|
||||
>
|
||||
<template #label
|
||||
>计划开始时间<span class="form-label-tip">仅展示与排序,不限制执行</span></template
|
||||
@@ -128,25 +126,23 @@
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
@change="editor.onStepPlannedStartChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-else-if="editor.mode.value === 'edit' || editor.mode.value === 'execution'"
|
||||
label="计划开始时间"
|
||||
class="step-form-col-half"
|
||||
>
|
||||
<span>{{ formatPlannedStartDate(editor.selectedStep.value.plannedStartTime) || '—' }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" class="step-form-col-half">
|
||||
<el-form-item label="描述">
|
||||
<el-input
|
||||
v-model="editor.selectedStep.value.description"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="工序描述"
|
||||
:disabled="stepFormReadonly"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联SOP" class="step-form-col-half">
|
||||
<el-form-item label="关联SOP">
|
||||
<el-select
|
||||
v-model="editor.sopIdsArr.value"
|
||||
multiple
|
||||
@@ -754,8 +750,8 @@
|
||||
v-if="editor.selectedStep.value.dataCollections?.length"
|
||||
:data="editor.selectedStep.value.dataCollections"
|
||||
stripe
|
||||
class="list-table inner-table"
|
||||
max-height="240"
|
||||
class="list-table inner-table inner-table--data-collection"
|
||||
max-height="320"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
|
||||
<!-- 主体:可折叠工艺库 + 步骤列表 + 详情面板 -->
|
||||
<div class="execution-main">
|
||||
<!-- 可折叠工艺库侧栏(只读 / 我的任务执行时不展示) -->
|
||||
<template v-if="!readonly && !isMineScope">
|
||||
<!-- 可折叠工艺库侧栏(只读时不展示;我的任务执行只读展示,不可拖拽) -->
|
||||
<template v-if="!readonly">
|
||||
<transition name="slide-lib">
|
||||
<div
|
||||
v-show="editor.processLibraryExpanded.value"
|
||||
@@ -108,7 +108,7 @@
|
||||
v-for="(proc, procIndex) in cat.processes"
|
||||
:key="proc.id"
|
||||
class="route-config-process-card"
|
||||
draggable="true"
|
||||
:draggable="!isMineScope"
|
||||
@dragstart="editor.onDragStart($event, proc)"
|
||||
>
|
||||
<div class="route-config-process-info">
|
||||
@@ -251,40 +251,58 @@
|
||||
<div class="route-config-step-name">{{
|
||||
element.processName || '未命名步骤'
|
||||
}}</div>
|
||||
<div class="route-config-step-desc">{{ element.description || '' }}</div>
|
||||
<div v-if="element.description" class="route-config-step-desc">{{
|
||||
element.description
|
||||
}}</div>
|
||||
<div
|
||||
v-if="stepAssigneeText(element) || stepPlannedStartText(element)"
|
||||
class="route-config-step-meta"
|
||||
>
|
||||
<span v-if="stepAssigneeText(element)" class="route-config-step-meta-item">
|
||||
负责人:{{ stepAssigneeText(element) }}
|
||||
</span>
|
||||
<span v-if="stepPlannedStartText(element)" class="route-config-step-meta-item">
|
||||
计划开始时间:{{ stepPlannedStartText(element) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-tag
|
||||
v-if="element.stepStatus"
|
||||
:type="editor.stepStatusTag(element.stepStatus).type"
|
||||
size="small"
|
||||
style="margin-right: 4px"
|
||||
>{{ editor.stepStatusTag(element.stepStatus).label }}</el-tag
|
||||
>
|
||||
<template v-if="!readonly && editor.canEditStep(element)">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
<div class="route-config-step-actions">
|
||||
<el-tag
|
||||
v-if="element.stepStatus"
|
||||
:type="editor.stepStatusTag(element.stepStatus).type"
|
||||
size="small"
|
||||
title="复制步骤"
|
||||
@click.stop="editor.handleCopyStep(element)"
|
||||
>{{ editor.stepStatusTag(element.stepStatus).label }}</el-tag
|
||||
>
|
||||
<el-icon><CopyDocument /></el-icon>
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
size="small"
|
||||
@click.stop="editor.handleDeleteStep(element)"
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-if="!readonly && editor.canEditStep(element)">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
title="复制步骤"
|
||||
@click.stop="editor.handleCopyStep(element)"
|
||||
>
|
||||
<el-icon><CopyDocument /></el-icon>
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
size="small"
|
||||
@click.stop="editor.handleDeleteStep(element)"
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</draggable>
|
||||
|
||||
<div v-if="!editor.executionStepList.value.length" class="execution-step-list-empty">
|
||||
<el-icon :size="32" color="#a8d4c4"><Plus /></el-icon>
|
||||
<p>从左侧拖拽工序到此处,添加任务步骤</p>
|
||||
<p>{{
|
||||
isMineScope
|
||||
? '暂无工艺步骤'
|
||||
: '从左侧拖拽工序到此处,添加任务步骤'
|
||||
}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -432,7 +450,12 @@
|
||||
import CompleteProductionTaskDialog from './CompleteProductionTaskDialog.vue'
|
||||
import ForwardTaskDialog from './ForwardTaskDialog.vue'
|
||||
import type { ProductionTaskOperateScope } from '@/api/production-task'
|
||||
import { productionConclusionLabel, productionConclusionTagType } from '@/utils/production-labels'
|
||||
import {
|
||||
productionConclusionLabel,
|
||||
productionConclusionTagType,
|
||||
productionStepAssigneeText,
|
||||
productionStepPlannedStartText
|
||||
} from '@/utils/production-labels'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -515,6 +538,9 @@
|
||||
return 'seq-pending'
|
||||
}
|
||||
|
||||
const stepAssigneeText = productionStepAssigneeText
|
||||
const stepPlannedStartText = productionStepPlannedStartText
|
||||
|
||||
watch(
|
||||
() => props.visible,
|
||||
async (val) => {
|
||||
@@ -788,26 +814,31 @@
|
||||
cursor: default;
|
||||
}
|
||||
.route-config-step-card.is-mine-assignee {
|
||||
background: #059669;
|
||||
border-color: #047857;
|
||||
background: #ecfdf5;
|
||||
border-color: #a7f3d0;
|
||||
|
||||
.route-config-step-name,
|
||||
.route-config-step-desc {
|
||||
color: #fff;
|
||||
.route-config-step-name {
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
.route-config-step-desc,
|
||||
.route-config-step-meta-item {
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.route-config-step-order {
|
||||
background: rgba(255, 255, 255, 0.25) !important;
|
||||
color: #fff !important;
|
||||
background: #d1fae5 !important;
|
||||
color: #065f46 !important;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
border-color: #065f46;
|
||||
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
|
||||
border-color: #10b981;
|
||||
background: #d1fae5;
|
||||
box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-color: #065f46;
|
||||
border-color: #6ee7b7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
{{ row.expectedCellCount ?? '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活性" prop="viability" min-width="80" align="center">
|
||||
<el-table-column label="活率(%)" prop="viability" min-width="80" align="center">
|
||||
<template #default="{ row }">
|
||||
{{ row.viability != null ? row.viability : '—' }}
|
||||
</template>
|
||||
|
||||
@@ -88,7 +88,6 @@
|
||||
style="width: 100%"
|
||||
:loading="storageSlotOptionsLoading"
|
||||
:remote-method="remoteSearchStorageSlots"
|
||||
@visible-change="onStorageSlotSelectVisible"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in editStorageSlotSelectOptions"
|
||||
@@ -245,7 +244,6 @@
|
||||
style="width: 100%"
|
||||
:loading="storageSlotOptionsLoading"
|
||||
:remote-method="remoteSearchStorageSlots"
|
||||
@visible-change="onStorageSlotSelectVisible"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in getLineStorageSlotOptions($index)"
|
||||
@@ -387,10 +385,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function onStorageSlotSelectVisible(visible: boolean) {
|
||||
if (visible) void remoteSearchStorageSlots('')
|
||||
}
|
||||
|
||||
function onProductTypeSelectVisible(visible: boolean) {
|
||||
if (visible) void remoteSearchProductTypes('')
|
||||
}
|
||||
@@ -537,7 +531,8 @@
|
||||
resetForm()
|
||||
formData.quantity = 1
|
||||
storageSlotSearchOpts.value = {}
|
||||
await Promise.all([remoteSearchProductTypes(''), remoteSearchStorageSlots('')])
|
||||
storageSlotOptions.value = []
|
||||
await remoteSearchProductTypes('')
|
||||
await nextTick()
|
||||
formRef.value?.clearValidate?.()
|
||||
await applyProductCodeToLines()
|
||||
@@ -752,7 +747,7 @@
|
||||
storageSlotOptions.value = ensureStorageSlotsInOptions([], [
|
||||
{ id: item.storageSlotId, name: item.storageSlotName || item.storage_slot_name }
|
||||
])
|
||||
await Promise.all([remoteSearchProductTypes(''), remoteSearchStorageSlots('')])
|
||||
await remoteSearchProductTypes('')
|
||||
}
|
||||
|
||||
function resetForm() {
|
||||
|
||||
@@ -128,10 +128,8 @@
|
||||
const tableData = ref<Record<string, any>[]>([])
|
||||
const loading = ref(false)
|
||||
|
||||
const visibleSteps = computed(() => {
|
||||
if (!isMineMode.value) return tableData.value
|
||||
return tableData.value.filter((row) => isStepAssignee(row))
|
||||
})
|
||||
/** 我的生产任务:展示任务下全部工艺步骤;本人负责步骤高亮,进入执行仍仅限本人步骤 */
|
||||
const visibleSteps = computed(() => tableData.value)
|
||||
|
||||
function assigneeDisplayName(raw: string): string {
|
||||
const s = String(raw || '').trim()
|
||||
|
||||
+1
-6
@@ -44,11 +44,6 @@ function formatMetric(v: unknown) {
|
||||
return String(v)
|
||||
}
|
||||
|
||||
function formatCheckResults(items?: Array<{ itemName?: string; checked?: boolean }>) {
|
||||
if (!items?.length) return '—'
|
||||
return items.map((x) => `${x.itemName || ''}${x.checked ? '(✓)' : '(×)'}`).join('、')
|
||||
}
|
||||
|
||||
function buildBaseFields(d: ProductionWorkOrderDetail): ViewSection['fields'] {
|
||||
return [
|
||||
{ label: '工单号', value: d.workOrderNo },
|
||||
@@ -107,7 +102,7 @@ function buildReceptionSection(d: ProductionWorkOrderDetail): ViewSection[] {
|
||||
tagType:
|
||||
r.acceptConclusion === 'js' ? 'success' : r.acceptConclusion === 'jj' ? 'danger' : 'info'
|
||||
},
|
||||
{ label: '检查项', value: formatCheckResults(r.checkResults), span: true },
|
||||
{ label: '检查项', checkItems: r.checkResults ?? [], span: true },
|
||||
{ label: '备注', value: r.remark || '—', span: true }
|
||||
]
|
||||
}
|
||||
|
||||
+46
-4
@@ -1,5 +1,9 @@
|
||||
import { ref, reactive, computed, onMounted, type Ref } from 'vue'
|
||||
import { fetchProductionWorkOrderList, type ProductionWorkOrderItem } from '@/api/production-work-order'
|
||||
import {
|
||||
fetchProductionTasksByWorkOrderIds,
|
||||
groupProductionTasksByWorkOrderId
|
||||
} from '@/api/production-task'
|
||||
import {
|
||||
fetchAllMineProductionTasks,
|
||||
groupMineTasksByWorkOrder,
|
||||
@@ -18,6 +22,7 @@ import {
|
||||
type ProductionWorkOrderTabKey
|
||||
} from '@/utils/production-work-order-tabs'
|
||||
import { getCardMetaConfig } from '@/utils/production-work-order-card-meta'
|
||||
import { joinWorkOrderStatusFilter } from '@/utils/status-tag-registry'
|
||||
|
||||
export type ProductionWorkOrderTabPageMode = 'manage' | 'mine'
|
||||
|
||||
@@ -39,12 +44,14 @@ export function useProductionWorkOrderTabPage(
|
||||
|
||||
const searchForm = reactive({
|
||||
keyword: '',
|
||||
workOrderStatus: '',
|
||||
workOrderStatus: [] as string[],
|
||||
taskStatus: ''
|
||||
})
|
||||
const createTimeRange = ref<[string, string] | null>(null)
|
||||
const tableData = ref<ProductionWorkOrderItem[]>([])
|
||||
const presetTasksByWorkOrderId = ref<Record<string, Record<string, any>[]>>({})
|
||||
const tasksBatchReady = ref(false)
|
||||
const tasksBatchLoading = ref(false)
|
||||
const loading = ref(false)
|
||||
const pagination = reactive({ page: 1, pageSize: 10, total: 0 })
|
||||
const taskSubListRefreshToken = ref(0)
|
||||
@@ -68,14 +75,40 @@ export function useProductionWorkOrderTabPage(
|
||||
}
|
||||
return {
|
||||
keyword: searchForm.keyword || undefined,
|
||||
workOrderStatus: searchForm.workOrderStatus || undefined,
|
||||
workOrderStatus: searchForm.workOrderStatus.length
|
||||
? [...searchForm.workOrderStatus]
|
||||
: undefined,
|
||||
tabKey: tabKey.value,
|
||||
...timeParams
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function loadBatchTasksForWorkOrders(workOrderIds: string[]) {
|
||||
const ids = workOrderIds.map((id) => String(id || '').trim()).filter(Boolean)
|
||||
if (!ids.length) {
|
||||
presetTasksByWorkOrderId.value = {}
|
||||
tasksBatchReady.value = true
|
||||
return
|
||||
}
|
||||
tasksBatchLoading.value = true
|
||||
try {
|
||||
const res = await fetchProductionTasksByWorkOrderIds(ids)
|
||||
const grouped = groupProductionTasksByWorkOrderId(res.list || [])
|
||||
const map: Record<string, Record<string, any>[]> = {}
|
||||
for (const id of ids) {
|
||||
map[id] = grouped[id] || []
|
||||
}
|
||||
presetTasksByWorkOrderId.value = map
|
||||
} finally {
|
||||
tasksBatchLoading.value = false
|
||||
tasksBatchReady.value = true
|
||||
}
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
loading.value = true
|
||||
tasksBatchReady.value = false
|
||||
try {
|
||||
if (pageModeValue.value === 'mine') {
|
||||
const tasks = await fetchAllMineProductionTasks({
|
||||
@@ -108,7 +141,7 @@ export function useProductionWorkOrderTabPage(
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined,
|
||||
workOrderStatus: searchForm.workOrderStatus || undefined,
|
||||
workOrderStatus: joinWorkOrderStatusFilter(searchForm.workOrderStatus),
|
||||
...toWorkOrderListQuery(tab),
|
||||
...timeParams
|
||||
})
|
||||
@@ -120,6 +153,9 @@ export function useProductionWorkOrderTabPage(
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
if (pageModeValue.value === 'manage') {
|
||||
await loadBatchTasksForWorkOrders(tableData.value.map((row) => row.id))
|
||||
}
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
@@ -129,7 +165,7 @@ export function useProductionWorkOrderTabPage(
|
||||
|
||||
function handleReset() {
|
||||
searchForm.keyword = ''
|
||||
searchForm.workOrderStatus = ''
|
||||
searchForm.workOrderStatus = []
|
||||
searchForm.taskStatus = ''
|
||||
createTimeRange.value = null
|
||||
pagination.page = 1
|
||||
@@ -154,6 +190,10 @@ export function useProductionWorkOrderTabPage(
|
||||
bumpTaskRefresh(workOrderId)
|
||||
if (options?.reloadWorkOrders !== false) {
|
||||
await loadData()
|
||||
return
|
||||
}
|
||||
if (pageModeValue.value === 'manage') {
|
||||
await loadBatchTasksForWorkOrders(tableData.value.map((row) => row.id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,6 +256,8 @@ export function useProductionWorkOrderTabPage(
|
||||
createTimeRange,
|
||||
tableData,
|
||||
presetTasksByWorkOrderId,
|
||||
tasksBatchReady,
|
||||
tasksBatchLoading,
|
||||
loading,
|
||||
pagination,
|
||||
taskSubListRefreshToken,
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
import { ref, onMounted } from 'vue'
|
||||
import {
|
||||
fetchMineProductionWorkOrderTabStepCounts,
|
||||
fetchProductionWorkOrderTabStepCounts,
|
||||
fetchMineProductionWorkOrderTabStepCountsDeduped,
|
||||
fetchProductionWorkOrderTabStepCountsDeduped,
|
||||
type ProductionWorkOrderTabStepCount,
|
||||
type ProductionWorkOrderTabStepCounts
|
||||
} from '@/api/production-work-order'
|
||||
@@ -34,8 +34,8 @@ export function useProductionWorkOrderTabStepCounts(scope: ProductionWorkOrderTa
|
||||
try {
|
||||
const data =
|
||||
scope === 'mine'
|
||||
? await fetchMineProductionWorkOrderTabStepCounts()
|
||||
: await fetchProductionWorkOrderTabStepCounts()
|
||||
? await fetchMineProductionWorkOrderTabStepCountsDeduped()
|
||||
: await fetchProductionWorkOrderTabStepCountsDeduped()
|
||||
tabCounts.value = { ...emptyTabCounts(), ...(data || {}) }
|
||||
} catch {
|
||||
tabCounts.value = emptyTabCounts()
|
||||
|
||||
+23
-8
@@ -13,12 +13,17 @@
|
||||
v-model="searchForm.workOrderStatus"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option label="待配置" value="dpz" />
|
||||
<el-option label="进行中" value="jxz" />
|
||||
<el-option label="已完成" value="ywc" />
|
||||
<el-option label="已作废" value="yzf" />
|
||||
<el-option
|
||||
v-for="opt in PRODUCTION_WORK_ORDER_STATUS_FILTER_OPTIONS"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="filterTimeLabel">
|
||||
@@ -64,12 +69,17 @@
|
||||
v-model="searchForm.workOrderStatus"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option label="待配置" value="dpz" />
|
||||
<el-option label="进行中" value="jxz" />
|
||||
<el-option label="已完成" value="ywc" />
|
||||
<el-option label="已作废" value="yzf" />
|
||||
<el-option
|
||||
v-for="opt in PRODUCTION_WORK_ORDER_STATUS_FILTER_OPTIONS"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态">
|
||||
@@ -132,6 +142,8 @@
|
||||
:task-refresh-key="taskRefreshKey"
|
||||
:selected-ids="selectedIds"
|
||||
:preset-tasks-by-work-order-id="presetTasksByWorkOrderId"
|
||||
:tasks-batch-ready="tasksBatchReady"
|
||||
:tasks-batch-loading="tasksBatchLoading"
|
||||
@view="handleView"
|
||||
@dispatch="(row) => emit('dispatch', row)"
|
||||
@dispatch-qc="(row) => emit('dispatch-qc', row)"
|
||||
@@ -166,6 +178,7 @@
|
||||
import { Search, RefreshLeft, Plus } from '@element-plus/icons-vue'
|
||||
import type { ProductionWorkOrderItem } from '@/api/production-work-order'
|
||||
import type { ProductionWorkOrderTabKey } from '@/utils/production-work-order-tabs'
|
||||
import { PRODUCTION_WORK_ORDER_STATUS_FILTER_OPTIONS } from '@/utils/status-tag-registry'
|
||||
import ProductionWorkOrderCardList from '../ProductionWorkOrderCardList.vue'
|
||||
import SampleReceptionDialog from '../SampleReceptionDialog.vue'
|
||||
import { PRODUCTION_WORK_ORDER_VIEW_DIALOG_COMPONENTS } from '../view-dialogs/view-dialog-registry'
|
||||
@@ -208,6 +221,8 @@
|
||||
createTimeRange,
|
||||
tableData,
|
||||
presetTasksByWorkOrderId,
|
||||
tasksBatchReady,
|
||||
tasksBatchLoading,
|
||||
loading,
|
||||
pagination,
|
||||
taskSubListRefreshToken,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
fetchProductionTaskDetail,
|
||||
fetchProductionTaskEditorInit,
|
||||
fetchAddTaskStep,
|
||||
fetchUpdateTaskStep,
|
||||
fetchDeleteTaskStep,
|
||||
@@ -32,6 +33,12 @@ import { fetchSampleReceptionReceivedList } from '@/api/sample-reception'
|
||||
import { equipmentOptionLabel, parseEquipmentIds, syncEquipmentNamesFromOptions } from '@/utils/equipment-select'
|
||||
import { PROCESS_ROUTE_DEFAULT_SUB_TAB } from '@/utils/process-material-ui'
|
||||
import { fetchCellProductList } from '@/api/cell-product'
|
||||
import {
|
||||
getCachedProductionTaskEditorReference,
|
||||
hasCachedProductionTaskEditorReference,
|
||||
setCachedProductionTaskEditorReference,
|
||||
type ProductionTaskEditorReferenceCache
|
||||
} from '@/utils/production-task-editor-cache'
|
||||
import {
|
||||
fetchProductionMaterialRequisitionOptions,
|
||||
fetchProductionMaterialOptions,
|
||||
@@ -40,7 +47,7 @@ import {
|
||||
import type { FinanceAttachmentItem } from '@/components/business/protocol-finance-confirm-fields/finance-attachments'
|
||||
import { financeAttachmentsToUrlString } from '@/components/business/protocol-finance-confirm-fields/finance-attachments'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { normalizePlannedStartDate } from '@/utils/production-labels'
|
||||
import { normalizePlannedStartDate, extractProductionTaskSteps } from '@/utils/production-labels'
|
||||
|
||||
// ── helpers ──────────────────────────────────────────────────────────
|
||||
function parseTaskAttachmentsFromUrls(urls: string): FinanceAttachmentItem[] {
|
||||
@@ -175,19 +182,60 @@ export function useTaskStepEditor() {
|
||||
const configuredReagentRequisitionOptions = ref<ProductionMaterialRequisitionOption[]>([])
|
||||
const configuredReagentRequisitionOptionsLoading = ref(false)
|
||||
|
||||
let stepConfigOptionsLoaded = false
|
||||
async function ensureStepConfigOptionsLoaded() {
|
||||
if (stepConfigOptionsLoaded) return
|
||||
stepConfigOptionsLoaded = true
|
||||
let stepMaterialOptionsLoaded = false
|
||||
let stepInputOptionsLoaded = false
|
||||
|
||||
async function ensureStepMaterialOptionsLoaded() {
|
||||
if (stepMaterialOptionsLoaded) return
|
||||
stepMaterialOptionsLoaded = true
|
||||
await Promise.all([
|
||||
searchItemUnitOptions(''),
|
||||
searchReagentOptions(''),
|
||||
searchConsumableOptions(''),
|
||||
searchCellProductOptions(''),
|
||||
searchSampleCodeOptions('')
|
||||
searchConsumableOptions('')
|
||||
])
|
||||
}
|
||||
|
||||
async function ensureStepInputOptionsLoaded() {
|
||||
if (stepInputOptionsLoaded) return
|
||||
stepInputOptionsLoaded = true
|
||||
await Promise.all([searchCellProductOptions(''), searchSampleCodeOptions('')])
|
||||
}
|
||||
|
||||
/** @deprecated 兼容旧调用,仅加载试剂/耗材/单位(投入产出选项按需加载) */
|
||||
async function ensureStepConfigOptionsLoaded() {
|
||||
await ensureStepMaterialOptionsLoaded()
|
||||
}
|
||||
|
||||
function applyEditorReferenceData(ref: ProductionTaskEditorReferenceCache) {
|
||||
categoryOptions.value = ref.options.processCategories || []
|
||||
sopOptions.value = ref.options.sops || []
|
||||
outputTypeOptions.value = ref.options.outputTypes || []
|
||||
equipmentOptions.value = ref.options.equipments || []
|
||||
processLibrary.value = ref.processLibrary || []
|
||||
expandedCategories.value = processLibrary.value.map((g) => g.categoryId)
|
||||
|
||||
const reagentList = ref.options.reagents || []
|
||||
cacheReagentMasters(reagentList)
|
||||
reagentOptions.value = reagentList
|
||||
.filter((r) => (r.reagentName || '').trim() || (r.reagentCode || '').trim())
|
||||
.map((r) => ({ id: r.id, label: mapReagentOptionLabel(r) }))
|
||||
|
||||
const consumableList = ref.options.consumables || []
|
||||
cacheConsumableMasters(consumableList)
|
||||
consumableOptions.value = consumableList
|
||||
.filter((c) => (c.consumableName || '').trim() || (c.consumableCode || '').trim())
|
||||
.map((c) => ({ id: c.id, label: mapConsumableOptionLabel(c) }))
|
||||
|
||||
itemUnitOptions.value = (ref.options.itemUnits || [])
|
||||
.map(mapItemUnitOption)
|
||||
.filter((o) => o.value)
|
||||
|
||||
stepMaterialOptionsLoaded = true
|
||||
ensureAllStepReagentOptions()
|
||||
ensureAllStepConsumableOptions()
|
||||
ensureAllStepUnitOptions()
|
||||
}
|
||||
|
||||
const cellProductOptions = ref<
|
||||
Array<{
|
||||
id: string
|
||||
@@ -224,6 +272,8 @@ export function useTaskStepEditor() {
|
||||
itemUnitOptions.value = [{ label: v, value: v }, ...itemUnitOptions.value]
|
||||
}
|
||||
async function searchItemUnitOptions(query: string) {
|
||||
const kw = query?.trim()
|
||||
if (!kw && itemUnitOptions.value.length) return
|
||||
itemUnitOptionsLoading.value = true
|
||||
try {
|
||||
const res = await fetchItemUnitList({
|
||||
@@ -261,6 +311,8 @@ export function useTaskStepEditor() {
|
||||
}
|
||||
|
||||
async function searchReagentOptions(query: string) {
|
||||
const kw = query?.trim()
|
||||
if (!kw && reagentOptions.value.length) return
|
||||
reagentOptionsLoading.value = true
|
||||
try {
|
||||
const res = await fetchReagentList({
|
||||
@@ -371,6 +423,8 @@ export function useTaskStepEditor() {
|
||||
}
|
||||
|
||||
async function searchConsumableOptions(query: string) {
|
||||
const kw = query?.trim()
|
||||
if (!kw && consumableOptions.value.length) return
|
||||
consumableOptionsLoading.value = true
|
||||
try {
|
||||
const res = await fetchConsumableList({
|
||||
@@ -906,11 +960,14 @@ export function useTaskStepEditor() {
|
||||
ensureStepAssigneeFields(step)
|
||||
selectedStepId.value = step.id
|
||||
selectedVirtualStep.value = null
|
||||
void ensureStepConfigOptionsLoaded()
|
||||
void ensureStepMaterialOptionsLoaded()
|
||||
}
|
||||
function selectVirtualStep(type: 'input' | 'output' | 'paper') {
|
||||
selectedVirtualStep.value = type
|
||||
selectedStepId.value = ''
|
||||
if (type === 'input' || type === 'output') {
|
||||
void ensureStepInputOptionsLoaded()
|
||||
}
|
||||
}
|
||||
async function handleCopyStep(step: Record<string, any>) {
|
||||
stepListLoading.value = true
|
||||
@@ -988,12 +1045,64 @@ export function useTaskStepEditor() {
|
||||
if (!Array.isArray(step.assigneeUserIds)) step.assigneeUserIds = []
|
||||
}
|
||||
|
||||
function touchStepList() {
|
||||
stepList.value = [...stepList.value]
|
||||
}
|
||||
|
||||
/** 将 assigneeUserIds 同步为卡片展示用的 assignees / assigneeNames */
|
||||
function syncStepAssigneeDisplay(step: Record<string, any>) {
|
||||
const ids = [...(step.assigneeUserIds || [])]
|
||||
const optionMap = new Map<string, { userId: string; nickName: string; userNo: string }>()
|
||||
for (const u of stepAssigneeUserOptions.value) {
|
||||
optionMap.set(u.id, {
|
||||
userId: u.id,
|
||||
nickName: String(u.nickName || '').trim(),
|
||||
userNo: String(u.userNo || '').trim()
|
||||
})
|
||||
}
|
||||
for (const a of step.assignees || []) {
|
||||
const id = String(a.userId || '').trim()
|
||||
if (!id) continue
|
||||
optionMap.set(id, {
|
||||
userId: id,
|
||||
nickName: String(a.nickName || '').trim(),
|
||||
userNo: String(a.userNo || '').trim()
|
||||
})
|
||||
}
|
||||
step.assignees = ids.map((id) => {
|
||||
const matched = optionMap.get(id)
|
||||
return {
|
||||
userId: id,
|
||||
nickName: matched?.nickName || '',
|
||||
userNo: matched?.userNo || ''
|
||||
}
|
||||
})
|
||||
const names = step.assignees
|
||||
.map((a: Record<string, any>) => String(a.nickName || a.userNo || '').trim())
|
||||
.filter(Boolean)
|
||||
step.assigneeNames = names
|
||||
step.assigneeUserNames = names.join('、')
|
||||
}
|
||||
|
||||
function onStepAssigneeIdsChange(ids: string[]) {
|
||||
if (!selectedStep.value) return
|
||||
selectedStep.value.assigneeUserIds = ids || []
|
||||
syncStepAssigneeDisplay(selectedStep.value)
|
||||
touchStepList()
|
||||
}
|
||||
|
||||
function onStepPlannedStartChange(val: string | null) {
|
||||
if (!selectedStep.value) return
|
||||
selectedStep.value.plannedStartTime = normalizePlannedStartDate(val)
|
||||
touchStepList()
|
||||
}
|
||||
|
||||
async function saveStepDispatch() {
|
||||
if (!selectedStep.value || !canEditStepDispatch()) return
|
||||
const step = selectedStep.value
|
||||
if (!stepDispatchChanged(step)) return
|
||||
const assigneeUserIds = [...(step.assigneeUserIds || [])]
|
||||
await fetchDispatchProductionTaskSteps(
|
||||
const result = await fetchDispatchProductionTaskSteps(
|
||||
taskId.value,
|
||||
{
|
||||
steps: [
|
||||
@@ -1006,8 +1115,15 @@ export function useTaskStepEditor() {
|
||||
},
|
||||
operateScope.value
|
||||
)
|
||||
step._snapshotAssigneeUserIds = [...assigneeUserIds]
|
||||
step._snapshotPlannedStartTime = step.plannedStartTime || ''
|
||||
const steps = extractProductionTaskSteps(result)
|
||||
if (steps.length) {
|
||||
mergeStepDispatchSummaries(steps)
|
||||
} else {
|
||||
syncStepAssigneeDisplay(step)
|
||||
step._snapshotAssigneeUserIds = [...assigneeUserIds]
|
||||
step._snapshotPlannedStartTime = step.plannedStartTime || ''
|
||||
touchStepList()
|
||||
}
|
||||
}
|
||||
|
||||
async function saveStepBasic() {
|
||||
@@ -1824,28 +1940,96 @@ export function useTaskStepEditor() {
|
||||
activeSubTab.value = PROCESS_ROUTE_DEFAULT_SUB_TAB
|
||||
processSearchKeyword.value = ''
|
||||
configSuppressSave.value = true
|
||||
stepConfigOptionsLoaded = false
|
||||
stepMaterialOptionsLoaded = false
|
||||
stepInputOptionsLoaded = false
|
||||
stepListLoading.value = true
|
||||
processLibraryLoading.value = true
|
||||
let stepCount = 0
|
||||
try {
|
||||
const initialSteps = options?.initialSteps
|
||||
if (initialSteps?.length) {
|
||||
applyTaskDetailSteps({ steps: initialSteps })
|
||||
stepCount = stepList.value.length
|
||||
void loadTaskDetail(id).catch(() => {
|
||||
/* 后台补全步骤子表,失败不阻断已展示的步骤列表 */
|
||||
})
|
||||
} else {
|
||||
stepCount = await loadTaskDetail(id, { expectSteps: options?.expectSteps })
|
||||
}
|
||||
void loadConfigReferenceData().catch(() => {
|
||||
/* 工艺库参考数据失败不阻断步骤展示 */
|
||||
const useCachedRef = hasCachedProductionTaskEditorReference()
|
||||
const payload = await fetchProductionTaskEditorInit(id, {
|
||||
includeReference: !useCachedRef
|
||||
})
|
||||
const detail = payload?.task
|
||||
if (payload?.processLibrary && payload?.options) {
|
||||
const refCache: ProductionTaskEditorReferenceCache = {
|
||||
processLibrary: payload.processLibrary,
|
||||
options: payload.options
|
||||
}
|
||||
applyEditorReferenceData(refCache)
|
||||
setCachedProductionTaskEditorReference(refCache)
|
||||
} else {
|
||||
const cached = getCachedProductionTaskEditorReference()
|
||||
if (cached) {
|
||||
applyEditorReferenceData(cached)
|
||||
} else {
|
||||
await loadConfigReferenceData()
|
||||
}
|
||||
}
|
||||
if (detail) {
|
||||
applyTaskDetailSteps(detail)
|
||||
if (mode.value === 'execution') {
|
||||
let executionDetail = detail
|
||||
if (!(executionDetail.labStorageCode || '').trim() && executionDetail.workOrderId) {
|
||||
try {
|
||||
const wo = await fetchProductionWorkOrderDetail(String(executionDetail.workOrderId))
|
||||
const lc = String(
|
||||
wo?.labStorageCode ||
|
||||
(wo?.reception as Record<string, any> | undefined)?.labStorageCode ||
|
||||
''
|
||||
).trim()
|
||||
if (lc) {
|
||||
executionDetail = { ...executionDetail, labStorageCode: lc }
|
||||
}
|
||||
} catch {
|
||||
/* 工单接收信息查询失败不阻断任务执行 */
|
||||
}
|
||||
}
|
||||
taskDetail.value = executionDetail
|
||||
taskInputs.value = (executionDetail.inputs || []).map((i: Record<string, any>) => ({ ...i }))
|
||||
taskOutputs.value = (executionDetail.outputs || []).map((o: Record<string, any>) =>
|
||||
enrichTaskOutputRow(o)
|
||||
)
|
||||
taskAttachments.value = parseTaskAttachmentsFromUrls(executionDetail.attachments || '')
|
||||
await Promise.all([
|
||||
searchReagentRequisitionOptions(''),
|
||||
searchConsumableRequisitionOptions('')
|
||||
])
|
||||
for (const row of taskInputs.value) {
|
||||
if (
|
||||
row.inputType === 'cell_product' &&
|
||||
row.inputId &&
|
||||
!cellProductOptions.value.some((o) => o.id === row.inputId)
|
||||
) {
|
||||
cellProductOptions.value = [
|
||||
{ id: row.inputId, label: row.inputName || row.inputCode || '' },
|
||||
...cellProductOptions.value
|
||||
]
|
||||
}
|
||||
}
|
||||
ensureSampleCodesInOptions(taskInputs.value.filter((r) => r.inputType === 'sample'))
|
||||
await hydrateSampleLabStorageCodes()
|
||||
}
|
||||
}
|
||||
stepCount = stepList.value.length
|
||||
if (canEditStepDispatch()) {
|
||||
void remoteSearchStepAssigneeUsers('')
|
||||
}
|
||||
} catch {
|
||||
try {
|
||||
stepCount = await loadTaskDetail(id, { expectSteps: options?.expectSteps })
|
||||
if (!hasCachedProductionTaskEditorReference()) {
|
||||
await loadConfigReferenceData()
|
||||
} else {
|
||||
applyEditorReferenceData(getCachedProductionTaskEditorReference()!)
|
||||
}
|
||||
} catch {
|
||||
stepList.value = []
|
||||
stepCount = 0
|
||||
}
|
||||
} finally {
|
||||
stepListLoading.value = false
|
||||
processLibraryLoading.value = false
|
||||
await nextTick()
|
||||
configSuppressSave.value = false
|
||||
}
|
||||
@@ -1937,6 +2121,9 @@ export function useTaskStepEditor() {
|
||||
mergedStepAssigneeUserOptions,
|
||||
remoteSearchStepAssigneeUsers,
|
||||
onStepAssigneeSelectVisible,
|
||||
onStepAssigneeIdsChange,
|
||||
onStepPlannedStartChange,
|
||||
syncStepAssigneeDisplay,
|
||||
ensureStepAssigneeFields,
|
||||
onStepEquipmentChange,
|
||||
onSopIdsChange,
|
||||
|
||||
+227
-42
@@ -38,33 +38,89 @@
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="protocol-card-compact__body">
|
||||
<div class="protocol-card-compact__field">
|
||||
<label>预计到达</label>
|
||||
<span
|
||||
class="protocol-card__kv-value protocol-card__kv-value--danger"
|
||||
:title="String(row.etaTimeSummary || '')"
|
||||
>
|
||||
{{ row.etaTimeSummary || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="protocol-card-compact__field">
|
||||
<label>预产期</label>
|
||||
<span
|
||||
class="protocol-card__kv-value protocol-card__kv-value--danger"
|
||||
:title="String(row.expectedDeliveryDate || '')"
|
||||
>
|
||||
{{ row.expectedDeliveryDate || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="protocol-card-compact__field">
|
||||
<label>样本采集</label>
|
||||
<span
|
||||
class="protocol-card-compact__sample"
|
||||
:title="String(row.sampleCollectSummary || '')"
|
||||
>
|
||||
{{ row.sampleCollectSummary || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
<template v-if="mode === 'in_transit'">
|
||||
<div class="protocol-card-compact__field">
|
||||
<label>预计到达</label>
|
||||
<div
|
||||
v-if="getInTransitEtaLines(row).length"
|
||||
class="protocol-card-compact__eta-list"
|
||||
:title="formatInTransitEtaTitle(row)"
|
||||
>
|
||||
<div
|
||||
v-for="(line, etaIdx) in getInTransitEtaLines(row)"
|
||||
:key="etaIdx"
|
||||
class="protocol-card-compact__eta-line"
|
||||
:class="{
|
||||
'protocol-card__kv-value--danger': isWithinNext3Days(line.etaTime)
|
||||
}"
|
||||
>
|
||||
<span class="protocol-card-compact__eta-type">{{
|
||||
line.sampleTypeName || '样本'
|
||||
}}</span>
|
||||
<span class="protocol-card-compact__eta-time">{{
|
||||
line.etaTime || '—'
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<span v-else class="protocol-card__kv-value">—</span>
|
||||
</div>
|
||||
<div class="protocol-card-compact__field">
|
||||
<label>预产期</label>
|
||||
<span
|
||||
class="protocol-card__kv-value protocol-card__kv-value--danger"
|
||||
:title="String(row.expectedDeliveryDate || '')"
|
||||
>
|
||||
{{ row.expectedDeliveryDate || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="protocol-card-compact__field">
|
||||
<label>母血采集</label>
|
||||
<span
|
||||
class="protocol-card__kv-value"
|
||||
:title="String(row.maternalBloodCollectTime || '')"
|
||||
>
|
||||
{{ row.maternalBloodCollectTime || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="protocol-card-compact__field">
|
||||
<label>样本采集</label>
|
||||
<span
|
||||
class="protocol-card__kv-value"
|
||||
:title="String(row.sampleCollectTime || '')"
|
||||
>
|
||||
{{ row.sampleCollectTime || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="protocol-card-compact__field">
|
||||
<label>预计到达</label>
|
||||
<span
|
||||
class="protocol-card__kv-value protocol-card__kv-value--danger"
|
||||
:title="String(row.etaTimeSummary || '')"
|
||||
>
|
||||
{{ row.etaTimeSummary || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="protocol-card-compact__field">
|
||||
<label>预产期</label>
|
||||
<span
|
||||
class="protocol-card__kv-value protocol-card__kv-value--danger"
|
||||
:title="String(row.expectedDeliveryDate || '')"
|
||||
>
|
||||
{{ row.expectedDeliveryDate || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="protocol-card-compact__field">
|
||||
<label>样本采集</label>
|
||||
<span
|
||||
class="protocol-card-compact__sample"
|
||||
:title="String(row.sampleCollectSummary || '')"
|
||||
>
|
||||
{{ row.sampleCollectSummary || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="protocol-card-compact__foot">
|
||||
<el-button
|
||||
@@ -135,13 +191,41 @@
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="protocol-card__kv">
|
||||
<label>采集时间</label>
|
||||
<label>样本采集时间</label>
|
||||
<span>{{
|
||||
getGroupExpandedItem(group)!.row.sampleCollectTime || '—'
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="protocol-card__kv">
|
||||
<label>母血采集时间</label>
|
||||
<span>{{
|
||||
getGroupExpandedItem(group)!.row.maternalBloodCollectTime || '—'
|
||||
}}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
v-if="mode === 'in_transit' && getInTransitEtaLines(getGroupExpandedItem(group)!.row).length"
|
||||
class="protocol-card__kv protocol-card__kv--stack"
|
||||
>
|
||||
<label>预计到达</label>
|
||||
<div class="protocol-card__eta-list">
|
||||
<div
|
||||
v-for="(line, etaIdx) in getInTransitEtaLines(
|
||||
getGroupExpandedItem(group)!.row
|
||||
)"
|
||||
:key="etaIdx"
|
||||
class="protocol-card__eta-line"
|
||||
>
|
||||
<span>{{ line.sampleTypeName || '样本' }}</span>
|
||||
<span
|
||||
class="protocol-card__kv-value protocol-card__kv-value--danger"
|
||||
>
|
||||
{{ line.etaTime || '—' }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
mode === 'in_transit' && getGroupExpandedItem(group)!.row.etaTimeSummary
|
||||
"
|
||||
class="protocol-card__kv"
|
||||
@@ -331,6 +415,11 @@
|
||||
transport?: ProtocolSampleTransport | null
|
||||
}
|
||||
|
||||
type InTransitEtaLine = {
|
||||
sampleTypeName: string
|
||||
etaTime: string
|
||||
}
|
||||
|
||||
type GroupItem = { row: PreTransitProtocolRow; index: number }
|
||||
type CardRowGroup = { items: GroupItem[] }
|
||||
|
||||
@@ -363,9 +452,9 @@
|
||||
let resizeObserver: ResizeObserver | null = null
|
||||
|
||||
function minColWidthForViewport(width: number) {
|
||||
if (width <= 768) return 136
|
||||
if (width <= 1200) return 152
|
||||
return 172
|
||||
if (width <= 768) return 160
|
||||
if (width <= 1200) return 176
|
||||
return 196
|
||||
}
|
||||
|
||||
function updateColumnsPerRow() {
|
||||
@@ -462,10 +551,28 @@
|
||||
}
|
||||
|
||||
function isUrgentCard(row: PreTransitProtocolRow) {
|
||||
return (
|
||||
isWithinNext3Days(String(row.etaTimeSummary || '')) ||
|
||||
isWithinNext3Days(String(row.expectedDeliveryDate || ''))
|
||||
)
|
||||
if (isWithinNext3Days(String(row.expectedDeliveryDate || ''))) {
|
||||
return true
|
||||
}
|
||||
if (props.mode === 'in_transit') {
|
||||
return getInTransitEtaLines(row).some((line) => isWithinNext3Days(line.etaTime))
|
||||
}
|
||||
return isWithinNext3Days(String(row.etaTimeSummary || ''))
|
||||
}
|
||||
|
||||
function getInTransitEtaLines(row: PreTransitProtocolRow): InTransitEtaLine[] {
|
||||
return getSampleItems(row)
|
||||
.map((item) => ({
|
||||
sampleTypeName: item.sampleTypeName || '样本',
|
||||
etaTime: String(item.transport?.etaTime || '').trim()
|
||||
}))
|
||||
.filter((line) => line.sampleTypeName || line.etaTime)
|
||||
}
|
||||
|
||||
function formatInTransitEtaTitle(row: PreTransitProtocolRow): string {
|
||||
return getInTransitEtaLines(row)
|
||||
.map((line) => `${line.sampleTypeName}\n${line.etaTime || '—'}`)
|
||||
.join('\n\n')
|
||||
}
|
||||
|
||||
function getGroupExpandedItem(group: CardRowGroup): GroupItem | null {
|
||||
@@ -541,8 +648,8 @@
|
||||
}
|
||||
|
||||
.protocol-card-list {
|
||||
--compact-card-width: 172px;
|
||||
--compact-card-height: 228px;
|
||||
--compact-card-width: 196px;
|
||||
--compact-card-height: 260px;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -690,6 +797,49 @@
|
||||
}
|
||||
}
|
||||
|
||||
.protocol-card-compact__eta-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
max-height: 72px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.protocol-card-compact__eta-line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 1px;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
line-height: 1.35;
|
||||
color: var(--text, #1e293b);
|
||||
}
|
||||
|
||||
.protocol-card-compact__eta-type {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.protocol-card-compact__eta-time {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.protocol-card-compact__eta-line.protocol-card__kv-value--danger .protocol-card-compact__eta-time {
|
||||
color: #dc2626;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.protocol-card-compact__sample {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
@@ -858,6 +1008,41 @@
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.protocol-card__kv--stack {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.protocol-card__eta-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.protocol-card__eta-line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 1px;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
line-height: 1.35;
|
||||
|
||||
> span:first-child {
|
||||
color: var(--mint-text-muted, #334155);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
> span:last-child {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.protocol-card__empty {
|
||||
font-size: 12px;
|
||||
color: var(--mint-text-muted, #334155);
|
||||
@@ -964,8 +1149,8 @@
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.protocol-card-list {
|
||||
--compact-card-width: 152px;
|
||||
--compact-card-height: 201px;
|
||||
--compact-card-width: 176px;
|
||||
--compact-card-height: 232px;
|
||||
}
|
||||
|
||||
.protocol-card--detail {
|
||||
@@ -992,8 +1177,8 @@
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.protocol-card-list {
|
||||
--compact-card-width: 136px;
|
||||
--compact-card-height: 180px;
|
||||
--compact-card-width: 160px;
|
||||
--compact-card-height: 208px;
|
||||
}
|
||||
|
||||
.protocol-card-row {
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
<!-- 质检工单详情弹窗 — 按检测批次 Tab 展示任务结果 -->
|
||||
<template>
|
||||
<div class="qc-batch-result-tabs">
|
||||
<template v-if="batchSections.length">
|
||||
<el-tabs
|
||||
v-model="activeBatchKey"
|
||||
class="panel-pill-tabs panel-pill-tabs--start qc-batch-tabs"
|
||||
>
|
||||
<el-tab-pane v-for="section in batchSections" :key="section.key" :name="section.key" lazy>
|
||||
<template #label>
|
||||
<span class="qc-batch-tabs__label">{{ section.batchName }}</span>
|
||||
<span class="qc-batch-tabs__count">
|
||||
{{ section.completedTaskCount }}/{{ section.taskCount }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="activeBatchKey === section.key">
|
||||
<div v-if="section.batchNo || section.assigneeUserNames" class="qc-batch-tabs__meta">
|
||||
<span v-if="section.batchNo" class="qc-batch-tabs__meta-item">
|
||||
批次编号:{{ section.batchNo }}
|
||||
</span>
|
||||
<span v-if="section.assigneeUserNames" class="qc-batch-tabs__meta-item">
|
||||
负责人:{{ section.assigneeUserNames }}
|
||||
</span>
|
||||
</div>
|
||||
<QcWorkOrderTaskResultPanel :tasks="section.tasks" />
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
<p v-else class="qc-batch-result-tabs__empty hint-muted">暂无检测批次或任务</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import {
|
||||
resolveBatchSections,
|
||||
type QcBatchTaskSection,
|
||||
type QcInspectionBatch
|
||||
} from '@/utils/qc-inspection-batch'
|
||||
import QcWorkOrderTaskResultPanel from './QcWorkOrderTaskResultPanel.vue'
|
||||
import type { QcWorkOrderTaskView } from './composables/useQcWorkOrderTaskViewSections'
|
||||
|
||||
defineOptions({ name: 'QcWorkOrderBatchResultTabs' })
|
||||
|
||||
const props = defineProps<{
|
||||
batches?: QcInspectionBatch[] | null
|
||||
tasks?: QcWorkOrderTaskView[]
|
||||
}>()
|
||||
|
||||
const activeBatchKey = ref('')
|
||||
|
||||
const batchSections = computed<QcBatchTaskSection<QcWorkOrderTaskView>[]>(() =>
|
||||
resolveBatchSections(props.batches, props.tasks)
|
||||
)
|
||||
|
||||
function ensureActiveBatchKey(sections: QcBatchTaskSection<QcWorkOrderTaskView>[]) {
|
||||
if (!sections.length) {
|
||||
activeBatchKey.value = ''
|
||||
return
|
||||
}
|
||||
const keys = new Set(sections.map((s) => s.key))
|
||||
if (!activeBatchKey.value || !keys.has(activeBatchKey.value)) {
|
||||
activeBatchKey.value = sections[0].key
|
||||
}
|
||||
}
|
||||
|
||||
watch(batchSections, ensureActiveBatchKey, { immediate: true })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.qc-batch-result-tabs {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.qc-batch-tabs {
|
||||
&.panel-pill-tabs.el-tabs > :deep(.el-tabs__header) {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
&.panel-pill-tabs.el-tabs :deep(.el-tabs__nav-scroll) {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
&.panel-pill-tabs.el-tabs :deep(.el-tabs__item) {
|
||||
min-width: 96px;
|
||||
padding: 6px 14px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.qc-batch-tabs__label {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.qc-batch-tabs__count {
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.qc-batch-tabs__meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px 16px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 12px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
|
||||
.qc-batch-result-tabs__empty {
|
||||
margin: 0;
|
||||
padding: 8px 0;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -67,6 +67,7 @@
|
||||
embedded?: boolean
|
||||
refreshToken?: number
|
||||
presetTasks?: QcTask[]
|
||||
presetBatches?: QcInspectionBatch[]
|
||||
}>(),
|
||||
{
|
||||
listMode: 'workOrder'
|
||||
@@ -80,6 +81,7 @@
|
||||
const loading = ref(false)
|
||||
const batches = ref<QcInspectionBatch[]>([])
|
||||
const activeBatchKey = ref('')
|
||||
const usesPresetBatches = computed(() => props.presetBatches !== undefined)
|
||||
|
||||
const batchSections = computed<QcBatchTaskSection<QcTask>[]>(() =>
|
||||
resolveBatchSections(batches.value, props.presetTasks)
|
||||
@@ -115,11 +117,22 @@
|
||||
|
||||
function handleTaskChanged() {
|
||||
emit('changed')
|
||||
if (!props.presetTasks) {
|
||||
if (props.presetTasks === undefined && !usesPresetBatches.value) {
|
||||
loadBatches()
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.presetBatches,
|
||||
(list) => {
|
||||
if (list !== undefined) {
|
||||
batches.value = list
|
||||
loading.value = false
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
)
|
||||
|
||||
watch(
|
||||
batchSections,
|
||||
(sections) => {
|
||||
@@ -131,9 +144,9 @@
|
||||
watch(
|
||||
() => [props.workOrder?.id, props.refreshToken] as const,
|
||||
() => {
|
||||
if (props.presetTasks === undefined) {
|
||||
loadBatches()
|
||||
}
|
||||
if (usesPresetBatches.value) return
|
||||
if (props.presetTasks !== undefined) return
|
||||
loadBatches()
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
:show-work-order-view-only="isMineMode"
|
||||
:task-list-mode="isMineMode ? 'mine' : 'workOrder'"
|
||||
:preset-tasks-by-work-order-id="presetTasksByWorkOrderId"
|
||||
:preset-batches-by-work-order-id="presetBatchesByWorkOrderId"
|
||||
@configure="(row) => emit('configure', row)"
|
||||
@view="(row) => emit('view', row)"
|
||||
@command="(cmd, row) => emit('command', cmd, row)"
|
||||
@@ -29,6 +30,7 @@
|
||||
:card-index="cardIndex(idx)"
|
||||
:task-refresh-token="taskRefreshToken"
|
||||
:preset-tasks="isMineMode ? presetTasksByWorkOrderId?.[item.row.id] : undefined"
|
||||
:preset-batches="managePresetBatches(item.row.id)"
|
||||
:show-work-order-ops="!isMineMode"
|
||||
:show-work-order-view-only="isMineMode"
|
||||
:task-list-mode="isMineMode ? 'mine' : 'workOrder'"
|
||||
@@ -52,6 +54,7 @@
|
||||
:show-work-order-view-only="isMineMode"
|
||||
:task-list-mode="isMineMode ? 'mine' : 'workOrder'"
|
||||
:preset-tasks-by-work-order-id="presetTasksByWorkOrderId"
|
||||
:preset-batches-by-work-order-id="presetBatchesByWorkOrderId"
|
||||
@configure="(row) => emit('configure', row)"
|
||||
@view="(row) => emit('view', row)"
|
||||
@command="(cmd, row) => emit('command', cmd, row)"
|
||||
@@ -70,6 +73,7 @@
|
||||
:show-work-order-view-only="isMineMode"
|
||||
:task-list-mode="isMineMode ? 'mine' : 'workOrder'"
|
||||
:preset-tasks-by-work-order-id="presetTasksByWorkOrderId"
|
||||
:preset-batches-by-work-order-id="presetBatchesByWorkOrderId"
|
||||
@configure="(row) => emit('configure', row)"
|
||||
@view="(row) => emit('view', row)"
|
||||
@command="(cmd, row) => emit('command', cmd, row)"
|
||||
@@ -87,6 +91,7 @@
|
||||
:card-index="cardIndex(idx)"
|
||||
:task-refresh-token="taskRefreshToken"
|
||||
:preset-tasks="isMineMode ? presetTasksByWorkOrderId?.[row.id] : undefined"
|
||||
:preset-batches="managePresetBatches(row.id)"
|
||||
:show-work-order-ops="!isMineMode"
|
||||
:show-work-order-view-only="isMineMode"
|
||||
:task-list-mode="isMineMode ? 'mine' : 'workOrder'"
|
||||
@@ -120,6 +125,7 @@
|
||||
import { computed } from 'vue'
|
||||
import type { QcWorkOrder } from '@/api/qc-work-order'
|
||||
import type { QcTask } from '@/api/qc-task'
|
||||
import type { QcInspectionBatch } from '@/utils/qc-inspection-batch'
|
||||
import {
|
||||
groupInboundQcWorkOrdersByProtocol,
|
||||
groupOutboundQcWorkOrders,
|
||||
@@ -150,6 +156,7 @@
|
||||
taskRefreshToken: number
|
||||
pageMode?: 'manage' | 'mine'
|
||||
presetTasksByWorkOrderId?: Record<string, QcTask[]>
|
||||
presetBatchesByWorkOrderId?: Record<string, QcInspectionBatch[]>
|
||||
}>(),
|
||||
{
|
||||
pageMode: 'manage'
|
||||
@@ -158,6 +165,11 @@
|
||||
|
||||
const isMineMode = computed(() => props.pageMode === 'mine')
|
||||
|
||||
function managePresetBatches(workOrderId: string) {
|
||||
if (isMineMode.value || !props.presetBatchesByWorkOrderId) return undefined
|
||||
return props.presetBatchesByWorkOrderId[workOrderId] ?? []
|
||||
}
|
||||
|
||||
const emit = defineEmits<{
|
||||
configure: [row: QcWorkOrder]
|
||||
view: [row: QcWorkOrder]
|
||||
|
||||
+9
-1
@@ -172,6 +172,7 @@
|
||||
import { Delete, Plus } from '@element-plus/icons-vue'
|
||||
import type { QcInspectionBatchConfigureItem } from '@/utils/qc-inspection-batch'
|
||||
import { createEmptyInspectionBatch } from '@/utils/qc-inspection-batch'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
|
||||
type LabOption = { id: string; itemName: string; itemCode: string }
|
||||
type ThirdOption = {
|
||||
@@ -186,6 +187,12 @@
|
||||
|
||||
const batches = defineModel<QcInspectionBatchConfigureItem[]>('batches', { required: true })
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
function resolveCurrentUserId(): string {
|
||||
return String(userStore.info?.id || userStore.info?.userId || '').trim()
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
labOptions: LabOption[]
|
||||
thirdOptions: ThirdOption[]
|
||||
@@ -293,8 +300,9 @@
|
||||
}
|
||||
|
||||
function addBatch() {
|
||||
const uid = resolveCurrentUserId()
|
||||
batches.value.push({
|
||||
...createEmptyInspectionBatch(),
|
||||
...createEmptyInspectionBatch(uid ? [uid] : undefined),
|
||||
batchName: suggestNextBatchName()
|
||||
})
|
||||
const idx = batches.value.length - 1
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
<div class="qc-protocol-row__ctx-left">
|
||||
<span class="qc-protocol-row__idx">{{ groupIndex }}</span>
|
||||
<span class="qc-protocol-row__code">{{ group.protocolNo || '—' }}</span>
|
||||
<template v-if="protocolUserInfo.motherName || protocolUserInfo.newbornName">
|
||||
<span v-if="protocolUserInfo.motherName" class="qc-protocol-row__user">
|
||||
母亲 {{ protocolUserInfo.motherName }}
|
||||
</span>
|
||||
<span v-if="protocolUserInfo.newbornName" class="qc-protocol-row__user">
|
||||
新生儿 {{ protocolUserInfo.newbornName }}
|
||||
</span>
|
||||
</template>
|
||||
<el-tag v-if="protocolStatus.label" :type="protocolStatus.tagType" size="small">
|
||||
{{ protocolStatus.label }}
|
||||
</el-tag>
|
||||
@@ -76,6 +84,7 @@
|
||||
:show-work-order-view-only="showWorkOrderViewOnly"
|
||||
:task-list-mode="taskListMode"
|
||||
:preset-tasks-by-work-order-id="presetTasksByWorkOrderId"
|
||||
:preset-batches-by-work-order-id="presetBatchesByWorkOrderId"
|
||||
hide-context-bar
|
||||
:hide-protocol-fee-summary="!!protocolPaymentSummary"
|
||||
@configure="(row) => emit('configure', row)"
|
||||
@@ -90,6 +99,7 @@
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import type { QcWorkOrder } from '@/api/qc-work-order'
|
||||
import type { QcTask } from '@/api/qc-task'
|
||||
import type { QcInspectionBatch } from '@/utils/qc-inspection-batch'
|
||||
import { workOrderStatusLabel } from '@/utils/qc-labels'
|
||||
import type { TagType } from '@/utils/status-tag-registry'
|
||||
import {
|
||||
@@ -118,6 +128,7 @@
|
||||
showWorkOrderViewOnly?: boolean
|
||||
taskListMode?: 'workOrder' | 'mine'
|
||||
presetTasksByWorkOrderId?: Record<string, QcTask[]>
|
||||
presetBatchesByWorkOrderId?: Record<string, QcInspectionBatch[]>
|
||||
}>(),
|
||||
{
|
||||
showWorkOrderOps: true,
|
||||
@@ -173,6 +184,14 @@
|
||||
|
||||
const protocolPaymentSummary = computed(() => resolveProtocolGroupPaymentSummary(props.group))
|
||||
|
||||
const protocolUserInfo = computed(() => {
|
||||
const gate = gateRow.value
|
||||
return {
|
||||
motherName: (gate?.motherName || '').trim(),
|
||||
newbornName: (gate?.newbornName || '').trim()
|
||||
}
|
||||
})
|
||||
|
||||
function sampleTypeLabel(sampleGroup: QcWorkOrderSampleGroupModel) {
|
||||
const gate = resolveGateWorkOrderForSampleGroup(sampleGroup.workOrders)
|
||||
return (gate?.sampleTypeName || sampleGroup.workOrders[0]?.sampleTypeName || '').trim()
|
||||
@@ -291,6 +310,13 @@
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
}
|
||||
|
||||
.qc-protocol-row__user {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--mint-text, #1e293b);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.qc-protocol-row__sub {
|
||||
font-size: 12px;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
:show-work-order-view-only="showWorkOrderViewOnly"
|
||||
:task-list-mode="taskListMode"
|
||||
:preset-tasks="activePresetTasks"
|
||||
:preset-batches="activePresetBatches"
|
||||
:hide-protocol-fee-summary="hideProtocolFeeSummary"
|
||||
@configure="(row) => emit('configure', row)"
|
||||
@view="(row) => emit('view', row)"
|
||||
@@ -68,6 +69,7 @@
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import type { QcWorkOrder } from '@/api/qc-work-order'
|
||||
import type { QcTask } from '@/api/qc-task'
|
||||
import type { QcInspectionBatch } from '@/utils/qc-inspection-batch'
|
||||
import { workOrderStatusLabel } from '@/utils/qc-labels'
|
||||
import type { TagType } from '@/utils/status-tag-registry'
|
||||
import {
|
||||
@@ -92,6 +94,7 @@
|
||||
showWorkOrderViewOnly?: boolean
|
||||
taskListMode?: 'workOrder' | 'mine'
|
||||
presetTasksByWorkOrderId?: Record<string, QcTask[]>
|
||||
presetBatchesByWorkOrderId?: Record<string, QcInspectionBatch[]>
|
||||
hideContextBar?: boolean
|
||||
hideProtocolFeeSummary?: boolean
|
||||
}>(),
|
||||
@@ -133,6 +136,12 @@
|
||||
return props.presetTasksByWorkOrderId[row.id]
|
||||
})
|
||||
|
||||
const activePresetBatches = computed(() => {
|
||||
const row = activeRow.value
|
||||
if (!row || !props.presetBatchesByWorkOrderId) return undefined
|
||||
return props.presetBatchesByWorkOrderId[row.id] ?? []
|
||||
})
|
||||
|
||||
const contextRow = computed(() => {
|
||||
const gate =
|
||||
props.group.workOrders.find((w) => isGateTriggerSource(w.triggerSource)) ||
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
:list-mode="taskListMode"
|
||||
:refresh-token="taskRefreshToken"
|
||||
:preset-tasks="presetTasks"
|
||||
:preset-batches="presetBatches"
|
||||
@changed="emit('tasks-changed')"
|
||||
/>
|
||||
</section>
|
||||
@@ -195,6 +196,7 @@
|
||||
import { Setting, View, More, EditPen, Delete } from '@element-plus/icons-vue'
|
||||
import type { QcWorkOrder, OutboundQcDetailProduct } from '@/api/qc-work-order'
|
||||
import type { QcTask } from '@/api/qc-task'
|
||||
import type { QcInspectionBatch } from '@/utils/qc-inspection-batch'
|
||||
import { workOrderStatusLabel } from '@/utils/qc-labels'
|
||||
import type { TagType } from '@/utils/status-tag-registry'
|
||||
import { productStatusLabel, productStatusTagType } from '@/utils/status-tag-registry'
|
||||
@@ -232,6 +234,7 @@
|
||||
showWorkOrderOps?: boolean
|
||||
showWorkOrderViewOnly?: boolean
|
||||
presetTasks?: QcTask[]
|
||||
presetBatches?: QcInspectionBatch[]
|
||||
taskListMode?: 'workOrder' | 'mine'
|
||||
hideProtocolFeeSummary?: boolean
|
||||
}>(),
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<dd>{{ task.companyName || '—' }}</dd>
|
||||
</div>
|
||||
<div
|
||||
v-if="task.taskType === 'dsfjc' && task.feeAmount != null"
|
||||
v-if="showThirdPartyFee && task.taskType === 'dsfjc' && task.feeAmount != null"
|
||||
class="qc-wo-task-card__meta-item"
|
||||
>
|
||||
<dt>费用(元)</dt>
|
||||
@@ -153,6 +153,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useMenuPerm } from '@/hooks/core/useMenuPerm'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
import type { QcWorkOrderDetail } from '@/api/qc-work-order'
|
||||
import { taskStatusLabel, qcTaskConclusionLabel } from '@/utils/qc-labels'
|
||||
@@ -177,6 +178,8 @@
|
||||
}>()
|
||||
|
||||
const showMaterialUsage = SHOW_QC_TASK_MATERIAL_USAGE
|
||||
const { hasQcThirdPartyViewAmount } = useMenuPerm()
|
||||
const showThirdPartyFee = computed(() => hasQcThirdPartyViewAmount.value)
|
||||
|
||||
const displayTasks = computed(() => {
|
||||
if (!props.taskType) return props.tasks
|
||||
@@ -196,7 +199,10 @@
|
||||
secondary: [li.companyName, li.itemCode ? `编码 ${li.itemCode}` : '']
|
||||
.filter(Boolean)
|
||||
.join(' · '),
|
||||
meta: li.feeAmount != null ? `¥${formatMoneyDisplay(li.feeAmount)}` : undefined
|
||||
meta:
|
||||
showThirdPartyFee.value && li.feeAmount != null
|
||||
? `¥${formatMoneyDisplay(li.feeAmount)}`
|
||||
: undefined
|
||||
}))
|
||||
})
|
||||
|
||||
|
||||
@@ -988,11 +988,6 @@
|
||||
return String(v)
|
||||
}
|
||||
|
||||
function formatCheckResults(items?: Array<{ itemName?: string; checked?: boolean }>) {
|
||||
if (!items?.length) return '—'
|
||||
return items.map((x) => `${x.itemName || ''}${x.checked ? '(✓)' : '(×)'}`).join('、')
|
||||
}
|
||||
|
||||
const viewSections = computed<ViewSection[]>(() => {
|
||||
const d = viewDetail.value
|
||||
if (!d) return []
|
||||
@@ -1091,7 +1086,7 @@
|
||||
value:
|
||||
r.acceptConclusionLabel || acceptConclusionLabel(String(r.acceptConclusion || ''))
|
||||
},
|
||||
{ label: '检查项', value: formatCheckResults(r.checkResults), span: true },
|
||||
{ label: '检查项', checkItems: r.checkResults ?? [], span: true },
|
||||
{ label: '备注', value: r.remark || '—', span: true }
|
||||
]
|
||||
}
|
||||
@@ -1311,13 +1306,6 @@
|
||||
return
|
||||
}
|
||||
}
|
||||
if (
|
||||
resultTaskType.value === 'dsfjc' &&
|
||||
!financeAttachmentsToUrlString(resultAttachments.value)
|
||||
) {
|
||||
ElMessage.warning('请上传第三方检测材料')
|
||||
return
|
||||
}
|
||||
if (SHOW_QC_TASK_MATERIAL_USAGE && resultTaskType.value !== 'dsfjc') {
|
||||
const seenRequisitionIds = new Set<string>()
|
||||
for (const mu of materialUsages.value) {
|
||||
|
||||
+1
-6
@@ -29,11 +29,6 @@ function formatMetric(v: unknown) {
|
||||
return String(v)
|
||||
}
|
||||
|
||||
function formatCheckResults(items?: Array<{ itemName?: string; checked?: boolean }>) {
|
||||
if (!items?.length) return '—'
|
||||
return items.map((x) => `${x.itemName || ''}${x.checked ? '(✓)' : '(×)'}`).join('、')
|
||||
}
|
||||
|
||||
function buildTransportSection(r: NonNullable<QcWorkOrderDetail['reception']>): ViewSection[] {
|
||||
const transportFields: ViewSection['fields'] = [
|
||||
{ label: '运输方式', value: transportTypeLabel(String(r.transportType || '')) }
|
||||
@@ -84,7 +79,7 @@ function buildReceptionSection(d: QcWorkOrderDetail): ViewSection[] {
|
||||
? 'danger'
|
||||
: 'info'
|
||||
},
|
||||
{ label: '检查项', value: formatCheckResults(r.checkResults), span: true },
|
||||
{ label: '检查项', checkItems: r.checkResults ?? [], span: true },
|
||||
{ label: '备注', value: r.remark || '—', span: true }
|
||||
]
|
||||
}
|
||||
|
||||
+25
-8
@@ -4,7 +4,6 @@ import type { QcTask } from '@/api/qc-task'
|
||||
import {
|
||||
fetchAllMineTasks,
|
||||
groupMineTasksByWorkOrder,
|
||||
enrichMineEntriesWithWorkOrders,
|
||||
filterMineEntriesByWorkOrderSearch,
|
||||
paginateMineEntries,
|
||||
buildMineTableRows
|
||||
@@ -22,6 +21,11 @@ import {
|
||||
} from '@/utils/qc-work-order-tabs'
|
||||
import { toAllTabListQuery } from '@/utils/qc-work-order-category'
|
||||
import { getCardMetaConfig } from '@/utils/qc-work-order-card-meta'
|
||||
import { joinWorkOrderStatusFilter } from '@/utils/status-tag-registry'
|
||||
import {
|
||||
fetchQcInspectionBatchesBatch,
|
||||
type QcInspectionBatch
|
||||
} from '@/utils/qc-inspection-batch'
|
||||
|
||||
function shouldApplyTriggerSourceFilter(tabKey: QcWorkOrderTabKey, tabLayout: string) {
|
||||
if (isAllQcWorkOrderTab(tabKey)) return true
|
||||
@@ -53,7 +57,7 @@ export function useQcWorkOrderTabPage(
|
||||
const searchForm = reactive({
|
||||
qcCategory: '',
|
||||
keyword: '',
|
||||
workOrderStatus: '',
|
||||
workOrderStatus: [] as string[],
|
||||
triggerSource: '',
|
||||
taskStatus: '',
|
||||
taskType: ''
|
||||
@@ -62,6 +66,9 @@ export function useQcWorkOrderTabPage(
|
||||
const filterExpanded = ref(false)
|
||||
const tableData = ref<QcWorkOrder[]>([])
|
||||
const presetTasksByWorkOrderId = ref<Record<string, QcTask[]>>({})
|
||||
const presetBatchesByWorkOrderId = ref<Record<string, QcInspectionBatch[]> | undefined>(
|
||||
undefined
|
||||
)
|
||||
const loading = ref(false)
|
||||
const pagination = reactive({ page: 1, pageSize: 100, total: 0 })
|
||||
const taskSubListRefreshToken = ref(0)
|
||||
@@ -84,7 +91,9 @@ export function useQcWorkOrderTabPage(
|
||||
}
|
||||
return {
|
||||
keyword: searchForm.keyword || undefined,
|
||||
workOrderStatus: searchForm.workOrderStatus || undefined,
|
||||
workOrderStatus: searchForm.workOrderStatus.length
|
||||
? [...searchForm.workOrderStatus]
|
||||
: undefined,
|
||||
qcCategory: searchForm.qcCategory || undefined,
|
||||
triggerSource:
|
||||
shouldApplyTriggerSourceFilter(tabKey.value, tab.listLayout) && searchForm.triggerSource
|
||||
@@ -106,12 +115,12 @@ export function useQcWorkOrderTabPage(
|
||||
tabKey: tabKey.value
|
||||
})
|
||||
let entries = groupMineTasksByWorkOrder(tasks)
|
||||
entries = await enrichMineEntriesWithWorkOrders(entries)
|
||||
entries = filterMineEntriesByWorkOrderSearch(entries, buildMineWorkOrderSearchFilters())
|
||||
const pageResult = paginateMineEntries(entries, pagination.page, pagination.pageSize)
|
||||
const tableModel = buildMineTableRows(pageResult.items)
|
||||
tableData.value = tableModel.rows
|
||||
presetTasksByWorkOrderId.value = tableModel.presetTasksByWorkOrderId
|
||||
presetBatchesByWorkOrderId.value = undefined
|
||||
pagination.total = pageResult.total
|
||||
return
|
||||
}
|
||||
@@ -134,7 +143,7 @@ export function useQcWorkOrderTabPage(
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
keyword: searchForm.keyword || undefined,
|
||||
workOrderStatus: searchForm.workOrderStatus || undefined,
|
||||
workOrderStatus: joinWorkOrderStatusFilter(searchForm.workOrderStatus),
|
||||
triggerSource:
|
||||
shouldApplyTriggerSourceFilter(tabKey.value, tab.listLayout) && searchForm.triggerSource
|
||||
? searchForm.triggerSource
|
||||
@@ -142,7 +151,14 @@ export function useQcWorkOrderTabPage(
|
||||
...listQuery,
|
||||
...timeParams
|
||||
})
|
||||
tableData.value = res.list || []
|
||||
const list = res.list || []
|
||||
const ids = list.map((row) => row.id).filter(Boolean)
|
||||
const batchMap = ids.length
|
||||
? (await fetchQcInspectionBatchesBatch(ids).catch(() => ({}))) || {}
|
||||
: {}
|
||||
// 先写入批次摘要,再渲染卡片,避免子组件在 preset 未就绪时逐条请求 inspection-batches
|
||||
presetBatchesByWorkOrderId.value = batchMap
|
||||
tableData.value = list
|
||||
pagination.total = res.total ?? 0
|
||||
} finally {
|
||||
loading.value = false
|
||||
@@ -157,7 +173,7 @@ export function useQcWorkOrderTabPage(
|
||||
function handleReset() {
|
||||
searchForm.qcCategory = ''
|
||||
searchForm.keyword = ''
|
||||
searchForm.workOrderStatus = ''
|
||||
searchForm.workOrderStatus = []
|
||||
searchForm.triggerSource = ''
|
||||
searchForm.taskStatus = ''
|
||||
searchForm.taskType = ''
|
||||
@@ -179,8 +195,8 @@ export function useQcWorkOrderTabPage(
|
||||
}
|
||||
|
||||
async function handleWorkOrderTasksChanged() {
|
||||
taskSubListRefreshToken.value += 1
|
||||
await loadData()
|
||||
taskSubListRefreshToken.value += 1
|
||||
}
|
||||
|
||||
function handleView(row: QcWorkOrder) {
|
||||
@@ -225,6 +241,7 @@ export function useQcWorkOrderTabPage(
|
||||
filterExpanded,
|
||||
tableData,
|
||||
presetTasksByWorkOrderId,
|
||||
presetBatchesByWorkOrderId,
|
||||
loading,
|
||||
pagination,
|
||||
taskSubListRefreshToken,
|
||||
|
||||
+11
-18
@@ -10,7 +10,6 @@ import {
|
||||
import { SHOW_QC_TASK_MATERIAL_USAGE } from '@/utils/qc-material-ui'
|
||||
import type { ViewSection } from '@/components/business/system-view-dialog/index.vue'
|
||||
import {
|
||||
batchTasksPanelSlot,
|
||||
resolveBatchSections,
|
||||
type QcInspectionBatch
|
||||
} from '@/utils/qc-inspection-batch'
|
||||
@@ -38,11 +37,18 @@ export function taskMaterialSlotName(taskId: string) {
|
||||
return `task-mat-${taskId}`
|
||||
}
|
||||
|
||||
export const BATCH_TABS_PANEL_SLOT = 'batch-tabs-panel'
|
||||
export const LAB_TASKS_PANEL_SLOT = 'lab-tasks-panel'
|
||||
export const THIRD_TASKS_PANEL_SLOT = 'third-tasks-panel'
|
||||
|
||||
export function isBatchTaskPanelSlot(slot?: string) {
|
||||
return !!slot && (slot.startsWith('batch-tasks-') || slot === LAB_TASKS_PANEL_SLOT || slot === THIRD_TASKS_PANEL_SLOT)
|
||||
return (
|
||||
!!slot &&
|
||||
(slot === BATCH_TABS_PANEL_SLOT ||
|
||||
slot.startsWith('batch-tasks-') ||
|
||||
slot === LAB_TASKS_PANEL_SLOT ||
|
||||
slot === THIRD_TASKS_PANEL_SLOT)
|
||||
)
|
||||
}
|
||||
|
||||
export type QcTaskPanelContext = Pick<
|
||||
@@ -70,13 +76,13 @@ export async function loadEnrichedQcWorkOrderTasks(
|
||||
return Promise.all(
|
||||
rawTasks.map(async (task) => {
|
||||
const base: QcWorkOrderTaskView = { ...task, results: [], materialUsages: [] }
|
||||
if (task.taskStatus !== 'ywc') return base
|
||||
if ((task.taskStatus || '').trim() === 'dzx') return base
|
||||
try {
|
||||
base.results = (await fetchQcTaskResults(task.id)) || []
|
||||
} catch {
|
||||
base.results = []
|
||||
}
|
||||
if (SHOW_QC_TASK_MATERIAL_USAGE && task.taskType === 'sysz') {
|
||||
if (SHOW_QC_TASK_MATERIAL_USAGE && task.taskType === 'sysz' && task.taskStatus === 'ywc') {
|
||||
try {
|
||||
base.materialUsages = materialRowsFromApi(await fetchQcTaskMaterialUsages(task.id))
|
||||
} catch {
|
||||
@@ -106,20 +112,7 @@ export function appendTaskResultSections(
|
||||
): ViewSection[] {
|
||||
const batchSections = resolveBatchSections(batches, tasks)
|
||||
if (batchSections.length) {
|
||||
return batchSections.map((section) => ({
|
||||
title: `检测批次 · ${section.batchName}`,
|
||||
fields: [
|
||||
...(section.batchNo ? [{ label: '批次编号', value: section.batchNo }] : []),
|
||||
...(section.assigneeUserNames
|
||||
? [{ label: '负责人', value: section.assigneeUserNames }]
|
||||
: []),
|
||||
{
|
||||
label: '进度',
|
||||
value: `${section.completedTaskCount}/${section.taskCount} 已完成`
|
||||
}
|
||||
],
|
||||
slot: batchTasksPanelSlot(section.key)
|
||||
}))
|
||||
return [{ title: '检测批次', fields: [], slot: BATCH_TABS_PANEL_SLOT }]
|
||||
}
|
||||
|
||||
const result: ViewSection[] = []
|
||||
|
||||
@@ -188,12 +188,24 @@
|
||||
type QcWorkOrderTabKey
|
||||
} from '@/utils/qc-work-order-tabs'
|
||||
import { refreshQcMenuBadges } from '@/utils/qc-menu-badge'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
|
||||
defineOptions({ name: 'QualityInspectionQcWorkOrder' })
|
||||
|
||||
/** 批次负责人下拉:仅展示拥有该角色的用户 */
|
||||
const QC_BATCH_ASSIGNEE_ROLE = '质检专员'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
function resolveCurrentUserId(): string {
|
||||
return String(userStore.info?.id || userStore.info?.userId || '').trim()
|
||||
}
|
||||
|
||||
function createDefaultInspectionBatch(): QcInspectionBatchConfigureItem {
|
||||
const uid = resolveCurrentUserId()
|
||||
return createEmptyInspectionBatch(uid ? [uid] : undefined)
|
||||
}
|
||||
|
||||
type QcWorkOrderTabPanelExpose = {
|
||||
reload: () => Promise<void>
|
||||
setKeyword: (keyword: string) => void
|
||||
@@ -525,10 +537,10 @@
|
||||
thirdPartyItemIds: [...(b.thirdPartyItemIds || [])]
|
||||
}))
|
||||
} else {
|
||||
configureBatches.value = [createEmptyInspectionBatch()]
|
||||
configureBatches.value = [createDefaultInspectionBatch()]
|
||||
}
|
||||
} else {
|
||||
configureBatches.value = [createEmptyInspectionBatch()]
|
||||
configureBatches.value = [createDefaultInspectionBatch()]
|
||||
}
|
||||
configureVisible.value = true
|
||||
}
|
||||
|
||||
@@ -29,12 +29,17 @@
|
||||
v-model="searchForm.workOrderStatus"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option label="待配置" value="dpz" />
|
||||
<el-option label="已配置" value="ypz" />
|
||||
<el-option label="已完成" value="ywc" />
|
||||
<el-option label="已作废" value="yzf" />
|
||||
<el-option
|
||||
v-for="opt in QC_WORK_ORDER_STATUS_FILTER_OPTIONS"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@@ -159,12 +164,17 @@
|
||||
v-model="searchForm.workOrderStatus"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option label="待配置" value="dpz" />
|
||||
<el-option label="已配置" value="ypz" />
|
||||
<el-option label="已完成" value="ywc" />
|
||||
<el-option label="已作废" value="yzf" />
|
||||
<el-option
|
||||
v-for="opt in QC_WORK_ORDER_STATUS_FILTER_OPTIONS"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态">
|
||||
@@ -288,6 +298,7 @@
|
||||
:total="pagination.total"
|
||||
:task-refresh-token="taskSubListRefreshToken"
|
||||
:preset-tasks-by-work-order-id="presetTasksByWorkOrderId"
|
||||
:preset-batches-by-work-order-id="presetBatchesByWorkOrderId"
|
||||
@configure="(row) => emit('configure', row)"
|
||||
@view="handleView"
|
||||
@command="handleCommand"
|
||||
@@ -314,6 +325,7 @@
|
||||
QC_WORK_ORDER_CATEGORY_OPTIONS,
|
||||
QC_ALL_TAB_TRIGGER_SOURCE_OPTIONS
|
||||
} from '@/utils/qc-work-order-category'
|
||||
import { QC_WORK_ORDER_STATUS_FILTER_OPTIONS } from '@/utils/status-tag-registry'
|
||||
import QcWorkOrderCardList from '../QcWorkOrderCardList.vue'
|
||||
import { QC_WORK_ORDER_VIEW_DIALOG_COMPONENTS } from '../view-dialogs/view-dialog-registry'
|
||||
import {
|
||||
@@ -351,6 +363,7 @@
|
||||
filterExpanded,
|
||||
tableData,
|
||||
presetTasksByWorkOrderId,
|
||||
presetBatchesByWorkOrderId,
|
||||
loading,
|
||||
pagination,
|
||||
taskSubListRefreshToken,
|
||||
|
||||
+2
-1
@@ -77,7 +77,8 @@
|
||||
() => [props.visible, props.workOrderId] as const,
|
||||
([v, id]) => {
|
||||
if (v && id) load(id)
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
|
||||
+2
-1
@@ -73,7 +73,8 @@
|
||||
() => [props.visible, props.workOrderId] as const,
|
||||
([v, id]) => {
|
||||
if (v && id) load(id)
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
|
||||
+2
-1
@@ -50,6 +50,7 @@
|
||||
() => [props.visible, props.workOrderId] as const,
|
||||
([v, id]) => {
|
||||
if (v && id) load(id)
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
+2
-1
@@ -62,6 +62,7 @@
|
||||
() => [props.visible, props.workOrderId] as const,
|
||||
([v, id]) => {
|
||||
if (v && id) load(id)
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
+2
-1
@@ -62,6 +62,7 @@
|
||||
() => [props.visible, props.workOrderId] as const,
|
||||
([v, id]) => {
|
||||
if (v && id) load(id)
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
+5
-14
@@ -5,8 +5,8 @@
|
||||
<template v-for="name in extraSlotNames" #[name]>
|
||||
<slot :name="name" />
|
||||
</template>
|
||||
<template v-for="panel in batchPanels" #[panel.slot]>
|
||||
<QcWorkOrderTaskResultPanel :key="panel.slot" :tasks="panel.tasks" />
|
||||
<template #[BATCH_TABS_PANEL_SLOT]>
|
||||
<QcWorkOrderBatchResultTabs :batches="viewBatches" :tasks="viewTasks" />
|
||||
</template>
|
||||
<template #[LAB_TASKS_PANEL_SLOT]>
|
||||
<QcWorkOrderTaskResultPanel
|
||||
@@ -30,12 +30,10 @@
|
||||
import type { QcWorkOrderDetail } from '@/api/qc-work-order'
|
||||
import SystemViewDialog from '@/components/business/system-view-dialog/index.vue'
|
||||
import QcWorkOrderTaskResultPanel from '../QcWorkOrderTaskResultPanel.vue'
|
||||
import QcWorkOrderBatchResultTabs from '../QcWorkOrderBatchResultTabs.vue'
|
||||
import type { QcInspectionBatch } from '@/utils/qc-inspection-batch'
|
||||
import {
|
||||
batchTasksPanelSlot,
|
||||
resolveBatchSections,
|
||||
type QcInspectionBatch
|
||||
} from '@/utils/qc-inspection-batch'
|
||||
import {
|
||||
BATCH_TABS_PANEL_SLOT,
|
||||
LAB_TASKS_PANEL_SLOT,
|
||||
THIRD_TASKS_PANEL_SLOT,
|
||||
isBatchTaskPanelSlot,
|
||||
@@ -66,13 +64,6 @@
|
||||
set: (v) => emit('update:visible', v)
|
||||
})
|
||||
|
||||
const batchPanels = computed(() =>
|
||||
resolveBatchSections(props.viewBatches, props.viewTasks).map((section) => ({
|
||||
slot: batchTasksPanelSlot(section.key),
|
||||
tasks: section.tasks as QcWorkOrderTaskView[]
|
||||
}))
|
||||
)
|
||||
|
||||
const labTasks = computed(() =>
|
||||
(props.viewTasks || []).filter((t) => t.taskType === 'sysz')
|
||||
)
|
||||
|
||||
+2
-1
@@ -48,6 +48,7 @@
|
||||
() => [props.visible, props.workOrderId] as const,
|
||||
([v, id]) => {
|
||||
if (v && id) load(id)
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
@@ -1020,21 +1020,33 @@
|
||||
}
|
||||
|
||||
function getCurrentUserHandler() {
|
||||
const info = userStore.info
|
||||
const info = userStore.info as Record<string, unknown>
|
||||
const userId = String(info?.id || info?.userId || '')
|
||||
const label = String(info?.realName || info?.userName || info?.username || '')
|
||||
const label = String(
|
||||
info?.realName || info?.nickName || info?.userName || info?.username || ''
|
||||
)
|
||||
return { userId, label }
|
||||
}
|
||||
|
||||
function applyDefaultHandler() {
|
||||
function ensureCurrentUserInOptions() {
|
||||
const { userId, label } = getCurrentUserHandler()
|
||||
if (userId && userOptions.value.some((o) => o.value === userId)) {
|
||||
receiveForm.handlerUserId = userId
|
||||
receiveForm.handlerName = label
|
||||
} else {
|
||||
if (!userId) return
|
||||
if (!userOptions.value.some((o) => o.value === userId)) {
|
||||
userOptions.value = [{ label: label || userId, value: userId }, ...userOptions.value]
|
||||
}
|
||||
}
|
||||
|
||||
function applyDefaultHandler() {
|
||||
ensureCurrentUserInOptions()
|
||||
const { userId, label } = getCurrentUserHandler()
|
||||
if (!userId) {
|
||||
receiveForm.handlerUserId = ''
|
||||
receiveForm.handlerName = ''
|
||||
return
|
||||
}
|
||||
const opt = userOptions.value.find((o) => o.value === userId)
|
||||
receiveForm.handlerUserId = userId
|
||||
receiveForm.handlerName = opt?.label || label
|
||||
}
|
||||
|
||||
function onHandlerChange(userId: string) {
|
||||
@@ -1073,6 +1085,17 @@
|
||||
)
|
||||
}
|
||||
|
||||
const LAB_STORAGE_CODE_UNMODIFIED_MSG =
|
||||
'实验室入库编码仍为系统预填值,请确认并填写后再提交'
|
||||
|
||||
function shouldBlockUnmodifiedLabStorageCode(options: {
|
||||
acceptConclusion: string
|
||||
labStorageCodeManuallyEdited: boolean
|
||||
}): boolean {
|
||||
if (options.acceptConclusion !== 'js') return false
|
||||
return !options.labStorageCodeManuallyEdited
|
||||
}
|
||||
|
||||
function refreshReceiveLabStorageCode(force = false) {
|
||||
if (receiveForm.acceptConclusion !== 'js') {
|
||||
receiveForm.labStorageCode = ''
|
||||
@@ -1182,8 +1205,9 @@
|
||||
}
|
||||
|
||||
function createBatchEntry(row: Record<string, unknown>): BatchReceiveEntry {
|
||||
ensureCurrentUserInOptions()
|
||||
const { userId, label } = getCurrentUserHandler()
|
||||
const hasCurrentUser = userId && userOptions.value.some((o) => o.value === userId)
|
||||
const opt = userOptions.value.find((o) => o.value === userId)
|
||||
return {
|
||||
protocolSampleId: String(row.protocolSampleId || ''),
|
||||
protocolNo: String(row.protocolNo || ''),
|
||||
@@ -1197,8 +1221,8 @@
|
||||
sourceType: (row.sourceType as 'cell_storage' | 'research_donation') || 'cell_storage',
|
||||
transportType: String(row.transportType || ''),
|
||||
receptionTime: formatNowDatetime(),
|
||||
handlerUserId: hasCurrentUser ? userId : '',
|
||||
handlerName: hasCurrentUser ? label : '',
|
||||
handlerUserId: userId || '',
|
||||
handlerName: opt?.label || label || '',
|
||||
receiveTemperature: '',
|
||||
volumeMl: undefined,
|
||||
netWeightG: undefined,
|
||||
@@ -1267,6 +1291,14 @@
|
||||
if (entry.acceptConclusion === 'js' && !String(entry.labStorageCode || '').trim()) {
|
||||
return `${label}:请填写或生成实验室入库编码`
|
||||
}
|
||||
if (
|
||||
shouldBlockUnmodifiedLabStorageCode({
|
||||
acceptConclusion: entry.acceptConclusion,
|
||||
labStorageCodeManuallyEdited: entry.labStorageCodeManuallyEdited
|
||||
})
|
||||
) {
|
||||
return `${label}:${LAB_STORAGE_CODE_UNMODIFIED_MSG}`
|
||||
}
|
||||
if (entry.attachments.some((a) => a._uploading)) return `${label}:附件正在上传,请稍候`
|
||||
return null
|
||||
}
|
||||
@@ -1337,8 +1369,10 @@
|
||||
label: String(u.label || ''),
|
||||
value: String(u.value || '')
|
||||
}))
|
||||
ensureCurrentUserInOptions()
|
||||
} catch {
|
||||
userOptions.value = []
|
||||
ensureCurrentUserInOptions()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1484,6 +1518,16 @@
|
||||
ElMessage.warning('暂无启用的检查项,请先在「接收检查项配置」中维护')
|
||||
return
|
||||
}
|
||||
if (
|
||||
receiveDialogMode.value === 'create' &&
|
||||
shouldBlockUnmodifiedLabStorageCode({
|
||||
acceptConclusion: receiveForm.acceptConclusion,
|
||||
labStorageCodeManuallyEdited: labStorageCodeManuallyEdited.value
|
||||
})
|
||||
) {
|
||||
ElMessage.warning(LAB_STORAGE_CODE_UNMODIFIED_MSG)
|
||||
return
|
||||
}
|
||||
submitLoading.value = true
|
||||
const payload = {
|
||||
receptionTime: receiveForm.receptionTime,
|
||||
|
||||
+1
-6
@@ -124,11 +124,6 @@
|
||||
return String(v)
|
||||
}
|
||||
|
||||
function formatCheckResults(items?: Array<{ itemName?: string; checked?: boolean }>) {
|
||||
if (!items?.length) return '—'
|
||||
return items.map((x) => `${x.itemName || ''}${x.checked ? '(✓)' : '(×)'}`).join('、')
|
||||
}
|
||||
|
||||
function protocolStatusDisplay(proto: Partial<ProtocolInfo>, source: string) {
|
||||
const status = proto.protocolStatus || ''
|
||||
if (!status) return { value: '—', tagType: 'info' as const }
|
||||
@@ -295,7 +290,7 @@
|
||||
? 'danger'
|
||||
: 'info'
|
||||
},
|
||||
{ label: '检查项', value: formatCheckResults(r.checkResults), span: true },
|
||||
{ label: '检查项', checkItems: r.checkResults ?? [], span: true },
|
||||
{ label: '备注', value: r.remark || '—', span: true }
|
||||
]
|
||||
},
|
||||
|
||||
@@ -201,13 +201,18 @@
|
||||
class="date-paste-wrap"
|
||||
@paste.capture="
|
||||
(e) =>
|
||||
handleChineseDatetimePaste(e, 'datetime', (v) => (formData.sampleCollectTime = v))
|
||||
handleChineseDatetimePaste(
|
||||
e,
|
||||
'datetime-minute',
|
||||
(v) => (formData.sampleCollectTime = v)
|
||||
)
|
||||
"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="formData.sampleCollectTime"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
placeholder="选择采集时间"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@@ -221,7 +226,7 @@
|
||||
(e) =>
|
||||
handleChineseDatetimePaste(
|
||||
e,
|
||||
'datetime',
|
||||
'datetime-minute',
|
||||
(v) => (formData.maternalBloodCollectTime = v)
|
||||
)
|
||||
"
|
||||
@@ -229,7 +234,8 @@
|
||||
<el-date-picker
|
||||
v-model="formData.maternalBloodCollectTime"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
placeholder="选择采集时间"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@@ -692,7 +698,7 @@
|
||||
} from '@/api/research-donation'
|
||||
import { fetchUploadAttachment } from '@/api/business'
|
||||
import { downloadAttachmentFile } from '@/utils/download-attachment'
|
||||
import { handleChineseDatetimePaste } from '@/utils/chinese-datetime-parse'
|
||||
import { handleChineseDatetimePaste, formatDatetimeToMinute } from '@/utils/chinese-datetime-parse'
|
||||
import { extractNumericPart } from '@/utils/numeric-input-parse'
|
||||
import {
|
||||
parseDonationStandardImportText,
|
||||
@@ -1094,8 +1100,8 @@
|
||||
formData.hospitalId = String(ci.hospitalId || '')
|
||||
formData.medicalStaff = String(ci.medicalStaff || '')
|
||||
formData.salesUserId = String(ci.salesUserId || '')
|
||||
formData.sampleCollectTime = String(ci.sampleCollectTime || '')
|
||||
formData.maternalBloodCollectTime = String(ci.maternalBloodCollectTime || '')
|
||||
formData.sampleCollectTime = formatDatetimeToMinute(String(ci.sampleCollectTime || ''))
|
||||
formData.maternalBloodCollectTime = formatDatetimeToMinute(String(ci.maternalBloodCollectTime || ''))
|
||||
}
|
||||
|
||||
const samples = bundle.samples as Array<Record<string, any>> | null
|
||||
@@ -2039,7 +2045,7 @@
|
||||
filledLabels.push('新生儿分娩时间')
|
||||
}
|
||||
if (parsed.sampleCollectTime && isBlankString(formData.sampleCollectTime)) {
|
||||
formData.sampleCollectTime = parsed.sampleCollectTime
|
||||
formData.sampleCollectTime = formatDatetimeToMinute(parsed.sampleCollectTime)
|
||||
filledLabels.push('样本采集时间')
|
||||
}
|
||||
if (parsed.maternalBloodExplicitEmpty && isBlankString(formData.maternalBloodCollectTime)) {
|
||||
@@ -2049,7 +2055,7 @@
|
||||
parsed.maternalBloodCollectTime &&
|
||||
isBlankString(formData.maternalBloodCollectTime)
|
||||
) {
|
||||
formData.maternalBloodCollectTime = parsed.maternalBloodCollectTime
|
||||
formData.maternalBloodCollectTime = formatDatetimeToMinute(parsed.maternalBloodCollectTime)
|
||||
filledLabels.push('母血采集时间')
|
||||
}
|
||||
if (parsed.deliveryMode && isBlankString(formData.deliveryMode)) {
|
||||
|
||||
@@ -234,13 +234,6 @@
|
||||
<div class="data-label">样本编码</div>
|
||||
<div class="data-value data-value--code">{{ dash(row.sampleCode) }}</div>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">采集量</div>
|
||||
<div class="data-value"
|
||||
>{{ dash(row.collectAmount) }}
|
||||
{{ unitName(row.unitId, row.unitName) }}</div
|
||||
>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">存储年限(年)</div>
|
||||
<div class="data-value">{{ dash(row.storageYears) }}</div>
|
||||
@@ -273,7 +266,7 @@
|
||||
<div class="data-label">预计到达</div>
|
||||
<div class="data-value">{{ dash(row.transport?.etaTime) }}</div>
|
||||
</div>
|
||||
<div class="data-item data-item--full">
|
||||
<div class="data-item">
|
||||
<div class="data-label">快递/携带</div>
|
||||
<div class="data-value">{{ sampleTransportExtra(row.transport) }}</div>
|
||||
</div>
|
||||
@@ -303,6 +296,12 @@
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">体积(ml)</div>
|
||||
<div class="data-value">{{
|
||||
formatMetric(row.sampleReception.volumeMl)
|
||||
}}</div>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">净重(g)</div>
|
||||
<div class="data-value">{{
|
||||
|
||||
Reference in new issue
Block a user