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

Merge branch 'v_c_application_feature_1031' into 'develop'

1.修改商家查询数据H5;

See merge request !20
parents 5df2b9dc 3cc0ae48
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
{{item.dealTime||''}} {{item.dealTime||''}}
</view> </view>
</view> </view>
<div class="van-list__finished-text" v-if="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;"> <view class="nodata" v-if="flowsList.length==0" style="margin-top: 0;">
<image :src="ImgUrl+'xzf/h5/nodata.png'" style="width: 399rpx;height: 211rpx;" mode="aspectFit"> <image :src="ImgUrl+'xzf/h5/nodata.png'" style="width: 399rpx;height: 211rpx;" mode="aspectFit">
...@@ -109,6 +111,10 @@ ...@@ -109,6 +111,10 @@
export default { export default {
name: "Store", name: "Store",
props: { props: {
totalCnt: {
type: Number,
default: 0
},
isperiod: { isperiod: {
type: Boolean, type: Boolean,
default: false default: false
...@@ -163,6 +169,9 @@ ...@@ -163,6 +169,9 @@
}, },
methods: { methods: {
Loadmore() {
this.$emit("Loadmore", true)
},
onConfirmStore(value, index) { onConfirmStore(value, index) {
console.warn(`当前值:${value}, 当前索引:${index}`); console.warn(`当前值:${value}, 当前索引:${index}`);
this.selectStore() this.selectStore()
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
</template> </template>
<!-- 内容 --> <!-- 内容 -->
<template #default> <template #default>
<Store v-if="active!=1" :isperiod="isperiod" :StoreInfo_="StoreInfo_" :flowsList="flowsList" <Store v-if="active!=1" :totalCnt="totalCnt" :isperiod="isperiod" :StoreInfo_="StoreInfo_"
:storeInfo="storeInfo" @selectTime="selectTime" @selectStore="selectStore" :flowsList="flowsList" :storeInfo="storeInfo" @selectTime="selectTime"
:starttime="starttime" :endtime="endtime" :calendar="calendar" :ImgUrl="ImgUrl" @selectStore="selectStore" @Loadmore="Loadmore" :starttime="starttime" :endtime="endtime"
:ImgUrl2="ImgUrl2"></Store> :calendar="calendar" :ImgUrl="ImgUrl" :ImgUrl2="ImgUrl2"></Store>
</template> </template>
</van-tab> </van-tab>
<van-tab title="设备"> <van-tab title="设备">
...@@ -113,12 +113,19 @@ ...@@ -113,12 +113,19 @@
deviceList_: [], deviceList_: [],
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
// 数据总条数
totalCnt: 0
} }
}, },
onLoad: function(options) { onLoad: function(options) {
}, },
methods: { methods: {
// 加载更多
Loadmore() {
this.pageIndex += 1
this.StoreFlows(this.StoreInfo_['id'])
},
//门店设备 //门店设备
async DeviceList(storeId) { async DeviceList(storeId) {
// 高峰期禁止请求接口 // 高峰期禁止请求接口
...@@ -169,11 +176,19 @@ ...@@ -169,11 +176,19 @@
} }
let jsonData = JSON.parse(JSON.stringify(data || {})) let jsonData = JSON.parse(JSON.stringify(data || {}))
const backData = jsonData.data.backData || [] const backData = jsonData.data.backData || []
const totalCnt = jsonData.data.totalCnt || 0 this.totalCnt = jsonData.data.totalCnt || 0
this.flowsList = backData.map((v, index) => { if (this.pageIndex == 1) {
v['amount'] = parseFloat(v.amount / 100).toFixed(2) this.flowsList = backData.map((v, index) => {
return v v['amount'] = parseFloat(v.amount / 100).toFixed(2)
}) return v
})
} else {
const arr = backData.map((v, index) => {
v['amount'] = parseFloat(v.amount / 100).toFixed(2)
return v
})
this.flowsList.push(...arr)
}
}, },
// 设备查看明细 // 设备查看明细
async transactionDetails(item, index) { async transactionDetails(item, index) {
...@@ -231,6 +246,8 @@ ...@@ -231,6 +246,8 @@
async changeTabs(e) { async changeTabs(e) {
// 清空选择的门店信息 // 清空选择的门店信息
this.StoreInfo_ = {} this.StoreInfo_ = {}
this.pageIndex = 1;
this.pageSize = 20;
if (e === 0) { if (e === 0) {
this.StoreFlows() this.StoreFlows()
} else { } else {
......
...@@ -55,6 +55,9 @@ ...@@ -55,6 +55,9 @@
</image> </image>
<view class="text1">暂无数据</view> <view class="text1">暂无数据</view>
</view> </view>
<div class="van-list__finished-text" v-if="dataList.length>0&&totalCnt==dataList.length">没有更多了</div>
<div class="van-list__error-text" v-if="dataList.length>0&&totalCnt!=dataList.length" @tap="Loadmore">
点击加载更多...</div>
</view> </view>
</view> </view>
<!-- 高峰期文案 无数据 --> <!-- 高峰期文案 无数据 -->
...@@ -72,8 +75,8 @@ ...@@ -72,8 +75,8 @@
</view> --> </view> -->
</view> </view>
<!-- 选择日期组件 --> <!-- 选择日期组件 -->
<van-calendar v-model="calendar" :max-range="93" :min-date="minDate" :show-confirm="true" position="bottom" color="#01CB88" <van-calendar v-model="calendar" :max-range="93" :min-date="minDate" :show-confirm="true" position="bottom"
type="range" @confirm="onConfirm" /> color="#01CB88" type="range" @confirm="onConfirm" />
</view> </view>
</template> </template>
...@@ -118,6 +121,10 @@ ...@@ -118,6 +121,10 @@
this.DeviceFlows() this.DeviceFlows()
}, },
methods: { methods: {
Loadmore() {
this.pageIndex += 1
this.DeviceFlows()
},
//设备流水 //设备流水
async DeviceFlows() { async DeviceFlows() {
const loading = Toast.loading('数据加载中...'); const loading = Toast.loading('数据加载中...');
...@@ -142,10 +149,18 @@ ...@@ -142,10 +149,18 @@
const backData = jsonData.data.backData || [] const backData = jsonData.data.backData || []
this.totalAmount = parseFloat(jsonData.data.totalAmount / 100).toFixed(2) this.totalAmount = parseFloat(jsonData.data.totalAmount / 100).toFixed(2)
this.totalCnt = jsonData.data.totalCnt || 0 this.totalCnt = jsonData.data.totalCnt || 0
this.dataList = backData.map((v, index) => { if (this.pageIndex == 1) {
v['amount'] = parseFloat(v.amount / 100).toFixed(2) this.dataList = backData.map((v, index) => {
return v v['amount'] = parseFloat(v.amount / 100).toFixed(2)
}) return v
})
} else {
const arr = backData.map((v, index) => {
v['amount'] = parseFloat(v.amount / 100).toFixed(2)
return v
})
this.dataList.push(...arr)
}
}, },
// 组件提交时间 // 组件提交时间
onConfirm(date) { onConfirm(date) {
......
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