日期:2026-10-08
状态:已确认(2026-10-08)
关联:
docs/superpowers/specs/2026-10-07-sample-freight-batch-design.mddocs/superpowers/specs/2026-10-08-sample-freight-menu-design.md- Demo:
docs/demos/2026-10-08-freight-link-existing-demo.html
采集协议单(细胞存储 / 科研捐赠)的「配置运费」弹窗中,「关联已有」仅展示:
多笔同运输方式、同金额的批次无法区分,用户难以判断应关联哪一笔。
「运费信息」菜单页(/#/market/cell-storage/sample-freight)已用合并单元格 + 样本明细列,信息完整,业务确认希望「关联已有」对齐该列表。
| 项 | 结论 |
|---|---|
| 展示形态 | 对齐「运费信息」列表:批次字段 rowspan + 样本明细行 |
| 覆盖入口 | ① 协议单 SampleTransportFormSection「配置运费」;②「运费信息」页 FreightConfigDialog「关联已有」 |
| 创建人 | 列表展示创建人(昵称);运费信息主列表已落地 createBy / createByName |
| 后端 | 复用 GET /web/admin/sample-freights?includeItems=true;关联已有路径须传 includeItems=true |
| 新接口 | 不新增 |
dialog-form-layout;无 backdrop blur;append-to-body。与运费信息主列表对齐(去掉操作列,增加单选):
| 列 | 合并(按 freightId rowspan) | 说明 |
|---|---|---|
| 选择 | ✓ | 单选;点该批次任一行选中整笔 |
| 运输方式 | ✓ | el-tag |
| 运费(元) | ✓ | |
| 关联数 | ✓ | |
| 来源 | 否 | 细胞存储 / 科研捐赠 Tag |
| 协议单号 | 否 | |
| 样本编码 | 否 | |
| 样本类型 | 否 | |
| 创建人 | ✓ | createByName \|\| createBy \|\| — |
| 创建时间 | ✓ |
—。max-height 可滚;stripe + list-table,对齐 Fresh Mint。弹窗内可选:关键词输入(运输方式 / 协议单号 / 样本编码),调用现有 list keyword 参数。
不做运输方式/来源/日期完整筛选条。
| | 协议单内 | 运费信息页 | |--|----------|------------| | 选中样本来源 | 当前协议单已勾选样本 | 弹窗内样本多选表 | | 关联已有表 | 本规格 | 本规格(同一组件) | | 确定后 | create/link 或草稿(现有逻辑) | create/link 后刷新主列表 |
GET /web/admin/sample-freights?page=1&pageSize=50&includeItems=true&keyword?=
响应批次字段须含(已有或近期已补):
transportMode / transportModeLabel / freightAmount / linkedSampleCountcreateBy / createByName / createTimeitems[]:sampleSource、sampleId、sampleCode、protocolId、protocolNo、sampleTypeName复用运费信息页逻辑(可抽到工具或公共组件):
flattenFreights(list) → 扁平行 + rowspan / isFirst / freightIdspan-method 合并:选择、运输方式、运费、关联数、创建人、创建时间选中态:维护 selectedFreightId;current-change 或 radio 以 freightId 为准(非样本行 key)。
| 文件 | 职责 |
|---|---|
新建(建议)web-admin/src/components/business/sample-freight-pick-table/index.vue |
关联已有选批表格 |
sample-transport-form-section/index.vue |
协议单弹窗改用公共表;includeItems: true |
sample-freight/FreightConfigDialog.vue |
同上 |
sample-freight/index.vue |
已含创建人;可改为复用 flatten 工具(可选,非必须) |
若不愿抽组件:允许两处各改表格,但列定义与 flatten 必须一致。
_row_to_dict 返回 createBy / createByName(本会话已改)。flatten + 选批表格组件。FreightConfigDialog「关联已有」。SampleTransportFormSection「关联已有」(细胞存储 + 科研捐赠共用该组件)。