Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div class="col-12 container-summary">
- <<<<<<< HEAD
- <div class="header-summary-box col-9 center">
- <div class="summary-box">
- <div class="title">
- <p>Saldo a
- <span>Liberar</span>
- </p>
- </div>
- <div class="summary-box-content">R$ 169.325,12</div>
- </div>
- <div class="summary-box">
- <div class="title">
- <p>Saldo
- <span>Cartão Pré-Pago</span>
- </p>
- </div>
- <div class="summary-box-content secondary-color-text">Mostrar saldo</div>
- <div class="summary-box-description">Alguma descrição</div>
- </div>
- <div class="summary-box">
- <div class="title">
- <p>Saldo de
- <span>Microcrédito</span>
- </p>
- </div>
- <div class="summary-box-content">R$ 169.325,12</div>
- <div class="summary-box-description secondary-color-text">Alguma descrição</div>
- </div>
- <div class="withdraw-box primary-dark-border-color">
- <div class="title primary-dark-color-text">
- <p>Saldo disponível para
- <span>SAQUE</span>
- </p>
- </div>
- <div class="withdraw-box-content primary-dark-color-text">R$ 12.233.232,12</div>
- </div>
- </div>
- <div class="primary-dark-color-bg col-12">
- <div class="col-9 col-sm-12 col-s-12 center summary-index select-box-summary">
- <div class="summary-box-list col-8">
- <div class="first box-transactions">
- <growth-item period="1 dia" :growth="dayGrowth" :date="getDate('day')" :selected="selectDay" @click="selectPeriod('day')"/>
- </div>
- <div class="box-transactions">
- <growth-item period="7 dias" :growth="weekGrowth" :date="getDate('week')" :selected="selectWeek" @click="selectPeriod('week')"/>
- </div>
- <div class="box-transactions">
- <growth-item period="30 dias" :growth="monthGrowth" :date="getDate('month')" :selected="selectMonth" @click="selectPeriod('month')"/>
- </div>
- </div>
- <div class="summary-buttons relative">
- <div class="export-box secondary-border-color secondary-color-text">
- <img alt="Exportar" src="../assets/new/transactions/summary/extract-icon.svg">
- <p>Extrato</p>
- </div>
- <div class="export-box secondary-border-color secondary-color-text"
- onclick="window.print();return false;">
- <img alt="Exportar" src="../assets/new/transactions/summary/withdraw-icon.svg">
- <p>Saque</p>
- </div>
- </div>
- </div>
- </div>
- <div class="summary-content col-9 center">
- <div class="period-plan-summary">
- <div class="time-chosen">
- <p>Período
- <span>{{ period }}</span>
- </p>
- </div>
- <div class="plan-chosen">
- <div class="plan-icon">
- <img src="../assets/new/transactions/summary/plan-icon.svg">
- </div>
- <div>
- <p>Plano contratado
- <span>Ativo</span>
- </p>
- <p>Plano D14
- <span class="light-font">- Liberação em 14 dias</span>
- </p>
- </div>
- </div>
- </div>
- <div class="receipt-summary">
- <div class="receipt-summary-title">
- <p>Resumo de
- <span>Transações</span>
- </p>
- </div>
- <!-- <div class="receipt-summary-content">
- <div class="selected-box finance-box">
- <div class="box-title blue">
- <p>Volume
- <br>
- <span>Financeiro</span>
- </p>
- </div>
- <div class="box-content finance">
- <p>R$ 100.000.000,00</p>
- </div>
- </div>
- <div class="selected-box blue-style-box primary-color-bg">
- <div class="box-title">
- <p>Total de
- <br>
- <span>Transações</span>
- </p>
- </div>
- <div class="box-content">
- <p>530</p>
- </div>
- </div>
- <div class="selected-box blue-style-box primary-color-bg">
- <div class="box-title">
- <p>Transações
- <br>
- <span>Pagas</span>
- </p>
- </div>
- <div class="box-content">
- <p>490</p>
- </div>
- </div>
- <div class="selected-box blue-style-box primary-color-bg">
- <div class="box-title">
- <p>Transações
- <br>
- <span>Recusadas</span>
- </p>
- </div>
- <div class="box-content">
- <p>020</p>
- </div>
- </div>
- <div class="selected-box blue-style-box primary-color-bg">
- <div class="box-title">
- <p>Transações
- <br>
- <span>Estornadas</span>
- </p>
- </div>
- <div class="box-content">
- <p>010</p>
- </div>
- </div>
- </div> -->
- <div class="graphs-content">
- <div class="graph">
- <my-graph
- :firstValue="10"
- :secondValue="20"
- :thirdValue="22"
- title="Cobranças"
- insideTitle="Cobranças Enviadas"
- value="2.165.120,33"
- quantity="199.035"
- subTitle="Total Enviadas"
- ></my-graph>
- <my-indicator
- classColor="blue-darker-indicator"
- text="Cobranças"
- boldText="PAGAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="blue-light-indicator"
- text="Cobranças"
- boldText="A RECEBER"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="red-indicator"
- text="Cobranças"
- boldText="ATRASADAS "
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- <div class="graph">
- <my-graph
- :firstValue="30"
- :secondValue="3"
- :thirdValue="22"
- title="Boletos"
- insideTitle="Boletos Enviados"
- value="2.120,33"
- quantity="1.035"
- subTitle="Total Enviados"
- ></my-graph>
- <my-indicator
- classColor="blue-darker-indicator"
- text="Boletos"
- boldText="PAGAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="blue-light-indicator"
- text="Boletos"
- boldText="A RECEBER"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="red-indicator"
- text="Boletos"
- boldText="ATRASADAS "
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- <div class="graph">
- <my-graph
- :firstValue="250"
- :secondValue="200"
- :thirdValue="22"
- title="Monetinha"
- insideTitle="Boletos Enviadas"
- value="165.120,33"
- quantity="9.035"
- subTitle="Transações"
- ></my-graph>
- <my-indicator
- classColor="blue-darker-indicator"
- text="Transações"
- boldText="PAGAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="blue-light-indicator"
- text="Transações"
- boldText="RECUSADAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="red-indicator"
- text="Transações"
- boldText="ESTORNADAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- </div>
- <div class="horizontal-graphs-container">
- <div class="horizontal-graph-box graph">
- <div class="graph-title receipt-summary-title">
- <p>Resumo de <br><span>Maquininha Virtual</span></p>
- </div>
- <horizontal-graph
- :first-value="55"
- :second-value="20"
- :third-value="25"
- :quantity="52.345"
- value="158.710,00"
- ></horizontal-graph>
- <my-indicator
- classColor="blue-darker-indicator"
- text="Boletos"
- boldText="PAGAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="blue-light-indicator"
- text="Boletos"
- boldText="A RECEBER"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="red-indicator"
- text="Boletos"
- boldText="ATRASADAS "
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- =======
- <div class="header-summary-box col-9 col-sm-12 col-s-12 center">
- <div class="summary-box">
- <div class="title">
- <p>Saldo a
- <span>Liberar</span>
- </p>
- </div>
- <div class="summary-box-content">R$ 169.325,12</div>
- </div>
- <div class="summary-box">
- <div class="title">
- <p>Saldo
- <span>Cartão Pré-Pago</span>
- </p>
- </div>
- <div class="summary-box-content secondary-color-text">Mostrar saldo</div>
- <div class="summary-box-description">Alguma descrição</div>
- </div>
- <div class="summary-box">
- <div class="title">
- <p>Saldo de
- <span>Microcrédito</span>
- </p>
- </div>
- <div class="summary-box-content">R$ 169.325,12</div>
- <div class="summary-box-description secondary-color-text">Alguma descrição</div>
- </div>
- <div class="withdraw-box primary-dark-border-color">
- <div class="title primary-dark-color-text">
- <p>Saldo disponível para
- <span>SAQUE</span>
- </p>
- </div>
- <div class="withdraw-box-content primary-dark-color-text">R$ 12.233.232,12</div>
- </div>
- </div>
- <div class="primary-dark-color-bg col-12">
- <div class="col-9 col-s-12 col-sm-12 center summary-index select-box-summary">
- <div class="summary-box-list col-8">
- <div class="first box-transactions">
- <growth-item period="1 dia" :growth="1" :date="new Date()" :selected="true"/>
- </div>
- <div class="box-transactions">
- <growth-item period="1 dia" :growth="1" :date="new Date()" :selected="true"/>
- </div>
- <div class="box-transactions">
- <growth-item period="1 dia" :growth="1" :date="new Date()" :selected="true"/>
- </div>
- </div>
- <div class="summary-buttons relative">
- <div class="export-box secondary-border-color secondary-color-text">
- <img alt="Exportar" src="../assets/new/transactions/summary/extract-icon.svg">
- <p>Extrato</p>
- </div>
- <div class="export-box secondary-border-color secondary-color-text"
- onclick="window.print();return false;">
- <img alt="Exportar" src="../assets/new/transactions/summary/withdraw-icon.svg">
- <p>Saque</p>
- </div>
- </div>
- </div>
- </div>
- <div class="summary-content col-9 col-sm-12 col-s-12">
- <div class="period-plan-summary">
- <div class="time-chosen">
- <p>Período
- <span>test dias</span>
- </p>
- </div>
- <div class="plan-chosen">
- <div class="plan-icon">
- <img src="../assets/new/transactions/summary/plan-icon.svg">
- </div>
- <div>
- <p>Plano contratado
- <span>Ativo</span>
- </p>
- <p>Plano D14
- <span class="light-font">- Liberação em 14 dias</span>
- </p>
- </div>
- </div>
- </div>
- <div class="receipt-summary col-sm-12 col-s-12">
- <div class="receipt-summary-title">
- <p>Resumo de
- <span>Transações</span>
- </p>
- </div>
- <div class="receipt-summary-content">
- <div class="selected-box finance-box">
- <div class="box-title blue">
- <p>Volume<br><span>Financeiro</span></p>
- </div>
- <div class="box-content finance">
- <p>R$ 100.000.000,00</p>
- </div>
- </div>
- <div class="selected-box blue-style-box primary-color-bg">
- <div class="box-title">
- <p>Total de<br><span>Transações</span>
- </p>
- </div>
- <div class="box-content">
- <p>530</p>
- </div>
- </div>
- <div class="selected-box blue-style-box primary-color-bg">
- <div class="box-title">
- <p>Transações
- <br>
- <span>Pagas</span>
- </p>
- </div>
- <div class="box-content">
- <p>490</p>
- </div>
- </div>
- <div class="selected-box blue-style-box primary-color-bg">
- <div class="box-title">
- <p>Transações
- <br>
- <span>Recusadas</span>
- </p>
- </div>
- <div class="box-content">
- <p>020</p>
- </div>
- </div>
- <div class="selected-box blue-style-box primary-color-bg">
- <div class="box-title">
- <p>Transações
- <br>
- <span>Estornadas</span>
- </p>
- </div>
- <div class="box-content">
- <p>010</p>
- </div>
- </div>
- </div>
- <div class="graphs-content">
- <div class="graph wow bounceInUp" data-wow-duration="1s">
- <my-graph
- :firstValue="10"
- :secondValue="20"
- :thirdValue="22"
- title="Cobranças"
- insideTitle="Cobranças Enviadas"
- value="2.165.120,33"
- quantity="199.035"
- subTitle="Total Enviadas"
- ></my-graph>
- <my-indicator
- classColor="blue-darker-indicator"
- text="Cobranças"
- boldText="PAGAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="blue-light-indicator"
- text="Cobranças"
- boldText="A RECEBER"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="red-indicator"
- text="Cobranças"
- boldText="ATRASADAS "
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- <div class="graph wow bounceInUp" data-wow-duration="1s">
- <my-graph
- :firstValue="30"
- :secondValue="3"
- :thirdValue="22"
- title="Boletos"
- insideTitle="Boletos Enviados"
- value="2.120,33"
- quantity="1.035"
- subTitle="Total Enviados"
- ></my-graph>
- <my-indicator
- classColor="blue-darker-indicator"
- text="Boletos"
- boldText="PAGAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="blue-light-indicator"
- text="Boletos"
- boldText="A RECEBER"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="red-indicator"
- text="Boletos"
- boldText="ATRASADAS "
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- <div class="graph wow bounceInUp" data-wow-duration="1s">
- <my-graph
- :firstValue="250"
- :secondValue="200"
- :thirdValue="22"
- title="Monetinha"
- insideTitle="Boletos Enviadas"
- value="165.120,33"
- quantity="9.035"
- subTitle="Transações"
- ></my-graph>
- <my-indicator
- classColor="blue-darker-indicator"
- text="Transações"
- boldText="PAGAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="blue-light-indicator"
- text="Transações"
- boldText="RECUSADAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="red-indicator"
- text="Transações"
- boldText="ESTORNADAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- </div>
- <div class="horizontal-graphs-container">
- <div class="horizontal-graph-box graph wow bounceInUp" data-wow-duration="1s">
- <div class="graph-title receipt-summary-title">
- <p>Resumo de <br><span>Maquininha Virtual</span></p>
- </div>
- <horizontal-graph
- :first-value="55"
- :second-value="20"
- :third-value="25"
- :quantity="52.345"
- value="158.710,00"
- ></horizontal-graph>
- <my-indicator
- classColor="blue-darker-indicator"
- text="Boletos"
- boldText="PAGAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="blue-light-indicator"
- text="Boletos"
- boldText="A RECEBER"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="red-indicator"
- text="Boletos"
- boldText="ATRASADAS "
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- >>>>>>> de5404d89d505addc97396668369786762ddad27
- <div class="horizontal-graph-box graph wow bounceInUp" data-wow-duration="1s">
- <div class="graph-title receipt-summary-title">
- <p>Resumo de
- <br>
- <span>Moneto Pay (QR Code)</span>
- </p>
- </div>
- <horizontal-graph
- :first-value="15"
- :second-value="20"
- :third-value="45"
- :quantity="52.345"
- value="158.710,00"
- ></horizontal-graph>
- <my-indicator
- classColor="blue-darker-indicator"
- text="Boletos"
- boldText="PAGAS"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="blue-light-indicator"
- text="Boletos"
- boldText="A RECEBER"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- <my-indicator
- classColor="red-indicator"
- text="Boletos"
- boldText="ATRASADAS "
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- <div class="last-payments wow bounceInUp" data-wow-duration="1s">
- <div class="last-payments-title">Ultimos Pagamentos</div>
- <div class="last-payments-list">
- <last-payment
- type="Envio de Cobrança" date="05/02/2019"
- value="1.234,56" installments="Pago em 10x"
- ></last-payment>
- <last-payment
- type="Envio de Cobrança" date="05/02/2019"
- value="1.234,56" installments="Boleto"
- ></last-payment> <last-payment
- type="Envio de Boleto" date="05/02/2019"
- value="1.209090934,56" installments="Boleto"
- ></last-payment> <last-payment
- type="Moneto Pay" date="05/02/2019"
- value="1.234,56" installments="QR Code"
- ></last-payment> <last-payment
- type="Maquininha Virtual" date="05/02/2019"
- value="1.234,56" installments="Cartão 05x"
- ></last-payment> <last-payment
- type="Monetinha MPOS" date="05/02/2019"
- value="1.234,56" installments="Cartão Débito"
- ></last-payment>
- </div>
- </div>
- <div class="payment-methods wow bounceInUp" data-wow-duration="1s">
- <p class="default-text payment-methods-title">Índice por
- <b>Meio de pagamento</b>
- </p>
- <div class="container-payment-methods">
- <div class="graph-and-details-container">
- <div class="title-and-graph-container">
- <div class="container-graph-title">
- <div class="period">
- <p class="period-title default-text">Período</p>
- <p class="period-content default-text">1 dia</p>
- </div>
- <div class="value">
- <p class="default-text value-title">R$ 158.710,00</p>
- <p class="default-text transactions">52.345 Transações</p>
- </div>
- </div>
- <div class="doughnut-graph relative">
- <doughnut-chart
- :chart-data="chartData"
- :options="{
- responsive: true,
- maintainAspectRatio: true,
- cutoutPercentage: 50,
- legend:{display: false}}"
- ></doughnut-chart>
- </div>
- </div>
- <div class="container-detail-rows">
- <div class="indicator flex">
- <p class="default-text index">1</p>
- <my-indicator
- classColor="blue-alt-indicator"
- text="Envio de Cobranças"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- <div class="indicator flex">
- <p class="default-text index">2</p>
- <my-indicator
- classColor="red-alt-indicator"
- text="Envio de Boleto"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- <div class="indicator flex">
- <p class="default-text index">3</p>
- <my-indicator
- classColor="yellow-alt-indicator"
- text="Maquininha Virtual"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- <div class="indicator flex">
- <p class="default-text index">4</p>
- <my-indicator
- classColor="green-alt-indicator"
- text="Monetinha (MPos)"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- <div class="indicator flex">
- <p class="default-text index">5</p>
- <my-indicator
- classColor="orange-alt-indicator"
- text="Moneto Pay (QR Code)"
- value="1.121.212,00"
- :percentage="55"
- :quantity="109.469"
- ></my-indicator>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { mapGetters } from 'vuex';
- import GrowthTransaction from "../components/layout/items/GrowthTransaction.vue";
- import MyGraph from "../components/layout/items/TransactionGraph.vue";
- import MyIndicator from "../components/layout/items/graphs/TransactionIndicator.vue";
- import HorizontalGraph from "../components/layout/items/HorizontalChart.vue";
- import DoughnutChart from "../components/layout/items/graphs/DoughnutChart.vue";
- import LastPayment from "../components/layout/items/LastPayment.vue";
- import WOW from 'wow.js';
- new WOW().init();
- export default {
- components: {
- "growth-item": GrowthTransaction,
- "my-graph": MyGraph,
- "my-indicator": MyIndicator,
- "last-payment": LastPayment,
- HorizontalGraph,
- DoughnutChart
- },
- data() {
- <<<<<<< HEAD
- return {
- chartData: {
- labels: [
- "Envio de Cobranças",
- "Envio de Boleto",
- "Maquininha Virtual",
- "Monetinha (MPos)",
- "Moneto Pay (QR Code)"
- ],
- datasets: [
- {
- backgroundColor: ["#4187ED", "#E0423C", "#F6B33B", "#009D5F", "#FF6B27"],
- data: [10, 20, 30, 20, 20]
- }
- ],
- },
- newDayStatement:'',
- oldDayStatement:'',
- dayGrowth:'',
- newWeekStatement:'',
- oldWeekStatement:'',
- weekGrowth:'',
- newMonthStatement:'',
- oldMonthStatement:'',
- monthGrowth:'',
- selectedStatement:'',
- period:'1 dia',
- filters:{
- type:'',
- status:'',
- since:'',
- until:''
- },
- financeVolume: 0,
- totalTransactions: 0,
- paid: 0,
- refused: 0,
- reversal: 0,
- selectDay: true,
- selectMonth: false,
- selectWeek: false,
- isLoading: false,
- };
- },
- methods: {
- getInitialStatements(){
- Promise.all([
- this.getStatement('day').then((response) => this.newDayStatement = this.statement.summary),
- this.getStatement('before-day').then((response) => this.oldDayStatement = this.statement.summary),
- this.getStatement('month').then((response) => this.newMonthStatement = this.statement.summary),
- this.getStatement('before-month').then((response) => this.oldMonthStatement = this.statement.summary),
- this.getStatement('week').then((response) => this.newWeekStatement = this.statement.summary),
- this.getStatement('before-week').then((response) => this.oldWeekStatement = this.statement.summary)])
- .then(() => {
- this.isLoading = false;
- this.setAllGrowths();
- if(localStorage.getItem('filtersForSearch') && localStorage.getItem('periodOfSearch')){
- this.filters = JSON.parse(localStorage.getItem('filtersForSearch'));
- if(localStorage.getItem('periodOfSearch') == '"1 dia"') this.selectPeriod('day');
- else if(localStorage.getItem('periodOfSearch') == '"7 dias"') this.selectPeriod('week');
- else if(localStorage.getItem('periodOfSearch') == '"30 dias"') this.selectPeriod('month');
- else this.selectPeriod('customize');
- }else this.selectPeriod('day');
- localStorage.removeItem('filtersForSearch');
- localStorage.removeItem('periodOfSearch');
- });
- },
- getStatement(period){
- this.isLoading = true;
- var date = this.createDate(period);
- var endDate = this.formatDate(date.end);
- var startDate = this.formatDate(date.start);
- // this.filters.since = startDate;
- // this.filters.until = endDate;
- return this.$store.dispatch('get_receipts_summary', { since : startDate, until : endDate })
- .then((response) => response);
- },
- createDate(period){
- var end = new Date();
- var start = new Date();
- if(period === 'before-day'){
- start.setDate(start.getDate());
- end.setDate(end.getDate());
- }
- if(period === 'week') start.setDate(start.getDate() - 7);
- if(period === 'before-week'){
- start.setDate(start.getDate() -13);
- end.setDate(end.getDate() - 6);
- }
- if(period === 'month') start.setDate(start.getDate() -30);
- if(period === 'before-month'){
- start.setDate(start.getDate() -60);
- end.setDate(end.getDate() - 30);
- }
- var date = {start : start, end : end};
- return date;
- },
- formatDate(date){
- return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
- },
- getDate(period){
- var today = new Date();
- if(period == 'day'){
- var months = ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'];
- return `${("0" + today.getDate()).slice(-2)} de ${months[today.getMonth()]}`;
- }else if(period == 'week'){
- var lastWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate()-6);
- return `De ${("0" + today.getDate()).slice(-2)}/${("0" + (today.getMonth() + 1)).slice(-2)} à ${("0" + lastWeek.getDate()).slice(-2)}/${("0" + (lastWeek.getMonth() + 1)).slice(-2)}`;
- }else if(period == 'month'){
- var lastMonth = new Date();
- lastMonth.setDate(lastMonth.getDate()-30);
- return `De ${("0" + today.getDate()).slice(-2)}/${("0" + (today.getMonth() + 1)).slice(-2)} à ${("0" + lastMonth.getDate()).slice(-2)}/${("0" + lastMonth.getMonth() + 1).slice(-2)}/${lastMonth.getFullYear()}`;
- }
- },
- selectPeriod(period){
- this.selectDay = this.selectMonth = this.selectWeek = false;
- if(period == 'day'){
- this.period = '1 dia';
- this.selectedStatement = this.newDayStatement;
- this.selectDay = true;
- var date = this.createDate('day');
- this.filters.since = this.formatDate(date.start);
- this.filters.until = this.formatDate(date.end);
- this.filters.status = 'total';
- }
- if(period == 'week'){
- this.period = '7 dias';
- this.selectedStatement = this.newWeekStatement;
- this.selectWeek = true;
- var date = this.createDate('week');
- this.filters.since = this.formatDate(date.start);
- this.filters.until = this.formatDate(date.end);
- this.filters.status = 'total';
- }
- if(period == 'month'){
- this.period = '30 dias';
- this.selectedStatement = this.newMonthStatement;
- this.selectMonth = true;
- var date = this.createDate('month');
- this.filters.since = this.formatDate(date.start);
- this.filters.until = this.formatDate(date.end);
- this.filters.status = 'total';
- }
- this.financeVolume= this.selectedStatement.executed;
- this.totalTransactions = this.selectedStatement.total;
- this.paid = this.selectedStatement.paid;
- this.refused = this.selectedStatement.error;
- this.reversal = this.selectedStatement.reversed;
- }
- }, computed: {
- ...mapGetters([
- 'statement',
- ]),
- }
- =======
- return {
- chartData: {
- labels: [
- "Envio de Cobranças",
- "Envio de Boleto",
- "Maquininha Virtual",
- "Monetinha (MPos)",
- "Moneto Pay (QR Code)"
- ],
- datasets: [
- {
- backgroundColor: ["#4187ED", "#E0423C", "#F6B33B", "#009D5F", "#FF6B27"],
- data: [10, 20, 30, 20, 20]
- }
- ]
- }
- };
- }
- >>>>>>> de5404d89d505addc97396668369786762ddad27
- };
- </script>
- <style>
- @import "../../public/style/css/newStyle.css";
- @import "../../public/style/css/themes/newAllThemes.css";
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement