|
@@ -102,9 +102,9 @@
|
|
</span>
|
|
</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="地址" width="75">
|
|
|
|
- <template>
|
|
|
|
- <el-button type="text" size="mini">购买记录</el-button>
|
|
|
|
|
|
+ <el-table-column label="操作" width="75">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <el-button type="text" size="mini" @click="handleTagsList(row)">购买记录</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -116,22 +116,36 @@
|
|
:page-size="20"
|
|
:page-size="20"
|
|
:page.sync="listQuery.pageNum"
|
|
:page.sync="listQuery.pageNum"
|
|
:limit.sync="listQuery.pageSize"
|
|
:limit.sync="listQuery.pageSize"
|
|
|
|
+ @pagination="getList"
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
<el-form :model="form" label-width="120px">
|
|
<el-form :model="form" label-width="120px">
|
|
- <el-form-item label="机构">
|
|
|
|
- <el-button type="text" size="mini" @click="dialogTableVisible = true">请选择机构</el-button>
|
|
|
|
|
|
+ <el-form-item label="机构" :hidden="!hiddenItem">
|
|
|
|
+ <el-button type="text" size="mini" @click="getclubList()">请选择机构</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="机构" :hidden="hiddenItem">
|
|
|
|
+ <el-table :data="clubData" border>
|
|
|
|
+ <el-table-column prop="clubId" label="机构Id" />
|
|
|
|
+ <el-table-column prop="name" label="机构名称" width="150px" />
|
|
|
|
+ <el-table-column prop="linkMan" label="联系人" />
|
|
|
|
+ <el-table-column prop="contractMobile" label="手机号" width="120px" />
|
|
|
|
+ <el-table-column label="操作">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <el-button type="text" @click="deleteClub(row)">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="赠送会员">
|
|
<el-form-item label="赠送会员">
|
|
- <el-input v-model="form.month" size="mini">
|
|
|
|
|
|
+ <el-input v-model="form.month" size="mini" style="width: 150px">
|
|
<template slot="append">个月</template>
|
|
<template slot="append">个月</template>
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="primary" size="mini">保存</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="save()">保存</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
@@ -169,25 +183,26 @@
|
|
<el-button type="primary">搜索</el-button>
|
|
<el-button type="primary">搜索</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <el-table ref="table" :data="clubTableData" @select="handleSelect">
|
|
|
|
|
|
+ <el-table ref="table" :data="clubTableData" height="350px" @select="handleSelect">
|
|
<el-table-column type="selection" width="55" />
|
|
<el-table-column type="selection" width="55" />
|
|
<el-table-column property="clubId" label="机构Id" width="150" />
|
|
<el-table-column property="clubId" label="机构Id" width="150" />
|
|
- <el-table-column property="clubName" label="机构名称" width="150" />
|
|
|
|
- <el-table-column property="sname" label="机构简称" width="200" />
|
|
|
|
|
|
+ <el-table-column property="name" label="机构名称" width="150" />
|
|
|
|
+ <el-table-column property="shortName" label="机构简称" width="200" />
|
|
<el-table-column property="linkMan" label="联系人" />
|
|
<el-table-column property="linkMan" label="联系人" />
|
|
- <el-table-column property="mobile" label="地址" />
|
|
|
|
|
|
+ <el-table-column property="contractMobile" label="手机号" />
|
|
</el-table>
|
|
</el-table>
|
|
<div slot="footer">
|
|
<div slot="footer">
|
|
- <el-button type="primary">确定</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="pushClub()">确定</el-button>
|
|
<el-button type="primary" @click="dialogTableVisible = false">取消</el-button>
|
|
<el-button type="primary" @click="dialogTableVisible = false">取消</el-button>
|
|
</div>
|
|
</div>
|
|
<!-- 页码 -->
|
|
<!-- 页码 -->
|
|
<pagination
|
|
<pagination
|
|
:total="clubTotal"
|
|
:total="clubTotal"
|
|
- :page-sizes="[100]"
|
|
|
|
- :page-size="100"
|
|
|
|
- :page.sync="listQuery.pageNum"
|
|
|
|
- :limit.sync="listQuery.pageSize"
|
|
|
|
|
|
+ :page-sizes="[20, 30, 50, 100]"
|
|
|
|
+ :page-size="20"
|
|
|
|
+ :page.sync="clubForm.pageNum"
|
|
|
|
+ :limit.sync="clubForm.pageSize"
|
|
|
|
+ @pagination="getclubList"
|
|
/>
|
|
/>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
@@ -195,7 +210,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
|
-import { fetchMemberList } from '@/api/member/manage/manage'
|
|
|
|
|
|
+import { fetchMemberList, fetchClubList, saveSvip } from '@/api/member/manage/manage'
|
|
|
|
|
|
const defaultListQuery = {
|
|
const defaultListQuery = {
|
|
clubName: '', // 机构名称
|
|
clubName: '', // 机构名称
|
|
@@ -322,6 +337,9 @@ export default {
|
|
total: 0,
|
|
total: 0,
|
|
tableData: [],
|
|
tableData: [],
|
|
form: {
|
|
form: {
|
|
|
|
+ clubId: 0,
|
|
|
|
+ userId: 0,
|
|
|
|
+ contractMobile: 0,
|
|
month: 0
|
|
month: 0
|
|
},
|
|
},
|
|
dialogTableVisible: false,
|
|
dialogTableVisible: false,
|
|
@@ -330,37 +348,18 @@ export default {
|
|
clubForm: {
|
|
clubForm: {
|
|
clubId: 0,
|
|
clubId: 0,
|
|
clubName: '',
|
|
clubName: '',
|
|
- sname: ''
|
|
|
|
|
|
+ sname: '',
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 20
|
|
},
|
|
},
|
|
// 机构选择
|
|
// 机构选择
|
|
radio: 1,
|
|
radio: 1,
|
|
- clubTableData: [
|
|
|
|
- {
|
|
|
|
- clubId: 1,
|
|
|
|
- clubName: '2016-05-03',
|
|
|
|
- sname: '555',
|
|
|
|
- linkMan: '王小虎',
|
|
|
|
- mobile: '15874692135'
|
|
|
|
- }, {
|
|
|
|
- clubId: 2,
|
|
|
|
- clubName: '2016-05-03',
|
|
|
|
- sname: '555',
|
|
|
|
- linkMan: '王小虎',
|
|
|
|
- mobile: '15874692135'
|
|
|
|
- }, {
|
|
|
|
- clubId: 3,
|
|
|
|
- clubName: '2016-05-03',
|
|
|
|
- sname: '555',
|
|
|
|
- linkMan: '王小虎',
|
|
|
|
- mobile: '15874692135'
|
|
|
|
- }, {
|
|
|
|
- clubId: 4,
|
|
|
|
- clubName: '2016-05-03',
|
|
|
|
- sname: '555',
|
|
|
|
- linkMan: '王小虎',
|
|
|
|
- mobile: '15874692135'
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ hiddenItem: true,
|
|
|
|
+ clubTableData: [],
|
|
|
|
+ // 选择机构
|
|
|
|
+ rows: [],
|
|
|
|
+ // 机构数据
|
|
|
|
+ clubData: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -371,7 +370,8 @@ export default {
|
|
handleSelect(selection, row) {
|
|
handleSelect(selection, row) {
|
|
this.$refs.table.clearSelection()
|
|
this.$refs.table.clearSelection()
|
|
this.$refs.table.toggleRowSelection(row)
|
|
this.$refs.table.toggleRowSelection(row)
|
|
- console.log('row', row)
|
|
|
|
|
|
+ this.rows = row
|
|
|
|
+ console.log('row', this.rows)
|
|
},
|
|
},
|
|
// 会员列表数据
|
|
// 会员列表数据
|
|
async getList() {
|
|
async getList() {
|
|
@@ -380,6 +380,36 @@ export default {
|
|
this.tableData = res.data.results
|
|
this.tableData = res.data.results
|
|
this.total = res.data.totalRecord
|
|
this.total = res.data.totalRecord
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
|
|
+ },
|
|
|
|
+ async getclubList() {
|
|
|
|
+ this.dialogTableVisible = true
|
|
|
|
+ const res = await fetchClubList(this.clubForm)
|
|
|
|
+ this.clubTableData = res.data.results
|
|
|
|
+ this.clubTotal = res.data.totalRecord
|
|
|
|
+ },
|
|
|
|
+ pushClub() {
|
|
|
|
+ this.clubData.push(this.rows)
|
|
|
|
+ this.dialogTableVisible = false
|
|
|
|
+ this.row = []
|
|
|
|
+ this.hiddenItem = false
|
|
|
|
+ console.log(this.clubData)
|
|
|
|
+ },
|
|
|
|
+ // 清除机构
|
|
|
|
+ deleteClub(row) {
|
|
|
|
+ this.clubData = []
|
|
|
|
+ this.hiddenItem = true
|
|
|
|
+ },
|
|
|
|
+ async save() {
|
|
|
|
+ this.form.clubId = this.clubData[0].clubId
|
|
|
|
+ this.form.userId = this.clubData[0].userId
|
|
|
|
+ this.form.contractMobile = this.clubData[0].contractMobile
|
|
|
|
+ const res = await saveSvip(this.form)
|
|
|
|
+ if (res.code === 1) {
|
|
|
|
+ this.deleteClub()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleTagsList(row) {
|
|
|
|
+ this.$router.push({ path: '/member/member/record-list', query: { clubId: row.clubId, userId: row.userId }})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|