提交
This commit is contained in:
1 parent
a9667f00cc
commit
817dfff43c
174 files changed
+17383
-14508
No files matched your search
@@ -9,7 +9,14 @@
|
||||
|
||||
<div class="outbound-chain-section">
|
||||
<div class="section-subtitle">出库质检工单 + 任务</div>
|
||||
<SampleQcInfoCards :qc-info="detail?.qcInfo" hide-sample-context />
|
||||
<SampleQcInfoGroupedPanel
|
||||
:gate-qc-info="detail?.qcInfo"
|
||||
:process-qc-info-list="detail?.processQcInfoList"
|
||||
gate-section-label="计划质检(出库门禁)"
|
||||
process-section-label="生产过程质检"
|
||||
:show-section-label="false"
|
||||
hide-sample-context
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="outbound-chain-section">
|
||||
@@ -316,7 +323,7 @@
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { Document, Download, View, VideoPlay } from '@element-plus/icons-vue'
|
||||
import SampleProductionInfoCards from '@/components/business/sample-production-info-cards/index.vue'
|
||||
import SampleQcInfoCards from '@/components/business/sample-qc-info-cards/index.vue'
|
||||
import SampleQcInfoGroupedPanel from '@/components/business/sample-qc-info-grouped-panel/index.vue'
|
||||
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
|
||||
import { fetchInfusionScheduleMgmtDetail } from '@/api/admin'
|
||||
import {
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<p v-else class="section-empty-hint">点击「添加物料」从质检物料库勾选并填写计划用量</p>
|
||||
<p v-else class="section-empty-hint">点击「添加物料」从市场物料库勾选并填写计划用量</p>
|
||||
</section>
|
||||
|
||||
<!-- 纸质材料 -->
|
||||
@@ -406,7 +406,7 @@
|
||||
} from '@element-plus/icons-vue'
|
||||
import { fetchUploadAttachment } from '@/api/business'
|
||||
import { fetchCellProductList } from '@/api/cell-product'
|
||||
import { fetchQcMaterialList, type QcMaterialOption } from '@/api/qc-material'
|
||||
import { fetchMaterialList, type MaterialOption } from '@/api/material'
|
||||
import type { OutboundReleaseCellRow } from '@/api/outbound-release-review'
|
||||
import { downloadAttachmentFile } from '@/utils/download-attachment'
|
||||
import { cellProductStatusLabel, cellProductStatusTagType } from '@/utils/status-tag-registry'
|
||||
@@ -461,7 +461,7 @@
|
||||
const cellRows = ref<OutboundReleaseCellRow[]>([])
|
||||
const materialRows = ref<MaterialRow[]>([])
|
||||
const paperRows = ref<PaperRow[]>([])
|
||||
const materialOptions = ref<QcMaterialOption[]>([])
|
||||
const materialOptions = ref<MaterialOption[]>([])
|
||||
const materialOptionsLoading = ref(false)
|
||||
|
||||
const cellSelectVisible = ref(false)
|
||||
@@ -516,12 +516,13 @@
|
||||
)
|
||||
}
|
||||
|
||||
function mapMaterialListToOptions(list: Array<Record<string, any>>): QcMaterialOption[] {
|
||||
function mapMaterialListToOptions(list: Array<Record<string, any>>): MaterialOption[] {
|
||||
return (list || []).map((m) => ({
|
||||
id: String(m.id || ''),
|
||||
label: `${m.materialName || ''}${m.materialCode ? ` (${m.materialCode})` : ''}`.trim(),
|
||||
materialCode: String(m.materialCode || ''),
|
||||
materialName: String(m.materialName || ''),
|
||||
category: String(m.category || ''),
|
||||
specModel: String(m.specModel || ''),
|
||||
unit: String(m.unit || ''),
|
||||
stockQty: Number(m.stockQty ?? 0)
|
||||
@@ -538,6 +539,7 @@
|
||||
label: row.materialName || id,
|
||||
materialCode: '',
|
||||
materialName: row.materialName || '',
|
||||
category: '',
|
||||
specModel: row.specModel || '',
|
||||
unit: row.unit || '',
|
||||
stockQty: 0
|
||||
@@ -549,10 +551,11 @@
|
||||
async function remoteSearchMaterials(query: string) {
|
||||
materialOptionsLoading.value = true
|
||||
try {
|
||||
const res = await fetchQcMaterialList({
|
||||
const res = await fetchMaterialList({
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
keyword: query?.trim() || undefined
|
||||
keyword: query?.trim() || undefined,
|
||||
status: '1'
|
||||
})
|
||||
materialOptions.value = mapMaterialListToOptions(res.list || [])
|
||||
ensureMaterialsInOptions(materialRows.value)
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
const emptyHint = computed(() => {
|
||||
const rec = props.sampleReception
|
||||
if (!rec) {
|
||||
if (props.hideSampleContext) return '暂无质检工单'
|
||||
return '暂未接收样本,接收结论为「接收」后将自动生成质检工单'
|
||||
}
|
||||
if (rec.acceptConclusion === 'bj') {
|
||||
|
||||
@@ -6,46 +6,46 @@
|
||||
>
|
||||
<div v-if="showSectionLabel" class="sample-card__section-label">质检信息</div>
|
||||
<div class="sample-qc-grouped-panel">
|
||||
<section class="sample-qc-grouped-panel__block">
|
||||
<h4 class="sample-qc-grouped-panel__subtitle">样本接收质检(入库门禁)</h4>
|
||||
<SampleQcInfoCards
|
||||
embedded
|
||||
:qc-info="gateQcInfo"
|
||||
:sample-reception="sampleReception"
|
||||
:hide-sample-context="hideSampleContext"
|
||||
/>
|
||||
</section>
|
||||
<section class="sample-qc-grouped-panel__block">
|
||||
<h4 class="sample-qc-grouped-panel__subtitle">{{ gateSectionLabel }}</h4>
|
||||
<SampleQcInfoCards
|
||||
embedded
|
||||
:qc-info="gateQcInfo"
|
||||
:sample-reception="sampleReception"
|
||||
:hide-sample-context="hideSampleContext"
|
||||
/>
|
||||
</section>
|
||||
|
||||
<section class="sample-qc-grouped-panel__block">
|
||||
<h4 class="sample-qc-grouped-panel__subtitle">生产过程质检</h4>
|
||||
<section class="sample-qc-grouped-panel__block">
|
||||
<h4 class="sample-qc-grouped-panel__subtitle">{{ processSectionLabel }}</h4>
|
||||
|
||||
<div v-if="!processQcInfoList?.length" class="sample-qc-grouped-panel__empty">
|
||||
暂无生产过程质检工单
|
||||
</div>
|
||||
<div v-if="!processQcInfoList?.length" class="sample-qc-grouped-panel__empty">
|
||||
暂无生产过程质检工单
|
||||
</div>
|
||||
|
||||
<div v-else class="sample-qc-grouped-panel__process-list">
|
||||
<article
|
||||
v-for="(item, idx) in processQcInfoList"
|
||||
:key="item.workOrderNo || String(idx)"
|
||||
class="sample-qc-grouped-panel__process-item"
|
||||
>
|
||||
<div class="process-qc-meta">
|
||||
<el-tag type="success" size="small" class="process-qc-meta__tag">生产过程</el-tag>
|
||||
<div class="qc-kv">
|
||||
<span class="qc-kv__label">质检对象</span>
|
||||
<span class="qc-kv__value">{{ formatQcTarget(item) }}</span>
|
||||
<div v-else class="sample-qc-grouped-panel__process-list">
|
||||
<article
|
||||
v-for="(item, idx) in processQcInfoList"
|
||||
:key="item.workOrderNo || String(idx)"
|
||||
class="sample-qc-grouped-panel__process-item"
|
||||
>
|
||||
<div class="process-qc-meta">
|
||||
<el-tag type="success" size="small" class="process-qc-meta__tag">生产过程</el-tag>
|
||||
<div class="qc-kv">
|
||||
<span class="qc-kv__label">质检对象</span>
|
||||
<span class="qc-kv__value">{{ formatQcTarget(item) }}</span>
|
||||
</div>
|
||||
<div v-if="item.productionWorkOrderNo" class="qc-kv">
|
||||
<span class="qc-kv__label">生产工单</span>
|
||||
<span class="qc-kv__value qc-kv__value--code">{{
|
||||
item.productionWorkOrderNo
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.productionWorkOrderNo" class="qc-kv">
|
||||
<span class="qc-kv__label">生产工单</span>
|
||||
<span class="qc-kv__value qc-kv__value--code">{{
|
||||
item.productionWorkOrderNo
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<SampleQcInfoCards embedded :qc-info="item" :hide-sample-context="hideSampleContext" />
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
<SampleQcInfoCards embedded :qc-info="item" :hide-sample-context="hideSampleContext" />
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -66,10 +66,14 @@
|
||||
hideSampleContext?: boolean
|
||||
/** 协议/捐赠样本卡内展示外层「质检信息」标题 */
|
||||
showSectionLabel?: boolean
|
||||
gateSectionLabel?: string
|
||||
processSectionLabel?: string
|
||||
}>(),
|
||||
{
|
||||
processQcInfoList: () => [],
|
||||
showSectionLabel: true
|
||||
showSectionLabel: true,
|
||||
gateSectionLabel: '样本接收质检(入库门禁)',
|
||||
processSectionLabel: '生产过程质检'
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user