|
@@ -27,10 +27,11 @@
|
|
|
<el-table v-loading="loading" :data="taskList">
|
|
|
<el-table-column label="名称" align="center" prop="name" />
|
|
|
<el-table-column label="种类" align="center" prop="categoryText" />
|
|
|
+ <el-table-column label="发行社区" align="center" prop="community" />
|
|
|
<el-table-column label="可兑换群体" align="center" prop="tags" />
|
|
|
- <el-table-column label="发放数量" align="center" prop="count" />
|
|
|
- <el-table-column label="面额" align="center" prop="money" />
|
|
|
- <el-table-column label="需要积分" align="center" prop="integral" />
|
|
|
+ <el-table-column label="发放数量" align="center" prop="count" width="80" />
|
|
|
+ <el-table-column label="面额" align="center" prop="money" width="50" />
|
|
|
+ <el-table-column label="需要积分" align="center" prop="integral" width="80" />
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
@@ -60,10 +61,10 @@
|
|
|
<!-- 图片上传 -->
|
|
|
<ImageUpload @input="fileUpload" :value="form.photo" :limit="1" ></ImageUpload>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="名称" prop="name">
|
|
|
+ <el-form-item v-if="isAdd" label="名称" prop="name" >
|
|
|
<el-input v-model="form.name" placeholder="请输入名称" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="种类" prop="category">
|
|
|
+ <el-form-item v-if="isAdd" label="种类" prop="category">
|
|
|
<el-cascader v-model="form.category" :options="voucher_category" :props="{emitPath:false}"></el-cascader>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="可兑换群体" prop="tags">
|
|
@@ -71,13 +72,13 @@
|
|
|
<el-option v-for="dict in dict.type.receive_tags" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="面额" prop="money">
|
|
|
+ <el-form-item v-if="isAdd" label="面额" prop="money">
|
|
|
<el-input v-model="form.money" type="number" placeholder="请输入面额" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="需要积分" prop="integral">
|
|
|
+ <el-form-item v-if="isAdd" label="需要积分" prop="integral">
|
|
|
<el-input v-model="form.integral" type="number" placeholder="请输入需要积分" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="发放数量" prop="count">
|
|
|
+ <el-form-item v-if="isAdd" label="发放数量" prop="count">
|
|
|
<el-input v-model="form.count" type="number" placeholder="请输入发放数量" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="领取开始时间" prop="startTime">
|
|
@@ -86,7 +87,7 @@
|
|
|
<el-form-item label="领取结束时间" type="endTime" prop="name">
|
|
|
<el-date-picker :value-format="'yyyy-MM-dd HH:mm:ss'" v-model="form.endTime" type="datetime" placeholder="选择日期时间"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="选择社区" prop="location">
|
|
|
+ <el-form-item v-if="isAdd" label="选择社区" prop="location">
|
|
|
<el-select v-model="form.community" placeholder="请选择">
|
|
|
<el-option v-for="dict in dict.type.community" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
|
</el-select>
|
|
@@ -129,6 +130,8 @@ export default {
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
+ // 新增或修改
|
|
|
+ isAdd: true,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
@@ -209,6 +212,7 @@ export default {
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
+ this.isAdd = true;
|
|
|
this.title = "添加代金券";
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
@@ -245,8 +249,9 @@ export default {
|
|
|
this.reset();
|
|
|
getVoucher(row.discountId).then(data => {
|
|
|
this.form = data.data;
|
|
|
+ this.isAdd = false;
|
|
|
this.open = true;
|
|
|
- this.title = "代金券详情";
|
|
|
+ this.title = "修改代金券信息";
|
|
|
});
|
|
|
},
|
|
|
// 富文本改变
|