Commit 7fd2ab90c4eec2d2ba0ed2604a0ce000254789de

Authored by gesilong
1 parent 5c9dfb49

commit:修改功能展示样品名称

@@ -267,6 +267,14 @@ export default { @@ -267,6 +267,14 @@ export default {
267 line.assayApplyId && !list.some(item => item.assayApplyId === line.assayApplyId) 267 line.assayApplyId && !list.some(item => item.assayApplyId === line.assayApplyId)
268 ) 268 )
269 this.applyDetailOptions = list.concat(extra) 269 this.applyDetailOptions = list.concat(extra)
  270 + // 用数据源补全回显行的样品/数量等固定字段(详情接口明细行不含 category),并刷新表格
  271 + const merged = (detailLines || []).map(line => {
  272 + const opt = list.find(o => o.assayApplyId === line.assayApplyId) ||
  273 + extra.find(o => o.assayApplyId === line.assayApplyId) || {}
  274 + return { ...opt, ...line }
  275 + })
  276 + const detailTable = this.$refs.detailTable
  277 + detailTable && detailTable.setRows && detailTable.setRows(merged)
270 }) 278 })
271 .catch(() => { 279 .catch(() => {
272 this.applyDetailOptions = (detailLines || []).map(item => ({ ...item })) 280 this.applyDetailOptions = (detailLines || []).map(item => ({ ...item }))