This commit is contained in:
@fawn-nine
2024-09-27 13:28:09 +08:00
parent ad50d3e54f
commit 3d40bf4511

View File

@@ -150,19 +150,21 @@ export default {
dialogVisible:false, dialogVisible:false,
fileList: [], // 封面图 fileList: [], // 封面图
dataForm: { dataForm: {
couponType:null, id: undefined,
couponRange:null, // 使用商品类型 couponType:0, //优惠券类型 0现金 1折扣
useLevel:null, // 使用门槛 couponName:'', //优惠券名称
id: 0, couponAmount : undefined, //优惠券面额
couponName:'', couponUrl: '', //优惠券封面
couponAmount:null, limitedCollar:1, //每人限领
couponUrl:'', validity : 7, //时效(天)
limitedCollar:null, effectType: 0, //生效方式 0长期有效 1领取生效 2自定义
validity:'', effectTime :undefined, //生效日期
effectType: null, // 生效方式 expireTime: undefined, //截止日期
effectTime:null, totalCirculation : 100, //总发行数量
totalCirculation:null, remark: '', //备注
remark:'' useLevel : undefined, //使用门槛
couponRange : '', //优惠卷范围 0无限制 1课程卷 2课程品类卷
rangeInfo:"",//范围详情(课程卷是课程id,分割 课程品类卷是课程分类根id,分割)
}, },
dataRule: { dataRule: {
@@ -298,21 +300,7 @@ export default {
url: this.$http.adornUrl(`/common/coupon/${!this.dataForm.id ? 'addCoupon' : 'updateCoupon'}`), url: this.$http.adornUrl(`/common/coupon/${!this.dataForm.id ? 'addCoupon' : 'updateCoupon'}`),
method: 'post', method: 'post',
data: this.$http.adornData({ data: this.$http.adornData({
'id': this.dataForm.id || undefined, ...this.dataForm
'couponType':this.dataForm.couponType,
'couponName':this.dataForm.couponName,
'couponAmount' :this.dataForm.couponAmount,
'couponUrl': this.dataForm.couponUrl,
'limitedCollar' :this.dataForm.limitedCollar,
'validity' :this.dataForm.validity,
'effectType' :this.dataForm.effectType,
'effectTime' :this.dataForm.effectTime,
'totalCirculation' :this.dataForm.totalCirculation,
'remark':this.dataForm.remark ,
'useLevel' : this.dataForm.useLevel,
'couponRange' : this.dataForm.couponRange,
'currentState' : '1',
'delFlag':0
}) })
}).then(({ data }) => { }).then(({ data }) => {
if(data.code!==0) return this.$message.error(data.msg) if(data.code!==0) return this.$message.error(data.msg)