|
|
|
@ -138,7 +138,6 @@ |
|
|
|
|
return { |
|
|
|
|
selectedRows: [], |
|
|
|
|
totalPrice: 0, |
|
|
|
|
ssrjian: 0, |
|
|
|
|
description: '购物车管理页面', |
|
|
|
|
// 表头 |
|
|
|
|
columns: [ |
|
|
|
@ -217,7 +216,6 @@ |
|
|
|
|
this.selectedRowKeys = selectedRowKeys |
|
|
|
|
}, |
|
|
|
|
onSelect(record, selected) { |
|
|
|
|
var ssr |
|
|
|
|
// 若选中,直接push |
|
|
|
|
if (selected) { |
|
|
|
|
this.selectedRows.push(record) |
|
|
|
@ -227,8 +225,8 @@ |
|
|
|
|
let index = this.selectedRows.findIndex((item) => item.id == record.id) |
|
|
|
|
if (index >= 0) { |
|
|
|
|
this.selectedRows.splice(index, 1) |
|
|
|
|
this.ssrjian = record.number*record.price |
|
|
|
|
this.totalPrice=this.totalPrice- this.ssrjian |
|
|
|
|
this.totalPrice=this.totalPrice- record.number*record.price |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|