feat(web-admin): wire protocol sample freight batch UI
Replace per-sample transport fee entry with shared freight batch config in storage and donation protocol dialogs, and show mode/amount in view dialogs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
468a7c5e12
commit
5dd545ba5c
6 files changed
+551
-293
No files matched your search
@@ -307,7 +307,16 @@
|
||||
>
|
||||
<div class="section-title section-title--banner"><h3>样本及运输信息</h3></div>
|
||||
<div v-if="samples.length" class="sample-cards">
|
||||
<div v-for="(row, sIdx) in samples" :key="row.id || sIdx" class="sample-card">
|
||||
<div
|
||||
v-for="(row, sIdx) in samples"
|
||||
:key="row.id || sIdx"
|
||||
class="sample-card"
|
||||
:class="{
|
||||
'is-highlight':
|
||||
!!highlightSampleCode && String(row.sampleCode || '') === highlightSampleCode
|
||||
}"
|
||||
:id="row.sampleCode ? `view-sample-${row.sampleCode}` : undefined"
|
||||
>
|
||||
<div class="sample-card__header">
|
||||
<div class="sample-card__title">
|
||||
<span class="sample-card__seq">{{ sIdx + 1 }}</span>
|
||||
@@ -355,31 +364,27 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="row.transport?.transportType"
|
||||
v-if="row.freight?.id || row.freight?.transportMode"
|
||||
class="sample-card__section sample-card__section--transport"
|
||||
>
|
||||
<div class="sample-card__section-label">运输信息</div>
|
||||
<div class="sample-card__section-label">运费信息</div>
|
||||
<div class="data-grid data-grid--4">
|
||||
<div class="data-item">
|
||||
<div class="data-label">运输类型</div>
|
||||
<div class="data-label">运输方式</div>
|
||||
<div class="data-value">{{
|
||||
transportTypeLabel(String(row.transport?.transportType || ''))
|
||||
dash(row.freight?.transportModeLabel || row.freight?.transportMode)
|
||||
}}</div>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">目的站点</div>
|
||||
<div class="data-label">运费(元)</div>
|
||||
<div class="data-value">{{
|
||||
siteName(String(row.transport?.destSiteId || ''))
|
||||
row.freight?.freightAmount != null
|
||||
? '¥' + formatMoneyDisplay(row.freight.freightAmount)
|
||||
: '—'
|
||||
}}{{
|
||||
Number(row.freight?.linkedSampleCount || 0) > 1 ? '(共用)' : ''
|
||||
}}</div>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">预计到达</div>
|
||||
<div class="data-value">{{ dash(row.transport?.etaTime) }}</div>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
<div class="data-label">快递/携带</div>
|
||||
<div class="data-value">{{ sampleTransportExtra(row.transport) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sample-card__section sample-card__section--reception">
|
||||
@@ -419,6 +424,35 @@
|
||||
<el-empty v-else description="暂无样本" :image-size="48" />
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="showHandlePanels"
|
||||
id="view-section-storage-cert-handle"
|
||||
class="section-card section-card--white"
|
||||
>
|
||||
<div class="section-title section-title--banner"><h3>储存证办理</h3></div>
|
||||
<ProtocolHandlePanel
|
||||
v-if="protocolId"
|
||||
mode="storage-cert"
|
||||
:protocol-id="protocolId"
|
||||
:initial="storageCertInfo"
|
||||
@saved="loadDetail"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="showHandlePanels"
|
||||
id="view-section-insurance-handle"
|
||||
class="section-card section-card--white"
|
||||
>
|
||||
<div class="section-title section-title--banner"><h3>保险办理</h3></div>
|
||||
<ProtocolHandlePanel
|
||||
v-if="protocolId"
|
||||
mode="insurance"
|
||||
:protocol-id="protocolId"
|
||||
:initial="fullmoonInsuranceInfo"
|
||||
@saved="loadDetail"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 客户信息 -->
|
||||
<div id="view-section-party" class="section-card section-card--green">
|
||||
<div class="section-title section-title--banner"><h3>客户信息</h3></div>
|
||||
@@ -926,7 +960,7 @@
|
||||
<div class="flow-detail-card__kv">
|
||||
<span class="flow-detail-card__label">确认状态</span>
|
||||
<span class="flow-detail-card__value"
|
||||
><el-tag type="success" size="small">已缴费</el-tag></span
|
||||
><el-tag type="success" size="small">缴费成功</el-tag></span
|
||||
>
|
||||
</div>
|
||||
<div v-if="detail.transferTime" class="flow-detail-card__kv">
|
||||
@@ -1225,6 +1259,7 @@
|
||||
import SampleCodeWithSpecialDisplay from '@/components/business/sample-code-with-special-display/index.vue'
|
||||
import SampleProductionInfoCards from '@/components/business/sample-production-info-cards/index.vue'
|
||||
import SampleStorageReleaseInfo from '@/components/business/sample-storage-release-info/index.vue'
|
||||
import ProtocolHandlePanel from '@/components/business/protocol-handle-panel/index.vue'
|
||||
import {
|
||||
fetchCollectionProtocolAuditList,
|
||||
fetchCollectionProtocolDetail,
|
||||
@@ -1271,8 +1306,17 @@
|
||||
showStorageCert?: boolean
|
||||
/** 满月待办查看:客户信息下方独立展示新生儿保险信息 */
|
||||
showFullmoonInsurance?: boolean
|
||||
/** 样本信息管理:储存证/保险轻量办理 */
|
||||
showHandlePanels?: boolean
|
||||
highlightSampleCode?: string
|
||||
}>(),
|
||||
{ showAuditHistory: false, showStorageCert: false, showFullmoonInsurance: false }
|
||||
{
|
||||
showAuditHistory: false,
|
||||
showStorageCert: false,
|
||||
showFullmoonInsurance: false,
|
||||
showHandlePanels: false,
|
||||
highlightSampleCode: ''
|
||||
}
|
||||
)
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -1289,6 +1333,11 @@
|
||||
|
||||
const formTabs = computed(() => {
|
||||
const tabs: Array<{ key: string; label: string }> = [...baseFormTabs]
|
||||
if (props.showHandlePanels) {
|
||||
const sampleIdx = tabs.findIndex((t) => t.key === 'sample')
|
||||
tabs.splice(sampleIdx + 1, 0, { key: 'storage-cert-handle', label: '储存证办理' })
|
||||
tabs.splice(sampleIdx + 2, 0, { key: 'insurance-handle', label: '保险办理' })
|
||||
}
|
||||
if (props.showFullmoonInsurance) {
|
||||
const partyIdx = tabs.findIndex((t) => t.key === 'party')
|
||||
tabs.splice(partyIdx + 1, 0, { key: 'fullmoon-insurance', label: '新生儿保险' })
|
||||
@@ -1705,7 +1754,7 @@
|
||||
return {
|
||||
key: `ov-${i}`,
|
||||
label: name,
|
||||
subLabel: '已缴费',
|
||||
subLabel: '缴费成功',
|
||||
dotClass: 'done',
|
||||
dotIcon: '✓',
|
||||
labelClass: 'done',
|
||||
@@ -1726,7 +1775,7 @@
|
||||
return {
|
||||
key: `ov-${i}`,
|
||||
label: name,
|
||||
subLabel: '待缴费',
|
||||
subLabel: '已缴费',
|
||||
dotClass: 'pending',
|
||||
dotIcon: '○',
|
||||
labelClass: ''
|
||||
@@ -1993,6 +2042,13 @@
|
||||
|
||||
void finishLookups(data, baseLookupsPromise)
|
||||
void auditPromise
|
||||
if (props.highlightSampleCode) {
|
||||
nextTick(() => {
|
||||
document
|
||||
.getElementById(`view-sample-${props.highlightSampleCode}`)
|
||||
?.scrollIntoView({ behavior: 'smooth', block: 'center' })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function scrollToSection(key: string) {
|
||||
@@ -2024,6 +2080,19 @@
|
||||
if (visible && id) loadDetail()
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => [props.modelValue, props.highlightSampleCode, bundle.value] as const,
|
||||
([visible, code]) => {
|
||||
if (!visible || !code || !bundle.value) return
|
||||
nextTick(() => {
|
||||
document.getElementById(`view-sample-${code}`)?.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'center'
|
||||
})
|
||||
})
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -2394,6 +2463,11 @@
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
&.is-highlight {
|
||||
border-color: var(--primary, #10b981);
|
||||
box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
|
||||
}
|
||||
}
|
||||
|
||||
.sample-card__header {
|
||||
|
||||
Reference in new issue
Block a user