|
@@ -5,8 +5,8 @@
|
|
<s-header :name="sys ? sys.title : sysTitle" :noback="true" :isFixed="false"></s-header>
|
|
<s-header :name="sys ? sys.title : sysTitle" :noback="true" :isFixed="false"></s-header>
|
|
<!-- 留言滚动条 -->
|
|
<!-- 留言滚动条 -->
|
|
<template v-if="noticeContent.title">
|
|
<template v-if="noticeContent.title">
|
|
- <van-notice-bar @click="noticeClk" mode="link" :scrollable="true" color="rgba(64,77,116,1)" background="#fff" style="font-size: 0.375rem;"
|
|
|
|
- left-icon="volume-o" :text="noticeContent.title" />
|
|
|
|
|
|
+ <van-notice-bar @click="noticeClk" mode="link" :scrollable="true" color="rgba(64,77,116,1)" background="#fff"
|
|
|
|
+ style="font-size: 0.375rem;" left-icon="volume-o" :text="noticeContent.title" />
|
|
</template>
|
|
</template>
|
|
<div class="intervalRow"></div>
|
|
<div class="intervalRow"></div>
|
|
<div class="nameDeviceRow flex-col">
|
|
<div class="nameDeviceRow flex-col">
|
|
@@ -36,34 +36,34 @@
|
|
<div v-if="showDataDiv" class="o-plr-8 o-pt-10">
|
|
<div v-if="showDataDiv" class="o-plr-8 o-pt-10">
|
|
<div class="salesData flex-col" @click="pushOrderCenter">
|
|
<div class="salesData flex-col" @click="pushOrderCenter">
|
|
<!-- <div class="block5 flex-col"> -->
|
|
<!-- <div class="block5 flex-col"> -->
|
|
- <div class="topTitle flex-row justify-end">
|
|
|
|
- <span class="txt10">{{ $t("home.orderData") }}</span>
|
|
|
|
- <div class="layer4 flex-col"></div>
|
|
|
|
- </div>
|
|
|
|
- <div class="salesDataBox flex-row">
|
|
|
|
- <div class="dataGroup flex-col">
|
|
|
|
- <div class="dataGroupBox flex-row justify-center">
|
|
|
|
- <!-- 首页 - 订单数据 - 收入总额¥ -->
|
|
|
|
- <!-- <span class="word8">¥</span> -->
|
|
|
|
- <span class="currencySymbol">{{ currencySymbol }}</span>
|
|
|
|
- <span class="dataNum">{{ salesVolume.toFixed(2) }}</span>
|
|
|
|
- </div>
|
|
|
|
- <span class="dataText">{{ $t("home.totalIncome") }}</span>
|
|
|
|
|
|
+ <div class="topTitle flex-row justify-end">
|
|
|
|
+ <span class="txt10">{{ $t("home.orderData") }}</span>
|
|
|
|
+ <div class="layer4 flex-col"></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="salesDataBox flex-row">
|
|
|
|
+ <div class="dataGroup flex-col">
|
|
|
|
+ <div class="dataGroupBox flex-row justify-center">
|
|
|
|
+ <!-- 首页 - 订单数据 - 收入总额¥ -->
|
|
|
|
+ <!-- <span class="word8">¥</span> -->
|
|
|
|
+ <span class="currencySymbol">{{ currencySymbol }}</span>
|
|
|
|
+ <span class="dataNum">{{ salesVolume.toFixed(2) }}</span>
|
|
</div>
|
|
</div>
|
|
- <div class="dataGroup flex-col">
|
|
|
|
- <div class="dataGroupBox flex-col justify-between">
|
|
|
|
- <span class="dataNum">{{ salesNumber }}</span>
|
|
|
|
- <span class="dataText">{{ $t("home.productNum") }}</span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <span class="dataText">{{ $t("home.totalIncome") }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="dataGroup flex-col">
|
|
|
|
+ <div class="dataGroupBox flex-col justify-between">
|
|
|
|
+ <span class="dataNum">{{ salesNumber }}</span>
|
|
|
|
+ <span class="dataText">{{ $t("home.productNum") }}</span>
|
|
</div>
|
|
</div>
|
|
- <div class="dataGroup flex-col">
|
|
|
|
- <div class="dataGroupBox flex-col justify-between">
|
|
|
|
- <span class="dataNum">{{ orderNumber }}</span>
|
|
|
|
- <span class="dataText">{{ $t("home.numberOfOrders") }}</span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <div class="dataGroup flex-col">
|
|
|
|
+ <div class="dataGroupBox flex-col justify-between">
|
|
|
|
+ <span class="dataNum">{{ orderNumber }}</span>
|
|
|
|
+ <span class="dataText">{{ $t("home.numberOfOrders") }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ </div>
|
|
<!-- </div> -->
|
|
<!-- </div> -->
|
|
</div>
|
|
</div>
|
|
<!-- 时间 -->
|
|
<!-- 时间 -->
|
|
@@ -83,29 +83,58 @@
|
|
</div>
|
|
</div>
|
|
<kNoData v-else></kNoData>
|
|
<kNoData v-else></kNoData>
|
|
<!-- </div> -->
|
|
<!-- </div> -->
|
|
- <!-- 常用工具 -->
|
|
|
|
- <div class="outer9 flex-col justify-center">
|
|
|
|
- <div class="main24 flex-col justify-between">
|
|
|
|
- <div class="ImageText10 flex-col">
|
|
|
|
- <div class="wrap2 flex-row justify-between">
|
|
|
|
- <div class="outer10 flex-col"></div>
|
|
|
|
- <div class="TextGroup13 flex-col">
|
|
|
|
- <span class="txt13">{{ $t("home.commonTools") }}</span>
|
|
|
|
|
|
+
|
|
|
|
+ <div v-if="user.ifForeign === '1'">
|
|
|
|
+ <!-- 机器销售额 -->
|
|
|
|
+ <div class="outer9 flex-col justify-center">
|
|
|
|
+ <div class="main24 flex-col justify-between">
|
|
|
|
+ <div class="ImageText10 flex-col">
|
|
|
|
+ <div class="wrap2 flex-row justify-between">
|
|
|
|
+ <div class="outer10 flex-col"></div>
|
|
|
|
+ <div class="TextGroup13 flex-col">
|
|
|
|
+ <span class="txt13">{{ $t("home.machineSales") }}</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <div class="outer11 flex-row">
|
|
|
|
- <div class="main25 flex-col" v-for="(item, index) in pushToolList" :key="index"
|
|
|
|
- @click="pushToolPage(item.value)">
|
|
|
|
- <img class="mod7 flex-col" :src="showLogo(item.value)" />
|
|
|
|
- <div class="TextGroup14 flex-col">
|
|
|
|
- <!-- <span class="info15" v-html="item.label"></span> -->
|
|
|
|
- <span class="info15">{{ $t(item.label) }}</span>
|
|
|
|
|
|
+ <!-- 各支付方式总额 -->
|
|
|
|
+ <van-list offset="100" :immediate-check="false">
|
|
|
|
+ <div v-for="item in combinedList" :key="item" class="o-pb-20">
|
|
|
|
+ <div>
|
|
|
|
+ <van-cell-group inset class="machineSaleBox">
|
|
|
|
+ <!-- 设备名称 -->
|
|
|
|
+ <div class="contentWord kBordBott">{{ item.machineName }}
|
|
|
|
+ </div>
|
|
|
|
+ <!-- <van-row class="layer5" justify="space-between">
|
|
|
|
+ <van-col span="12">总销售额: {{ item.totalSales }}</van-col>
|
|
|
|
+ <van-col span="12">总现金: {{ item.totalCash }}</van-col>
|
|
|
|
+ </van-row> -->
|
|
|
|
+ <van-row class="layer5" justify="space-between">
|
|
|
|
+ <!-- 硬币 -->
|
|
|
|
+ <van-col span="8">{{ $t("home.coins") }}: {{ item.coins }}</van-col>
|
|
|
|
+ <!-- 纸币 -->
|
|
|
|
+ <van-col span="8">{{ $t("home.bills") }}: {{ item.bills }}</van-col>
|
|
|
|
+ <!-- 硬币+纸币 -->
|
|
|
|
+ <van-col span="8">{{ $t("home.coinsBills") }}: {{ item.coinsBills }}</van-col>
|
|
|
|
+ <!-- 信用卡 -->
|
|
|
|
+ <van-col span="8">{{ $t("home.creditCard") }}: {{ item.creditCard }}</van-col>
|
|
|
|
+ <!-- 电子支付 -->
|
|
|
|
+ <van-col span="8">{{ $t("home.electronicPayment") }}: {{ item.electronicPayment }}</van-col>
|
|
|
|
+ </van-row>
|
|
|
|
+ </van-cell-group>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </van-list>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div v-else style="text-align: center;">
|
|
|
|
+ <div><br><br></div>
|
|
|
|
+ {{ $t("home.migrationInstructions") }}
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<!-- 通知弹窗 -->
|
|
<!-- 通知弹窗 -->
|
|
<kDialog :dialogTitle="$t('home.notificationPop.notification')" :cancelBtnTxt="$t('home.notificationPop.nextTime')"
|
|
<kDialog :dialogTitle="$t('home.notificationPop.notification')" :cancelBtnTxt="$t('home.notificationPop.nextTime')"
|
|
@@ -156,7 +185,6 @@ import kNoData from "../../components/commom/kNoData/index.vue";
|
|
import kDialog from "../../components/commom/kDialog/index.vue";
|
|
import kDialog from "../../components/commom/kDialog/index.vue";
|
|
import { onMounted, ref, nextTick } from "vue";
|
|
import { onMounted, ref, nextTick } from "vue";
|
|
import sHeader from "../../components/SimpleHeader";
|
|
import sHeader from "../../components/SimpleHeader";
|
|
-// import navBar from "../../components/NavBar";
|
|
|
|
import dateSelectList from "../../components/dateSelectList";
|
|
import dateSelectList from "../../components/dateSelectList";
|
|
// import typeSelectList from "../../components/typeSelectList";
|
|
// import typeSelectList from "../../components/typeSelectList";
|
|
import typeDownMenu from "../../components/typeDownMenu";
|
|
import typeDownMenu from "../../components/typeDownMenu";
|
|
@@ -168,10 +196,11 @@ import {
|
|
Api_postMachineNum,
|
|
Api_postMachineNum,
|
|
Api_getUpdateNotice,
|
|
Api_getUpdateNotice,
|
|
getIsAlarm,
|
|
getIsAlarm,
|
|
|
|
+ Api_getEquipmentPageStatistics,
|
|
} from "../../service/home";
|
|
} from "../../service/home";
|
|
import dateUtil from "../../utils/dateUtil";
|
|
import dateUtil from "../../utils/dateUtil";
|
|
import { useI18n } from "vue-i18n";
|
|
import { useI18n } from "vue-i18n";
|
|
-import { showToast } from "vant";
|
|
|
|
|
|
+import { showFailToast, showToast } from "vant";
|
|
import RobotIcon from '@/assets/home/robot.png';
|
|
import RobotIcon from '@/assets/home/robot.png';
|
|
import { getLocal, setLocal, navigatorLanguage } from "@/common/js/utils";
|
|
import { getLocal, setLocal, navigatorLanguage } from "@/common/js/utils";
|
|
|
|
|
|
@@ -255,11 +284,13 @@ export default {
|
|
const update = (uDate) => {
|
|
const update = (uDate) => {
|
|
dateSelect.value = uDate;
|
|
dateSelect.value = uDate;
|
|
getStatisticsFun();
|
|
getStatisticsFun();
|
|
|
|
+ getMachineNameListFunc()
|
|
};
|
|
};
|
|
let typeSelectData = {};
|
|
let typeSelectData = {};
|
|
const upselectdata = (uSData) => {
|
|
const upselectdata = (uSData) => {
|
|
typeSelectData = uSData;
|
|
typeSelectData = uSData;
|
|
getStatisticsFun();
|
|
getStatisticsFun();
|
|
|
|
+ getMachineNameListFunc()
|
|
};
|
|
};
|
|
const salesVolume = ref(0);
|
|
const salesVolume = ref(0);
|
|
const salesNumber = ref(0);
|
|
const salesNumber = ref(0);
|
|
@@ -331,10 +362,12 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
grid: {
|
|
grid: {
|
|
|
|
+ top: '10%',
|
|
left: "3%",
|
|
left: "3%",
|
|
right: "4%",
|
|
right: "4%",
|
|
bottom: "10%",
|
|
bottom: "10%",
|
|
containLabel: true,
|
|
containLabel: true,
|
|
|
|
+ height: 'auto',
|
|
},
|
|
},
|
|
legend: {
|
|
legend: {
|
|
bottom: 0,
|
|
bottom: 0,
|
|
@@ -471,8 +504,64 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
getTitleFunc();
|
|
getTitleFunc();
|
|
|
|
+
|
|
|
|
+ if (user) {
|
|
|
|
+ getMachineNameListFunc();
|
|
|
|
+ }
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ const finished = ref(false);
|
|
|
|
+ const loading = ref(true);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 设备销售数据
|
|
|
|
+ const combinedList = ref([]); // 设备销额集合
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ const getMachineNameListFunc = async () => {
|
|
|
|
+
|
|
|
|
+ combinedList.value = [];
|
|
|
|
+ const searchParams = {
|
|
|
|
+ adminId: user.id,
|
|
|
|
+ ...dateSelect.value,
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ const { data } = await Api_getEquipmentPageStatistics(Object.assign({}, searchParams));
|
|
|
|
+ if (data.code === "00000" && data.data) {
|
|
|
|
+
|
|
|
|
+ for (let i = 0; i < data.data.categories.length; i++) {
|
|
|
|
+ const machineNameVal = data.data.categories[i]; // 设备名称
|
|
|
|
+ const coinsVal = data.data.series[0].data[i]; // 硬币销额
|
|
|
|
+ const billsVal = data.data.series[1].data[i]; // 纸币销额
|
|
|
|
+ const coinsBillsVal = data.data.series[2].data[i]; // 硬币+纸币销额
|
|
|
|
+ const creditCardVal = data.data.series[3].data[i]; // 信用卡销额
|
|
|
|
+ const electronicPaymentVal = data.data.series[4].data[i]; // 电子支付销额
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ const machineSalesData = {
|
|
|
|
+ // totalSales: totalSalesVal,
|
|
|
|
+ // totalCash: totalCashVal,
|
|
|
|
+ machineName: machineNameVal,
|
|
|
|
+ coins: coinsVal,
|
|
|
|
+ bills: billsVal,
|
|
|
|
+ coinsBills: coinsBillsVal,
|
|
|
|
+ creditCard: creditCardVal,
|
|
|
|
+ electronicPayment: electronicPaymentVal
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ combinedList.value.push(machineSalesData);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ showFailToast(data.message);
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log("error", error);
|
|
|
|
+ console.error("Error", error)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
const getTitleFunc = async () => {
|
|
const getTitleFunc = async () => {
|
|
const currentDomain = window.location.href;
|
|
const currentDomain = window.location.href;
|
|
// const currentDomain = window.location.hostname;
|
|
// const currentDomain = window.location.hostname;
|
|
@@ -662,7 +751,7 @@ export default {
|
|
};
|
|
};
|
|
|
|
|
|
// const aiDialog = showDialog();
|
|
// const aiDialog = showDialog();
|
|
- const offset = ref({ x: Math.floor(window.innerWidth * 0.8), y: Math.floor(window.innerHeight * 0.7) });
|
|
|
|
|
|
+ const offset = ref({ x: Math.floor(window.innerWidth * 0.8), y: Math.floor(window.innerHeight * 0.75) });
|
|
|
|
|
|
const popupVisible = ref(false);
|
|
const popupVisible = ref(false);
|
|
// const token = getLocal("token");
|
|
// const token = getLocal("token");
|
|
@@ -696,6 +785,7 @@ export default {
|
|
// };
|
|
// };
|
|
|
|
|
|
return {
|
|
return {
|
|
|
|
+ user,
|
|
userName,
|
|
userName,
|
|
update,
|
|
update,
|
|
upselectdata,
|
|
upselectdata,
|
|
@@ -734,6 +824,15 @@ export default {
|
|
offset,
|
|
offset,
|
|
isShowRobot,
|
|
isShowRobot,
|
|
sysTitle,
|
|
sysTitle,
|
|
|
|
+ finished,
|
|
|
|
+ loading,
|
|
|
|
+ // machineName,
|
|
|
|
+ // coins,
|
|
|
|
+ // bills,
|
|
|
|
+ // coinsBills,
|
|
|
|
+ // creditCard,
|
|
|
|
+ // electronicPayment,
|
|
|
|
+ combinedList
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|