29608708
李宇
增加unia-app和html
|
1
2
3
4
5
6
7
8
9
|
<template>
<view class="container">
<!-- 加载效果遮罩层 -->
<view class="loading-overlay" v-if="isLoading">
<view class="loading-content">
<view class="loading-spinner"></view>
<view class="loading-text">{{ loadingText }}</view>
</view>
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
10
|
|
29608708
李宇
增加unia-app和html
|
11
12
|
<!-- 状态栏占位 -->
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
13
|
|
29608708
李宇
增加unia-app和html
|
14
15
|
<!-- 头部区域 -->
<view class="header">
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<view class="header-content">
<view style="height: 100rpx;"></view>
<view class="header-title">绿纤协同办公平台</view>
<view class="header-subtitle">高效协同,移动办公</view>
<view class="info-section">
<view class="info-item">
<text class="info-label">门店:</text>
<text class="info-value">{{ jsjinfo && jsjinfo.storeName?jsjinfo.storeName:'暂无'}}</text>
</view>
<view class="info-item">
<text class="info-label">本月金三角:</text>
<text class="info-value">{{ jsjinfo && jsjinfo.jsjName?jsjinfo.jsjName:'暂无'}}</text>
</view>
|
29608708
李宇
增加unia-app和html
|
29
|
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
30
|
<!-- <view class="header-illustration">
|
29608708
李宇
增加unia-app和html
|
31
32
|
<u-icon name="clock" size="60" color="#fff" opacity="0.3"></u-icon>
</view> -->
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
33
|
</view>
|
29608708
李宇
增加unia-app和html
|
34
|
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
35
|
|
29608708
李宇
增加unia-app和html
|
36
37
|
<!-- 统计卡片 -->
<view class="summary-card">
|
a856ffdc
李宇
```
|
38
|
<view v-if="iskjb" class="summary-item" @click="goToPage('/pages/expansion-list/expansion-list')">
|
29608708
李宇
增加unia-app和html
|
39
40
41
|
<view class="num">{{ summaryData.expansionCount || 0 }}</view>
<view class="label">拓客数</view>
</view>
|
a856ffdc
李宇
```
|
42
|
<view v-if="iskjb" class="summary-item" @click="goToPage('/pages/user-invite-list/user-invite-list')">
|
29608708
李宇
增加unia-app和html
|
43
44
45
|
<view class="num">{{ summaryData.inviteCount || 0 }}</view>
<view class="label">邀约数</view>
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
46
47
|
<view v-if="iskjb" class="summary-item"
@click="goToPage('/pages/user-appointment-list/user-appointment-list')">
|
29608708
李宇
增加unia-app和html
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
<view class="num">{{ summaryData.appointmentCount || 0 }}</view>
<view class="label">预约数</view>
</view>
<view class="summary-item" @click="goToPage('/pages/lx-list/lx-list')">
<view class="num">{{ summaryData.hkCount || 0 }}</view>
<view class="label">开单数</view>
</view>
<view class="summary-item" @click="goToPage('/pages/consume-list/consume-list')">
<view class="num">{{ summaryData.consumeCount || 0 }}</view>
<view class="label">耗卡数</view>
</view>
<view class="summary-item" @click="goToPage('/pages/refund-list/refund-list')">
<view class="num">{{ summaryData.refundCount || 0 }}</view>
<view class="label">退卡数</view>
</view>
</view>
<!-- 功能区域 -->
<view class="section-title">常用功能</view>
<view class="func-card">
<view class="icon-grid">
|
9854a774
李宇
最新
|
68
|
<view v-if="iskjb" class="icon-btn" @click="goToPage('/pagesA/lx/lx')">
|
29608708
李宇
增加unia-app和html
|
69
70
71
72
73
|
<view class="icon">
<u-icon name="list" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">开单</view>
</view>
|
9854a774
李宇
最新
|
74
|
<view v-if="iskjb" class="icon-btn" @click="goToPage('/pagesA/lx/lx?type=1')">
|
29608708
李宇
增加unia-app和html
|
75
76
77
78
79
|
<view class="icon">
<u-icon name="list" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">活动开单</view>
</view>
|
9854a774
李宇
最新
|
80
|
<view v-if="iskjb" class="icon-btn" @click="goToPage('/pagesA/member-consume/member-consume')">
|
29608708
李宇
增加unia-app和html
|
81
82
83
84
85
|
<view class="icon">
<u-icon name="minus-square-fill" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">耗卡</view>
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
86
|
|
9854a774
李宇
最新
|
87
|
<view v-if="iskjb" class="icon-btn" @click="goToPage('/pagesA/refund/refund')">
|
29608708
李宇
增加unia-app和html
|
88
89
90
91
92
|
<view class="icon">
<u-icon name="minus-circle" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">退卡</view>
</view>
|
a856ffdc
李宇
```
|
93
|
<view v-if="iskjb" class="icon-btn" @click="goToPage('/pages/transferCard/transferCard')">
|
29608708
李宇
增加unia-app和html
|
94
95
96
97
98
|
<view class="icon">
<u-icon name="minus-circle" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">转卡</view>
</view>
|
a856ffdc
李宇
```
|
99
|
<view v-if="iskjb" class="icon-btn" @click="goToPage('/pages/member-create/member-create')">
|
29608708
李宇
增加unia-app和html
|
100
101
102
103
104
|
<view class="icon">
<u-icon name="file-text" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">建档</view>
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
105
|
|
29608708
李宇
增加unia-app和html
|
106
107
108
109
110
111
|
<view class="icon-btn" @click="goToPage('/pages/clue-list/clue-list')">
<view class="icon">
<u-icon name="account" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">会员</view>
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
112
|
|
a856ffdc
李宇
```
|
113
|
<view v-if="iskjb" class="icon-btn" @click="goToPage('/pages/expansion/expansion')">
|
29608708
李宇
增加unia-app和html
|
114
115
116
117
118
|
<view class="icon">
<u-icon name="man-add" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">拓客</view>
</view>
|
9854a774
李宇
最新
|
119
|
<view v-if="iskjb" class="icon-btn" @click="goToPage('/pagesA/lx/lx?time=2025-10-01')">
|
6137a4e4
李宇
```
|
120
121
122
123
124
|
<view class="icon">
<u-icon name="list" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">鼎轩开单</view>
</view>
|
50f29afc
李宇
build(antis-ncc-a...
|
125
126
127
128
129
130
131
132
133
134
135
136
|
<view class="icon-btn" @click="goToPage('/pages/purchase-list/purchase-list')">
<view class="icon">
<u-icon name="shopping-cart" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">物品购买</view>
</view>
<view class="icon-btn" @click="goToPage('/pages/reimbursement-list/reimbursement-list')">
<view class="icon">
<u-icon name="rmb-circle" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">报销申请</view>
</view>
|
18ca819c
李宇
最新
|
137
|
<view v-if="newuserInfo.gw == '董事长' || newuserInfo.gw == '总裁' || newuserInfo.gw == '总经理' || newuserInfo.gw == '主管' || newuserInfo.mobilePhone == '18884847552' || newuserInfo.mobilePhone == '17882512738' || newuserInfo.mobilePhone == '18588888888'" class="icon-btn" @click="goToPage('/pages/reimbursement-audit-list/reimbursement-audit-list')">
|
6137a4e4
李宇
```
|
138
139
140
141
142
|
<view class="icon">
<u-icon name="rmb-circle" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">报销审核</view>
</view>
|
1138c09e
李宇
feat(LqLaundryFlo...
|
143
144
145
146
147
148
149
150
151
152
153
154
|
<view class="icon-btn" @click="goToPage('/pages/usage-list/usage-list')">
<view class="icon">
<u-icon name="list-dot" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">使用记录</view>
</view>
<view class="icon-btn" @click="goToPage('/pages/laundry-flow-list/laundry-flow-list')">
<view class="icon">
<u-icon name="list-dot" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">毛巾记录</view>
</view>
|
c6224cb7
李宇
最新
|
155
|
<view v-if="newuserInfo.mobilePhone == '18382415096' || newuserInfo.mobilePhone == '19938623860' || newuserInfo.mobilePhone == '18588888888'" class="icon-btn" @click="goToPage('/pages/store-list/store-list')">
|
ffd6aaca
李宇
最新
|
156
157
158
159
160
|
<view class="icon">
<u-icon name="star" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">门店管理</view>
</view>
|
29608708
李宇
增加unia-app和html
|
161
162
163
164
165
166
|
<view class="icon-btn" @click="goToPage('/pages/web/web')">
<view class="icon">
<u-icon name="kefu-ermai" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">AI问答</view>
</view>
|
9854a774
李宇
最新
|
167
|
<view class="icon-btn" @click="goToPage('/pagesA/dailyReport/dailyReport')" v-if="showReport">
|
29608708
李宇
增加unia-app和html
|
168
169
170
171
172
|
<view class="icon">
<u-icon name="bookmark" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">报表</view>
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
173
|
|
29608708
李宇
增加unia-app和html
|
174
175
176
177
178
179
180
181
182
|
<view class="icon-btn" @click="handleLogout">
<view class="icon">
<u-icon name="arrow-rightward" size="32" color="#43a047"></u-icon>
</view>
<view class="icon-label">退出</view>
</view>
</view>
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
183
184
185
186
187
188
189
|
<!-- 业绩数据板块 -->
<view class="section-title">业绩数据</view>
<view class="performance-card" v-if="newuserInfo.gw == '科技老师'">
<view class="performance-row">
<view class="performance-item highlight">
<view class="performance-value">¥{{ (performanceData.OrderAchievement || 0).toFixed(2) }}</view>
<view class="performance-label">开卡业绩</view>
|
29608708
李宇
增加unia-app和html
|
190
|
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
191
192
193
|
<view class="performance-item highlight">
<view class="performance-value">¥{{ (performanceData.ConsumeAchievement || 0).toFixed(2) }}</view>
<view class="performance-label">消耗业绩</view>
|
29608708
李宇
增加unia-app和html
|
194
|
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
195
|
<view class="performance-item highlight">
|
cad1ab95
李宇
根据您提供的信息,我注意到code...
|
196
|
<view class="performance-value">{{ (performanceData.ConsumeProjectCount || 0).toFixed(2) }}</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
197
|
<view class="performance-label">项目数</view>
|
29608708
李宇
增加unia-app和html
|
198
|
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
199
|
<view class="performance-item highlight">
|
cad1ab95
李宇
根据您提供的信息,我注意到code...
|
200
|
<view class="performance-value">¥{{ performanceData.ConsumeLaborCost || 0 }}</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
201
|
<view class="performance-label">手工</view>
|
8906253c
李宇
1
|
202
|
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
203
204
205
|
</view>
</view>
<view class="performance-card" v-else>
|
29608708
李宇
增加unia-app和html
|
206
207
208
209
210
211
212
213
214
|
<view class="performance-row">
<view class="performance-item highlight">
<view class="performance-value">¥{{ (performanceData.BillingAmount || 0).toFixed(2) }}</view>
<view class="performance-label">开单金额</view>
</view>
<view class="performance-item highlight">
<view class="performance-value">¥{{ (performanceData.ConsumeAmount || 0).toFixed(2) }}</view>
<view class="performance-label">消耗金额</view>
</view>
|
29608708
李宇
增加unia-app和html
|
215
216
217
218
|
<view class="performance-item highlight">
<view class="performance-value">¥{{ (performanceData.RefundAmount || 0).toFixed(2) }}</view>
<view class="performance-label">退卡金额</view>
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
219
220
|
<view class="performance-item highlight">
<view class="performance-value">{{ performanceData.ConsumeProjectCount || 0 }}</view>
|
29608708
李宇
增加unia-app和html
|
221
222
|
<view class="performance-label">项目数</view>
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
223
224
|
</view>
<view class="performance-row">
|
29608708
李宇
增加unia-app和html
|
225
226
227
228
229
230
231
232
|
<view class="performance-item">
<view class="performance-value">{{ performanceData.HeadCount || 0 }}</view>
<view class="performance-label">人头</view>
</view>
<view class="performance-item">
<view class="performance-value">{{ performanceData.PersonCount || 0 }}</view>
<view class="performance-label">人次</view>
</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
233
|
<view class="performance-item">
|
cad1ab95
李宇
根据您提供的信息,我注意到code...
|
234
|
<view class="performance-value">¥{{ performanceData.LaborCost || 0 }}</view>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
235
236
|
<view class="performance-label">手工费</view>
</view>
|
29608708
李宇
增加unia-app和html
|
237
238
|
</view>
</view>
|
29608708
李宇
增加unia-app和html
|
239
240
241
242
|
</view>
</template>
<script>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
243
244
245
246
247
248
249
|
import {
mapState,
mapMutations
} from 'vuex'
import memberApi from '@/apis/modules/member.js'
import performanceApi from '@/apis/modules/performance.js'
export default {
|
29608708
李宇
增加unia-app和html
|
250
|
data() {
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
return {
newuserInfo: {
},
statusBarHeight: 0,
isLoading: false,
loadingText: '加载中...',
summaryData: {
appointmentCount: 0,
inviteCount: 0,
expansionCount: 0,
refundCount: 0
},
userInfo: {},
jsjinfo: null,
performanceData: {
InvitationCount: 0,
InviteCount: 0,
AppointmentCount: 0,
BillingCount: 0,
BillingAmount: 0,
ConsumeCount: 0,
ConsumeAmount: 0,
RefundCount: 0,
RefundAmount: 0,
HeadCount: 0,
PersonCount: 0
|
29608708
李宇
增加unia-app和html
|
278
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
279
|
}
|
29608708
李宇
增加unia-app和html
|
280
|
},
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
281
282
283
284
285
|
computed: {
iskjb() {
if (this.newuserInfo.gw == '科技老师') {
return false
|
29608708
李宇
增加unia-app和html
|
286
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
287
288
289
290
291
292
293
|
return true
},
// 根据用户权限显示报表按钮
showReport() {
if (!this.userInfo || !this.userInfo.userAccount) return false
const adminAccounts = ['admin', '13198568627', '18884847552', '13608016021', '18628973287']
return adminAccounts.includes(this.userInfo.userAccount)
|
29608708
李宇
增加unia-app和html
|
294
295
|
}
},
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
296
297
298
299
300
301
|
async onLoad() {
// this.getSystemInfo()
this.showLoading('加载中...')
this.checkLoginStatus()
await this.int()
|
29608708
李宇
增加unia-app和html
|
302
|
},
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
303
304
305
306
|
async onShow() {
|
29608708
李宇
增加unia-app和html
|
307
|
},
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
308
309
310
311
312
313
314
|
methods: {
int() {
this.API.getUsers(this.userInfo.userId).then(res => {
console.error(res)
if (res.code === 200) {
this.newuserInfo = res.data
|
86ade5ce
李宇
报表
|
315
316
317
318
319
320
321
322
323
324
325
326
327
328
|
if(this.newuserInfo.enabledMark != '1'){
uni.showToast({
title: '您的账号已被禁用',
icon: 'none'
})
// 清除本地存储
uni.clearStorageSync()
// 跳转到登录页
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/login'
})
}, 1500)
} else{
|
86ade5ce
李宇
报表
|
329
|
let formattedDate = this.utils.gettime();
|
86ade5ce
李宇
报表
|
330
331
332
333
334
335
336
337
338
339
|
memberApi.getJsjInfoByUserMonth(this.userInfo.userId, formattedDate).then((resjsj) => {
console.error(resjsj)
if (resjsj.code == 200) {
this.jsjinfo = resjsj.data
}
})
uni.setStorageSync('newuserInfo', this.newuserInfo)
this.getSummaryData()
this.getPerformanceData()
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
|
}
})
},
// 获取系统信息
getSystemInfo() {
uni.getSystemInfo({
success: (res) => {
this.statusBarHeight = res.statusBarHeight
}
})
},
// 检查登录状态
checkLoginStatus() {
const token = uni.getStorageSync('token')
if (!token) {
uni.reLaunch({
url: '/pages/login/login'
})
return
} else {
this.userInfo = uni.getStorageSync('userInfo');
}
},
// 显示加载效果
showLoading(text = '加载中...') {
this.isLoading = true
this.loadingText = text
},
// 隐藏加载效果
hideLoading() {
this.isLoading = false
},
// 获取统计数据
async getSummaryData() {
try {
|
0f14a621
李宇
最新
|
380
|
const currentMonthRange = this.utils.getCurrentMonthRange()
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
381
382
383
|
if (this.iskjb) {
let yyinfo = {
pageSize: 1,
|
6137a4e4
李宇
```
|
384
|
currentPage:1,
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
|
yysj: `${currentMonthRange[0]},${currentMonthRange[1]}`
}
let yayinfo = {
pageSize: 1,
yysj: `${currentMonthRange[0]},${currentMonthRange[1]}`
}
let tkinfo = {
pageSize: 1,
expansionTime: `${currentMonthRange[0]},${currentMonthRange[1]}`
}
if (this.newuserInfo.gw == '店助' || this.newuserInfo.gw == '店长') {
yyinfo.djmd = this.newuserInfo.mdid || '暂无'
yayinfo.storeId = this.newuserInfo.mdid || '暂无'
tkinfo.storeId = this.newuserInfo.mdid || '暂无'
} else {
yyinfo.yyr = this.userInfo.userId
yayinfo.yyr = this.userInfo.userId
tkinfo.expansionUserId = this.userInfo.userId
}
// 获取预约数
const appointmentRes = await this.API.getAppointmentList(yyinfo)
if (appointmentRes.code === 200) {
this.summaryData.appointmentCount = appointmentRes.data.pagination?.total || 0
}
// 获取邀请数
const inviteRes = await this.API.getInviteList(yayinfo)
if (inviteRes.code === 200) {
this.summaryData.inviteCount = inviteRes.data.pagination?.total || 0
}
// 获取拓客数
const expansionRes = await this.API.getExpansionList(tkinfo)
if (expansionRes.code === 200) {
this.summaryData.expansionCount = expansionRes.data.pagination?.total || 0
}
}
let kainfo = {
|
a856ffdc
李宇
```
|
426
|
pageSize: 1,
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
427
|
kdrq: `${currentMonthRange[0]},${currentMonthRange[1]}`
|
a856ffdc
李宇
```
|
428
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
429
|
let hkinfo = {
|
a856ffdc
李宇
```
|
430
|
pageSize: 1,
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
431
|
hksj: `${currentMonthRange[0]},${currentMonthRange[1]}`
|
a856ffdc
李宇
```
|
432
|
}
|
6137a4e4
李宇
```
|
433
|
let tkinfonew = {
|
a856ffdc
李宇
```
|
434
|
pageSize: 1,
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
435
|
tksj: `${currentMonthRange[0]},${currentMonthRange[1]}`
|
a856ffdc
李宇
```
|
436
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
437
438
439
|
if (this.newuserInfo.gw == '科技老师') {
kainfo.kjblsId = this.userInfo.userId
hkinfo.kjblsId = this.userInfo.userId
|
6137a4e4
李宇
```
|
440
|
tkinfonew.kjblsId = this.userInfo.userId
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
441
442
443
|
} else if (this.newuserInfo.gw == '健康师') {
kainfo.jksId = this.userInfo.userId
hkinfo.jksId = this.userInfo.userId
|
6137a4e4
李宇
```
|
444
|
tkinfonew.jksId = this.userInfo.userId
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
445
446
447
|
} else if (this.newuserInfo.gw == '店助' || this.newuserInfo.gw == '店长') {
kainfo.djmd = this.newuserInfo.mdid || '暂无'
hkinfo.md = this.newuserInfo.mdid || '暂无'
|
6137a4e4
李宇
```
|
448
|
tkinfonew.md = this.newuserInfo.mdid || '暂无'
|
a856ffdc
李宇
```
|
449
|
} else {
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
450
451
|
kainfo.CreateUser = this.userInfo.userId
hkinfo.czry = this.userInfo.userId
|
6137a4e4
李宇
```
|
452
|
tkinfonew.czry = this.userInfo.userId
|
a856ffdc
李宇
```
|
453
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
454
455
456
457
458
|
// 获取开单数(本月)
const hkRes = await this.API.getLxList(kainfo)
if (hkRes.code === 200) {
this.summaryData.hkCount = hkRes.data.pagination?.total || 0
|
a856ffdc
李宇
```
|
459
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
460
461
462
463
464
465
|
// 获取耗卡数
const consumeRes = await this.API.getConsumeList(hkinfo)
if (consumeRes.code === 200) {
this.summaryData.consumeCount = consumeRes.data.pagination?.total || 0
|
a856ffdc
李宇
```
|
466
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
467
468
|
// 获取退卡数
|
6137a4e4
李宇
```
|
469
|
const refundRes = await this.API.getRefundList(tkinfonew)
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
470
471
472
|
if (refundRes.code === 200) {
this.summaryData.refundCount = refundRes.data.pagination?.total || 0
|
29608708
李宇
增加unia-app和html
|
473
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
474
475
476
477
478
|
} catch (error) {
console.error('获取统计数据失败:', error)
} finally {
this.hideLoading()
|
29608708
李宇
增加unia-app和html
|
479
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
|
},
// 页面跳转
goToPage(url) {
uni.navigateTo({
url: url
})
},
// 退出登录
handleLogout() {
uni.showModal({
title: '提示',
content: '确定要退出登录吗?',
success: (res) => {
if (res.confirm) {
this.API.logout().then(res => {
if (res.code == 200) {
// 清除本地存储
uni.clearStorageSync()
// 跳转到登录页
uni.reLaunch({
url: '/pages/login/login'
})
}
})
}
|
a856ffdc
李宇
```
|
507
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
508
509
510
|
})
},
|
0f14a621
李宇
最新
|
511
|
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
512
513
514
|
// 获取当前月份字符串(格式:YYYYMM)
getCurrentMonthStr() {
const now = new Date()
|
0f14a621
李宇
最新
|
515
516
|
console.error(uni.$u.timeFormat(now,'yyyymm'))
return uni.$u.timeFormat(now,'yyyymm')
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
517
|
},
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
518
519
520
|
// 格式化日期为 ISO 8601 格式(YYYY-MM-DDTHH:mm:ss)
formatDateToISO(timestamp) {
const date = new Date(timestamp)
|
0f14a621
李宇
最新
|
521
522
|
console.error(uni.$u.timeFormat(date,'yyyy-mm-dd hh:MM:ss'))
return uni.$u.timeFormat(date,'yyyy-mm-dd hh:MM:ss')
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
523
524
525
526
527
528
|
},
// 获取业绩数据
async getPerformanceData() {
try {
const statisticsMonth = this.getCurrentMonthStr()
|
0f14a621
李宇
最新
|
529
|
const currentMonthRange = this.utils.getCurrentMonthRange()
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
|
if (this.newuserInfo.gw == '科技老师') {
const res = await performanceApi.GetTechTeacherStatistics({
teacherId: this.userInfo.userId,
startDate: this.formatDateToISO(currentMonthRange[0]),
endDate: this.formatDateToISO(currentMonthRange[1])
})
if (res.code === 200 && res.data) {
this.performanceData = res.data.length>0?res.data[0]:{}
console.error({
...this.performanceData
})
}
} else {
const res = await performanceApi.getEmployeePerformanceStatistics({
userId: this.userInfo.userId,
statisticsMonth: statisticsMonth
})
if (res.code === 200 && res.data) {
this.performanceData = res.data
}
|
a856ffdc
李宇
```
|
550
|
}
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
551
552
553
|
} catch (error) {
console.error('获取业绩数据失败:', error)
|
29608708
李宇
增加unia-app和html
|
554
|
}
|
29608708
李宇
增加unia-app和html
|
555
556
557
|
}
}
}
|
29608708
李宇
增加unia-app和html
|
558
559
560
|
</script>
<style lang="scss" scoped>
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
|
.container {
min-height: 100vh;
background: #e8f5e9;
}
.status-bar {
background: linear-gradient(120deg, #43e97b 0%, #38f9d7 100%);
}
.header {
background: linear-gradient(120deg, #43e97b 0%, #38f9d7 100%);
padding: 32rpx 0 48rpx 0;
position: relative;
box-shadow: 0 4rpx 24rpx 0 rgba(67, 233, 123, 0.08);
}
.header-content {
text-align: center;
padding: 0 40rpx;
}
.header-title {
color: #fff;
font-size: 36rpx;
font-weight: bold;
letter-spacing: 4rpx;
margin-bottom: 16rpx;
}
.header-subtitle {
color: #e0f2f1;
font-size: 28rpx;
margin-bottom: 32rpx;
font-weight: 500;
}
.info-section {
background: rgba(255, 255, 255, 0.15);
border-radius: 16rpx;
padding: 24rpx 32rpx;
margin: 0 auto;
max-width: 600rpx;
backdrop-filter: blur(10rpx);
}
.info-item {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16rpx;
}
.info-item:last-child {
margin-bottom: 0;
}
.info-label {
color: #e0f2f1;
font-size: 26rpx;
font-weight: 500;
}
.info-value {
color: #fff;
font-size: 26rpx;
font-weight: 600;
text-align: right;
flex: 1;
margin-left: 16rpx;
}
.header-illustration {
width: 120rpx;
height: 120rpx;
margin: 0 auto;
background: rgba(255, 255, 255, 0.12);
border-radius: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
.summary-card {
background: #fff;
border-radius: 28rpx;
box-shadow: 0 4rpx 24rpx 0 rgba(67, 233, 123, 0.08);
margin: -36rpx 40rpx 36rpx 40rpx;
display: flex;
justify-content: space-between;
padding: 28rpx 20rpx;
position: relative;
z-index: 2;
}
.summary-item {
flex: 1;
text-align: center;
color: #388e3c;
cursor: pointer;
}
.summary-item .num {
font-size: 36rpx;
font-weight: bold;
color: #43a047;
margin-bottom: 4rpx;
display: block;
}
.summary-item .label {
font-size: 24rpx;
color: #6a9c6a;
}
.section-title {
margin: 0 40rpx 16rpx 40rpx;
font-size: 32rpx;
color: #388e3c;
font-weight: bold;
letter-spacing: 2rpx;
}
.func-card {
background: #fff;
|
f5e13247
李宇
最新
|
685
686
|
border-radius: 20rpx;
padding: 32rpx 24rpx;
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
687
688
689
690
691
|
margin: 0 40rpx 36rpx 40rpx;
}
.icon-grid {
display: grid;
|
f5e13247
李宇
最新
|
692
693
|
grid-template-columns: repeat(4, 1fr);
gap: 24rpx;
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
694
|
width: 100%;
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
695
696
697
698
699
700
701
|
}
.icon-btn {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
|
f5e13247
李宇
最新
|
702
|
// background: #f5f5f5;
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
703
|
background: linear-gradient(135deg, #e8f5e9 60%, #c8e6c9 100%);
|
f5e13247
李宇
最新
|
704
705
706
|
border-radius: 16rpx;
padding: 24rpx 12rpx;
transition: all 0.2s;
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
707
708
709
|
}
.icon-btn:active {
|
f5e13247
李宇
最新
|
710
711
|
background: #e8e8e8;
transform: scale(0.98);
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
712
713
714
|
}
.icon {
|
f5e13247
李宇
最新
|
715
716
|
width: 56rpx;
height: 56rpx;
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
717
718
719
720
721
722
723
|
margin-bottom: 12rpx;
display: flex;
align-items: center;
justify-content: center;
}
.icon-label {
|
f5e13247
李宇
最新
|
724
725
726
|
font-size: 24rpx;
color: #333;
text-align: center;
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
727
|
color: #388e3c;
|
0102df95
李宇
feat(lqTkjlb): 优化...
|
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
|
}
/* 加载效果样式 */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.95);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
backdrop-filter: blur(4px);
}
.loading-content {
text-align: center;
}
.loading-spinner {
width: 60rpx;
height: 60rpx;
border: 4rpx solid #e8f5e9;
border-top: 4rpx solid #43a047;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto;
}
.loading-text {
margin-top: 20rpx;
color: #388e3c;
font-size: 32rpx;
font-weight: 500;
text-align: center;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* 业绩数据板块样式 */
.performance-card {
background: #fff;
border-radius: 28rpx;
box-shadow: 0 4rpx 24rpx 0 rgba(67, 233, 123, 0.08);
padding: 32rpx 24rpx;
margin: 0 40rpx 36rpx 40rpx;
}
.performance-row {
display: flex;
justify-content: space-between;
margin-bottom: 24rpx;
}
.performance-row:last-child {
margin-bottom: 0;
}
.performance-item {
flex: 1;
text-align: center;
padding: 16rpx 8rpx;
background: linear-gradient(135deg, #e8f5e9 60%, #c8e6c9 100%);
border-radius: 20rpx;
margin: 0 8rpx;
box-shadow: 0 2rpx 8rpx rgba(67, 233, 123, 0.1);
}
.performance-item.highlight {
background: linear-gradient(135deg, #fff3e0 60%, #ffe0b2 100%);
box-shadow: 0 2rpx 8rpx rgba(255, 152, 0, 0.2);
}
.performance-value {
font-size: 32rpx;
font-weight: bold;
color: #43a047;
margin-bottom: 8rpx;
}
.performance-item.highlight .performance-value {
color: #f57c00;
}
.performance-label {
font-size: 22rpx;
color: #6a9c6a;
}
.performance-item.highlight .performance-label {
color: #e65100;
}
</style>
|