|
@@ -216,6 +216,7 @@
|
|
id="promotionEdit-validType"
|
|
id="promotionEdit-validType"
|
|
code="PROMO_RULE_TICKET_TYPE"
|
|
code="PROMO_RULE_TICKET_TYPE"
|
|
:disabled="isDisabled"
|
|
:disabled="isDisabled"
|
|
|
|
+ @change="handleValidType"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
<a-range-picker
|
|
<a-range-picker
|
|
v-show="form.promoRule.validType==='FIXED'"
|
|
v-show="form.promoRule.validType==='FIXED'"
|
|
@@ -452,7 +453,6 @@ export default {
|
|
}
|
|
}
|
|
this.showProModal = true
|
|
this.showProModal = true
|
|
},
|
|
},
|
|
-
|
|
|
|
closeProductModal () {
|
|
closeProductModal () {
|
|
this.showProModal = false
|
|
this.showProModal = false
|
|
},
|
|
},
|
|
@@ -523,6 +523,17 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 券有效期 change
|
|
|
|
+ handleValidType (con) {
|
|
|
|
+ this.sellForm.validType = con
|
|
|
|
+ if (con === 'FIXED') {
|
|
|
|
+ this.sellForm.validDays = undefined
|
|
|
|
+ } else {
|
|
|
|
+ this.time = []
|
|
|
|
+ this.sellForm.validStartDate = undefined
|
|
|
|
+ this.sellForm.validEndDate = undefined
|
|
|
|
+ }
|
|
|
|
+ },
|
|
savePartInfo (type) {
|
|
savePartInfo (type) {
|
|
const _this = this
|
|
const _this = this
|
|
_this.form.promoActiveSn = this.$route.params.sn
|
|
_this.form.promoActiveSn = this.$route.params.sn
|
|
@@ -634,9 +645,6 @@ export default {
|
|
}
|
|
}
|
|
this.isShowNextStep = false
|
|
this.isShowNextStep = false
|
|
this.isDisabled = false
|
|
this.isDisabled = false
|
|
- if (this.$refs.setContent) {
|
|
|
|
- this.$refs.setContent.clearContent()
|
|
|
|
- }
|
|
|
|
if (this.$refs.ruleForm) {
|
|
if (this.$refs.ruleForm) {
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
}
|
|
}
|
|
@@ -687,11 +695,11 @@ export default {
|
|
},
|
|
},
|
|
// 批量添加
|
|
// 批量添加
|
|
handleBatchAdd () {
|
|
handleBatchAdd () {
|
|
- if (!this.form.promoRule.ruleValue) {
|
|
|
|
- this.$message.warning('请输入返券金额(必须大于0)!')
|
|
|
|
|
|
+ if (!this.sellForm.ruleValue) {
|
|
|
|
+ this.$message.warning('请输入返券金额(需大于0)!')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- this.$refs.chooseProduct.editMorePrice(this.form.promoRule.ruleValue)
|
|
|
|
|
|
+ this.$refs.chooseProductList.editMorePrice(this.sellForm.ruleValue)
|
|
},
|
|
},
|
|
// 添加产品成功
|
|
// 添加产品成功
|
|
addProductSuccess (list) {
|
|
addProductSuccess (list) {
|
|
@@ -709,16 +717,14 @@ export default {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.showProModal = false
|
|
this.showProModal = false
|
|
// 获取产品列表 有分页
|
|
// 获取产品列表 有分页
|
|
- this.$refs.chooseProduct.pageInit()
|
|
|
|
|
|
+ this.$refs.chooseProductList.pageInit()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-
|
|
|
|
- this.$refs.setContent.setProductSn(productArr)
|
|
|
|
},
|
|
},
|
|
onChangeTree (e) {
|
|
onChangeTree (e) {
|
|
deleteByProductType({ promoActiveSn: this.$route.params.sn, productTypeSnList: this.form.promoRule.productRangeList || [] }).then(res => {
|
|
deleteByProductType({ promoActiveSn: this.$route.params.sn, productTypeSnList: this.form.promoRule.productRangeList || [] }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.$refs.chooseProduct.pageInit()
|
|
|
|
|
|
+ this.$refs.chooseProductList.pageInit()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
// 保存产品范围
|
|
// 保存产品范围
|