|
|
@@ -23,6 +23,7 @@
|
|
|
</el-input>
|
|
|
<el-input placeholder="搜索用户ID" v-model="userId" clearable class="filter-item" @keyup.enter.native="getData">
|
|
|
</el-input>
|
|
|
+ <created-at-picker v-model="createdAt" @change="getData" name="下单" class="filter-item"></created-at-picker>
|
|
|
</div>
|
|
|
<el-table :data="tableData" row-key="id" ref="table" header-row-class-name="table-header-row"
|
|
|
header-cell-class-name="table-header-cell" row-class-name="table-row" cell-class-name="table-cell"
|
|
|
@@ -44,22 +45,24 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="transactionId" label="交易流水号">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="auditResult" label="审核结果">
|
|
|
+ <el-table-column prop="result" label="审核结果">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="orderStatus" label="订单状态" :formatter="orderStatusFormatter">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="payMethod" label="支付方式" :formatter="payMethodFormatter">
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column-->
|
|
|
- <!-- label="操作"-->
|
|
|
- <!-- align="center"-->
|
|
|
- <!-- fixed="right"-->
|
|
|
- <!-- width="150">-->
|
|
|
- <!-- <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>-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" width="150">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-button @click="pass(row)" type="success" size="mini" plain
|
|
|
+ v-if="row.status === 'PENDING' && row.orderStatus === 'FINISH'" :loading="row.saving">
|
|
|
+ 通过
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="deny(row)" type="danger" size="mini" plain v-if="row.status === 'PENDING' && row.orderStatus === 'FINISH'"
|
|
|
+ :loading="row.saving">
|
|
|
+ 拒绝
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<div class="pagination-wrapper">
|
|
|
<!-- <div class="multiple-mode-wrapper">
|
|
|
@@ -81,8 +84,10 @@
|
|
|
<script>
|
|
|
import { mapState } from 'vuex';
|
|
|
import pageableTable from '@/mixins/pageableTable';
|
|
|
+import CreatedAtPicker from "../components/CreatedAtPicker";
|
|
|
|
|
|
export default {
|
|
|
+ components: { CreatedAtPicker },
|
|
|
name: 'DomainOrderList',
|
|
|
mixins: [pageableTable],
|
|
|
data() {
|
|
|
@@ -90,6 +95,7 @@ export default {
|
|
|
multipleMode: false,
|
|
|
search: '',
|
|
|
url: '/domainOrder/all',
|
|
|
+ createdAt: [],
|
|
|
downloading: false,
|
|
|
statusOptions: [
|
|
|
{ label: '审核中', value: 'PENDING' },
|
|
|
@@ -138,6 +144,36 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ pass(row) {
|
|
|
+ this.$set(row, 'saving', true);
|
|
|
+ this.$confirm('确定通过?')
|
|
|
+ .then(res => {
|
|
|
+ return this.$http.post('/domainOrder/pass', { id: row.id });
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.$message.success('成功');
|
|
|
+ this.$set(row, 'saving', false);
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ this.$set(row, 'saving', false);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ deny(row, index) {
|
|
|
+ this.$set(row, 'saving', true);
|
|
|
+ this.$confirm('确定拒绝?')
|
|
|
+ .then(res => {
|
|
|
+ return this.$http.post('/domainOrder/deny', { id: row.id });
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.$message.success('成功');
|
|
|
+ this.$set(row, 'saving', false);
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ this.$set(row, 'saving', false);
|
|
|
+ });
|
|
|
+ },
|
|
|
statusFormatter(row, column, cellValue, index) {
|
|
|
let selectedOption = this.statusOptions.find(i => i.value === cellValue);
|
|
|
if (selectedOption) {
|
|
|
@@ -187,7 +223,7 @@ export default {
|
|
|
download() {
|
|
|
this.downloading = true;
|
|
|
let params = this.getParams();
|
|
|
- params.size = 10000;
|
|
|
+ params.size = 100000;
|
|
|
this.$axios
|
|
|
.get('/domainOrder/excel', {
|
|
|
responseType: 'blob',
|
|
|
@@ -253,6 +289,11 @@ export default {
|
|
|
if (this.userId) {
|
|
|
data.query.userId = this.userId;
|
|
|
}
|
|
|
+ if (this.createdAt) {
|
|
|
+ data.query.createdAt = this.createdAt.join(",");
|
|
|
+ } else {
|
|
|
+ data.query.createdAt = ['1970-01-01 00:00:00', format(new Date(), 'yyyy-MM-dd HH:mm:ss')].join(",");
|
|
|
+ }
|
|
|
return data;
|
|
|
}
|
|
|
}
|