|
@@ -221,7 +221,13 @@ export default {
|
|
},
|
|
},
|
|
// 切换tab
|
|
// 切换tab
|
|
changeTab (e) {
|
|
changeTab (e) {
|
|
- this.promoProductClz = e
|
|
|
|
|
|
+ // 促销阶梯
|
|
|
|
+ if (e.indexOf('GIFT-') >= 0) {
|
|
|
|
+ this.promoProductClz = e.split('-')[0]
|
|
|
|
+ this.queryParam.scopeLevel = e.split('-')[1]
|
|
|
|
+ } else {
|
|
|
|
+ this.promoProductClz = e
|
|
|
|
+ }
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|
|
},
|
|
},
|
|
// 双击列表添加产品
|
|
// 双击列表添加产品
|
|
@@ -269,7 +275,7 @@ export default {
|
|
// 是否卖产品送采购额
|
|
// 是否卖产品送采购额
|
|
const isMcpScge = this.promoRuleData.promotionRuleType == 'BUY_PROD_GIVE_MONEY' && this.promoRuleData.scopeFlag === '1'
|
|
const isMcpScge = this.promoRuleData.promotionRuleType == 'BUY_PROD_GIVE_MONEY' && this.promoRuleData.scopeFlag === '1'
|
|
// 阶梯
|
|
// 阶梯
|
|
- const hasScopeLevel = this.promoRuleData && this.promoRuleData.giveRuleList && this.promoRuleData.giveRuleList[0]
|
|
|
|
|
|
+ const giveRuleList = this.promoRuleData && this.promoRuleData.giveRuleList
|
|
// 选项卡数据
|
|
// 选项卡数据
|
|
const tabList = []
|
|
const tabList = []
|
|
if (this.promoRuleData) {
|
|
if (this.promoRuleData) {
|
|
@@ -280,8 +286,14 @@ export default {
|
|
tabList.push({ text: '正价产品', val: 'REGULAR' })
|
|
tabList.push({ text: '正价产品', val: 'REGULAR' })
|
|
}
|
|
}
|
|
if (this.promoRuleData.regularPromotionSameFlag === '0' || this.promoRuleData.scopeFlag === '0' || isMcpScge) {
|
|
if (this.promoRuleData.regularPromotionSameFlag === '0' || this.promoRuleData.scopeFlag === '0' || isMcpScge) {
|
|
- const levelText = hasScopeLevel && isMcpScp ? '(阶梯' + hasScopeLevel.scopeLevel + ')' : ''
|
|
|
|
- tabList.push({ text: '促销产品' + levelText, val: 'GIFT' })
|
|
|
|
|
|
+ if (giveRuleList && isMcpScp) {
|
|
|
|
+ giveRuleList.forEach(giveRule => {
|
|
|
|
+ const levelText = '(阶梯' + giveRule.scopeLevel + ')'
|
|
|
|
+ tabList.push({ text: '促销产品' + levelText, val: 'GIFT-' + giveRule.scopeLevel })
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ tabList.push({ text: '促销产品', val: 'GIFT' })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (this.promoRuleData.promotionRuleType == 'PROMO_PROD') {
|
|
if (this.promoRuleData.promotionRuleType == 'PROMO_PROD') {
|
|
tabList.push({ text: '特价产品', val: 'DISCOUNT' })
|
|
tabList.push({ text: '特价产品', val: 'DISCOUNT' })
|
|
@@ -290,7 +302,6 @@ export default {
|
|
this.tabList = tabList
|
|
this.tabList = tabList
|
|
this.promoProductClz = tabList[0].val
|
|
this.promoProductClz = tabList[0].val
|
|
this.tableHeight = window.innerHeight - 330
|
|
this.tableHeight = window.innerHeight - 330
|
|
- this.queryParam.scopeLevel = hasScopeLevel.scopeLevel
|
|
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|
|
},
|
|
},
|
|
// 刷新当前页面
|
|
// 刷新当前页面
|