This commit is contained in:
@@ -137,7 +137,10 @@
|
|||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title>{{ $ay.t("UnitWarrantyInfo") }}</v-card-title>
|
<v-card-title>{{ $ay.t("UnitWarrantyInfo") }}</v-card-title>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
{{ warrantyInfo }}
|
{{
|
||||||
|
value.items[activeWoItemIndex].units[activeItemIndex]
|
||||||
|
.warrantyViz
|
||||||
|
}}
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-btn color="primary" text @click="getWarrantyInfo">{{
|
<v-btn color="primary" text @click="getWarrantyInfo">{{
|
||||||
@@ -323,7 +326,8 @@ export default {
|
|||||||
selectedBulkUnits: [],
|
selectedBulkUnits: [],
|
||||||
selectedBulkUnitTags: [],
|
selectedBulkUnitTags: [],
|
||||||
bulkUnitTableHeaders: [],
|
bulkUnitTableHeaders: [],
|
||||||
warrantyInfo: null
|
warrantyInfo: {},
|
||||||
|
warrantyDisplay: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -375,6 +379,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async getWarrantyInfo() {
|
async getWarrantyInfo() {
|
||||||
this.warrantyInfo = null;
|
this.warrantyInfo = null;
|
||||||
|
|
||||||
const id = this.value.items[this.activeWoItemIndex].units[
|
const id = this.value.items[this.activeWoItemIndex].units[
|
||||||
this.activeItemIndex
|
this.activeItemIndex
|
||||||
].unitId;
|
].unitId;
|
||||||
@@ -388,7 +393,19 @@ export default {
|
|||||||
window.$gz.errorHandler.errorToString(res, this)
|
window.$gz.errorHandler.errorToString(res, this)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.warrantyInfo = JSON.stringify(res.data);
|
/* {
|
||||||
|
"recentWorkOrders":[{"serial":10,"id":10,"serviceDate":"2021-01-19T22:00:00Z"},{"serial":8,"id":8,"serviceDate":"2021-04-08T22:00:00Z"},{"serial":7,"id":7,"serviceDate":"2021-04-18T20:00:00Z"}],
|
||||||
|
"purchaseDate":"2019-03-12T09:37:52.930923Z",
|
||||||
|
"purchasedFromVendor":null,
|
||||||
|
"purchaseFromVendorId":null,
|
||||||
|
"purchaseReceiptNumber":"139736",
|
||||||
|
"lifeTimeWarranty":false,
|
||||||
|
"warrantyExpiryDate":"2019-04-12T09:37:52.930923Z",
|
||||||
|
"warrantyTerms":"Shipping parts and service"} */
|
||||||
|
|
||||||
|
this.value.items[this.activeWoItemIndex].units[
|
||||||
|
this.activeItemIndex
|
||||||
|
].warrantyViz = JSON.stringify(res.data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showBulkUnitsDialog() {
|
showBulkUnitsDialog() {
|
||||||
@@ -434,7 +451,8 @@ export default {
|
|||||||
isDirty: true,
|
isDirty: true,
|
||||||
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
|
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
|
||||||
uid: Date.now(),
|
uid: Date.now(),
|
||||||
unitViz: z.unitSerial
|
unitViz: z.unitSerial,
|
||||||
|
warrantyViz: null
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.$emit("change");
|
this.$emit("change");
|
||||||
@@ -447,7 +465,9 @@ export default {
|
|||||||
this.value.items[this.activeWoItemIndex].units[
|
this.value.items[this.activeWoItemIndex].units[
|
||||||
this.activeItemIndex
|
this.activeItemIndex
|
||||||
].unitViz = newName;
|
].unitViz = newName;
|
||||||
this.warrantyInfo = null;
|
this.value.items[this.activeWoItemIndex].units[
|
||||||
|
this.activeItemIndex
|
||||||
|
].warrantyViz = null;
|
||||||
},
|
},
|
||||||
newItem() {
|
newItem() {
|
||||||
let newIndex = this.value.items[this.activeWoItemIndex].units.length;
|
let newIndex = this.value.items[this.activeWoItemIndex].units.length;
|
||||||
@@ -476,8 +496,10 @@ export default {
|
|||||||
isDirty: true,
|
isDirty: true,
|
||||||
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
|
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
|
||||||
uid: Date.now(),
|
uid: Date.now(),
|
||||||
unitViz: null
|
unitViz: null,
|
||||||
|
warrantyViz: null
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$emit("change");
|
this.$emit("change");
|
||||||
this.selectedRow = [{ index: newIndex }];
|
this.selectedRow = [{ index: newIndex }];
|
||||||
this.activeItemIndex = newIndex;
|
this.activeItemIndex = newIndex;
|
||||||
|
|||||||
Reference in New Issue
Block a user