quanwei
2 days ago 73b874c72ad55eb9eef21c36160ac0de58f0189e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
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
380
381
382
383
384
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
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
<template>
  <!--
        作者:luoyiming
        时间:2019-10-24
        描述:后台系统首页
    -->
  <div class="home" v-loading="loading">
    <div class="operation-wrap" style="background-color: #FFFFFF;">
      <el-row>
        <el-col :span="6" class="d-c-c">
          <div class="grid-content blue">
            <div class="info">
              <h3>{{top_data.supplier_total}}</h3>
              <p>账户余额</p>
            </div>
          </div>
        </el-col>
        <el-col :span="6" class="d-c-c">
          <div class="grid-content yellow">
            <div class="info">
              <h3>{{top_data.user_total}}</h3>
              <p>门店总量</p>
            </div>
          </div>
        </el-col>
        <el-col :span="6" class="d-c-c">
          <div class="grid-content  purple">
            <div class="info">
              <h3>{{top_data.product_total}}</h3>
              <p>客户</p>
            </div>
          </div>
        </el-col>
        <el-col :span="6" class="d-c-c">
          <div class="grid-content orderred">
            <div class="info ">
              <h3>{{top_data.order_total}}</h3>
              <p>下级代理商</p>
            </div>
          </div>
        </el-col>
      </el-row>
    </div>
 
    <div class="home-index">
      <!--main-index-->
      <div class="flex-1">
        <div class="main-index">
          <div class="common-form mt16" style="font-size: 18px;">
            今日概况
          </div>
          <el-row class="border-b-l">
            <el-col :span="6">
              <div class="grid-content">
                <div class="info t-c">
                  <p class="des">余额变动(元)</p>
                  <h3>{{today_data.order_total_price.tday}}</h3>
                  <p class="yesterday">昨日:{{today_data.order_total_price.ytd}}</p>
                </div>
              </div>
            </el-col>
            <el-col :span="4">
              <div class="grid-content">
                <div class="info">
                  <p class="des">支付订单数--</p>
                  <h3>{{today_data.order_total.tday}}</h3>
                  <p class="yesterday">昨日:{{today_data.order_total.ytd}}</p>
                </div>
              </div>
            </el-col>
            <el-col :span="4">
              <div class="grid-content">
                <div class="info">
                  <p class="des">新增门店数</p>
                  <h3>{{today_data.new_user_total.tday}}</h3>
                  <p class="yesterday">昨日:{{today_data.new_user_total.ytd}}</p>
                </div>
              </div>
            </el-col>
            <el-col :span="4">
              <div class="grid-content">
                <div class="info">
                  <p class="des">新增客户</p>
                  <h3>{{today_data.new_supplier_total.tday}}</h3>
                  <p class="yesterday">昨日:{{today_data.new_supplier_total.ytd}}</p>
                </div>
              </div>
            </el-col>
            <el-col :span="4">
              <div class="grid-content">
                <div class="info">
                  <p class="des">客户申请--</p>
                  <h3>{{today_data.apply_supplier_total.tday}}</h3>
                  <p class="yesterday">昨日:{{today_data.apply_supplier_total.ytd}}</p>
                </div>
              </div>
            </el-col>
          </el-row>
          <div>
            <!-- <Transaction v-if="!loading"></Transaction> -->
          </div>
        </div>
      </div>
 
      <!--待办事项-->
      <div class="matters-wrap">
        <div class="common-form mt16" style="font-size: 18px;">
          待办事项<span class="ml10 f14 gray" style="font-weight: normal;">请尽快处理,以免影响营业</span>
        </div>
        <el-row class="matters_box">
          <el-col :span="24">
            <div class="matters">
              <div class="box ">
                <div class="title">订单</div>
                <ul class="matters_item">
                  <li><span class="fb">{{wait_data.order.plate}}</span>平台维权数量</li>
                  <li><span class="fb">{{wait_data.order.disposal}}</span>待处理订单</li>
                  <li><span class="fb">{{wait_data.order.refund}}</span>待售后订单</li>
                </ul>
              </div>
            </div>
          </el-col>
          <!-- <el-col :span="24">
            <div class="matters">
              <div class="box ">
                <div class="title">分销商</div>
                <ul class="matters_item">
                  <li><span class="fb">{{wait_data.agent.apply}}</span>入驻审核</li>
                  <li><span class="fb">{{wait_data.agent.cash_apply}}</span>提现审核</li>
                  <li><span class="fb">{{wait_data.agent.cash_money}}</span>待打款</li>
                </ul>
              </div>
            </div>
          </el-col>
          <el-col :span="24">
            <div class="matters">
              <div class="box ">
                <div class="title">商户</div>
                <ul class="matters_item">
                  <li><span class="fb">{{wait_data.supplier.apply}}</span>入驻审核</li>
                  <li><span class="fb">{{wait_data.supplier.cash_apply}}</span>提现打款</li>
                  <li><span class="fb">{{wait_data.supplier.cash_money}}</span>提现审核</li>
                  <li><span class="fb">{{wait_data.supplier.refund}}</span>退出审核</li>
                  <li><span class="fb">{{wait_data.supplier.service}}</span>服务保障审核</li>
                </ul>
              </div>
            </div>
          </el-col> -->
          <!-- <el-col :span="24">
            <div class="matters">
              <div class="box ">
                <div class="title">活动待审核</div>
                <ul class="matters_item">
                  <li><span class="fb">{{wait_data.activity.point}}</span>积分商城</li>
                  <li><span class="fb">{{wait_data.activity.seckill}}</span>秒杀活动</li>
                  <li><span class="fb">{{wait_data.activity.bargain}}</span>限时砍价</li>
                  <li><span class="fb">{{wait_data.activity.assemble}}</span>限时拼团</li>
                </ul>
              </div>
            </div>
          </el-col>
          <el-col :span="24">
            <div class="matters">
              <div class="box ">
                <div class="title">商品待审核</div>
                <ul class="matters_item">
                  <li><span class="fb">{{wait_data.audit.product}}</span>商品审核</li>
                  <li><span class="fb">{{wait_data.audit.comment}}</span>评价审核</li>
                </ul>
              </div>
            </div>
          </el-col> -->
        </el-row>
      </div>
 
    </div>
 
  </div>
 
