mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-11 18:59:51 +08:00
修改营收报表页bug
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<h2>营收总报</h2>
|
<h2>营收总报</h2>
|
||||||
|
<el-card shadow="hover" style="margin-bottom:10px;padding:10px">
|
||||||
<el-descriptions >
|
<el-descriptions >
|
||||||
<el-descriptions-item label="用电度数">{{merchantOrderReport.useElectricity}}度</el-descriptions-item>
|
<el-descriptions-item label="用电度数">{{merchantOrderReport.useElectricity}}度</el-descriptions-item>
|
||||||
<el-descriptions-item label="充电次数">{{merchantOrderReport.chargeNum}}次</el-descriptions-item>
|
<el-descriptions-item label="充电次数">{{merchantOrderReport.chargeNum}}次</el-descriptions-item>
|
||||||
@@ -12,6 +13,7 @@
|
|||||||
<el-descriptions-item label="交易手续费">{{merchantOrderReport.tradeFee}}</el-descriptions-item>
|
<el-descriptions-item label="交易手续费">{{merchantOrderReport.tradeFee}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="虚拟金额">{{merchantOrderReport.virtualAmount}}元</el-descriptions-item>
|
<el-descriptions-item label="虚拟金额">{{merchantOrderReport.virtualAmount}}元</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
</el-card>
|
||||||
<h2>营收日报</h2>
|
<h2>营收日报</h2>
|
||||||
<el-form
|
<el-form
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@@ -22,9 +24,9 @@
|
|||||||
>
|
>
|
||||||
<el-form-item label="日期" prop="tradeDate">
|
<el-form-item label="日期" prop="tradeDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="value"
|
v-model="createTimeRange"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd"
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
@@ -108,11 +110,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getMerchantOrderReport } from "@/api/adapayMember/adapayMember";
|
import { getMerchantOrderReport } from "@/api/adapayMember/adapayMember";
|
||||||
|
import { getDay } from "@/utils/common";
|
||||||
export default {
|
export default {
|
||||||
props: ["merchantId"],
|
props: ["merchantId"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: "",
|
createTimeRange: [],
|
||||||
reportList: [],
|
reportList: [],
|
||||||
merchantOrderReport: {},
|
merchantOrderReport: {},
|
||||||
total:0,
|
total:0,
|
||||||
@@ -131,19 +134,20 @@ export default {
|
|||||||
getMerchantOrderReport(this.queryParams).then(
|
getMerchantOrderReport(this.queryParams).then(
|
||||||
(response) => {
|
(response) => {
|
||||||
// console.log("查询报表", reportList, merchantOrderReport);
|
// console.log("查询报表", reportList, merchantOrderReport);
|
||||||
// console.log('getMerchantOrderReport',response)
|
console.log('getMerchantOrderReport',response)
|
||||||
|
if(response.data){
|
||||||
this.reportList = response.data.pageResponse.list;
|
this.reportList = response.data.pageResponse.list;
|
||||||
this.merchantOrderReport = response.data.merchantOrderReport;
|
this.merchantOrderReport = response.data.merchantOrderReport;
|
||||||
// console.log("查询报表", this.merchantOrderReport, this.reportList);
|
|
||||||
this.total = response.data.pageResponse.total
|
this.total = response.data.pageResponse.total
|
||||||
|
} else{
|
||||||
|
this.reportList =[]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
console.log("this.value 日期", this.value);
|
let arr = this.createTimeRange[0]
|
||||||
let arr = this.value[0].split(' ')[0]
|
let str = this.createTimeRange[1]
|
||||||
let str = this.value[1].split(' ')[0]
|
|
||||||
console.log('arr,str',arr,str)
|
|
||||||
this.queryParams.startTime = arr
|
this.queryParams.startTime = arr
|
||||||
this.queryParams.endTime = str
|
this.queryParams.endTime = str
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
@@ -151,7 +155,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.value = ''
|
this.createTimeRange = []
|
||||||
this.queryParams.startTime = ''
|
this.queryParams.startTime = ''
|
||||||
this.queryParams.endTime =''
|
this.queryParams.endTime =''
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
@@ -163,8 +167,19 @@ export default {
|
|||||||
// this.single = selection.length!==1
|
// this.single = selection.length!==1
|
||||||
// this.multiple = !selection.length
|
// this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
|
defaultDate() {
|
||||||
|
//字符串拼接,开始时间,结束时间
|
||||||
|
let beg = getDay(-7); //当月第一天
|
||||||
|
let end = getDay(0); //当天
|
||||||
|
this.createTimeRange = [beg, end]; //将值设置给插件绑定的数据
|
||||||
|
// return this.createTimeRange;
|
||||||
|
this.queryParams.startTime = beg
|
||||||
|
this.queryParams.endTime = end
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
await this.defaultDate()
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user