|
@@ -0,0 +1,323 @@
|
|
|
+<!-- -->
|
|
|
+<template>
|
|
|
+ <div class="m-container">
|
|
|
+ <h2>
|
|
|
+ <div class="squrt"></div>
|
|
|
+ 优惠券管理
|
|
|
+ </h2>
|
|
|
+ <div class="m-core">
|
|
|
+ <save-form
|
|
|
+ :inline="true"
|
|
|
+ :model="searchForm"
|
|
|
+ @submit="search"
|
|
|
+ @reset="onReSet"
|
|
|
+ >
|
|
|
+ <el-form-item>
|
|
|
+ <el-input
|
|
|
+ v-model.trim="searchForm.search"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="search"
|
|
|
+ placeholder="优惠券名称、编号"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-select
|
|
|
+ placeholder="优惠券类型"
|
|
|
+ v-model.trim="searchForm.type"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option label="满减券" value="FULL_REDUCTION"></el-option>
|
|
|
+ <el-option label="折扣券" value="DISCOUNT"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-select
|
|
|
+ placeholder="优惠券状态"
|
|
|
+ v-model.trim="searchForm.type"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option label="正常" value="1"></el-option>
|
|
|
+ <el-option label="过期" value="0"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button native-type="submit" type="primary">搜索</el-button>
|
|
|
+ <el-button native-type="reset" type="danger">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </save-form>
|
|
|
+ <div class="tableWrap">
|
|
|
+ <el-table
|
|
|
+ style="width: 100%"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ :data="tableList"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="优惠券编号"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="优惠券名称"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="类型"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="cloudStudyUseStudentDuty"
|
|
|
+ sortable="custom"
|
|
|
+ width="140px"
|
|
|
+ >
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
+ <div class="titleCell">
|
|
|
+ <span>面值</span>
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
+ <div slot="content">可优惠最大金额</div>
|
|
|
+ <i
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
+ style="
|
|
|
+ font-size: 18px;
|
|
|
+ color: #f56c6c;
|
|
|
+ top: 2px;
|
|
|
+ position: relative;
|
|
|
+ "
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.cloudStudyUseStudentDuty }}人</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="cloudStudyUseStudentDuty"
|
|
|
+ sortable="custom"
|
|
|
+ width="140px"
|
|
|
+ >
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
+ <div class="titleCell">
|
|
|
+ <span>达标金额</span>
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
+ <div slot="content">消费满多少才可使用</div>
|
|
|
+ <i
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
+ style="
|
|
|
+ font-size: 18px;
|
|
|
+ color: #f56c6c;
|
|
|
+ top: 2px;
|
|
|
+ position: relative;
|
|
|
+ "
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.cloudStudyUseStudentDuty }}人</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="cloudStudyUseStudentDuty"
|
|
|
+ sortable="custom"
|
|
|
+ width="140px"
|
|
|
+ >
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
+ <div class="titleCell">
|
|
|
+ <span>领取上限</span>
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
+ <div slot="content">用户最大领取数量</div>
|
|
|
+ <i
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
+ style="
|
|
|
+ font-size: 18px;
|
|
|
+ color: #f56c6c;
|
|
|
+ top: 2px;
|
|
|
+ position: relative;
|
|
|
+ "
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.cloudStudyUseStudentDuty }}人</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="cloudStudyUseStudentDuty"
|
|
|
+ sortable="custom"
|
|
|
+ width="140px"
|
|
|
+ >
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
+ <div class="titleCell">
|
|
|
+ <span>使用期限</span>
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
+ <div slot="content">自领取之日起多少天有效</div>
|
|
|
+ <i
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
+ style="
|
|
|
+ font-size: 18px;
|
|
|
+ color: #f56c6c;
|
|
|
+ top: 2px;
|
|
|
+ position: relative;
|
|
|
+ "
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.cloudStudyUseStudentDuty }}人</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="cloudStudyUseStudentDuty"
|
|
|
+ sortable="custom"
|
|
|
+ width="140px"
|
|
|
+ >
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
+ <div class="titleCell">
|
|
|
+ <span>有效期</span>
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
+ <div slot="content">优惠券可使用时间段</div>
|
|
|
+ <i
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
+ style="
|
|
|
+ font-size: 18px;
|
|
|
+ color: #f56c6c;
|
|
|
+ top: 2px;
|
|
|
+ position: relative;
|
|
|
+ "
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.cloudStudyUseStudentDuty }}人</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="cloudStudyUseStudentDuty"
|
|
|
+ sortable="custom"
|
|
|
+ width="140px"
|
|
|
+ >
|
|
|
+ <template slot="header" slot-scope="slot">
|
|
|
+ <div class="titleCell">
|
|
|
+ <span>领取时间</span>
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
+ <div slot="content">用户可领取优惠券时间段</div>
|
|
|
+ <i
|
|
|
+ class="el-icon-question micon el-tooltip"
|
|
|
+ style="
|
|
|
+ font-size: 18px;
|
|
|
+ color: #f56c6c;
|
|
|
+ top: 2px;
|
|
|
+ position: relative;
|
|
|
+ "
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.cloudStudyUseStudentDuty }}人</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="总库存"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="剩余库存"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="状态"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" prop="studentId" label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <el-button type="text" @click="gotoDetail(scope.row)">查看</el-button>
|
|
|
+ <el-button type="text">停用</el-button>
|
|
|
+ <el-button type="text">启用</el-button>
|
|
|
+ <el-button type="text">修改</el-button>
|
|
|
+ <el-button type="text">删除</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ sync
|
|
|
+ :total.sync="rules.total"
|
|
|
+ :page.sync="rules.page"
|
|
|
+ :limit.sync="rules.limit"
|
|
|
+ :page-sizes="rules.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import axios from "axios";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import load from "@/utils/loading";
|
|
|
+export default {
|
|
|
+ components: { pagination },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ searchForm: {
|
|
|
+ search: null,
|
|
|
+ },
|
|
|
+
|
|
|
+ tableList: [{}],
|
|
|
+ organList: [],
|
|
|
+ rules: {
|
|
|
+ // 分页规则
|
|
|
+ limit: 10, // 限制显示条数
|
|
|
+ page: 1, // 当前页
|
|
|
+ total: 0, // 总条数
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
+ created() {},
|
|
|
+ //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ mounted() {
|
|
|
+ // 获取分部
|
|
|
+
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {},
|
|
|
+ getList() {},
|
|
|
+ search() {
|
|
|
+ this.rules.page = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ onReSet() {},
|
|
|
+ gotoDetail(row){
|
|
|
+ this.$router.push('/operateManager/couponUpdate')
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang='scss' scoped>
|
|
|
+.titleCell {
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
+</style>
|