提交
This commit is contained in:
1 parent
4ea71a1bae
commit
3abe69c1cc
83 files changed
+33505
-21867
No files matched your search
@@ -0,0 +1,532 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>中科兴皖 · 一体化流程 + 角色聚焦(兼容原型)</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||||
<style>
|
||||
:root {
|
||||
--primary: #10b981; --primary-dark: #059669; --primary-bg: #ecfdf5;
|
||||
--text: #1e293b; --text-muted: #64748b; --border: #d9e8e2;
|
||||
--surface: #fff; --table-head: #f8fafc; --row-hover: #f1f5f9;
|
||||
--radius: 10px; --warn: #d97706; --warn-bg: #fffbeb;
|
||||
--info: #3b82f6; --info-bg: #eff6ff;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body { font-family: Inter, sans-serif; font-size: 14px; line-height: 1.5; color: var(--text); background: #fefefe; }
|
||||
.layout { display: flex; min-height: 100vh; }
|
||||
|
||||
.sidebar { width: 220px; background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px; flex-shrink: 0; }
|
||||
.logo { font-size: 15px; font-weight: 700; padding: 0 10px 16px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
|
||||
.logo span { color: var(--primary); }
|
||||
.nav-item { display: block; padding: 8px 12px; color: var(--text-muted); text-decoration: none; border-radius: 8px; font-size: 13px; margin-bottom: 2px; }
|
||||
.nav-item.active { background: var(--primary-bg); color: var(--primary-dark); font-weight: 600; }
|
||||
.nav-sub { font-size: 11px; color: var(--text-muted); padding: 8px 12px 4px; }
|
||||
|
||||
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
|
||||
|
||||
/* Role bar */
|
||||
.role-bar {
|
||||
background: var(--surface); border-bottom: 1px solid var(--border);
|
||||
padding: 10px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
|
||||
}
|
||||
.role-bar-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
|
||||
.role-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
|
||||
.role-tab {
|
||||
padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border);
|
||||
background: var(--surface); font-size: 13px; cursor: pointer; transition: all 0.15s;
|
||||
}
|
||||
.role-tab:hover { border-color: var(--primary); }
|
||||
.role-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
|
||||
.role-desc { font-size: 12px; color: var(--text-muted); flex: 1; min-width: 200px; }
|
||||
|
||||
.view-toggle { display: flex; gap: 4px; margin-left: auto; }
|
||||
.view-toggle button {
|
||||
padding: 5px 10px; font-size: 12px; border: 1px solid var(--border); border-radius: 6px;
|
||||
background: var(--surface); cursor: pointer;
|
||||
}
|
||||
.view-toggle button.active { background: var(--primary-bg); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }
|
||||
|
||||
.topbar { padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
|
||||
.topbar h1 { font-size: 15px; font-weight: 600; }
|
||||
.topbar p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
|
||||
|
||||
.content { flex: 1; padding: 16px 20px; overflow: auto; }
|
||||
|
||||
.concept-banner {
|
||||
padding: 10px 14px; background: linear-gradient(90deg, var(--primary-bg), #fff);
|
||||
border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; color: var(--text-muted); margin-bottom: 14px;
|
||||
}
|
||||
.concept-banner strong { color: var(--primary-dark); }
|
||||
|
||||
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
|
||||
.panel-head {
|
||||
padding: 12px 16px; border-bottom: 1px solid var(--border);
|
||||
display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
|
||||
}
|
||||
.panel-head h2 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
|
||||
.panel-head h2::before { content: ''; width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }
|
||||
|
||||
.stat-row { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
|
||||
.stat-pill {
|
||||
padding: 6px 12px; border-radius: 8px; background: var(--table-head); font-size: 12px;
|
||||
}
|
||||
.stat-pill em { font-style: normal; font-weight: 700; color: var(--warn); margin-left: 4px; }
|
||||
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th { background: var(--table-head); font-size: 12px; color: var(--text-muted); padding: 9px 12px; text-align: center; border-bottom: 1px solid var(--border); }
|
||||
td { padding: 11px 12px; text-align: center; border-bottom: 1px solid var(--border); font-size: 13px; }
|
||||
tr { cursor: pointer; }
|
||||
tr:hover td { background: var(--row-hover); }
|
||||
tr.selected td { background: var(--primary-bg); }
|
||||
|
||||
.tag { display: inline-block; padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 500; }
|
||||
.tag.success { background: var(--primary-bg); color: var(--primary-dark); }
|
||||
.tag.warning { background: var(--warn-bg); color: var(--warn); }
|
||||
.tag.info { background: var(--info-bg); color: var(--info); }
|
||||
.tag.muted { background: var(--table-head); color: var(--text-muted); }
|
||||
|
||||
.btn {
|
||||
height: 30px; padding: 0 11px; border-radius: 7px; font-size: 12px; font-weight: 500;
|
||||
border: 1px solid var(--border); background: var(--surface); cursor: pointer;
|
||||
}
|
||||
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
|
||||
|
||||
/* ── Process Spine (shared component) ── */
|
||||
.spine-wrap {
|
||||
border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
|
||||
margin-bottom: 14px; overflow: hidden;
|
||||
}
|
||||
.spine-header {
|
||||
padding: 10px 14px; display: flex; align-items: center; justify-content: space-between;
|
||||
background: var(--table-head); cursor: pointer; user-select: none;
|
||||
}
|
||||
.spine-header h3 { font-size: 13px; font-weight: 600; }
|
||||
.spine-header .meta { font-size: 12px; color: var(--text-muted); }
|
||||
.spine-toggle { font-size: 12px; color: var(--primary-dark); font-weight: 500; }
|
||||
.spine-body { padding: 12px 14px 14px; border-top: 1px solid var(--border); }
|
||||
.spine-body.collapsed { display: none; }
|
||||
|
||||
.spine-compact { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 4px 0; }
|
||||
.sp-node {
|
||||
flex: 0 0 auto; text-align: center; min-width: 72px; position: relative; padding: 0 2px;
|
||||
}
|
||||
.sp-node:not(:last-child)::after {
|
||||
content: ''; position: absolute; top: 11px; left: calc(50% + 18px); width: calc(100% - 36px); height: 2px; background: var(--border);
|
||||
}
|
||||
.sp-node.done:not(:last-child)::after { background: var(--primary); }
|
||||
.sp-dot {
|
||||
width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); margin: 0 auto 4px;
|
||||
font-size: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface); position: relative; z-index: 1;
|
||||
}
|
||||
.sp-node.done .sp-dot { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-dark); }
|
||||
.sp-node.you .sp-dot { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
|
||||
.sp-node.parallel .sp-dot { border-color: var(--warn); background: var(--warn-bg); color: var(--warn); }
|
||||
.sp-node.indep .sp-dot { border-style: dashed; }
|
||||
.sp-name { font-size: 10px; font-weight: 600; line-height: 1.2; }
|
||||
.sp-node.dim .sp-name, .sp-node.dim .sp-dot { opacity: 0.35; }
|
||||
|
||||
.spine-side {
|
||||
margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
|
||||
display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* Detail drawer / bottom panel */
|
||||
.detail-panel { display: none; }
|
||||
.detail-panel.open { display: block; }
|
||||
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 14px; }
|
||||
.work-area { padding: 16px; }
|
||||
.work-area h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
|
||||
.form-row { margin-bottom: 12px; }
|
||||
.form-row label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
|
||||
.form-row input, .form-row select { width: 100%; max-width: 360px; height: 34px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; }
|
||||
|
||||
.context-card {
|
||||
padding: 14px; background: var(--table-head); border-left: 1px solid var(--border);
|
||||
}
|
||||
.context-card h4 { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }
|
||||
.ctx-line { font-size: 12px; margin-bottom: 6px; }
|
||||
.ctx-line span { color: var(--text-muted); }
|
||||
|
||||
/* Full process view (coordinator only) */
|
||||
.full-process { display: none; }
|
||||
.full-process.show { display: block; }
|
||||
.focused-view.hidden { display: none; }
|
||||
|
||||
.fork-row { display: flex; gap: 20px; justify-content: center; margin: 8px 0; }
|
||||
.flow-card {
|
||||
width: 120px; padding: 10px; border: 2px solid var(--border); border-radius: 8px; text-align: center; font-size: 12px;
|
||||
}
|
||||
.flow-card.active { border-color: var(--primary); background: var(--primary-bg); }
|
||||
.flow-card.done { border-color: var(--primary); opacity: 0.85; }
|
||||
|
||||
.toast {
|
||||
position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(60px);
|
||||
background: var(--text); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px;
|
||||
opacity: 0; transition: all 0.3s; z-index: 99;
|
||||
}
|
||||
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.detail-grid { grid-template-columns: 1fr; }
|
||||
.layout { flex-direction: column; }
|
||||
.sidebar { width: 100%; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layout">
|
||||
<aside class="sidebar" id="sidebar"></aside>
|
||||
<div class="main">
|
||||
<div class="role-bar">
|
||||
<span class="role-bar-label">模拟角色(切换看兼容效果)</span>
|
||||
<div class="role-tabs" id="roleTabs"></div>
|
||||
<div class="view-toggle" id="viewToggle" style="display:none">
|
||||
<button type="button" data-view="focused" class="active">聚焦作业</button>
|
||||
<button type="button" data-view="full">流程全景</button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="role-desc" id="roleDesc" style="padding:8px 20px 0;font-size:12px;color:var(--text-muted)"></p>
|
||||
|
||||
<header class="topbar">
|
||||
<h1 id="pageTitle">—</h1>
|
||||
<p id="pageSub">—</p>
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
<div class="concept-banner">
|
||||
<strong>兼容模式:</strong>同一套流程数据 · 角色默认只看<strong>本岗列表+操作区</strong> · 流程通过可折叠<strong>脊柱</strong>保持一体清晰 · 跟单可切换<strong>流程全景</strong>
|
||||
</div>
|
||||
|
||||
<!-- 聚焦视图:各角色主路径 -->
|
||||
<div class="focused-view" id="focusedView">
|
||||
<div class="panel">
|
||||
<div class="panel-head">
|
||||
<h2 id="listTitle">待办列表</h2>
|
||||
<span id="listHint" style="font-size:12px;color:var(--text-muted)"></span>
|
||||
</div>
|
||||
<div class="stat-row" id="statRow"></div>
|
||||
<table>
|
||||
<thead id="tableHead"></thead>
|
||||
<tbody id="tableBody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 选中行后:脊柱 + 作业区 -->
|
||||
<div class="detail-panel" id="detailPanel">
|
||||
<div id="detailSpine"></div>
|
||||
<div class="panel detail-grid">
|
||||
<div class="work-area">
|
||||
<h3 id="workTitle">—</h3>
|
||||
<div id="workForm"></div>
|
||||
<div style="margin-top:14px" id="workActions"></div>
|
||||
</div>
|
||||
<div class="context-card">
|
||||
<h4>流程上下文(只读,跨部门共享)</h4>
|
||||
<div id="contextLines"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 全景视图:仅跟单 -->
|
||||
<div class="full-process" id="fullProcess">
|
||||
<div class="panel" style="padding:16px">
|
||||
<h2 style="font-size:14px;margin-bottom:12px">业务办理 · 依赖全景(跟单/coordinator 专用)</h2>
|
||||
<div id="fullFlowDiagram"></div>
|
||||
<p style="font-size:12px;color:var(--text-muted);margin-top:12px">全景与职能列表是同一数据;实验员/财务日常使用「聚焦作业」即可。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toast" id="toast"></div>
|
||||
|
||||
<script>
|
||||
const ROLES = {
|
||||
finance: {
|
||||
label: '财务', menu: ['缴退费确认'], defaultMenu: 0,
|
||||
desc: '主路径:确认列表。流程脊柱默认折叠,只看金额与协议摘要。',
|
||||
pageTitle: '缴退费财务确认', pageSub: '仅看待确认单据 · 不关心实验主链操作',
|
||||
highlightNode: 'payment', dimNodes: ['qc', 'production'],
|
||||
spineDefaultCollapsed: true,
|
||||
canFullView: false,
|
||||
stats: [{ label: '待确认', count: 3 }, { label: '今日已确认', count: 8 }],
|
||||
columns: ['协议号', '客户', '金额', '类型', '实验进度', '操作'],
|
||||
list: [
|
||||
{ id: 1, protocol: 'XY-2025-0066', customer: '张明华', amount: '28,800', type: '缴费确认', milestone: '已接收', nodes: mkNodes({ payment: 'you', reception: 'done', qc: 'parallel', production: 'parallel' }) },
|
||||
{ id: 2, protocol: 'XY-2025-0077', customer: '李芳', amount: '18,000', type: '缴费确认', milestone: '待采集', nodes: mkNodes({ payment: 'you', collection: 'parallel' }) },
|
||||
{ id: 3, protocol: 'XY-2025-0044', customer: '陈静', amount: '2,000', type: '退费确认', milestone: '质检中', nodes: mkNodes({ payment: 'you', qc: 'parallel', production: 'parallel' }) }
|
||||
]
|
||||
},
|
||||
qc_recv: {
|
||||
label: '质检接收', menu: ['样本接收', '接收检查项'], defaultMenu: 0,
|
||||
desc: '主路径:接收列表。脊柱高亮「接收」,缴费为虚线独立支路。',
|
||||
pageTitle: '样本接收', pageSub: '待接收 / 已接收 · 提交后并行创建质检+生产工单',
|
||||
highlightNode: 'reception', dimNodes: ['payment'],
|
||||
spineDefaultCollapsed: false,
|
||||
canFullView: false,
|
||||
stats: [{ label: '待接收', count: 5 }, { label: '今日已接收', count: 12 }],
|
||||
columns: ['样本编码', '协议号', '客户', '预计到达', '里程碑', '操作'],
|
||||
list: [
|
||||
{ id: 1, sample: 'ZK202506120001', protocol: 'XY-2025-0066', customer: '张明华', eta: '今日 14:00', milestone: '待接收', nodes: mkNodes({ reception: 'you', payment: 'indep' }) },
|
||||
{ id: 2, sample: 'ZK202506110008', protocol: 'XY-2025-0077', customer: '李芳', eta: '明日 10:00', milestone: '待接收', nodes: mkNodes({ reception: 'you', collection: 'done', payment: 'indep' }) }
|
||||
]
|
||||
},
|
||||
qc_lab: {
|
||||
label: '质检实验', menu: ['我的质检任务', '质检工单'], defaultMenu: 0,
|
||||
desc: '主路径:我的任务。脊柱高亮「质检」,可看生产并行进度(只读)。',
|
||||
pageTitle: '我的质检任务', pageSub: '待执行 / 进行中 · 与生产工单并行',
|
||||
highlightNode: 'qc', dimNodes: ['payment'],
|
||||
spineDefaultCollapsed: false,
|
||||
canFullView: false,
|
||||
stats: [{ label: '待执行', count: 4 }, { label: '进行中', count: 2 }],
|
||||
columns: ['任务号', '样本编码', '检测项目', '工单状态', '生产(只读)', '操作'],
|
||||
list: [
|
||||
{ id: 1, task: 'RW20260612001', sample: 'ZK202506120001', item: '细胞活性', wo: '配置中', prod: '待配置', nodes: mkNodes({ qc: 'you', production: 'parallel', reception: 'done' }) },
|
||||
{ id: 2, task: 'RW20260612002', sample: 'XY202506100003', item: '无菌检测', wo: '进行中', prod: '进行中', nodes: mkNodes({ qc: 'you', production: 'parallel' }) }
|
||||
]
|
||||
},
|
||||
production: {
|
||||
label: '生产', menu: ['生产工单', '生产任务'], defaultMenu: 0,
|
||||
desc: '主路径:生产工单。脊柱高亮「生产」,质检进度只读。',
|
||||
pageTitle: '入库生产工单', pageSub: '待配置 / 进行中 · 与质检并行',
|
||||
highlightNode: 'production', dimNodes: ['payment'],
|
||||
spineDefaultCollapsed: false,
|
||||
canFullView: false,
|
||||
stats: [{ label: '待配置', count: 2 }, { label: '进行中', count: 3 }],
|
||||
columns: ['工单号', '样本编码', '协议号', '状态', '质检(只读)', '操作'],
|
||||
list: [
|
||||
{ id: 1, wo: 'SC202606110003', sample: 'ZK202506120001', protocol: 'XY-2025-0066', status: '待配置', qc: '配置中', nodes: mkNodes({ production: 'you', qc: 'parallel', reception: 'done' }) }
|
||||
]
|
||||
},
|
||||
coordinator: {
|
||||
label: '市场跟单', menu: ['协议列表', '业务办理'], defaultMenu: 1,
|
||||
desc: '可选聚焦列表或流程全景。日常跟单用列表+脊柱;卡点时切换全景。',
|
||||
pageTitle: '细胞存储 · 业务办理', pageSub: '进行中协议 · 可切换「聚焦 / 全景」',
|
||||
highlightNode: null, dimNodes: [],
|
||||
spineDefaultCollapsed: false,
|
||||
canFullView: true,
|
||||
stats: [{ label: '进行中', count: 23 }, { label: '卡点', count: 4 }],
|
||||
columns: ['协议号', '客户', '样本', '当前里程碑', '并行状态', '操作'],
|
||||
list: [
|
||||
{ id: 1, protocol: 'XY-2025-0066', customer: '张明华', sample: 'ZK…001', milestone: '接收完成', parallel: '质检+生产', nodes: mkNodes({ qc: 'parallel', production: 'parallel', reception: 'done', payment: 'indep' }) },
|
||||
{ id: 2, protocol: 'XY-2025-0088', customer: '王强', sample: 'XY…003', milestone: '质检完成', parallel: '生产进行中', nodes: mkNodes({ qc: 'done', production: 'you', reception: 'done' }) }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
const SPINE_STEPS = [
|
||||
{ id: 'protocol', name: '协议' },
|
||||
{ id: 'collection', name: '采集' },
|
||||
{ id: 'reception', name: '接收' },
|
||||
{ id: 'qc', name: '质检' },
|
||||
{ id: 'production', name: '生产' },
|
||||
{ id: 'release', name: '放行' },
|
||||
{ id: 'storage', name: '入库' }
|
||||
];
|
||||
const SPINE_INDEP = { id: 'payment', name: '缴费' };
|
||||
|
||||
function mkNodes(overrides) {
|
||||
const base = { protocol: 'done', collection: 'done', reception: 'done', qc: 'pending', production: 'pending', release: 'pending', storage: 'pending', payment: 'pending' };
|
||||
return { ...base, ...overrides };
|
||||
}
|
||||
|
||||
let currentRole = 'finance';
|
||||
let currentView = 'focused';
|
||||
let selectedRow = null;
|
||||
let spineCollapsed = true;
|
||||
|
||||
function renderRoleTabs() {
|
||||
document.getElementById('roleTabs').innerHTML = Object.entries(ROLES).map(([k, r]) =>
|
||||
`<button type="button" class="role-tab ${k === currentRole ? 'active' : ''}" onclick="setRole('${k}')">${r.label}</button>`
|
||||
).join('');
|
||||
}
|
||||
|
||||
function renderSidebar() {
|
||||
const r = ROLES[currentRole];
|
||||
document.getElementById('sidebar').innerHTML = `
|
||||
<div class="logo">中科兴皖<span> · 管理端</span></div>
|
||||
<div class="nav-sub">当前角色菜单(聚焦)</div>
|
||||
${r.menu.map((m, i) => `<a href="#" class="nav-item ${i === r.defaultMenu ? 'active' : ''}">${m}</a>`).join('')}
|
||||
${r.canFullView ? '<a href="#" class="nav-item" onclick="setView(\'full\');return false">业务办理全景</a>' : ''}
|
||||
`;
|
||||
}
|
||||
|
||||
function setRole(role) {
|
||||
currentRole = role;
|
||||
selectedRow = null;
|
||||
spineCollapsed = ROLES[role].spineDefaultCollapsed;
|
||||
currentView = 'focused';
|
||||
renderAll();
|
||||
}
|
||||
|
||||
function setView(v) {
|
||||
currentView = v;
|
||||
document.querySelectorAll('.view-toggle button').forEach(b => b.classList.toggle('active', b.dataset.view === v));
|
||||
document.getElementById('focusedView').classList.toggle('hidden', v === 'full');
|
||||
document.getElementById('fullProcess').classList.toggle('show', v === 'full');
|
||||
}
|
||||
|
||||
function renderSpine(row, roleKey, opts = {}) {
|
||||
const r = ROLES[roleKey];
|
||||
const nodes = row.nodes || mkNodes({});
|
||||
const collapsed = opts.forceExpand ? false : spineCollapsed;
|
||||
const hl = r.highlightNode;
|
||||
|
||||
const mainSteps = SPINE_STEPS.map(s => {
|
||||
const st = nodes[s.id] || 'pending';
|
||||
let cls = st === 'done' ? 'done' : st === 'you' ? 'you' : st === 'parallel' ? 'parallel' : '';
|
||||
if (r.dimNodes && r.dimNodes.includes(s.id)) cls += ' dim';
|
||||
if (hl === s.id && st !== 'you') cls = 'you';
|
||||
const icon = st === 'done' ? '✓' : st === 'you' ? '●' : st === 'parallel' ? '…' : '○';
|
||||
return `<div class="sp-node ${cls}"><div class="sp-dot">${icon}</div><div class="sp-name">${s.name}</div></div>`;
|
||||
}).join('');
|
||||
|
||||
const paySt = nodes.payment || 'pending';
|
||||
const payCls = paySt === 'indep' ? 'indep' : paySt === 'you' ? 'you' : paySt === 'done' ? 'done' : '';
|
||||
const indep = `<div class="sp-node ${payCls}"><div class="sp-dot">${paySt === 'done' ? '✓' : paySt === 'you' ? '●' : '○'}</div><div class="sp-name">缴费</div></div>`;
|
||||
|
||||
const title = row.protocol || row.sample || '—';
|
||||
const sub = row.customer ? `${row.customer} · ${row.milestone || row.type || ''}` : '';
|
||||
|
||||
return `
|
||||
<div class="spine-wrap">
|
||||
<div class="spine-header" onclick="toggleSpine()">
|
||||
<div>
|
||||
<h3>流程脊柱 · ${title}</h3>
|
||||
<div class="meta">${sub} ${hl ? '· 高亮你的环节' : '· 跟单视图'}</div>
|
||||
</div>
|
||||
<span class="spine-toggle">${collapsed ? '展开流程 ▼' : '收起 ▲'}</span>
|
||||
</div>
|
||||
<div class="spine-body ${collapsed ? 'collapsed' : ''}">
|
||||
<div class="spine-compact">${mainSteps}</div>
|
||||
<div class="spine-side"><span>独立支路:</span>${indep}<span>— 不阻塞实验主链</span></div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
function toggleSpine() {
|
||||
spineCollapsed = !spineCollapsed;
|
||||
if (selectedRow) document.getElementById('detailSpine').innerHTML = renderSpine(selectedRow, currentRole);
|
||||
}
|
||||
|
||||
function renderList(roleKey) {
|
||||
const r = ROLES[roleKey];
|
||||
document.getElementById('pageTitle').textContent = r.pageTitle;
|
||||
document.getElementById('pageSub').textContent = r.pageSub;
|
||||
document.getElementById('roleDesc').textContent = r.desc;
|
||||
document.getElementById('listTitle').textContent = r.pageTitle;
|
||||
document.getElementById('listHint').textContent = r.canFullView ? '可右上角切换流程全景' : '本岗聚焦列表';
|
||||
|
||||
document.getElementById('viewToggle').style.display = r.canFullView ? 'flex' : 'none';
|
||||
|
||||
document.getElementById('statRow').innerHTML = r.stats.map(s =>
|
||||
`<div class="stat-pill">${s.label}<em>${s.count}</em></div>`
|
||||
).join('');
|
||||
|
||||
document.getElementById('tableHead').innerHTML = `<tr>${r.columns.map(c => `<th>${c}</th>`).join('')}</tr>`;
|
||||
|
||||
document.getElementById('tableBody').innerHTML = r.list.map((row, i) => {
|
||||
let cells = '';
|
||||
if (roleKey === 'finance') {
|
||||
cells = `<td>${row.protocol}</td><td>${row.customer}</td><td>${row.amount}</td><td>${row.type}</td><td><span class="tag info">${row.milestone}</span></td><td><button class="btn btn-primary btn-sm" onclick="event.stopPropagation();selectRow(${i})">确认</button></td>`;
|
||||
} else if (roleKey === 'qc_recv') {
|
||||
cells = `<td>${row.sample}</td><td>${row.protocol}</td><td>${row.customer}</td><td>${row.eta}</td><td><span class="tag warning">${row.milestone}</span></td><td><button class="btn btn-primary" onclick="event.stopPropagation();selectRow(${i})">接收</button></td>`;
|
||||
} else if (roleKey === 'qc_lab') {
|
||||
cells = `<td>${row.task}</td><td>${row.sample}</td><td>${row.item}</td><td>${row.wo}</td><td><span class="tag muted">${row.prod}</span></td><td><button class="btn btn-primary" onclick="event.stopPropagation();selectRow(${i})">执行</button></td>`;
|
||||
} else if (roleKey === 'production') {
|
||||
cells = `<td>${row.wo}</td><td>${row.sample}</td><td>${row.protocol}</td><td>${row.status}</td><td><span class="tag muted">${row.qc}</span></td><td><button class="btn btn-primary" onclick="event.stopPropagation();selectRow(${i})">配置</button></td>`;
|
||||
} else {
|
||||
cells = `<td>${row.protocol}</td><td>${row.customer}</td><td>${row.sample}</td><td>${row.milestone}</td><td>${row.parallel}</td><td><button class="btn" onclick="event.stopPropagation();selectRow(${i})">跟单</button></td>`;
|
||||
}
|
||||
return `<tr class="${selectedRow === row ? 'selected' : ''}" onclick="selectRow(${i})">${cells}</tr>`;
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function selectRow(index) {
|
||||
const r = ROLES[currentRole];
|
||||
selectedRow = r.list[index];
|
||||
document.getElementById('detailPanel').classList.add('open');
|
||||
document.getElementById('detailSpine').innerHTML = renderSpine(selectedRow, currentRole);
|
||||
|
||||
const forms = {
|
||||
finance: `
|
||||
<div class="form-row"><label>到账金额</label><input value="${selectedRow.amount}" /></div>
|
||||
<div class="form-row"><label>到账日期</label><input type="date" value="2026-06-12" /></div>
|
||||
<div class="form-row"><label>财务备注</label><input placeholder="可选" /></div>`,
|
||||
qc_recv: `
|
||||
<div class="form-row"><label>接收时间</label><input type="datetime-local" /></div>
|
||||
<div class="form-row"><label>接收温度 ℃</label><input value="4.2" /></div>
|
||||
<div class="form-row"><label>接收结论</label><select><option>接收</option><option>拒收</option></select></div>`,
|
||||
qc_lab: `
|
||||
<div class="form-row"><label>检测项目</label><input value="${selectedRow.item}" readonly /></div>
|
||||
<div class="form-row"><label>采集值 / 结果</label><input placeholder="实验录入" /></div>`,
|
||||
production: `
|
||||
<div class="form-row"><label>工艺路线</label><select><option>入库标准工艺 v2</option></select></div>
|
||||
<div class="form-row"><label>生产任务</label><input placeholder="创建任务…" /></div>`,
|
||||
coordinator: `
|
||||
<div class="form-row"><label>跟单备注</label><input placeholder="记录协调事项" /></div>
|
||||
<p style="font-size:12px;color:var(--text-muted)">跟单在此查看脊柱;需要时可切「流程全景」。</p>`
|
||||
};
|
||||
|
||||
const titles = { finance: '财务确认', qc_recv: '样本接收登记', qc_lab: '质检任务执行', production: '生产工单配置', coordinator: '跟单备注' };
|
||||
document.getElementById('workTitle').textContent = titles[currentRole];
|
||||
document.getElementById('workForm').innerHTML = forms[currentRole];
|
||||
document.getElementById('workActions').innerHTML = `<button class="btn btn-primary" onclick="toast('已提交 · 流程状态已同步更新')">提交</button><button class="btn" onclick="closeDetail()">关闭</button>`;
|
||||
|
||||
document.getElementById('contextLines').innerHTML = `
|
||||
<div class="ctx-line"><span>协议:</span>${selectedRow.protocol || '—'}</div>
|
||||
<div class="ctx-line"><span>客户:</span>${selectedRow.customer || '—'}</div>
|
||||
<div class="ctx-line"><span>样本:</span>${selectedRow.sample || '—'}</div>
|
||||
<div class="ctx-line"><span>实验里程碑:</span>${selectedRow.milestone || selectedRow.type || '—'}</div>
|
||||
<div class="ctx-line" style="margin-top:10px;font-size:11px;color:var(--text-muted)">↑ 其他部门可见同一上下文,无需进同一操作页</div>`;
|
||||
|
||||
renderList(currentRole);
|
||||
}
|
||||
|
||||
function closeDetail() {
|
||||
selectedRow = null;
|
||||
document.getElementById('detailPanel').classList.remove('open');
|
||||
renderList(currentRole);
|
||||
}
|
||||
|
||||
function renderFullProcess() {
|
||||
document.getElementById('fullFlowDiagram').innerHTML = `
|
||||
<div style="font-size:12px;color:var(--text-muted);margin-bottom:10px">协议 → 采集 → 接收 → (质检 ∥ 生产) → 放行 → 入库 · 缴费独立</div>
|
||||
<div class="fork-row">
|
||||
<div class="flow-card done">协议✓</div><span>→</span>
|
||||
<div class="flow-card done">采集✓</div><span>→</span>
|
||||
<div class="flow-card done">接收✓</div><span>→</span>
|
||||
<div class="flow-card active">质检…</div>
|
||||
<div class="flow-card active">生产…</div><span>→</span>
|
||||
<div class="flow-card">放行</div><span>→</span>
|
||||
<div class="flow-card">入库</div>
|
||||
</div>
|
||||
<div style="margin-top:12px;padding:10px;border:1px dashed var(--border);border-radius:8px;font-size:12px">缴费 ○ 独立支路(虚线关联,不阻塞主链)</div>`;
|
||||
}
|
||||
|
||||
function renderAll() {
|
||||
renderRoleTabs();
|
||||
renderSidebar();
|
||||
renderList(currentRole);
|
||||
setView(currentView);
|
||||
renderFullProcess();
|
||||
if (selectedRow) document.getElementById('detailSpine').innerHTML = renderSpine(selectedRow, currentRole);
|
||||
}
|
||||
|
||||
document.getElementById('viewToggle').addEventListener('click', e => {
|
||||
const btn = e.target.closest('button[data-view]');
|
||||
if (btn) setView(btn.dataset.view);
|
||||
});
|
||||
|
||||
function toast(msg) {
|
||||
const t = document.getElementById('toast'); t.textContent = msg; t.classList.add('show');
|
||||
setTimeout(() => t.classList.remove('show'), 2500);
|
||||
}
|
||||
|
||||
renderAll();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,511 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>中科兴皖 · 业务办理(并行流程原型 v2)</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||||
<style>
|
||||
:root {
|
||||
--primary: #10b981; --primary-dark: #059669; --primary-bg: #ecfdf5;
|
||||
--text: #1e293b; --text-muted: #64748b; --border: #d9e8e2;
|
||||
--bg-page: #fefefe; --surface: #fff; --table-head: #f8fafc;
|
||||
--row-hover: #f1f5f9; --shadow: 0 1px 3px rgba(0,0,0,0.05);
|
||||
--radius: 10px; --warn: #d97706; --warn-bg: #fffbeb;
|
||||
--info: #3b82f6; --info-bg: #eff6ff;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body { font-family: Inter, sans-serif; font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg-page); }
|
||||
.layout { display: flex; min-height: 100vh; }
|
||||
.sidebar { width: 220px; background: var(--surface); border-right: 1px solid var(--border); padding: 24px 16px; flex-shrink: 0; }
|
||||
.logo { font-size: 16px; font-weight: 700; padding: 0 12px 20px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
|
||||
.logo span { color: var(--primary); }
|
||||
.nav-item { display: block; padding: 8px 12px; color: var(--text-muted); text-decoration: none; border-radius: 8px; font-size: 13px; }
|
||||
.nav-item.active { background: var(--primary-bg); color: var(--primary-dark); font-weight: 600; }
|
||||
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
|
||||
.topbar { height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--border); }
|
||||
.topbar h1 { font-size: 15px; font-weight: 600; }
|
||||
.topbar-meta { font-size: 12px; color: var(--text-muted); }
|
||||
.page { flex: 1; display: flex; min-height: 0; }
|
||||
|
||||
.case-list { width: 300px; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; }
|
||||
.case-list-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
|
||||
.case-list-head h2 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
|
||||
.search-input { width: 100%; height: 34px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; font-size: 12px; }
|
||||
.case-items { flex: 1; overflow-y: auto; }
|
||||
.case-card { padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
|
||||
.case-card:hover { background: var(--row-hover); }
|
||||
.case-card.active { background: var(--primary-bg); border-left: 3px solid var(--primary); padding-left: 13px; }
|
||||
.case-protocol { font-weight: 600; font-size: 13px; }
|
||||
.case-customer { font-size: 12px; color: var(--text-muted); margin: 4px 0 8px; }
|
||||
.active-tags { display: flex; flex-wrap: wrap; gap: 4px; }
|
||||
.tag { font-size: 11px; padding: 1px 6px; border-radius: 5px; font-weight: 500; }
|
||||
.tag.success { background: var(--primary-bg); color: var(--primary-dark); }
|
||||
.tag.warning { background: var(--warn-bg); color: var(--warn); }
|
||||
.tag.info { background: var(--info-bg); color: var(--info); }
|
||||
.tag.muted { background: var(--table-head); color: var(--text-muted); }
|
||||
|
||||
.console { flex: 1; overflow-y: auto; padding: 12px 16px 16px; }
|
||||
.proto-tip {
|
||||
padding: 10px 14px; background: linear-gradient(90deg, var(--primary-bg), #fff);
|
||||
border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; color: var(--text-muted); margin-bottom: 12px;
|
||||
}
|
||||
.proto-tip strong { color: var(--primary-dark); }
|
||||
|
||||
.legend { display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
|
||||
.legend span { display: flex; align-items: center; gap: 5px; }
|
||||
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
|
||||
.legend .solid { background: var(--primary); }
|
||||
.legend .dash { border: 2px dashed var(--text-muted); background: transparent; height: 0; width: 16px; }
|
||||
.legend .fork { background: var(--warn); }
|
||||
|
||||
.summary-bar {
|
||||
display: flex; flex-wrap: wrap; gap: 16px 28px; padding: 12px 16px;
|
||||
background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px;
|
||||
}
|
||||
.summary-item dt { font-size: 11px; color: var(--text-muted); }
|
||||
.summary-item dd { font-size: 14px; font-weight: 600; }
|
||||
|
||||
/* ── Flow graph (DAG, not linear) ── */
|
||||
.flow-panel {
|
||||
background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
|
||||
padding: 16px; margin-bottom: 12px; overflow-x: auto;
|
||||
}
|
||||
.flow-panel h3 { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 14px; }
|
||||
|
||||
.flow-main { display: flex; align-items: center; gap: 0; min-width: max-content; padding-bottom: 8px; }
|
||||
.flow-arrow { color: var(--text-muted); font-size: 18px; padding: 0 4px; flex-shrink: 0; user-select: none; }
|
||||
|
||||
.flow-node {
|
||||
width: 88px; text-align: center; cursor: pointer; flex-shrink: 0;
|
||||
padding: 4px; border-radius: 8px; transition: background 0.12s;
|
||||
}
|
||||
.flow-node:hover { background: var(--row-hover); }
|
||||
.flow-node.selected { background: var(--primary-bg); outline: 2px solid var(--primary); outline-offset: 1px; }
|
||||
.flow-node.independent { opacity: 0.95; }
|
||||
.node-box {
|
||||
width: 72px; height: 52px; margin: 0 auto 4px; border-radius: 8px; border: 2px solid var(--border);
|
||||
background: var(--surface); display: flex; align-items: center; justify-content: center;
|
||||
font-size: 11px; font-weight: 600; line-height: 1.2; padding: 4px; position: relative;
|
||||
}
|
||||
.flow-node.done .node-box { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-dark); }
|
||||
.flow-node.active .node-box { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 0 0 3px rgba(16,185,129,0.25); }
|
||||
.flow-node.ready .node-box { border-color: var(--warn); background: var(--warn-bg); color: var(--warn); }
|
||||
.flow-node.locked .node-box { opacity: 0.45; cursor: not-allowed; }
|
||||
.flow-node.independent .node-box { border-style: dashed; }
|
||||
.node-dept { font-size: 9px; color: var(--text-muted); }
|
||||
.node-status { font-size: 10px; margin-top: 2px; }
|
||||
.flow-node.done .node-status { color: var(--primary-dark); }
|
||||
.flow-node.active .node-status, .flow-node.ready .node-status { color: var(--warn); font-weight: 600; }
|
||||
|
||||
/* Fork: reception → qc + production */
|
||||
.flow-fork { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
|
||||
.fork-bar { width: 2px; height: 12px; background: var(--border); }
|
||||
.fork-row { display: flex; gap: 24px; align-items: center; position: relative; }
|
||||
.fork-row::before {
|
||||
content: ''; position: absolute; top: 26px; left: 44px; right: 44px; height: 2px; background: var(--border);
|
||||
}
|
||||
.fork-label {
|
||||
font-size: 10px; color: var(--warn); font-weight: 600; background: var(--warn-bg);
|
||||
padding: 2px 8px; border-radius: 4px; margin-bottom: 4px;
|
||||
}
|
||||
.join-wrap { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
|
||||
.join-label { font-size: 10px; color: var(--text-muted); margin: 4px 0; }
|
||||
|
||||
/* Independent track: payment */
|
||||
.flow-side {
|
||||
margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border);
|
||||
display: flex; align-items: center; gap: 8px; min-width: max-content;
|
||||
}
|
||||
.side-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
|
||||
|
||||
.workspace {
|
||||
background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
|
||||
min-height: 320px; display: flex; flex-direction: column;
|
||||
}
|
||||
.workspace-head {
|
||||
padding: 12px 16px; border-bottom: 1px solid var(--border);
|
||||
display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
|
||||
}
|
||||
.workspace-head h3 { font-size: 15px; font-weight: 600; }
|
||||
.node-badge { font-size: 11px; background: var(--primary-bg); color: var(--primary-dark); padding: 2px 8px; border-radius: 6px; font-weight: 500; }
|
||||
.dep-hint { font-size: 12px; color: var(--text-muted); padding: 8px 16px; background: var(--table-head); border-bottom: 1px solid var(--border); }
|
||||
.dep-hint strong { color: var(--primary-dark); }
|
||||
.workspace-body { padding: 16px; flex: 1; }
|
||||
.workspace-actions { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
|
||||
.btn {
|
||||
height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500;
|
||||
border: 1px solid var(--border); background: var(--surface); cursor: pointer;
|
||||
}
|
||||
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
|
||||
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
|
||||
|
||||
.readonly-panel { background: var(--table-head); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
|
||||
.readonly-panel h4 { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
|
||||
.kv-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
|
||||
.kv-row dt { font-size: 11px; color: var(--text-muted); }
|
||||
.kv-row dd { font-size: 13px; font-weight: 500; }
|
||||
.parallel-note {
|
||||
margin-top: 12px; padding: 10px 12px; background: var(--info-bg); border: 1px solid rgba(59,130,246,0.2);
|
||||
border-radius: 8px; font-size: 12px; color: #1d4ed8;
|
||||
}
|
||||
.locked-msg { text-align: center; padding: 40px 20px; color: var(--text-muted); }
|
||||
.toast {
|
||||
position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
|
||||
background: var(--text); color: #fff; padding: 12px 20px; border-radius: var(--radius);
|
||||
font-size: 13px; opacity: 0; transition: all 0.3s; z-index: 99; max-width: 92vw; text-align: center;
|
||||
}
|
||||
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.page { flex-direction: column; }
|
||||
.case-list { width: 100%; max-height: 200px; }
|
||||
.kv-row { grid-template-columns: 1fr 1fr; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layout">
|
||||
<aside class="sidebar">
|
||||
<div class="logo">中科兴皖<span> · 管理端</span></div>
|
||||
<a href="#" class="nav-item active">细胞存储 · 业务办理</a>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<header class="topbar">
|
||||
<h1>细胞存储 · 业务办理</h1>
|
||||
<span class="topbar-meta">v2 · 并行/独立依赖,非简单串行</span>
|
||||
</header>
|
||||
<div class="page">
|
||||
<aside class="case-list">
|
||||
<div class="case-list-head">
|
||||
<h2>进行中业务</h2>
|
||||
<input class="search-input" id="caseSearch" placeholder="协议号 / 客户 / 样本" />
|
||||
</div>
|
||||
<div class="case-items" id="caseList"></div>
|
||||
</aside>
|
||||
<section class="console">
|
||||
<div class="proto-tip">
|
||||
<strong>v2 修正:</strong>流程不是 8 步串行。缴费<strong>不阻塞</strong>接收/质检/生产;接收后<strong>质检与生产并行</strong>;放行需<strong>两者都完成</strong>(汇合门禁)。点击节点查看下方工作区。
|
||||
</div>
|
||||
<div class="legend">
|
||||
<span><i class="solid"></i> 主链 / 已完成</span>
|
||||
<span><i class="fork"></i> 并行进行中</span>
|
||||
<span><i class="dash"></i> 独立支路(不阻塞实验链)</span>
|
||||
<span>汇合 ⬦ = 需全部前置完成才解锁</span>
|
||||
</div>
|
||||
<div class="summary-bar" id="summaryBar"></div>
|
||||
<div class="flow-panel">
|
||||
<h3>里程碑依赖图(每个节点独立状态,只按 dependsOn 解锁)</h3>
|
||||
<div id="flowGraph"></div>
|
||||
</div>
|
||||
<div class="workspace">
|
||||
<div class="workspace-head">
|
||||
<h3><span id="nodeTitle">—</span> <span class="node-badge" id="nodeBadge">—</span></h3>
|
||||
<div class="workspace-actions" id="nodeActions"></div>
|
||||
</div>
|
||||
<div class="dep-hint" id="depHint"></div>
|
||||
<div class="workspace-body" id="nodeBody"></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toast" id="toast"></div>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* 节点定义:dependsOn = 硬依赖(全部完成才解锁)
|
||||
* independent = true → 不参与阻塞其他节点(如缴费)
|
||||
* parallelGroup = 仅 UI 分组,逻辑上各自独立状态
|
||||
*/
|
||||
const NODES = {
|
||||
protocol: { name: '协议单', dept: '市场', dependsOn: [], embed: 'ProtocolAuditTab' },
|
||||
collection: { name: '样本采集', dept: '采集岗', dependsOn: ['protocol'], embed: 'SampleCollectionInfoTab' },
|
||||
reception: { name: '样本接收', dept: '质检接收', dependsOn: ['collection'], embed: 'sample-reception' },
|
||||
qc: { name: '质检工单', dept: '质检部', dependsOn: ['reception'], parallelGroup: 'lab', embed: 'qc-work-order' },
|
||||
production: { name: '生产工单', dept: '生产部', dependsOn: ['reception'], parallelGroup: 'lab', embed: 'production-work-order' },
|
||||
release: { name: '入库放行', dept: 'QA', dependsOn: ['qc', 'production'], joinGate: true, embed: 'storage-release-review' },
|
||||
storage: { name: '样本入库', dept: '库管', dependsOn: ['release'], embed: 'StorageEntryInfoTab' },
|
||||
payment: { name: '缴费', dept: '市场+财务', dependsOn: [], independent: true, embed: 'PaymentInfoTab' }
|
||||
};
|
||||
|
||||
const STATUS_LABEL = {
|
||||
locked: '未解锁', ready: '可办理', active: '进行中', done: '已完成', skipped: '—'
|
||||
};
|
||||
|
||||
const CASES = [
|
||||
{
|
||||
id: 'c1', protocol: 'XY-2025-0066', customer: '张明华', sample: 'ZK202506120001', type: '脐带血',
|
||||
// 已接收:质检、生产并行进行中;缴费仍待办但不阻塞
|
||||
nodes: {
|
||||
protocol: 'done', collection: 'done', reception: 'done',
|
||||
qc: 'active', production: 'ready',
|
||||
release: 'locked', storage: 'locked', payment: 'ready'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'c2', protocol: 'XY-2025-0077', customer: '李芳', sample: '—', type: '胎盘',
|
||||
nodes: {
|
||||
protocol: 'done', collection: 'ready', reception: 'locked',
|
||||
qc: 'locked', production: 'locked', release: 'locked', storage: 'locked',
|
||||
payment: 'active' // 财务在催缴费,但不影响后续实验链解锁逻辑
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'c3', protocol: 'XY-2025-0088', customer: '王强', sample: 'XY202506100003', type: '脐带血',
|
||||
nodes: {
|
||||
protocol: 'done', collection: 'done', reception: 'done',
|
||||
qc: 'done', production: 'active', // 质检已完成,生产还在做
|
||||
release: 'locked', storage: 'locked', payment: 'done'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'c4', protocol: 'XY-2025-0055', customer: '赵敏', sample: 'ZK202506090005', type: '脐带血',
|
||||
nodes: {
|
||||
protocol: 'done', collection: 'done', reception: 'done',
|
||||
qc: 'done', production: 'done', release: 'ready', storage: 'locked',
|
||||
payment: 'done'
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
let activeCaseId = 'c1';
|
||||
let selectedNode = 'qc';
|
||||
|
||||
function getCase(id) { return CASES.find(c => c.id === id) || CASES[0]; }
|
||||
|
||||
/** 计算节点是否解锁(不含 independent 对别人的影响) */
|
||||
function isUnlocked(caseData, nodeId) {
|
||||
const node = NODES[nodeId];
|
||||
return (node.dependsOn || []).every(dep => caseData.nodes[dep] === 'done');
|
||||
}
|
||||
|
||||
function getNodeUiStatus(caseData, nodeId) {
|
||||
const raw = caseData.nodes[nodeId];
|
||||
if (raw === 'done') return 'done';
|
||||
if (!isUnlocked(caseData, nodeId)) return 'locked';
|
||||
if (raw === 'active') return 'active';
|
||||
return 'ready'; // ready = 可办理
|
||||
}
|
||||
|
||||
function getActiveTags(caseData) {
|
||||
return Object.entries(caseData.nodes)
|
||||
.filter(([, st]) => st === 'active' || st === 'ready')
|
||||
.filter(([id]) => getNodeUiStatus(caseData, id) !== 'locked')
|
||||
.map(([id]) => NODES[id].name);
|
||||
}
|
||||
|
||||
function renderCaseList() {
|
||||
const q = (document.getElementById('caseSearch').value || '').toLowerCase();
|
||||
document.getElementById('caseList').innerHTML = CASES.filter(c =>
|
||||
!q || [c.protocol, c.customer, c.sample].join(' ').toLowerCase().includes(q)
|
||||
).map(c => {
|
||||
const tags = getActiveTags(c);
|
||||
return `
|
||||
<div class="case-card ${c.id === activeCaseId ? 'active' : ''}" onclick="selectCase('${c.id}')">
|
||||
<div class="case-protocol">${c.protocol}</div>
|
||||
<div class="case-customer">${c.customer} · ${c.type}</div>
|
||||
<div class="active-tags">
|
||||
${tags.length ? tags.map(t => `<span class="tag warning">${t}</span>`).join('') : '<span class="tag muted">暂无待办节点</span>'}
|
||||
${c.nodes.payment !== 'done' ? '<span class="tag info">缴费未完成</span>' : ''}
|
||||
</div>
|
||||
</div>`;
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function renderSummary(c) {
|
||||
const tags = getActiveTags(c);
|
||||
document.getElementById('summaryBar').innerHTML = `
|
||||
<dl class="summary-item"><dt>协议号</dt><dd>${c.protocol}</dd></dl>
|
||||
<dl class="summary-item"><dt>客户</dt><dd>${c.customer}</dd></dl>
|
||||
<dl class="summary-item"><dt>样本</dt><dd>${c.sample}</dd></dl>
|
||||
<dl class="summary-item"><dt>并行进行中</dt><dd style="color:var(--warn)">${tags.join('、') || '—'}</dd></dl>
|
||||
`;
|
||||
}
|
||||
|
||||
function nodeHtml(id, caseData) {
|
||||
const n = NODES[id];
|
||||
const ui = getNodeUiStatus(caseData, id);
|
||||
const sel = id === selectedNode ? ' selected' : '';
|
||||
const indep = n.independent ? ' independent' : '';
|
||||
const st = caseData.nodes[id];
|
||||
const statusText = ui === 'locked' ? '未解锁' : STATUS_LABEL[st] || STATUS_LABEL[ui];
|
||||
return `
|
||||
<div class="flow-node ${ui}${indep}${sel}" onclick="selectNode('${id}')" title="${n.dept}">
|
||||
<div class="node-box">${n.name}</div>
|
||||
<div class="node-dept">${n.dept}</div>
|
||||
<div class="node-status">${statusText}</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
function renderFlowGraph(c) {
|
||||
document.getElementById('flowGraph').innerHTML = `
|
||||
<div class="flow-main">
|
||||
${nodeHtml('protocol', c)}
|
||||
<span class="flow-arrow">→</span>
|
||||
${nodeHtml('collection', c)}
|
||||
<span class="flow-arrow">→</span>
|
||||
${nodeHtml('reception', c)}
|
||||
<span class="flow-arrow">→</span>
|
||||
<div class="flow-fork">
|
||||
<span class="fork-label">接收后并行创建</span>
|
||||
<div class="fork-row">
|
||||
${nodeHtml('qc', c)}
|
||||
${nodeHtml('production', c)}
|
||||
</div>
|
||||
</div>
|
||||
<span class="flow-arrow">→</span>
|
||||
<div class="join-wrap">
|
||||
<span class="join-label">⬦ 质检+生产均完成</span>
|
||||
${nodeHtml('release', c)}
|
||||
</div>
|
||||
<span class="flow-arrow">→</span>
|
||||
${nodeHtml('storage', c)}
|
||||
</div>
|
||||
<div class="flow-side">
|
||||
<span class="side-label">独立支路(不阻塞实验主链):</span>
|
||||
${nodeHtml('payment', c)}
|
||||
<span style="font-size:11px;color:var(--text-muted)">— 未缴费仍可接收、质检、生产;储存证/合同等另按业务规则控制</span>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
function getDepHint(id, c) {
|
||||
const n = NODES[id];
|
||||
if (n.independent) return '独立节点:与实验主链无阻塞关系,可随时办理。';
|
||||
if (!isUnlocked(c, id)) {
|
||||
const pending = (n.dependsOn || []).filter(d => c.nodes[d] !== 'done');
|
||||
return `未解锁:需先完成 ${pending.map(d => '「' + NODES[d].name + '」').join(n.joinGate ? ' 且 ' : '、')}`;
|
||||
}
|
||||
if (n.parallelGroup === 'lab') return '并行节点:与「' + (id === 'qc' ? '生产工单' : '质检工单') + '」同时进行,互不等对方完成。';
|
||||
if (n.joinGate) return '汇合门禁:质检工单与生产工单均完成后,方可审核放行。';
|
||||
return '已解锁,可按权限办理。';
|
||||
}
|
||||
|
||||
function renderNode(c, id) {
|
||||
const n = NODES[id];
|
||||
const ui = getNodeUiStatus(c, id);
|
||||
document.getElementById('nodeTitle').textContent = n.name;
|
||||
document.getElementById('nodeBadge').textContent = n.dept + ' · ' + n.embed;
|
||||
document.getElementById('depHint').innerHTML = getDepHint(id, c);
|
||||
|
||||
if (ui === 'locked') {
|
||||
document.getElementById('nodeActions').innerHTML = '';
|
||||
document.getElementById('nodeBody').innerHTML = `
|
||||
<div class="locked-msg">
|
||||
<p><strong>🔒 此节点尚未解锁</strong></p>
|
||||
<p style="margin-top:8px;font-size:13px">${getDepHint(id, c)}</p>
|
||||
</div>`;
|
||||
return;
|
||||
}
|
||||
|
||||
const st = c.nodes[id];
|
||||
const isActive = st === 'active' || st === 'ready';
|
||||
document.getElementById('nodeActions').innerHTML = getActions(id, isActive);
|
||||
document.getElementById('nodeBody').innerHTML = getBody(c, id, isActive);
|
||||
}
|
||||
|
||||
function getActions(id, canEdit) {
|
||||
const btns = {
|
||||
protocol: canEdit ? '<button class="btn btn-primary btn-sm" onclick="completeNode(\'protocol\')">提交审核</button>' : '<button class="btn btn-sm">查看</button>',
|
||||
collection: canEdit ? '<button class="btn btn-primary btn-sm" onclick="completeNode(\'collection\')">确认采集</button>' : '<button class="btn btn-sm">查看</button>',
|
||||
reception: canEdit ? '<button class="btn btn-primary btn-sm" onclick="completeReception()">提交接收</button>' : '<button class="btn btn-sm">查看</button>',
|
||||
qc: canEdit ? '<button class="btn btn-primary btn-sm" onclick="toast(\'配置检测\')">配置检测</button><button class="btn btn-sm" onclick="completeNode(\'qc\')">标记完成</button>' : '<button class="btn btn-sm">查看报告</button>',
|
||||
production: canEdit ? '<button class="btn btn-primary btn-sm" onclick="toast(\'创建生产任务\')">创建任务</button><button class="btn btn-sm" onclick="completeNode(\'production\')">标记完成</button>' : '<button class="btn btn-sm">查看</button>',
|
||||
release: canEdit ? '<button class="btn btn-primary btn-sm" onclick="completeNode(\'release\')">审核通过</button>' : '<button class="btn btn-sm">查看</button>',
|
||||
storage: canEdit ? '<button class="btn btn-primary btn-sm" onclick="completeNode(\'storage\')">确认入库</button>' : '<button class="btn btn-sm">查看</button>',
|
||||
payment: canEdit ? '<button class="btn btn-primary btn-sm" onclick="completeNode(\'payment\')">提交/确认缴费</button>' : '<button class="btn btn-sm">查看</button>'
|
||||
};
|
||||
return btns[id] || '';
|
||||
}
|
||||
|
||||
function getBody(c, id, canEdit) {
|
||||
if (id === 'reception' && canEdit) {
|
||||
return `<div class="readonly-panel"><h4>接收登记(不依赖缴费状态)</h4>
|
||||
<p style="font-size:13px;color:var(--text-muted)">即使缴费未完成,只要采集完成即可接收。提交后<strong>同时</strong>创建质检工单 + 生产工单。</p></div>
|
||||
<div class="parallel-note">⚡ 提交接收 → 后端同一事务创建 ZJ 质检工单 与 SC 生产工单(与现有实现一致)</div>`;
|
||||
}
|
||||
if (id === 'qc' || id === 'production') {
|
||||
const other = id === 'qc' ? 'production' : 'qc';
|
||||
const otherSt = c.nodes[other];
|
||||
return `<div class="readonly-panel"><h4>${NODES[id].name}</h4>
|
||||
<dl class="kv-row">
|
||||
<div><dt>本节点</dt><dd>${STATUS_LABEL[c.nodes[id]]}</dd></div>
|
||||
<div><dt>并行节点「${NODES[other].name}」</dt><dd>${STATUS_LABEL[otherSt]}(不阻塞本节点)</dd></div>
|
||||
</dl></div>
|
||||
<div class="parallel-note">两路可不同人、不同时间推进;放行环节才要求两者都 done。</div>`;
|
||||
}
|
||||
if (id === 'release') {
|
||||
return `<div class="readonly-panel"><h4>汇合门禁</h4>
|
||||
<dl class="kv-row">
|
||||
<div><dt>质检工单</dt><dd>${c.nodes.qc === 'done' ? '✓ 已完成' : '✗ 未完成'}</dd></div>
|
||||
<div><dt>生产工单</dt><dd>${c.nodes.production === 'done' ? '✓ 已完成' : '✗ 未完成'}</dd></div>
|
||||
<div><dt>缴费</dt><dd>${c.nodes.payment === 'done' ? '已缴费' : '未缴费(不阻塞放行)'}</dd></div>
|
||||
</dl></div>`;
|
||||
}
|
||||
if (id === 'payment') {
|
||||
return `<div class="readonly-panel"><h4>独立支路 · 缴费</h4>
|
||||
<p style="font-size:13px">与接收/质检/生产<strong>无 dependsOn 关系</strong>。列表上显示「缴费未完成」提醒,但不锁实验主链。</p>
|
||||
<p style="font-size:12px;color:var(--text-muted);margin-top:8px">若储存证开具等业务需要已缴费,在<strong>储存证节点</strong>单独加 softDependsOn: ['payment'] 即可。</p></div>`;
|
||||
}
|
||||
return `<p style="color:var(--text-muted);font-size:13px">嵌入 ${NODES[id].embed} · ${canEdit ? '可编辑' : '只读'}</p>`;
|
||||
}
|
||||
|
||||
function selectCase(id) { activeCaseId = id; const c = getCase(id); selectedNode = getActiveTags(c)[0] ? Object.keys(NODES).find(k => NODES[k].name === getActiveTags(c)[0]) : 'protocol'; renderAll(); }
|
||||
function selectNode(id) {
|
||||
const c = getCase(activeCaseId);
|
||||
if (getNodeUiStatus(c, id) === 'locked') { toast(getDepHint(id, c)); return; }
|
||||
selectedNode = id; renderAll();
|
||||
}
|
||||
|
||||
function completeReception() {
|
||||
const c = getCase(activeCaseId);
|
||||
c.nodes.reception = 'done';
|
||||
c.nodes.qc = 'active';
|
||||
c.nodes.production = 'ready';
|
||||
if (c.sample === '—') c.sample = 'ZK' + Date.now().toString().slice(-6);
|
||||
toast('接收完成 → 质检工单、生产工单已并行创建');
|
||||
selectedNode = 'qc';
|
||||
renderAll();
|
||||
}
|
||||
|
||||
function completeNode(id) {
|
||||
const c = getCase(activeCaseId);
|
||||
c.nodes[id] = 'done';
|
||||
// 解锁:把 dependsOn 含 id 且全部 deps done 的 locked 节点改为 ready
|
||||
Object.keys(NODES).forEach(nid => {
|
||||
if (c.nodes[nid] === 'locked' || c.nodes[nid] === 'ready' || c.nodes[nid] === 'active') {
|
||||
if (isUnlocked(c, nid) && c.nodes[nid] !== 'done' && c.nodes[nid] !== 'active') {
|
||||
c.nodes[nid] = 'ready';
|
||||
}
|
||||
}
|
||||
});
|
||||
if (id === 'qc' || id === 'production') {
|
||||
if (c.nodes.qc === 'done' && c.nodes.production === 'done') {
|
||||
c.nodes.release = 'ready';
|
||||
toast('质检+生产均完成 → 入库放行已解锁');
|
||||
} else {
|
||||
toast('「' + NODES[id].name + '」已完成,并行另一路仍可继续');
|
||||
}
|
||||
} else {
|
||||
toast('「' + NODES[id].name + '」已完成');
|
||||
}
|
||||
renderAll();
|
||||
}
|
||||
|
||||
function renderAll() {
|
||||
const c = getCase(activeCaseId);
|
||||
renderCaseList(); renderSummary(c); renderFlowGraph(c); renderNode(c, selectedNode);
|
||||
}
|
||||
|
||||
function toast(msg) {
|
||||
const t = document.getElementById('toast'); t.textContent = msg; t.classList.add('show');
|
||||
setTimeout(() => t.classList.remove('show'), 2800);
|
||||
}
|
||||
|
||||
document.getElementById('caseSearch').addEventListener('input', renderCaseList);
|
||||
renderAll();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,689 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>质检工单 · 单列 Tab 模式 Demo</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet" />
|
||||
<style>
|
||||
:root {
|
||||
--primary: #10b981; --primary-dark: #059669; --primary-bg: #ecfdf5;
|
||||
--text: #1e293b; --muted: #64748b; --border: #e2e8f0; --border-soft: #d9e8e2;
|
||||
--radius: 10px;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: Inter, -apple-system, sans-serif;
|
||||
font-size: 14px; line-height: 1.5; color: var(--text);
|
||||
background: #fefefe;
|
||||
}
|
||||
|
||||
.page-container { max-width: 1200px; margin: 0 auto; padding: 24px; }
|
||||
|
||||
.panel {
|
||||
background: #fff; border: 1px solid var(--border-soft);
|
||||
border-radius: var(--radius); overflow: hidden;
|
||||
}
|
||||
.panel-top { padding: 16px 20px 0; }
|
||||
.title-bar-heading {
|
||||
font-size: 15px; font-weight: 600; padding-left: 10px;
|
||||
border-left: 3px solid var(--primary); margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.work-order-type-tabs {
|
||||
display: flex; border-bottom: 1px solid var(--border); padding: 0 20px;
|
||||
}
|
||||
.wo-type-tab {
|
||||
padding: 10px 16px; font-size: 13px; color: var(--muted);
|
||||
border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: default;
|
||||
}
|
||||
.wo-type-tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); font-weight: 600; }
|
||||
|
||||
.demo-banner {
|
||||
margin: 12px 20px 0; padding: 10px 12px;
|
||||
background: var(--primary-bg); border-radius: 8px;
|
||||
font-size: 12px; color: var(--muted); line-height: 1.55;
|
||||
}
|
||||
.demo-banner strong { color: var(--primary-dark); }
|
||||
|
||||
.filter-block { padding: 16px 20px; border-bottom: 1px solid var(--border); }
|
||||
.filter-grid {
|
||||
display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 16px;
|
||||
}
|
||||
.filter-item label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
|
||||
.filter-item input, .filter-item select {
|
||||
width: 100%; height: 36px; border: 1px solid var(--border);
|
||||
border-radius: 8px; padding: 0 10px; font-size: 13px; background: #fff;
|
||||
}
|
||||
.filter-actions {
|
||||
display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px;
|
||||
}
|
||||
|
||||
/* ★ 单列布局(替代现网 minmax(480px) 多列网格) */
|
||||
.qc-work-order-cards-body { border-top: 1px solid var(--border); }
|
||||
.qc-work-order-cards-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
padding: 16px 20px;
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
/* 样本组卡片(一行一个) */
|
||||
.qc-sample-row {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
transition: border-color 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
.qc-sample-row:hover {
|
||||
border-color: #a7f3d0;
|
||||
box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
|
||||
}
|
||||
|
||||
.qc-sample-row__ctx {
|
||||
display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
|
||||
padding: 10px 16px;
|
||||
background: var(--primary-bg);
|
||||
border-bottom: 1px solid #a7f3d0;
|
||||
font-size: 12px;
|
||||
}
|
||||
.qc-sample-row__idx { font-size: 12px; color: #94a3b8; min-width: 20px; }
|
||||
.qc-sample-row__code {
|
||||
font-weight: 600; font-size: 14px;
|
||||
font-family: ui-monospace, Menlo, monospace; color: var(--text);
|
||||
}
|
||||
.qc-sample-row__sub { color: var(--muted); }
|
||||
.qc-sample-row__badge {
|
||||
margin-left: auto;
|
||||
font-size: 11px; font-weight: 600;
|
||||
padding: 2px 8px; border-radius: 4px;
|
||||
background: #fff; color: var(--primary-dark); border: 1px solid #a7f3d0;
|
||||
}
|
||||
|
||||
/* 组内 Tab(同样本多条工单) */
|
||||
.qc-wo-tabs {
|
||||
display: flex; border-bottom: 1px solid var(--border);
|
||||
background: #fafafa; overflow-x: auto;
|
||||
}
|
||||
.qc-wo-tab {
|
||||
padding: 10px 16px; font-size: 12px; color: var(--muted);
|
||||
border-bottom: 2px solid transparent; cursor: pointer;
|
||||
white-space: nowrap; transition: color 0.12s, background 0.12s;
|
||||
}
|
||||
.qc-wo-tab:hover { color: var(--text); background: #f8fafc; }
|
||||
.qc-wo-tab.active {
|
||||
color: var(--primary-dark); font-weight: 600;
|
||||
border-bottom-color: var(--primary); background: #fff;
|
||||
}
|
||||
.qc-wo-tab__no { font-family: ui-monospace, Menlo, monospace; }
|
||||
.qc-wo-tab__dot {
|
||||
display: inline-block; width: 6px; height: 6px; border-radius: 50%;
|
||||
margin-right: 4px; vertical-align: middle;
|
||||
}
|
||||
.qc-wo-tab__dot--reception { background: #3b82f6; }
|
||||
.qc-wo-tab__dot--production { background: var(--primary); }
|
||||
|
||||
.qc-wo-pane { display: none; }
|
||||
.qc-wo-pane.active { display: block; }
|
||||
|
||||
/* 工单 head(对齐 QcWorkOrderCardList) */
|
||||
.qc-work-order-card__head {
|
||||
display: flex; flex-direction: column; gap: 10px;
|
||||
padding: 14px 16px; background: #fafafa;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.qc-work-order-card__head-inner {
|
||||
display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 20px;
|
||||
}
|
||||
.qc-work-order-card__head-main { flex: 1; min-width: 280px; }
|
||||
.qc-work-order-card__title-row {
|
||||
display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px;
|
||||
}
|
||||
.qc-work-order-card__no {
|
||||
font-size: 15px; font-weight: 600; color: #1e293b;
|
||||
font-family: ui-monospace, Menlo, monospace;
|
||||
}
|
||||
.qc-work-order-card__meta {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
||||
gap: 8px 12px;
|
||||
}
|
||||
.qc-work-order-card__meta-item dt { font-size: 11px; color: #94a3b8; margin-bottom: 2px; }
|
||||
.qc-work-order-card__meta-item dd { font-size: 13px; color: #334155; }
|
||||
.qc-work-order-card__ops {
|
||||
display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
|
||||
gap: 8px; flex-shrink: 0; align-self: flex-end;
|
||||
}
|
||||
|
||||
.el-tag {
|
||||
display: inline-block; font-size: 11px; padding: 2px 7px;
|
||||
border-radius: 4px; font-weight: 500;
|
||||
}
|
||||
.el-tag--success { background: var(--primary-bg); color: var(--primary-dark); }
|
||||
.el-tag--warning { background: #fffbeb; color: #d97706; }
|
||||
.el-tag--info { background: #f1f5f9; color: #64748b; }
|
||||
.el-tag--primary { background: #eff6ff; color: #2563eb; }
|
||||
|
||||
.btn-op-item {
|
||||
height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px;
|
||||
border: 1px solid var(--border); background: #fff; cursor: pointer;
|
||||
}
|
||||
.btn-op-item.primary {
|
||||
background: var(--primary); border-color: var(--primary); color: #fff;
|
||||
}
|
||||
|
||||
/* 任务区(对齐 QcWorkOrderTaskSubList) */
|
||||
.qc-work-order-card__tasks {
|
||||
padding: 10px 16px 12px; background: #f8fafc;
|
||||
}
|
||||
.qc-work-order-task-sublist__head {
|
||||
display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
|
||||
}
|
||||
.qc-work-order-task-sublist__head-title {
|
||||
padding-left: 10px; border-left: 3px solid var(--primary);
|
||||
font-size: 12px; font-weight: 600; color: #334155;
|
||||
}
|
||||
.qc-work-order-task-sublist__count { font-size: 12px; color: #94a3b8; }
|
||||
|
||||
/* 任务:三列 × 两行融合(行内并排,减少左侧空白) */
|
||||
.qc-task-cards-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
.qc-task-card {
|
||||
display: flex; flex-direction: column; justify-content: center; gap: 5px;
|
||||
min-height: 68px; padding: 7px 10px;
|
||||
border: 1px solid var(--border); border-radius: 8px; background: #fff;
|
||||
transition: border-color 0.15s, box-shadow 0.15s;
|
||||
min-width: 0;
|
||||
}
|
||||
.qc-task-card:hover {
|
||||
border-color: #a7f3d0;
|
||||
box-shadow: 0 1px 4px rgba(16, 185, 129, 0.1);
|
||||
}
|
||||
.qc-task-card__line {
|
||||
display: flex; align-items: center; gap: 6px; min-width: 0;
|
||||
}
|
||||
.qc-task-card__line--top { flex-wrap: wrap; row-gap: 4px; }
|
||||
.qc-task-card__name {
|
||||
font-size: 13px; font-weight: 600; color: #1e293b; line-height: 1.25;
|
||||
flex-shrink: 0; max-width: 100%;
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
.qc-task-card__tags {
|
||||
display: flex; flex-wrap: wrap; align-items: center;
|
||||
gap: 3px; flex: 1; min-width: 0;
|
||||
}
|
||||
.qc-task-card__code {
|
||||
font-family: ui-monospace, Menlo, monospace;
|
||||
font-size: 10px; color: #475569; line-height: 1.25;
|
||||
flex: 1; min-width: 0;
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
.qc-task-card__sep { flex-shrink: 0; color: #cbd5e1; font-size: 11px; }
|
||||
.qc-task-card__assignees {
|
||||
flex-shrink: 0; max-width: 64px;
|
||||
font-size: 11px; color: #64748b;
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
.qc-work-order-task-sublist__ops {
|
||||
flex-shrink: 0; display: flex; gap: 4px; margin-left: auto;
|
||||
}
|
||||
.btn-op-item.sm { height: 26px; font-size: 11px; padding: 0 8px; }
|
||||
.btn-op-item.sm.icon-only { min-width: 26px; padding: 0; justify-content: center; }
|
||||
|
||||
.qc-work-order-task-sublist__empty {
|
||||
min-height: 72px; display: flex; align-items: center; justify-content: center;
|
||||
font-size: 13px; color: #94a3b8; text-align: center;
|
||||
border: 1px dashed var(--border); border-radius: 8px; background: #fff;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: flex; justify-content: flex-end; align-items: center; gap: 8px;
|
||||
padding: 12px 20px; border-top: 1px solid var(--border);
|
||||
font-size: 13px; color: var(--muted);
|
||||
}
|
||||
.pagination button {
|
||||
height: 28px; min-width: 28px; padding: 0 8px;
|
||||
border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer;
|
||||
}
|
||||
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.qc-task-cards-grid { grid-template-columns: repeat(2, 1fr); }
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.filter-grid { grid-template-columns: 1fr 1fr; }
|
||||
.qc-work-order-card__head-inner { flex-direction: column; }
|
||||
.qc-work-order-card__ops { align-self: stretch; justify-content: flex-start; }
|
||||
}
|
||||
@media (max-width: 520px) {
|
||||
.qc-task-cards-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-container">
|
||||
<section class="panel">
|
||||
<div class="panel-top">
|
||||
<h2 class="title-bar-heading">质检工单</h2>
|
||||
</div>
|
||||
|
||||
<div class="work-order-type-tabs">
|
||||
<div class="wo-type-tab active">入库质检工单</div>
|
||||
<div class="wo-type-tab">出库质检工单</div>
|
||||
<div class="wo-type-tab">临时质检工单</div>
|
||||
</div>
|
||||
|
||||
<p class="demo-banner">
|
||||
<strong>目标布局:</strong>列表<strong>一行一个样本组</strong>(单列)+ 同样本 <strong>Tab 切换</strong>;
|
||||
质检任务为<strong>三列 × 两行融合</strong>卡片:第 1 行「项目名 + Tag」,第 2 行「任务号 · 负责人 · 操作」,减少左侧空白。
|
||||
</p>
|
||||
|
||||
<div class="filter-block">
|
||||
<div class="filter-grid">
|
||||
<div class="filter-item">
|
||||
<label>关键词</label>
|
||||
<input type="text" placeholder="工单号 / 样本编码 / 入库编码" />
|
||||
</div>
|
||||
<div class="filter-item">
|
||||
<label>工单状态</label>
|
||||
<select><option>全部</option><option>待配置</option><option>已配置</option><option>已完成</option></select>
|
||||
</div>
|
||||
<div class="filter-item">
|
||||
<label>触发来源</label>
|
||||
<select><option>全部</option><option>样本接收</option><option>生产过程</option></select>
|
||||
</div>
|
||||
<div class="filter-item">
|
||||
<label>创建时间</label>
|
||||
<input type="text" placeholder="开始日期 — 结束日期" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-actions">
|
||||
<button class="btn-op-item">重置</button>
|
||||
<button class="btn-op-item primary">搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-body qc-work-order-cards-body">
|
||||
<div class="qc-work-order-cards-wrap">
|
||||
|
||||
<!-- 行 1:同样本 2 条 → Tab 切换 -->
|
||||
<article class="qc-sample-row" data-group="g1">
|
||||
<div class="qc-sample-row__ctx">
|
||||
<span class="qc-sample-row__idx">1</span>
|
||||
<span class="qc-sample-row__code">ZK202506120001</span>
|
||||
<span class="qc-sample-row__sub">脐带血 · 协议 XY-2025-0066 · 已生效 · 接收 2026-06-12 · 李四</span>
|
||||
<span class="qc-sample-row__badge">2 条质检</span>
|
||||
</div>
|
||||
<div class="qc-wo-tabs">
|
||||
<div class="qc-wo-tab active" data-group="g1" data-pane="g1-p1">
|
||||
<span class="qc-wo-tab__dot qc-wo-tab__dot--reception"></span>
|
||||
<span class="qc-wo-tab__no">ZJ202606120001</span> · 样本接收
|
||||
<span class="el-tag el-tag--warning" style="margin-left:6px">已配置</span>
|
||||
</div>
|
||||
<div class="qc-wo-tab" data-group="g1" data-pane="g1-p2">
|
||||
<span class="qc-wo-tab__dot qc-wo-tab__dot--production"></span>
|
||||
<span class="qc-wo-tab__no">ZJ202606120015</span> · 生产过程
|
||||
<span class="el-tag el-tag--info" style="margin-left:6px">待配置</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="qc-wo-pane active" id="g1-p1">
|
||||
<header class="qc-work-order-card__head">
|
||||
<div class="qc-work-order-card__head-inner">
|
||||
<div class="qc-work-order-card__head-main">
|
||||
<div class="qc-work-order-card__title-row">
|
||||
<span class="qc-work-order-card__no">ZJ202606120001</span>
|
||||
<span class="el-tag el-tag--warning">已配置</span>
|
||||
<span class="el-tag el-tag--primary">样本接收</span>
|
||||
</div>
|
||||
<dl class="qc-work-order-card__meta">
|
||||
<div class="qc-work-order-card__meta-item"><dt>实验室入库编码</dt><dd>LAB-202506120001</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>来源类型</dt><dd><span class="el-tag el-tag--success">细胞存储</span></dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>样本类型</dt><dd>脐带血</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>检测方式</dt><dd>实验室 / 第三方</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>创建时间</dt><dd>2026-06-12 09:35</dd></div>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="qc-work-order-card__ops">
|
||||
<button class="btn-op-item primary">⚙ 调整检测</button>
|
||||
<button class="btn-op-item">👁 查看</button>
|
||||
<button class="btn-op-item">⋯</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<section class="qc-work-order-card__tasks">
|
||||
<div class="qc-work-order-task-sublist__head">
|
||||
<div class="qc-work-order-task-sublist__head-title">质检任务</div>
|
||||
<span class="qc-work-order-task-sublist__count">共 3 项任务 ↻</span>
|
||||
</div>
|
||||
<div class="qc-task-cards-grid">
|
||||
<div class="qc-task-card">
|
||||
<div class="qc-task-card__line qc-task-card__line--top">
|
||||
<span class="qc-task-card__name">HBV-DNA</span>
|
||||
<div class="qc-task-card__tags">
|
||||
<span class="el-tag el-tag--success">已完成</span>
|
||||
<span class="el-tag el-tag--success">实验室</span>
|
||||
<span class="el-tag el-tag--success">通过</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-task-card__line">
|
||||
<span class="qc-task-card__code">RW202606120001</span>
|
||||
<span class="qc-task-card__sep">·</span>
|
||||
<span class="qc-task-card__assignees">张质检</span>
|
||||
<div class="qc-work-order-task-sublist__ops">
|
||||
<button class="btn-op-item primary sm">查看</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-task-card">
|
||||
<div class="qc-task-card__line qc-task-card__line--top">
|
||||
<span class="qc-task-card__name">细菌培养</span>
|
||||
<div class="qc-task-card__tags">
|
||||
<span class="el-tag el-tag--success">已完成</span>
|
||||
<span class="el-tag el-tag--success">实验室</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-task-card__line">
|
||||
<span class="qc-task-card__code">RW202606120002</span>
|
||||
<span class="qc-task-card__sep">·</span>
|
||||
<span class="qc-task-card__assignees">张质检</span>
|
||||
<div class="qc-work-order-task-sublist__ops">
|
||||
<button class="btn-op-item primary sm">查看</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-task-card">
|
||||
<div class="qc-task-card__line qc-task-card__line--top">
|
||||
<span class="qc-task-card__name">支原体检测</span>
|
||||
<div class="qc-task-card__tags">
|
||||
<span class="el-tag el-tag--warning">进行中</span>
|
||||
<span class="el-tag el-tag--warning">第三方</span>
|
||||
<span class="el-tag el-tag--info">待结论</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-task-card__line">
|
||||
<span class="qc-task-card__code">RW202606120003</span>
|
||||
<span class="qc-task-card__sep">·</span>
|
||||
<span class="qc-task-card__assignees">—</span>
|
||||
<div class="qc-work-order-task-sublist__ops">
|
||||
<button class="btn-op-item primary sm">开始</button>
|
||||
<button class="btn-op-item sm icon-only">⋯</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="qc-wo-pane" id="g1-p2">
|
||||
<header class="qc-work-order-card__head">
|
||||
<div class="qc-work-order-card__head-inner">
|
||||
<div class="qc-work-order-card__head-main">
|
||||
<div class="qc-work-order-card__title-row">
|
||||
<span class="qc-work-order-card__no">ZJ202606120015</span>
|
||||
<span class="el-tag el-tag--info">待配置</span>
|
||||
<span class="el-tag el-tag--success">生产过程</span>
|
||||
</div>
|
||||
<dl class="qc-work-order-card__meta">
|
||||
<div class="qc-work-order-card__meta-item"><dt>触发来源</dt><dd>生产过程</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>质检对象</dt><dd>CP-202506120003</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>产品名称</dt><dd>脐带血 MSC · P2</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>关联生产工单</dt><dd>SC202606120001</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>检测方式</dt><dd>—</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>创建时间</dt><dd>2026-06-14 15:20</dd></div>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="qc-work-order-card__ops">
|
||||
<button class="btn-op-item primary">⚙ 配置检测</button>
|
||||
<button class="btn-op-item">👁 查看</button>
|
||||
<button class="btn-op-item">⋯</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<section class="qc-work-order-card__tasks">
|
||||
<div class="qc-work-order-task-sublist__head">
|
||||
<div class="qc-work-order-task-sublist__head-title">质检任务</div>
|
||||
<span class="qc-work-order-task-sublist__count">共 0 项任务 ↻</span>
|
||||
</div>
|
||||
<div class="qc-work-order-task-sublist__empty">暂无任务,请先在工单行「配置检测」</div>
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<!-- 行 2:同样本 3 条 → Tab 切换 -->
|
||||
<article class="qc-sample-row" data-group="g2">
|
||||
<div class="qc-sample-row__ctx">
|
||||
<span class="qc-sample-row__idx">2</span>
|
||||
<span class="qc-sample-row__code">ZK202506090005</span>
|
||||
<span class="qc-sample-row__sub">胎盘 · 协议 XY-2025-0055 · 赵敏</span>
|
||||
<span class="qc-sample-row__badge">3 条质检</span>
|
||||
</div>
|
||||
<div class="qc-wo-tabs">
|
||||
<div class="qc-wo-tab active" data-group="g2" data-pane="g2-p1">
|
||||
<span class="qc-wo-tab__dot qc-wo-tab__dot--reception"></span>
|
||||
<span class="qc-wo-tab__no">ZJ202606090001</span> · 样本接收
|
||||
<span class="el-tag el-tag--success" style="margin-left:6px">已完成</span>
|
||||
</div>
|
||||
<div class="qc-wo-tab" data-group="g2" data-pane="g2-p2">
|
||||
<span class="qc-wo-tab__dot qc-wo-tab__dot--production"></span>
|
||||
<span class="qc-wo-tab__no">ZJ202606100008</span> · 生产过程
|
||||
<span class="el-tag el-tag--success" style="margin-left:6px">已完成</span>
|
||||
</div>
|
||||
<div class="qc-wo-tab" data-group="g2" data-pane="g2-p3">
|
||||
<span class="qc-wo-tab__dot qc-wo-tab__dot--production"></span>
|
||||
<span class="qc-wo-tab__no">ZJ202606110012</span> · 生产过程
|
||||
<span class="el-tag el-tag--warning" style="margin-left:6px">已配置</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-wo-pane active" id="g2-p1">
|
||||
<header class="qc-work-order-card__head">
|
||||
<div class="qc-work-order-card__head-inner">
|
||||
<div class="qc-work-order-card__head-main">
|
||||
<div class="qc-work-order-card__title-row">
|
||||
<span class="qc-work-order-card__no">ZJ202606090001</span>
|
||||
<span class="el-tag el-tag--success">已完成</span>
|
||||
<span class="el-tag el-tag--primary">样本接收</span>
|
||||
</div>
|
||||
<dl class="qc-work-order-card__meta">
|
||||
<div class="qc-work-order-card__meta-item"><dt>检测方式</dt><dd>实验室 / 第三方</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>创建时间</dt><dd>2026-06-09 10:00</dd></div>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="qc-work-order-card__ops"><button class="btn-op-item">👁 查看</button></div>
|
||||
</div>
|
||||
</header>
|
||||
<section class="qc-work-order-card__tasks">
|
||||
<div class="qc-task-cards-grid">
|
||||
<div class="qc-task-card">
|
||||
<div class="qc-task-card__line qc-task-card__line--top">
|
||||
<span class="qc-task-card__name">无菌检测</span>
|
||||
<div class="qc-task-card__tags"><span class="el-tag el-tag--success">已完成</span></div>
|
||||
</div>
|
||||
<div class="qc-task-card__line">
|
||||
<span class="qc-task-card__code">RW202606090001</span>
|
||||
<span class="qc-task-card__sep">·</span>
|
||||
<span class="qc-task-card__assignees">张质检</span>
|
||||
<div class="qc-work-order-task-sublist__ops"><button class="btn-op-item primary sm">查看</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-task-card">
|
||||
<div class="qc-task-card__line qc-task-card__line--top">
|
||||
<span class="qc-task-card__name">内毒素</span>
|
||||
<div class="qc-task-card__tags"><span class="el-tag el-tag--success">已完成</span></div>
|
||||
</div>
|
||||
<div class="qc-task-card__line">
|
||||
<span class="qc-task-card__code">RW202606090002</span>
|
||||
<span class="qc-task-card__sep">·</span>
|
||||
<span class="qc-task-card__assignees">李质检</span>
|
||||
<div class="qc-work-order-task-sublist__ops"><button class="btn-op-item primary sm">查看</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="qc-wo-pane" id="g2-p2">
|
||||
<header class="qc-work-order-card__head">
|
||||
<div class="qc-work-order-card__head-inner">
|
||||
<div class="qc-work-order-card__head-main">
|
||||
<div class="qc-work-order-card__title-row">
|
||||
<span class="qc-work-order-card__no">ZJ202606100008</span>
|
||||
<span class="el-tag el-tag--success">已完成</span>
|
||||
<span class="el-tag el-tag--success">生产过程</span>
|
||||
</div>
|
||||
<dl class="qc-work-order-card__meta">
|
||||
<div class="qc-work-order-card__meta-item"><dt>质检对象</dt><dd>CP-202506090001 · P1</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>关联生产工单</dt><dd>SC202606090001</dd></div>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="qc-work-order-card__ops"><button class="btn-op-item">👁 查看</button></div>
|
||||
</div>
|
||||
</header>
|
||||
<section class="qc-work-order-card__tasks">
|
||||
<div class="qc-task-cards-grid">
|
||||
<div class="qc-task-card">
|
||||
<div class="qc-task-card__line qc-task-card__line--top">
|
||||
<span class="qc-task-card__name">细胞活性</span>
|
||||
<div class="qc-task-card__tags">
|
||||
<span class="el-tag el-tag--success">已完成</span>
|
||||
<span class="el-tag el-tag--success">实验室</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-task-card__line">
|
||||
<span class="qc-task-card__code">RW202606100008</span>
|
||||
<span class="qc-task-card__sep">·</span>
|
||||
<span class="qc-task-card__assignees">王质检</span>
|
||||
<div class="qc-work-order-task-sublist__ops"><button class="btn-op-item primary sm">查看</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="qc-wo-pane" id="g2-p3">
|
||||
<header class="qc-work-order-card__head">
|
||||
<div class="qc-work-order-card__head-inner">
|
||||
<div class="qc-work-order-card__head-main">
|
||||
<div class="qc-work-order-card__title-row">
|
||||
<span class="qc-work-order-card__no">ZJ202606110012</span>
|
||||
<span class="el-tag el-tag--warning">已配置</span>
|
||||
<span class="el-tag el-tag--success">生产过程</span>
|
||||
</div>
|
||||
<dl class="qc-work-order-card__meta">
|
||||
<div class="qc-work-order-card__meta-item"><dt>质检对象</dt><dd>CP-202506110002 · P3</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>关联生产工单</dt><dd>SC202606090001</dd></div>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="qc-work-order-card__ops">
|
||||
<button class="btn-op-item primary">⚙ 调整检测</button>
|
||||
<button class="btn-op-item">👁 查看</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<section class="qc-work-order-card__tasks">
|
||||
<div class="qc-task-cards-grid">
|
||||
<div class="qc-task-card">
|
||||
<div class="qc-task-card__line qc-task-card__line--top">
|
||||
<span class="qc-task-card__name">STR 鉴定</span>
|
||||
<div class="qc-task-card__tags">
|
||||
<span class="el-tag el-tag--warning">进行中</span>
|
||||
<span class="el-tag el-tag--success">实验室</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-task-card__line">
|
||||
<span class="qc-task-card__code">RW202606110001</span>
|
||||
<span class="qc-task-card__sep">·</span>
|
||||
<span class="qc-task-card__assignees">张质检</span>
|
||||
<div class="qc-work-order-task-sublist__ops"><button class="btn-op-item primary sm">开始</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-task-card">
|
||||
<div class="qc-task-card__line qc-task-card__line--top">
|
||||
<span class="qc-task-card__name">支原体</span>
|
||||
<div class="qc-task-card__tags">
|
||||
<span class="el-tag el-tag--info">待执行</span>
|
||||
<span class="el-tag el-tag--warning">第三方</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qc-task-card__line">
|
||||
<span class="qc-task-card__code">RW202606110002</span>
|
||||
<span class="qc-task-card__sep">·</span>
|
||||
<span class="qc-task-card__assignees">—</span>
|
||||
<div class="qc-work-order-task-sublist__ops"><button class="btn-op-item primary sm">开始</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<!-- 行 3:仅 1 条 → 无 Tab,与现网单卡一致 -->
|
||||
<article class="qc-sample-row">
|
||||
<div class="qc-sample-row__ctx">
|
||||
<span class="qc-sample-row__idx">3</span>
|
||||
<span class="qc-sample-row__code">ZK202506080003</span>
|
||||
<span class="qc-sample-row__sub">脐带血 · 协议 XY-2025-0088 · 王强 · 接收 2026-06-08</span>
|
||||
</div>
|
||||
<header class="qc-work-order-card__head">
|
||||
<div class="qc-work-order-card__head-inner">
|
||||
<div class="qc-work-order-card__head-main">
|
||||
<div class="qc-work-order-card__title-row">
|
||||
<span class="qc-work-order-card__no">ZJ202606080001</span>
|
||||
<span class="el-tag el-tag--info">待配置</span>
|
||||
<span class="el-tag el-tag--primary">样本接收</span>
|
||||
</div>
|
||||
<dl class="qc-work-order-card__meta">
|
||||
<div class="qc-work-order-card__meta-item"><dt>实验室入库编码</dt><dd>LAB-202506080001</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>来源类型</dt><dd><span class="el-tag el-tag--success">细胞存储</span></dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>协议状态</dt><dd><span class="el-tag el-tag--success">已生效</span></dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>样本类型</dt><dd>脐带血</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>接收时间</dt><dd>2026-06-08 09:15</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>接收经手人</dt><dd>李四</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>检测方式</dt><dd>—</dd></div>
|
||||
<div class="qc-work-order-card__meta-item"><dt>创建时间</dt><dd>2026-06-08 09:20</dd></div>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="qc-work-order-card__ops">
|
||||
<button class="btn-op-item primary">⚙ 配置检测</button>
|
||||
<button class="btn-op-item">⋯</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<section class="qc-work-order-card__tasks">
|
||||
<div class="qc-work-order-task-sublist__head">
|
||||
<div class="qc-work-order-task-sublist__head-title">质检任务</div>
|
||||
<span class="qc-work-order-task-sublist__count">共 0 项任务 ↻</span>
|
||||
</div>
|
||||
<div class="qc-work-order-task-sublist__empty">暂无任务,请先在工单行「配置检测」</div>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pagination">
|
||||
<span>共 3 个样本 · 5 条质检工单</span>
|
||||
<button>‹</button>
|
||||
<button class="active">1</button>
|
||||
<button>›</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.querySelectorAll('.qc-wo-tab').forEach(tab => {
|
||||
tab.addEventListener('click', () => {
|
||||
const group = tab.closest('.qc-sample-row');
|
||||
const paneId = tab.dataset.pane;
|
||||
group.querySelectorAll('.qc-wo-tab').forEach(t => t.classList.remove('active'));
|
||||
group.querySelectorAll('.qc-wo-pane').forEach(p => p.classList.remove('active'));
|
||||
tab.classList.add('active');
|
||||
document.getElementById(paneId).classList.add('active');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,13 @@
|
||||
-- 质检工单:生产过程触发来源字段
|
||||
ALTER TABLE biz_qc_work_order
|
||||
ADD COLUMN trigger_source VARCHAR(20) NOT NULL DEFAULT 'reception'
|
||||
COMMENT '触发来源 reception=样本接收 production=生产过程' AFTER qc_biz_type,
|
||||
ADD COLUMN production_work_order_id VARCHAR(64) NULL
|
||||
COMMENT '关联生产工单ID(生产过程触发时)' AFTER cell_product_id,
|
||||
ADD COLUMN production_task_id VARCHAR(64) NULL
|
||||
COMMENT '关联生产任务ID(可选)' AFTER production_work_order_id;
|
||||
|
||||
UPDATE biz_qc_work_order SET trigger_source = 'reception' WHERE trigger_source IS NULL OR trigger_source = '';
|
||||
|
||||
CREATE INDEX idx_qc_wo_sample_trigger ON biz_qc_work_order (tenant_no, sample_code, trigger_source, del_flag);
|
||||
CREATE INDEX idx_qc_wo_prod_wo ON biz_qc_work_order (production_work_order_id, del_flag);
|
||||
@@ -0,0 +1,399 @@
|
||||
# 生产过程发起质检 + 质检工单统一展示 实现计划
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development or superpowers:executing-plans to implement task-by-task.
|
||||
|
||||
**Goal:** 生产专员在【生产工单】卡片列表中「派发质检工单」(选细胞产品 + 备注);质检专员在【质检工单】同列表看到接收/生产两种来源并按样本 Tab 展示。同时【生产工单】入库/出库/临时三个 Tab 列表由表格改为与质检侧一致的单列卡片模式。
|
||||
|
||||
**Architecture:** 扩展 `biz_qc_work_order` 触发来源字段;生产 API 建单;生产/质检列表均改为单列大卡片 + 内嵌任务区(生产任务沿用现有子列表逻辑并收敛紧凑样式);质检侧同样本 Tab 分组;生产侧每工单卡片操作区增加「派发质检工单」弹窗。
|
||||
|
||||
**Tech Stack:** MySQL 5.7 · FastAPI · Vue 3 · Element Plus
|
||||
|
||||
**UI 权威 Demo:** `docs/mockups/qc-work-order-related-cards-prototype.html`(质检侧);生产侧卡片结构对齐 `QcWorkOrderCardList.vue` + 现网 `WorkOrderTaskSubList.vue`
|
||||
|
||||
---
|
||||
|
||||
## 1. 需求结论(能否实现)
|
||||
|
||||
**可以实现,且与现有架构兼容。**
|
||||
|
||||
| 诉求 | 结论 |
|
||||
|------|------|
|
||||
| 生产专员派发质检(选细胞产品+备注) | 生产工单卡片「派发质检工单」+ 弹窗 + API |
|
||||
| 质检工单界面可见两种来源 | 同表 + 样本 Tab 分组展示 |
|
||||
| 生产工单三 Tab 改卡片列表 | **可以**;新建 `ProductionWorkOrderCardList`,单列 + 内嵌任务 |
|
||||
|
||||
---
|
||||
|
||||
## 2. 业务流程(目标态)
|
||||
|
||||
```
|
||||
市场专员 → 采集协议单
|
||||
↓
|
||||
质检专员 → 样本接收(结论=接收)
|
||||
├→ 自动:入库质检工单 [trigger_source=reception] (放行门禁)
|
||||
└→ 自动:入库生产工单
|
||||
↓
|
||||
生产专员 → 生产任务执行 → 产出细胞产品
|
||||
↓
|
||||
生产专员 → 【生产工单】卡片列表 → 【派发质检工单】
|
||||
(选择细胞产品 + 填写备注 → 提交)
|
||||
↓
|
||||
新建:入库质检工单 [trigger_source=production] (过程质检,不替代门禁)
|
||||
↓
|
||||
质检专员 → 【质检工单】列表
|
||||
同一样本编码下 Tab 切换:样本接收 | 生产过程(可多条)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. 已确认 UI 设计
|
||||
|
||||
### 3.1 质检工单列表(Demo 定稿)
|
||||
|
||||
参考 `docs/mockups/qc-work-order-related-cards-prototype.html`:
|
||||
|
||||
| 层级 | 规则 |
|
||||
|------|------|
|
||||
| 列表布局 | **单列**,一行 = 一个样本组(`flex-direction: column`) |
|
||||
| 同样本多条工单 | 顶部样本上下文条 + **Tab 切换**工单;下方 meta + 任务区联动 |
|
||||
| 仅 1 条工单 | 无 Tab,结构与现网单卡一致 |
|
||||
| 质检任务 | **三列网格**;每卡 **2 行融合**:① 项目名 + Tag ② 任务号 · 负责人 · 操作 |
|
||||
| 筛选 | 入库 Tab 增加「触发来源」:全部 / 样本接收 / 生产过程 |
|
||||
|
||||
### 3.2 生产工单列表(新增,对齐卡片模式)
|
||||
|
||||
**现网:** `production-work-order/index.vue` 使用 `el-table` + `type="expand"` 展开生产任务(`WorkOrderTaskSubList`)。
|
||||
|
||||
**目标:** 入库 / 出库 / 临时三个 Tab **均改为单列卡片**,结构与质检工单大卡片一致:
|
||||
|
||||
```
|
||||
┌─ 生产工单 SC202606120001 ─────────────────────────────┐
|
||||
│ head:工单号 + 状态 Tag + meta 栅格 + 操作按钮 │
|
||||
│ 操作含:查看 | 派发任务 | 派发质检工单 | 完成 | … │
|
||||
├──────────────────────────────────────────────────────┤
|
||||
│ tasks:生产任务子列表(内嵌,非表格 expand) │
|
||||
└──────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
| Tab | 卡片 meta 字段 | 分组策略 |
|
||||
|-----|----------------|----------|
|
||||
| **入库** | 与现网表格列一致:样本编码、协议状态、样本类型、接收时间… | 单列;通常 1 样本 1 生产工单,**不做 Tab 分组**(与质检侧不同) |
|
||||
| **出库** | 业务类型、申请单号、用户名称、输注时间… | 单列,一工单一卡 |
|
||||
| **临时** | 工单号、状态、备注、配置时间… | 单列,一工单一卡 |
|
||||
|
||||
| 层级 | 规则 |
|
||||
|------|------|
|
||||
| 列表布局 | **单列** `flex-direction: column`(替换 `minmax` 多列 / 表格) |
|
||||
| 生产任务 | 内嵌于卡片底部 `#fafafa` 任务区;复用 `WorkOrderTaskSubList`,样式收敛为 **三列 + 两行融合**(与质检任务视觉统一,内容字段仍为任务名/状态/工艺类型) |
|
||||
| 工具栏 | 保留「已选 N 项」、新增/派发任务/完成;批量逻辑暂保留(卡片可加 checkbox 或后续迭代) |
|
||||
| 移除 | `el-table` + `expand` 行 |
|
||||
|
||||
**新建组件:**
|
||||
|
||||
- `ProductionWorkOrderCardList.vue` — 对标 `QcWorkOrderCardList.vue`
|
||||
- `index.vue` — 表格区域替换为上述 CardList
|
||||
|
||||
### 3.3 派发质检工单(生产工单入口)
|
||||
|
||||
**位置:** 生产工单卡片 **操作区** 主按钮(入库 Tab 必做;出库若有关联细胞产品可二期扩展)。
|
||||
|
||||
**交互:**
|
||||
|
||||
1. 点击 **「派发质检工单」**(`Promotion` / `Document` 类图标 + 文案,非 primary 实心,与「派发任务」并列描边按钮;每卡仅一个 primary 时仍留给「进入执行/派发任务」)
|
||||
2. 打开弹窗 `DispatchQcWorkOrderDialog.vue`
|
||||
3. 表单(`label-position="top"`,`.dialog-form-layout` + `.form-grid-2`):
|
||||
- **细胞产品**(必填):下拉,数据来自该生产工单下已产出细胞产品
|
||||
- **备注**(选填):`textarea`,max 512
|
||||
4. 确定 → `POST /web/admin/production-work-orders/{id}/qc-work-orders`
|
||||
5. 成功:`ElMessage.success`;可选「前往质检工单」跳转 `/#/quality-manage/qc-work-order?sampleCode=xxx`
|
||||
|
||||
**细胞产品选项来源(后端):**
|
||||
|
||||
```
|
||||
GET /web/admin/production-work-orders/{id}/cell-product-options
|
||||
→ [{ id, productCode, productName, productTypeName, passage, storageSlotName, taskNo }]
|
||||
```
|
||||
|
||||
从该工单下所有生产任务的 **输出子表**(`biz_production_task_output` / cell_product)去重汇总;无产出时禁用按钮并 tooltip「请先完成生产任务并录入输出细胞产品」。
|
||||
|
||||
**前置条件:**
|
||||
|
||||
- 工单状态建议 `jxz` 或 `ywc`(`dpz` 无产出时不可派发)
|
||||
- 租户隔离、软删除一致
|
||||
|
||||
---
|
||||
|
||||
## 4. 数据模型
|
||||
|
||||
### 4.1 `biz_qc_work_order` 新增字段
|
||||
|
||||
```sql
|
||||
ALTER TABLE biz_qc_work_order
|
||||
ADD COLUMN trigger_source VARCHAR(20) NOT NULL DEFAULT 'reception'
|
||||
COMMENT '触发来源 reception=样本接收 production=生产过程' AFTER qc_biz_type,
|
||||
ADD COLUMN production_work_order_id VARCHAR(64) NULL
|
||||
COMMENT '关联生产工单ID(生产过程触发时)' AFTER cell_product_id,
|
||||
ADD COLUMN production_task_id VARCHAR(64) NULL
|
||||
COMMENT '关联生产任务ID(可选)' AFTER production_work_order_id;
|
||||
|
||||
-- 历史数据:全部为 reception
|
||||
UPDATE biz_qc_work_order SET trigger_source = 'reception' WHERE trigger_source IS NULL OR trigger_source = '';
|
||||
|
||||
-- 索引
|
||||
CREATE INDEX idx_qc_wo_sample_trigger ON biz_qc_work_order (tenant_no, sample_code, trigger_source, del_flag);
|
||||
CREATE INDEX idx_qc_wo_prod_wo ON biz_qc_work_order (production_work_order_id, del_flag);
|
||||
```
|
||||
|
||||
**说明:**
|
||||
|
||||
- `uk_qc_wo_reception(reception_id, del_flag)` 保留,保证接收触发仍 1:1。
|
||||
- 生产过程触发 **不占用** 该唯一键;同一样本可有多条 `trigger_source=production` 工单。
|
||||
- `cell_product_id` 已有;生产触发时 **必填**,接收触发时为空。
|
||||
- **不放** `work_order_type=temporary`;过程质检仍属入库链路(`work_order_type=inbound`)。
|
||||
|
||||
### 4.2 业务规则(需产品确认,建议默认)
|
||||
|
||||
| 规则 | 建议默认值 |
|
||||
|------|------------|
|
||||
| 放行门禁质检 | 仅 `trigger_source=reception` 的那条参与入库放行 |
|
||||
| 过程质检是否阻塞放行 | **否**(默认) |
|
||||
| 发起时机 | 细胞产品已写入 `biz_cell_product`(生产任务输出后) |
|
||||
| 同一产品重复发起 | 允许(如 P1/P2 各一次);可选幂等:同 `production_work_order_id + cell_product_id` 且状态非 yzf 时不重复建 |
|
||||
| 检测项目 | 与现网一致:质检专员在工单上「配置检测」时自选 |
|
||||
|
||||
---
|
||||
|
||||
## 5. 后端实现
|
||||
|
||||
### 5.1 新建 CRUD
|
||||
|
||||
**文件:** `backend/app/crud/qc_work_order.py`
|
||||
|
||||
```python
|
||||
def create_qc_work_order_from_production(
|
||||
db, *,
|
||||
production_work_order_id: str,
|
||||
cell_product_id: str,
|
||||
production_task_id: str | None = None,
|
||||
remark: str = "",
|
||||
tenant_no: str,
|
||||
user_id: str,
|
||||
create_dept_id: str = "",
|
||||
) -> BizQcWorkOrder:
|
||||
"""
|
||||
1. 校验生产工单存在、tenant、work_order_type=inbound
|
||||
2. 校验 cell_product 存在且 tenant 一致
|
||||
3. 从生产工单快照 sample_code / protocol_no / reception_id 等
|
||||
4. 插入 biz_qc_work_order:
|
||||
trigger_source=production, work_order_status=dpz
|
||||
5. flush,不 commit(由 API 层 commit)
|
||||
"""
|
||||
```
|
||||
|
||||
**文件:** `backend/app/schemas/qc_work_order.py` — 新增 `ProductionQcWorkOrderCreateBody`
|
||||
|
||||
### 5.2 API
|
||||
|
||||
**文件:** `backend/app/api/production.py`
|
||||
|
||||
| 方法 | 路径 | 说明 |
|
||||
|------|------|------|
|
||||
| POST | `/production-work-orders/{work_order_id}/qc-work-orders` | 派发质检工单 Body: `{ cellProductId, remark? }` |
|
||||
| GET | `/production-work-orders/{work_order_id}/cell-product-options` | 弹窗细胞产品下拉选项 |
|
||||
|
||||
权限:生产工单菜单(如 `biz:productionWorkOrder:list`);建单写操作可复用或新增 `biz:productionWorkOrder:dispatchQc`。
|
||||
|
||||
### 5.3 列表 API 扩展
|
||||
|
||||
**文件:** `backend/app/crud/qc_work_order.py` · `list_work_orders`
|
||||
|
||||
- `_wo_to_dict` 增加:`triggerSource`, `triggerSourceLabel`, `productionWorkOrderId`, `productionTaskId`
|
||||
- 筛选参数:`triggerSource=reception|production`
|
||||
- **分组(二选一):**
|
||||
- **A(推荐)** 后端返回 `groups: [{ sampleCode, sampleMeta, workOrders: [...] }]`,分页按样本组
|
||||
- **B** 仍返回 flat list,前端按 `sampleCode` 分组(改动小,分页语义弱)
|
||||
|
||||
### 5.4 接收触发现有逻辑
|
||||
|
||||
**文件:** `backend/app/crud/qc_work_order.py` · `create_work_order_from_reception`
|
||||
|
||||
创建时显式写 `trigger_source='reception'`。
|
||||
|
||||
### 5.5 入库放行联动
|
||||
|
||||
**文件:** `backend/app/crud/storage_release_review.py` · `_build_qc_info`
|
||||
|
||||
查询质检工单时增加:
|
||||
|
||||
```python
|
||||
.filter(BizQcWorkOrder.trigger_source == 'reception')
|
||||
```
|
||||
|
||||
避免多条同工单时取错;过程质检不参与放行展示。
|
||||
|
||||
---
|
||||
|
||||
## 6. 前端实现
|
||||
|
||||
### 6.1 生产侧 — 列表卡片化 + 派发质检
|
||||
|
||||
**核心文件:**
|
||||
|
||||
| 文件 | 改动 |
|
||||
|------|------|
|
||||
| `production-work-order/index.vue` | 移除 `el-table`;接入 `ProductionWorkOrderCardList`;挂载 `DispatchQcWorkOrderDialog` |
|
||||
| 新建 `ProductionWorkOrderCardList.vue` | 单列卡片;head(meta+ops) + 内嵌 `WorkOrderTaskSubList`;三 Tab 字段分支 |
|
||||
| `WorkOrderTaskSubList.vue` | 任务卡改为三列 + 两行融合(与质检任务样式对齐) |
|
||||
| 新建 `DispatchQcWorkOrderDialog.vue` | 细胞产品 select + 备注 + 提交 |
|
||||
| `api/production-work-order.ts` | `fetchCreateQcFromProduction`、`fetchProductionWorkOrderCellProductOptions` |
|
||||
|
||||
**卡片操作区按钮(入库示例,从左到右):**
|
||||
|
||||
| 按钮 | 类型 | 说明 |
|
||||
|------|------|------|
|
||||
| 派发任务 | primary(每卡唯一主色) | 现有逻辑,打开 `DispatchTaskDialog` |
|
||||
| 派发质检工单 | 描边 | 打开 `DispatchQcWorkOrderDialog` |
|
||||
| 完成工单 | 描边 | 现有逻辑 |
|
||||
| 查看 / 编辑 / 删除 | 描边 / 更多 | 现有逻辑 |
|
||||
|
||||
**`DispatchQcWorkOrderDialog.vue` 要点:**
|
||||
|
||||
```vue
|
||||
<!-- 560px dialog-form-layout -->
|
||||
<!-- 只读:工单号、样本编码 -->
|
||||
<!-- 必填:el-select 细胞产品(filterable,option 展示 编码 · 名称 · 代次) -->
|
||||
<!-- 选填:备注 textarea -->
|
||||
<!-- footer:取消 Close / 确定 Check -->
|
||||
```
|
||||
|
||||
**不再**在 `TaskOutputList` 单独做「发起质检」入口(统一为工单卡片「派发质检工单」,避免两处入口)。
|
||||
|
||||
### 6.2 质检侧 — 列表重构
|
||||
|
||||
**核心文件:**
|
||||
|
||||
| 文件 | 改动 |
|
||||
|------|------|
|
||||
| `QcWorkOrderCardList.vue` | 单列布局;引入样本组 + Tab 容器 |
|
||||
| 新建 `QcWorkOrderSampleGroup.vue` | 样本上下文条 + Tab + 内嵌单工单 head/tasks |
|
||||
| `QcWorkOrderTaskSubList.vue` | 任务卡改为三列网格 + 两行融合布局 |
|
||||
| `qc-work-order/index.vue` | 筛选增加「触发来源」;适配分组列表数据结构 |
|
||||
| `api/qc-work-order.ts` | 类型扩展 + 分组 list 或前端 groupBy 工具 |
|
||||
|
||||
**Tab 标签:** `{workOrderNo} · 样本接收|生产过程` + 状态 Tag
|
||||
|
||||
**单条工单 meta 差异:**
|
||||
|
||||
| 字段 | 样本接收 | 生产过程 |
|
||||
|------|----------|----------|
|
||||
| 触发来源 | 样本接收 | 生产过程 |
|
||||
| 质检对象 | 原始样本 / — | 细胞产品编码 + 名称 |
|
||||
| 关联生产工单 | — | 生产工单号 |
|
||||
|
||||
样本级字段(样本编码、协议、接收信息)提到 **样本上下文条**,Tab 内 meta 不重复。
|
||||
|
||||
### 6.3 任务卡片样式(质检 + 生产任务统一)
|
||||
|
||||
质检任务(`QcWorkOrderTaskSubList`)与生产任务(`WorkOrderTaskSubList`)均采用:
|
||||
|
||||
```scss
|
||||
.qc-task-cards-grid, .production-task-cards-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
// 每卡 2 行:name+tags / code·meta·ops
|
||||
// min-height ~68px
|
||||
```
|
||||
|
||||
可抽公共 SCSS 片段到 `web-admin/src/styles/` 或共享 class 前缀 `work-order-task-cards-grid`。
|
||||
|
||||
---
|
||||
|
||||
## 7. 任务分解(实施顺序)
|
||||
|
||||
### Phase 1 — 数据与后端建单(可独立验收)
|
||||
|
||||
- [ ] 1.1 SQL 迁移写入 `docs/sql/migrations/2026-06-12-qc-work-order-trigger-source.sql`
|
||||
- [ ] 1.2 Model / Schema 增加字段
|
||||
- [ ] 1.3 `create_qc_work_order_from_reception` 写 `trigger_source=reception`
|
||||
- [ ] 1.4 实现 `create_qc_work_order_from_production`
|
||||
- [ ] 1.5 实现 `list_cell_product_options_for_production_work_order`
|
||||
- [ ] 1.6 生产 API:`POST .../qc-work-orders`、`GET .../cell-product-options`
|
||||
- [ ] 1.7 `_wo_to_dict` + list 筛选 `triggerSource`
|
||||
- [ ] 1.8 放行审核 `_build_qc_info` 仅取 reception 工单
|
||||
- [ ] 1.9 运行 `python scripts/check_field_consistency.py`(若涉及 CRUD 字段)
|
||||
|
||||
### Phase 2 — 生产工单 UI(卡片化 + 派发质检)
|
||||
|
||||
- [ ] 2.1 API:`fetchCreateQcFromProduction`、`fetchProductionWorkOrderCellProductOptions`
|
||||
- [ ] 2.2 新建 `DispatchQcWorkOrderDialog.vue`
|
||||
- [ ] 2.3 新建 `ProductionWorkOrderCardList.vue`(入库/出库/临时 meta 分支)
|
||||
- [ ] 2.4 `index.vue` 表格 → CardList;工具栏与选择逻辑适配
|
||||
- [ ] 2.5 `WorkOrderTaskSubList.vue` 三列紧凑任务卡
|
||||
- [ ] 2.6 卡片操作区「派发质检工单」接入弹窗
|
||||
- [ ] 2.7 权限码(如需)
|
||||
|
||||
### Phase 3 — 质检列表 UI(Demo 落地)
|
||||
|
||||
- [ ] 3.1 `QcWorkOrderSampleGroup.vue`(Tab + 样本条)
|
||||
- [ ] 3.2 `QcWorkOrderCardList.vue` 改单列 + 分组渲染
|
||||
- [ ] 3.3 列表 API 分组或前端 `groupWorkOrdersBySample()`
|
||||
- [ ] 3.4 筛选「触发来源」
|
||||
- [ ] 3.5 `QcWorkOrderTaskSubList.vue` 三列紧凑任务卡
|
||||
- [ ] 3.6 查看弹窗 / 配置检测:生产过程工单展示 `cellProduct*`、生产工单号
|
||||
|
||||
### Phase 4 — 联调与文档
|
||||
|
||||
- [ ] 4.1 端到端:接收 → 生产卡片 → 派发质检 → 质检列表 Tab 可见
|
||||
- [ ] 4.2 生产三 Tab 卡片列表回归:派发任务、完成工单、查看
|
||||
- [ ] 4.3 放行审核仍只认 reception 工单
|
||||
- [ ] 4.4 更新 OpenSpec / 设计 spec(可选)
|
||||
- [ ] 4.5 `./scripts/update-graph.sh web-admin`(若改 import/组件)
|
||||
|
||||
---
|
||||
|
||||
## 8. 风险与待确认项
|
||||
|
||||
| 项 | 说明 | 建议 |
|
||||
|----|------|------|
|
||||
| 放行门禁 | 过程质检是否影响放行 | 默认不影响,仅 reception 工单入门禁 |
|
||||
| 分页语义 | 按工单分页 vs 按样本分页 | 改按样本组分页,总数展示「N 样本 · M 工单」 |
|
||||
| 出库/临时 Tab | 是否同样本分组 | 质检入库 Tab 按样本 Tab;生产三 Tab 均 **一工单一卡** 无样本 Tab |
|
||||
| 派发质检范围 | 出库生产是否派发 | 一期 **入库生产工单**;出库有细胞产品场景二期 |
|
||||
| 生产列表批量选择 | 卡片模式多选 | 一期可保留工具栏批量按钮 + 卡片 checkbox,或暂禁批量仅单卡操作 |
|
||||
| 临时质检 Tab | 与生产过程质检区别 | 临时工单无样本关联;勿与 production 触发混淆 |
|
||||
| 权限 | 谁可派发质检 | 生产专员 + 生产工单相关权限 |
|
||||
|
||||
---
|
||||
|
||||
## 9. 验收标准
|
||||
|
||||
**质检工单**
|
||||
|
||||
1. 样本接收后,质检列表出现 1 条「样本接收」工单(行为与现网一致)。
|
||||
2. 生产专员 **派发质检工单** 后,同一样本组出现新 Tab「生产过程」,状态为待配置。
|
||||
3. 质检专员 Tab 切换可分别配置检测、查看任务;任务区为三列两行融合卡片。
|
||||
4. 筛选「触发来源=生产过程」仅显示生产触发工单。
|
||||
5. 入库放行审核详情中,质检信息仍为接收触发工单。
|
||||
|
||||
**生产工单**
|
||||
|
||||
6. 入库 / 出库 / 临时三个 Tab 均为 **单列卡片**,无 `el-table` 主列表。
|
||||
7. 卡片内嵌生产任务子列表,任务为紧凑三列布局。
|
||||
8. 入库生产工单卡片可点击 **派发质检工单**,选细胞产品 + 备注后创建成功。
|
||||
9. 无细胞产品产出时按钮不可用或有明确提示。
|
||||
10. 原有「派发任务」「完成工单」「查看」等操作在卡片模式下仍可用。
|
||||
|
||||
---
|
||||
|
||||
## 10. 参考
|
||||
|
||||
- UI Demo(质检):`docs/mockups/qc-work-order-related-cards-prototype.html`
|
||||
- 质检卡片:`web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderCardList.vue`
|
||||
- 生产工单页(待改):`web-admin/src/views/production/production-work-order/index.vue`
|
||||
- 生产任务子列表:`web-admin/src/views/production/production-work-order/WorkOrderTaskSubList.vue`
|
||||
- 派发任务弹窗(表单参考):`DispatchTaskDialog.vue`
|
||||
- 接收建单:`backend/app/crud/qc_work_order.py` · `create_work_order_from_reception`
|
||||
- 接收事务:`backend/app/crud/sample_reception.py`
|
||||
- 质检工单表:`biz_qc_work_order`
|
||||
@@ -0,0 +1,44 @@
|
||||
# 质检工单 · 用户费用摘要 Implementation Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
|
||||
**Goal:** 在入库/出库质检工单列表与查看弹窗中,为采集协议单与基础实验来源展示用户费用当前快照。
|
||||
|
||||
**Architecture:** 后端新增 `qc_work_order_fee_summary` 服务批量计算 `paymentSummary` / `feeSummary`,在列表与详情 enrich 中挂载;前端在样本组/卡片增加摘要条,查看弹窗补充缴费区块。
|
||||
|
||||
**Tech Stack:** Python 3.9 / FastAPI / SQLAlchemy · Vue 3 / Element Plus / TypeScript
|
||||
|
||||
**Spec:** `docs/superpowers/specs/2026-06-12-qc-work-order-fee-summary-design.md`
|
||||
|
||||
---
|
||||
|
||||
### Task 1: 后端费用摘要服务
|
||||
|
||||
**Files:**
|
||||
- Create: `backend/app/services/qc_work_order_fee_summary.py`
|
||||
- Modify: `backend/app/crud/qc_work_order.py`
|
||||
|
||||
- [x] 实现 `build_protocol_payment_summaries` / `build_basic_experiment_fee_summaries` / `enrich_work_order_fee_summaries`
|
||||
- [x] 在 `list_work_orders` 与 `get_work_order_detail` / `get_outbound_qc_detail` 调用 enrich
|
||||
|
||||
### Task 2: 前端 API 类型
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/api/qc-work-order.ts`
|
||||
|
||||
- [x] 新增 `QcProtocolPaymentSummary` / `QcBasicExperimentFeeSummary` 并扩展 `QcWorkOrder`
|
||||
|
||||
### Task 3: 列表 UI
|
||||
|
||||
**Files:**
|
||||
- Create: `web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderFeeSummaryBar.vue`
|
||||
- Modify: `QcWorkOrderSampleGroup.vue`、`QcWorkOrderSingleCard.vue`、`index.vue`(筛选补基础实验)
|
||||
|
||||
### Task 4: 查看弹窗
|
||||
|
||||
**Files:**
|
||||
- Modify: `index.vue`(入库 viewSections)、`OutboundQcViewDialog.vue`
|
||||
|
||||
### Task 5: 图谱更新
|
||||
|
||||
- [x] `./scripts/update-graph.sh frontend`(若新建组件)
|
||||
@@ -0,0 +1,292 @@
|
||||
# 质检工单 · 用户费用摘要展示设计
|
||||
|
||||
> 日期:2026-06-12
|
||||
> 状态:已实现
|
||||
> 需求确认:**方案 A — 当前快照**(展示合同/已收/待缴/缴费状态,不含历史轨迹、不含与质检动作的联动规则)
|
||||
|
||||
---
|
||||
|
||||
## 1. 背景与目标
|
||||
|
||||
### 1.1 业务诉求
|
||||
|
||||
质检专员在 **入库质检工单**、**出库质检工单** 列表中处理工单时,需要快速了解关联来源单据上的 **用户费用当前状态**,避免在配置/执行质检时忽略欠费、待确认收款等情况。
|
||||
|
||||
### 1.2 展示范围(已确认)
|
||||
|
||||
| Tab | 来源 | 系统标识 | 是否展示费用 |
|
||||
|-----|------|----------|-------------|
|
||||
| 入库质检 | 采集协议单(细胞存储) | `receptionSource = cell_storage` | **是** |
|
||||
| 入库质检 | 捐赠协议单(科研捐赠) | `receptionSource = research_donation` | **否**(业务无缴费) |
|
||||
| 出库质检 | 中试服务申请单 | `bizType = pilot_service` | **否**(渠道扣费) |
|
||||
| 出库质检 | 基础实验 | `bizType = basic_experiment` | **是** |
|
||||
| 出库质检 | 临床应用 | `bizType = clinical_application` | **否**(本期不做,架构预留) |
|
||||
|
||||
### 1.3 非目标
|
||||
|
||||
- 不展示费用 **变更历史**、操作日志、时间线
|
||||
- 不根据费用状态 **阻断或自动推进** 质检流程
|
||||
- 不在本模块 **编辑** 协议/申请单费用
|
||||
- 不展示 **质检检测自身费用**(第三方检测 `thirdPartyFeeTotal`、任务 `feeAmount`)——与用户协议/申请单费用分区展示,避免混淆
|
||||
|
||||
### 1.4 与现有 UI 的关系
|
||||
|
||||
- **列表层**:新增紧凑「费用摘要条」,满足「特别关注」的扫视需求
|
||||
- **查看弹窗层**:补充完整只读缴费区块,可跳转来源单据详情
|
||||
- 视觉对齐 Fresh Mint 规范;金额用 `formatMoneyDisplay`;状态用 `el-tag`
|
||||
|
||||
---
|
||||
|
||||
## 2. 费用字段定义
|
||||
|
||||
### 2.1 入库 · 采集协议单(`paymentSummary`)
|
||||
|
||||
数据来源:`biz_protocol_payment` + `biz_protocol_payment_detail`(经 `collection_protocol_id` 关联)。
|
||||
|
||||
| 字段 | API 别名 | 说明 | 计算/口径 |
|
||||
|------|----------|------|-----------|
|
||||
| 缴费模式 | `payMode` | `dj` 趸交 / `fq` 分期 | 主表 |
|
||||
| 缴费模式标签 | `payModeLabel` | 趸交 / 分期 | 后端或前端码表 |
|
||||
| 合同金额 | `contractAmount` | 元 | 主表 `contract_amount` |
|
||||
| 已收金额 | `receivedAmount` | 元 | 明细中 `payStatus ∈ {yjf, jfqrz}` 的 `transferAmount` 之和(与 `ProtocolViewDialog` 一致) |
|
||||
| 待收金额 | `pendingAmount` | 元 | `max(contractAmount - receivedAmount, 0)`,合同为空时返回 `null` |
|
||||
| 缴费状态摘要 | `statusHint` | 如「已缴清」「1 期待确认」「2 期待缴费」 | 由明细 `payStatus` 聚合生成 |
|
||||
| 整体缴费状态 Tag | `overallPayStatus` / `overallPayStatusLabel` | 用于摘要条 Tag | 见 §2.1.1 |
|
||||
|
||||
#### 2.1.1 整体缴费状态(摘要 Tag 语义)
|
||||
|
||||
优先级从高到低:
|
||||
|
||||
1. 存在 `tfqrz`(退费确认中)→ Tag `warning`,文案「退费确认中」
|
||||
2. 存在 `ytf` 且无其他未完结明细 → Tag `info`,文案「已退费」
|
||||
3. 合同金额有效且 `pendingAmount <= 0` 且不存在 `dfj`/`jfqrz` → Tag `success`,文案「已缴清」
|
||||
4. 存在 `jfqrz` → Tag `warning`,文案「收款确认中」
|
||||
5. 存在 `dfj` → Tag `info`,文案「待缴费」
|
||||
6. 其他 → Tag `info`,文案「—」
|
||||
|
||||
分期场景下 `statusHint` 附加明细计数,例如:「分期 · 2 期已缴 / 1 期待缴费」。
|
||||
|
||||
### 2.2 出库 · 基础实验(`feeSummary`)
|
||||
|
||||
数据来源:`biz_pilot_infusion_schedule.amount`(售卖金额)+ `biz_pilot_payment`(按 `infusion_schedule_id` 一对一)。
|
||||
|
||||
| 字段 | API 别名 | 说明 |
|
||||
|------|----------|------|
|
||||
| 售卖金额 | `saleAmount` | `schedule.amount` |
|
||||
| 应缴金额 | `paymentAmount` | `BizPilotPayment.amount` |
|
||||
| 实收金额 | `transferAmount` | 已确认收款时的 `transfer_amount`,否则 `null` |
|
||||
| 缴费状态 | `payStatus` | `dfj` / `jfqrz` / `yjf` / `tfqrz` / `ytf` |
|
||||
| 缴费状态标签 | `payStatusLabel` | 与临床应用缴费模块码表一致 |
|
||||
| 缴费状态 Tag 类型 | `payStatusTagType` | 复用 `payStatusTagType()` |
|
||||
|
||||
无缴费记录时:`paymentAmount`、`payStatus` 等为 `null`,摘要展示「暂无缴费记录」。
|
||||
|
||||
---
|
||||
|
||||
## 3. 后端设计
|
||||
|
||||
### 3.1 列表 API 扩展
|
||||
|
||||
**接口**:现有 `GET /web/admin/qc-work-orders`(`list_work_orders`)
|
||||
|
||||
在 `_enrich_list_items` 流程末尾批量 enrich,避免 N+1:
|
||||
|
||||
#### 入库 Tab(`workOrderType=inbound`)
|
||||
|
||||
1. 收集本页工单的有效 `collectionProtocolId`(且 `receptionSource === cell_storage`)
|
||||
2. 批量查询 payment 主表 + 明细
|
||||
3. 为每条工单写入 `paymentSummary`(非 cell_storage 时为 `null`)
|
||||
|
||||
#### 出库 Tab(`workOrderType=outbound`)
|
||||
|
||||
1. 收集本页 `bizType === basic_experiment` 的 `infusionScheduleId`
|
||||
2. 批量查询 `BizPilotPayment` + schedule.amount
|
||||
3. 写入 `feeSummary`(非 basic_experiment 时为 `null`)
|
||||
|
||||
**新增工具函数建议位置**:`backend/app/crud/qc_work_order.py` 或拆至 `backend/app/services/qc_work_order_fee_summary.py`
|
||||
|
||||
```python
|
||||
def build_protocol_payment_summaries(db, protocol_ids: List[str], tenant_no: str) -> Dict[str, dict]: ...
|
||||
def build_basic_experiment_fee_summaries(db, schedule_ids: List[str], tenant_no: str) -> Dict[str, dict]: ...
|
||||
```
|
||||
|
||||
### 3.2 详情 API(可选增强)
|
||||
|
||||
- **入库查看**:现有工单详情接口增加 `paymentSummary` + `paymentDetails`(明细列表,供弹窗展开;可限制最多返回当前协议全部明细,通常 ≤ 分期期数)
|
||||
- **出库查看**:`get_outbound_qc_detail` 增加 `feeSummary`;`OutboundQcViewDialog` 已有 schedule 区块,补充缴费只读段
|
||||
|
||||
本期 **最低交付**:列表摘要字段;详情弹窗至少与列表同级信息,推荐附带 1~3 条关键明细(分期时下一期应缴)。
|
||||
|
||||
### 3.3 数据库
|
||||
|
||||
**无需 DDL**。只读 join 现有表:
|
||||
|
||||
- `biz_protocol_payment` / `biz_protocol_payment_detail`
|
||||
- `biz_pilot_payment` / `biz_pilot_infusion_schedule`
|
||||
|
||||
### 3.4 性能
|
||||
|
||||
- 列表 enrich 按 **当前页 protocol_id / schedule_id 去重** 后批量查询
|
||||
- 单页默认 10~20 条,额外 1~2 次 batch query,可接受
|
||||
|
||||
---
|
||||
|
||||
## 4. 前端设计
|
||||
|
||||
### 4.1 入库 · 样本组费用摘要条
|
||||
|
||||
**文件**:`web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderSampleGroup.vue`
|
||||
|
||||
**位置**:`.qc-sample-row__ctx` 下方、工单 Tab 上方,仅当组内任一工单 `receptionSource === 'cell_storage'` 且存在 `paymentSummary` 时渲染。
|
||||
|
||||
**布局**(单行 flex,窄屏换行):
|
||||
|
||||
```
|
||||
[协议费用] 趸交 · 合同 ¥28,000.00 · 已收 ¥28,000.00 · 待收 ¥0.00 · [已缴清]
|
||||
```
|
||||
|
||||
- 背景:`#ecfdf5`(`--primary-bg`),上边框与 ctx 区分
|
||||
- 字体:12px,标签 muted,金额 semibold
|
||||
- 右侧 Tag:`overallPayStatusLabel` + 语义色
|
||||
- 点击摘要条或「查看缴费」链接:打开入库工单查看弹窗并滚动至缴费区(可选,P1)
|
||||
|
||||
**组内多工单**:费用按 `collectionProtocolId` 去重,同协议只展示一份(组 context 已按样本聚合)。
|
||||
|
||||
### 4.2 出库 · 基础实验卡片摘要
|
||||
|
||||
**文件**:`web-admin/src/views/quality-inspection/qc-work-order/QcWorkOrderSingleCard.vue`
|
||||
|
||||
**条件**:`activeTypeTab === 'outbound' && row.bizType === 'basic_experiment' && row.feeSummary`
|
||||
|
||||
**位置**:`.qc-work-order-card__meta` 末尾或独立 `.qc-fee-summary` 行(全宽 `grid-column: 1 / -1`)
|
||||
|
||||
```
|
||||
[费用信息] 售卖 ¥12,000.00 · 应缴 ¥12,000.00 · [待缴费]
|
||||
```
|
||||
|
||||
已缴费时追加:`实收 ¥12,000.00`
|
||||
|
||||
### 4.3 查看弹窗
|
||||
|
||||
| 场景 | 文件 | 新增区块 |
|
||||
|------|------|----------|
|
||||
| 入库(cell_storage) | `index.vue` `viewSections` | 「协议缴费信息」:模式、合同、已收、待收、状态 Tag;分期时列 1 行下一期应缴(如有) |
|
||||
| 出库(basic_experiment) | `OutboundQcViewDialog.vue` | 「缴费信息」:售卖、应缴、实收、状态;可复用 `ClinicalPaymentSubmitReadonly` 精简字段 |
|
||||
|
||||
跳转链接(可选 P1):
|
||||
|
||||
- 入库 → `/#/cell-storage/protocol` 并打开对应协议查看弹窗(需协议 id)
|
||||
- 出库 → 基础实验申请单查看(`applicationId` 若列表已有)
|
||||
|
||||
### 4.4 筛选修正
|
||||
|
||||
**文件**:`index.vue` 出库 Tab 筛选「业务类型」
|
||||
|
||||
补全选项:
|
||||
|
||||
```html
|
||||
<el-option label="基础实验" value="basic_experiment" />
|
||||
```
|
||||
|
||||
与三种出库来源一致。
|
||||
|
||||
### 4.5 API 类型
|
||||
|
||||
**文件**:`web-admin/src/api/qc-work-order.ts`
|
||||
|
||||
```typescript
|
||||
export type QcProtocolPaymentSummary = {
|
||||
payMode?: string
|
||||
payModeLabel?: string
|
||||
contractAmount?: number | null
|
||||
receivedAmount?: number | null
|
||||
pendingAmount?: number | null
|
||||
statusHint?: string
|
||||
overallPayStatus?: string
|
||||
overallPayStatusLabel?: string
|
||||
}
|
||||
|
||||
export type QcBasicExperimentFeeSummary = {
|
||||
saleAmount?: number | null
|
||||
paymentAmount?: number | null
|
||||
transferAmount?: number | null
|
||||
payStatus?: string
|
||||
payStatusLabel?: string
|
||||
}
|
||||
|
||||
// QcWorkOrder 扩展
|
||||
paymentSummary?: QcProtocolPaymentSummary | null
|
||||
feeSummary?: QcBasicExperimentFeeSummary | null
|
||||
```
|
||||
|
||||
### 4.6 公共组件(可选)
|
||||
|
||||
若入库/出库摘要条样式一致,可抽 `QcWorkOrderFeeSummaryBar.vue`(props: `variant: 'inbound-protocol' | 'outbound-basic'` + summary object)。**非必须**,首版可在两处各写 scoped 块,YAGNI。
|
||||
|
||||
---
|
||||
|
||||
## 5. 交互与空态
|
||||
|
||||
| 情况 | 展示 |
|
||||
|------|------|
|
||||
| 科研捐赠入库工单 | 不渲染费用区块 |
|
||||
| 中试/临床出库工单 | 不渲染费用区块 |
|
||||
| 采集协议无 payment 主表 | 摘要:「暂无缴费信息」 |
|
||||
| 基础实验无 payment 记录 | 摘要:「暂无缴费记录」;仍展示售卖金额(若有) |
|
||||
| 金额为 null | 显示 `—` |
|
||||
|
||||
**只读**:摘要区无编辑、无确认收款按钮。
|
||||
|
||||
---
|
||||
|
||||
## 6. 测试要点
|
||||
|
||||
### 6.1 入库
|
||||
|
||||
- [ ] 细胞存储样本组显示协议费用摘要,数值与采集协议单查看弹窗一致
|
||||
- [ ] 科研捐赠样本组不显示费用摘要
|
||||
- [ ] 趸交已缴清 / 分期部分待缴 / 收款确认中 / 退费确认中 Tag 正确
|
||||
- [ ] 同页多条工单同协议,摘要去重一致
|
||||
|
||||
### 6.2 出库
|
||||
|
||||
- [ ] 基础实验卡片显示售卖 + 缴费状态
|
||||
- [ ] 中试服务、临床应用卡片无费用摘要
|
||||
- [ ] 筛选「基础实验」可正确过滤
|
||||
- [ ] 查看弹窗缴费区与列表摘要一致
|
||||
|
||||
### 6.3 回归
|
||||
|
||||
- [ ] 第三方检测费用展示不受影响
|
||||
- [ ] 临时质检 Tab 无费用区块
|
||||
- [ ] 列表分页、分组、Tab 切换正常
|
||||
|
||||
---
|
||||
|
||||
## 7. 影响文件清单
|
||||
|
||||
| 层级 | 文件 |
|
||||
|------|------|
|
||||
| 后端 | `backend/app/crud/qc_work_order.py`(+ 可选 `services/qc_work_order_fee_summary.py`) |
|
||||
| 后端 Schema | `backend/app/schemas/qc_work_order.py`(若响应体走 Pydantic) |
|
||||
| 前端 API | `web-admin/src/api/qc-work-order.ts` |
|
||||
| 前端页面 | `QcWorkOrderSampleGroup.vue`、`QcWorkOrderSingleCard.vue`、`index.vue`、`OutboundQcViewDialog.vue` |
|
||||
| 工具 | 复用 `formatMoneyDisplay`、`payModeLabel`、`payStatusLabel`、`payStatusTagType` |
|
||||
|
||||
---
|
||||
|
||||
## 8. 后续扩展(本期不做)
|
||||
|
||||
- 临床应用出库工单费用摘要(`feeSummary` 结构可复用 `BizPilotPayment`)
|
||||
- 摘要条点击跳转来源单据
|
||||
- 与「分期缴费用户预警」模块联动高亮欠费
|
||||
|
||||
---
|
||||
|
||||
## 9. 决策记录
|
||||
|
||||
| 日期 | 决策 |
|
||||
|------|------|
|
||||
| 2026-06-12 | 「费用变化」= **当前快照**,不做历史轨迹 |
|
||||
| 2026-06-12 | 入库仅 **采集协议单**;出库仅 **基础实验** |
|
||||
| 2026-06-12 | 列表摘要 + 查看弹窗详情,推荐实现路径 |
|
||||
Reference in new issue
Block a user