<template>
  <moduleEnclosure title="近30日累计订单统计">
    <div class="all-container">
      <div class="table-container">
        <div class="th row">
          <div>订单类型</div>
          <div>累计订单数</div>
          <div>累计订单金额</div>
        </div>
        <!-- <div class="td row">
          <div>销售订单</div>
          <div>{{ statsData.sxdds }}</div>
          <div>{{ statsData.sxddje }}</div>
        </div> -->
        <div class="td row">
          <div>辅材订单</div>
          <div>{{ statsData.fcdds }}</div>
          <div>{{ statsData.fcddje }}</div>
        </div>
        <div class="td row">
          <div>配件订单</div>
          <div>{{ statsData.pjdds }}</div>
          <div>{{ statsData.pjddje }}</div>
        </div>
        <!-- <div class="td row">
          <div>增值订单</div>
          <div>{{ statsData.zzdds }}</div>
          <div>{{ statsData.zzddje }}</div>
        </div> -->
      </div>
    </div>
  </moduleEnclosure>
</template>

<script>
import moduleEnclosure from '@/components/moduleEnclosure.vue'
import { getOrderStats } from '@/api/bigView.js'
export default {
  components: { moduleEnclosure },

  data() {
    return {
      statsData: {}
    }
  },

  mounted() {
    this.getData()
  },

  beforeUnmount() {},

  methods: {
    getData() {
      getOrderStats().then(res => {
        this.statsData = res.data
      })
    }
  }
}
</script>
<style scoped lang="scss">
.all-container {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding-top: 12px;
  position: relative;
}
.table-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  .row {
    display: flex;
    align-items: center;
    &.th {
      font-weight: bold;
      color: #26a3ce;
    }
    &.td {
      color: #ffffff;
      div:last-child {
        color: #e4f824;
      }
      div:nth-child(1) {
        font-size: 12px;
      }
    }
    div {
      flex: 1;
      font-size: 14px;
      &:nth-child(2) {
        text-align: center;
      }
      &:nth-child(3) {
        text-align: right;
      }
    }
  }
}
</style>
