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

1.提交更新;

parent 3cc0ae48
......@@ -5,12 +5,12 @@
<view class="rowboxh">
<view class="rowl" @tap="selectStore">
<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>
</view>
<view class="rowr">
当前设备 <text class="text">{{storeInfo['onlineDeviceCnt']||0}}</text> 台,离线<text
class="text">{{storeInfo['offlineDeviceCnt']||0}}</text>
当前设备 <text class="text">{{storeInfo['onlineDeviceCnt']||0}}</text> 台,离线<text class="text"
style="color: #F65200 !important">{{storeInfo['offlineDeviceCnt']||0}}</text>
</view>
</view>
<view class="warning" v-if="storeInfo['offlineDeviceCnt']>0">
......@@ -201,6 +201,7 @@
/* background: #FFFFFF; */
.dataitem {
margin-left: 32rpx;
height: 154rpx;
display: flex;
align-items: center;
......@@ -225,18 +226,18 @@
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
color: rgba(0,0,0,0.5);
line-height: 44rpx;
position: absolute;
right: 52rpx;
right: 24rpx;
}
.row1 {
display: flex;
align-items: center;
width: 100%;
margin-left: 32rpx;
// margin-left: 32rpx;
position: relative;
}
......@@ -265,7 +266,7 @@
font-weight: 400;
color: rgba(0, 0, 0, 0.35);
line-height: 44rpx;
padding-left: 32rpx;
// padding-left: 32rpx;
}
}
}
......
......@@ -4,19 +4,19 @@
<view class="select_time" @tap="selectTime" v-if="!isperiod">
<image class="time" :src="ImgUrl+'xzf/h5/time.png'" mode="aspectFit"></image>
<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 class="store_data" v-if="!isperiod">
<view class="rowboxh">
<view class="rowl" @tap="selectStore">
<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>
</view>
<view class="rowr">
当前设备 <text class="text">{{storeInfo['onlineDeviceCnt']||0}}</text> 台,离线<text
class="text">{{storeInfo['offlineDeviceCnt']||0}}</text>
当前设备 <text class="text">{{storeInfo['onlineDeviceCnt']||0}}</text> 台,离线<text class="text"
style="color: #F65200 !important">{{storeInfo['offlineDeviceCnt']||0}}</text>
</view>
</view>
<view class="warning" v-if="storeInfo['offlineDeviceCnt']>0">
......@@ -47,7 +47,7 @@
<view class="count">{{item['dealCnt']}}</view>
<view class="amount">{{item['dealAmount']}}</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']" />
<view class="line" v-if="!((index+1)==storeInfo['cateringData'].length)"></view>
</view>
......@@ -65,7 +65,7 @@
<!-- 数据列表 -->
<view class="dataList">
<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="name">
{{item.deviceName||''}}
......@@ -80,7 +80,7 @@
{{item.dealTime||''}}
</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>
<!-- 无数据 -->
<view class="nodata" v-if="flowsList.length==0" style="margin-top: 0;">
......@@ -169,6 +169,11 @@
},
methods: {
// 查看明细
transactionDetails(item, index) {
console.log(11111111);
this.$emit("transactionDetails", item, index)
},
Loadmore() {
this.$emit("Loadmore", true)
},
......@@ -235,8 +240,12 @@
.dataList {
width: 100%;
/* background: #FFFFFF; */
.dataitem:nth-child(1){
border-top: 1rpx solid #E2E2E2;
}
.dataitem {
margin-left: 32rpx;
height: 154rpx;
display: flex;
align-items: center;
......@@ -272,7 +281,7 @@
display: flex;
align-items: center;
width: 100%;
margin-left: 32rpx;
// margin-left: 32rpx;
position: relative;
}
......@@ -285,7 +294,7 @@
font-weight: 400;
color: rgba(0, 0, 0, 0.35);
line-height: 44rpx;
padding-left: 32rpx;
// padding-left: 32rpx;
}
}
}
......@@ -431,7 +440,7 @@
.line {
width: 542rpx;
height: 1rpx;
height: 0.5rpx;
background-color: #E2E2E2;
position: absolute;
bottom: -30rpx;
......
......@@ -10,9 +10,10 @@
<!-- 内容 -->
<template #default>
<Store v-if="active!=1" :totalCnt="totalCnt" :isperiod="isperiod" :StoreInfo_="StoreInfo_"
:flowsList="flowsList" :storeInfo="storeInfo" @selectTime="selectTime"
@selectStore="selectStore" @Loadmore="Loadmore" :starttime="starttime" :endtime="endtime"
:calendar="calendar" :ImgUrl="ImgUrl" :ImgUrl2="ImgUrl2"></Store>
:flowsList="flowsList" :storeInfo="storeInfo" @transactionDetails="transactionDetails"
@selectTime="selectTime" @selectStore="selectStore" @Loadmore="Loadmore" :starttime="starttime"
:endtime="endtime" :showPicker="showPicker" :calendar="calendar" :ImgUrl="ImgUrl"
:ImgUrl2="ImgUrl2"></Store>
</template>
</van-tab>
<van-tab title="设备">
......@@ -209,9 +210,11 @@
// 查询门店交易数据
if (this.active === 0) {
this.StoreFlows(StoreInfo_['id'])
this.StoreData()
} else {
this.DeviceList(StoreInfo_['id'])
}
this.showPicker = false
},
onChangeStore(picker, value, index) {
......@@ -221,7 +224,7 @@
},
// 选择门店
selectStore() {
this.showPicker = !this.showPicker
this.showPicker = true
},
// 组件提交时间
onConfirm(date) {
......@@ -234,6 +237,7 @@
// 查询门店交易数据
if (this.active === 0) {
this.StoreFlows(this.StoreInfo_['id'])
this.StoreData()
} else {
this.DeviceList(this.StoreInfo_['id'])
}
......@@ -250,6 +254,7 @@
this.pageSize = 20;
if (e === 0) {
this.StoreFlows()
this.StoreData()
} else {
this.DeviceList()
}
......
......@@ -63,7 +63,12 @@ export default {
},
//门店初始化数据
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) {
await Dialog({
title: '温馨提示',
......
......@@ -11,8 +11,8 @@
<view class="rowboxh">
<view class="rowl">
<view class="rowltxt2">{{details['deviceName']||""}}</view>
<view class="status" v-if="details['onlineStatus']=='online'">在线</view>
<view class="status" v-if="details['onlineStatus']=='offline'"
<view class="status" v-if="onlineStatus=='online'">在线</view>
<view class="status" v-if="onlineStatus=='offline'"
style="background-color: rgba(246, 82, 0, 0.08);color: #F65200;">离线</view>
</view>
</view>
......@@ -115,9 +115,12 @@
totalCnt: 0,
pageIndex: 1,
pageSize: 20,
// 设置状态
onlineStatus: "offline"
}
},
onLoad: function(options) {
this.DeviceInfo()
this.DeviceFlows()
},
methods: {
......@@ -125,6 +128,25 @@
this.pageIndex += 1
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() {
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