|
@@ -274,20 +274,11 @@ export default {
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
},
|
|
|
onSelectChange (record, selected, selectedRows, nativeEvent) {
|
|
|
- const _this = this
|
|
|
if (this.type != 'supplier') { // 供应商增加产品
|
|
|
if (selected) { // 选择
|
|
|
this.selectedRows.push(record)
|
|
|
} else { // 取消
|
|
|
- const arrId = []
|
|
|
- this.selectedRows.map((item, index) => {
|
|
|
- if (item.productSn == record.productSn) {
|
|
|
- arrId.push(index)
|
|
|
- }
|
|
|
- })
|
|
|
- arrId.map((item, index) => {
|
|
|
- _this.selectedRows = _this.selectedRows.slice(item, item + 1)
|
|
|
- })
|
|
|
+ this.selectedRows = selectedRows
|
|
|
}
|
|
|
}
|
|
|
},
|