Commit c688218c authored by 李智书's avatar 李智书

1.提交更新;

parent 3cc0ae48
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
<view class="rowboxh"> <view class="rowboxh">
<view class="rowl" @tap="selectStore"> <view class="rowl" @tap="selectStore">
<view class="rowltxt2">{{StoreInfo_['storeName']||'全部门店'}}</view> <view class="rowltxt2">{{StoreInfo_['storeName']||'全部门店'}}</view>
<image :class="showPicker?'xia':'xiaframes'" style="margin-left: 16rpx;" <image :class="showPicker?'xiaframes':'xia'" style="margin-left: 16rpx;"
:src="ImgUrl+'xzf/h5/xia.png'" mode="aspectFit"></image> :src="ImgUrl+'xzf/h5/xia.png'" mode="aspectFit"></image>
</view> </view>
<view class="rowr"> <view class="rowr">
当前设备 <text class="text">{{storeInfo['onlineDeviceCnt']||0}}</text> 台,离线<text 当前设备 <text class="text">{{storeInfo['onlineDeviceCnt']||0}}</text> 台,离线<text class="text"
class="text">{{storeInfo['offlineDeviceCnt']||0}}</text> style="color: #F65200 !important">{{storeInfo['offlineDeviceCnt']||0}}</text>
</view> </view>
</view> </view>
<view class="warning" v-if="storeInfo['offlineDeviceCnt']>0"> <view class="warning" v-if="storeInfo['offlineDeviceCnt']>0">
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
/* background: #FFFFFF; */ /* background: #FFFFFF; */
.dataitem { .dataitem {
margin-left: 32rpx;
height: 154rpx; height: 154rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -225,18 +226,18 @@ ...@@ -225,18 +226,18 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: rgba(0, 0, 0, 0.85); color: rgba(0,0,0,0.5);
line-height: 44rpx; line-height: 44rpx;
position: absolute; position: absolute;
right: 52rpx; right: 24rpx;
} }
.row1 { .row1 {
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
margin-left: 32rpx; // margin-left: 32rpx;
position: relative; position: relative;
} }
...@@ -265,7 +266,7 @@ ...@@ -265,7 +266,7 @@
font-weight: 400; font-weight: 400;
color: rgba(0, 0, 0, 0.35); color: rgba(0, 0, 0, 0.35);
line-height: 44rpx; line-height: 44rpx;
padding-left: 32rpx; // padding-left: 32rpx;
} }
} }
} }
......
...@@ -4,19 +4,19 @@ ...@@ -4,19 +4,19 @@
<view class="select_time" @tap="selectTime" v-if="!isperiod"> <view class="select_time" @tap="selectTime" v-if="!isperiod">
<image class="time" :src="ImgUrl+'xzf/h5/time.png'" mode="aspectFit"></image> <image class="time" :src="ImgUrl+'xzf/h5/time.png'" mode="aspectFit"></image>
<view class="content">{{starttime}}~{{endtime}}</view> <view class="content">{{starttime}}~{{endtime}}</view>
<image :class="calendar?'xia':'xiaframes'" :src="ImgUrl+'xzf/h5/xia.png'" mode="aspectFit"></image> <image :class="calendar?'xiaframes':'xia'" :src="ImgUrl+'xzf/h5/xia.png'" mode="aspectFit"></image>
</view> </view>
<!-- 门店数据 --> <!-- 门店数据 -->
<view class="store_data" v-if="!isperiod"> <view class="store_data" v-if="!isperiod">
<view class="rowboxh"> <view class="rowboxh">
<view class="rowl" @tap="selectStore"> <view class="rowl" @tap="selectStore">
<view class="rowltxt2">{{StoreInfo_['storeName']||'全部门店'}}</view> <view class="rowltxt2">{{StoreInfo_['storeName']||'全部门店'}}</view>
<image :class="showPicker?'xia':'xiaframes'" style="margin-left: 16rpx;" <image :class="showPicker?'xiaframes':'xia'" style="margin-left: 16rpx;"
:src="ImgUrl+'xzf/h5/xia.png'" mode="aspectFit"></image> :src="ImgUrl+'xzf/h5/xia.png'" mode="aspectFit"></image>
</view> </view>
<view class="rowr"> <view class="rowr">
当前设备 <text class="text">{{storeInfo['onlineDeviceCnt']||0}}</text> 台,离线<text 当前设备 <text class="text">{{storeInfo['onlineDeviceCnt']||0}}</text> 台,离线<text class="text"
class="text">{{storeInfo['offlineDeviceCnt']||0}}</text> style="color: #F65200 !important">{{storeInfo['offlineDeviceCnt']||0}}</text>
</view> </view>
</view> </view>
<view class="warning" v-if="storeInfo['offlineDeviceCnt']>0"> <view class="warning" v-if="storeInfo['offlineDeviceCnt']>0">
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<view class="count">{{item['dealCnt']}}</view> <view class="count">{{item['dealCnt']}}</view>
<view class="amount">{{item['dealAmount']}}</view> <view class="amount">{{item['dealAmount']}}</view>
</view> </view>
<van-progress style="margin-top: 10rpx;" pivot-text="" stroke-width="8rpx" pivot-color="#E9E7E7" <van-progress style="margin-top: 10rpx;height: 8rpx;" pivot-text="" pivot-color="#E9E7E7;"
color="#01CB88" :percentage="item['perc']" /> color="#01CB88" :percentage="item['perc']" />
<view class="line" v-if="!((index+1)==storeInfo['cateringData'].length)"></view> <view class="line" v-if="!((index+1)==storeInfo['cateringData'].length)"></view>
</view> </view>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<!-- 数据列表 --> <!-- 数据列表 -->
<view class="dataList"> <view class="dataList">
<view class="dataitem" v-for="(item,index) in flowsList" :key="index" <view class="dataitem" v-for="(item,index) in flowsList" :key="index"
:style="((index+1)==flowsList.length)?'border: none;':''"> :style="((index+1)==flowsList.length)?'border: none;':''" @tap="transactionDetails(item,index)">
<view class="row1"> <view class="row1">
<view class="name"> <view class="name">
{{item.deviceName||''}} {{item.deviceName||''}}
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
{{item.dealTime||''}} {{item.dealTime||''}}
</view> </view>
</view> </view>
<div class="van-list__finished-text" v-if="totalCnt==flowsList.length">没有更多了</div> <div class="van-list__finished-text" v-if="totalCnt>0&&(totalCnt==flowsList.length)">没有更多了</div>
<div class="van-list__error-text" v-if="totalCnt!=flowsList.length" @tap="Loadmore">点击加载更多...</div> <div class="van-list__error-text" v-if="totalCnt!=flowsList.length" @tap="Loadmore">点击加载更多...</div>
<!-- 无数据 --> <!-- 无数据 -->
<view class="nodata" v-if="flowsList.length==0" style="margin-top: 0;"> <view class="nodata" v-if="flowsList.length==0" style="margin-top: 0;">
...@@ -169,6 +169,11 @@ ...@@ -169,6 +169,11 @@
}, },
methods: { methods: {
// 查看明细
transactionDetails(item, index) {
console.log(11111111);
this.$emit("transactionDetails", item, index)
},
Loadmore() { Loadmore() {
this.$emit("Loadmore", true) this.$emit("Loadmore", true)
}, },
...@@ -235,8 +240,12 @@ ...@@ -235,8 +240,12 @@
.dataList { .dataList {
width: 100%; width: 100%;
/* background: #FFFFFF; */ /* background: #FFFFFF; */
.dataitem:nth-child(1){
border-top: 1rpx solid #E2E2E2;
}
.dataitem { .dataitem {
margin-left: 32rpx;
height: 154rpx; height: 154rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -272,7 +281,7 @@ ...@@ -272,7 +281,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
margin-left: 32rpx; // margin-left: 32rpx;
position: relative; position: relative;
} }
...@@ -285,7 +294,7 @@ ...@@ -285,7 +294,7 @@
font-weight: 400; font-weight: 400;
color: rgba(0, 0, 0, 0.35); color: rgba(0, 0, 0, 0.35);
line-height: 44rpx; line-height: 44rpx;
padding-left: 32rpx; // padding-left: 32rpx;
} }
} }
} }
...@@ -431,7 +440,7 @@ ...@@ -431,7 +440,7 @@
.line { .line {
width: 542rpx; width: 542rpx;
height: 1rpx; height: 0.5rpx;
background-color: #E2E2E2; background-color: #E2E2E2;
position: absolute; position: absolute;
bottom: -30rpx; bottom: -30rpx;
......
...@@ -10,9 +10,10 @@ ...@@ -10,9 +10,10 @@
<!-- 内容 --> <!-- 内容 -->
<template #default> <template #default>
<Store v-if="active!=1" :totalCnt="totalCnt" :isperiod="isperiod" :StoreInfo_="StoreInfo_" <Store v-if="active!=1" :totalCnt="totalCnt" :isperiod="isperiod" :StoreInfo_="StoreInfo_"
:flowsList="flowsList" :storeInfo="storeInfo" @selectTime="selectTime" :flowsList="flowsList" :storeInfo="storeInfo" @transactionDetails="transactionDetails"
@selectStore="selectStore" @Loadmore="Loadmore" :starttime="starttime" :endtime="endtime" @selectTime="selectTime" @selectStore="selectStore" @Loadmore="Loadmore" :starttime="starttime"
:calendar="calendar" :ImgUrl="ImgUrl" :ImgUrl2="ImgUrl2"></Store> :endtime="endtime" :showPicker="showPicker" :calendar="calendar" :ImgUrl="ImgUrl"
:ImgUrl2="ImgUrl2"></Store>
</template> </template>
</van-tab> </van-tab>
<van-tab title="设备"> <van-tab title="设备">
...@@ -209,9 +210,11 @@ ...@@ -209,9 +210,11 @@
// 查询门店交易数据 // 查询门店交易数据
if (this.active === 0) { if (this.active === 0) {
this.StoreFlows(StoreInfo_['id']) this.StoreFlows(StoreInfo_['id'])
this.StoreData()
} else { } else {
this.DeviceList(StoreInfo_['id']) this.DeviceList(StoreInfo_['id'])
} }
this.showPicker = false
}, },
onChangeStore(picker, value, index) { onChangeStore(picker, value, index) {
...@@ -221,7 +224,7 @@ ...@@ -221,7 +224,7 @@
}, },
// 选择门店 // 选择门店
selectStore() { selectStore() {
this.showPicker = !this.showPicker this.showPicker = true
}, },
// 组件提交时间 // 组件提交时间
onConfirm(date) { onConfirm(date) {
...@@ -234,6 +237,7 @@ ...@@ -234,6 +237,7 @@
// 查询门店交易数据 // 查询门店交易数据
if (this.active === 0) { if (this.active === 0) {
this.StoreFlows(this.StoreInfo_['id']) this.StoreFlows(this.StoreInfo_['id'])
this.StoreData()
} else { } else {
this.DeviceList(this.StoreInfo_['id']) this.DeviceList(this.StoreInfo_['id'])
} }
...@@ -250,6 +254,7 @@ ...@@ -250,6 +254,7 @@
this.pageSize = 20; this.pageSize = 20;
if (e === 0) { if (e === 0) {
this.StoreFlows() this.StoreFlows()
this.StoreData()
} else { } else {
this.DeviceList() this.DeviceList()
} }
......
...@@ -63,7 +63,12 @@ export default { ...@@ -63,7 +63,12 @@ export default {
}, },
//门店初始化数据 //门店初始化数据
async StoreData(token) { async StoreData(token) {
let data = await requestPost('/cgi-xpay/app/busi/StoreData', {}) let data = await requestPost('/cgi-xpay/app/busi/StoreData', {
"businessId": 0,
"startDate": this.starttime.replaceAll("/", "-"),
"endDate": this.endtime.replaceAll("/", "-"),
"storeId": this.StoreInfo_['id'] || 0
})
if (data['code'] != 200) { if (data['code'] != 200) {
await Dialog({ await Dialog({
title: '温馨提示', title: '温馨提示',
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<view class="rowboxh"> <view class="rowboxh">
<view class="rowl"> <view class="rowl">
<view class="rowltxt2">{{details['deviceName']||""}}</view> <view class="rowltxt2">{{details['deviceName']||""}}</view>
<view class="status" v-if="details['onlineStatus']=='online'">在线</view> <view class="status" v-if="onlineStatus=='online'">在线</view>
<view class="status" v-if="details['onlineStatus']=='offline'" <view class="status" v-if="onlineStatus=='offline'"
style="background-color: rgba(246, 82, 0, 0.08);color: #F65200;">离线</view> style="background-color: rgba(246, 82, 0, 0.08);color: #F65200;">离线</view>
</view> </view>
</view> </view>
...@@ -115,9 +115,12 @@ ...@@ -115,9 +115,12 @@
totalCnt: 0, totalCnt: 0,
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
// 设置状态
onlineStatus: "offline"
} }
}, },
onLoad: function(options) { onLoad: function(options) {
this.DeviceInfo()
this.DeviceFlows() this.DeviceFlows()
}, },
methods: { methods: {
...@@ -125,6 +128,25 @@ ...@@ -125,6 +128,25 @@
this.pageIndex += 1 this.pageIndex += 1
this.DeviceFlows() this.DeviceFlows()
}, },
//设备详情
async DeviceInfo() {
const loading = Toast.loading('数据加载中...');
let data = await requestPost('/cgi-xpay/app/busi/DeviceInfo', {
"businessId": 0,
"deviceId": this.details['deviceId'] || 0
})
loading.clear();
if (data['code'] != 200) {
await Dialog({
title: '温馨提示',
message: "设备详情查询失败",
confirmButtonText: "知道了"
})
return
}
let jsonData = JSON.parse(JSON.stringify(data || {}))
this.onlineStatus = jsonData.data.onlineStatus || "offline"
},
//设备流水 //设备流水
async DeviceFlows() { async DeviceFlows() {
const loading = Toast.loading('数据加载中...'); const loading = Toast.loading('数据加载中...');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment