|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
- <div class="app-title">当前会所:商城测试演示会所</div>
|
|
|
|
|
|
+ <div class="app-title">当前会所: <span>商城测试演示会所</span> </div>
|
|
<el-table
|
|
<el-table
|
|
v-loading="listLoading"
|
|
v-loading="listLoading"
|
|
:data="list"
|
|
:data="list"
|
|
@@ -8,6 +8,7 @@
|
|
border
|
|
border
|
|
fit
|
|
fit
|
|
highlight-current-row
|
|
highlight-current-row
|
|
|
|
+ :header-cell-style="{background:'#eef1f6',color:'#606266'}"
|
|
>
|
|
>
|
|
<el-table-column align="center" label="序号" width="50">
|
|
<el-table-column align="center" label="序号" width="50">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -17,15 +18,17 @@
|
|
<el-table-column label="账号" width="150" align="center" prop="classifyNum" />
|
|
<el-table-column label="账号" width="150" align="center" prop="classifyNum" />
|
|
<el-table-column label="姓名" width="150" align="center" prop="classifyName" />
|
|
<el-table-column label="姓名" width="150" align="center" prop="classifyName" />
|
|
<el-table-column label="手机号码" width="110" align="center" prop="telephone" />
|
|
<el-table-column label="手机号码" width="110" align="center" prop="telephone" />
|
|
- <el-table-column label="邀请码" width="100" align="center" prop="code">
|
|
|
|
|
|
+ <el-table-column label="邀请码" width="130" align="center" prop="code">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
- <span>{{ row.code }}</span>
|
|
|
|
- <el-tag type="success">{{ row.status*1 === 1 ? '已使用' : '未使用' }}</el-tag>
|
|
|
|
|
|
+ <span v-if="row.codeType" style="text-align: center;float:left">{{ row.code }}</span>
|
|
|
|
+ <span v-if="row.codeType" :style="{color: rexpStautsColor(row.status)}">{{ rexpStautsText(row.status) }}</span>
|
|
|
|
+ <el-tag v-else type="info">—— ——</el-tag>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</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="100" align="center" prop="status">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
- <el-tag>{{ row.status*1 === 1 ? '已绑定' : '未绑定' }}</el-tag>
|
|
|
|
|
|
+ <i v-if="row.status === 2" class="el-icon-success" style="color:#67C23A;font-size: 20px;" />
|
|
|
|
+ <!-- <i v-else class="el-icon-error" style="color: #E6A23C;font-size: 20px;" /> -->
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="center" label="微信昵称" width="110" prop="watchName" />
|
|
<el-table-column align="center" label="微信昵称" width="110" prop="watchName" />
|
|
@@ -34,16 +37,16 @@
|
|
<el-table-column align="center" label="绑定时间" width="160" prop="bindTime" />
|
|
<el-table-column align="center" label="绑定时间" width="160" prop="bindTime" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
- <el-button type="primary" size="mini" @click="handleEdit(row)">编辑</el-button>
|
|
|
|
- <el-button type="primary" size="mini" @click="handleUntying(row)">解绑</el-button>
|
|
|
|
- <el-button type="primary" size="small" @click="handleUntying(row)">生成邀请码</el-button>
|
|
|
|
|
|
+ <el-button v-if="row.codeType" type="primary" size="mini" @click="handleEdit(row)">编辑</el-button>
|
|
|
|
+ <el-button v-if="row.codeType" type="primary" size="mini" @click="handleUntying(row)">解绑</el-button>
|
|
|
|
+ <el-button v-else type="primary" size="small" @click="handleGenerateCode(row)">生成邀请码</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="fetchData" />
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="fetchData" />
|
|
|
|
|
|
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
|
|
|
|
|
|
+ <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="40%">
|
|
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="70px" style="width: 400px; margin-left:24%;">
|
|
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="70px" style="width: 400px; margin-left:24%;">
|
|
<el-form-item label="姓名" prop="classifyName">
|
|
<el-form-item label="姓名" prop="classifyName">
|
|
<el-input v-model="temp.classifyName" />
|
|
<el-input v-model="temp.classifyName" />
|
|
@@ -57,11 +60,11 @@
|
|
<el-button type="primary" @click="dialogStatus==='create' ? createData() : updateData()">确定</el-button>
|
|
<el-button type="primary" @click="dialogStatus==='create' ? createData() : updateData()">确定</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <el-dialog title="提示" :visible.sync="dialogVisible" width="10%">
|
|
|
|
- <span>确定解绑该运营人员吗?</span>
|
|
|
|
|
|
+ <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisible" width="20%">
|
|
|
|
+ <span>{{ dialogVisibleText }}</span>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
- <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="handleConfirm()">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
@@ -88,6 +91,8 @@ export default {
|
|
listLoading: true,
|
|
listLoading: true,
|
|
total: 100,
|
|
total: 100,
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
|
|
+ dialogVisibleText: '',
|
|
|
|
+ handleConfirmType: '',
|
|
listQuery: {
|
|
listQuery: {
|
|
page: 1,
|
|
page: 1,
|
|
limit: 10,
|
|
limit: 10,
|
|
@@ -106,7 +111,10 @@ export default {
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
dialogStatus: '',
|
|
dialogStatus: '',
|
|
textMap: {
|
|
textMap: {
|
|
|
|
+ edit: '编辑',
|
|
update: '提示',
|
|
update: '提示',
|
|
|
|
+ untying: '解绑',
|
|
|
|
+ generate: '生成邀请码',
|
|
create: 'Create'
|
|
create: 'Create'
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
@@ -138,7 +146,8 @@ export default {
|
|
telephone: 13888888888,
|
|
telephone: 13888888888,
|
|
createTime: '2020-01-01:20:30:56',
|
|
createTime: '2020-01-01:20:30:56',
|
|
bindTime: '2020-01-01:20:30:56',
|
|
bindTime: '2020-01-01:20:30:56',
|
|
- status: 1
|
|
|
|
|
|
+ status: 0,
|
|
|
|
+ codeType: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
id: 2,
|
|
id: 2,
|
|
@@ -151,7 +160,36 @@ export default {
|
|
telephone: 13888888888,
|
|
telephone: 13888888888,
|
|
createTime: '2020-01-01:20:30:56',
|
|
createTime: '2020-01-01:20:30:56',
|
|
bindTime: '2020-01-01:20:30:56',
|
|
bindTime: '2020-01-01:20:30:56',
|
|
- status: 1
|
|
|
|
|
|
+ status: 1,
|
|
|
|
+ codeType: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 3,
|
|
|
|
+ organizeID: 1,
|
|
|
|
+ classifyName: '吴小研',
|
|
|
|
+ classifyNum: '2020010120201110',
|
|
|
|
+ watchName: '轻描淡写',
|
|
|
|
+ openID: 'o0dXI5ajSPa6PkOmjjq1aar93JW4',
|
|
|
|
+ code: '315654',
|
|
|
|
+ telephone: 13888888888,
|
|
|
|
+ createTime: '2020-01-01:20:30:56',
|
|
|
|
+ bindTime: '2020-01-01:20:30:56',
|
|
|
|
+ status: 2,
|
|
|
|
+ codeType: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 3,
|
|
|
|
+ organizeID: 1,
|
|
|
|
+ classifyName: '吴小研',
|
|
|
|
+ classifyNum: '2020010120201110',
|
|
|
|
+ watchName: '轻描淡写',
|
|
|
|
+ openID: 'o0dXI5ajSPa6PkOmjjq1aar93JW4',
|
|
|
|
+ code: '315654',
|
|
|
|
+ telephone: 13888888888,
|
|
|
|
+ createTime: '2020-01-01:20:30:56',
|
|
|
|
+ bindTime: '2020-01-01:20:30:56',
|
|
|
|
+ status: 3,
|
|
|
|
+ codeType: true
|
|
}
|
|
}
|
|
]
|
|
]
|
|
})
|
|
})
|
|
@@ -160,7 +198,7 @@ export default {
|
|
handleEdit(row) {
|
|
handleEdit(row) {
|
|
this.temp = Object.assign({}, row)
|
|
this.temp = Object.assign({}, row)
|
|
this.temp.timestamp = new Date(this.temp.timestamp)
|
|
this.temp.timestamp = new Date(this.temp.timestamp)
|
|
- this.dialogStatus = 'update'
|
|
|
|
|
|
+ this.dialogStatus = 'edit'
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.$refs['dataForm'].clearValidate()
|
|
this.$refs['dataForm'].clearValidate()
|
|
@@ -168,6 +206,73 @@ export default {
|
|
},
|
|
},
|
|
handleUntying(row) {
|
|
handleUntying(row) {
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
|
|
+ this.dialogStatus = 'untying'
|
|
|
|
+ this.dialogVisibleText = '确定解绑该运营人员吗?'
|
|
|
|
+ this.handleConfirmType = 'untying'
|
|
|
|
+ },
|
|
|
|
+ handleGenerateCode(row) {
|
|
|
|
+ this.dialogVisible = true
|
|
|
|
+ this.dialogStatus = 'generate'
|
|
|
|
+ this.dialogVisibleText = '确定生成邀请码,并短信提醒该人员?'
|
|
|
|
+ this.handleConfirmType = 'generate'
|
|
|
|
+ },
|
|
|
|
+ handleConfirm() {
|
|
|
|
+ switch (this.handleConfirmType) {
|
|
|
|
+ case 'untying':
|
|
|
|
+ this.untyingRequst()
|
|
|
|
+ break
|
|
|
|
+ case 'generate':
|
|
|
|
+ this.generateRequst()
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ untyingRequst() {
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: 'Success',
|
|
|
|
+ message: '解绑成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ generateRequst() {
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: 'Success',
|
|
|
|
+ message: '邀请码生成成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ rexpStautsText(status) {
|
|
|
|
+ let text = ''
|
|
|
|
+ switch (status) {
|
|
|
|
+ case 1:
|
|
|
|
+ text = '有效'
|
|
|
|
+ break
|
|
|
|
+ case 2:
|
|
|
|
+ text = '已使用'
|
|
|
|
+ break
|
|
|
|
+ case 3:
|
|
|
|
+ text = '已失效'
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ return text
|
|
|
|
+ },
|
|
|
|
+ rexpStautsColor(status) {
|
|
|
|
+ let textColor = ''
|
|
|
|
+ switch (status) {
|
|
|
|
+ case 1:
|
|
|
|
+ textColor = '#E6A441'
|
|
|
|
+ break
|
|
|
|
+ case 2:
|
|
|
|
+ textColor = '#417DE6'
|
|
|
|
+ break
|
|
|
|
+ case 3:
|
|
|
|
+ textColor = '#C5C5C5'
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ return textColor
|
|
},
|
|
},
|
|
updateData() {
|
|
updateData() {
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
@@ -214,10 +319,13 @@ export default {
|
|
</script>
|
|
</script>
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
.app-title{
|
|
.app-title{
|
|
- line-height: 80px;
|
|
|
|
|
|
+ line-height: 40px;
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
color: #999999;
|
|
color: #999999;
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+ span{
|
|
|
|
+ color: #417DE6;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
-
|
|
|