Commit da80e8bf95440890aa44de3f9e2618eaa6be41cd
1 parent
028f9f1b
瘦身日记
Showing
10 changed files
with
995 additions
and
1 deletions
app.json
@@ -211,7 +211,9 @@ | @@ -211,7 +211,9 @@ | ||
211 | "pages/user/Detailed/Detailed", | 211 | "pages/user/Detailed/Detailed", |
212 | "pages/user/user_fw/user_fw", | 212 | "pages/user/user_fw/user_fw", |
213 | "pages/user/cardinfo/cardinfo", | 213 | "pages/user/cardinfo/cardinfo", |
214 | - "pages/user/nick_avatar/nick_avatar" | 214 | + "pages/user/nick_avatar/nick_avatar", |
215 | + "pages/user/slimming/slimming", | ||
216 | + "pages/user/punchInhistory/punchInhistory" | ||
215 | ] | 217 | ] |
216 | } | 218 | } |
217 | 219 |
packageE/pages/user/punchInhistory/punchInhistory.js
0 → 100644
1 | +var e = getApp(), os = e.globalData.setting; | ||
2 | +var utils = require('../../../../utils/util.js'); | ||
3 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | ||
4 | +const request = getApp().request; | ||
5 | +let app = getApp(); | ||
6 | + | ||
7 | + | ||
8 | +Page({ | ||
9 | + | ||
10 | + filters: { | ||
11 | + toFix(val) { | ||
12 | + if (val === undefined) return 0; | ||
13 | + if (val === null) return 0; | ||
14 | + if (isNaN(val)) return 0; | ||
15 | + if (val === '') return 0; | ||
16 | + return parseFloat(val).toFixed(2); | ||
17 | + }, | ||
18 | + //获取样式 | ||
19 | + set_def: function (val, def, is_price) { | ||
20 | + if (val == undefined) { | ||
21 | + if (def) return def; | ||
22 | + return "-" | ||
23 | + } | ||
24 | + if (is_price) { | ||
25 | + return parseFloat(val + "").toFixed(2); | ||
26 | + } | ||
27 | + return val; | ||
28 | + }, | ||
29 | + }, | ||
30 | + | ||
31 | + | ||
32 | + data:{ | ||
33 | + imghost: app.globalData.setting.imghost, | ||
34 | + keyword: '', | ||
35 | + list: [], | ||
36 | + list2:[], | ||
37 | + diffweight:'', | ||
38 | + standardweight:'', | ||
39 | + howday:'', | ||
40 | + }, | ||
41 | + | ||
42 | + onLoad(options) { | ||
43 | + var that = this; | ||
44 | + if (options.customerid != undefined && options.customerid != "" && options.customerid != null) { | ||
45 | + | ||
46 | + that.setData({ | ||
47 | + customerid:options.customerid, | ||
48 | + diffweight:options.diffweight, | ||
49 | + standardweight:options.standardweight, | ||
50 | + howday:options.howday | ||
51 | + }) | ||
52 | + } | ||
53 | + | ||
54 | + | ||
55 | + var userInfo = getApp().globalData.userInfo; | ||
56 | + if (userInfo) { | ||
57 | + that.userInfo = userInfo; | ||
58 | + that.loding = 1; | ||
59 | + that.init_data(); | ||
60 | + } | ||
61 | + | ||
62 | + | ||
63 | + wx.getSystemInfo({ | ||
64 | + success: function (res) { | ||
65 | + var clientWidth = res.windowWidth; | ||
66 | + var clientHeight = res.windowHeight; | ||
67 | + var rpxR = 750 / clientWidth; | ||
68 | + var calc = clientHeight * rpxR; | ||
69 | + that.setData({ | ||
70 | + calc:calc | ||
71 | + }) | ||
72 | + } | ||
73 | + }) | ||
74 | + | ||
75 | + }, | ||
76 | + | ||
77 | + onShow: function () { | ||
78 | + if (getApp().globalData.userInfo && !this.userInfo) { | ||
79 | + this.setData({ | ||
80 | + userInfo:userInfo | ||
81 | + }) | ||
82 | + | ||
83 | + this.loding = 1; | ||
84 | + this.init_data(); | ||
85 | + } | ||
86 | + }, | ||
87 | + | ||
88 | + | ||
89 | + //初始化数据 | ||
90 | + init_data() { | ||
91 | + var that = this; | ||
92 | + let userInfo = getApp().globalData.userInfo; | ||
93 | + | ||
94 | + let req = { | ||
95 | + customerid: that.data.customerid, | ||
96 | + store_id: userInfo.store_id, //用户id | ||
97 | + //staffid: getApp().globalData.RoleData.StaffId, //商户编号 | ||
98 | + ApiName: 'api.slimming.clock.registration.sum.query', | ||
99 | + }; | ||
100 | + | ||
101 | + that.get_list(req); | ||
102 | + }, | ||
103 | + | ||
104 | + | ||
105 | + //获取门店报表 | ||
106 | + get_list(req) { | ||
107 | + var that = this; | ||
108 | + if (that.loading) { | ||
109 | + return false; | ||
110 | + } | ||
111 | + that.loading = 1; | ||
112 | + | ||
113 | + if (req) { | ||
114 | + | ||
115 | + that.setData({ | ||
116 | + noMore:false, | ||
117 | + list:[], | ||
118 | + list2:[] | ||
119 | + }) | ||
120 | + } else { | ||
121 | + if (that.noMore) { | ||
122 | + that.loading = 0; | ||
123 | + return false; | ||
124 | + } | ||
125 | + req = that.req; //如果不是全选的参数,就是page分页+1 | ||
126 | + req.page++; | ||
127 | + } | ||
128 | + | ||
129 | + //请求参数进行存储 | ||
130 | + that.req = req; | ||
131 | + | ||
132 | + wx.showLoading({ | ||
133 | + title: '加载中' | ||
134 | + }); | ||
135 | + | ||
136 | + var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid; | ||
137 | + | ||
138 | + getApp().request.promiseGet(url, { | ||
139 | + data: req | ||
140 | + }) | ||
141 | + .then((res) => { | ||
142 | + wx.hideLoading(); | ||
143 | + that.loading = 0; | ||
144 | + | ||
145 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { | ||
146 | + | ||
147 | + var list=that.data.list; | ||
148 | + | ||
149 | + for (let i = 0; i < res.data.data.pageData.length; i++) { | ||
150 | + list.push(res.data.data.pageData[i]); | ||
151 | + } | ||
152 | + | ||
153 | + that.setData({ | ||
154 | + list:list | ||
155 | + }) | ||
156 | + | ||
157 | + } else { | ||
158 | + getApp().confirmBox(res.data.msg) | ||
159 | + } | ||
160 | + }); | ||
161 | + }, | ||
162 | + | ||
163 | + | ||
164 | +}) | ||
165 | + | ||
166 | + |
packageE/pages/user/punchInhistory/punchInhistory.json
0 → 100644
packageE/pages/user/punchInhistory/punchInhistory.wxml
0 → 100644
1 | +<view> | ||
2 | + | ||
3 | + <view class="total_count"> | ||
4 | + <view class="fs35" style="text-align: center;width: 100%;height: 80rpx;line-height: 80rpx;"> | ||
5 | + 总览 | ||
6 | + </view> | ||
7 | + <view class="total_box"> | ||
8 | + <view class="total_number"> | ||
9 | + <view class="detail_number ellipsis-2 fs40">{{diffweight||"-"}}</view> | ||
10 | + <view class="coo fs24">累计减重(斤)</view> | ||
11 | + </view> | ||
12 | + <view class="line2"> </view> | ||
13 | + <view class="total_number"> | ||
14 | + <view class="detail_number ellipsis-2 fs40">{{howday||"-"}}</view> | ||
15 | + <view class="coo fs24">到店次数</view> | ||
16 | + </view> | ||
17 | + <view class="line2"> </view> | ||
18 | + <view class="total_number"> | ||
19 | + <view class="detail_number ellipsis-2 fs40">{{standardweight||"-"}}</view> | ||
20 | + <view class="coo fs24">目标体重(斤)</view> | ||
21 | + </view> | ||
22 | + </view> | ||
23 | + </view> | ||
24 | + | ||
25 | + | ||
26 | + <!-- 门店报表 --> | ||
27 | + <scroll-view scroll-y="true" bindscrolltolower="get_list()" style="height:{{calc - 300}}rpx" > | ||
28 | + | ||
29 | + <view style="padding:3%"> | ||
30 | + <view class="card" wx:for="{{list}}"> | ||
31 | + <view class="card_title" >{{item.fyearmonth}} 减重 <text style="color: rgba(254, 58, 98, 1);margin: 0 10rpx;">{{item.diffweight}}</text> 斤 到店 <text style="color: rgba(254, 58, 98, 1);margin: 0 10rpx;"> {{ item.weightqty }} </text> 次 | ||
32 | + </view> | ||
33 | + | ||
34 | + <view class="card_box"> | ||
35 | + <view class="flex " wx:for="{{item.items}}" wx:for-item="item2" style="height: 90rpx;"> | ||
36 | + <view class="tiny_box1" style="margin: 5rpx 10rpx"> | ||
37 | + <image src="{{imghost+ '/newmdimg/mdd_img/upcard_jz.png'}}" style="width: 61rpx;height: 61rpx;" mode=""></image> | ||
38 | + </view> | ||
39 | + <view class="tiny_box2" style="margin: 5rpx 10rpx"> | ||
40 | + <view class="fs22 coo ellipsis-2">{{item2.billdate}}</view> | ||
41 | + <view class="coo" style="display: flex;width: 100%;margin-top: 5rpx;"> | ||
42 | + <view class="coo fs22 " style="display: flex;width: 45%;text-align: left;"> | ||
43 | + <text>{{item2.weight}}斤</text> | ||
44 | + </view> | ||
45 | + <view class="coo fs22" style="display: flex;width: 55%;text-align: right;margin-left: 36rpx;"> | ||
46 | + <text>减重 <text style="color: rgba(254, 58, 98, 1);margin: 0 5rpx;">{{item2.diffweight}}</text>斤</text> | ||
47 | + </view> | ||
48 | + | ||
49 | + </view> | ||
50 | + </view> | ||
51 | + | ||
52 | + <view class="tiny_box3" style="margin: 5rpx 10rpx;height: 90rpx;"> | ||
53 | + <view class="coo ellipsis-22" style="line-height: 35rpx;">{{item2.remark}}</view> | ||
54 | + </view> | ||
55 | + | ||
56 | + </view> | ||
57 | + | ||
58 | + </view> | ||
59 | + </view> | ||
60 | + </view> | ||
61 | + | ||
62 | +<!-- <van-empty description="暂无数据" wx:if="list.length==0" />--> | ||
63 | +<!-- <van-divider contentPosition="center" fontSize="12" custom-style="padding: 0 60rpx;"--> | ||
64 | +<!-- wx:if="noMore && list.length > 10">已经到底啦--> | ||
65 | +<!-- </van-divider>--> | ||
66 | + | ||
67 | + | ||
68 | + | ||
69 | + <nodata class="t-c" wx:if="{{list.length == 0 && is_get}}"></nodata> | ||
70 | + <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.length !== 0}}">- 已经到底了 -</view> | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + </scroll-view> | ||
75 | + | ||
76 | + | ||
77 | + </view> |
packageE/pages/user/punchInhistory/punchInhistory.wxss
0 → 100644
1 | +page{ | ||
2 | + background-color: #f2f2f2; | ||
3 | +} | ||
4 | + | ||
5 | +.tab_sec_list { | ||
6 | + background-color: #fff; | ||
7 | + border-bottom: 1rpx solid #eee; | ||
8 | + border-top: 1rpx solid #eee; | ||
9 | + | ||
10 | +} | ||
11 | + | ||
12 | +.tab_th { | ||
13 | + background-color: #fff; | ||
14 | + flex-shrink: 0; | ||
15 | + height: 68rpx; | ||
16 | + line-height: 68rpx; | ||
17 | + width: 187rpx; | ||
18 | + text-align: center; | ||
19 | + position: relative; | ||
20 | + font-size: 24rpx; | ||
21 | + color: #A6A6A6FF; | ||
22 | +} | ||
23 | + | ||
24 | +.coo { | ||
25 | + color: rgba(56, 56, 56, 1); | ||
26 | +} | ||
27 | + | ||
28 | +.h_line { | ||
29 | + position: absolute; | ||
30 | + left: 50%; | ||
31 | + margin-left: -30rpx; | ||
32 | + width: 44rpx; | ||
33 | + height: 7rpx; | ||
34 | + overflow: hidden; | ||
35 | + background-color: rgba(254, 58, 98, 1); | ||
36 | + display: none; | ||
37 | + border-radius: 17rpx !important; | ||
38 | + bottom: -4rpx; | ||
39 | +} | ||
40 | + | ||
41 | +.tab_thactive { | ||
42 | + background-color: #fff; | ||
43 | + flex-shrink: 0; | ||
44 | + height: 63rpx; | ||
45 | + line-height: 63rpx; | ||
46 | + width: 187rpx; | ||
47 | + text-align: center; | ||
48 | + /* border-bottom: 1rpx solid #eee; | ||
49 | + border-top: 1rpx solid #eee; */ | ||
50 | + position: relative; | ||
51 | + font-weight: bolder; | ||
52 | + color: rgba(254, 58, 98, 1); | ||
53 | + font-size: 35rpx; | ||
54 | +} | ||
55 | + | ||
56 | +.tab_thactive .h_line { | ||
57 | + display: block !important; | ||
58 | + border-radius: 8rpx !important; | ||
59 | +} | ||
60 | + | ||
61 | +.container { | ||
62 | + margin-top: 73rpx; | ||
63 | +} | ||
64 | + | ||
65 | +/* 图表 */ | ||
66 | +.chart_card { | ||
67 | + position: relative; | ||
68 | + display: flex; | ||
69 | + background: rgba(255, 255, 255, 1); | ||
70 | + border-radius: 17rpx; | ||
71 | + margin: 20rpx 23rpx; | ||
72 | +} | ||
73 | + | ||
74 | +.net4 { | ||
75 | + height: 60rpx; | ||
76 | + color: rgba(56, 56, 56, 1); | ||
77 | + font-size: 35rpx; | ||
78 | + text-align: center; | ||
79 | + display: flex; | ||
80 | + align-items: center; | ||
81 | +} | ||
82 | + | ||
83 | +.charts-box { | ||
84 | + /* width: 550rpx; */ | ||
85 | + width: 100%; | ||
86 | + height: 350rpx; | ||
87 | + /* margin-left: 50rpx; */ | ||
88 | +} | ||
89 | + | ||
90 | +.cont { | ||
91 | + margin-top: 88rpx; | ||
92 | + width: 100%; | ||
93 | +} | ||
94 | +.pl{ | ||
95 | + max-width: 200rpx; | ||
96 | + margin-right: 4rpx; | ||
97 | + height: 40rpx; | ||
98 | +} | ||
99 | +/* 图表下面 */ | ||
100 | +.box { | ||
101 | + display: flex; | ||
102 | + flex-wrap: wrap; | ||
103 | + justify-content: space-between; | ||
104 | + box-sizing: border-box; | ||
105 | + padding: 21rpx 26rpx; | ||
106 | + margin: 20rpx 23rpx; | ||
107 | + width: 705rpx; | ||
108 | + height: 363rpx; | ||
109 | + opacity: 1; | ||
110 | + background: #FFFFFFFF; | ||
111 | + border-radius: 17rpx; | ||
112 | +} | ||
113 | + | ||
114 | +.box_item1 { | ||
115 | + display: flex; | ||
116 | + flex-direction: column; | ||
117 | + width: 320rpx; | ||
118 | + height: 147rpx; | ||
119 | + background: #F9FAFE; | ||
120 | + color: #333446; | ||
121 | + text-align: center; | ||
122 | + border-radius: 17rpx; | ||
123 | + | ||
124 | +} | ||
125 | + | ||
126 | +.box_item2 { | ||
127 | + display: flex; | ||
128 | + flex-direction: column; | ||
129 | + width: 320rpx; | ||
130 | + height: 147rpx; | ||
131 | + background: #FFE3E9; | ||
132 | + color: #FE3A62; | ||
133 | + text-align: center; | ||
134 | + border-radius: 17rpx; | ||
135 | +} | ||
136 | + | ||
137 | +/* 门店报表 */ | ||
138 | +.n_top { | ||
139 | + display: flex; | ||
140 | + flex-direction: column; | ||
141 | + /* height: 224rpx; */ | ||
142 | + /* background: #FFFFFFFF; */ | ||
143 | + /* padding-bottom: 20rpx; */ | ||
144 | + border-radius: 0 0 17rpx 17rpx; | ||
145 | +} | ||
146 | + | ||
147 | +/* 搜索框 */ | ||
148 | +.search-box { | ||
149 | + display: flex; | ||
150 | + align-items: center; | ||
151 | + justify-content: center; | ||
152 | + background: #FFFFFFFF; | ||
153 | + padding-top: 20rpx; | ||
154 | + padding-bottom: 20rpx; | ||
155 | +} | ||
156 | + | ||
157 | +.btn_sear { | ||
158 | + display: flex; | ||
159 | + justify-content: center; | ||
160 | + align-items: center; | ||
161 | + color: #fff; | ||
162 | + width: 107rpx; | ||
163 | + height: 68rpx; | ||
164 | + border-radius: 17rpx; | ||
165 | + margin: 0 14rpx 0 18rpx; | ||
166 | + background: linear-gradient(270deg, rgba(255, 24, 126, 1) 0%, rgba(255, 89, 64, 1) 100%); | ||
167 | + letter-spacing: 4rpx; | ||
168 | + text-indent: 4rpx; | ||
169 | +} | ||
170 | + | ||
171 | +.inp_view { | ||
172 | + background-color: rgb(249, 250, 254); | ||
173 | + height: 82rpx; | ||
174 | + width: 228rpx; | ||
175 | + border-radius: 10rpx; | ||
176 | + color: rgba(128, 128, 128, 1); | ||
177 | +} | ||
178 | + | ||
179 | +.line { | ||
180 | + height: 4rpx; | ||
181 | + background: #C4C4C4; | ||
182 | + margin: 0 15rpx; | ||
183 | + width: 35rpx; | ||
184 | +} | ||
185 | + | ||
186 | +.sign_tb { | ||
187 | + width: 35rpx; | ||
188 | + height: 35rpx; | ||
189 | + margin-right: 10rpx; | ||
190 | +} | ||
191 | + | ||
192 | +/* 搜索框下面 */ | ||
193 | +.total_count { | ||
194 | + width: 94%; | ||
195 | + height: 180rpx; | ||
196 | + margin: 3% 3% 0 3%; | ||
197 | + background: white; | ||
198 | + padding-bottom: 20rpx; | ||
199 | + border-radius:17rpx; | ||
200 | +} | ||
201 | + | ||
202 | +.total_box { | ||
203 | + display: flex; | ||
204 | + justify-content: space-between; | ||
205 | + /* padding: 0 102rpx; */ | ||
206 | + padding: 0 30rpx; | ||
207 | +} | ||
208 | + | ||
209 | +.total_number { | ||
210 | + width: 200rpx; | ||
211 | + text-align: center; | ||
212 | + display: flex; | ||
213 | + flex-direction: column; | ||
214 | + align-items: center; | ||
215 | + font-size: 24rpx; | ||
216 | + color: rgba(56, 56, 56, 1); | ||
217 | +} | ||
218 | + | ||
219 | +.detail_number { | ||
220 | + color: rgba(254, 58, 98, 1); | ||
221 | + margin-top: 10rpx; | ||
222 | + width: 200rpx; | ||
223 | +} | ||
224 | + | ||
225 | +.inp_view3 { | ||
226 | + background-color: rgb(249, 250, 254); | ||
227 | + height: 82rpx; | ||
228 | + width: 228rpx; | ||
229 | + border-radius: 17rpx; | ||
230 | + color: #A6A6A6FF; | ||
231 | +} | ||
232 | +.inp_view4 { | ||
233 | + background-color: rgb(249, 250, 254); | ||
234 | + height: 82rpx; | ||
235 | + width: 250rpx; | ||
236 | + border-radius: 17rpx; | ||
237 | + color: #A6A6A6FF; | ||
238 | +} | ||
239 | +/* 门店数据 */ | ||
240 | +.card_title { | ||
241 | + display: flex; | ||
242 | + align-items: center; | ||
243 | + font-size: 32rpx; | ||
244 | + color: rgba(0, 0, 0, 1); | ||
245 | + height: 37rpx; | ||
246 | + padding: 10rpx 0; | ||
247 | +} | ||
248 | + | ||
249 | +.card_box { | ||
250 | + background: #FFFFFFFF; | ||
251 | + /* width: 750rpx; */ | ||
252 | + width: 100%; | ||
253 | + box-sizing: border-box; | ||
254 | + padding-top: 21rpx; | ||
255 | + margin-top: 10rpx; | ||
256 | + font-size: 24rpx; | ||
257 | + border-radius: 17rpx; | ||
258 | +} | ||
259 | + | ||
260 | +.tiny_box1 { | ||
261 | + display: flex; | ||
262 | + flex-direction: column; | ||
263 | + align-items: center; | ||
264 | + width: 10%; | ||
265 | + margin-left: 10rpx; | ||
266 | +} | ||
267 | +.tiny_box2 { | ||
268 | + display: flex; | ||
269 | + flex-direction: column; | ||
270 | + width: 40%; | ||
271 | +} | ||
272 | +.tiny_box3 { | ||
273 | + display: flex; | ||
274 | + flex-direction: column; | ||
275 | + /* align-items: ; */ | ||
276 | + width: 50%; | ||
277 | +} | ||
278 | +.ellipsis-22 { | ||
279 | + display: -webkit-box; | ||
280 | + overflow: hidden; | ||
281 | + text-overflow: ellipsis; | ||
282 | + display: -webkit-box; | ||
283 | + -webkit-line-clamp: 2; | ||
284 | + -webkit-box-orient: vertical; | ||
285 | + white-space: normal; | ||
286 | + word-break: break-all; | ||
287 | + word-warp: break-word; | ||
288 | +} | ||
289 | + | ||
290 | +.tiny_number { | ||
291 | + color: rgba(254, 58, 98, 1); | ||
292 | + margin-bottom: 10rpx; | ||
293 | + height: 37rpx; | ||
294 | + line-height: 37rpx; | ||
295 | + width: 150rpx; | ||
296 | + text-align: center; | ||
297 | +} | ||
298 | + | ||
299 | +.line2 { | ||
300 | + margin-top: 10rpx; | ||
301 | + width: 2rpx; | ||
302 | + height: 70rpx; | ||
303 | + background: rgba(229, 229, 229, 1); | ||
304 | +} | ||
305 | + | ||
306 | +/* 筛选弹窗 */ | ||
307 | +.pp_title { | ||
308 | + height: 93rpx; | ||
309 | + line-height: 93rpx; | ||
310 | + border-bottom: 1rpx solid #eee; | ||
311 | + | ||
312 | +} | ||
313 | + | ||
314 | +.close_btn { | ||
315 | + width: 40rpx; | ||
316 | + height: 40rpx; | ||
317 | + float: right; | ||
318 | + position: relative; | ||
319 | + top: 20rpx; | ||
320 | + margin-right: 20rpx; | ||
321 | +} | ||
322 | + | ||
323 | +.saixuan_name { | ||
324 | + height: 42rpx; | ||
325 | + line-height: 42rpx; | ||
326 | +} | ||
327 | + | ||
328 | +.inp_view { | ||
329 | + width: 240rpx; | ||
330 | + background-color: rgb(249, 250, 254); | ||
331 | + height: 70rpx; | ||
332 | + border-radius: 11rpx; | ||
333 | + color: rgba(128, 128, 128, 1); | ||
334 | + margin-right: 33rpx; | ||
335 | + margin-left: 12rpx; | ||
336 | +} | ||
337 | + | ||
338 | +.inp_view2 { | ||
339 | + background-color: rgb(249, 250, 254); | ||
340 | + height: 70rpx; | ||
341 | + border-radius: 11rpx; | ||
342 | + color: rgba(128, 128, 128, 1); | ||
343 | +} | ||
344 | + | ||
345 | +.clear_inp { | ||
346 | + position: absolute; | ||
347 | + top: 22rpx; | ||
348 | + right: 0; | ||
349 | +} | ||
350 | + | ||
351 | +.btn_set { | ||
352 | + margin: 20rpx auto; | ||
353 | + width: 95%; | ||
354 | + height: 93rpx; | ||
355 | + border-radius: 20rpx; | ||
356 | + color: #fff; | ||
357 | + line-height: 93rpx; | ||
358 | + background: linear-gradient(180deg, rgba(255, 24, 126, 1) 0%, rgba(255, 89, 64, 1) 100%); | ||
359 | + letter-spacing: 4rpx; | ||
360 | + text-indent: 4rpx; | ||
361 | +} | ||
362 | + | ||
363 | +.line3 { | ||
364 | + height: 1rpx; | ||
365 | + background: rgba(128, 128, 128, 1); | ||
366 | + width: 56rpx; | ||
367 | + margin-right: 14rpx; | ||
368 | +} | ||
369 | + | ||
370 | +/* 商品概况部分 */ | ||
371 | +.search-box .inp { | ||
372 | + background: #F9FAFE; | ||
373 | + height: 82rpx; | ||
374 | + border-radius: 16rpx; | ||
375 | + width: 524rpx; | ||
376 | + color: rgba(166, 166, 166, 1) !important; | ||
377 | + position: relative; | ||
378 | + margin-left: 4rpx; | ||
379 | +} |
packageE/pages/user/slimming/g_filter.wxs
0 → 100644
1 | +//获取样式 | ||
2 | +var toFixTwo = function(val) { | ||
3 | + if (val === undefined) return "-"; | ||
4 | + if (val === null) return "-"; | ||
5 | + if (isNaN(val)) return "-"; | ||
6 | + if (val === '') return "-"; | ||
7 | + if (val === 0) return "-"; | ||
8 | + return parseFloat(parseFloat(val).toFixed(2)) ; | ||
9 | +} | ||
10 | + | ||
11 | +module.exports = { | ||
12 | + toFixTwo: toFixTwo, | ||
13 | + | ||
14 | +} |
packageE/pages/user/slimming/slimming.js
0 → 100644
1 | +var e = getApp(), os = e.globalData.setting; | ||
2 | +var utils = require('../../../../utils/util.js'); | ||
3 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | ||
4 | + | ||
5 | +Page({ | ||
6 | + /** | ||
7 | + * 页面的初始数据 | ||
8 | + */ | ||
9 | + data: { | ||
10 | + | ||
11 | + userInfo:null, | ||
12 | + iurl: os.imghost, | ||
13 | + portrait_list: [], | ||
14 | + loading: 0, | ||
15 | + portrait_req: {}, | ||
16 | + industry:'', | ||
17 | + is_get:0 | ||
18 | + }, | ||
19 | + | ||
20 | + /** | ||
21 | + * 生命周期函数--监听页面加载 | ||
22 | + */ | ||
23 | + onLoad: function (options) { | ||
24 | + var that=this; | ||
25 | + | ||
26 | + this.setData({ | ||
27 | + userInfo: getApp().globalData.userInfo | ||
28 | + }) | ||
29 | + | ||
30 | + | ||
31 | + getApp().getConfig(function (e){ | ||
32 | + that.init_data(); | ||
33 | + }) | ||
34 | + | ||
35 | + | ||
36 | + }, | ||
37 | + /** | ||
38 | + * 生命周期函数--监听页面显示 | ||
39 | + */ | ||
40 | + onShow: async function () { | ||
41 | + | ||
42 | + }, | ||
43 | + | ||
44 | + /** | ||
45 | + * 页面上拉触底事件的处理函数 | ||
46 | + */ | ||
47 | + onReachBottom: function () { | ||
48 | + | ||
49 | + }, | ||
50 | + | ||
51 | + init_data() { | ||
52 | + | ||
53 | + let userInfo = getApp().globalData.userInfo; | ||
54 | + var portrait_req = { | ||
55 | + ApiName:'api.slimming.member.portrait', | ||
56 | + store_id: userInfo.store_id, | ||
57 | + //StaffId: that.idd, | ||
58 | + vipid: userInfo.erpvipid, | ||
59 | + }; | ||
60 | + this.get_service_portrait(portrait_req); | ||
61 | + }, | ||
62 | + | ||
63 | + | ||
64 | + get_service_portrait(portrait_req) { | ||
65 | + | ||
66 | + //var str='{"code":0,"msg":"操作成功!","data":[{"id":"a1ff01bc-b755-4a5c-8675-06b33354d5ec","customerno":"18650904780","customername":"心如水","sex":"女","mobiletel":"18650904780","birthday":"2000-11-23","age":22,"signingdate":"2022-11-22","weightlosscourse":4,"shapecourse":3,"weight":62,"targetweight":30,"subtracted":26,"advisername":"泉州万达纪莉(工号:07)","beautyconsultant":"泉州万达纪莉(工号:07)","diffweight":24,"minweight":100,"ideaweight":92,"tostoreqty":3,"dayweight":102,"previousweight":100,"lastweight":102,"actualweight":22,"ringratioweight":2,"undeduced":10,"standardweight":98}]}'; | ||
67 | + //var res=JSON.parse(str); | ||
68 | + //this.setData({portrait_list: res.data}); | ||
69 | + //return false; | ||
70 | + var that = this; | ||
71 | + if (that.loading) { | ||
72 | + return false; | ||
73 | + } | ||
74 | + that.loading = 1; | ||
75 | + | ||
76 | + if (portrait_req) { | ||
77 | + that.setData({ | ||
78 | + noMore: false, | ||
79 | + portrait_list: [], | ||
80 | + is_get: 0, | ||
81 | + noMore: false | ||
82 | + }) | ||
83 | + | ||
84 | + } else { | ||
85 | + if (that.noMore) { | ||
86 | + that.loading = 0; | ||
87 | + return false; | ||
88 | + } | ||
89 | + portrait_req = that.portrait_req; //如果不是全选的参数,就是page分页+1 | ||
90 | + portrait_req.page++; | ||
91 | + } | ||
92 | + | ||
93 | + //请求参数进行存储 | ||
94 | + that.portrait_req = portrait_req; | ||
95 | + wx.showLoading({ | ||
96 | + title: '加载中' | ||
97 | + }); | ||
98 | + | ||
99 | + console.log(getApp().globalData.config,1111); | ||
100 | + | ||
101 | + | ||
102 | + var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid; | ||
103 | + getApp().request.promiseGet(url, { | ||
104 | + data: portrait_req | ||
105 | + }) | ||
106 | + .then((res) => { | ||
107 | + wx.hideLoading(); | ||
108 | + that.loading = 0; | ||
109 | + | ||
110 | + that.setData({is_get: 1}) | ||
111 | + | ||
112 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { | ||
113 | + | ||
114 | + var list=res.data.data.pageData; | ||
115 | + | ||
116 | + list[0].weight = list[0].weight * 2 | ||
117 | + if (list[0].tostoreqty == 0) { | ||
118 | + list[0].undeduced = list[0].undeduced + list[0].actualweight | ||
119 | + list[0].actualweight = 0 | ||
120 | + list[0].ringratioweight = 0 | ||
121 | + | ||
122 | + } else if (list[0].tostoreqty == 1) { | ||
123 | + list[0].ringratioweight = 0 | ||
124 | + } | ||
125 | + | ||
126 | + that.setData({portrait_list: list}) | ||
127 | + | ||
128 | + } else { | ||
129 | + that.setData({ | ||
130 | + noMore:true | ||
131 | + }) | ||
132 | + } | ||
133 | + }); | ||
134 | + }, | ||
135 | + | ||
136 | + goto:function (e){ | ||
137 | + var url=e.currentTarget.dataset.url; | ||
138 | + getApp().goto(url); | ||
139 | + } | ||
140 | + | ||
141 | + | ||
142 | +}) | ||
0 | \ No newline at end of file | 143 | \ No newline at end of file |
packageE/pages/user/slimming/slimming.json
0 → 100644
packageE/pages/user/slimming/slimming.wxml
0 → 100644
1 | +<wxs module="g_filter" src="g_filter.wxs"></wxs> | ||
2 | +<view class="pd20 fs30" wx:for="{{portrait_list}}"> | ||
3 | + <!-- 上 --> | ||
4 | + <view class="card pd20 flex jc_sb" style="height: 210rpx;box-sizing: border-box;"> | ||
5 | + <image style="margin-right: 26rpx;width: 158rpx;height: 158rpx;border-radius: 50%;" | ||
6 | + src="{{userInfo.head_pic}}"/> | ||
7 | + | ||
8 | + | ||
9 | + <view class="flex mgt10" style="width: 70%;flex-direction: column;"> | ||
10 | + <view class="flex jc_sb fs26 mgb20"> | ||
11 | + <view style="color: #FE3A62;">{{item.customername || '-'}}</view> | ||
12 | + <view style="color: #FE3A62;">{{item.mobiletel || '-'}}</view> | ||
13 | + <view style="color: #FE3A62;" class="flex ai_c">{{item.age || '-'}} | ||
14 | + <view style="color: #383838;">岁 | ||
15 | + </view> | ||
16 | + </view> | ||
17 | + </view> | ||
18 | + <view class="flex fs26 mgb20"> | ||
19 | + <view style="color: #383838;" class="flex ai_c">减重疗程数: | ||
20 | + <view style="color: #FE3A62;"> | ||
21 | + {{item.weightlosscourse || '0'}} | ||
22 | + </view> | ||
23 | + </view> | ||
24 | + <view style="color: #383838;margin-left: 30rpx;" class="flex ai_c">塑身疗程数: | ||
25 | + <view style="color: #FE3A62;">{{item.shapecourse || '0'}}</view> | ||
26 | + </view> | ||
27 | + | ||
28 | + </view> | ||
29 | + <view class="flex fs26 mgb20"> | ||
30 | + <view style="color: #383838;" class="flex ai_c">购买日期: | ||
31 | + <view style="color: #FE3A62;">{{item.signingdate || '-'}}</view> | ||
32 | + </view> | ||
33 | + </view> | ||
34 | + </view> | ||
35 | + </view> | ||
36 | + <!-- 下 --> | ||
37 | + <view class="card mgt20"> | ||
38 | + <view> | ||
39 | + <view class="flex pd20 jc_sb ai_c"> | ||
40 | + <view style="color: #383838;" class="fs32">日常打卡</view> | ||
41 | + <view bindtap="goto" data-url="/packageE/pages/user/punchInhistory/punchInhistory?customerid={{item.id}}&diffweight={{item.diffweight}}&howday={{item.tostoreqty}}&standardweight={{item.ideaweight}}" | ||
42 | + style="border: 1.75rpx solid #FE3A62;border-radius: 88rpx;width: 123rpx;height: 48rpx;color:#FE3A62;line-height: 48rpx;text-align: center;" | ||
43 | + class="fs26">查看全部 | ||
44 | + </view> | ||
45 | + </view> | ||
46 | + | ||
47 | + <view class="flex pd20 jc_sb ai_c" | ||
48 | + style="flex-direction: column;border-bottom: 1rpx solid #F0F0F0;"> | ||
49 | + <view class="flex" style="margin-right:20rpx;"> | ||
50 | + <view wx:if="{{item.dayweight>0 }}" class="ellipsis-2" | ||
51 | + style="color: #FE3A62;font-size: 84rpx;width: 250rpx;text-align: right;margin-left: 40rpx;"> | ||
52 | + {{ g_filter.toFixTwo(item.dayweight ) }} | ||
53 | + </view> | ||
54 | + <view wx:else class="ellipsis-2" | ||
55 | + style="color: #FE3A62;font-size: 84rpx;width: 250rpx;text-align: right;margin-left: 40rpx;margin-right: 50rpx;margin-bottom: 20rpx;"> | ||
56 | + _ _ | ||
57 | + </view> | ||
58 | + <view style="color: #383838;margin-top: 40rpx;" class="fs26">斤</view> | ||
59 | + <view style="width: 30rpx;height: 30rpx;margin-top: 20rpx;padding: 20rpx;" | ||
60 | + bindtap="goto" data-url="/packageE/pages/punchIn/punchIn?mobiletel={{item.mobiletel}}&iswhere=1&gradenames=true&isMy=1"> | ||
61 | + <image :src="imghost+'mdd_img/modigoods.png'" style="width: 30rpx;height: 30rpx;" mode=""></image> | ||
62 | + </view> | ||
63 | + </view> | ||
64 | + <view style="color: #383838;" class="fs26">今日体重</view> | ||
65 | + </view> | ||
66 | +</view> | ||
67 | + | ||
68 | +<view class="flex jc_sa" | ||
69 | + style="height: 160rpx;padding: 20rpx 0;box-sizing: border-box;border-bottom: 1rpx solid #F0F0F0;"> | ||
70 | + <view class="flex txt-center" style="flex-direction: column;width: 33%;"> | ||
71 | + <view class="flex" style="margin-left: 20rpx;"> | ||
72 | + <view style="color: #FE3A62;font-size: 52rpx;width: 60%;text-align: right;" | ||
73 | + class="ellipsis-2">{{g_filter.toFixTwo(item.ringratioweight)}} | ||
74 | + </view> | ||
75 | + <view style="color: #383838;text-align: left;" class="fs26 mgt20">斤</view> | ||
76 | + | ||
77 | + </view> | ||
78 | + <view style="color: #383838;" class="fs26 mgt20">环比重量</view> | ||
79 | + </view> | ||
80 | + <view class="flex txt-center" style="flex-direction: column;width: 33%;"> | ||
81 | + <view class="flex" style="margin-left: 20rpx;"> | ||
82 | + <view style="color: #FE3A62;font-size: 52rpx;width: 60%;text-align: right;" | ||
83 | + class="ellipsis-2">{{ g_filter.toFixTwo(item.actualweight)}} | ||
84 | + </view> | ||
85 | + | ||
86 | + <view style="color: #383838;text-align: left;" class="fs26 mgt20">斤 | ||
87 | + </view> | ||
88 | + </view> | ||
89 | + <view style="color: #383838;" class="fs26 mgt20">实际减重</view> | ||
90 | + </view> | ||
91 | + <view class="flex txt-center" style="flex-direction: column;width: 33%;"> | ||
92 | + <view class="flex" style="margin-left: 20rpx;"> | ||
93 | + <view style="color: #FE3A62;font-size: 52rpx;width: 60%;text-align: right;" | ||
94 | + class="ellipsis-2">{{g_filter.toFixTwo(item.diffweight)}} | ||
95 | + </view> | ||
96 | + | ||
97 | + <view style="color: #383838;text-align: left;" class="fs26 mgt20">斤 | ||
98 | + </view> | ||
99 | + </view> | ||
100 | + <view style="color: #383838;" class="fs26 mgt20">累计减重</view> | ||
101 | + </view> | ||
102 | +</view> | ||
103 | + | ||
104 | +<view class="flex jc_sa" | ||
105 | + style="height: 160rpx;padding: 20rpx 0;box-sizing: border-box;border-bottom: 1rpx solid #F0F0F0;"> | ||
106 | + <view class="flex txt-center" style="flex-direction: column;width: 33%;"> | ||
107 | + <view class="flex" style="margin-left: 20rpx;"> | ||
108 | + <view style="color: #FE3A62;font-size: 52rpx;width: 60%;text-align: right;;" | ||
109 | + class="ellipsis-2">{{item.tostoreqty || '0'}} | ||
110 | + </view> | ||
111 | + <view style="color: #383838;text-align: left;" class="fs26 mgt20">次 | ||
112 | + </view> | ||
113 | + </view> | ||
114 | + <view style="color: #383838;" class="fs26 mgt20">累计到店</view> | ||
115 | + </view> | ||
116 | + <view class="flex txt-center" style="flex-direction: column;width: 33%;"> | ||
117 | + <view class="flex" style="margin-left: 20rpx;"> | ||
118 | + <view style="color: #FE3A62;font-size: 52rpx;width: 60%;text-align: right;" | ||
119 | + class="ellipsis-2">{{ g_filter.toFixTwo(item.undeduced)}} | ||
120 | + </view> | ||
121 | + | ||
122 | + <view style="color: #383838;text-align: left;" class="fs26 mgt20">斤 | ||
123 | + </view> | ||
124 | + </view> | ||
125 | + <view style="color: #383838;" class="fs26 mgt20">未减斤数</view> | ||
126 | + </view> | ||
127 | + <view class="flex txt-center" style="flex-direction: column;width: 33%;"> | ||
128 | + <view class="flex" style="margin-left: 20rpx;"> | ||
129 | + <view style="color: #FE3A62;font-size: 52rpx;width: 60%;text-align: right;" | ||
130 | + class="ellipsis-2">{{g_filter.toFixTwo(item.minweight) }} | ||
131 | + </view> | ||
132 | + <view style="color: #383838;text-align: left;" class="fs26 mgt20">斤</view> | ||
133 | + </view> | ||
134 | + <view style="color: #383838;" class="fs26 mgt20">最低体重</view> | ||
135 | + </view> | ||
136 | +</view> | ||
137 | + | ||
138 | +<view class="flex jc_sa" | ||
139 | + style="height: 68rpx;border-bottom: 1rpx solid #F0F0F0;padding: 20rpx 0;box-sizing: border-box;"> | ||
140 | + <view style="color: #383838;" class="fs26 flex ai_c">初始体重<view style="color: #FE3A62;" | ||
141 | + class="fs26">{{ g_filter.toFixTwo(item.weight) }}</view>斤 | ||
142 | + </view> | ||
143 | + <view style="color: #383838;" class="fs26 flex ai_c">标准体重<view style="color: #FE3A62;" | ||
144 | + class="fs26">{{ g_filter.toFixTwo(item.weight)}}</view>斤 | ||
145 | + </view> | ||
146 | + <view style="color: #383838;" class="fs26 flex ai_c">应减斤数<view style="color: #FE3A62;" | ||
147 | + class="fs26">{{g_filter.toFixTwo(item.weight)}}</view>斤 | ||
148 | + </view> | ||
149 | +</view> | ||
150 | +<view class="flex jc_sb" | ||
151 | + style="height: 68rpx;border-bottom: 1rpx solid #F0F0F0;padding: 20rpx 0;box-sizing: border-box;padding: 0 20rpx;"> | ||
152 | + <view style="color: #383838;line-height: 68rpx;" class="fs26">减重顾问</view> | ||
153 | + <view style="color: #383838;line-height: 68rpx;" class="fs26">{{item.advisername || '-'}}</view> | ||
154 | +</view> | ||
155 | +<view class="flex jc_sb" | ||
156 | + style="height: 68rpx;border-bottom: 1rpx solid #F0F0F0;padding: 20rpx 0;box-sizing: border-box;padding: 0 20rpx;"> | ||
157 | + <view style="color: #383838;line-height: 68rpx;" class="fs26">减重美体师</view> | ||
158 | + <view style="color: #383838;line-height: 68rpx;" class="fs26">{{item.beautyconsultant || '-'}}</view> | ||
159 | +</view> | ||
160 | + | ||
161 | + </view> | ||
162 | + </view> | ||
163 | + | ||
164 | +<nodata class="t-c" wx:if="{{portrait_list.length == 0 && is_get}}"></nodata> | ||
165 | +<view class="noMore" hidden="{{!noMore}}" wx:if="{{portrait_list.length !== 0}}">- 已经到底了 -</view> | ||
166 | + |
packageE/pages/user/slimming/slimming.wxss
0 → 100644
1 | +page{ | ||
2 | + background-color: #f2f2f2; line-height: normal; | ||
3 | +} | ||
4 | + | ||
5 | +.pd20 { | ||
6 | + padding: 20rpx; | ||
7 | +} | ||
8 | +.fs26 { | ||
9 | + font-size: 26rpx; | ||
10 | +} | ||
11 | +.fs28 { | ||
12 | + font-size: 28rpx; | ||
13 | +} | ||
14 | +.fs30 { | ||
15 | + font-size: 30rpx; | ||
16 | +} | ||
17 | +.fs32 { | ||
18 | + font-size: 32rpx; | ||
19 | +} | ||
20 | + | ||
21 | +.mgt20 { | ||
22 | + margin-top: 20rpx !important; | ||
23 | +} | ||
24 | + | ||
25 | +.card { | ||
26 | + background-color: white; | ||
27 | + border-radius: 16rpx; | ||
28 | + overflow: hidden; | ||
29 | +} | ||
30 | +.txt-center{ | ||
31 | + text-align: center; | ||
32 | +} | ||
0 | \ No newline at end of file | 33 | \ No newline at end of file |