This commit is contained in:
2021-08-23 20:22:57 +00:00
parent 028caf66a7
commit 4f46e641a6

View File

@@ -128,6 +128,8 @@
" "
@update:name="unitChange" @update:name="unitChange"
></gz-pick-list> ></gz-pick-list>
canopenmeter
{{ canOpenMeter() }}
<template v-slot:append v-if="canOpenMeter()"> <template v-slot:append v-if="canOpenMeter()">
<v-btn outlined small color="primary" @click="openMeter"> <v-btn outlined small color="primary" @click="openMeter">
<v-icon>$ayiWeight</v-icon></v-btn <v-icon>$ayiWeight</v-icon></v-btn
@@ -360,8 +362,7 @@ export default {
availableBulkUnits: [], availableBulkUnits: [],
selectedBulkUnits: [], selectedBulkUnits: [],
selectedBulkUnitTags: [], selectedBulkUnitTags: [],
bulkUnitTableHeaders: [], bulkUnitTableHeaders: []
isMetered: false
}; };
}, },
props: { props: {
@@ -413,7 +414,8 @@ export default {
methods: { methods: {
canOpenMeter: function() { canOpenMeter: function() {
return ( return (
this.isMetered == true && this.value.items[this.activeWoItemIndex].units[this.activeItemIndex]
.unitMeteredViz == true &&
this.value.items[this.activeWoItemIndex].units[this.activeItemIndex] this.value.items[this.activeWoItemIndex].units[this.activeItemIndex]
.id != 0 .id != 0
); );
@@ -434,14 +436,6 @@ export default {
].unitViz ].unitViz
} }
}); });
// this.$router.push({
// name: "meter-readings",
// params: {
// aType: window.$gz.type.Unit,
// objectId: this.$route.params.recordid
// }
// });
} }
}, },
async handleUnitChange() { async handleUnitChange() {
@@ -459,7 +453,9 @@ export default {
); );
} else { } else {
//METER READING //METER READING
this.isMetered = res.data.isMetered; this.value.items[this.activeWoItemIndex].units[
this.activeItemIndex
].unitMeteredViz = res.data.isMetered;
//CONTRACT //CONTRACT
if (res.data.contract.id != 0) { if (res.data.contract.id != 0) {