|
@@ -299,7 +299,7 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<template v-if="scope.row.fang">
|
|
<template v-if="scope.row.fang">
|
|
<template v-for="(item, index) in scope.row.walletRelaList">
|
|
<template v-for="(item, index) in scope.row.walletRelaList">
|
|
- <el-tag v-if="item.type === 'REBATE'" :key="index" size="mini">
|
|
|
|
|
|
+ <el-tag v-if="item.type === 'REBATE'" :key="index" style="margin: 5px" type="success" size="mini">
|
|
{{ item.walletName }}
|
|
{{ item.walletName }}
|
|
</el-tag>
|
|
</el-tag>
|
|
</template>
|
|
</template>
|
|
@@ -344,7 +344,7 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<template v-if="scope.row.fang">
|
|
<template v-if="scope.row.fang">
|
|
<template v-for="(item, index) in scope.row.walletRelaList">
|
|
<template v-for="(item, index) in scope.row.walletRelaList">
|
|
- <el-tag v-if="item.type === 'COMMONLY'" :key="index" size="mini">
|
|
|
|
|
|
+ <el-tag v-if="item.type === 'COMMONLY'" :key="index" style="margin: 5px" type="success" size="mini">
|
|
{{ item.walletName }}
|
|
{{ item.walletName }}
|
|
</el-tag>
|
|
</el-tag>
|
|
</template>
|
|
</template>
|
|
@@ -402,7 +402,7 @@
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
class="textColor el-popover-left"
|
|
class="textColor el-popover-left"
|
|
- @click="handleEdit(scope.row)"
|
|
|
|
|
|
+ @click="handleEdit(scope.row, scope.$index)"
|
|
>编辑</el-button>
|
|
>编辑</el-button>
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
confirm-button-text="好的"
|
|
confirm-button-text="好的"
|
|
@@ -643,9 +643,9 @@ export default {
|
|
this.$successMsg(status ? '启用' : '作废')
|
|
this.$successMsg(status ? '启用' : '作废')
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- handleEdit(row) {
|
|
|
|
|
|
+ handleEdit(row, index) {
|
|
row.fang = !row.fang
|
|
row.fang = !row.fang
|
|
- !row.fang && this.handleWallet(row)
|
|
|
|
|
|
+ !row.fang && this.handleWallet(row, index)
|
|
// this.$nextTick(() => {
|
|
// this.$nextTick(() => {
|
|
// this.$refs.plTable.doLayout()
|
|
// this.$refs.plTable.doLayout()
|
|
// })
|
|
// })
|
|
@@ -677,22 +677,29 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- if (NoRebateWalletListId.length && !~NoRebateWalletListId.indexOf(this.importWallet.walletId)) {
|
|
|
|
- this.importWallet.walletId && this.NoRebateWalletList2.push(this.importWallet)
|
|
|
|
|
|
+ if (NoRebateWalletListId.length && this.importWallet.walletId && !~NoRebateWalletListId.indexOf(this.importWallet.walletId)) {
|
|
|
|
+ this.NoRebateWalletList2.push(this.importWallet)
|
|
|
|
+ NoRebateWalletListId.push(this.importWallet.walletId)
|
|
}
|
|
}
|
|
if (rebateListId.length && this.importRebate.walletRebateId && !~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.rebateList2.push(this.importRebate)
|
|
|
|
+ rebateListId.push(this.importRebate.walletRebateId)
|
|
}
|
|
}
|
|
const item = this.priceList.find(k => k.priceTypeId === e)
|
|
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', [])
|
|
this.$set(row, 'rebateWalletIds', [])
|
|
|
|
+ this.dataList[index].walletIds = []
|
|
|
|
+ this.dataList[index].rebateWalletIds = []
|
|
if (item.walletId) {
|
|
if (item.walletId) {
|
|
- this.$set(row, 'walletIds', [...row.walletIds, ...NoRebateWalletListId])
|
|
|
|
|
|
+ this.$set(row, 'walletIds', [...new Set([...row.walletIds, ...NoRebateWalletListId])])
|
|
|
|
+ this.dataList[index].walletIds = [...new Set([...row.walletIds, ...NoRebateWalletListId])]
|
|
}
|
|
}
|
|
if (item.walletId2) {
|
|
if (item.walletId2) {
|
|
- this.$set(row, 'rebateWalletIds', [...row.rebateWalletIds, ...rebateListId])
|
|
|
|
|
|
+ this.$set(row, 'rebateWalletIds', [...new Set([...row.rebateWalletIds, ...rebateListId])])
|
|
|
|
+ this.dataList[index].rebateWalletIds = [...new Set([...row.rebateWalletIds, ...rebateListId])]
|
|
}
|
|
}
|
|
|
|
+ console.log(this.dataList, row, 7868687)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.dataList[index][name] = row[name]
|
|
this.dataList[index][name] = row[name]
|
|
@@ -702,6 +709,8 @@ export default {
|
|
this.dataList[index][name] = ''
|
|
this.dataList[index][name] = ''
|
|
this.$set(row, 'walletIds', [])
|
|
this.$set(row, 'walletIds', [])
|
|
this.$set(row, 'rebateWalletIds', [])
|
|
this.$set(row, 'rebateWalletIds', [])
|
|
|
|
+ this.dataList[index].walletIds = []
|
|
|
|
+ this.dataList[index].rebateWalletIds = []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 下载excel模板
|
|
// 下载excel模板
|
|
@@ -1094,6 +1103,7 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
savePolicy(this.dataList)
|
|
savePolicy(this.dataList)
|
|
.then(res => {
|
|
.then(res => {
|
|
this.dataList = []
|
|
this.dataList = []
|
|
@@ -1151,7 +1161,9 @@ export default {
|
|
]
|
|
]
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.priceList = res.data.records
|
|
this.priceList = res.data.records
|
|
- this.priceList2 = this.quChong(res.data.records, 'priceTypeId')
|
|
|
|
|
|
+ if (res.data.records && res.data.records.length) {
|
|
|
|
+ this.priceList2 = this.quChong(res.data.records, 'priceTypeId')
|
|
|
|
+ }
|
|
return Promise.resolve()
|
|
return Promise.resolve()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -1173,7 +1185,7 @@ export default {
|
|
}
|
|
}
|
|
return result
|
|
return result
|
|
},
|
|
},
|
|
- handleWallet(row) {
|
|
|
|
|
|
+ handleWallet(row, index) {
|
|
if (row.saleTypeCode) {
|
|
if (row.saleTypeCode) {
|
|
this.getPriceSalesRelaListV2(row.saleTypeCode).then(res => {
|
|
this.getPriceSalesRelaListV2(row.saleTypeCode).then(res => {
|
|
this.NoRebateWalletList2 = []
|
|
this.NoRebateWalletList2 = []
|
|
@@ -1226,8 +1238,10 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- this.$set(row, 'walletIds', [...row.walletIds, ...NoRebateWalletListId])
|
|
|
|
- this.$set(row, 'rebateWalletIds', [...row.rebateWalletIds, ...rebateListId])
|
|
|
|
|
|
+ this.$set(row, 'walletIds', [...new Set([...row.walletIds, ...NoRebateWalletListId])])
|
|
|
|
+ this.$set(row, 'rebateWalletIds', [...new Set([...row.rebateWalletIds, ...rebateListId])])
|
|
|
|
+ this.dataList[index].walletIds = [...new Set([...row.walletIds, ...NoRebateWalletListId])]
|
|
|
|
+ this.dataList[index].rebateWalletIds = [...new Set([...row.rebateWalletIds, ...rebateListId])]
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|