Commit 4471ea49 authored by guoyou's avatar guoyou

会员订单管理修复

parent 85435c92
......@@ -28,14 +28,14 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-col :span="8">
<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-col>
<el-col :span="7">
<el-col :span="9">
<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-col>
<el-col :span="6">
......@@ -76,7 +76,7 @@
</li>
<li>
<p>{{statistics.totalAmount|| '0'}}</p>
<p>订单总额(元)</p>
<p>支付总额(元)</p>
</li>
<li>
<p>{{statistics.diamondOrderNum|| '0'}}</p>
......@@ -84,7 +84,7 @@
</li>
<li>
<p>{{statistics.totalDiamondAmount|| '0'}}</p>
<p>钻石订单总额</p>
<p>钻石支付总额(元)</p>
</li>
<li>
<p>{{statistics.goldOrderNum|| '0'}}</p>
......@@ -92,7 +92,7 @@
</li>
<li>
<p>{{statistics.totalGoldAmount|| '0'}}</p>
<p>黄金订单总额</p>
<p>黄金支付总额(元)</p>
</li>
<li>
<p>{{statistics.generalOrderNum|| '0'}}</p>
......@@ -100,13 +100,13 @@
</li>
<li>
<p>{{statistics.totalGeneralOrderNum ||'0'}}</p>
<p>普通订单总额</p>
<p>普通支付总额(元)</p>
</li>
</ul>
</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="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>
<el-table
......@@ -250,7 +250,8 @@ export default {
label: '确认购买'
}
},
statistics: [],
statistics: [],
isStatistics:true,
list: null,
total: null,
listLoading: true,
......@@ -336,20 +337,32 @@ export default {
}
},
methods: {
changeCreate(val){
!val ? this.clearSearch() :''
},
changePay(val){
!val ? this.clearSearch() :''
},
timestamp(now) {
var year=now.getFullYear();
var month=now.getMonth()+1;
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;
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() {
this.listQuery.isExport = true
orderMemberExcel(this.listQuery).then(res => {
const content = res
const blob = new Blob([content])
const fileName = '导出信息.xlsx'
const fileName = this.timestamp(new Date())
if ('download' in document.createElement('a')) {
// 非IE下载
const elink = document.createElement('a')
......@@ -456,8 +469,8 @@ export default {
getList() {
this.listLoading = true
if (!!this.createTime && !!this.createTime[0]) {
this.listQuery.startOrderTime = formatDate(this.createTime[0], 'yyyy-MM-dd hh') +':00:00'
this.listQuery.endOrderTime = formatDate(this.createTime[1], '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:mm:ss')
}
if (!!this.aplyTime && !!this.aplyTime[0]) {
this.listQuery.startPayTime = this.aplyTime[0].getTime()
......@@ -470,9 +483,11 @@ export default {
)
}
pageList(this.listQuery).then(response => {
console.log(response);
this.list = response.data.memberOrderPage.data
this.statistics = response.data.memberOrderStatisticsBo
this.list = response.data.memberOrderPage.data
if (!!this.isStatistics) {
this.statistics = response.data.memberOrderStatisticsBo
this.isStatistics = false;
}
this.total = response.data.memberOrderPage.totalCount
})
setTimeout(() => {
......@@ -500,7 +515,8 @@ export default {
.num-title {
display: inline-block;
float: left;
margin-right: 32px;
margin-right: 40px;
font-size: 14px;
}
.box-card li {
......@@ -508,5 +524,15 @@ export default {
float: left;
text-align: center;
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>
\ 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