20230303
This commit is contained in:
@@ -1,109 +1,109 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="优惠卷类型:" prop="type">
|
||||
<!-- <el-input v-model="dataForm.type" placeholder="优惠卷类型"></el-input> -->
|
||||
<el-select v-model="dataForm.type" placeholder="请选择" >
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠券名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用平台">
|
||||
<!-- <el-input v-model="dataForm.platform" placeholder="使用平台"></el-input> -->
|
||||
<el-select v-model="dataForm.platform" placeholder="请选择" >
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="总发行量" prop="publishCount">
|
||||
<el-input v-model="dataForm.publishCount" placeholder="发行数量"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="数量" prop="count">
|
||||
<el-input v-model="dataForm.count" placeholder="数量"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="面额:" prop="amount">
|
||||
<el-input v-model="dataForm.amount" placeholder="面额">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible" width="900px">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
label-width="100px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="优惠卷类型" prop="couponType">
|
||||
<!-- <el-input v-model="dataForm.type" placeholder="优惠卷类型"></el-input> -->
|
||||
<el-select v-model="dataForm.couponType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8"><el-form-item label="使用门槛" prop="useLevel">
|
||||
<el-input v-model="dataForm.useLevel" placeholder="" oninput="value=value.replace(/[^\d.]/g,'')">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
|
||||
</el-form-item></el-col>
|
||||
<el-col :span="8"><el-form-item label="商品类型" prop="couponProType">
|
||||
<!-- <el-input v-model="dataForm.type" placeholder="优惠卷类型"></el-input> -->
|
||||
<el-select v-model="dataForm.couponProType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="每人限领:" prop="perLimit">
|
||||
<el-input v-model="dataForm.perLimit" placeholder="">
|
||||
<template slot="append">张</template>
|
||||
</el-input>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="优惠券名称" prop="couponName">
|
||||
<el-input v-model="dataForm.couponName" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="面额:" prop="couponAmount">
|
||||
<el-input v-model="dataForm.couponAmount" placeholder="面额" oninput="value=value.replace(/[^\d.]/g,'')">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="每人限领:" prop="limitedCollar">
|
||||
<el-input v-model="dataForm.limitedCollar" oninput="value=value.replace(/[^\d.]/g,'')" placeholder="">
|
||||
<template slot="append">张</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row ::gutter="10">
|
||||
</el-row>
|
||||
<el-row ::gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开始时间" prop="takeEffectType">
|
||||
<el-radio-group v-model="dataForm.takeEffectType">
|
||||
<el-radio :label="0">领取日</el-radio>
|
||||
<el-radio :label="1">设置日期</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="takeEffectDate" v-if="dataForm.takeEffectType == '1'">
|
||||
<el-date-picker
|
||||
v-model="dataForm.takeEffectDate" @change="datePicked"
|
||||
type="datetime" value-format="timestamp"
|
||||
placeholder="选择日期时间"
|
||||
default-time="12:00:00">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="时效" prop="validity">
|
||||
<el-input placeholder="" v-model="dataForm.validity" oninput="value=value.replace(/[^\d.]/g,'')">
|
||||
<template slot="append">天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="总发行量" prop="totalCirculation">
|
||||
<el-input v-model="dataForm.totalCirculation" placeholder="发行数量" oninput="value=value.replace(/[^\d.]/g,'')">
|
||||
<template slot="append">张</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="封面图" prop="couponUrl">
|
||||
<el-upload :limit="1" class="el-uploadfeng"
|
||||
action="http://59.110.212.44:9100/pb/oss/fileoss" list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview" :file-list="fileList" :on-success="handlePicSuccess"
|
||||
accept=".jpeg,.jpg,.gif,.png" :on-remove="handleRemove">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible" :append-to-body="true">
|
||||
<img width="100%" :src="dataForm.couponUrl" alt="">
|
||||
</el-dialog>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="使用门槛" prop="minPoint">
|
||||
<el-input v-model="dataForm.minPoint" placeholder="">
|
||||
<template slot="prepend">满</template>
|
||||
<template slot="append">元可用</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="有效期" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="结束使用时间" prop="endTime">
|
||||
<el-input v-model="dataForm.endTime" placeholder="结束使用时间"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="使用类型" prop="useType">
|
||||
<!-- <el-input v-model="dataForm.useType" placeholder="使用类型"></el-input> -->
|
||||
<el-radio-group v-model="dataForm.useType">
|
||||
<el-radio-button label="0">全场通用</el-radio-button>
|
||||
<el-radio-button label="1">指定分类</el-radio-button>
|
||||
<el-radio-button label="2">指定商品</el-radio-button>
|
||||
<!-- <el-radio-button label="深圳"></el-radio-button> -->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="note">
|
||||
<el-input v-model="dataForm.note" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="已使用数量" prop="useCount">
|
||||
<el-input v-model="dataForm.useCount" placeholder="已使用数量"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="领取数量" prop="receiveCount">
|
||||
<el-input v-model="dataForm.receiveCount" placeholder="领取数量"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="可以领取的日期" prop="enableTime">
|
||||
<el-input v-model="dataForm.enableTime" placeholder="可以领取的日期"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="优惠码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="可领取的会员类型" prop="memberLevel">
|
||||
<el-input v-model="dataForm.memberLevel" placeholder="可领取的会员类型"></el-input>
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
@@ -113,192 +113,213 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '全场赠券'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '会员赠券'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '购物赠券'
|
||||
}, {
|
||||
value: 3,
|
||||
label: '注册赠券'
|
||||
}],
|
||||
options1: [{
|
||||
value: 0,
|
||||
label: '全部'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '移动'
|
||||
}, {
|
||||
value: 2,
|
||||
label: 'PC'
|
||||
}],
|
||||
startTime:[],
|
||||
dataForm: {
|
||||
id: 0,
|
||||
type: '',
|
||||
name: '',
|
||||
platform: '',
|
||||
count: '',
|
||||
amount: '',
|
||||
perLimit: '',
|
||||
minPoint: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
useType: '',
|
||||
note: '',
|
||||
publishCount: '',
|
||||
useCount: '1',
|
||||
receiveCount: '',
|
||||
enableTime: '',
|
||||
code: '',
|
||||
memberLevel: ''
|
||||
},
|
||||
dataRule: {
|
||||
type: [
|
||||
{ required: true, message: '优惠卷类型;0->全场赠券;1->会员赠券;2->购物赠券;3->注册赠券不能为空', trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
platform: [
|
||||
{ required: true, message: '使用平台:0->全部;1->移动;2->PC不能为空', trigger: 'blur' }
|
||||
],
|
||||
count: [
|
||||
{ required: true, message: '数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
amount: [
|
||||
{ required: true, message: '金额不能为空', trigger: 'blur' }
|
||||
],
|
||||
perLimit: [
|
||||
{ required: true, message: '每人限领张数不能为空', trigger: 'blur' }
|
||||
],
|
||||
minPoint: [
|
||||
{ required: true, message: '使用门槛;0表示无门槛不能为空', trigger: 'blur' }
|
||||
],
|
||||
startTime: [
|
||||
{ required: true, message: '开始使用时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: '结束使用时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
useType: [
|
||||
{ required: true, message: '使用类型:0->全场通用;1->指定分类;2->指定商品不能为空', trigger: 'blur' }
|
||||
],
|
||||
note: [
|
||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
||||
],
|
||||
publishCount: [
|
||||
{ required: true, message: '发行数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
useCount: [
|
||||
{ required: true, message: '已使用数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
receiveCount: [
|
||||
{ required: true, message: '领取数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
enableTime: [
|
||||
{ required: true, message: '可以领取的日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '优惠码不能为空', trigger: 'blur' }
|
||||
],
|
||||
memberLevel: [
|
||||
{ required: true, message: '可领取的会员类型:0->无限制不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
options2: [{
|
||||
value: 0,
|
||||
label: '商品'
|
||||
},{
|
||||
value: 1,
|
||||
label: '电子书'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/book/coupon/info/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.type = data.coupon.type
|
||||
this.dataForm.name = data.coupon.name
|
||||
this.dataForm.platform = data.coupon.platform
|
||||
this.dataForm.count = data.coupon.count
|
||||
this.dataForm.amount = data.coupon.amount
|
||||
this.dataForm.perLimit = data.coupon.perLimit
|
||||
this.dataForm.minPoint = data.coupon.minPoint
|
||||
this.dataForm.startTime = data.coupon.startTime
|
||||
this.dataForm.endTime = data.coupon.endTime
|
||||
this.dataForm.useType = data.coupon.useType
|
||||
this.dataForm.note = data.coupon.note
|
||||
this.dataForm.publishCount = data.coupon.publishCount
|
||||
this.dataForm.useCount = data.coupon.useCount
|
||||
this.dataForm.receiveCount = data.coupon.receiveCount
|
||||
this.dataForm.enableTime = data.coupon.enableTime
|
||||
this.dataForm.code = data.coupon.code
|
||||
this.dataForm.memberLevel = data.coupon.memberLevel
|
||||
|
||||
this.startTime = [this.dataForm.startTime,this.dataForm.endTime]
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
],
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '现金券'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '折扣券'
|
||||
}],
|
||||
|
||||
dialogVisible:false,
|
||||
fileList: [], // 封面图
|
||||
dataForm: {
|
||||
couponType:null,
|
||||
couponProType:null, // 使用商品类型
|
||||
useLevel:null, // 使用门槛
|
||||
id: 0,
|
||||
couponName:'',
|
||||
couponAmount:null,
|
||||
couponUrl:'',
|
||||
limitedCollar:null,
|
||||
validity:'',
|
||||
takeEffectType: null, // 生效方式
|
||||
takeEffectDate:null,
|
||||
totalCirculation:null,
|
||||
remark:''
|
||||
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/book/coupon/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'id': this.dataForm.id || undefined,
|
||||
'type': this.dataForm.type,
|
||||
'name': this.dataForm.name,
|
||||
'platform': this.dataForm.platform,
|
||||
'count': this.dataForm.count,
|
||||
'amount': this.dataForm.amount,
|
||||
'perLimit': this.dataForm.perLimit,
|
||||
'minPoint': this.dataForm.minPoint,
|
||||
'startTime': this.startTime[0],
|
||||
'endTime': this.startTime[1],
|
||||
'useType': this.dataForm.useType,
|
||||
'note': this.dataForm.note,
|
||||
'publishCount': this.dataForm.publishCount,
|
||||
'useCount': this.dataForm.useCount,
|
||||
'receiveCount': this.dataForm.receiveCount,
|
||||
'enableTime': this.dataForm.enableTime,
|
||||
'code': this.dataForm.code,
|
||||
'memberLevel': this.dataForm.memberLevel
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
dataRule: {
|
||||
couponType: [
|
||||
{ required: true, message: '请填写本项', trigger: 'blur' }
|
||||
],
|
||||
couponName: [
|
||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
couponAmount: [
|
||||
{ required: true, message: '优惠券面额不能为空', trigger: 'blur' }
|
||||
],
|
||||
takeEffectType: [
|
||||
{ required: true, message: '生效方式不能为空', trigger: 'blur' }
|
||||
],
|
||||
validity: [
|
||||
{ required: true, message: '时效不能为空', trigger: 'blur' }
|
||||
],
|
||||
couponProType: [
|
||||
{ required: true, message: '商品类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
useLevel: [
|
||||
{ required: true, message: '使用门槛;0表示无门槛', trigger: 'blur' }
|
||||
],
|
||||
// startTime: [
|
||||
// { required: true, message: '开始使用时间不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// endTime: [
|
||||
// { required: true, message: '结束使用时间不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// useType: [
|
||||
// { required: true, message: '使用类型:0->全场通用;1->指定分类;2->指定商品不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// note: [
|
||||
// { required: true, message: '备注不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// publishCount: [
|
||||
// { required: true, message: '发行数量不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// useCount: [
|
||||
// { required: true, message: '已使用数量不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// receiveCount: [
|
||||
// { required: true, message: '领取数量不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// enableTime: [
|
||||
// { required: true, message: '可以领取的日期不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// code: [
|
||||
// { required: true, message: '优惠码不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// memberLevel: [
|
||||
// { required: true, message: '可领取的会员类型:0->无限制不能为空', trigger: 'blur' }
|
||||
// ]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/book/coupon/info/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.id = data.coupon.id
|
||||
this.dataForm.couponType = data.coupon.couponType
|
||||
this.dataForm.couponName = data.coupon.couponName
|
||||
this.dataForm.couponAmount = data.coupon.couponAmount
|
||||
this.dataForm.limitedCollar = data.coupon.limitedCollar
|
||||
this.dataForm.validity = data.coupon.validity
|
||||
this.dataForm.takeEffectType = data.coupon.takeEffectType
|
||||
this.dataForm.takeEffectDate = data.coupon.takeEffectDate
|
||||
this.dataForm.totalCirculation = data.coupon.totalCirculation
|
||||
this.dataForm.remark = data.coupon.remark
|
||||
this.dataForm.useLevel = data.coupon.useLevel,
|
||||
this.dataForm.couponProType = data.coupon.couponProType
|
||||
// this.dataForm.couponUrl = {name:'', url:}
|
||||
if (data.coupon.couponUrl != "") {
|
||||
var img = { name: '', url: data.coupon.couponUrl }
|
||||
var attr = []
|
||||
attr.push(img)
|
||||
this.fileList = attr
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handlePicSuccess(res, file) {
|
||||
if (res.msg == "success") {
|
||||
this.dataForm.couponUrl = res.url;
|
||||
this.$message.success("上传成功");
|
||||
} else {
|
||||
this.$message.error("上传失败");
|
||||
}
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
this.dataForm.couponUrl = '';
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dataForm.couponUrl = file.url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
datePicked(){
|
||||
console.log(this.dataForm.startTime)
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/book/coupon/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||
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,
|
||||
'takeEffectType' :this.dataForm.takeEffectType,
|
||||
'takeEffectDate' :this.dataForm.takeEffectDate,
|
||||
'totalCirculation' :this.dataForm.totalCirculation,
|
||||
'remark':this.dataForm.remark ,
|
||||
'useLevel' : this.dataForm.useLevel,
|
||||
'couponProType' : this.dataForm.couponProType,
|
||||
'currentState' : '1',
|
||||
'delFlag':0
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.el-form-item__label {
|
||||
font-size: 12px;
|
||||
}
|
||||
.el-uploadfeng {
|
||||
/deep/ .el-upload-list__item {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
/deep/ .el-upload--picture-card {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
line-height: 70px;
|
||||
|
||||
}}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user