新增篮球订单统计菜单
This commit is contained in:
@@ -14,6 +14,13 @@ export function findmoney(time) {
|
||||
return http.get('/order/money?time=' + time)
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单报表数据
|
||||
*/
|
||||
export function findBasketMoney(time) {
|
||||
return http.get('/order/basket/money?time=' + time)
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单
|
||||
*/
|
||||
|
||||
93
src/views/dashboard/basket.vue
Normal file
93
src/views/dashboard/basket.vue
Normal file
@@ -0,0 +1,93 @@
|
||||
<template>
|
||||
<div class="dashboard-container">
|
||||
<!-- 筛选条件 -->
|
||||
<div class="app-container calendar-list-container">
|
||||
<el-date-picker v-model="time" type="month" format="yyyy-MM" value-format="yyyy-MM" placeholder="选择年月"
|
||||
class="filter-item" @change="logTimeChange" clearable>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div ref="myChart" :style="{width: '1132px', height: '521px', position: 'relative', overflow: 'hidden'}"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import waves from '@/directive/waves.js'// 水波纹指令
|
||||
import { mapGetters } from 'vuex'
|
||||
import adminDashboard from './admin/index'
|
||||
import editorDashboard from './editor/index'
|
||||
import { findBasketMoney } from '@/api//order'
|
||||
import echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
name: 'dashboard',
|
||||
components: { adminDashboard, editorDashboard },
|
||||
directives: {
|
||||
waves
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
time: '',
|
||||
chart: null,
|
||||
options: {
|
||||
title: {
|
||||
text: '用户月充值报表'
|
||||
},
|
||||
tooltip: {},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: []
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [{
|
||||
data: [],
|
||||
type: 'line',
|
||||
areaStyle: {}
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'roles'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.drawLine('')
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 搜索主题
|
||||
*/
|
||||
logTimeChange(val) {
|
||||
console.log(val)
|
||||
this.drawLine(val)
|
||||
},
|
||||
drawLine(val) {
|
||||
if (val !== '') {
|
||||
this.options.title.text = val + '月充值统计/元'
|
||||
} else {
|
||||
this.options.title.text = '本月充值统计/元'
|
||||
}
|
||||
findBasketMoney(val).then(response => {
|
||||
this.options.xAxis.data = []
|
||||
this.options.series[0].data = []
|
||||
response.money.forEach(element => {
|
||||
this.options.xAxis.data.push(element.days)
|
||||
this.options.series[0].data.push(element.price)
|
||||
})
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
this.chart = echarts.init(this.$refs.myChart)
|
||||
// 绘制图表
|
||||
this.chart.setOption(this.options, true)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -129,7 +129,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { remove , orderAccount } from '@/api//member/enter/veneu/log'
|
||||
import { remove, orderAccount } from '@/api//member/enter/veneu/log'
|
||||
import waves from '@/directive/waves.js'// 水波纹指令
|
||||
import Pagination from '@/components/Pagination'
|
||||
import moment from 'moment'
|
||||
@@ -156,7 +156,7 @@ export default {
|
||||
state: undefined
|
||||
},
|
||||
form: {
|
||||
miniMoney : undefined
|
||||
miniMoney: undefined
|
||||
},
|
||||
options: {
|
||||
statu: [
|
||||
@@ -200,7 +200,7 @@ export default {
|
||||
this.orderId = row.id
|
||||
this.orderPrice = row.price
|
||||
this.orderPayMoney = row.payMoney
|
||||
if (row.status == 1) {
|
||||
if (row.status === 1) {
|
||||
// 待结算账单无法结算
|
||||
this.$message({
|
||||
message: '待结算订单无法进行结算',
|
||||
@@ -219,9 +219,9 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
let payingMoney = 0;
|
||||
if (this.orderPayMoney != null && this.orderPayMoney != undefined && this.orderPayMoney > 0) {
|
||||
payingMoney = this.orderPayMoney;
|
||||
let payingMoney = 0
|
||||
if (this.orderPayMoney != null && this.orderPayMoney !== undefined && this.orderPayMoney > 0) {
|
||||
payingMoney = this.orderPayMoney
|
||||
}
|
||||
if (this.form.miniMoney + payingMoney > this.orderPrice) {
|
||||
this.$message({
|
||||
@@ -231,7 +231,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.dialogFormByDay = false
|
||||
orderAccount();
|
||||
orderAccount()
|
||||
},
|
||||
|
||||
getType(type) {
|
||||
|
||||
Reference in New Issue
Block a user