|
@@ -308,7 +308,7 @@
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<el-select
|
|
<el-select
|
|
- v-if="!priceList2.length"
|
|
|
|
|
|
+ v-if="!rebateList2.length"
|
|
v-model="scope.row.rebateWalletIds"
|
|
v-model="scope.row.rebateWalletIds"
|
|
size="mini"
|
|
size="mini"
|
|
multiple
|
|
multiple
|
|
@@ -353,7 +353,7 @@
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<el-select
|
|
<el-select
|
|
- v-if="!priceList2.length"
|
|
|
|
|
|
+ v-if="!NoRebateWalletList2.length"
|
|
v-model="scope.row.walletIds"
|
|
v-model="scope.row.walletIds"
|
|
size="mini"
|
|
size="mini"
|
|
multiple
|
|
multiple
|
|
@@ -700,40 +700,45 @@ export default {
|
|
setText(e, index, row, name) {
|
|
setText(e, index, row, name) {
|
|
if (e) {
|
|
if (e) {
|
|
if (name === 'priceType') {
|
|
if (name === 'priceType') {
|
|
- const item = this.priceList.find(k => k.priceTypeId === e)
|
|
|
|
this.NoRebateWalletList2 = []
|
|
this.NoRebateWalletList2 = []
|
|
this.rebateList2 = []
|
|
this.rebateList2 = []
|
|
const rebateListId = []
|
|
const rebateListId = []
|
|
const NoRebateWalletListId = []
|
|
const NoRebateWalletListId = []
|
|
this.priceList.forEach(k => {
|
|
this.priceList.forEach(k => {
|
|
if (k.priceTypeId === e) {
|
|
if (k.priceTypeId === e) {
|
|
- this.NoRebateWalletList2.push(
|
|
|
|
- {
|
|
|
|
- id: k.walletId,
|
|
|
|
- name: k.walletName
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
- this.rebateList2.push({
|
|
|
|
- walletRebateId: k.walletId2,
|
|
|
|
- name: k.walletName2
|
|
|
|
- })
|
|
|
|
- NoRebateWalletListId.push(k.walletId)
|
|
|
|
- rebateListId.push(k.walletId2)
|
|
|
|
|
|
+ if (k.walletId) {
|
|
|
|
+ this.NoRebateWalletList2.push(
|
|
|
|
+ {
|
|
|
|
+ id: k.walletId,
|
|
|
|
+ name: k.walletName
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ NoRebateWalletListId.push(k.walletId)
|
|
|
|
+ }
|
|
|
|
+ if (k.walletId2) {
|
|
|
|
+ this.rebateList2.push({
|
|
|
|
+ walletRebateId: k.walletId2,
|
|
|
|
+ name: k.walletName2
|
|
|
|
+ })
|
|
|
|
+ rebateListId.push(k.walletId2)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
if (NoRebateWalletListId.length && !~NoRebateWalletListId.indexOf(this.importWallet.walletId)) {
|
|
if (NoRebateWalletListId.length && !~NoRebateWalletListId.indexOf(this.importWallet.walletId)) {
|
|
this.importWallet.walletId && this.NoRebateWalletList2.push(this.importWallet)
|
|
this.importWallet.walletId && this.NoRebateWalletList2.push(this.importWallet)
|
|
}
|
|
}
|
|
- if (rebateListId.length && !~rebateListId.indexOf(this.importRebate.walletRebateId)) {
|
|
|
|
|
|
+ if (rebateListId.length && this.importRebate.walletRebateId && !~rebateListId.indexOf(this.importRebate.walletRebateId)) {
|
|
this.importRebate.walletRebateId && this.rebateList2.push(this.importRebate)
|
|
this.importRebate.walletRebateId && this.rebateList2.push(this.importRebate)
|
|
}
|
|
}
|
|
|
|
+ const item = this.priceList.find(k => k.priceTypeId === e)
|
|
this.dataList[index][name] = item.priceTypeName
|
|
this.dataList[index][name] = item.priceTypeName
|
|
this.$set(row, 'walletIds', [])
|
|
this.$set(row, 'walletIds', [])
|
|
|
|
+ this.$set(row, 'rebateWalletIds', [])
|
|
if (item.walletId) {
|
|
if (item.walletId) {
|
|
- this.$set(row, 'walletIds', [...row.walletIds, item.walletId])
|
|
|
|
|
|
+ this.$set(row, 'walletIds', [...row.walletIds, ...NoRebateWalletListId])
|
|
}
|
|
}
|
|
if (item.walletId2) {
|
|
if (item.walletId2) {
|
|
- this.$set(row, 'rebateWalletIds', [...row.rebateWalletIds, item.walletId2])
|
|
|
|
|
|
+ this.$set(row, 'rebateWalletIds', [...row.rebateWalletIds, ...rebateListId])
|
|
}
|
|
}
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -1269,20 +1274,24 @@ export default {
|
|
this.rebateList2 = []
|
|
this.rebateList2 = []
|
|
const rebateListId = []
|
|
const rebateListId = []
|
|
const NoRebateWalletListId = []
|
|
const NoRebateWalletListId = []
|
|
- this.priceList.length && this.priceList.forEach(k => {
|
|
|
|
|
|
+ this.priceList.forEach(k => {
|
|
if (k.priceTypeName === row.priceType) {
|
|
if (k.priceTypeName === row.priceType) {
|
|
- rebateListId.push(k.walletId2)
|
|
|
|
- NoRebateWalletListId.push(k.walletId)
|
|
|
|
- k.walletId && this.NoRebateWalletList2.push(
|
|
|
|
- {
|
|
|
|
- id: k.walletId,
|
|
|
|
- name: k.walletName
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
- k.walletId2 && this.rebateList2.push({
|
|
|
|
- walletRebateId: k.walletId2,
|
|
|
|
- name: k.walletName2
|
|
|
|
- })
|
|
|
|
|
|
+ if (k.walletId) {
|
|
|
|
+ this.NoRebateWalletList2.push(
|
|
|
|
+ {
|
|
|
|
+ id: k.walletId,
|
|
|
|
+ name: k.walletName
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ NoRebateWalletListId.push(k.walletId)
|
|
|
|
+ }
|
|
|
|
+ if (k.walletId2) {
|
|
|
|
+ rebateListId.push(k.walletId2)
|
|
|
|
+ this.rebateList2.push({
|
|
|
|
+ walletRebateId: k.walletId2,
|
|
|
|
+ name: k.walletName2
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
if (row.walletIds && row.walletIds.length) {
|
|
if (row.walletIds && row.walletIds.length) {
|
|
@@ -1311,6 +1320,8 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ this.$set(row, 'walletIds', [...row.walletIds, ...NoRebateWalletListId])
|
|
|
|
+ this.$set(row, 'rebateWalletIds', [...row.rebateWalletIds, ...rebateListId])
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|