|
@@ -8,7 +8,7 @@
|
|
|
@init="init"
|
|
|
/>
|
|
|
<table-list
|
|
|
- rowKey="id"
|
|
|
+ rowKey="userId"
|
|
|
ref="tableList"
|
|
|
:tableSets="tableSet"
|
|
|
:tableData="tableData"
|
|
@@ -16,10 +16,12 @@
|
|
|
:loading="loading"
|
|
|
>
|
|
|
<template slot="customize">
|
|
|
- <el-button type="primary"> 会员卡开通 </el-button>
|
|
|
- <el-button type="primary"> 会员充值 </el-button>
|
|
|
- <el-button type="primary"> 会员恢复 </el-button>
|
|
|
- <el-button> 注销会员 </el-button>
|
|
|
+ <el-button type="primary" @click="dialogVisibleVipOpen = true">
|
|
|
+ 会员卡开通
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="batch(1)"> 会员充值 </el-button>
|
|
|
+ <el-button type="primary" @click="batch(2)"> 会员恢复 </el-button>
|
|
|
+ <el-button @click="batch(3)"> 注销会员 </el-button>
|
|
|
<el-button> 导出excel </el-button>
|
|
|
</template>
|
|
|
<template slot="btn" slot-scope="props">
|
|
@@ -43,6 +45,10 @@
|
|
|
@search="search"
|
|
|
:activeData="activeData"
|
|
|
></dislog>
|
|
|
+ <vip-open
|
|
|
+ :dialogVisible.sync="dialogVisibleVipOpen"
|
|
|
+ @search="search"
|
|
|
+ ></vip-open>
|
|
|
<record
|
|
|
:dialogVisible.sync="dialogRecordVisible"
|
|
|
@search="search"
|
|
@@ -53,13 +59,14 @@
|
|
|
|
|
|
<script>
|
|
|
import dislog from "./dislog.vue";
|
|
|
+import vipOpen from "./vipOpen.vue";
|
|
|
import record from "./record.vue";
|
|
|
import searchBoxNew from "@/components/searchBoxNew";
|
|
|
import tableList from "@/components/tableList";
|
|
|
import pagination from "@/components/pagination";
|
|
|
export default {
|
|
|
- name: "",
|
|
|
- components: { searchBoxNew, tableList, pagination, dislog, record },
|
|
|
+ name: "MembershipCard",
|
|
|
+ components: { searchBoxNew, tableList, pagination, dislog, record, vipOpen },
|
|
|
data() {
|
|
|
return {
|
|
|
loading: false,
|
|
@@ -68,22 +75,27 @@ export default {
|
|
|
index: 0,
|
|
|
ch: "条",
|
|
|
num: true,
|
|
|
- choice: false,
|
|
|
+ choice: true,
|
|
|
addHide: true,
|
|
|
custom: false,
|
|
|
+ openCheckMore: true,
|
|
|
},
|
|
|
formList: [
|
|
|
{
|
|
|
- prop: "status",
|
|
|
+ prop: "vipTag",
|
|
|
placeholder: "会员状态",
|
|
|
scope: "select",
|
|
|
options: [
|
|
|
{
|
|
|
- label: "正常",
|
|
|
+ label: "未开通",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已开通",
|
|
|
value: 1,
|
|
|
},
|
|
|
{
|
|
|
- label: "注销",
|
|
|
+ label: "已注销",
|
|
|
value: 2,
|
|
|
},
|
|
|
],
|
|
@@ -97,79 +109,116 @@ export default {
|
|
|
tableSet: [
|
|
|
{
|
|
|
label: "会员状态",
|
|
|
- prop: "a",
|
|
|
+ prop: "vipTag",
|
|
|
hidden: true,
|
|
|
scope: "isOptions",
|
|
|
options: [
|
|
|
{
|
|
|
- label: "正常",
|
|
|
+ label: "未开通",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已开通",
|
|
|
value: 1,
|
|
|
},
|
|
|
{
|
|
|
- label: "注销",
|
|
|
+ label: "已注销",
|
|
|
value: 2,
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
label: "会员来源",
|
|
|
- prop: "b",
|
|
|
+ prop: "vipFrom",
|
|
|
hidden: true,
|
|
|
+ scope: "isOptions",
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ label: "云学堂PC",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "云学堂H5",
|
|
|
+ value: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "云学堂小程序",
|
|
|
+ value: 3,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "e管证",
|
|
|
+ value: 4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "教育智慧管理系统",
|
|
|
+ value: 5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "中正总平台",
|
|
|
+ value: 6,
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
label: "关联机构",
|
|
|
- prop: "c",
|
|
|
+ prop: "tenantName",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "姓名",
|
|
|
- prop: "d",
|
|
|
+ prop: "realname",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "性别",
|
|
|
- prop: "e",
|
|
|
+ prop: "sex",
|
|
|
hidden: true,
|
|
|
+ scope: "isOptions",
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ label: "男",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "女",
|
|
|
+ value: 2,
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
label: "身份证号",
|
|
|
- prop: "f",
|
|
|
+ prop: "idCard",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "手机号码",
|
|
|
- prop: "g",
|
|
|
+ prop: "telphone",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "当前积分",
|
|
|
- prop: "h",
|
|
|
- hidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "累计积分",
|
|
|
- prop: "i",
|
|
|
+ prop: "pointsValue",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "累计充值",
|
|
|
- prop: "j",
|
|
|
+ prop: "rechargeMoney",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "累计退款",
|
|
|
- prop: "k",
|
|
|
+ prop: "refundMoney",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "开通时间",
|
|
|
- prop: "l",
|
|
|
+ prop: "vipOpenTime",
|
|
|
hidden: true,
|
|
|
scope: "aTimeList",
|
|
|
},
|
|
|
{
|
|
|
label: "注销时间",
|
|
|
- prop: "n",
|
|
|
+ prop: "vipCloseTime",
|
|
|
hidden: true,
|
|
|
scope: "aTimeList",
|
|
|
},
|
|
@@ -178,6 +227,7 @@ export default {
|
|
|
total: 0,
|
|
|
dialogVisible: false,
|
|
|
dialogRecordVisible: false,
|
|
|
+ dialogVisibleVipOpen: false,
|
|
|
activeData: {},
|
|
|
};
|
|
|
},
|
|
@@ -185,46 +235,58 @@ export default {
|
|
|
this.search(2);
|
|
|
},
|
|
|
methods: {
|
|
|
+ batch(i) {
|
|
|
+ if (this.$refs.tableList.allCheckData.length === 0) {
|
|
|
+ this.$message.error("请勾选数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (i == 1) {
|
|
|
+ } else if (i == 2 || i == 3) {
|
|
|
+ this.$confirm(`是否${i == 2 ? "恢复" : "注销"}选中的会员`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$api[
|
|
|
+ i == 2 ? "appuserrestoreBatchVip" : "appusercloseBatchVip"
|
|
|
+ ]({
|
|
|
+ userIdList: this.$refs.tableList.allCheckData.map(
|
|
|
+ (k) => k.userId
|
|
|
+ ),
|
|
|
+ }).then((res) => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.search(2);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ }
|
|
|
+ },
|
|
|
addClick(data) {
|
|
|
this.activeData = data || {};
|
|
|
this.dialogVisible = true;
|
|
|
},
|
|
|
search(v) {
|
|
|
- this.tableData = [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- a: 1,
|
|
|
- b: "云学堂",
|
|
|
- c: "广东中正科技公司",
|
|
|
- d: "张三",
|
|
|
- e: "男",
|
|
|
- f: "4408232023012332111",
|
|
|
- g: 13800138000,
|
|
|
- h: 100,
|
|
|
- i: 300,
|
|
|
- j: 200,
|
|
|
- k: 0,
|
|
|
- l: 1234567891,
|
|
|
- n: 1234567891,
|
|
|
- },
|
|
|
- ];
|
|
|
- // this.loading = true;
|
|
|
- // if (v === 2) {
|
|
|
- // this.formData = {
|
|
|
- // pageSize: 10,
|
|
|
- // pageNum: 1,
|
|
|
- // };
|
|
|
- // }
|
|
|
- // this.$api
|
|
|
- // .xxx(this.formData)
|
|
|
- // .then((res) => {
|
|
|
- // this.tableData = res.rows;
|
|
|
- // this.total = res.total;
|
|
|
- // this.navText.index = res.total;
|
|
|
- // })
|
|
|
- // .finally(() => {
|
|
|
- // this.loading = false;
|
|
|
- // });
|
|
|
+ this.loading = true;
|
|
|
+ if (v === 2) {
|
|
|
+ this.formData = {
|
|
|
+ pageSize: 10,
|
|
|
+ pageNum: 1,
|
|
|
+ };
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.tableList.clearMoreActive();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.$api
|
|
|
+ .appuservipUserList(this.formData)
|
|
|
+ .then((res) => {
|
|
|
+ this.tableData = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ this.navText.index = res.total;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
init() {
|
|
|
this.search(2);
|