|
@@ -21,7 +21,7 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</page-title>
|
|
</page-title>
|
|
|
<div class="filters-container">
|
|
<div class="filters-container">
|
|
|
- <el-select v-model="status" placeholder="筛选状态" clearable @change="getData">
|
|
|
|
|
|
|
+ <el-select v-model="status" placeholder="筛选状态" clearable @change="getData" class="filter-item">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in statusOptions"
|
|
v-for="item in statusOptions"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -29,6 +29,7 @@
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
></el-option>
|
|
></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
+ <created-at-picker v-model="createdAt" @input="getData" name="下单" class="filter-item"></created-at-picker>
|
|
|
<el-input
|
|
<el-input
|
|
|
placeholder="搜索..."
|
|
placeholder="搜索..."
|
|
|
v-model="search"
|
|
v-model="search"
|
|
@@ -51,10 +52,11 @@
|
|
|
v-loading="fetchingData"
|
|
v-loading="fetchingData"
|
|
|
>
|
|
>
|
|
|
<el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
|
|
<el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
|
|
|
- <el-table-column prop="id" label="ID" width="100"> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="id" label="ID" width="155"> </el-table-column>
|
|
|
<el-table-column prop="userId" label="用户ID"> </el-table-column>
|
|
<el-table-column prop="userId" label="用户ID"> </el-table-column>
|
|
|
|
|
+ <el-table-column prop="nickname" label="用户昵称" show-overflow-tooltip> </el-table-column>
|
|
|
<el-table-column prop="collectionId" label="藏品ID"> </el-table-column>
|
|
<el-table-column prop="collectionId" label="藏品ID"> </el-table-column>
|
|
|
- <el-table-column prop="name" label="名称" show-overflow-tooltip> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="name" label="名称" min-width="120" show-overflow-tooltip> </el-table-column>
|
|
|
<el-table-column prop="pic" label="图片" width="80">
|
|
<el-table-column prop="pic" label="图片" width="80">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
<el-image
|
|
<el-image
|
|
@@ -71,7 +73,7 @@
|
|
|
<el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
|
|
<el-table-column prop="status" label="状态" :formatter="statusFormatter"> </el-table-column>
|
|
|
<el-table-column prop="payMethod" label="支付方式" :formatter="payMethodFormatter"> </el-table-column>
|
|
<el-table-column prop="payMethod" label="支付方式" :formatter="payMethodFormatter"> </el-table-column>
|
|
|
<el-table-column prop="transactionId" label="交易ID" show-overflow-tooltip> </el-table-column>
|
|
<el-table-column prop="transactionId" label="交易ID" show-overflow-tooltip> </el-table-column>
|
|
|
- <el-table-column prop="createdAt" label="创建时间" width="140"> </el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="createdAt" label="下单时间" width="140"> </el-table-column>
|
|
|
<el-table-column prop="payTime" label="支付时间" width="140"> </el-table-column>
|
|
<el-table-column prop="payTime" label="支付时间" width="140"> </el-table-column>
|
|
|
<el-table-column prop="txHash" label="链上hash" show-overflow-tooltip> </el-table-column>
|
|
<el-table-column prop="txHash" label="链上hash" show-overflow-tooltip> </el-table-column>
|
|
|
<el-table-column prop="gasUsed" label="消耗gas"></el-table-column>
|
|
<el-table-column prop="gasUsed" label="消耗gas"></el-table-column>
|
|
@@ -109,15 +111,17 @@
|
|
|
<script>
|
|
<script>
|
|
|
import { mapState } from 'vuex';
|
|
import { mapState } from 'vuex';
|
|
|
import pageableTable from '@/mixins/pageableTable';
|
|
import pageableTable from '@/mixins/pageableTable';
|
|
|
|
|
+import CreatedAtPicker from '../components/CreatedAtPicker.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ components: { CreatedAtPicker },
|
|
|
name: 'OrderList',
|
|
name: 'OrderList',
|
|
|
mixins: [pageableTable],
|
|
mixins: [pageableTable],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
multipleMode: false,
|
|
multipleMode: false,
|
|
|
search: '',
|
|
search: '',
|
|
|
- url: '/order/all',
|
|
|
|
|
|
|
+ url: '/order/backAll',
|
|
|
downloading: false,
|
|
downloading: false,
|
|
|
statusOptions: [
|
|
statusOptions: [
|
|
|
{ label: '未支付', value: 'NOT_PAID' },
|
|
{ label: '未支付', value: 'NOT_PAID' },
|
|
@@ -129,7 +133,8 @@ export default {
|
|
|
{ label: '微信', value: 'WEIXIN' },
|
|
{ label: '微信', value: 'WEIXIN' },
|
|
|
{ label: '支付宝', value: 'ALIPAY' }
|
|
{ label: '支付宝', value: 'ALIPAY' }
|
|
|
],
|
|
],
|
|
|
- status: null
|
|
|
|
|
|
|
+ status: null,
|
|
|
|
|
+ createdAt: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -152,8 +157,27 @@ export default {
|
|
|
}
|
|
}
|
|
|
return '';
|
|
return '';
|
|
|
},
|
|
},
|
|
|
|
|
+ getParams() {
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ // sort: 'createdAt,desc',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ del: false
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ if (this.search) {
|
|
|
|
|
+ data.search = this.search;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.createdAt) {
|
|
|
|
|
+ data.query.createdAt = this.createdAt;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.status) {
|
|
|
|
|
+ data.query.status = this.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ return data;
|
|
|
|
|
+ },
|
|
|
beforeGetData() {
|
|
beforeGetData() {
|
|
|
- return { search: this.search, query: { del: false, status: this.status } };
|
|
|
|
|
|
|
+ // return { search: this.search, query: { del: false, status: this.status } };
|
|
|
|
|
+ return this.getParams();
|
|
|
},
|
|
},
|
|
|
toggleMultipleMode(multipleMode) {
|
|
toggleMultipleMode(multipleMode) {
|
|
|
this.multipleMode = multipleMode;
|
|
this.multipleMode = multipleMode;
|
|
@@ -179,10 +203,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
download() {
|
|
download() {
|
|
|
this.downloading = true;
|
|
this.downloading = true;
|
|
|
|
|
+ let params = this.getParams();
|
|
|
|
|
+ params.size = 10000;
|
|
|
this.$axios
|
|
this.$axios
|
|
|
- .get('/order/excel', {
|
|
|
|
|
- responseType: 'blob',
|
|
|
|
|
- params: { size: 10000 }
|
|
|
|
|
|
|
+ .post('/order/excel', params, {
|
|
|
|
|
+ responseType: 'blob'
|
|
|
})
|
|
})
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
console.log(res);
|
|
console.log(res);
|