Showing
1 changed file
with
8 additions
and
0 deletions
| @@ -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 })) |