This commit is contained in:
2021-07-08 19:20:32 +00:00
parent 7378a5b853
commit d47eecf510

View File

@@ -373,7 +373,24 @@ export default {
}
},
methods: {
getWarrantyInfo() {},
async getWarrantyInfo() {
this.warrantyInfo = null;
const id = this.value.items[this.activeWoItemIndex].units[
this.activeItemIndex
].unitId;
if (!id || id == 0) {
return;
}
let res = await window.$gz.api.get(`unit/service-warranty-info/${id}`);
if (res.error) {
window.$gz.eventBus.$emit(
"notify-warning",
window.$gz.errorHandler.errorToString(res, this)
);
} else {
this.warrantyInfo = JSON.stringify(res.data);
}
},
showBulkUnitsDialog() {
if (this.bulkUnitTableHeaders.length == 0) {
//init bulk table headers
@@ -430,6 +447,7 @@ export default {
this.value.items[this.activeWoItemIndex].units[
this.activeItemIndex
].unitViz = newName;
this.warrantyInfo = null;
},
newItem() {
let newIndex = this.value.items[this.activeWoItemIndex].units.length;