123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- <template>
- <div id="">
- <search-box-new
- ref="searchBox"
- :formData="formData"
- :formList="formList"
- @search="search"
- @init="init"
- />
- <table-list
- rowKey="id"
- ref="tableList"
- :tableSets="tableSet"
- :tableData="tableData"
- :navText="navText"
- :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> 导出excel </el-button>
- </template>
- <template slot="btn" slot-scope="props">
- <el-button type="text" @click="addClick(props.scope.row)"
- >充值</el-button
- ><el-button type="text" @click="cancellation(props.scope.row)"
- >注销</el-button
- ><el-button type="text" @click="record(props.scope.row)"
- >记录</el-button
- >
- </template>
- </table-list>
- <pagination
- :total="total"
- :pageSize.sync="formData.pageSize"
- :currentPage.sync="formData.pageNum"
- @search="search"
- />
- <dislog
- :dialogVisible.sync="dialogVisible"
- @search="search"
- :activeData="activeData"
- ></dislog>
- <record
- :dialogVisible.sync="dialogRecordVisible"
- @search="search"
- :activeData="activeData"
- ></record>
- </div>
- </template>
- <script>
- import dislog from "./dislog.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 },
- data() {
- return {
- loading: false,
- navText: {
- title: "会员卡",
- index: 0,
- ch: "条",
- num: true,
- choice: false,
- addHide: true,
- custom: false,
- },
- formList: [
- {
- prop: "status",
- placeholder: "会员状态",
- scope: "select",
- options: [
- {
- label: "正常",
- value: 1,
- },
- {
- label: "注销",
- value: 2,
- },
- ],
- },
- {
- prop: "tenantid",
- placeholder: "输入手机号码/身份证号",
- },
- ],
- formData: {},
- tableSet: [
- {
- label: "会员状态",
- prop: "a",
- hidden: true,
- scope: "isOptions",
- options: [
- {
- label: "正常",
- value: 1,
- },
- {
- label: "注销",
- value: 2,
- },
- ],
- },
- {
- label: "会员来源",
- prop: "b",
- hidden: true,
- },
- {
- label: "关联机构",
- prop: "c",
- hidden: true,
- },
- {
- label: "姓名",
- prop: "d",
- hidden: true,
- },
- {
- label: "性别",
- prop: "e",
- hidden: true,
- },
- {
- label: "身份证号",
- prop: "f",
- hidden: true,
- },
- {
- label: "手机号码",
- prop: "g",
- hidden: true,
- },
- {
- label: "当前积分",
- prop: "h",
- hidden: true,
- },
- {
- label: "累计积分",
- prop: "i",
- hidden: true,
- },
- {
- label: "累计充值",
- prop: "j",
- hidden: true,
- },
- {
- label: "累计退款",
- prop: "k",
- hidden: true,
- },
- {
- label: "开通时间",
- prop: "l",
- hidden: true,
- scope: "aTimeList",
- },
- {
- label: "注销时间",
- prop: "n",
- hidden: true,
- scope: "aTimeList",
- },
- ],
- tableData: [],
- total: 0,
- dialogVisible: false,
- dialogRecordVisible: false,
- activeData: {},
- };
- },
- created() {
- this.search(2);
- },
- methods: {
- 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;
- // });
- },
- init() {
- this.search(2);
- },
- //注销会员
- cancellation(row) {
- this.$alert("确定注销该会员吗?", "提示", {
- dangerouslyUseHTMLString: true,
- })
- .then(() => {})
- .catch(() => {});
- },
- record(data) {
- this.activeData = data || {};
- this.dialogRecordVisible = true;
- },
- },
- };
- </script>
- <style lang="scss" scoped></style>
|