|
|
|
|
@ -7,7 +7,7 @@ |
|
|
|
|
<template slot-scope="props"> |
|
|
|
|
<!-- 关联表单列表(带复选框) --> |
|
|
|
|
<el-table :data="props.row.oneFormList || []" size="mini" style="width: 100%" |
|
|
|
|
@selection-change="(val) => handleSelectionChange(val, props.row)" border> |
|
|
|
|
@selection-change="(val) => handleSelectionChange(val, props.row)" border ref="innerTable"> |
|
|
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
|
<el-table-column type="index" label="#" width="55" /> |
|
|
|
|
<el-table-column label="物料名称" prop="materialName" /> |
|
|
|
|
@ -109,7 +109,11 @@ export default { |
|
|
|
|
item => item.parentMaterialId !== parentRow.materialId |
|
|
|
|
); |
|
|
|
|
this.selectedRows.push(...selectionWithParent); |
|
|
|
|
|
|
|
|
|
// 获取最后一个被选中的行(通常是 selection 数组的最后一项) |
|
|
|
|
const lastSelected = selection[selection.length - 1]; |
|
|
|
|
|
|
|
|
|
// 手动取消该行在 UI 上的勾选 |
|
|
|
|
this.$refs.innerTable.toggleRowSelection(lastSelected, false); |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|