oil-station/pos-uni/pages/index/index.vue

297 lines
5.9 KiB
Vue
Raw Normal View History

2024-05-13 11:22:23 +08:00
<template>
<view class="content">
<view class="container">
<headers :titles="titles"></headers>
2024-05-22 09:39:54 +08:00
<view class="top-box">
<view class="title_top">京博加油站</view>
<view class="title_centen">
<view class="sm-size">今日营业额()</view>
2024-05-24 17:50:55 +08:00
<view class="big-size">{{indexData.totalPayMoney}}</view>
2024-05-22 09:39:54 +08:00
</view>
2024-05-24 17:50:55 +08:00
<!-- 123-->
2024-05-22 09:39:54 +08:00
<view class="ds-ab">
2024-05-24 17:50:55 +08:00
<view class="sm-size">收款笔数 {{indexData.totalCount}}</view>
<view class="sm-size">退款笔数 {{indexData.totalRefund}}</view>
2024-05-22 09:39:54 +08:00
</view>
<view class="jg-box">
<view class="s-box" @click="goCollection()">
<view class="">
<image src="/static/imgs/sk.png" mode=""></image>
</view>
<view class="">收款</view>
</view>
2024-05-28 09:11:12 +08:00
<view class="s-box" @click="goRecharge()">
2024-05-22 09:39:54 +08:00
<view class="">
<image src="/static/imgs/cz.png" mode=""></image>
</view>
<view class="">充值</view>
</view>
2024-05-27 16:43:09 +08:00
<view class="s-box" @click="goCode()">
2024-05-22 09:39:54 +08:00
<view class="">
<image src="/static/imgs/skm.png" mode=""></image>
</view>
<view class="">收款码</view>
</view>
</view>
</view>
<!-- -->
<view class="gq-box">
<view class="ss-box" @click="goAdd()">
<view class="">
<image src="/static/imgs/xzhy.png" mode=""></image>
</view>
<view class="">新增会员</view>
</view>
<view class="ss-box" @click="goBusinessData()">
<view class="">
<image src="/static/imgs/jysj.png" mode=""></image>
</view>
<view class="">经营数据</view>
</view>
<view class="ss-box" @click="goOrderlist()">
<view class="">
<image src="/static/imgs/dd.png" mode=""></image>
</view>
<view class="">订单</view>
</view>
2024-05-25 13:43:04 +08:00
<view class="ss-box" @click="gochangeShifts()">
2024-05-22 09:39:54 +08:00
<view class="">
<image src="/static/imgs/jjb.png" mode=""></image>
</view>
<view class="">交接班</view>
</view>
</view>
<!-- bai -->
2024-05-29 15:00:12 +08:00
<!-- <view class="bai-box">
2024-05-22 09:39:54 +08:00
<u-icon name="bell" color="#E61D2A" size="18"></u-icon>
<view class="hy-size">您有新的交易日报生成请点击查看</view>
2024-05-29 15:00:12 +08:00
</view> -->
2024-05-13 11:22:23 +08:00
</view>
<tabbar :msg='msg'></tabbar>
</view>
</template>
<script>
2024-05-24 17:50:55 +08:00
import request from "../../utils/request";
2024-05-13 11:22:23 +08:00
import headers from '../../components/header/headers.vue'
import tabbar from '../../components/tabbar/tabbar.vue'
export default {
data() {
return {
2024-05-22 09:39:54 +08:00
titles: "",
2024-05-13 11:22:23 +08:00
msg: "0",
List: [],
show: false,
status: 'loading',
2024-05-24 17:50:55 +08:00
indexData: {
totalPayMoney: '0',
totalCount: '0',
totalRefund: '0',
}
2024-05-13 11:22:23 +08:00
}
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore" 底部刷新结束
2024-05-24 17:50:55 +08:00
this.getIndexData();
2024-05-13 11:22:23 +08:00
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
},
components: {
headers,
tabbar
},
methods: {
2024-05-28 10:12:15 +08:00
goRecharge() {
2024-05-28 09:11:12 +08:00
uni.navigateTo({
2024-05-28 10:12:15 +08:00
url: "/pagesHome/MemberRecharge/MemberRecharge"
2024-05-28 09:11:12 +08:00
})
},
2024-05-27 16:43:09 +08:00
goCode() {
uni.navigateTo({
2024-05-29 11:05:24 +08:00
url: '/pagesHome/PaymentCode/SetUpCode'
2024-05-27 16:43:09 +08:00
})
},
2024-05-25 13:43:04 +08:00
gochangeShifts() {
uni.navigateTo({
url: '/pagesHome/changeShifts/changeShifts'
})
},
2024-05-22 09:39:54 +08:00
goAdd() {
uni.navigateTo({
2024-05-28 10:12:15 +08:00
url: '/pagesHome/AddVip/AddCode'
2024-05-22 09:39:54 +08:00
})
},
goCollection() {
uni.navigateTo({
url: '/pagesHome/Collection/Collection'
})
},
goOrderlist() {
uni.navigateTo({
url: '/pagesHome/orderList/orderList'
})
},
goBusinessData() {
uni.navigateTo({
url: '/pagesHome/BusinessData/BusinessData'
})
},
2024-05-13 11:22:23 +08:00
goback() {
uni.navigateBack()
2024-05-24 17:50:55 +08:00
},
// 获取销售数据
getIndexData() {
request({
url: 'business/allOrderInfo/getIndexData4Pos',
method: 'get',
params: this.form
}).then((res) => {
if (res.code == 200) {
this.indexData = res.data
} else {
uni.showToast({
title: res.data,
icon: "none"
})
}
})
2024-05-13 11:22:23 +08:00
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
// background: linear-gradient(180deg, #B2D2FC 0%, #B2D2FC 14%, rgba(255, 255, 255, 0.84) 24%, rgba(255, 255, 255, 0.84) 100%);
height: 100vh;
}
.container {
width: 100%;
background: #f4f5f6;
box-sizing: border-box;
padding-top: 88px;
}
2024-05-22 09:39:54 +08:00
.top-box {
width: 100%;
height: 185px;
background: url('../../static/imgs/homeback.png');
background-size: 100% 100%;
box-sizing: border-box;
padding: 15px;
color: #fff;
padding-top: 0px;
position: relative;
}
.title_top {
font-weight: bold;
font-size: 16px;
color: #FFFFFF;
margin-bottom: 15px;
}
.title_centen {
width: 100%;
text-align: center;
margin-bottom: 15px;
}
.sm-size {
font-weight: bold;
font-size: 14px;
color: #FFFFFF;
margin-bottom: 10px;
}
.big-size {
font-weight: 800;
font-size: 24px;
color: #FFFFFF;
}
.ds-ab {
width: 100%;
display: flex;
align-items: center;
justify-content: space-around;
}
.jg-box {
width: 95%;
background: #fff;
border-radius: 8px;
box-sizing: border-box;
padding: 10px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
}
.s-box {
width: 33.3%;
font-size: 14px;
color: #333333;
text-align: center;
image {
width: 40px;
height: 40px;
margin: 5px auto;
}
}
.ss-box {
width: 25%;
font-size: 14px;
color: #333333;
text-align: center;
image {
width: 40px;
height: 40px;
margin: 5px auto;
}
}
.gq-box {
width: 95%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 auto;
margin-top: 65px;
}
.bai-box {
width: 95%;
border-radius: 6px;
background: #fff;
box-sizing: border-box;
padding: 10px 15px;
display: flex;
align-items: center;
font-size: 14px;
margin: 15px auto;
}
.hy-size {
width: 80%;
overflow: hidden;
margin-left: 10px;
}
2024-05-24 17:50:55 +08:00
</style>