|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<div class="app-header-search">
|
|
|
- <el-form :inline="true" ref="searchForm" :model="searchForm" class="demo-form-inline">
|
|
|
+ <el-form ref="searchForm" :inline="true" :model="searchForm" class="demo-form-inline">
|
|
|
<el-form-item label="会所名称:">
|
|
|
<el-input v-model="searchForm.name" placeholder="请输入会所名称" maxlength="50" style="width:200px" />
|
|
|
</el-form-item>
|
|
@@ -24,8 +24,7 @@
|
|
|
placeholder="选择日期"
|
|
|
format="yyyy 年 MM 月 dd 日"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ />
|
|
|
至
|
|
|
<el-date-picker
|
|
|
v-model="endTime"
|
|
@@ -33,8 +32,7 @@
|
|
|
placeholder="选择日期"
|
|
|
format="yyyy 年 MM 月 dd 日"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="success" @click="onSubmit">搜索</el-button>
|
|
@@ -88,21 +86,21 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
- <pagination
|
|
|
- v-show="total>0"
|
|
|
- :total="total"
|
|
|
- :page-size = "10"
|
|
|
- :page.sync="listQuery.page"
|
|
|
- :limit.sync="listQuery.limit"
|
|
|
- @pagination="fetchData"
|
|
|
+ <pagination
|
|
|
+ v-show="total>0"
|
|
|
+ :total="total"
|
|
|
+ :page-size="10"
|
|
|
+ :page.sync="listQuery.page"
|
|
|
+ :limit.sync="listQuery.limit"
|
|
|
+ @pagination="fetchData"
|
|
|
/>
|
|
|
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
|
|
|
<el-form ref="dataForm" :rules="rules" :model="addPeople" label-position="left" label-width="70px" style="width: 400px; margin-left:24%;">
|
|
|
<el-form-item label="姓名" prop="linkName">
|
|
|
- <el-input v-model="addPeople.linkName" maxlength="11"/>
|
|
|
+ <el-input v-model="addPeople.linkName" maxlength="11" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="手机号" prop="mobile">
|
|
|
- <el-input v-model="addPeople.mobile" maxlength="11"/>
|
|
|
+ <el-input v-model="addPeople.mobile" maxlength="11" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -168,7 +166,7 @@ export default {
|
|
|
linkName: '',
|
|
|
mobile: ''
|
|
|
},
|
|
|
- updateTemp:{},
|
|
|
+ updateTemp: {},
|
|
|
updateTatusType: '',
|
|
|
dialogVisible: false,
|
|
|
dialogVisibleText: '',
|
|
@@ -191,34 +189,34 @@ export default {
|
|
|
methods: {
|
|
|
fetchData() {
|
|
|
this.listLoading = true
|
|
|
- let params = {userOrganizeID: this.organizeID,index:1,pageSize:10}
|
|
|
+ const params = { userOrganizeID: this.organizeID, index: 1, pageSize: 10 }
|
|
|
getClubList(params).then(response => {
|
|
|
- if(response.code === '1'){
|
|
|
- let data = response.data
|
|
|
+ if (response.code === '1') {
|
|
|
+ const data = response.data
|
|
|
this.list = data.results
|
|
|
this.listLoading = false
|
|
|
this.total = data.totalRecord
|
|
|
- }else{
|
|
|
- this.$message.error(response.msg);
|
|
|
+ } else {
|
|
|
+ this.$message.error(response.msg)
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
// 封装静态数据
|
|
|
})
|
|
|
this.listLoading = false
|
|
|
},
|
|
|
- handleEdit(row) {//添加运营
|
|
|
+ handleEdit(row) { // 添加运营
|
|
|
console.log(row)
|
|
|
this.dialogStatus = 'update'
|
|
|
this.dialogFormVisible = true
|
|
|
- this.addPeople = Object.assign({}, {clubID: row.clubID,userID: row.userID})
|
|
|
+ this.addPeople = Object.assign({}, { clubID: row.clubID, userID: row.userID })
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs['dataForm'].clearValidate()
|
|
|
})
|
|
|
},
|
|
|
- handleCreateOperator() {//保存
|
|
|
+ handleCreateOperator() { // 保存
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- let Formobj = {userOrganizeID: this.organizeID,configFlag:1}
|
|
|
+ const Formobj = { userOrganizeID: this.organizeID, configFlag: 1 }
|
|
|
const params = Object.assign(Formobj, this.addPeople)
|
|
|
createOperator(params).then(response => {
|
|
|
this.dialogFormVisible = false
|
|
@@ -231,10 +229,10 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- handlePreservOperator() {//保存并生成邀请码
|
|
|
+ handlePreservOperator() { // 保存并生成邀请码
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- let Formobj = {userOrganizeID: this.organizeID,configFlag:1}
|
|
|
+ const Formobj = { userOrganizeID: this.organizeID, configFlag: 1 }
|
|
|
const params = Object.assign(Formobj, this.addPeople)
|
|
|
preservOperator(params).then(response => {
|
|
|
this.dialogFormVisible = false
|
|
@@ -248,92 +246,59 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handOnline(row) {
|
|
|
- this.updateTemp = Object.assign({}, {
|
|
|
- clubID: row.clubID,
|
|
|
- userID: row.userID,
|
|
|
- clubStatus: row.clubStatus,
|
|
|
- userOrganizeID: this.organizeID
|
|
|
- })
|
|
|
+ this.updateTemp = Object.assign({}, { clubID: row.clubID, userID: row.userID, clubStatus: row.clubStatus, userOrganizeID: this.organizeID })
|
|
|
this.dialogVisible = true
|
|
|
this.dialogVisibleText = '确定上线该会所吗?'
|
|
|
this.updateTatusType = 'online'
|
|
|
},
|
|
|
handOffline(row) {
|
|
|
console.log(row.id)
|
|
|
- this.updateTemp = Object.assign({}, {
|
|
|
- clubID: row.clubID,
|
|
|
- userID: row.userID,
|
|
|
- clubStatus: row.clubStatus,
|
|
|
- userOrganizeID: this.organizeID
|
|
|
- })
|
|
|
+ this.updateTemp = Object.assign({}, { clubID: row.clubID, userID: row.userID, clubStatus: row.clubStatus, userOrganizeID: this.organizeID })
|
|
|
this.dialogVisible = true
|
|
|
this.dialogVisibleText = '确定下线该会所吗?'
|
|
|
this.updateTatusType = 'offline'
|
|
|
- },
|
|
|
+ },
|
|
|
handleConfim() {
|
|
|
if (this.updateTatusType === 'online') {
|
|
|
-<<<<<<< HEAD
|
|
|
- const params = Object.assign({},this.updateTemp)
|
|
|
+ const params = Object.assign({}, this.updateTemp)
|
|
|
updateStatus(params).then(response => {
|
|
|
- if(response.code === '1'){
|
|
|
- this.$message({ message: '上线会所成功',type: 'success',center: true});
|
|
|
- this.list =[]
|
|
|
+ if (response.code === '1') {
|
|
|
+ this.$message({ message: '上线会所成功', type: 'success', center: true })
|
|
|
+ this.list = []
|
|
|
this.fetchData()
|
|
|
- }else{
|
|
|
- this.$message.error(response.msg);
|
|
|
+ } else {
|
|
|
+ this.$message.error(response.msg)
|
|
|
}
|
|
|
this.dialogVisible = false
|
|
|
})
|
|
|
} else {
|
|
|
- const params = Object.assign({},this.updateTemp)
|
|
|
+ const params = Object.assign({}, this.updateTemp)
|
|
|
updateStatus(params).then(response => {
|
|
|
- if(response.code === '1'){
|
|
|
- this.$message({message: '下线会所成功',type: 'success',center: true });
|
|
|
- this.list =[]
|
|
|
+ if (response.code === '1') {
|
|
|
+ this.$message({ message: '下线会所成功', type: 'success', center: true })
|
|
|
+ this.list = []
|
|
|
this.fetchData()
|
|
|
- }else{
|
|
|
- this.$message.error(response.msg);
|
|
|
+ } else {
|
|
|
+ this.$message.error(response.msg)
|
|
|
}
|
|
|
this.dialogVisible = false
|
|
|
-=======
|
|
|
- console.log(this.updateTatusId)
|
|
|
- this.list[0].status = 2
|
|
|
- // preservOperator(addPeopleData).then(() => {
|
|
|
- // this.dialogFormVisible = false
|
|
|
- // })
|
|
|
- this.$message({
|
|
|
- message: '上线会所成功',
|
|
|
- type: 'success',
|
|
|
- center: true
|
|
|
- })
|
|
|
- } else {
|
|
|
- // preservOperator(addPeopleData).then(() => {
|
|
|
- // this.dialogFormVisible = false
|
|
|
- // })
|
|
|
- console.log(this.updateTatusId)
|
|
|
- this.list[1].status = 2
|
|
|
- this.$message({
|
|
|
- message: '下线会所成功',
|
|
|
- type: 'success',
|
|
|
- center: true
|
|
|
->>>>>>> 45b31d90824e0837b2595211e681ec66e4a2caea
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
onSubmit() {
|
|
|
this.$refs['searchForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- let Fromobj = {userOrganizeID: this.organizeID,startTime:this.startTime,endTime:this.endTime,index:1,pageSize:10}
|
|
|
+ const Fromobj = { userOrganizeID: this.organizeID, startTime: this.startTime, endTime: this.endTime, index: 1, pageSize: 10 }
|
|
|
const params = Object.assign(Fromobj, this.searchForm)
|
|
|
console.log(params)
|
|
|
getClubList(params).then(response => {
|
|
|
- if(response.code === '1'){
|
|
|
- let data = response.data
|
|
|
+ if (response.code === '1') {
|
|
|
+ const data = response.data
|
|
|
this.list = data.results
|
|
|
this.listLoading = false
|
|
|
this.total = data.totalRecord
|
|
|
- }else{
|
|
|
- this.$message.error(response.msg);
|
|
|
+ } else {
|
|
|
+ this.$message.error(response.msg)
|
|
|
}
|
|
|
}).catch(() => {
|
|
|
// 封装静态数据
|