| | |
| | | |
| | | }, |
| | | handleRemoveStore(index) { |
| | | // 先删除表格中的数据 |
| | | this.tableData.splice(index, 1); |
| | | |
| | | // 同步更新 huiminCard.useIds |
| | | if (this.huiminCard.useScope === '1') { |
| | | // 指定门店 |
| | | this.huiminCard.useIds = this.tableData.map(item => item.storeId).join(','); |
| | | } else if (this.huiminCard.useScope === '2') { |
| | | // 指定场地 |
| | | this.huiminCard.useIds = this.tableData.map(item => item.siteId).join(','); |
| | | } |
| | | |
| | | // 如果没有数据了,设置为空字符串而不是null |
| | | if (this.tableData.length === 0) { |
| | | this.huiminCard.useIds = ''; |
| | | } |
| | | }, |
| | | handleSelectStore() { |
| | | this.queryParams.pageNum = 1; |