|
@@ -1,6 +1,43 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <div class="app-title">当前会所:<span class="span">{{ clubTitle }}</span> </div>
|
|
|
+ <div class="app-title">当前会所:{{ clubTitle }} </div>
|
|
|
+ <div class="app-header-search">
|
|
|
+ <el-form class="demo-form-inline">
|
|
|
+ <el-form-item label="姓名:" style="width:210px;float: left;">
|
|
|
+ <el-input v-model="listQuery.name" placeholder="请输入姓名" maxlength="50" style="width:150px;" @keyup.enter.native="handleFilter" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="手机号:" style="width:200px;float: left;">
|
|
|
+ <el-input v-model="listQuery.mobile" placeholder="请输入手机号" maxlength="11" style="width:130px" @keyup.enter.native="handleFilter" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="状态:" style="width:160px;float: left;">
|
|
|
+ <el-select v-model="listQuery.status" placeholder="请选择" style="width:100px" value="" @change="handleFilter">
|
|
|
+ <el-option label="已绑定" value="2" />
|
|
|
+ <el-option label="未绑定" value="1" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="添加时间:" style="width:550px;float: left;">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="listQuery.startTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ @change="handleFilter"
|
|
|
+ />
|
|
|
+ 至
|
|
|
+ <el-date-picker
|
|
|
+ v-model="listQuery.endTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ @change="handleFilter"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="width:100px;float: left;">
|
|
|
+ <el-button type="success" icon="el-icon-search" @click="handleFilter">搜索</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="width:100px;float: left;">
|
|
|
+ <el-button type="primary" @click="bindAddPeople()">添加运营人员</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
<el-table
|
|
|
v-loading="listLoading"
|
|
|
:data="list"
|
|
@@ -25,9 +62,9 @@
|
|
|
<span v-else type="info">----</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column class-name="status-col" label="状态" width="100" align="center" prop="status">
|
|
|
+ <el-table-column class-name="status-col" label="状态" width="80" align="center" prop="status">
|
|
|
<template slot-scope="{row}">
|
|
|
- <i v-if="row.effectiveFlag === 2" class="el-icon-success" style="color:#67C23A;font-size: 20px;" />
|
|
|
+ <i v-if="row.status === '2'" class="el-icon-success" style="color:#67C23A;font-size: 18px;" />
|
|
|
<!-- <i v-else class="el-icon-error" style="color: #E6A23C;font-size: 20px;" /> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -37,7 +74,7 @@
|
|
|
<span v-else>----</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="OpenID" width="250" prop="openid">
|
|
|
+ <el-table-column align="center" label="OpenID" width="200" prop="openid">
|
|
|
<template slot-scope="{row}">
|
|
|
<span v-if="row.openid">{{ row.openid }}</span>
|
|
|
<span v-else>----</span>
|
|
@@ -67,19 +104,21 @@
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.index" :limit.sync="listQuery.pageSize" @pagination="initOperatorListData" />
|
|
|
|
|
|
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="40%">
|
|
|
- <el-form ref="dataForm" :rules="rules" :model="editTemp" label-position="left" label-width="70px" style="width: 400px; margin-left:24%;">
|
|
|
+ <el-form ref="dataForm" :rules="rules" :model="editTemp" label-position="left" label-width="80px" style="width: 400px;">
|
|
|
<el-form-item label="姓名" prop="linkName">
|
|
|
- <el-input v-model="editTemp.linkName" />
|
|
|
+ <el-input v-model="editTemp.linkName" placeholder="请输入姓名" maxlength="11" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="手机号" prop="mobile">
|
|
|
- <el-input v-model="editTemp.mobile" />
|
|
|
+ <el-input v-model="editTemp.mobile" placeholder="请输入手机号" maxlength="11" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogFormVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" :loading="loadingbut" @click="updateData()">{{ loadingbuttext }}</el-button>
|
|
|
+ <el-button type="primary" :loading="loadingbut" @click="handleCreateOperator()">{{ loadingbuttext }}</el-button>
|
|
|
+ <el-button v-if="dialogStatus === 'add'" type="primary" @click="handlePreservOperator()">保存生成邀请码</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisible" width="20%">
|
|
|
<span>{{ dialogVisibleText }}</span>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -91,12 +130,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- getOperatorList,
|
|
|
- updateOperatorCode,
|
|
|
- unbindOperator,
|
|
|
- preservOperator
|
|
|
-} from '@/api/club'
|
|
|
+import { getOperatorList, updateOperatorCode, unbindOperator, preservOperator } from '@/api/club'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
|
|
|
export default {
|
|
@@ -124,7 +158,12 @@ export default {
|
|
|
pageSize: 20,
|
|
|
clubID: this.$route.query.clubID,
|
|
|
userID: this.$route.query.userID,
|
|
|
- userOrganizeID: this.organizeID
|
|
|
+ userOrganizeID: this.organizeID,
|
|
|
+ linkName: '',
|
|
|
+ mobile: '',
|
|
|
+ status: '',
|
|
|
+ startTime: '',
|
|
|
+ endTime: ''
|
|
|
},
|
|
|
editTemp: {
|
|
|
userOrganizeID: this.organizeID,
|
|
@@ -133,10 +172,12 @@ export default {
|
|
|
},
|
|
|
codeRemp: {},
|
|
|
dialogFormVisible: false,
|
|
|
+ dialogFormVisibles: false,
|
|
|
dialogStatus: '',
|
|
|
loadingbut: false,
|
|
|
loadingbuttext: '确定',
|
|
|
textMap: {
|
|
|
+ add: '添加运营人员',
|
|
|
edit: '编辑运营人员',
|
|
|
update: '提示',
|
|
|
untying: '解绑',
|
|
@@ -144,8 +185,8 @@ export default {
|
|
|
updateCode: '更新邀请码'
|
|
|
},
|
|
|
rules: {
|
|
|
- classifyName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
|
|
- telephone: [{ required: true, message: '手机号不能为空', trigger: 'blur' }]
|
|
|
+ linkName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
|
|
+ mobile: [{ required: true, message: '手机号不能为空', trigger: 'blur' }]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -227,8 +268,20 @@ export default {
|
|
|
}, 3000)
|
|
|
})
|
|
|
},
|
|
|
- handleEdit(row) {
|
|
|
- const rowTemp = { userOrganizeID: this.organizeID, configFlag: 1, id: row.id, clubID: row.clubID, userID: row.userID, linkName: row.linkName, mobile: row.mobile }
|
|
|
+ bindAddPeople() { // 添加运营人员
|
|
|
+ this.loadingbuttext = '保存'
|
|
|
+ const addTemp = { clubID: this.listQuery.clubID, userID: this.listQuery.userID }
|
|
|
+ this.editTemp = Object.assign({}, addTemp)
|
|
|
+ console.log(this.editTemp)
|
|
|
+ this.dialogStatus = 'add'
|
|
|
+ this.dialogFormVisible = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs['dataForm'].clearValidate()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleEdit(row) { // 编辑
|
|
|
+ this.loadingbuttext = '保存'
|
|
|
+ const rowTemp = { id: row.id, clubID: row.clubID, userID: row.userID, linkName: row.linkName, mobile: row.mobile }
|
|
|
this.editTemp = Object.assign({}, rowTemp)
|
|
|
console.log(this.editTemp)
|
|
|
this.dialogStatus = 'edit'
|
|
@@ -237,10 +290,10 @@ export default {
|
|
|
this.$refs['dataForm'].clearValidate()
|
|
|
})
|
|
|
},
|
|
|
- updateData() {
|
|
|
+ handleCreateOperator() { // 保存
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- const params = Object.assign({}, this.editTemp)
|
|
|
+ const params = Object.assign({ userOrganizeID: this.organizeID, configFlag: 1 }, this.editTemp)
|
|
|
this.loadingbut = true
|
|
|
this.loadingbuttext = '保存中...'
|
|
|
preservOperator(params).then(response => {
|
|
@@ -261,6 +314,24 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ handlePreservOperator() { // 保存并生成邀请码
|
|
|
+ this.$refs['dataForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ const Formobj = { userOrganizeID: this.organizeID, configFlag: 2 }
|
|
|
+ const params = Object.assign(Formobj, this.editTemp)
|
|
|
+ preservOperator(params).then(response => {
|
|
|
+ this.dialogFormVisible = false
|
|
|
+ this.$message({ message: response.msg, type: 'success', center: true })
|
|
|
+ setTimeout(() => {
|
|
|
+ this.initOperatorListData()
|
|
|
+ }, 3000)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleFilter() {
|
|
|
+ this.initOperatorListData()
|
|
|
+ },
|
|
|
rexpStautsText(status) {
|
|
|
let text = ''
|
|
|
switch (status) {
|
|
@@ -301,9 +372,6 @@ export default {
|
|
|
font-weight: bold;
|
|
|
color: #999999;
|
|
|
margin-bottom:10px;
|
|
|
- }
|
|
|
- .app-title .span{
|
|
|
- color: #417DE6;
|
|
|
- margin-left: 15px;
|
|
|
+ color: #417DE6;
|
|
|
}
|
|
|
</style>
|