|
@@ -2,23 +2,23 @@
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<div class="app-header-search">
|
|
<div class="app-header-search">
|
|
<el-form class="demo-form-inline">
|
|
<el-form class="demo-form-inline">
|
|
- <el-form-item label="机构名称:" style="width:280px;float: left;">
|
|
|
|
- <el-input v-model="listQuery.userName" placeholder="请输入机构名称" maxlength="50" style="width:200px;" @keyup.enter.native="handleFilter" />
|
|
|
|
|
|
+ <el-form-item label="门店名称:" style="width:280px;float: left;">
|
|
|
|
+ <el-input v-model="listQuery.userName" placeholder="请输入机构名称" maxlength="50" style="width:200px;" @keyup.enter.native="getList" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="联系人:" style="width:230px;float: left;">
|
|
<el-form-item label="联系人:" style="width:230px;float: left;">
|
|
- <el-input v-model="listQuery.linkMan" placeholder="请输入联系人姓名" maxlength="10" style="width:150px" @keyup.enter.native="handleFilter" />
|
|
|
|
|
|
+ <el-input v-model="listQuery.linkMan" placeholder="请输入联系人姓名" maxlength="10" style="width:150px" @keyup.enter.native="getList" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="手机号:" style="width:200px;float: left;">
|
|
<el-form-item label="手机号:" style="width:200px;float: left;">
|
|
- <el-input v-model="listQuery.bindMobile" placeholder="请输入手机号" maxlength="11" style="width:130px" @keyup.enter.native="handleFilter" />
|
|
|
|
|
|
+ <el-input v-model="listQuery.bindMobile" placeholder="请输入手机号" maxlength="11" style="width:130px" @keyup.enter.native="getList" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="上线状态:" style="width:190px;float: left;">
|
|
|
|
- <el-select v-model="listQuery.clubStatus" placeholder="请选择" style="width:100px" value="" @change="handleFilter">
|
|
|
|
|
|
+ <el-form-item label="状态:" style="width:190px;float: left;">
|
|
|
|
+ <el-select v-model="listQuery.clubStatus" placeholder="请选择" style="width:100px" value="" @change="getList">
|
|
<el-option label="全部" value="" />
|
|
<el-option label="全部" value="" />
|
|
<el-option label="已上线" value="90" />
|
|
<el-option label="已上线" value="90" />
|
|
<el-option label="已下线" value="91" />
|
|
<el-option label="已下线" value="91" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="创建时间:" style="width:410px;float: left;">
|
|
|
|
|
|
+ <el-form-item label="注册时间:" style="width:410px;float: left;">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="listQuery.startTime"
|
|
v-model="listQuery.startTime"
|
|
type="date"
|
|
type="date"
|
|
@@ -36,11 +36,11 @@
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item style="width:100px;float: left;">
|
|
<el-form-item style="width:100px;float: left;">
|
|
- <el-button type="primary" icon="el-icon-search" @click="handleFilter">搜索</el-button>
|
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item style="width:100px;float: left;">
|
|
<el-form-item style="width:100px;float: left;">
|
|
<router-link :to="'/club/form/'">
|
|
<router-link :to="'/club/form/'">
|
|
- <el-button type="primary">上线机构</el-button>
|
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-plus">上线机构</el-button>
|
|
</router-link>
|
|
</router-link>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -54,16 +54,15 @@
|
|
highlight-current-row
|
|
highlight-current-row
|
|
:header-cell-style="{background:'#eef1f6',color:'#606266'}"
|
|
:header-cell-style="{background:'#eef1f6',color:'#606266'}"
|
|
>
|
|
>
|
|
- <el-table-column align="center" label="序号" width="50">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- {{ ((pageNum-1)*listQuery.pageSize)+scope.$index+1 }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="账号" width="150" align="center" prop="account" />
|
|
|
|
- <el-table-column label="机构名称" width="180" align="center" prop="userName" />
|
|
|
|
|
|
+ <el-table-column label="门店名称" width="180" align="center" prop="userName" />
|
|
<el-table-column label="联系人" width="100" align="center" prop="linkMan" />
|
|
<el-table-column label="联系人" width="100" align="center" prop="linkMan" />
|
|
<el-table-column label="手机号" width="140" align="center" prop="bindMobile" />
|
|
<el-table-column label="手机号" width="140" align="center" prop="bindMobile" />
|
|
- <el-table-column class-name="status-col" label="上线状态" width="150" align="center" prop="status">
|
|
|
|
|
|
+ <el-table-column align="center" label="机构地址" prop="address">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <span>{{ `${row.province}${row.city}${row.town}${row.address}` }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="上线状态" width="150" align="center" prop="status">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
<el-tag v-if="row.clubStatus*1===91" type="danger" size="small">已下线</el-tag>
|
|
<el-tag v-if="row.clubStatus*1===91" type="danger" size="small">已下线</el-tag>
|
|
<el-tag v-else type="success" size="small">已上线</el-tag>
|
|
<el-tag v-else type="success" size="small">已上线</el-tag>
|
|
@@ -71,44 +70,36 @@
|
|
<el-button v-else type="primary" size="mini" @click="handOffline(row)">下线</el-button>
|
|
<el-button v-else type="primary" size="mini" @click="handOffline(row)">下线</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column align="center" label="机构地址" prop="address">
|
|
|
|
- <template slot-scope="{row}">
|
|
|
|
- <span>{{ `${row.province}${row.city}${row.town}${row.address}` }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" label="创建时间" prop="registerTime">
|
|
|
|
|
|
+
|
|
|
|
+ <el-table-column align="center" label="注册时间" prop="registerTime" width="100">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
<span>{{ row.registerTime }}</span>
|
|
<span>{{ row.registerTime }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
|
+ <el-table-column label="操作" align="center">
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
- <router-link :to="{path:'/club/editForm',query:{ clubID:row.clubID, userID: row.userID}}">
|
|
|
|
- <el-button type="primary" size="mini" style="width: 100px;margin:5px 0 0 0;">编辑</el-button>
|
|
|
|
- </router-link>
|
|
|
|
- <router-link :to="{path:'/club/operateList',query:{name:row.name,clubID:row.clubID,userID:row.userID}}">
|
|
|
|
- <el-button type="primary" size="mini" style="width: 100px;margin:5px 0 0 0;">查看运营人员</el-button>
|
|
|
|
- </router-link>
|
|
|
|
- <el-button type="primary" size="mini" style="width: 100px;margin:5px 0 0 0;" @click="handleEdit(row)">添加运营人员</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="handleRecordDetail(row)">查看资料</el-button>
|
|
|
|
+ <el-button v-if="row.clubStatus === 90" type="warning" size="mini" @click="hanleVerify(row)">审核</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
-
|
|
|
|
<pagination v-show="total>20" :total="total" :page.sync="listQuery.index" :limit.sync="listQuery.pageSize" @pagination="fetchData" />
|
|
<pagination v-show="total>20" :total="total" :page.sync="listQuery.index" :limit.sync="listQuery.pageSize" @pagination="fetchData" />
|
|
-
|
|
|
|
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="440px">
|
|
|
|
- <el-form ref="dataForm" :rules="rules" :model="addPeople" label-position="left" label-width="70px" style="width: 400px;">
|
|
|
|
- <el-form-item label="姓名" prop="linkName">
|
|
|
|
- <el-input v-model="addPeople.linkName" placeholder="请输入姓名" maxlength="11" />
|
|
|
|
|
|
+ <el-dialog title="审核" :visible.sync="dialogFormVisible" width="440px">
|
|
|
|
+ <el-form ref="dataForm" :rules="rules" :model="addPeople" label-position="right" label-width="120px">
|
|
|
|
+ <el-form-item label="状态:">
|
|
|
|
+ <el-select v-model="addPeople.status" placeholder="请选择">
|
|
|
|
+ <el-option label="请选择" value="" />
|
|
|
|
+ <el-option label="审核通过" :value="1" />
|
|
|
|
+ <el-option label="审核未通过" :value="2" />
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="手机号" prop="mobile">
|
|
|
|
- <el-input v-model="addPeople.mobile" placeholder="请输入手机号" maxlength="11" />
|
|
|
|
|
|
+ <el-form-item v-if="addPeople.status===2" label="原因:" prop="text">
|
|
|
|
+ <el-input v-model="addPeople.text" type="textarea" placeholder="请填写审核未通过原因,50字以内" maxlength="50" :autosize="{ minRows: 5, maxRows: 5}" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click="dialogFormVisible = false">取消</el-button>
|
|
<el-button @click="dialogFormVisible = false">取消</el-button>
|
|
- <el-button type="primary" :loading="loadingbut" @click="handleCreateOperator()">{{ loadingbuttext }}</el-button>
|
|
|
|
- <el-button type="primary" @click="handlePreservOperator()">保存生成邀请码</el-button>
|
|
|
|
|
|
+ <el-button type="primary" :disabled="disabled" @click="handleCreateOperator">保存</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<template>
|
|
<template>
|
|
@@ -120,7 +111,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getClubList, createOperator, preservOperator, updateStatus } from '@/api/club'
|
|
|
|
|
|
+import { getClubList, createOperator, updateStatus } from '@/api/club'
|
|
import Pagination from '@/components/Pagination'
|
|
import Pagination from '@/components/Pagination'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -128,13 +119,13 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
pageNum: 0,
|
|
pageNum: 0,
|
|
- list: null,
|
|
|
|
|
|
+ list: [],
|
|
listLoading: true,
|
|
listLoading: true,
|
|
total: 0,
|
|
total: 0,
|
|
listQuery: {
|
|
listQuery: {
|
|
index: 1,
|
|
index: 1,
|
|
pageSize: 20,
|
|
pageSize: 20,
|
|
- userOrganizeID: this.$store.getters.organizeID,
|
|
|
|
|
|
+ userOrganizeID: this.$store.getters.organizeId,
|
|
userName: '',
|
|
userName: '',
|
|
linkMan: '',
|
|
linkMan: '',
|
|
bindMobile: '',
|
|
bindMobile: '',
|
|
@@ -145,8 +136,8 @@ export default {
|
|
startTime: '',
|
|
startTime: '',
|
|
endTime: '',
|
|
endTime: '',
|
|
addPeople: {
|
|
addPeople: {
|
|
- linkName: '',
|
|
|
|
- mobile: ''
|
|
|
|
|
|
+ status: '',
|
|
|
|
+ text: ''
|
|
},
|
|
},
|
|
updateTemp: {},
|
|
updateTemp: {},
|
|
updateTatusType: '',
|
|
updateTatusType: '',
|
|
@@ -155,14 +146,10 @@ export default {
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
dialogStatus: '',
|
|
dialogStatus: '',
|
|
loadingbut: false,
|
|
loadingbut: false,
|
|
- loadingbuttext: '保存',
|
|
|
|
- textMap: {
|
|
|
|
- update: '添加运营人员',
|
|
|
|
- create: 'Create',
|
|
|
|
- titleText: '系统提示'
|
|
|
|
- },
|
|
|
|
rules: {
|
|
rules: {
|
|
linkName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
|
linkName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
|
|
|
+ status: [{ required: true, message: '请选择审核状态', trigger: 'blur' }],
|
|
|
|
+ text: [{ required: true, message: '请填写原因', trigger: 'blur' }],
|
|
mobile: [
|
|
mobile: [
|
|
{ required: true, message: '手机号码不能为空', trigger: 'blur' },
|
|
{ required: true, message: '手机号码不能为空', trigger: 'blur' },
|
|
{
|
|
{
|
|
@@ -176,15 +163,18 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
|
|
+ disabled() {
|
|
|
|
+ return !this.addPeople.status
|
|
|
|
+ },
|
|
organizeID() {
|
|
organizeID() {
|
|
- return this.$store.getters.organizeID
|
|
|
|
|
|
+ return this.$store.getters.organizeId
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.fetchData()
|
|
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- fetchData() {
|
|
|
|
|
|
+ getList() {
|
|
this.listLoading = true
|
|
this.listLoading = true
|
|
getClubList(this.listQuery).then(response => {
|
|
getClubList(this.listQuery).then(response => {
|
|
const data = response.data
|
|
const data = response.data
|
|
@@ -196,6 +186,10 @@ export default {
|
|
// 封装静态数据
|
|
// 封装静态数据
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ hanleVerify(row) {
|
|
|
|
+ // 审核
|
|
|
|
+ this.dialogFormVisible = true
|
|
|
|
+ },
|
|
handleEdit(row) { // 添加运营
|
|
handleEdit(row) { // 添加运营
|
|
console.log(row)
|
|
console.log(row)
|
|
this.dialogStatus = 'update'
|
|
this.dialogStatus = 'update'
|
|
@@ -208,37 +202,22 @@ export default {
|
|
handleCreateOperator() { // 保存
|
|
handleCreateOperator() { // 保存
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- const Formobj = { userOrganizeID: this.$store.getters.organizeID, configFlag: 1 }
|
|
|
|
|
|
+ const Formobj = { userOrganizeID: this.$store.getters.organizeId, configFlag: 1 }
|
|
const params = Object.assign(Formobj, this.addPeople)
|
|
const params = Object.assign(Formobj, this.addPeople)
|
|
this.loadingbut = true
|
|
this.loadingbut = true
|
|
- this.loadingbuttext = '保存中...'
|
|
|
|
createOperator(params).then(response => {
|
|
createOperator(params).then(response => {
|
|
this.$message({ message: response.msg, type: 'success', center: true })
|
|
this.$message({ message: response.msg, type: 'success', center: true })
|
|
this.dialogFormVisible = false
|
|
this.dialogFormVisible = false
|
|
this.loadingbut = false
|
|
this.loadingbut = false
|
|
- this.loadingbuttext = '保存'
|
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.loadingbut = false
|
|
this.loadingbut = false
|
|
- this.loadingbuttext = '保存'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- handlePreservOperator() { // 保存并生成邀请码
|
|
|
|
- this.$refs['dataForm'].validate((valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- const Formobj = { userOrganizeID: this.$store.getters.organizeID, configFlag: 2 }
|
|
|
|
- const params = Object.assign(Formobj, this.addPeople)
|
|
|
|
- preservOperator(params).then(response => {
|
|
|
|
- this.dialogFormVisible = false
|
|
|
|
- this.$message({ message: response.msg, type: 'success', center: true })
|
|
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handOnline(row) {
|
|
handOnline(row) {
|
|
- this.updateTemp = Object.assign({}, { clubID: row.clubID, userID: row.userID, clubStatus: row.clubStatus, userOrganizeID: this.$store.getters.organizeID })
|
|
|
|
- this.$confirm('确定上线该机构吗?', '系统提示', {
|
|
|
|
|
|
+ this.updateTemp = Object.assign({}, { clubID: row.clubID, userID: row.userID, clubStatus: row.clubStatus, userOrganizeID: this.$store.getters.organizeId })
|
|
|
|
+ this.$confirm('确定上线该门店吗?上线后门店负责人可使用账号密码登录小程序。', '系统提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
@@ -249,8 +228,8 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handOffline(row) {
|
|
handOffline(row) {
|
|
- this.updateTemp = Object.assign({}, { clubID: row.clubID, userID: row.userID, clubStatus: row.clubStatus, userOrganizeID: this.$store.getters.organizeID })
|
|
|
|
- this.$confirm('确定下线该机构吗?', '系统提示', {
|
|
|
|
|
|
+ this.updateTemp = Object.assign({}, { clubID: row.clubID, userID: row.userID, clubStatus: row.clubStatus, userOrganizeID: this.$store.getters.organizeId })
|
|
|
|
+ this.$confirm('确定下线该门店吗?下线后该门店将不能在小程序进行采购。', '系统提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
@@ -271,8 +250,8 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- handleFilter() {
|
|
|
|
- this.fetchData()
|
|
|
|
|
|
+ handleRecordDetail(row) {
|
|
|
|
+ this.$router.push({ path: '/club/details', query: { clubId: row.clubID }})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|