|
@@ -9,20 +9,17 @@
|
|
|
ref="searchForm"
|
|
|
:model="searchForm"
|
|
|
>
|
|
|
- <el-form-item prop="search">
|
|
|
- <el-input
|
|
|
- class="search"
|
|
|
- type="text"
|
|
|
- clearable
|
|
|
- v-model="searchForm.search"
|
|
|
- placeholder="学员名称、编号、手机号"
|
|
|
- ></el-input>
|
|
|
+ <el-form-item prop="ops">
|
|
|
+ <el-select v-model="searchForm.ops" placeholder="操作" clearable>
|
|
|
+ <el-option label="发放" :value="0"></el-option>
|
|
|
+ <el-option label="撤回" :value="1"></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="danger" @click="search">搜索</el-button>
|
|
|
- <el-button native-type="reset" type="primary" @click="onReSet"
|
|
|
+ <!-- <el-button native-type="reset" type="primary" @click="onReSet"
|
|
|
>重置</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="tableWrap">
|
|
@@ -34,22 +31,28 @@
|
|
|
>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="organName"
|
|
|
+ prop="createdTime"
|
|
|
label="发放时间"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="username"
|
|
|
+ prop="num"
|
|
|
label="数量"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
prop="phone"
|
|
|
- label="操作类型"
|
|
|
- ></el-table-column>
|
|
|
+ label="操作"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{scope.row.ops?'撤回':'发放'}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="subjectNames"
|
|
|
+ prop="name"
|
|
|
label="操作人"
|
|
|
></el-table-column>
|
|
|
<el-table-column align="center" prop="subjectNames" label="操作">
|
|
@@ -78,8 +81,8 @@
|
|
|
/>
|
|
|
</div>
|
|
|
|
|
|
- <el-dialog title="发放名单" :visible.sync="couponDetailVisible" width="1000px" append-to-body>
|
|
|
- <couponGiveList :activeRow="activeRow" />
|
|
|
+ <el-dialog title="发放名单" :visible.sync="couponDetailVisible" width="1000px" append-to-body v-if="couponDetailVisible">
|
|
|
+ <couponGiveChiose :activeRow="activeRows" />
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="couponDetailVisible = false">取 消</el-button>
|
|
|
<el-button @click="couponDetailVisible = false" type="primary"
|
|
@@ -93,10 +96,12 @@
|
|
|
|
|
|
<script>
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
-import { getStudentList, addActivityUserMapperStudents } from "@/api/vipSeting";
|
|
|
-import couponGiveList from'./couponGiveList'
|
|
|
+import { getStudentList } from "@/api/vipSeting";
|
|
|
+import {getIssueRecord} from './api'
|
|
|
+import couponGiveChiose from'./couponGiveChiose'
|
|
|
export default {
|
|
|
- components: { pagination,couponGiveList },
|
|
|
+ props:['activeRow'],
|
|
|
+ components: { pagination,couponGiveChiose },
|
|
|
data() {
|
|
|
return {
|
|
|
searchForm: {
|
|
@@ -114,7 +119,7 @@ export default {
|
|
|
page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
},
|
|
|
couponDetailVisible:false,
|
|
|
- activeRow:null
|
|
|
+ activeRows:null
|
|
|
};
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
@@ -122,9 +127,6 @@ export default {
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
async mounted() {
|
|
|
// 获取分部
|
|
|
- if (this.$route.query.row) {
|
|
|
- this.activeRow = JSON.parse(this.$route.query.row);
|
|
|
- }
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
@@ -143,16 +145,18 @@ export default {
|
|
|
...rest,
|
|
|
page: this.rules.page,
|
|
|
rows: this.rules.limit,
|
|
|
+ couponId:this.activeRow.id
|
|
|
};
|
|
|
- const res = await getStudentList(params);
|
|
|
+ const res = await getIssueRecord(params);
|
|
|
this.tableList = res.data.rows;
|
|
|
+ this.rules.total = res.data.total;
|
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
|
}
|
|
|
},
|
|
|
revokeCoupon(row) {},
|
|
|
couponDetail(row) {
|
|
|
- this.activeRow = row;
|
|
|
+ this.activeRows = row;
|
|
|
this.couponDetailVisible = true
|
|
|
},
|
|
|
},
|