-
-
{{ item.footer }}
+
+
+
-
+
+
{{ item.title }}
+
{{ item.value() }}
+
+
@@ -37,7 +54,7 @@ import { ref, reactive, onMounted } from "vue"
import { apidbusinessStatistics } from '@/api/statistics'
import vCharts from 'vue-echarts'
-const date = ref([])
+const month = ref()
const loading = ref(true)
const formData = ref({
@@ -63,7 +80,7 @@ const statisticLists = reactive([
}
},
{
- src: 'https://ceshi-engineering.lihaink.cn/uploads/files/20240604/20240604171701594ff8897.png',
+ src: 'https://ceshi-engineering.lihaink.cn/uploads/files/20240604/202406041717013a08c6793.png',
title: "成本",
value: () => {
return String(formData.value.today.cost_today || 0)
@@ -103,7 +120,7 @@ const statisticLists2 = reactive([
}
},
{
- src: 'https://ceshi-engineering.lihaink.cn/uploads/files/20240604/20240604171701594ff8897.png',
+ src: 'https://ceshi-engineering.lihaink.cn/uploads/files/20240604/20240604171701fbb680115.png',
title: "现金收银金额",
value: () => {
return String(formData.value.all.cash_all || 0)
@@ -174,7 +191,7 @@ const visitorOption = reactive({
const getData = async () => {
- let res = await apidbusinessStatistics()
+ let res = await apidbusinessStatistics({ month: month.value })
formData.value.all = res.all
formData.value.today = res.today
let data = res.time
@@ -189,14 +206,13 @@ const getData = async () => {
loading.value = false
}
-
-const initPage = () => {
+const monthChange = () => {
getData()
}
onMounted(() => {
- initPage()
+ getData()
})
\ No newline at end of file
diff --git a/src/views/workbench/index.vue b/src/views/workbench/index.vue
index 9497e55..a5fc378 100644
--- a/src/views/workbench/index.vue
+++ b/src/views/workbench/index.vue
@@ -10,12 +10,17 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
{{ item.title }}
+
{{ item.value() }}
+
+
+
@@ -100,51 +105,58 @@ const formData = ref({
const statisticLists = reactive([
{
src: 'https://ceshi-engineering.lihaink.cn/uploads/files/20240604/20240604171701552002039.png',
+ icon: 'RectangleCopy12',
title: "核销订单金额",
value: () => {
- return String(formData.value.verify_amount)
+ return String(formData.value.verify_amount || 0)
}
},
{
src: "https://ceshi-engineering.lihaink.cn/uploads/files/20240604/2024060417170150a511510.png",
+ icon: 'RectangleCopy12',
title: "余额消费金额",
value: () => {
- return String(formData.value.balance_amount)
+ return String(formData.value.balance_amount || 0)
}
},
{
src: 'https://ceshi-engineering.lihaink.cn/uploads/files/20240604/20240604171701594ff8897.png',
title: "门店收益金额",
+ icon: 'RectangleCopy12',
value: () => {
- return String(formData.value.income_amount)
+ return String(formData.value.income_amount || 0)
}
},
{
src: 'https://ceshi-engineering.lihaink.cn/uploads/files/20240604/202406041717018a22e1161.png',
title: "线下收银订单金额",
+ icon: 'RectangleCopy12',
value: () => {
- return String(formData.value.cashier_amount)
+ return String(formData.value.cashier_amount || 0)
}
},
{
src: 'https://ceshi-engineering.lihaink.cn/uploads/files/20240604/202406041717013a08c6793.png',
title: "现金收银订单金额",
+ icon: 'RectangleCopy12',
value: () => {
- return String(formData.value.cash_amount)
+ return String(formData.value.cash_amount || 0)
}
},
{
src: 'https://ceshi-engineering.lihaink.cn/uploads/files/20240604/20240604171701469b91377.png',
title: "门店成交用户数",
+ icon: 'RectangleCopy12',
value: () => {
- return String(formData.value.user_number)
+ return String(formData.value.user_number || 0)
}
},
{
src: 'https://ceshi-engineering.lihaink.cn/uploads/files/20240604/20240604171701fbb680115.png',
title: "门店营业额",
+ icon: 'RectangleCopy12',
value: () => {
- return String(formData.value.order_amount)
+ return String(formData.value.order_amount || 0)
}
},