</template>
 
<script>
//  import Transaction from '@/views/home/part/Transaction.vue';
  import { delCookie, getCookie } from '@/utils/base.js';
  // import UserApi from '@/api/user.js';
  import IndexApi from '@/api/index.js';
  export default {
    // components: {
    //   Transaction,
    // },
    data() {
      return {
        username:'',
        version:'',
 
        /*是否加载完成*/
        loading: true,
        /*统计信息*/
        top_data: [],
        /*待办事项*/
        wait_data: {
          order: {},
          agent: {},
          supplier: {},
          activity: {},
          audit: {},
        },
        /*今日数据*/
        today_data: {
          order_total_price: {},
          order_total: {},
          new_user_total: {},
          new_supplier_total: {},
          apply_supplier_total: {}
        }
      };
    },
    created() {
      /*获取登录用户名*/
      this.username= getCookie('userinfo');
      /*获取数据*/
      //this.getTableList();
      /*获取数据*/
      this.getData();
    },
      methods: {
      /*获取数据*/
      getData() {
        let self = this;
        IndexApi.getCount([self.username],true)
        .then(data => {
          self.loading = false;
          self.top_data = data.data.data.top_data;
          self.wait_data = data.data.data.wait_data;
          self.today_data = data.data.data.today_data;
        })
        .catch(error => {
 
        });
      },
 
 
        // /*获取数据*/
        //   getTableList() {
        //       let self = this;
        //       let Params = {};
        //       UserApi.getVersion(Params, true).then(data => {
        //         debugger;
        //               self.loading = false;
        //               self.version=data.data.version;
        //           })
        //           .catch(error => {
        //               self.loading = false;
        //           });
        //   },
      }
  }
