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