|
@@ -1,41 +1,14 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent v-show="showSearch" label-width="auto">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent v-show="showSearch">
|
|
|
<el-form-item label="姓名" prop="name">
|
|
|
- <el-input v-model="queryParams.name" placeholder="请输入姓名" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
+ <el-input v-model="queryParams.name" placeholder="请输入姓名" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="手机号" prop="phone">
|
|
|
- <el-input v-model="queryParams.phone" placeholder="请输入手机号" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
+ <el-input v-model="queryParams.phone" placeholder="请输入手机号" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="身份证" prop="idCard">
|
|
|
- <el-input v-model="queryParams.idCard" placeholder="请输入身份证" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="开户行" prop="bankName">
|
|
|
- <el-input v-model="queryParams.bankName" placeholder="请输入开户行" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="银行卡账号" prop="bankAccount">
|
|
|
- <el-input v-model="queryParams.bankAccount" placeholder="请输入银行卡账号" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="支付宝" prop="alipay">
|
|
|
- <el-input v-model="queryParams.alipay" placeholder="请输入支付宝" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="身份证人面像" prop="p1">
|
|
|
- <el-input v-model="queryParams.p1" placeholder="请输入身份证人面像" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="身份证人徽面" prop="p2">
|
|
|
- <el-input v-model="queryParams.p2" placeholder="请输入身份证人徽面" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="服务公司" prop="serviceCompany">
|
|
|
- <el-input v-model="queryParams.serviceCompany" placeholder="请输入服务公司" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="是否签署合同" prop="isContract">
|
|
|
- <el-input v-model="queryParams.isContract" placeholder="请输入是否签署合同" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="合同有效期" prop="contractDate">
|
|
|
- <el-date-picker clearable v-model="queryParams.contractDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择合同有效期"></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="状态" prop="state">
|
|
|
- <el-input v-model="queryParams.state" placeholder="请输入状态" @keyup.enter.native="handleQuery" clearable class="inp"/>
|
|
|
+ <el-input v-model="queryParams.idCard" placeholder="请输入身份证" @keyup.enter.native="handleQuery" clearable class="inp" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
@@ -43,53 +16,61 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
- <el-button type="primary" icon="el-icon-plus" :disabled="ids.length > 0" @click="op('add')" v-hasPermi="['work:user:add']">新增</el-button>
|
|
|
- <el-button type="success" icon="el-icon-edit" :disabled="ids.length != 1" @click="op('edit',ids)" v-hasPermi="['work:user:edit']">修改</el-button>
|
|
|
- <el-button type="danger" icon="el-icon-delete" :disabled="ids.length == 0" @click="del" v-hasPermi="['work:user:remove']">删除{{ids.length>0?'('+ids.length+')':''}}</el-button>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <el-button type="success" icon="el-icon-edit" :disabled="ids.length != 1" @click="op('edit', ids)" v-hasPermi="['work:user:edit']">审核</el-button>
|
|
|
+ <el-button type="danger" icon="el-icon-delete" :disabled="ids.length == 0" @click="del" v-hasPermi="['work:user:remove']">删除{{ ids.length > 0 ? '(' + ids.length + ')' : '' }}</el-button>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
<el-table :data="response.rows" border @selection-change="selects" height="calc(100vh - 270px)">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="id" align="center" prop="id" />
|
|
|
<el-table-column label="姓名" align="center" prop="name" />
|
|
|
<el-table-column label="手机号" align="center" prop="phone" />
|
|
|
<el-table-column label="身份证" align="center" prop="idCard" />
|
|
|
- <el-table-column label="开户行" align="center" prop="bankName" />
|
|
|
- <el-table-column label="银行卡账号" align="center" prop="bankAccount" />
|
|
|
- <el-table-column label="支付宝" align="center" prop="alipay" />
|
|
|
- <el-table-column label="身份证人面像" align="center" prop="p1" />
|
|
|
- <el-table-column label="身份证人徽面" align="center" prop="p2" />
|
|
|
- <el-table-column label="服务公司" align="center" prop="serviceCompany" />
|
|
|
- <el-table-column label="是否签署合同" align="center" prop="isContract" />
|
|
|
- <el-table-column label="合同有效期" align="center" prop="contractDate" width="180">
|
|
|
+ <el-table-column label="实名认证" align="center" prop="isAuthentication" width="130">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.contractDate, '{y}-{m}-{d}') }}</span>
|
|
|
+ <el-tag type="danger" v-if="scope.row.isAuthentication == 0">未实名</el-tag>
|
|
|
+ <el-tag type="success" v-if="scope.row.isAuthentication == 1">已实名</el-tag>
|
|
|
+ <el-tag type="danger" v-if="scope.row.isAuthentication == 2">实名不通过</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="状态" align="center" prop="state" />
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column label="签署合同" align="center" prop="isContract" width="130">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button size="mini" type="text" icon="el-icon-edit" @click="op('edit',scope.row)" v-hasPermi="['work:user:edit']">修改</el-button>
|
|
|
+ <el-tag type="danger" v-if="scope.row.isContract == 0">未签署</el-tag>
|
|
|
+ <el-tag type="success" v-if="scope.row.isContract == 1">已签署</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="注册日期" align="center" prop="createTime" />
|
|
|
+ <el-table-column label="账号状态" align="center" prop="state" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="switch">
|
|
|
+ <el-switch v-model="scope.row.state" :active-value="0" :width="50" :inactive-value="1" @change="op('change', scope.row)"></el-switch>
|
|
|
+ <span class="zc" v-if="scope.row.state == 0">正常</span>
|
|
|
+ <span class="ty" v-else>禁用</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="op('edit', scope.row)" v-hasPermi="['work:user:edit']">审核</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:user:remove']">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<template slot="empty">
|
|
|
- <el-empty></el-empty>
|
|
|
+ <el-empty></el-empty>
|
|
|
</template>
|
|
|
</el-table>
|
|
|
- <pagination v-if="response.total>0" :total="response.total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList"/>
|
|
|
+ <pagination v-if="response.total > 0" :total="response.total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import edit from './edit'
|
|
|
+import edit from './edit';
|
|
|
export default {
|
|
|
- name: "User",
|
|
|
+ name: 'Users',
|
|
|
data() {
|
|
|
return {
|
|
|
ids: [],
|
|
|
- showSearch:true,
|
|
|
+ showSearch: true,
|
|
|
response: {},
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
@@ -97,14 +78,6 @@ export default {
|
|
|
name: null,
|
|
|
phone: null,
|
|
|
idCard: null,
|
|
|
- bankName: null,
|
|
|
- bankAccount: null,
|
|
|
- alipay: null,
|
|
|
- p1: null,
|
|
|
- p2: null,
|
|
|
- serviceCompany: null,
|
|
|
- isContract: null,
|
|
|
- contractDate: null,
|
|
|
state: null,
|
|
|
orderByColumn: 'id',
|
|
|
isAsc: 'desc'
|
|
@@ -116,8 +89,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
- this.ajax({ url: '/work/user/list', data: this.queryParams }).then(response => {
|
|
|
- this.response = response;
|
|
|
+ this.ajax({ url: '/work/user/list', data: this.queryParams }).then((response) => {
|
|
|
+ this.response = response;
|
|
|
});
|
|
|
},
|
|
|
handleQuery() {
|
|
@@ -125,28 +98,42 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
+ this.resetForm('queryForm');
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
selects(rows) {
|
|
|
- this.ids = rows.map(item => item.id)
|
|
|
+ this.ids = rows.map((item) => item.id);
|
|
|
},
|
|
|
op(tag, row) {
|
|
|
- if (tag == 'add') {
|
|
|
- this.iframe({ obj: edit, param: {}, title:'新增',width: '45%', height: '55%'});
|
|
|
- }
|
|
|
- if (tag == 'edit') {
|
|
|
- const id = row.id || this.ids[0];
|
|
|
- this.iframe({ obj: edit, param: {id: id}, title:'编辑',width: '50%', height: '50%'});
|
|
|
- }
|
|
|
+ if (tag == 'edit') {
|
|
|
+ const id = row.id || this.ids[0];
|
|
|
+ this.iframe({ obj: edit, param: { id: id }, title: '审核', width: '60%', height: '70%' });
|
|
|
+ }
|
|
|
+ //账号状态
|
|
|
+ if (tag == 'change') {
|
|
|
+ let text = row.state === 0 ? '启用' : '禁用';
|
|
|
+ this.$confirm('确认要' + text + '该用户吗?', '警告', { type: 'warning' })
|
|
|
+ .then(() => {
|
|
|
+ this.post({ url: '/work/user/edit', data: { id: row.id, state: row.state } })
|
|
|
+ .then((response) => {
|
|
|
+ this.$modal.msgSuccess(text + '成功');
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ row.state = row.state === 0 ? 1 : 0;
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ row.state = row.state === 0 ? 1 : 0;
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
del(row) {
|
|
|
- this.$confirm('是否确认删除选中数据?', '警告', { type: 'warning' }).then(() => {
|
|
|
- this.get({ url: '/work/user/remove/' + (row.id || this.ids) }).then(response => {
|
|
|
- this.$modal.msgSuccess('删除成功');
|
|
|
- this.getList();
|
|
|
- });
|
|
|
+ this.$confirm('是否确认删除选中数据?', '警告', { type: 'warning' }).then(() => {
|
|
|
+ this.get({ url: '/work/user/remove/' + (row.id || this.ids) }).then((response) => {
|
|
|
+ this.$modal.msgSuccess('删除成功');
|
|
|
+ this.getList();
|
|
|
});
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|