From fadae0d7ac00c8aa405b1d6db1198b72756e093d Mon Sep 17 00:00:00 2001
From: messi <977691291@qq.com>
Date: Tue, 27 Aug 2024 17:11:27 +0800
Subject: [PATCH] =?UTF-8?q?fix=E8=B6=8B=E5=8A=BF=E5=9B=BE=EF=BC=8C?=
=?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dashboard/components/visit-hour.vue | 32 ++++++++++---------
src/views/system/dashboard/index.vue | 1 +
.../yunxinwei/order/components/order-info.vue | 7 ++--
src/views/yunxinwei/order/index.vue | 28 ++++++++++++++--
4 files changed, 48 insertions(+), 20 deletions(-)
diff --git a/src/views/system/dashboard/components/visit-hour.vue b/src/views/system/dashboard/components/visit-hour.vue
index 6c8778c..79c18ed 100644
--- a/src/views/system/dashboard/components/visit-hour.vue
+++ b/src/views/system/dashboard/components/visit-hour.vue
@@ -25,7 +25,7 @@
LegendComponent
} from 'echarts/components';
import VChart from 'vue-echarts';
- import { getSaleroomList, getVisitHourList } from "@/api/dashboard/analysis";
+ import { getSaleroomList, getVisitHourList } from '@/api/dashboard/analysis';
import useEcharts from '@/utils/use-echarts';
import dayjs from 'dayjs';
@@ -47,21 +47,23 @@
/* 获取最近 1 小时访问情况数据 */
const getVisitHourData = () => {
- getVisitHourList()
+ getSaleroomList()
.then((data) => {
Object.assign(visitHourChartOption, {
tooltip: {
trigger: 'axis'
},
legend: {
- data: ['销售额'],
+ data: ['销售额', '订单量'],
right: 20
},
xAxis: [
{
type: 'category',
boundaryGap: false,
- data: data.map((d) => dayjs(d.startStatisticsDate).format('YYYY-MM-DD'))
+ data: data.salesAmountStatisticsList.map((d) =>
+ dayjs(d.startStatisticsDate).format('YYYY-MM-DD')
+ )
}
],
yAxis: [
@@ -78,18 +80,18 @@
areaStyle: {
opacity: 0.5
},
- data: data.map((d) => d.dailySale)
+ data: data.salesAmountStatisticsList.map((d) => d.dailySale)
+ },
+ {
+ name: '订单量',
+ type: 'line',
+ smooth: true,
+ symbol: 'none',
+ areaStyle: {
+ opacity: 0.5
+ },
+ data: data.orderStatisticsList.map((d) => d.dailyNewOrders)
}
- // {
- // name: '访问量',
- // type: 'line',
- // smooth: true,
- // symbol: 'none',
- // areaStyle: {
- // opacity: 0.5
- // },
- // data: data.map((d) => d.visits)
- // }
]
});
})
diff --git a/src/views/system/dashboard/index.vue b/src/views/system/dashboard/index.vue
index 89c355e..aa52d87 100644
--- a/src/views/system/dashboard/index.vue
+++ b/src/views/system/dashboard/index.vue
@@ -3,6 +3,7 @@
+
diff --git a/src/views/yunxinwei/order/components/order-info.vue b/src/views/yunxinwei/order/components/order-info.vue
index c1a306f..05af00b 100644
--- a/src/views/yunxinwei/order/components/order-info.vue
+++ b/src/views/yunxinwei/order/components/order-info.vue
@@ -752,7 +752,8 @@ const getRenewOrder = () => {
listOrderPay({
rentOrderId: order.orderId,
payStatus: 20,
- sort: ' create_time asc'
+ sort: ' create_time asc',
+ limit:1
}).then((data) => {
renewOrderList.value = data;
loading.value = false;
@@ -762,6 +763,7 @@ const getRenewOrder = () => {
rentOrderId: order.orderId,
payStatus: 20,
sort: 'create_time asc',
+ limit:1
}).then((data) => {
renewOrderList.value = data;
loading.value = false;
@@ -773,7 +775,8 @@ const getRenewOrder = () => {
const getEquipmentRecordList = () => {
EquipmentRecordApi.pageEquipmentRecord({
orderId: order.orderId,
- userId: order.userId
+ userId: order.userId,
+ limit:1
}).then((data) => {
EquipmentRecordList.value = data.list;
});
diff --git a/src/views/yunxinwei/order/index.vue b/src/views/yunxinwei/order/index.vue
index aefc887..ecbadf9 100644
--- a/src/views/yunxinwei/order/index.vue
+++ b/src/views/yunxinwei/order/index.vue
@@ -517,12 +517,14 @@
const array: (string | number)[][] = [
[
'订单号',
+ '下单日期',
'电池型号',
'电池编号',
'所属商户',
'到期时间',
'剩余天数',
'买家',
+ '客户实名',
'订单金额',
'交易状态'
]
@@ -533,17 +535,37 @@
var equipmentCode = d.equipment ? d.equipment.equipmentCode : '';
+ var orderStatus = '';
+ if (d.payStatus == 10) {
+ orderStatus = '待付款';
+ } else {
+ if (d.receiptStatus == 10) {
+ orderStatus = '待收货';
+ }
+ if (d.receiptStatus == 20) {
+ orderStatus = '已收货';
+ }
+ if (d.receiptStatus == 21) {
+ orderStatus = '退租中';
+ }
+ if (d.receiptStatus == 30) {
+ orderStatus = '已退租';
+ }
+ }
+
array.push([
`${d.orderNo}`,
+ `${d.createTime}`,
`${d.equipmentGoods.batteryModel}`,
`${equipmentCode}`,
`${d.merchantName}`,
`${d.expirationTime}`,
- `${d.expirationDay}`,
+ `${d.restDay}`,
`${username}`,
- `${d.totalPrice}`,
+ `${d.realName}`,
+ `${d.totalPayPrice}`,
- `${d.orderStatus}`
+ `${orderStatus}`
]);
});
const sheetName = '设备列表';