Commit 470a1854 by chenwq

看产值-数据展示

1 parent 5bf2faaa
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="merchant-scene"> <view class="merchant-scene">
<view class="top"> <view class="top">
<view class="scene-label">{{sceneObj.label}}</view> <view class="scene-label">{{sceneObj.label}}</view>
<view wx:if="{{sceneObj.name == 'membranes' && searchForm.startTime && searchForm.endTime}}" class="business-total label">业务产值 <view wx:if="{{sceneObj.name == 'membranes'}}" class="business-total label">业务产值
<text class="num-red">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.bizTotal || 0)}}</text> <text class="num-red">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.bizTotal || 0)}}</text>
</view> </view>
<view> <view>
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
<view class="total-txt num-grey" wx:if="{{curInfo.curMonthTotalData.total == 0}}">暂无业务收入</view> <view class="total-txt num-grey" wx:if="{{curInfo.curMonthTotalData.total == 0}}">暂无业务收入</view>
</view> </view>
<view> <view>
<view wx:if="{{sceneObj.name != 'membranes' && searchForm.startTime && searchForm.endTime}}" class="label m-b-12 business-total-other">业务产值 <view wx:if="{{sceneObj.name != 'membranes'}}" class="label m-b-12 business-total-other">业务产值
<text class="num-red">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.bizTotal || 0)}}</text> <text class="num-red">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.bizTotal || 0)}}</text>
</view> </view>
<view wx:if="{{searchForm.startTime && searchForm.endTime}}"> <view>
<view wx:for="{{sceneTopList}}" wx:key="index" class="top-right-box"> <view wx:for="{{sceneTopList}}" wx:key="index" class="top-right-box">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view class="num-grey"> <view class="num-grey">
......
...@@ -9,7 +9,7 @@ Component({ ...@@ -9,7 +9,7 @@ Component({
type: Object, type: Object,
value: () => { }, value: () => { },
observer(n) { observer(n) {
if(n) { if (n) {
this.dealYearMonth() this.dealYearMonth()
this.dealCompare() this.dealCompare()
} }
...@@ -26,6 +26,9 @@ Component({ ...@@ -26,6 +26,9 @@ Component({
startTime: '', startTime: '',
endTime: '', endTime: '',
} }
},
observer(n) {
n && this.judgeIsShow()
} }
} }
}, },
...@@ -40,7 +43,8 @@ Component({ ...@@ -40,7 +43,8 @@ Component({
date: { date: {
year: '', year: '',
month: '' month: ''
} },
totalShow: false
}, },
/** /**
...@@ -54,6 +58,14 @@ Component({ ...@@ -54,6 +58,14 @@ Component({
['date.month']: new Date(yearMonth || '').getMonth() + 1, ['date.month']: new Date(yearMonth || '').getMonth() + 1,
}) })
}, },
judgeIsShow() {
let { searchForm } = this.data
let { userInfo } = wx.$storage.get()
let isSuper = userInfo.isSuper && searchForm.partnerMerchantIds[0] == userInfo.merchantId
this.setData({
totalShow: (searchForm.startTime && searchForm.endTime) || searchForm.shopMerchantIds.length || !isSuper
})
},
dealCompare() { dealCompare() {
let { merchantDataList } = this.data.curInfo let { merchantDataList } = this.data.curInfo
let list = [] let list = []
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="num-blue ft-40"><text class="f-28">¥</text>{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.total || 0)}}</view> <view class="num-blue ft-40"><text class="f-28">¥</text>{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.total || 0)}}</view>
<view class="total-txt">本月业绩产生至{{curInfo.merchantDataList.length}}家门店</view> <view class="total-txt">本月业绩产生至{{curInfo.merchantDataList.length}}家门店</view>
</view> </view>
<view wx:if="{{searchForm.startTime && searchForm.endTime}}"> <view wx:if="{{totalShow}}">
<view wx:for="{{sceneFormList}}" wx:key="index" class="top-right-box"> <view wx:for="{{sceneFormList}}" wx:key="index" class="top-right-box">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view class="num-grey">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData[item.name] || 0)}}</view> <view class="num-grey">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData[item.name] || 0)}}</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!