| | |
| | | <el-table-column label="信用代码" prop="agency.creditCode" align="center"/> |
| | | <el-table-column label="用户名" prop="username" align="center" /> |
| | | <el-table-column label="注册手机号" prop="phone" align="center"/> |
| | | <el-table-column label="注册审批" prop="approve" align="center"> |
| | | <el-table-column label="注册审批" prop="state" align="center"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.approve == 0?'success':scope.row.approve == 1?'':'danger'"> |
| | | {{scope.row.approve == 0?'审批通过':scope.row.approve == 1?'待审批':'未通过'}} |
| | | <el-tag :type=" scope.row.state == 0 ? 'info' : scope.row.state == 1 ? '' : scope.row.state == 2 ?'success': scope.row.state == 3 || scope.row.state == 4 ?'danger':''"> |
| | | {{scope.row.state == 0?'暂存':scope.row.state == 1 ? '审核中':scope.row.state == 2 ? '审批通过':scope.row.state == 3? '审批驳回':'已作废' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="状态" prop="status" align="center"> |
| | | <template #default="scope"> |
| | | <el-switch |
| | | v-if="scope.row.approve == 0" |
| | | v-if="scope.row.state == 2" |
| | | v-model="scope.row.status" |
| | | :active-value="0" |
| | | :inactive-value="1" |
| | |
| | | <el-button link type="primary" @click="openDialog('view',scope.row)">查看</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | <el-button link type="primary" v-if="isSuper && scope.row.approve !==0 " @click="openApprove(scope.row)">审批</el-button> |
| | | <el-button link type="primary" v-if="isSuper && scope.row.state ==1 " @click="openApprove(scope.row)">审批</el-button> |
| | | <el-button link type="primary" @click="openPwd('pwd',scope.row)">修改密码</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <register ref="regRef" @getList=getList /> |
| | | <review-dialog ref="reviewRef" @getList=getList></review-dialog> |
| | | <el-dialog v-model="appDialog" title="审批用户" width="30%" center align-center> |
| | | <el-radio-group v-model="appoveForm.approve" style="width: 100%"> |
| | | <el-radio :label="0" size="large" border>通过</el-radio> |
| | | <el-radio :label="2" size="large" border>驳回</el-radio> |
| | | <el-radio-group v-model="appoveForm.state" style="width: 100%"> |
| | | <el-radio :label="2" size="large" border>通过</el-radio> |
| | | <el-radio :label="3" size="large" border>驳回</el-radio> |
| | | </el-radio-group> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue"; |
| | | import {getCurrentInstance, nextTick, onMounted, onUnmounted, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import superviseDialog from "../superviseUsers/components/superviseDialog.vue" |
| | | import { Register } from "@/layout/components"; |
| | |
| | | appDialog: false, |
| | | appoveForm: { |
| | | id: null, |
| | | approve: null |
| | | state: null |
| | | } |
| | | }); |
| | | |
| | | const { queryParams, total, dataList, isSuper, appDialog, appoveForm } = toRefs(data); |
| | | |
| | | onMounted(()=>{ |
| | | |
| | | const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | if(userInfo.identity == 0){data.isSuper = true} |
| | | getList() |
| | | nextTick(() => { |
| | | getList() |
| | | }) |
| | | }) |
| | | |
| | | onUnmounted(()=>{ |
| | |
| | | const openApprove =(val)=>{ |
| | | data.appoveForm = { |
| | | id: null, |
| | | approve: null |
| | | state: null |
| | | } |
| | | data.appoveForm.id = val.id |
| | | data.appDialog = true |
| | | } |
| | | |
| | | const confirmApproval = async () =>{ |
| | | if(data.appoveForm.approve !== null){ |
| | | if(data.appoveForm.state !== null){ |
| | | const res = await changeApprove(data.appoveForm) |
| | | if(res.code == 200){ |
| | | ElMessage.success('审批成功') |