Commit 6d4234d3 by 杨明

产值0判断

1 parent e1796328
...@@ -70,7 +70,7 @@ Component({ ...@@ -70,7 +70,7 @@ Component({
}) })
}, },
dealCompare() { dealCompare() {
let { merchantDataList } = this.data.curInfo let { sceneFormList,curInfo:{merchantDataList} } = this.data
let list = [] let list = []
merchantDataList.forEach((item, index) => { merchantDataList.forEach((item, index) => {
list.push({ list.push({
...@@ -86,8 +86,17 @@ Component({ ...@@ -86,8 +86,17 @@ Component({
scene1BoutiqueTotalSign:(item.curMonthTotalData.scene1BoutiqueTotal - item.lastMonthTotalData.scene1BoutiqueTotal)>0 scene1BoutiqueTotalSign:(item.curMonthTotalData.scene1BoutiqueTotal - item.lastMonthTotalData.scene1BoutiqueTotal)>0
}) })
}) })
sceneFormList.forEach(scene=>{
scene.total = 0
merchantDataList.forEach(merchant=>{
if(parseInt(merchant.curMonthTotalData[scene.name]) != 0) {
scene.total++
}
})
})
this.setData({ this.setData({
compareList: list compareList: list,
sceneFormList
}) })
}, },
jump(e) { jump(e) {
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
<block wx:if="{{curInfo.merchantDataList.length}}"> <block wx:if="{{curInfo.merchantDataList.length}}">
<view class="scene-item" wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx"> <view wx:if="{{subItem.total !=0}}" class="scene-item" wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="scene-item-b {{subItem.label.length>4?'long-scene':''}}">{{subItem.label}}</view> <view class="scene-item-b {{subItem.label.length>4?'long-scene':''}}">{{subItem.label}}</view>
<view wx:for="{{curInfo.merchantDataList}}" wx:key="index" class="list" bindtap="jump" data-info="{{item}}"> <view wx:if="{{filter.money_three_for_two_thousands(item.curMonthTotalData[subItem.name])!=0}}" wx:for="{{curInfo.merchantDataList}}" wx:key="index" class="list" bindtap="jump" data-info="{{item}}">
<view class="title-box flex-between {{index == 0 ? 'title-box-first' : ''}}"> <view class="title-box flex-between {{index == 0 ? 'title-box-first' : ''}}">
<view class="title-block"> <view class="title-block">
<view class="title-name text-hide">{{item.merchantName}}</view> <view class="title-name text-hide">{{item.merchantName}}</view>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!