|
|
@@ -22,7 +22,7 @@
|
|
|
</page-title>
|
|
|
<div class="filters-container">
|
|
|
<el-input
|
|
|
- placeholder="搜索..."
|
|
|
+ placeholder="搜索名称..."
|
|
|
v-model="search"
|
|
|
clearable
|
|
|
class="filter-item search"
|
|
|
@@ -30,6 +30,12 @@
|
|
|
>
|
|
|
<el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
|
|
|
</el-input>
|
|
|
+ <el-input
|
|
|
+ class="filter-item"
|
|
|
+ placeholder="搜索企业ID"
|
|
|
+ v-model="userId"
|
|
|
+ @keyup.enter.native="getData"
|
|
|
+ ></el-input>
|
|
|
</div>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
@@ -74,10 +80,24 @@
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-button @click="editRow(row)" type="primary" size="mini" plain>查看</el-button>
|
|
|
<!-- <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button> -->
|
|
|
- <el-button @click="pass(row)" type="success" size="mini" plain v-if="row.status === 'PENDING'">
|
|
|
+ <el-button
|
|
|
+ @click="pass(row)"
|
|
|
+ type="success"
|
|
|
+ size="mini"
|
|
|
+ plain
|
|
|
+ v-if="row.status === 'PENDING'"
|
|
|
+ :loading="row.saving"
|
|
|
+ >
|
|
|
通过
|
|
|
</el-button>
|
|
|
- <el-button @click="deny(row)" type="danger" size="mini" plain v-if="row.status === 'PENDING'">
|
|
|
+ <el-button
|
|
|
+ @click="deny(row)"
|
|
|
+ type="danger"
|
|
|
+ size="mini"
|
|
|
+ plain
|
|
|
+ v-if="row.status === 'PENDING'"
|
|
|
+ :loading="row.saving"
|
|
|
+ >
|
|
|
拒绝
|
|
|
</el-button>
|
|
|
</template>
|
|
|
@@ -145,7 +165,8 @@ export default {
|
|
|
denyRules: {
|
|
|
reason: [{ required: true, message: '请填写理由' }]
|
|
|
},
|
|
|
- showReasonDialog: false
|
|
|
+ showReasonDialog: false,
|
|
|
+ userId: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -169,7 +190,7 @@ export default {
|
|
|
return '';
|
|
|
},
|
|
|
beforeGetData() {
|
|
|
- return { search: this.search, query: { del: false, status: 'PENDING' } };
|
|
|
+ return { search: this.search, query: { del: false, status: 'PENDING', userId: this.userId } };
|
|
|
},
|
|
|
toggleMultipleMode(multipleMode) {
|
|
|
this.multipleMode = multipleMode;
|
|
|
@@ -242,31 +263,43 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
pass(row) {
|
|
|
+ this.$set(row, 'saving', true);
|
|
|
this.$confirm('确定通过?')
|
|
|
.then(res => {
|
|
|
return this.$http.post('/companyCollection/pass', { id: row.id });
|
|
|
})
|
|
|
.then(res => {
|
|
|
this.$message.success('成功');
|
|
|
+ this.$set(row, 'saving', false);
|
|
|
this.getData();
|
|
|
})
|
|
|
- .catch(e => {});
|
|
|
+ .catch(e => {
|
|
|
+ this.$set(row, 'saving', false);
|
|
|
+ });
|
|
|
},
|
|
|
- deny(row) {
|
|
|
+ deny(row, index) {
|
|
|
this.showReasonDialog = true;
|
|
|
this.denyForm.id = row.id;
|
|
|
+ this.denyForm.index = index;
|
|
|
},
|
|
|
saveReason() {
|
|
|
+ this.tableData[this.denyForm.index].saving = true;
|
|
|
this.$confirm('确定拒绝?')
|
|
|
.then(res => {
|
|
|
- return this.$http.post('/companyCollection/deny', { id: this.denyForm.id, reason: this.denyForm.reason });
|
|
|
+ return this.$http.post('/companyCollection/deny', {
|
|
|
+ id: this.denyForm.id,
|
|
|
+ reason: this.denyForm.reason
|
|
|
+ });
|
|
|
})
|
|
|
.then(res => {
|
|
|
this.$message.success('成功');
|
|
|
this.showReasonDialog = false;
|
|
|
+ this.tableData[this.denyForm.index].saving = false;
|
|
|
this.getData();
|
|
|
})
|
|
|
- .catch(e => {});
|
|
|
+ .catch(e => {
|
|
|
+ this.tableData[this.denyForm.index].saving = false;
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|