|
|
@@ -8,7 +8,7 @@
|
|
|
导出
|
|
|
</el-button>
|
|
|
</page-title>
|
|
|
- <div class="filters-container">
|
|
|
+ <div class="filters-container" @keyup.enter="getData">
|
|
|
<el-input placeholder="搜索..." v-model="search" clearable class="filter-item search">
|
|
|
<el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
|
|
|
</el-input>
|
|
|
@@ -43,9 +43,15 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="手机" prop="phone"></el-table-column>
|
|
|
<el-table-column label="创建时间" prop="createdAt" width="150"></el-table-column>
|
|
|
- <el-table-column label="操作" align="center" fixed="right">
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" width="200">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
|
|
|
+ <el-button @click="editRow(row)" type="text">编辑</el-button>
|
|
|
+ <el-button @click="removeCard(row)" size="mini" type="text" :disabled="!row.settleAccountId"
|
|
|
+ >解绑卡</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="removeAuth(row)" size="mini" type="text" :disabled="row.authStatus !== 'SUCCESS'"
|
|
|
+ >取消认证</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -165,7 +171,7 @@ export default {
|
|
|
.then(res => {
|
|
|
let el = document.createElement('div');
|
|
|
new ClipboardJS(el, {
|
|
|
- text: function (trigger) {
|
|
|
+ text: function(trigger) {
|
|
|
return res;
|
|
|
}
|
|
|
});
|
|
|
@@ -177,6 +183,86 @@ export default {
|
|
|
this.$message.error(e.error);
|
|
|
});
|
|
|
}
|
|
|
+ },
|
|
|
+ removeCard(row) {
|
|
|
+ this.$msgbox({
|
|
|
+ title: '确认解绑吗?',
|
|
|
+ message: '该操作无法撤回,请谨慎操作',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ beforeClose: (action, instance, done) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
+ instance.showCancelButton = false;
|
|
|
+ instance.closeOnClickModal = false;
|
|
|
+ instance.showClose = false;
|
|
|
+ this.$http
|
|
|
+ .post('/user/removeBankCardAdmin', { userId: row.id })
|
|
|
+ .then(res => {
|
|
|
+ done();
|
|
|
+ this.getData();
|
|
|
+ this.$message.success('解绑成功');
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ instance.showCancelButton = true;
|
|
|
+ instance.closeOnClickModal = true;
|
|
|
+ instance.showClose = true;
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ done();
|
|
|
+ this.getData();
|
|
|
+ this.$message.error(e.error || '解绑失败');
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ instance.showCancelButton = true;
|
|
|
+ instance.closeOnClickModal = true;
|
|
|
+ instance.showClose = true;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).then(_ => {});
|
|
|
+ },
|
|
|
+ removeAuth(row) {
|
|
|
+ this.$msgbox({
|
|
|
+ title: '确认取消认证吗?',
|
|
|
+ message: '该操作无法撤回,请谨慎操作',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ beforeClose: (action, instance, done) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
+ instance.showCancelButton = false;
|
|
|
+ instance.closeOnClickModal = false;
|
|
|
+ instance.showClose = false;
|
|
|
+ this.$http
|
|
|
+ .post('/user/removeAuthAdmin', { userId: row.id })
|
|
|
+ .then(res => {
|
|
|
+ done();
|
|
|
+ this.getData();
|
|
|
+ this.$message.success('取消认证成功');
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ instance.showCancelButton = true;
|
|
|
+ instance.closeOnClickModal = true;
|
|
|
+ instance.showClose = true;
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ done();
|
|
|
+ this.getData();
|
|
|
+ this.$message.error(e.error || '取消认证失败');
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ instance.showCancelButton = true;
|
|
|
+ instance.closeOnClickModal = true;
|
|
|
+ instance.showClose = true;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).then(_ => {});
|
|
|
}
|
|
|
}
|
|
|
};
|