mrechant.wxml
7.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!-- pages/tab/output/components/merchant/mrechant.wxml -->
<!-- hidden="{{true}}" -->
<wxs src="../../index.wxs" module="filter" />
<scroll-view scroll-y="true" class="list-wrap" enable-back-to-top style="height:100%" refresher-enabled="{{true}}" bindrefresherrefresh="refreshList" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="con" wx:if="{{list.length }}">
<view class="statistics">
<view class="totalOutputValue statisticsbox">
<view class="num">¥{{totalMoney}}</view>
<view class="label">总产值</view>
</view>
<view class="totalOrder statisticsbox">
<view class="num">{{totalOrder}}</view>
<view class="label">订单数/笔</view>
</view>
</view>
<!-- -->
<!-- 无门店 -->
<!-- <merchantDataStatistics bind:swiperChange="swiperChange" /> -->
<!-- sceneIndx==3? 'short': -->
<!-- {{startInd ==4?'short':'full'}} -->
<swiper indicator-dots="{{list.length>1? indicatorDots:false}}" class="swiper " style="height:{{swiperHeight*2}}rpx" autoplay="{{autoplay}}" bindchange="swiperChange" interval="{{interval}}" duration="{{duration}}">
<block wx:for="{{list}}" wx:key="*this">
<swiper-item>
<view class="merchantDataStatistics-con">
<view class="contitle">
<view class="name">{{item.merchantName}}</view>
<view class="select" data-index="{{index}}" data-item="{{item}}" bind:tap="pickSheet">
<view>{{item.selectName||'累计'}}</view>
<image class="arrow {{isAct?'isAct':''}}" webp src="{{IMAGES.arrow}}" alt="" />
</view>
</view>
<!-- <scene-select/> -->
<view class="scene-box">
<!-- {{item.startInd + 1}} -->
<scene-box formData="{{item}}" data-index="{{index}}" data-item="{{item}}" bind:handleSceneChange="handleSceneChange" sceneActive="{{(item.startInd + 1)}}" />
</view>
<view class="outputValueCon " wx:if="{{!item.showNothingSceneCon && item.showList[item.startInd] }}">
<view class="title">产值图</view>
<view class="swiperCon" wx:if="{{item['showList']}}">
<view class="swiper-item ">
<view class="fluuelCon {{item.startInd!=2?'longHeight':'shortHeight'}}">
<image class="bg-image " src="{{item.startInd!=2?IMAGES.funnelNew :IMAGES.funnelNewSm}}" />
<block wx:for="{{item.startInd!=2? funnelList['start']: funnelList['end']}}" wx:key="*this" wx:for-index="ind" wx:for-item="funneItem">
<view class="funneItem">
<view class="label">{{funneItem['label']}}</view>
<view class="num font-number">
{{item.showList[item.startInd][funneItem['key']]||0}}
</view>
</view>
</block>
</view>
<!-- <block wx:for="{{items}}"></block> hidden="{{item.startInd ==3}}" -->
<view class="statisticsCon" hidden="{{item.startInd ==2}}">
<!-- 统计 -->
<view class="merchantCount">
<view class="turnover">
<view class="num">
¥ {{item.showList[item.startInd]['custUnitPrice']||0}}
</view>
<image class="img " webp src="{{IMAGES.money}}" />
<view class="label">客单价</view>
</view>
<view class="customerUnitPrice">
<view class="num">
¥ {{filter.money_three_for_two_thousands(item.showList[item.startInd]['totalMoney']||0)}}
</view>
<image class="img " webp src="{{IMAGES.paper}}" />
<view class="label">营业额</view>
</view>
</view>
<!-- 指标诊断 -->
<view class="diagnosisCon" wx:if="{{item.showList[item.startInd]['diagnoseList'].length}}">
<view class="tipsIcon">指标诊断</view>
<swiper class="tips" autoplay="{{true}}" interval="{{5000}}" circular="{{true}}" duration="{{duration}}">
<block wx:for="{{item.showList[item.startInd]['diagnoseList']}}" wx:key="*this" wx:for-index="dgInd" wx:for-item="dgItem">
<swiper-item>{{dgItem}}</swiper-item>
</block>
</swiper>
<view>
<!-- 日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。 -->
</view>
</view>
<!-- wx:if="{{swiperHeight>590}}" -->
<navigator class="navOhterApp" target="miniProgram" open-type="navigate" app-id="wx570d9331f9ace0bd" version="release">
<image src="{{IMAGES.link}}" webp class="linkImg" />
查看订单详情
</navigator>
</view>
<view class="statisticsCon" hidden="{{item.startInd !=2}}">
<!-- 统计 -->
<view class="merchantCount crowdFundingTotal">
<view class="turnover">
<view class="num">
¥ {{filter.money_three_for_two_thousands(item.showList[item.startInd]['totalMoney']||0)}}
</view>
<image class="img " webp src="{{IMAGES.money}}" />
<view class="label">营业额</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view wx:else>test</view> -->
</view>
<view wx:else class="emptyCon">
<image class="img" src="{{IMAGES.empty}}" />
</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</scroll-view>
<nothingTipsCon wx:if="{{!list.length }}" />
<!-- <wxs module="filter">
module.exports = {
money_three_for_two_thousands: function (num) {
//num = parseInt(num);
// return num
var num = num + ''
var d = ''
if (num.slice(0, 1) == '-') {
d = num.slice(0, 1)
num = num.slice(1)
}
var len = num.length
var index = num.indexOf('.')
if (index == -1) {
num = num + '.00'
} else if (index + 2 == len) {
num = num + '0'
}
var index = num.indexOf('.') // 字符出现的位置
var num2 = num.slice(-3)
num = num.slice(0, index)
var result = ''
while (num.length > 3) {
result = ',' + num.slice(-3) + result
num = num.slice(0, num.length - 3)
}
if (num) {
result = num + result
}
// return result
return d + (result + num2)
}
}
</wxs> -->