Commit 23a97856 by chenwq

处理库存为0的券

1 parent 0ac6b609
......@@ -280,8 +280,9 @@ export default {
// 恢复选择
addSelected() {
this.$nextTick(() => {
if (this.selectedGiftList[this.activeName].list && this.selectedGiftList[this.activeName].list.length) {
this.selectedGiftList[this.activeName].list.forEach(row => {
var list = JSON.parse(JSON.stringify(this.selectedGiftList[this.activeName].list))
if (list && list.length) {
list.forEach(row => {
var idx = this.giftList.findIndex(k => k.id == row.id)
if (idx != -1 && row.status != '3') {
this.$refs[this.activeName + 'Ref'].$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.giftList[idx], true)
......@@ -354,6 +355,9 @@ export default {
list.forEach(item => {
if (item.status == '3') {
this.selectedGiftList[this.activeName].list.push(item)
} else if (this.giftList.findIndex(k => k.id == item.id) == '-1') {
// 没有库存的券
this.selectedGiftList[this.activeName].list.push(item)
}
})
this.recoveryTotal()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!