|
@@ -0,0 +1,296 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <div class="filter-container">
|
|
|
+ <div class="filter-control">
|
|
|
+ <span style="width: auto;">机构名称:</span>
|
|
|
+ <el-input
|
|
|
+ v-model="listQuery.userName"
|
|
|
+ style="width:130px;"
|
|
|
+ placeholder="请输入机构名称"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="getList"
|
|
|
+ @clear="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="filter-control">
|
|
|
+ <span style="width: auto;">联系人:</span>
|
|
|
+ <el-input
|
|
|
+ v-model="listQuery.linkMan"
|
|
|
+ style="width:130px;"
|
|
|
+ placeholder="请输入联系人姓名"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="getList"
|
|
|
+ @clear="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="filter-control">
|
|
|
+ <span style="width: auto;">手机号:</span>
|
|
|
+ <el-input
|
|
|
+ v-model="listQuery.bindMobile"
|
|
|
+ style="width:130px;"
|
|
|
+ placeholder="请输入手机号"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="getList"
|
|
|
+ @clear="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="filter-control">
|
|
|
+ <span style="width: auto;">状态:</span>
|
|
|
+ <el-select v-model="listQuery.clubStatus" style="width:120px;" clearable @change="getList">
|
|
|
+ <el-option value="" label="全部" />
|
|
|
+ <el-option label="待审核" :value="1" />
|
|
|
+ <el-option label="已上线" :value="90" />
|
|
|
+ <el-option label="已上线" :value="91" />
|
|
|
+ <el-option label="审核未通过" :value="92" />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="filter-control">
|
|
|
+ <span style="width: auto;">绑定微信:</span>
|
|
|
+ <el-select v-model="listQuery.clubStatus" style="width:120px;" clearable @change="getList">
|
|
|
+ <el-option value="" label="全部" />
|
|
|
+ <el-option label="待审核" :value="1" />
|
|
|
+ <el-option label="已上线" :value="90" />
|
|
|
+ <el-option label="已上线" :value="91" />
|
|
|
+ <el-option label="审核未通过" :value="92" />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="filter-control">
|
|
|
+ <span>添加时间:</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="registTime"
|
|
|
+ type="daterange"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ @change="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="filter-control">
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="handleProcureEdit(1)">添加采购员</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ v-loading="listLoading"
|
|
|
+ :data="list"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ :header-cell-style="{background:'#eef1f6',color:'#606266'}"
|
|
|
+ >
|
|
|
+ <el-table-column label="姓名" align="center" prop="userName" />
|
|
|
+ <el-table-column label="手机号" align="center" prop="bindMobile" width="150" />
|
|
|
+ <el-table-column label="关联机构" align="center" prop="userName" />
|
|
|
+ <el-table-column label="状态" align="center" prop="status" width="150">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <template v-if="row.clubStatus*1===1">
|
|
|
+ <el-tag type="warning" size="small">待审核</el-tag>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="row.clubStatus*1===92">
|
|
|
+ <el-tag type="danger" size="small">审核未通过</el-tag>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <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-button v-if="row.clubStatus*1 === 91" type="primary" size="mini" @click="handOnline(row)">上线</el-button>
|
|
|
+ <el-button v-else type="primary" size="mini" @click="handOffline(row)">下线</el-button>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column class-name="status-col" label="微信绑定状态" align="center" prop="status">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <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>
|
|
|
+ <el-table-column align="center" label="添加时间" prop="registerTime">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.registerTime }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="绑定时间" prop="registerTime">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.registerTime }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-button type="primary" size="mini" @click="handleProcureEdit(2,row)">编辑</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="handleProcureEdit(2,row)">解除微信</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination v-show="total>10" :total="total" :page.sync="listQuery.index" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
|
|
+ <template>
|
|
|
+ <el-backtop style="right: 40px; bottom: 40px;">
|
|
|
+ <i class="el-icon-upload2" />
|
|
|
+ </el-backtop>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getClubList, updateStatus, clubAudit } from '@/api/club'
|
|
|
+import pickerOptions from '@/utils/time-picker.js'
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ registTime: '',
|
|
|
+ pickerOptions,
|
|
|
+ list: [],
|
|
|
+ listLoading: true,
|
|
|
+ total: 0,
|
|
|
+ listQuery: {
|
|
|
+ index: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ userOrganizeId: this.$store.getters.organizeId,
|
|
|
+ userName: '',
|
|
|
+ linkMan: '',
|
|
|
+ bindMobile: '',
|
|
|
+ clubStatus: '',
|
|
|
+ startTime: '',
|
|
|
+ endTime: ''
|
|
|
+ },
|
|
|
+ startTime: '',
|
|
|
+ endTime: '',
|
|
|
+ auditPeople: {
|
|
|
+ auditStatus: '',
|
|
|
+ auditNote: '',
|
|
|
+ userOrganizeId: this.$store.getters.organizeId,
|
|
|
+ clubId: '',
|
|
|
+ userId: '',
|
|
|
+ clubs: []
|
|
|
+ },
|
|
|
+ updateTemp: {},
|
|
|
+ updateTatusType: '',
|
|
|
+ dialogVisible: false,
|
|
|
+ dialogVisibleText: '',
|
|
|
+ dialogFormVisible: true,
|
|
|
+ dialogStatus: '',
|
|
|
+ loadingbut: false,
|
|
|
+ rules: {
|
|
|
+ // organizeType: [{ required: true, message: '请选择机构类型', trigger: 'blur' }],
|
|
|
+ auditStatus: [{ required: true, message: '请选择审核状态', trigger: 'blur' }],
|
|
|
+ auditNote: [{ required: true, message: '请填写原因', trigger: 'blur' }]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ disabled() {
|
|
|
+ return !this.addPeople.status
|
|
|
+ },
|
|
|
+ organizeId() {
|
|
|
+ return this.$store.getters.organizeId
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ initTime() {
|
|
|
+ // 初始化获取时间筛选值
|
|
|
+ if (this.registTime && this.registTime.length > 0) {
|
|
|
+ this.listQuery.startTime = this.registTime[0]
|
|
|
+ this.listQuery.endTime = this.registTime[1]
|
|
|
+ } else {
|
|
|
+ this.listQuery.startTime = ''
|
|
|
+ this.listQuery.endTime = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getList() {
|
|
|
+ this.listLoading = true
|
|
|
+ try {
|
|
|
+ this.initTime()
|
|
|
+ const res = await getClubList(this.listQuery)
|
|
|
+ this.list = res.data.results
|
|
|
+ this.total = res.data.totalRecord
|
|
|
+ this.listLoading = false
|
|
|
+ } catch (error) {
|
|
|
+ console.log('error', error)
|
|
|
+ this.listLoading = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ hanleVerify(row) {
|
|
|
+ // 审核
|
|
|
+ this.auditPeople.userId = row.userId
|
|
|
+ this.auditPeople.clubId = row.clubId
|
|
|
+ this.dialogFormVisible = true
|
|
|
+ },
|
|
|
+ handleEdit(row) { // 添加运营
|
|
|
+
|
|
|
+ },
|
|
|
+ handleCreateOperator() { // 确认审核
|
|
|
+ this.$refs['dataForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.clubAudit(this.auditPeople)
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 审核
|
|
|
+ async clubAudit(params) {
|
|
|
+ try {
|
|
|
+ await clubAudit(params)
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.getList()
|
|
|
+ this.dialogFormVisible = false
|
|
|
+ } catch (error) {
|
|
|
+ console.log('error', error)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handOnline(row) {
|
|
|
+ this.updateTemp = Object.assign({}, { clubId: row.clubId, userId: row.userId, clubStatus: row.clubStatus, userorganizeId: this.$store.getters.organizeId })
|
|
|
+ this.$confirm('确定上线该门店吗?上线后门店负责人可使用账号密码登录小程序。', '系统提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ const params = Object.assign({}, this.updateTemp)
|
|
|
+ this.updateClubStatus(params)
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handOffline(row) {
|
|
|
+ this.updateTemp = Object.assign({}, { clubId: row.clubId, userId: row.userId, clubStatus: row.clubStatus, userorganizeId: this.$store.getters.organizeId })
|
|
|
+ this.$confirm('确定下线该门店吗?下线后该门店将不能在小程序进行采购。', '系统提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ const params = Object.assign({}, this.updateTemp)
|
|
|
+ this.updateClubStatus(params)
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async updateClubStatus(params) {
|
|
|
+ try {
|
|
|
+ const res = await updateStatus(params)
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.getList()
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error(error.msg)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleProcureEdit(type, row) {
|
|
|
+ switch (type) {
|
|
|
+ case 1:
|
|
|
+ this.$router.push({ path: '/procure/edit', query: { type: 'add' }})
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ this.$router.push({ path: '/procure/edit', query: { type: 'edit', clubId: row.clubId, userId: row.userId, name: row.userName }})
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+</script>
|
|
|
+<style scoped>
|
|
|
+ .el-dialog{
|
|
|
+ width: 600px;
|
|
|
+ }
|
|
|
+</style>
|