|
@@ -0,0 +1,87 @@
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <div class="g-card">
|
|
|
|
+ <h4 class="g-card-title">{{ title }}</h4>
|
|
|
|
+ <el-form ref="LotteryAdd" :model="addForm" :rules="addRules" label-position="left">
|
|
|
|
+ <el-form-item label="活动名称" prop="a">
|
|
|
|
+ <el-input v-model="addForm.a" placeholder="请输入活动名称"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="活动类型" prop="b">
|
|
|
|
+ <el-select v-model="addForm.b" placeholder="请选择活动类型">
|
|
|
|
+ <el-option value="1" label="抽奖"></el-option>
|
|
|
|
+ <el-option value="2" label="红包"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="活动时间" prop="c">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ type="daterange"
|
|
|
|
+ v-model="addForm.c"
|
|
|
|
+ range-separator="至"
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
+ align="right"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ ></el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="奖品设置" prop="d">
|
|
|
|
+ <el-radio-group v-model="addForm.d" v-if="addForm.b ==='2' ">
|
|
|
|
+ <el-radio label="1">单等级奖品</el-radio>
|
|
|
|
+ <el-radio label="2">多等级奖品</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ <el-input v-model="addForm.d" v-else-if="addForm.b === '1' "></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="奖品等级" v-if="addForm.d === '2' ">
|
|
|
|
+ <el-select v-model="addForm.e" placeholder="请选择奖品等级">
|
|
|
|
+ <el-option value="1" label="等级1"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="活动奖品" prop="f">
|
|
|
|
+ <el-radio-group v-model="addForm.f">
|
|
|
|
+ <el-radio label="1">优惠券</el-radio>
|
|
|
|
+ <el-radio label="2">积分</el-radio>
|
|
|
|
+ <el-radio label="3">平台会员</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="" prop="g">
|
|
|
|
+ <el-select v-model="addForm.g" filterable v-if="addForm.f === '1' ">
|
|
|
|
+ <el-option label="选项1" value="1"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-input v-else-if="addForm.f === '2' || addForm.f === '3'" v-model="addForm.g" :placeholder="addForm.f === '2'?'请输入积分':addForm.f === '3'?'请输入天数':''"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+export default {
|
|
|
|
+ name: "lotteryAdd",
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ title: '新增',
|
|
|
|
+ addForm: {
|
|
|
|
+ a: '',
|
|
|
|
+ b: '2',
|
|
|
|
+ c: '',
|
|
|
|
+ d: '1',
|
|
|
|
+ e: '',
|
|
|
|
+ f: '',
|
|
|
|
+ g: '1'
|
|
|
|
+ },
|
|
|
|
+ addRules: {
|
|
|
|
+ a: [{ required: true, message: '请输入活动名称', trigger: 'blur' }]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped>
|
|
|
|
+
|
|
|
|
+</style>
|