Commit 6a22284c by 杨明

fixed

1 parent 664bac54
...@@ -507,6 +507,7 @@ export default { ...@@ -507,6 +507,7 @@ export default {
nameToValSpecsList: [], nameToValSpecsList: [],
activityInfo: {}, activityInfo: {},
editForm: { editForm: {
goodsList: null,
pageStyle: null, pageStyle: null,
merchantId: null, merchantId: null,
merchantName: '', merchantName: '',
...@@ -618,6 +619,7 @@ export default { ...@@ -618,6 +619,7 @@ export default {
playingDiscountContent: [{ required: true, message: '请输入折扣内容', trigger: 'blur' }], playingDiscountContent: [{ required: true, message: '请输入折扣内容', trigger: 'blur' }],
playingCouponDescription: [{ required: true, message: '请输入送券描述', trigger: 'blur' }], playingCouponDescription: [{ required: true, message: '请输入送券描述', trigger: 'blur' }],
pageStyle: [{ required: true, message: '请选择页面样式', trigger: 'change' }], pageStyle: [{ required: true, message: '请选择页面样式', trigger: 'change' }],
goodsList: [{ required: true, message: '请选择平台福利', trigger: 'change' }],
// promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }], // promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }],
activityTime: [{ required: true, message: '请选择链接时间', trigger: 'change' }], activityTime: [{ required: true, message: '请选择链接时间', trigger: 'change' }],
expiresType: [{ required: true, message: '请选择链接时间', trigger: 'change' }], expiresType: [{ required: true, message: '请选择链接时间', trigger: 'change' }],
...@@ -1186,6 +1188,10 @@ export default { ...@@ -1186,6 +1188,10 @@ export default {
this.recoveryTotalPrice() this.recoveryTotalPrice()
this.hasCouponBlock(false) this.hasCouponBlock(false)
}, },
selectedGoodsList(val) {
this.editForm.goodsList = val.length ? 1 : null
console.log(this.editForm.goodsList)
},
'editForm.subscribe'(val) { 'editForm.subscribe'(val) {
if (this.routeInfo.addOrEdit != 'add') return if (this.routeInfo.addOrEdit != 'add') return
this.configEditFormData[0].isHide = false this.configEditFormData[0].isHide = false
...@@ -1202,11 +1208,13 @@ export default { ...@@ -1202,11 +1208,13 @@ export default {
'editForm.playingType'(val) { 'editForm.playingType'(val) {
if (val == 2) { if (val == 2) {
this.editRule.couponList[0].required = true this.editRule.couponList[0].required = true
this.editRule.goodsList[0].required = false
this.palyEditFormData[2].label = '折扣内容' this.palyEditFormData[2].label = '折扣内容'
this.palyEditFormData[2].name = 'playingDiscountContent' this.palyEditFormData[2].name = 'playingDiscountContent'
} }
if (val == 3) { if (val == 3) {
this.editRule.couponList[0].required = false this.editRule.couponList[0].required = false
this.editRule.goodsList[0].required = true
this.palyEditFormData[2].label = '送券描述' this.palyEditFormData[2].label = '送券描述'
this.palyEditFormData[2].name = 'playingCouponDescription' this.palyEditFormData[2].name = 'playingCouponDescription'
} }
...@@ -1291,6 +1299,7 @@ export default { ...@@ -1291,6 +1299,7 @@ export default {
}) })
}, },
changeCouponTemplate(tab, event) { changeCouponTemplate(tab, event) {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate('goodsList')
const templateId = tab.name const templateId = tab.name
this.editForm.couponTemplateId = templateId this.editForm.couponTemplateId = templateId
this.editForm.couponTemplateName = tab.label this.editForm.couponTemplateName = tab.label
...@@ -1331,6 +1340,7 @@ export default { ...@@ -1331,6 +1340,7 @@ export default {
this.projuctEditFormData[idx].isHide = !this.selectedGoodsList.length this.projuctEditFormData[idx].isHide = !this.selectedGoodsList.length
}, },
handleGoodsConfirm(selectedData) { handleGoodsConfirm(selectedData) {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate('goodsList')
this.selectedGoodsList = selectedData || [] this.selectedGoodsList = selectedData || []
// this.setNameHide('goodsListBlock') // this.setNameHide('goodsListBlock')
this.handleGoodsClose() this.handleGoodsClose()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!