|
@@ -49,7 +49,7 @@
|
|
class="sTable"
|
|
class="sTable"
|
|
ref="chooseTable"
|
|
ref="chooseTable"
|
|
size="small"
|
|
size="small"
|
|
- :rowKey="(record,i) => i"
|
|
|
|
|
|
+ :rowKey="(record) => record.id"
|
|
:row-selection="{ columnWidth: 40,getCheckboxProps: record => ({ props: { disabled: record.currentStockQty == 0 || record.isCheckedFlag} }) }"
|
|
:row-selection="{ columnWidth: 40,getCheckboxProps: record => ({ props: { disabled: record.currentStockQty == 0 || record.isCheckedFlag} }) }"
|
|
@rowSelection="rowSelectionFun"
|
|
@rowSelection="rowSelectionFun"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
@@ -211,7 +211,7 @@ export default {
|
|
handleAdd (row) {
|
|
handleAdd (row) {
|
|
const selectArr = this.rowSelectionInfo ? this.rowSelectionInfo.selectedRowKeys : null
|
|
const selectArr = this.rowSelectionInfo ? this.rowSelectionInfo.selectedRowKeys : null
|
|
if (selectArr && selectArr.length > 0) {
|
|
if (selectArr && selectArr.length > 0) {
|
|
- const pot = selectArr.findIndex(item => { return item == row.sparePartsDetailSn })
|
|
|
|
|
|
+ const pot = selectArr.findIndex(item => { return item == row.id })
|
|
selectArr.splice(pot, 1)
|
|
selectArr.splice(pot, 1)
|
|
const index = this.rowSelectionInfo.selectedRows.findIndex(item => { return item.sparePartsDetailSn == row.sparePartsDetailSn })
|
|
const index = this.rowSelectionInfo.selectedRows.findIndex(item => { return item.sparePartsDetailSn == row.sparePartsDetailSn })
|
|
this.rowSelectionInfo.selectedRows.splice(index, 1)
|
|
this.rowSelectionInfo.selectedRows.splice(index, 1)
|