|
@@ -148,7 +148,7 @@ export default {
|
|
|
description: '', // 活动简称
|
|
|
content: '', // 活动描述
|
|
|
attachmentList: '', // 附件
|
|
|
- dealerSnList: [], // 参与客户
|
|
|
+ promotionDealerList: [], // 参与客户
|
|
|
dealerScope: 'SOME_DEALER' // 全部客户 部分客户
|
|
|
},
|
|
|
openDealerModal: false,
|
|
@@ -194,7 +194,7 @@ export default {
|
|
|
this.openDealerModal = true
|
|
|
const _this = this
|
|
|
if (_this.chooseDealerList.length == 0) {
|
|
|
- _this.form.dealerSnList = []
|
|
|
+ _this.form.promotionDealerList = []
|
|
|
}
|
|
|
const arr = _this.chooseDealerList.map(item => {
|
|
|
return item.dealerSn
|
|
@@ -214,7 +214,7 @@ export default {
|
|
|
this.chooseDealerList = list
|
|
|
this.openDealerModal = false
|
|
|
// 移除表单必填项
|
|
|
- this.$refs.ruleForm.clearValidate('dealerSnList')
|
|
|
+ this.$refs.ruleForm.clearValidate('promotionDealerList')
|
|
|
},
|
|
|
// 新增/编辑
|
|
|
handleSave () {
|
|
@@ -222,16 +222,16 @@ export default {
|
|
|
if (_this.form.dealerScope === 'SOME_DEALER') {
|
|
|
if (_this.chooseDealerList && _this.chooseDealerList.length > 0) {
|
|
|
const newArr = this.chooseDealerList.map(item => {
|
|
|
- return item.dealerSn
|
|
|
+ return { dealerSn: item.dealerSn, dealerScope: this.form.dealerScope }
|
|
|
})
|
|
|
- _this.form.dealerSnList = newArr
|
|
|
+ _this.form.promotionDealerList = newArr
|
|
|
} else {
|
|
|
_this.$message.error('请选择参与客户')
|
|
|
return
|
|
|
}
|
|
|
} else {
|
|
|
this.form.dealerList = []
|
|
|
- this.form.dealerSnList = []
|
|
|
+ this.form.promotionDealerList = []
|
|
|
}
|
|
|
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
@@ -272,7 +272,7 @@ export default {
|
|
|
description: '', // 活动简称
|
|
|
content: '', // 活动描述
|
|
|
attachmentList: '', // 附件
|
|
|
- dealerSnList: [], // 参与客户
|
|
|
+ promotionDealerList: [], // 参与客户
|
|
|
dealerScope: 'SOME_DEALER'
|
|
|
}
|
|
|
this.attachList = []
|
|
@@ -288,7 +288,7 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
const data = res.data
|
|
|
this.chooseDealerList = data.dealerList
|
|
|
- data.dealerSnList = data.dealerSnList
|
|
|
+ data.promotionDealerList = data.promotionDealerList
|
|
|
data.activeDate = [data.promotionDateStart, data.promotionDateEnd]
|
|
|
if (data.attachmentList) {
|
|
|
this.attachList = data.attachmentList
|