</script>
 
<style lang="scss" scoped>
  .operation-wrap {
    width: 100%;
    height: 164px;
    border-radius: 8px;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 0 20px;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    background-size: 100% 100%;
    color: #ffffff;
  }
 
  .operation-wrap .grid-content h3 {
    font-size: 36px;
    line-height: 40px;
  }
 
  .operation-wrap .grid-content .info {
    text-align: center;
    margin-left: 10px;
  }
 
  .home .operation-wrap .grid-content {
    width: 90%;
    height: 150px;
    justify-content: flex-start;
    align-items: center;
    padding-left: 23px;
  }
 
  .operation-wrap .grid-content.blue {
    background: url(../../../static/imgs/total_shop.png) no-repeat;
    background-size: 100% 100%;
  }
 
  .operation-wrap .grid-content.yellow {
    background: url(../../../static/imgs/total_user.png) no-repeat;
    background-size: 100% 100%;
  }
 
  .operation-wrap .grid-content.purple {
    background: url(../../../static/imgs/total_volume.png) no-repeat;
    background-size: 100% 100%;
  }
 
  .operation-wrap .grid-content.orderred {
    background: url(../../../static/imgs/total_order.png) no-repeat;
    background-size: 100% 100%;
  }
 
  .operation-wrap .grid-content .info h3 {
    font-size: 40px;
    line-height: 40px;
    color: #FFFFFF;
    text-align: left;
    margin-bottom: 20px;
  }
 
  .operation-wrap .grid-content .info {
    margin-left: 10px;
    text-align: center;
    font-size: 14px;
    color: #FFFFFF;
  }
 
  .operation-wrap .grid-content .svg-icon {
    color: rgba(255, 255, 255, .3);
    font-size: 300%;
  }
 
  .home-index {
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    min-width: 1000px;
    overflow-x: auto;
  }
 
  .main-index {
    flex: 1;
    margin: 20px;
  }
 
  .main-index .grid-content,
  .operation-wrap .grid-content {
 
    display: -ms-flexbox;
    display: flex;
    -webkit-box-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
 
  .main-index .grid-content {
    height: 120px;
  }
 
  .main-index .grid-content .pic {
    margin-right: 10px;
  }
 
  .main-index .grid-content h3 {
    font-size: 20px;
    font-weight: normal;
  }
 
  .main-index .grid-content .yesterday {
    color: #ccc;
  }
 
  .main-index .grid-content .svg-icon {
    color: #3a8ee6;
  }
 
  .matters-wrap {
    padding-bottom: 15px;
    width: 40%;
  }
 
  .matters .box {
    width: 100%;
  }
 
  .matters-wrap .matters {
    display: -ms-flexbox;
    display: flex;
    -webkit-box-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    // height: 120px;
    margin-bottom: 30px;
  }
 
  .matters-wrap .matters .title {
    font-size: 16px;
    color: #333333;
    display: inline-block;
    height: 20px;
    line-height: 0;
    padding: 11px;
    text-align: center;
    margin-bottom: 20px;
  }
 
  .matters-wrap .matters ul {
    color: #999999;
  }
 
  .matters-wrap .matters ul span {
    padding-right: 6px;
    color: #3a8ee6;
  }
 
  .border-b {
    display: flex;
    flex-direction: column;
  }
 
  .border-b-l {
    flex-direction: initial;
  }
 
  .matters_item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
 
  .matters_item li {
    width: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-right: 16px;
  }
 
  .grid-content .info h3 {
    font-weight: bold;
    color: #5d75e3;
    text-align: center;
  }
 
  .grid-content .info .des {
    font-size: 16px;
    margin-bottom: 6px;
  }
 
  .grid-content .info .yesterday {
    font-size: 13px;
    text-align: center;
  }
 
  .matters_box {
    width: 90%;
    border-top: 1px solid #d9d9d9;
    padding-top: 20px;
  }
 
  .matters-wrap .matters_item li .fb {
    font-size: 16px;
    color: #5d75e3;
  }
</style>