|
@@ -10,17 +10,15 @@
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="抽奖积分:" prop="lotteryConsumePoint">
|
|
<el-form-item label="抽奖积分:" prop="lotteryConsumePoint">
|
|
- <el-input-number v-model="form.lotteryConsumePoint" :min="1" :max="999" :controls="false"
|
|
|
|
- placeholder="请输入抽奖积分" />
|
|
|
|
|
|
+ <el-input-number v-model="form.lotteryConsumePoint" :min="1" :max="999" :controls="false" placeholder="请输入抽奖积分" />
|
|
<span class="input-number">积分</span>
|
|
<span class="input-number">积分</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="每日限抽次数:" prop="lotteryLimitCount">
|
|
<el-form-item label="每日限抽次数:" prop="lotteryLimitCount">
|
|
- <el-input-number v-model="form.lotteryLimitCount" :min="1" :max="999" :controls="false"
|
|
|
|
- placeholder="请输入每日限抽次数" />
|
|
|
|
|
|
+ <el-input-number v-model="form.lotteryLimitCount" :min="1" :max="999" :controls="false" placeholder="请输入每日限抽次数" />
|
|
<span class="input-number">次</span>
|
|
<span class="input-number">次</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="活动规则:" prop="rule">
|
|
<el-form-item label="活动规则:" prop="rule">
|
|
- <el-input v-model="form.rule" type="textarea" :autosize="{ minRows: 5, maxRows: 10}" :maxlength="150"
|
|
|
|
|
|
+ <el-input v-model="form.rule" type="textarea" :autosize="{ minRows: 5, maxRows: 10 }" :maxlength="150"
|
|
show-word-limit placeholder="请输入活动规则" />
|
|
show-word-limit placeholder="请输入活动规则" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="转盘数量:" prop="goodNum">
|
|
<el-form-item label="转盘数量:" prop="goodNum">
|
|
@@ -35,15 +33,13 @@
|
|
<el-table-column label="奖品类型" align="center">
|
|
<el-table-column label="奖品类型" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-select v-model="scope.row.type" :disabled="form.id ? true : false">
|
|
<el-select v-model="scope.row.type" :disabled="form.id ? true : false">
|
|
- <el-option v-for="item in rewardOptions" :key="item.value" :value="item.value"
|
|
|
|
- :label="item.label" />
|
|
|
|
|
|
+ <el-option v-for="item in rewardOptions" :key="item.value" :value="item.value" :label="item.label" />
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="奖品" align="center">
|
|
<el-table-column label="奖品" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-if="scope.row.type === 4" v-model="scope.row.rewardPoint"
|
|
|
|
- :disabled="form.id ? true : false">
|
|
|
|
|
|
+ <el-input v-if="scope.row.type === 4" v-model="scope.row.rewardPoint" :disabled="form.id ? true : false">
|
|
<span slot="suffix" style="line-height: 36px">积分</span>
|
|
<span slot="suffix" style="line-height: 36px">积分</span>
|
|
</el-input>
|
|
</el-input>
|
|
<el-input v-else v-model="scope.row.name" :disabled="form.id ? true : false" />
|
|
<el-input v-else v-model="scope.row.name" :disabled="form.id ? true : false" />
|
|
@@ -134,26 +130,30 @@ export default {
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
date(val) {
|
|
date(val) {
|
|
- this.form.startTime = val ? val[0] : ''
|
|
|
|
- this.form.endTime = val ? val[1] : ''
|
|
|
|
|
|
+ if (val) {
|
|
|
|
+ this.form.startTime = val[0]
|
|
|
|
+ this.form.endTime = val[1]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- if (this.$route.query.id) {
|
|
|
|
- this.form.id = this.$route.query.id
|
|
|
|
|
|
+ if (this.$route.query.id || this.$route.query.copyId) {
|
|
|
|
+ this.getList(this.$route.query.id || this.$route.query.copyId)
|
|
this.disabled = Boolean(this.$route.query.disabled)
|
|
this.disabled = Boolean(this.$route.query.disabled)
|
|
- this.getList()
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 详情
|
|
// 详情
|
|
- getList() {
|
|
|
|
|
|
+ getList(id) {
|
|
detail({
|
|
detail({
|
|
- id: this.form.id
|
|
|
|
|
|
+ id: id
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
this.form = res.data
|
|
this.form = res.data
|
|
this.date = [res.data.startTime, res.data.endTime]
|
|
this.date = [res.data.startTime, res.data.endTime]
|
|
|
|
+ if (this.$route.query.copyId) {
|
|
|
|
+ delete this.form.id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -177,7 +177,9 @@ export default {
|
|
getChange() {
|
|
getChange() {
|
|
this.form.lotteryConfigGoodList = []
|
|
this.form.lotteryConfigGoodList = []
|
|
for (let i = 0; i < this.form.goodNum; i++) {
|
|
for (let i = 0; i < this.form.goodNum; i++) {
|
|
- this.form.lotteryConfigGoodList.push({})
|
|
|
|
|
|
+ this.form.lotteryConfigGoodList.push({
|
|
|
|
+ pic: ''
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -236,12 +238,17 @@ export default {
|
|
.el-upload {
|
|
.el-upload {
|
|
width: 100px;
|
|
width: 100px;
|
|
height: 100px;
|
|
height: 100px;
|
|
- line-height: 110px;
|
|
|
|
|
|
+ line-height: 100px;
|
|
}
|
|
}
|
|
|
|
+
|
|
.upload-image {
|
|
.upload-image {
|
|
width: 100px;
|
|
width: 100px;
|
|
height: 100px;
|
|
height: 100px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .el-icon-plus {
|
|
|
|
+ line-height: 100px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.form-btn {
|
|
.form-btn {
|