Ver código fonte

Merge branch 'dev'

prodstable
Guillaume Bourgeois 5 anos atrás
pai
commit
8a9ae897d6
5 arquivos alterados com 41 adições e 11 exclusões
  1. +1
    -0
      backend/controllers/ReportController.php
  2. +11
    -8
      backend/views/report/index.php
  3. +7
    -3
      backend/web/css/screen.css
  4. +15
    -0
      backend/web/js/vuejs/report-index.js
  5. +7
    -0
      backend/web/sass/report/_index.scss

+ 1
- 0
backend/controllers/ReportController.php Ver arquivo

@@ -136,6 +136,7 @@ class ReportController extends BackendController
FROM `order`, product_order, product
WHERE `order`.id = product_order.id_order
AND product_order.id_product = product.id
AND `order`.date_delete IS NULL
".$conditionUsers."
".$conditionPointsSale."
".$conditionDistributions."

+ 11
- 8
backend/views/report/index.php Ver arquivo

@@ -87,14 +87,17 @@ $this->addBreadcrumb('Rapports') ;
</select>
</div>
<div class="content-max-height">
<div class="distribution-month" v-for="distributionsMonth in distributionsByMonthArray" v-if="distributionsMonth.year == distributionYear && distributionsMonth.distributions.length > 0">
<a class="btn btn-default link-month-distribution" @click="distributionsMonth.display = !distributionsMonth.display">{{ distributionsMonth.month }} <span class="glyphicon glyphicon-menu-down"></span></a>
<ul v-if="distributionsMonth.display">
<li v-for="distribution in distributionsMonth.distributions">
<input type="checkbox" :id="'distribution_'+distribution.id" v-model="distribution.checked" @change="reportChange" />
<label :for="'distribution_'+distribution.id">{{ distribution.date }}</label>
</li>
</ul>
<div class="distribution-month" v-for="(distributionsMonth, month) in distributionsByMonthArray" v-if="distributionsMonth.year == distributionYear && distributionsMonth.distributions.length > 0">
<a class="btn btn-default link-month-distribution" @click="distributionsMonth.display = !distributionsMonth.display">{{ distributionsMonth.month }} <span class="label label-success" v-if="countDistributionsByMonth(month)">{{ countDistributionsByMonth(month) }}</span> <span class="glyphicon glyphicon-menu-down"></span></a>
<div class="the-distributions" v-if="distributionsMonth.display">
<a @click="selectDistributions(month)" class="btn btn-default btn-xs btn-select"><span class="glyphicon glyphicon-check"></span> Tout <span v-if="countDistributionsByMonth(month)">déselectionner</span><span v-else>sélectionner</span></a>
<ul>
<li v-for="distribution in distributionsMonth.distributions">
<input type="checkbox" :id="'distribution_'+distribution.id" v-model="distribution.checked" @change="reportChange" />
<label :for="'distribution_'+distribution.id">{{ distribution.date }}</label>
</li>
</ul>
</div>
</div>
</div>
</div>

+ 7
- 3
backend/web/css/screen.css Ver arquivo

@@ -2147,18 +2147,22 @@ termes.
.report-index #parameters #section-distributions .distribution-month .link-month-distribution .glyphicon {
float: right;
}
/* line 114, ../sass/report/_index.scss */
/* line 109, ../sass/report/_index.scss */
.report-index #parameters #section-distributions .distribution-month .the-distributions {
margin-top: 8px;
}
/* line 121, ../sass/report/_index.scss */
.report-index #report .section {
margin-bottom: 15px;
}
/* line 117, ../sass/report/_index.scss */
/* line 124, ../sass/report/_index.scss */
.report-index #report .section h3 {
margin: 0px;
padding: 0px;
font-size: 16px;
text-transform: uppercase;
}
/* line 123, ../sass/report/_index.scss */
/* line 130, ../sass/report/_index.scss */
.report-index #report .section .comma:last-child {
display: none;
}

+ 15
- 0
backend/web/js/vuejs/report-index.js Ver arquivo

@@ -81,6 +81,21 @@ var app = new Vue({
}
return count ;
},
countDistributionsByMonth: function(month) {
var count = 0 ;
for(var j = 0; j < this.distributionsByMonthArray[month].distributions.length; j++) {
if(this.distributionsByMonthArray[month].distributions[j].checked) {
count ++ ;
}
}
return count ;
},
selectDistributions: function(month) {
var countDistributions = this.countDistributionsByMonth(month) ;
for(var j = 0; j < this.distributionsByMonthArray[month].distributions.length; j++) {
Vue.set(this.distributionsByMonthArray[month].distributions[j], 'checked', countDistributions ? false : true);
}
},
generateReport: function() {
var app = this ;
app.showLoading = true ;

+ 7
- 0
backend/web/sass/report/_index.scss Ver arquivo

@@ -105,6 +105,13 @@ termes.
float: right ;
}
}
.the-distributions {
margin-top: 8px ;
.btn-select {
}
}
}
}
}

Carregando…
Cancelar
Salvar