Commit 4471ea49 authored by guoyou's avatar guoyou

会员订单管理修复

parent 85435c92
...@@ -28,14 +28,14 @@ ...@@ -28,14 +28,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="8">
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker v-model="createTime" type="datetimerange" placeholder="选择时间范围"></el-date-picker> <el-date-picker v-model="createTime" type="datetimerange" placeholder="选择时间范围" @change="changeCreate"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="9">
<el-form-item label="支付时间"> <el-form-item label="支付时间">
<el-date-picker v-model="aplyTime" type="datetimerange" placeholder="选择支付时间范围"></el-date-picker> <el-date-picker v-model="aplyTime" type="datetimerange" placeholder="选择支付时间范围" @change="changePay"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</li> </li>
<li> <li>
<p>{{statistics.totalAmount|| '0'}}</p> <p>{{statistics.totalAmount|| '0'}}</p>
<p>订单总额(元)</p> <p>支付总额(元)</p>
</li> </li>
<li> <li>
<p>{{statistics.diamondOrderNum|| '0'}}</p> <p>{{statistics.diamondOrderNum|| '0'}}</p>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</li> </li>
<li> <li>
<p>{{statistics.totalDiamondAmount|| '0'}}</p> <p>{{statistics.totalDiamondAmount|| '0'}}</p>
<p>钻石订单总额</p> <p>钻石支付总额(元)</p>
</li> </li>
<li> <li>
<p>{{statistics.goldOrderNum|| '0'}}</p> <p>{{statistics.goldOrderNum|| '0'}}</p>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</li> </li>
<li> <li>
<p>{{statistics.totalGoldAmount|| '0'}}</p> <p>{{statistics.totalGoldAmount|| '0'}}</p>
<p>黄金订单总额</p> <p>黄金支付总额(元)</p>
</li> </li>
<li> <li>
<p>{{statistics.generalOrderNum|| '0'}}</p> <p>{{statistics.generalOrderNum|| '0'}}</p>
...@@ -100,13 +100,13 @@ ...@@ -100,13 +100,13 @@
</li> </li>
<li> <li>
<p>{{statistics.totalGeneralOrderNum ||'0'}}</p> <p>{{statistics.totalGeneralOrderNum ||'0'}}</p>
<p>普通订单总额</p> <p>普通支付总额(元)</p>
</li> </li>
</ul> </ul>
</el-card> </el-card>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves icon="delete" @click="clearSearch">清除搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="delete" @click="clearSearch">清除搜索</el-button>
<el-button class="filter-item" type="primary" @click="excel">导出</el-button> <el-button class="filter-item" type="primary" @click="excel">导出表格</el-button>
</div> </div>
<el-table <el-table
...@@ -250,7 +250,8 @@ export default { ...@@ -250,7 +250,8 @@ export default {
label: '确认购买' label: '确认购买'
} }
}, },
statistics: [], statistics: [],
isStatistics:true,
list: null, list: null,
total: null, total: null,
listLoading: true, listLoading: true,
...@@ -336,20 +337,32 @@ export default { ...@@ -336,20 +337,32 @@ export default {
} }
}, },
methods: { methods: {
changeCreate(val){
!val ? this.clearSearch() :''
},
changePay(val){
!val ? this.clearSearch() :''
},
timestamp(now) { timestamp(now) {
var year=now.getFullYear(); var year=now.getFullYear();
var month=now.getMonth()+1; var month=now.getMonth()+1;
var date=now.getDate(); var date=now.getDate();
date = date.toString().length == 1 ? '0'+ date : date; var Hours = now.getHours();
var Minutes = now.getMinutes();
var Seconds = now.getSeconds();
month = month.toString().length == 1 ? '0'+ month : month; month = month.toString().length == 1 ? '0'+ month : month;
return year+"-"+month+"-"+date date = date.toString().length == 1 ? '0'+ date : date;
Hours = Hours.toString().length == 1 ? '0'+ Hours : Hours;
Minutes = Minutes.toString().length == 1 ? '0'+ Minutes : Minutes;
Seconds = Seconds.toString().length == 1 ? '0'+ Seconds : Seconds;
return year+"-"+month+"-"+date+' '+ Hours+':'+Minutes+":"+Seconds
}, },
excel() { excel() {
this.listQuery.isExport = true this.listQuery.isExport = true
orderMemberExcel(this.listQuery).then(res => { orderMemberExcel(this.listQuery).then(res => {
const content = res const content = res
const blob = new Blob([content]) const blob = new Blob([content])
const fileName = '导出信息.xlsx' const fileName = this.timestamp(new Date())
if ('download' in document.createElement('a')) { if ('download' in document.createElement('a')) {
// 非IE下载 // 非IE下载
const elink = document.createElement('a') const elink = document.createElement('a')
...@@ -456,8 +469,8 @@ export default { ...@@ -456,8 +469,8 @@ export default {
getList() { getList() {
this.listLoading = true this.listLoading = true
if (!!this.createTime && !!this.createTime[0]) { if (!!this.createTime && !!this.createTime[0]) {
this.listQuery.startOrderTime = formatDate(this.createTime[0], 'yyyy-MM-dd hh') +':00:00' this.listQuery.startOrderTime = formatDate(this.createTime[0], 'yyyy-MM-dd hh:mm:ss')
this.listQuery.endOrderTime = formatDate(this.createTime[1], 'yyyy-MM-dd hh') +':00:00' this.listQuery.endOrderTime = formatDate(this.createTime[1], 'yyyy-MM-dd hh:mm:ss')
} }
if (!!this.aplyTime && !!this.aplyTime[0]) { if (!!this.aplyTime && !!this.aplyTime[0]) {
this.listQuery.startPayTime = this.aplyTime[0].getTime() this.listQuery.startPayTime = this.aplyTime[0].getTime()
...@@ -470,9 +483,11 @@ export default { ...@@ -470,9 +483,11 @@ export default {
) )
} }
pageList(this.listQuery).then(response => { pageList(this.listQuery).then(response => {
console.log(response); this.list = response.data.memberOrderPage.data
this.list = response.data.memberOrderPage.data if (!!this.isStatistics) {
this.statistics = response.data.memberOrderStatisticsBo this.statistics = response.data.memberOrderStatisticsBo
this.isStatistics = false;
}
this.total = response.data.memberOrderPage.totalCount this.total = response.data.memberOrderPage.totalCount
}) })
setTimeout(() => { setTimeout(() => {
...@@ -500,7 +515,8 @@ export default { ...@@ -500,7 +515,8 @@ export default {
.num-title { .num-title {
display: inline-block; display: inline-block;
float: left; float: left;
margin-right: 32px; margin-right: 40px;
font-size: 14px;
} }
.box-card li { .box-card li {
...@@ -508,5 +524,15 @@ export default { ...@@ -508,5 +524,15 @@ export default {
float: left; float: left;
text-align: center; text-align: center;
width: 12.5%; width: 12.5%;
font-size: 14px
}
.box-card li p:nth-child(1){
font-weight: bold;
color: #333;
font-size: 16px;
}
.box-card li p:nth-child(2){
font-weight: bold;
color: #666;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment