|
|
@@ -1,167 +1,610 @@
|
|
1
|
|
-<!DOCTYPE html>
|
|
2
|
|
-<html lang="zh-CN">
|
|
3
|
|
-
|
|
4
|
|
- <head>
|
|
5
|
|
- <meta charset="UTF-8">
|
|
6
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
|
- <title>投诉数据分析</title>
|
|
8
|
|
- <script src="../js/tailwindcss3.4.16.js"></script>
|
|
9
|
|
- <script>
|
|
10
|
|
- tailwind.config = {
|
|
11
|
|
- theme: {
|
|
12
|
|
- extend: {
|
|
13
|
|
- colors: {
|
|
14
|
|
- primary: '#4F46E5',
|
|
15
|
|
- secondary: '#10B981'
|
|
16
|
|
- },
|
|
17
|
|
- borderRadius: {
|
|
18
|
|
- 'none': '0px',
|
|
19
|
|
- 'sm': '2px',
|
|
20
|
|
- DEFAULT: '4px',
|
|
21
|
|
- 'md': '8px',
|
|
22
|
|
- 'lg': '12px',
|
|
23
|
|
- 'xl': '16px',
|
|
24
|
|
- '2xl': '20px',
|
|
25
|
|
- '3xl': '24px',
|
|
26
|
|
- 'full': '9999px',
|
|
27
|
|
- 'button': '4px'
|
|
28
|
|
- }
|
|
|
1
|
+<!DOCTYPE html>
|
|
|
2
|
+<html lang="zh-CN">
|
|
|
3
|
+<head>
|
|
|
4
|
+ <meta charset="UTF-8">
|
|
|
5
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
|
6
|
+ <title>统计报表</title>
|
|
|
7
|
+ <link href="../css/mui.css" rel="stylesheet" />
|
|
|
8
|
+ <script src="../js/tailwindcss3.4.16.js"></script>
|
|
|
9
|
+ <link href="../css/mui.picker.css" rel="stylesheet" />
|
|
|
10
|
+ <link href="../css/mui.poppicker.css" rel="stylesheet" />
|
|
|
11
|
+ <link rel="stylesheet" type="text/css" href="../css/mui.picker.min.css" />
|
|
|
12
|
+ <script>
|
|
|
13
|
+ tailwind.config = {
|
|
|
14
|
+ theme: {
|
|
|
15
|
+ extend: {
|
|
|
16
|
+ colors: {
|
|
|
17
|
+ primary: '#4F46E5',
|
|
|
18
|
+ secondary: '#10B981'
|
|
|
19
|
+ },
|
|
|
20
|
+ borderRadius: {
|
|
|
21
|
+ 'none': '0px',
|
|
|
22
|
+ 'sm': '2px',
|
|
|
23
|
+ DEFAULT: '4px',
|
|
|
24
|
+ 'md': '8px',
|
|
|
25
|
+ 'lg': '12px',
|
|
|
26
|
+ 'xl': '16px',
|
|
|
27
|
+ '2xl': '20px',
|
|
|
28
|
+ '3xl': '24px',
|
|
|
29
|
+ 'full': '9999px',
|
|
|
30
|
+ 'button': '4px'
|
|
29
|
31
|
}
|
|
30
|
32
|
}
|
|
31
|
33
|
}
|
|
32
|
|
- </script>
|
|
33
|
|
- <link rel="stylesheet" href="../css/all.min.css">
|
|
34
|
|
- <script src="../js/echarts.min.js"></script>
|
|
35
|
|
- <style>
|
|
36
|
|
- body {
|
|
37
|
|
- min-height: 100vh;
|
|
38
|
|
- background-color: #F3F4F6;
|
|
39
|
|
- width: 100%;
|
|
40
|
|
- margin: 0 auto;
|
|
41
|
|
- }
|
|
42
|
|
-
|
|
43
|
|
- .container {
|
|
44
|
|
- max-width: 100%;
|
|
45
|
|
- }
|
|
46
|
|
-
|
|
47
|
|
- .chart-container {
|
|
48
|
|
- width: 100%;
|
|
49
|
|
- height: 200px;
|
|
50
|
|
- }
|
|
51
|
|
-
|
|
52
|
|
- .rate-chart {
|
|
53
|
|
- height: 120px;
|
|
54
|
|
- }
|
|
55
|
|
-
|
|
56
|
|
- @media (min-width: 640px) {
|
|
57
|
|
- .container {
|
|
58
|
|
- max-width: 375px;
|
|
59
|
|
- }
|
|
60
|
|
- }
|
|
61
|
|
- </style>
|
|
62
|
|
- </head>
|
|
63
|
|
-
|
|
64
|
|
- <body>
|
|
65
|
|
- <div class="container mx-auto px-4 py-4">
|
|
66
|
|
-
|
|
67
|
|
- <div class="bg-white rounded-lg shadow-sm p-6 mb-6">
|
|
68
|
|
- <div class="flex justify-between items-center mb-4">
|
|
69
|
|
- <h2 class="text-xl font-medium">总投诉数 <span id="total">0</span> / <span name="selectType">周</span></h2>
|
|
70
|
|
- <button class="text-gray-600 hover:text-gray-900" id="changeBut">
|
|
71
|
|
- <span name="selectType">周</span> <i class="fas fa-exchange ml-1"></i>
|
|
72
|
|
- </button>
|
|
|
34
|
+ }
|
|
|
35
|
+ </script>
|
|
|
36
|
+ <link rel="stylesheet" href="../css/all.min.css">
|
|
|
37
|
+ <script src="../js/echarts.min.js"></script>
|
|
|
38
|
+ <style>
|
|
|
39
|
+ * {
|
|
|
40
|
+ margin: 0;
|
|
|
41
|
+ padding: 0;
|
|
|
42
|
+ box-sizing: border-box;
|
|
|
43
|
+ font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
|
44
|
+ }
|
|
|
45
|
+
|
|
|
46
|
+ body {
|
|
|
47
|
+ background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
|
|
|
48
|
+ color: #333;
|
|
|
49
|
+ line-height: 1.6;
|
|
|
50
|
+ min-height: 100vh;
|
|
|
51
|
+ }
|
|
|
52
|
+
|
|
|
53
|
+ .container {
|
|
|
54
|
+ max-width: 100%;
|
|
|
55
|
+ padding: 0 10px;
|
|
|
56
|
+ }
|
|
|
57
|
+
|
|
|
58
|
+ /* 顶部导航 */
|
|
|
59
|
+ .header {
|
|
|
60
|
+ /* background: linear-gradient(to right, #1a73e8, #0d5bb0); */
|
|
|
61
|
+ background-color: #5470C6;
|
|
|
62
|
+ color: white;
|
|
|
63
|
+ padding: 15px 0;
|
|
|
64
|
+ text-align: center;
|
|
|
65
|
+ position: sticky;
|
|
|
66
|
+ top: 0;
|
|
|
67
|
+ z-index: 100;
|
|
|
68
|
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
|
69
|
+ }
|
|
|
70
|
+
|
|
|
71
|
+ .header h1 {
|
|
|
72
|
+ font-size: 1.4rem;
|
|
|
73
|
+ font-weight: 600;
|
|
|
74
|
+ margin-bottom: 15px;
|
|
|
75
|
+ letter-spacing: 0.5px;
|
|
|
76
|
+ }
|
|
|
77
|
+
|
|
|
78
|
+ /* Tab切换 */
|
|
|
79
|
+ .tabs-container {
|
|
|
80
|
+ position: relative;
|
|
|
81
|
+ overflow-x: auto;
|
|
|
82
|
+ -webkit-overflow-scrolling: touch;
|
|
|
83
|
+ white-space: nowrap;
|
|
|
84
|
+ padding: 0 10px;
|
|
|
85
|
+ margin-top: 10px;
|
|
|
86
|
+ scrollbar-width: none;
|
|
|
87
|
+ }
|
|
|
88
|
+
|
|
|
89
|
+ .tabs-container::-webkit-scrollbar {
|
|
|
90
|
+ display: none;
|
|
|
91
|
+ }
|
|
|
92
|
+
|
|
|
93
|
+ .tabs {
|
|
|
94
|
+ display: inline-flex;
|
|
|
95
|
+ gap: 8px;
|
|
|
96
|
+ }
|
|
|
97
|
+
|
|
|
98
|
+ .tab {
|
|
|
99
|
+ background: rgba(255, 255, 255, 0.2);
|
|
|
100
|
+ padding: 8px 16px;
|
|
|
101
|
+ border-radius: 20px;
|
|
|
102
|
+ font-size: 0.9rem;
|
|
|
103
|
+ font-weight: 500;
|
|
|
104
|
+ transition: all 0.3s ease;
|
|
|
105
|
+ }
|
|
|
106
|
+
|
|
|
107
|
+ .tab.active {
|
|
|
108
|
+ background: white;
|
|
|
109
|
+ color: #5470C6;
|
|
|
110
|
+ font-weight: 600;
|
|
|
111
|
+ }
|
|
|
112
|
+
|
|
|
113
|
+ /* 控制区域 */
|
|
|
114
|
+ .controls {
|
|
|
115
|
+ display: flex;
|
|
|
116
|
+ padding: 15px 10px;
|
|
|
117
|
+ gap: 10px;
|
|
|
118
|
+ background: white;
|
|
|
119
|
+ border-bottom: 1px solid #eee;
|
|
|
120
|
+ position: sticky;
|
|
|
121
|
+ top: 78px;
|
|
|
122
|
+ z-index: 90;
|
|
|
123
|
+ }
|
|
|
124
|
+
|
|
|
125
|
+ .date-picker, .search-box {
|
|
|
126
|
+ flex: 1;
|
|
|
127
|
+ padding: 0px 15px;
|
|
|
128
|
+ border-radius: 8px;
|
|
|
129
|
+ border: 1px solid #ddd;
|
|
|
130
|
+ font-size: 0.9rem;
|
|
|
131
|
+ background: #f9f9f9;
|
|
|
132
|
+ }
|
|
|
133
|
+
|
|
|
134
|
+ .search-box {
|
|
|
135
|
+ display: flex;
|
|
|
136
|
+ align-items: center;
|
|
|
137
|
+ gap: 8px;
|
|
|
138
|
+ }
|
|
|
139
|
+
|
|
|
140
|
+ .search-box input {
|
|
|
141
|
+ flex: 1;
|
|
|
142
|
+ border: none;
|
|
|
143
|
+ outline: none;
|
|
|
144
|
+ background: transparent;
|
|
|
145
|
+ font-size: 0.9rem;
|
|
|
146
|
+ }
|
|
|
147
|
+
|
|
|
148
|
+ /* 数据卡片 */
|
|
|
149
|
+ .summary-cards {
|
|
|
150
|
+ display: grid;
|
|
|
151
|
+ grid-template-columns: repeat(2, 1fr);
|
|
|
152
|
+ gap: 12px;
|
|
|
153
|
+ padding: 15px 10px;
|
|
|
154
|
+ }
|
|
|
155
|
+
|
|
|
156
|
+ .card {
|
|
|
157
|
+ background: white;
|
|
|
158
|
+ border-radius: 12px;
|
|
|
159
|
+ padding: 16px;
|
|
|
160
|
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
|
161
|
+ text-align: center;
|
|
|
162
|
+ }
|
|
|
163
|
+
|
|
|
164
|
+ .card-title {
|
|
|
165
|
+ font-size: 0.9rem;
|
|
|
166
|
+ color: #666;
|
|
|
167
|
+ margin-bottom: 8px;
|
|
|
168
|
+ }
|
|
|
169
|
+
|
|
|
170
|
+ .card-value {
|
|
|
171
|
+ font-size: 1.5rem;
|
|
|
172
|
+ font-weight: 700;
|
|
|
173
|
+ color: #1a73e8;
|
|
|
174
|
+ }
|
|
|
175
|
+
|
|
|
176
|
+ .card-change {
|
|
|
177
|
+ font-size: 0.8rem;
|
|
|
178
|
+ margin-top: 4px;
|
|
|
179
|
+ color: #4caf50;
|
|
|
180
|
+ }
|
|
|
181
|
+
|
|
|
182
|
+ .card-change.negative {
|
|
|
183
|
+ color: #f44336;
|
|
|
184
|
+ }
|
|
|
185
|
+
|
|
|
186
|
+ /* 报表区域 */
|
|
|
187
|
+ .report-container {
|
|
|
188
|
+ margin-top: 10px;
|
|
|
189
|
+ background: white;
|
|
|
190
|
+ border-radius: 12px;
|
|
|
191
|
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
|
192
|
+ overflow: hidden;
|
|
|
193
|
+ }
|
|
|
194
|
+
|
|
|
195
|
+ .report-header {
|
|
|
196
|
+ padding: 15px;
|
|
|
197
|
+ display: flex;
|
|
|
198
|
+ justify-content: space-between;
|
|
|
199
|
+ align-items: center;
|
|
|
200
|
+ border-bottom: 1px solid #eee;
|
|
|
201
|
+ position: sticky;
|
|
|
202
|
+ top: 180px;
|
|
|
203
|
+ background: white;
|
|
|
204
|
+ z-index: 80;
|
|
|
205
|
+ }
|
|
|
206
|
+
|
|
|
207
|
+ .report-header h2 {
|
|
|
208
|
+ font-size: 1.1rem;
|
|
|
209
|
+ color: #1a73e8;
|
|
|
210
|
+ }
|
|
|
211
|
+
|
|
|
212
|
+ .export-btn {
|
|
|
213
|
+ background: #e8f0fe;
|
|
|
214
|
+ color: #1a73e8;
|
|
|
215
|
+ border: none;
|
|
|
216
|
+ padding: 8px 15px;
|
|
|
217
|
+ border-radius: 6px;
|
|
|
218
|
+ font-size: 0.9rem;
|
|
|
219
|
+ font-weight: 500;
|
|
|
220
|
+ display: flex;
|
|
|
221
|
+ align-items: center;
|
|
|
222
|
+ gap: 5px;
|
|
|
223
|
+ }
|
|
|
224
|
+
|
|
|
225
|
+ /* 表格样式 */
|
|
|
226
|
+ .table-container {
|
|
|
227
|
+ overflow-x: auto;
|
|
|
228
|
+ -webkit-overflow-scrolling: touch;
|
|
|
229
|
+ }
|
|
|
230
|
+
|
|
|
231
|
+ table {
|
|
|
232
|
+ width: 100%;
|
|
|
233
|
+ border-collapse: collapse;
|
|
|
234
|
+ /* min-width: 700px; */
|
|
|
235
|
+ }
|
|
|
236
|
+
|
|
|
237
|
+ thead {
|
|
|
238
|
+ background-color: #f8f9fa;
|
|
|
239
|
+ /* position: sticky;
|
|
|
240
|
+ top: 230px;
|
|
|
241
|
+ z-index: 70; */
|
|
|
242
|
+ }
|
|
|
243
|
+
|
|
|
244
|
+ th {
|
|
|
245
|
+ padding: 14px 6px;
|
|
|
246
|
+ text-align: center;
|
|
|
247
|
+ font-weight: 600;
|
|
|
248
|
+ color: #444;
|
|
|
249
|
+ font-size: 0.8rem;
|
|
|
250
|
+ border-bottom: 2px solid #eee;
|
|
|
251
|
+ }
|
|
|
252
|
+
|
|
|
253
|
+ td {
|
|
|
254
|
+ padding: 6px;
|
|
|
255
|
+ text-align: center;
|
|
|
256
|
+ border-bottom: 1px solid #eee;
|
|
|
257
|
+ font-size: 0.8rem;
|
|
|
258
|
+ }
|
|
|
259
|
+
|
|
|
260
|
+ tr:last-child td {
|
|
|
261
|
+ border-bottom: none;
|
|
|
262
|
+ }
|
|
|
263
|
+
|
|
|
264
|
+ tr:nth-child(even) {
|
|
|
265
|
+ background-color: #fcfcfc;
|
|
|
266
|
+ }
|
|
|
267
|
+
|
|
|
268
|
+ .completion-rate {
|
|
|
269
|
+ color: #4caf50;
|
|
|
270
|
+ font-weight: 600;
|
|
|
271
|
+ }
|
|
|
272
|
+ /* 响应式调整 */
|
|
|
273
|
+ @media (min-width: 768px) {
|
|
|
274
|
+ .container {
|
|
|
275
|
+ max-width: 768px;
|
|
|
276
|
+ margin: 0 auto;
|
|
|
277
|
+ }
|
|
|
278
|
+
|
|
|
279
|
+ .summary-cards {
|
|
|
280
|
+ grid-template-columns: repeat(4, 1fr);
|
|
|
281
|
+ }
|
|
|
282
|
+
|
|
|
283
|
+ .card {
|
|
|
284
|
+ padding: 20px;
|
|
|
285
|
+ }
|
|
|
286
|
+ }
|
|
|
287
|
+ .chart-container {
|
|
|
288
|
+ width: 100%;
|
|
|
289
|
+ height: 200px;
|
|
|
290
|
+ }
|
|
|
291
|
+
|
|
|
292
|
+ .rate-chart {
|
|
|
293
|
+ height: 120px;
|
|
|
294
|
+ }
|
|
|
295
|
+
|
|
|
296
|
+ .tab_div{
|
|
|
297
|
+ display: none;
|
|
|
298
|
+ }
|
|
|
299
|
+ .submit{
|
|
|
300
|
+ background-color: #5470C6;
|
|
|
301
|
+ border-radius: 5px;
|
|
|
302
|
+ color: #ffffff;
|
|
|
303
|
+ display: inline-block;
|
|
|
304
|
+ padding: 8px;
|
|
|
305
|
+ }
|
|
|
306
|
+ .type_con{
|
|
|
307
|
+ width: 40% !important;
|
|
|
308
|
+ text-align: center !important;
|
|
|
309
|
+ margin: 0 !important;
|
|
|
310
|
+ padding: 0 !important;
|
|
|
311
|
+ }
|
|
|
312
|
+ </style>
|
|
|
313
|
+</head>
|
|
|
314
|
+<body>
|
|
|
315
|
+ <div class="container">
|
|
|
316
|
+ <!-- 顶部标题和Tab -->
|
|
|
317
|
+ <header class="header">
|
|
|
318
|
+ <!-- <h1>统计报表</h1> -->
|
|
|
319
|
+ <div class="tabs-container">
|
|
|
320
|
+ <div class="tabs">
|
|
|
321
|
+ <div class="tab active">投诉报表</div>
|
|
|
322
|
+ <div class="tab">区域分析</div>
|
|
|
323
|
+ </div>
|
|
|
324
|
+ </div>
|
|
|
325
|
+ </header>
|
|
|
326
|
+ <div class="tab_div" style="display: block;">
|
|
|
327
|
+ <div class="container mx-auto px-4 py-4">
|
|
|
328
|
+
|
|
|
329
|
+ <div class="bg-white rounded-lg shadow-sm p-6 mb-6">
|
|
|
330
|
+ <div class="flex justify-between items-center mb-4">
|
|
|
331
|
+ <h2 class="text-xl font-medium">总投诉数 <span id="total">0</span> / <span name="selectType">周</span></h2>
|
|
|
332
|
+ <button class="text-gray-600 hover:text-gray-900" id="changeBut">
|
|
|
333
|
+ <span name="selectType">周</span> <i class="fas fa-exchange ml-1"></i>
|
|
|
334
|
+ </button>
|
|
|
335
|
+ </div>
|
|
|
336
|
+ <div class="flex flex-col gap-4">
|
|
|
337
|
+ <div class="relative w-full h-6 bg-gray-100 rounded-full overflow-hidden">
|
|
|
338
|
+ <div class="absolute left-0 top-0 h-full bg-primary" style="width: 50%;" id="total_rate"></div>
|
|
|
339
|
+ <!--<div class="absolute left-[50%] top-0 h-full bg-gray-300" style="width: 50%;"></div>-->
|
|
|
340
|
+ </div>
|
|
|
341
|
+ <div class="flex items-center justify-between">
|
|
|
342
|
+ <div>
|
|
|
343
|
+ <div class="text-gray-600">三大类投诉数 <span id="thisnumber">0</span></div>
|
|
|
344
|
+ <div class="text-green-500 text-sm mt-1" id="thiscontrast_div">
|
|
|
345
|
+ <i class="fas fa-arrow-up mr-1" id="thiscontrast_i"></i> 较上周 <span id="thiscontrast">0</span>
|
|
|
346
|
+ </div>
|
|
|
347
|
+ </div>
|
|
|
348
|
+ <div>
|
|
|
349
|
+ <div class="text-gray-600">其他投诉数 <span id="otherthisnumber">0</span></div>
|
|
|
350
|
+ <div class="text-red-500 text-sm mt-1" id="othercontrast_div">
|
|
|
351
|
+ <i class="fas fa-arrow-down mr-1" id="othercontrast_i"></i> 较上周 <span id="othercontrast">0</span>
|
|
|
352
|
+ </div>
|
|
|
353
|
+ </div>
|
|
|
354
|
+ </div>
|
|
|
355
|
+ </div>
|
|
|
356
|
+ </div>
|
|
|
357
|
+ <div class="bg-white rounded-lg shadow-sm p-6 mb-6">
|
|
|
358
|
+ <h2 class="text-xl font-medium mb-6">三大类投诉情况</h2>
|
|
|
359
|
+ <div class="flex flex-col lg:flex-row gap-6">
|
|
|
360
|
+ <div id="complaintPie" class="chart-container lg:w-1/2"></div>
|
|
|
361
|
+ <div class="flex flex-col gap-4 lg:w-1/2">
|
|
|
362
|
+ <div class="space-y-2 bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 transition-colors" onclick="highlightPieSection(0, '破袋发霉')">
|
|
|
363
|
+ <div class="flex items-center justify-between">
|
|
|
364
|
+ <div class="flex items-center gap-2">
|
|
|
365
|
+ <div class="w-3 h-3 bg-[#5470c6]"></div>
|
|
|
366
|
+ <span class="text-gray-600">破袋发霉</span>
|
|
|
367
|
+ </div>
|
|
|
368
|
+ <span class="font-medium" id="mustiness">0</span>
|
|
|
369
|
+ </div>
|
|
|
370
|
+ <div class="flex justify-between text-sm">
|
|
|
371
|
+ <span class="text-gray-500">占比 <span id="mustinessRate">0%</span></span>
|
|
|
372
|
+ <span class="text-green-500" id="mustinesscontrast_span"><i class="fas fa-arrow-up mr-1" id="mustinesscontrast_i"></i>较上周 <span id="mustinesscontrast">0</span></span>
|
|
|
373
|
+ </div>
|
|
|
374
|
+ </div>
|
|
|
375
|
+ <div class="space-y-2 bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 transition-colors" onclick="highlightPieSection(1, '杂质异物')">
|
|
|
376
|
+ <div class="flex items-center justify-between">
|
|
|
377
|
+ <div class="flex items-center gap-2">
|
|
|
378
|
+ <div class="w-3 h-3 bg-[#91cc75]"></div>
|
|
|
379
|
+ <span class="text-gray-600">杂质异物</span>
|
|
|
380
|
+ </div>
|
|
|
381
|
+ <span class="font-medium" id="impurity">0</span>
|
|
|
382
|
+ </div>
|
|
|
383
|
+ <div class="flex justify-between text-sm">
|
|
|
384
|
+ <span class="text-gray-500">占比 <span id="impurityRate">0</span></span>
|
|
|
385
|
+ <span class="text-red-500" id="impuritycontrast_span"><i class="fas fa-arrow-down mr-1" id="impuritycontrast_i"></i>较上周 <span id="impuritycontrast">0</span></span>
|
|
|
386
|
+ </div>
|
|
|
387
|
+ </div>
|
|
|
388
|
+ <div class="space-y-2 bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 transition-colors" onclick="highlightPieSection(2, '变质异味')">
|
|
|
389
|
+ <div class="flex items-center justify-between">
|
|
|
390
|
+ <div class="flex items-center gap-2">
|
|
|
391
|
+ <div class="w-3 h-3 bg-[#fac858]"></div>
|
|
|
392
|
+ <span class="text-gray-600">变质异味</span>
|
|
|
393
|
+ </div>
|
|
|
394
|
+ <span class="font-medium" id="gobad">0</span>
|
|
|
395
|
+ </div>
|
|
|
396
|
+ <div class="flex justify-between text-sm">
|
|
|
397
|
+ <span class="text-gray-500">占比 <span id="gobadRate">0</span></span>
|
|
|
398
|
+ <span class="text-green-500" id="gobadcontrast_span"><i class="fas fa-arrow-up mr-1" id="gobadcontrast_i"></i>较上周 <span id="gobadcontrast">0</span></span>
|
|
|
399
|
+ </div>
|
|
|
400
|
+ </div>
|
|
|
401
|
+ </div>
|
|
|
402
|
+ </div>
|
|
|
403
|
+ </div>
|
|
|
404
|
+ <div class="grid grid-cols-2 gap-4 mb-6">
|
|
|
405
|
+ <div class="bg-white rounded-lg shadow-sm p-6">
|
|
|
406
|
+ <h3 class="text-lg font-medium mb-4">接单率</h3>
|
|
|
407
|
+ <div id="acceptanceRate" class="chart-container rate-chart"></div>
|
|
|
408
|
+ </div>
|
|
|
409
|
+ <div class="bg-white rounded-lg shadow-sm p-6">
|
|
|
410
|
+ <h3 class="text-lg font-medium mb-4">完结率</h3>
|
|
|
411
|
+ <div id="completionRate" class="chart-container rate-chart"></div>
|
|
|
412
|
+ </div>
|
|
|
413
|
+ </div>
|
|
|
414
|
+ <div class="bg-white rounded-lg shadow-sm p-6">
|
|
|
415
|
+ <h2 class="text-xl font-medium mb-6">三大类投诉趋势</h2>
|
|
|
416
|
+ <div id="trendLine" class="chart-container"></div>
|
|
|
417
|
+ </div>
|
|
|
418
|
+
|
|
|
419
|
+ </div>
|
|
|
420
|
+ </div>
|
|
|
421
|
+
|
|
|
422
|
+ <div class="tab_div" style="display: none;">
|
|
|
423
|
+ <!-- 控制区域 -->
|
|
|
424
|
+ <div class="controls">
|
|
|
425
|
+ <div class="search-box">
|
|
|
426
|
+ <i class="fas fa-search"></i>
|
|
|
427
|
+
|
|
|
428
|
+ <input type="text" id='start_data' data-options='{"type":"date","beginYear":2010,"endYear":2023}' class="ui-alert type_con btn" data-index="" readonly="readonly" placeholder="开始日期" />
|
|
|
429
|
+ 至
|
|
|
430
|
+ <input type="text" id='end_data' data-options='{"type":"date","beginYear":2010,"endYear":2023}' class="ui-alert type_con btn1" data-index="" readonly="readonly" placeholder="结束日期" />
|
|
|
431
|
+
|
|
73
|
432
|
</div>
|
|
74
|
|
- <div class="flex flex-col gap-4">
|
|
75
|
|
- <div class="relative w-full h-6 bg-gray-100 rounded-full overflow-hidden">
|
|
76
|
|
- <div class="absolute left-0 top-0 h-full bg-primary" style="width: 50%;" id="total_rate"></div>
|
|
77
|
|
- <!--<div class="absolute left-[50%] top-0 h-full bg-gray-300" style="width: 50%;"></div>-->
|
|
78
|
|
- </div>
|
|
79
|
|
- <div class="flex items-center justify-between">
|
|
80
|
|
- <div>
|
|
81
|
|
- <div class="text-gray-600">三大类投诉数 <span id="thisnumber">0</span></div>
|
|
82
|
|
- <div class="text-green-500 text-sm mt-1" id="thiscontrast_div">
|
|
83
|
|
- <i class="fas fa-arrow-up mr-1" id="thiscontrast_i"></i> 较上周 <span id="thiscontrast">0</span>
|
|
84
|
|
- </div>
|
|
|
433
|
+ <button type="button" class="submit">查询</button>
|
|
|
434
|
+ <!-- <div></div> -->
|
|
|
435
|
+ <!-- <ul class="mui-table-view">
|
|
|
436
|
+ <li class="mui-table-view-cell btn" data-options='{"type":"date","beginYear":2010,"endYear":2023}'>
|
|
|
437
|
+ <div class="mui-input-row">
|
|
|
438
|
+ <label class="label">开始日期:</label>
|
|
|
439
|
+
|
|
|
440
|
+ <a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
|
|
85
|
441
|
</div>
|
|
86
|
|
- <div>
|
|
87
|
|
- <div class="text-gray-600">其他投诉数 <span id="otherthisnumber">0</span></div>
|
|
88
|
|
- <div class="text-red-500 text-sm mt-1" id="othercontrast_div">
|
|
89
|
|
- <i class="fas fa-arrow-down mr-1" id="othercontrast_i"></i> 较上周 <span id="othercontrast">0</span>
|
|
90
|
|
- </div>
|
|
|
442
|
+ </li>
|
|
|
443
|
+ <li class="mui-table-view-cell btn1" data-options='{"type":"date","beginYear":2010,"endYear":2023}'>
|
|
|
444
|
+ <div class="mui-input-row">
|
|
|
445
|
+ <label class="label">结束日期:</label>
|
|
|
446
|
+ <input type="text" id='end_data' class="ui-alert type_con size-14" data-index="" readonly="readonly" />
|
|
|
447
|
+ <a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
|
|
91
|
448
|
</div>
|
|
92
|
|
- </div>
|
|
93
|
|
- </div>
|
|
|
449
|
+ </li>
|
|
|
450
|
+ </ul> -->
|
|
94
|
451
|
</div>
|
|
95
|
|
- <div class="bg-white rounded-lg shadow-sm p-6 mb-6">
|
|
96
|
|
- <h2 class="text-xl font-medium mb-6">三大类投诉情况</h2>
|
|
97
|
|
- <div class="flex flex-col lg:flex-row gap-6">
|
|
98
|
|
- <div id="complaintPie" class="chart-container lg:w-1/2"></div>
|
|
99
|
|
- <div class="flex flex-col gap-4 lg:w-1/2">
|
|
100
|
|
- <div class="space-y-2 bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 transition-colors" onclick="highlightPieSection(0, '破袋发霉')">
|
|
101
|
|
- <div class="flex items-center justify-between">
|
|
102
|
|
- <div class="flex items-center gap-2">
|
|
103
|
|
- <div class="w-3 h-3 bg-[#5470c6]"></div>
|
|
104
|
|
- <span class="text-gray-600">破袋发霉</span>
|
|
105
|
|
- </div>
|
|
106
|
|
- <span class="font-medium" id="mustiness">0</span>
|
|
107
|
|
- </div>
|
|
108
|
|
- <div class="flex justify-between text-sm">
|
|
109
|
|
- <span class="text-gray-500">占比 <span id="mustinessRate">0%</span></span>
|
|
110
|
|
- <span class="text-green-500" id="mustinesscontrast_span"><i class="fas fa-arrow-up mr-1" id="mustinesscontrast_i"></i>较上周 <span id="mustinesscontrast">0</span></span>
|
|
111
|
|
- </div>
|
|
112
|
|
- </div>
|
|
113
|
|
- <div class="space-y-2 bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 transition-colors" onclick="highlightPieSection(1, '杂质异物')">
|
|
114
|
|
- <div class="flex items-center justify-between">
|
|
115
|
|
- <div class="flex items-center gap-2">
|
|
116
|
|
- <div class="w-3 h-3 bg-[#91cc75]"></div>
|
|
117
|
|
- <span class="text-gray-600">杂质异物</span>
|
|
118
|
|
- </div>
|
|
119
|
|
- <span class="font-medium" id="impurity">0</span>
|
|
120
|
|
- </div>
|
|
121
|
|
- <div class="flex justify-between text-sm">
|
|
122
|
|
- <span class="text-gray-500">占比 <span id="impurityRate">0</span></span>
|
|
123
|
|
- <span class="text-red-500" id="impuritycontrast_span"><i class="fas fa-arrow-down mr-1" id="impuritycontrast_i"></i>较上周 <span id="impuritycontrast">0</span></span>
|
|
124
|
|
- </div>
|
|
125
|
|
- </div>
|
|
126
|
|
- <div class="space-y-2 bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 transition-colors" onclick="highlightPieSection(2, '变质异味')">
|
|
127
|
|
- <div class="flex items-center justify-between">
|
|
128
|
|
- <div class="flex items-center gap-2">
|
|
129
|
|
- <div class="w-3 h-3 bg-[#fac858]"></div>
|
|
130
|
|
- <span class="text-gray-600">变质异味</span>
|
|
131
|
|
- </div>
|
|
132
|
|
- <span class="font-medium" id="gobad">0</span>
|
|
133
|
|
- </div>
|
|
134
|
|
- <div class="flex justify-between text-sm">
|
|
135
|
|
- <span class="text-gray-500">占比 <span id="gobadRate">0</span></span>
|
|
136
|
|
- <span class="text-green-500" id="gobadcontrast_span"><i class="fas fa-arrow-up mr-1" id="gobadcontrast_i"></i>较上周 <span id="gobadcontrast">0</span></span>
|
|
137
|
|
- </div>
|
|
138
|
|
- </div>
|
|
139
|
|
- </div>
|
|
140
|
|
- </div>
|
|
141
|
|
- </div>
|
|
142
|
|
- <div class="grid grid-cols-2 gap-4 mb-6">
|
|
143
|
|
- <div class="bg-white rounded-lg shadow-sm p-6">
|
|
144
|
|
- <h3 class="text-lg font-medium mb-4">接单率</h3>
|
|
145
|
|
- <div id="acceptanceRate" class="chart-container rate-chart"></div>
|
|
146
|
|
- </div>
|
|
147
|
|
- <div class="bg-white rounded-lg shadow-sm p-6">
|
|
148
|
|
- <h3 class="text-lg font-medium mb-4">完结率</h3>
|
|
149
|
|
- <div id="completionRate" class="chart-container rate-chart"></div>
|
|
150
|
|
- </div>
|
|
151
|
|
- </div>
|
|
152
|
|
- <div class="bg-white rounded-lg shadow-sm p-6">
|
|
153
|
|
- <h2 class="text-xl font-medium mb-6">三大类投诉趋势</h2>
|
|
154
|
|
- <div id="trendLine" class="chart-container"></div>
|
|
|
452
|
+
|
|
|
453
|
+ <!-- 数据概览卡片 -->
|
|
|
454
|
+ <!-- <div class="summary-cards"></div> -->
|
|
|
455
|
+
|
|
|
456
|
+ <!-- 报表区域 -->
|
|
|
457
|
+ <div class="report-container">
|
|
|
458
|
+ <!-- <div class="report-header">
|
|
|
459
|
+ <h2>大区工单统计明细</h2>
|
|
|
460
|
+ <button class="export-btn">
|
|
|
461
|
+ <i class="fas fa-download"></i> 导出
|
|
|
462
|
+ </button>
|
|
|
463
|
+ </div> -->
|
|
|
464
|
+ <div class="table-container">
|
|
|
465
|
+ <table id="workOrderTable">
|
|
|
466
|
+ <thead>
|
|
|
467
|
+ <tr>
|
|
|
468
|
+ <th>序号</th>
|
|
|
469
|
+ <th>大区</th>
|
|
|
470
|
+ <th>工单总数</th>
|
|
|
471
|
+ <th>处理中</th>
|
|
|
472
|
+ <th>已完结</th>
|
|
|
473
|
+ <th>完结率</th>
|
|
|
474
|
+ </tr>
|
|
|
475
|
+ </thead>
|
|
|
476
|
+ <tbody></tbody>
|
|
|
477
|
+ </table>
|
|
|
478
|
+ </div>
|
|
|
479
|
+
|
|
155
|
480
|
</div>
|
|
156
|
481
|
</div>
|
|
157
|
|
-
|
|
158
|
|
- <script src="../js/mui.min.js?"></script>
|
|
159
|
|
- <script src="../js/mui.poppicker.js"></script>
|
|
160
|
|
- <script src="../js/mui.picker.min.js"></script>
|
|
161
|
|
- <script src="../js/zepto.js"></script>
|
|
162
|
|
- <script src="../js/huayi.config.js"></script>
|
|
163
|
|
- <script src="js/index.js"></script>
|
|
164
|
|
-
|
|
165
|
|
- </body>
|
|
166
|
|
-
|
|
|
482
|
+
|
|
|
483
|
+
|
|
|
484
|
+
|
|
|
485
|
+
|
|
|
486
|
+ </div>
|
|
|
487
|
+
|
|
|
488
|
+ <script src="../js/mui.min.js?"></script>
|
|
|
489
|
+ <script src="../js/mui.poppicker.js"></script>
|
|
|
490
|
+ <script src="../js/mui.picker.min.js"></script>
|
|
|
491
|
+ <script src="../js/zepto.js"></script>
|
|
|
492
|
+ <script src="../js/jquery.min.js"></script>
|
|
|
493
|
+ <script src="../js/mui.poppicker.js"></script>
|
|
|
494
|
+ <script src="../js/mui.picker.min.js"></script>
|
|
|
495
|
+ <script src="../js/huayi.config.js"></script>
|
|
|
496
|
+ <script src="js/index.js"></script>
|
|
|
497
|
+
|
|
|
498
|
+ <script>
|
|
|
499
|
+ // Tab切换功能
|
|
|
500
|
+ const tabs = document.querySelectorAll('.tab');
|
|
|
501
|
+ var token = localStorage.getItem("token");
|
|
|
502
|
+ tabs.forEach((tab,index) => {
|
|
|
503
|
+ tab.addEventListener('click', () => {
|
|
|
504
|
+ tabs.forEach(t => t.classList.remove('active'));
|
|
|
505
|
+ tab.classList.add('active');
|
|
|
506
|
+ $('.tab_div').hide();
|
|
|
507
|
+ $('.tab_div').eq(index).fadeIn();
|
|
|
508
|
+ });
|
|
|
509
|
+ });
|
|
|
510
|
+ $(document).ready(function(){
|
|
|
511
|
+ // 获取当前日期
|
|
|
512
|
+ const today = new Date();
|
|
|
513
|
+ // 获取本月1号
|
|
|
514
|
+ const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
|
|
|
515
|
+ $("#start_data").val(formatDate(firstDayOfMonth))
|
|
|
516
|
+ $("#end_data").val(formatDate(today))
|
|
|
517
|
+ getAPPAfterprogress()
|
|
|
518
|
+ })
|
|
|
519
|
+ $(".submit").click(function(){
|
|
|
520
|
+ getAPPAfterprogress()
|
|
|
521
|
+ })
|
|
|
522
|
+ // 格式化日期为 "年-月-日" 格式
|
|
|
523
|
+ function formatDate(date) {
|
|
|
524
|
+ const year = date.getFullYear();
|
|
|
525
|
+ // 月份从0开始,需要加1
|
|
|
526
|
+ const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
|
527
|
+ const day = String(date.getDate()).padStart(2, '0');
|
|
|
528
|
+ return `${year}-${month}-${day}`;
|
|
|
529
|
+ }
|
|
|
530
|
+ function getAPPAfterprogress() {
|
|
|
531
|
+
|
|
|
532
|
+ $.ajax({
|
|
|
533
|
+ url:huayi.config.callcenter_url + 'Business/APPAfterprogress',
|
|
|
534
|
+ data: {
|
|
|
535
|
+ token: token,
|
|
|
536
|
+ stime:$("#start_data").val(),
|
|
|
537
|
+ endtime:$("#end_data").val()
|
|
|
538
|
+ },
|
|
|
539
|
+ dataType: 'json', //服务器返回json格式数据
|
|
|
540
|
+ crossDomain: true,
|
|
|
541
|
+ type: 'get', //HTTP请求类型
|
|
|
542
|
+ timeout: 10000, //超时时间设置为10秒;
|
|
|
543
|
+ headers: {
|
|
|
544
|
+ 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
|
|
|
545
|
+ },
|
|
|
546
|
+ success: function(data) {
|
|
|
547
|
+ if(data.state === "success"){
|
|
|
548
|
+ var resultData = JSON.parse(data.data).aftersalelist
|
|
|
549
|
+ // 获取表格tbody元素
|
|
|
550
|
+ const tableBody = $('#workOrderTable tbody');
|
|
|
551
|
+ tableBody.html('')
|
|
|
552
|
+ $('.summary-cards').html('')
|
|
|
553
|
+ // 遍历数据数组,动态生成表格行
|
|
|
554
|
+ // $.each(resultData, function(index, item) {});
|
|
|
555
|
+ for(var i = 0; i <resultData.length; i++) {
|
|
|
556
|
+ // 创建表格行
|
|
|
557
|
+ const row = $('<tr>');
|
|
|
558
|
+ // 添加表格单元格
|
|
|
559
|
+ row.append(`<td>${resultData[i].serialnumbe}</td>`); // 序号(索引+1)
|
|
|
560
|
+ row.append(`<td>${resultData[i].area}</td>`);
|
|
|
561
|
+ row.append(`<td>${resultData[i].total}</td>`);
|
|
|
562
|
+ row.append(`<td>${resultData[i].processingnumber}</td>`);
|
|
|
563
|
+ row.append(`<td>${resultData[i].processednumber}</td>`);
|
|
|
564
|
+ row.append(`<td class="completion-rate">${resultData[i].processedrate}</td>`);
|
|
|
565
|
+ // if(resultData[i].serialnumbe === '合计'){
|
|
|
566
|
+ // $('<div class="card"><div class="card-title">工单总数</div><div class="card-value">'+resultData[i].total+'</div></div>'+
|
|
|
567
|
+ // '<div class="card"><div class="card-title">处理中</div><div class="card-value">'+resultData[i].processingnumber+'</div></div>'+
|
|
|
568
|
+ // '<div class="card"><div class="card-title">已完结</div><div class="card-value">'+resultData[i].processednumber+'</div></div>'+
|
|
|
569
|
+ // '<div class="card"><div class="card-title">平均完结率</div><div class="card-value">'+resultData[i].processedrate+'</div></div>').appendTo('.summary-cards');
|
|
|
570
|
+ // }
|
|
|
571
|
+ // 将行添加到tbody
|
|
|
572
|
+ tableBody.append(row);
|
|
|
573
|
+ }
|
|
|
574
|
+ // for(var i = 0; i<resultData.length; i++) {
|
|
|
575
|
+ // $('<tr>' +
|
|
|
576
|
+ // '<td>'+resultData[i].serialnumbe+'</td>' +
|
|
|
577
|
+ // '<td>'+resultData[i].serialnumbe+'</td>' +
|
|
|
578
|
+ // '<td>'+resultData[i].serialnumbe+'</td>' +
|
|
|
579
|
+ // '<td>'+resultData[i].serialnumbe+'</td>' +
|
|
|
580
|
+ // '<td>'+resultData[i].serialnumbe+'</td>' +
|
|
|
581
|
+ // '<td>'+resultData[i].serialnumbe+'</td>' +
|
|
|
582
|
+ // '</tr>').appendTo('#workOrderTable tbody');
|
|
|
583
|
+ // }
|
|
|
584
|
+ }
|
|
|
585
|
+
|
|
|
586
|
+ },
|
|
|
587
|
+ error: function(xhr, type, errorThrown) {
|
|
|
588
|
+ //异常处理;
|
|
|
589
|
+ }
|
|
|
590
|
+ })
|
|
|
591
|
+ }
|
|
|
592
|
+
|
|
|
593
|
+ // 搜索功能
|
|
|
594
|
+ // const searchInput = document.querySelector('.search-box input');
|
|
|
595
|
+ // searchInput.addEventListener('input', function() {
|
|
|
596
|
+ // const searchTerm = this.value.toLowerCase();
|
|
|
597
|
+ // const rows = document.querySelectorAll('tbody tr');
|
|
|
598
|
+
|
|
|
599
|
+ // rows.forEach(row => {
|
|
|
600
|
+ // const region = row.cells[1].textContent.toLowerCase();
|
|
|
601
|
+ // if (region.includes(searchTerm)) {
|
|
|
602
|
+ // row.style.display = '';
|
|
|
603
|
+ // } else {
|
|
|
604
|
+ // row.style.display = 'none';
|
|
|
605
|
+ // }
|
|
|
606
|
+ // });
|
|
|
607
|
+ // });
|
|
|
608
|
+ </script>
|
|
|
609
|
+</body>
|
|
167
|
610
|
</html>
|