123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <template>
- <div id="index">
- <el-row>
- <el-col :span="24" class="main animate__animated animate__backInRight">
- <el-col :span="24" class="two">
- <el-col :span="24">
- <el-col :span="5">
- <el-card class="box-card" @click.native="toUrl('notPay')">
- <el-col :span="8">
- <i class="icon_1 el-icon-box"></i>
- </el-col>
- <el-col :span="12" class="title">
- <p>
- <span>{{ data.notPay }}</span
- >(单)
- </p>
- <p>未付款数</p>
- </el-col>
- </el-card>
- </el-col>
- <el-col :span="5">
- <el-card class="box-card" @click.native="toUrl('notSend')">
- <el-col :span="8">
- <i class="icon_2 el-icon-truck"></i>
- </el-col>
- <el-col :span="12" class="title">
- <p>
- <span>{{ data.notSend }}</span
- >(单)
- </p>
- <p>未发货数</p>
- </el-col>
- </el-card>
- </el-col>
- <el-col :span="5">
- <el-card class="box-card" @click.native="toUrl('notDealAfterSale')">
- <el-col :span="8">
- <i class="icon_3 el-icon-sell"></i>
- </el-col>
- <el-col :span="12" class="title">
- <p>
- <span>{{ data.notDealAfterSale }}</span
- >(单)
- </p>
- <p>未处理售后数</p>
- </el-col>
- </el-card>
- </el-col>
- <el-col :span="5">
- <el-card class="box-card">
- <el-col :span="8">
- <i class="icon_4 el-icon-price-tag"></i>
- </el-col>
- <el-col :span="12" class="title">
- <p>
- <span>{{ data.stockWarning }}</span
- >(单)
- </p>
- <p>库存警告</p>
- </el-col>
- </el-card>
- </el-col>
- </el-col>
- <el-col :span="11">
- <el-card class="box-card" @click.native="toUrl('sMarkOrder')"><card-1 :list="data.sMarkOrder"></card-1></el-card>
- </el-col>
- <el-col :span="11">
- <el-card class="box-card" @click.native="toUrl('sAfterSale')"><card-2 :list="data.sAfterSale"></card-2></el-card>
- </el-col>
- <el-col :span="11" style="display: none">
- <el-card class="box-card"><card-3></card-3> </el-card>
- </el-col>
- <el-col :span="11" style="display: none">
- <el-card class="box-card"><card-4></card-4></el-card>
- </el-col>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import * as echarts from 'echarts';
- import { mapState, createNamespacedHelpers } from 'vuex';
- const { mapActions } = createNamespacedHelpers('todo');
- export default {
- name: 'index',
- props: {},
- components: {
- card1: () => import('./parts/card-1.vue'),
- card2: () => import('./parts/card-2.vue'),
- card3: () => import('./parts/card-3.vue'),
- card4: () => import('./parts/card-4.vue'),
- },
- data: function () {
- return {
- data: {},
- };
- },
- computed: {
- ...mapState(['user']),
- },
- mounted() {},
- async created() {
- await this.search();
- },
- methods: {
- ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
- async search({ skip = 0, limit = this.$limit, ...info } = {}) {
- info.shop = this.user.shop.id;
- let res = await this.query({ skip, limit, ...info });
- if (this.$checkRes(res)) this.$set(this, 'data', res.data);
- },
- toUrl(value) {
- // 未付款
- if (value == 'notPay') this.$router.push({ path: `/selfShop/order`, query: { activeName: '1' } });
- // 未发货
- else if (value == 'notSend') this.$router.push({ path: `/selfShop/order`, query: { activeName: '2' } });
- // 未处理售后
- else if (value == 'notDealAfterSale') this.$router.push({ path: `/selfShop/sales` });
- // 下单数
- else if (value == 'sMarkOrder') this.$router.push({ path: `/platfinance/statistics`, query: { activeName: '2' } });
- // 售后数
- else if (value == 'sAfterSale') this.$router.push({ path: `/platfinance/statistics`, query: { activeName: '4' } });
- },
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- watch: {
- test: {
- deep: true,
- immediate: true,
- handler(val) {},
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .two {
- margin: 5px;
- .title {
- p {
- text-align: center;
- span:first-child {
- color: aquamarine;
- font-size: 24px;
- }
- }
- }
- .data-table {
- margin: 5px 0;
- }
- .el-col-5 {
- width: 22.5%;
- }
- .el-col {
- margin: 0 4px;
- }
- .box-card {
- margin: 5px;
- padding: 5px 0 20px 0;
- }
- .item {
- margin-bottom: 18px;
- }
- .icon {
- font-size: 36px;
- padding: 10px;
- color: #fff;
- border-radius: 50%;
- }
- .icon_1 {
- font-size: 36px;
- padding: 10px;
- color: #fff;
- border-radius: 50%;
- background-color: aquamarine;
- }
- .icon_2 {
- font-size: 36px;
- padding: 10px;
- color: #fff;
- border-radius: 50%;
- background-color: aqua;
- }
- .icon_3 {
- font-size: 36px;
- padding: 10px;
- color: #fff;
- border-radius: 50%;
- background-color: gold;
- }
- .icon_4 {
- font-size: 36px;
- padding: 10px;
- color: #fff;
- border-radius: 50%;
- background-color: coral;
- }
- }
- </style>
|