forked from nathalie/pedi2
Merge branch 'master' of https://git.mps.org.uy/nathalie/pedi2
This commit is contained in:
commit
33d59073e3
|
@ -20,3 +20,10 @@ main.chisma-abierta {
|
||||||
padding-top: 25.5rem !important;
|
padding-top: 25.5rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#main {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-height: 100% !important;
|
||||||
|
}
|
||||||
|
|
|
@ -2957,6 +2957,13 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||||
name: "SubpedidosGdc",
|
name: "SubpedidosGdc",
|
||||||
|
@ -2982,9 +2989,25 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
fetchSubpedidos: function fetchSubpedidos() {
|
fetchSubpedidos: function fetchSubpedidos() {
|
||||||
var _this2 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
axios.get("/api/subpedidos/resources").then(function (response) {
|
axios.get("/api/subpedidos/resources", {
|
||||||
|
params: {
|
||||||
|
grupo_de_compra: this.gdc
|
||||||
|
}
|
||||||
|
}).then(function (response) {
|
||||||
_this2.subpedidos = response.data.data;
|
_this2.subpedidos = response.data.data;
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
totalAprobados: function totalAprobados() {
|
||||||
|
var suma = 0;
|
||||||
|
var aprobados = this.subpedidos.filter(function (sp) {
|
||||||
|
return sp.aprobado;
|
||||||
|
});
|
||||||
|
|
||||||
|
for (var i = 0; i < aprobados.length; i++) {
|
||||||
|
suma += parseFloat(aprobados[i].total.replace(/,/g, ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
return suma;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function mounted() {
|
mounted: function mounted() {
|
||||||
|
@ -5902,7 +5925,7 @@ var render = function () {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
staticClass:
|
staticClass:
|
||||||
"container table-container chismosa-container is-max-widescreen is-max-desktop animate__animated",
|
"container is-max-widescreen is-max-desktop animate__animated",
|
||||||
class: _vm.animation,
|
class: _vm.animation,
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
|
@ -5922,6 +5945,16 @@ var render = function () {
|
||||||
[
|
[
|
||||||
_vm._m(0),
|
_vm._m(0),
|
||||||
_vm._v(" "),
|
_vm._v(" "),
|
||||||
|
_c("tfoot", [
|
||||||
|
_c("tr", [
|
||||||
|
_c("th"),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c("th", [_vm._v("Total de los aprobados")]),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c("th", [_vm._v("$ " + _vm._s(_vm.totalAprobados()))]),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
_vm._v(" "),
|
||||||
_c(
|
_c(
|
||||||
"tbody",
|
"tbody",
|
||||||
_vm._l(this.subpedidos, function (subpedido) {
|
_vm._l(this.subpedidos, function (subpedido) {
|
||||||
|
@ -19492,8 +19525,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/*! no static exports found */
|
/*! no static exports found */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(/*! /home/ale/MPS/App/pedi2/resources/js/app.js */"./resources/js/app.js");
|
__webpack_require__(/*! /var/www/resources/js/app.js */"./resources/js/app.js");
|
||||||
module.exports = __webpack_require__(/*! /home/ale/MPS/App/pedi2/resources/sass/app.scss */"./resources/sass/app.scss");
|
module.exports = __webpack_require__(/*! /var/www/resources/sass/app.scss */"./resources/sass/app.scss");
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container table-container chismosa-container is-max-widescreen is-max-desktop animate__animated" :class="animation" v-show="!init">
|
<div class="container is-max-widescreen is-max-desktop animate__animated" :class="animation" v-show="!init">
|
||||||
<table v-show="this.subpedidos.length !== 0" class="table is-fullwidth is-striped is-bordered">
|
<table v-show="this.subpedidos.length !== 0" class="table is-fullwidth is-striped is-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -8,6 +8,13 @@
|
||||||
<th><abbr title="Aprobacion">Aprobación</abbr></th>
|
<th><abbr title="Aprobacion">Aprobación</abbr></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>Total de los aprobados</th>
|
||||||
|
<th>$ {{ totalAprobados() }}</th>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
<tbody>
|
<tbody>
|
||||||
<subpedido-row v-for="subpedido in this.subpedidos"
|
<subpedido-row v-for="subpedido in this.subpedidos"
|
||||||
:subpedido="subpedido" :key="subpedido.id">
|
:subpedido="subpedido" :key="subpedido.id">
|
||||||
|
@ -39,9 +46,21 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchSubpedidos() {
|
fetchSubpedidos() {
|
||||||
axios.get("/api/subpedidos/resources").then(response => {
|
axios.get("/api/subpedidos/resources", {
|
||||||
|
params: {
|
||||||
|
grupo_de_compra: this.gdc
|
||||||
|
}
|
||||||
|
}).then(response => {
|
||||||
this.subpedidos = response.data.data
|
this.subpedidos = response.data.data
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
totalAprobados() {
|
||||||
|
let suma = 0;
|
||||||
|
let aprobados = this.subpedidos.filter(sp => sp.aprobado);
|
||||||
|
for (let i = 0; i < aprobados.length; i++) {
|
||||||
|
suma += parseFloat(aprobados[i].total.replace(/,/g, ''));
|
||||||
|
}
|
||||||
|
return suma;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -25,3 +25,12 @@ table.table td {
|
||||||
main.chisma-abierta {
|
main.chisma-abierta {
|
||||||
padding-top: 25.5rem !important;
|
padding-top: 25.5rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#main {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-height: 100% !important;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue