提交
This commit is contained in:
1 parent
c1832f9d03
commit
e7d080c9d3
27 files changed
+5168
-4954
No files matched your search
@@ -16,7 +16,10 @@
|
||||
<span
|
||||
>工单号:<b>{{ workOrderRow?.workOrderNo || '—' }}</b></span
|
||||
>
|
||||
<span>样本编码:{{ workOrderRow?.sampleCode || '—' }}</span>
|
||||
<span v-if="workOrderRow?.workOrderType !== 'temporary'">
|
||||
样本编码:{{ workOrderRow?.sampleCode || '—' }}
|
||||
</span>
|
||||
<span v-else>工单类型:临时生产</span>
|
||||
</div>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
@@ -160,7 +163,11 @@
|
||||
productionTaskId: selected?.taskId,
|
||||
remark: form.remark || undefined
|
||||
})
|
||||
ElMessage.success('质检工单派发成功')
|
||||
ElMessage.success(
|
||||
props.workOrderRow?.workOrderType === 'temporary'
|
||||
? '临时质检工单派发成功'
|
||||
: '质检工单派发成功'
|
||||
)
|
||||
emit('success', { sampleCode: props.workOrderRow.sampleCode })
|
||||
handleClose()
|
||||
} finally {
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
</el-tag>
|
||||
<el-tag
|
||||
v-if="cardMetaConfig.showTriggerTag"
|
||||
:type="triggerSourceTagType(row.triggerSource)"
|
||||
:type="resolveTriggerTagType(row)"
|
||||
size="small"
|
||||
>
|
||||
{{ row.triggerSourceLabel || triggerSourceTabLabel(row) }}
|
||||
{{ resolveTriggerTagLabel(row) }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<dl class="qc-work-order-card__meta">
|
||||
@@ -127,7 +127,7 @@
|
||||
import { workOrderStatusLabel } from '@/utils/qc-labels'
|
||||
import type { TagType } from '@/utils/status-tag-registry'
|
||||
import type { QcWorkOrderCardMetaConfig } from '@/utils/qc-work-order-card-meta'
|
||||
import { triggerSourceTabLabel } from '@/utils/qc-work-order-groups'
|
||||
import { triggerSourceTabLabel, temporaryQcSourceLabel, temporaryQcSourceTagType } from '@/utils/qc-work-order-groups'
|
||||
import QcWorkOrderTaskSubList from './QcWorkOrderTaskSubList.vue'
|
||||
import QcWorkOrderFeeSummaryBar from './QcWorkOrderFeeSummaryBar.vue'
|
||||
import QcWorkOrderProtocolPaymentPanel from './QcWorkOrderProtocolPaymentPanel.vue'
|
||||
@@ -181,6 +181,20 @@
|
||||
return 'success'
|
||||
}
|
||||
|
||||
function resolveTriggerTagLabel(row: QcWorkOrder) {
|
||||
if (props.cardMetaConfig.tabKey === 'temporary') {
|
||||
return temporaryQcSourceLabel(row)
|
||||
}
|
||||
return row.triggerSourceLabel || triggerSourceTabLabel(row)
|
||||
}
|
||||
|
||||
function resolveTriggerTagType(row: QcWorkOrder): TagType {
|
||||
if (props.cardMetaConfig.tabKey === 'temporary') {
|
||||
return temporaryQcSourceTagType(row)
|
||||
}
|
||||
return triggerSourceTagType(row.triggerSource)
|
||||
}
|
||||
|
||||
function workOrderStatusTagType(status: string): TagType {
|
||||
if (status === 'ywc') return 'success'
|
||||
if (status === 'ypz') return 'warning'
|
||||
|
||||
+45
-26
@@ -17,6 +17,11 @@ import {
|
||||
appendTaskResultSections,
|
||||
type QcWorkOrderTaskView
|
||||
} from './useQcWorkOrderTaskViewSections'
|
||||
import {
|
||||
isTemporaryQcFromProduction,
|
||||
temporaryQcSourceLabel,
|
||||
temporaryQcSourceTagType
|
||||
} from '@/utils/qc-work-order-groups'
|
||||
|
||||
function formatMetric(v: unknown) {
|
||||
if (v === null || v === undefined || v === '') return '—'
|
||||
@@ -159,35 +164,49 @@ export function buildTemporaryViewSections(
|
||||
detail: QcWorkOrderDetail,
|
||||
tasks: QcWorkOrderTaskView[]
|
||||
): ViewSection[] {
|
||||
const basicFields: ViewSection['fields'] = [
|
||||
{ label: '工单号', value: detail.workOrderNo },
|
||||
{ label: '工单类型', value: '临时', tagType: 'warning' },
|
||||
{
|
||||
label: '业务类型',
|
||||
value: detail.qcBizTypeLabel || qcBizTypeLabel('temporary'),
|
||||
tagType: 'warning'
|
||||
},
|
||||
{
|
||||
label: '工单来源',
|
||||
value: temporaryQcSourceLabel(detail),
|
||||
tagType: temporaryQcSourceTagType(detail)
|
||||
}
|
||||
]
|
||||
if (isTemporaryQcFromProduction(detail)) {
|
||||
basicFields.push({
|
||||
label: '关联生产工单',
|
||||
value: detail.productionWorkOrderNo || '—'
|
||||
})
|
||||
}
|
||||
basicFields.push(
|
||||
{ label: '产品编码', value: detail.cellProductCode || '—' },
|
||||
{ label: '产品名称', value: detail.cellProductName || '—' },
|
||||
{ label: '产品类型', value: detail.cellProductTypeName || '—' },
|
||||
{ label: '代次', value: detail.cellProductPassage || '—' },
|
||||
{ label: '规格', value: detail.cellProductSpecName || '—' },
|
||||
{
|
||||
label: '状态',
|
||||
value: workOrderStatusLabel(detail.workOrderStatus),
|
||||
tagType:
|
||||
detail.workOrderStatus === 'ywc'
|
||||
? 'success'
|
||||
: detail.workOrderStatus === 'ypz'
|
||||
? 'warning'
|
||||
: 'info'
|
||||
},
|
||||
{ label: '备注', value: detail.remark || '—', span: true },
|
||||
{ label: '创建时间', value: detail.createTime || '—' }
|
||||
)
|
||||
return [
|
||||
{
|
||||
title: '基本信息',
|
||||
fields: [
|
||||
{ label: '工单号', value: detail.workOrderNo },
|
||||
{ label: '工单类型', value: '临时', tagType: 'warning' },
|
||||
{
|
||||
label: '业务类型',
|
||||
value: detail.qcBizTypeLabel || qcBizTypeLabel('temporary'),
|
||||
tagType: 'warning'
|
||||
},
|
||||
{ label: '产品编码', value: detail.cellProductCode || '—' },
|
||||
{ label: '产品名称', value: detail.cellProductName || '—' },
|
||||
{ label: '产品类型', value: detail.cellProductTypeName || '—' },
|
||||
{ label: '代次', value: detail.cellProductPassage || '—' },
|
||||
{ label: '规格', value: detail.cellProductSpecName || '—' },
|
||||
{
|
||||
label: '状态',
|
||||
value: workOrderStatusLabel(detail.workOrderStatus),
|
||||
tagType:
|
||||
detail.workOrderStatus === 'ywc'
|
||||
? 'success'
|
||||
: detail.workOrderStatus === 'ypz'
|
||||
? 'warning'
|
||||
: 'info'
|
||||
},
|
||||
{ label: '备注', value: detail.remark || '—', span: true },
|
||||
{ label: '创建时间', value: detail.createTime || '—' }
|
||||
]
|
||||
fields: basicFields
|
||||
},
|
||||
...appendTaskResultSections(detail, tasks)
|
||||
]
|
||||
|
||||
+6
-2
@@ -20,6 +20,10 @@ import {
|
||||
} from '@/utils/qc-work-order-tabs'
|
||||
import { getCardMetaConfig } from '@/utils/qc-work-order-card-meta'
|
||||
|
||||
function shouldApplyTriggerSourceFilter(tabKey: QcWorkOrderTabKey, tabLayout: string) {
|
||||
return tabLayout !== 'standalone' || tabKey === 'temporary'
|
||||
}
|
||||
|
||||
export type QcWorkOrderTabPageMode = 'manage' | 'mine'
|
||||
|
||||
export function useQcWorkOrderTabPage(
|
||||
@@ -71,7 +75,7 @@ export function useQcWorkOrderTabPage(
|
||||
keyword: searchForm.keyword || undefined,
|
||||
workOrderStatus: searchForm.workOrderStatus || undefined,
|
||||
triggerSource:
|
||||
tab.listLayout !== 'standalone' && searchForm.triggerSource
|
||||
shouldApplyTriggerSourceFilter(tabKey.value, tab.listLayout) && searchForm.triggerSource
|
||||
? searchForm.triggerSource
|
||||
: undefined,
|
||||
tabKey: tabKey.value,
|
||||
@@ -116,7 +120,7 @@ export function useQcWorkOrderTabPage(
|
||||
keyword: searchForm.keyword || undefined,
|
||||
workOrderStatus: searchForm.workOrderStatus || undefined,
|
||||
triggerSource:
|
||||
tab.listLayout !== 'standalone' && searchForm.triggerSource
|
||||
shouldApplyTriggerSourceFilter(tabKey.value, tab.listLayout) && searchForm.triggerSource
|
||||
? searchForm.triggerSource
|
||||
: undefined,
|
||||
...toWorkOrderListQuery(tab),
|
||||
|
||||
@@ -21,20 +21,24 @@
|
||||
<el-option label="已作废" value="yzf" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="tabConfig.listLayout !== 'standalone'" label="触发来源">
|
||||
<el-form-item v-if="tabConfig.listLayout !== 'standalone' || tabKey === 'temporary'" label="工单来源">
|
||||
<el-select
|
||||
v-model="searchForm.triggerSource"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<template v-if="tabConfig.group === 'inbound'">
|
||||
<template v-if="tabKey === 'temporary'">
|
||||
<el-option label="生产派发" value="production" />
|
||||
<el-option label="手动创建" value="manual" />
|
||||
</template>
|
||||
<template v-else-if="tabConfig.group === 'inbound'">
|
||||
<el-option label="样本接收" value="reception" />
|
||||
</template>
|
||||
<template v-else-if="tabConfig.listLayout === 'outbound-grouped'">
|
||||
<el-option label="计划质检" value="schedule" />
|
||||
</template>
|
||||
<el-option label="生产过程" value="production" />
|
||||
<el-option v-if="tabKey !== 'temporary'" label="生产过程" value="production" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="filterTimeLabel">
|
||||
@@ -115,20 +119,27 @@
|
||||
|
||||
<div v-show="filterExpanded" id="my-qc-task-filter-extra" class="filter-extra">
|
||||
<div class="filter-grid my-qc-task-filter-extra-grid">
|
||||
<el-form-item v-if="tabConfig.listLayout !== 'standalone'" label="触发来源">
|
||||
<el-form-item
|
||||
v-if="tabConfig.listLayout !== 'standalone' || tabKey === 'temporary'"
|
||||
label="工单来源"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchForm.triggerSource"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<template v-if="tabConfig.group === 'inbound'">
|
||||
<template v-if="tabKey === 'temporary'">
|
||||
<el-option label="生产派发" value="production" />
|
||||
<el-option label="手动创建" value="manual" />
|
||||
</template>
|
||||
<template v-else-if="tabConfig.group === 'inbound'">
|
||||
<el-option label="样本接收" value="reception" />
|
||||
</template>
|
||||
<template v-else-if="tabConfig.listLayout === 'outbound-grouped'">
|
||||
<el-option label="计划质检" value="schedule" />
|
||||
</template>
|
||||
<el-option label="生产过程" value="production" />
|
||||
<el-option v-if="tabKey !== 'temporary'" label="生产过程" value="production" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型">
|
||||
|
||||
Reference in new issue
Block a user