Compare commits
No commits in common. "eda9d5ce6c96adb486b348717a05644d0a648aed" and "8502fb72d928f64cbd8ff58b93e63e3aa1f8b3ac" have entirely different histories.
eda9d5ce6c
...
8502fb72d9
2 changed files with 7 additions and 59 deletions
35
public/js/app.js
vendored
35
public/js/app.js
vendored
|
@ -2957,13 +2957,6 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||||
name: "SubpedidosGdc",
|
name: "SubpedidosGdc",
|
||||||
|
@ -2989,25 +2982,9 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
fetchSubpedidos: function fetchSubpedidos() {
|
fetchSubpedidos: function fetchSubpedidos() {
|
||||||
var _this2 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
axios.get("/api/subpedidos/resources", {
|
axios.get("/api/subpedidos/resources").then(function (response) {
|
||||||
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() {
|
||||||
|
@ -5945,16 +5922,6 @@ 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) {
|
||||||
|
|
|
@ -8,13 +8,6 @@
|
||||||
<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">
|
||||||
|
@ -46,21 +39,9 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchSubpedidos() {
|
fetchSubpedidos() {
|
||||||
axios.get("/api/subpedidos/resources", {
|
axios.get("/api/subpedidos/resources").then(response => {
|
||||||
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() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue