@@ -20,7 +20,7 @@
:datasource="datasource"
:selection.sync="selection"
:need-page="false"
- row-key="categoryCode"
+ row-key="rowKey"
>
</ele-pro-table>
</el-card>
@@ -154,6 +154,11 @@
// pageNum: page,
// size: limit
});
+ const list = (res && (res.data?.list || res.data || res)) || [];
+ // categoryCode 可能重复(同一物料多工序),拼接 index 合成唯一 rowKey
+ list.forEach((row, idx) => {
+ row.rowKey = `${row.categoryCode || ''}_${idx}`;
+ });
return res;
},
/* 刷新表格 */