This commit is contained in:
@@ -137,7 +137,10 @@
|
||||
<v-card>
|
||||
<v-card-title>{{ $ay.t("UnitWarrantyInfo") }}</v-card-title>
|
||||
<v-card-text>
|
||||
{{ warrantyInfo }}
|
||||
{{
|
||||
value.items[activeWoItemIndex].units[activeItemIndex]
|
||||
.warrantyViz
|
||||
}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn color="primary" text @click="getWarrantyInfo">{{
|
||||
@@ -323,7 +326,8 @@ export default {
|
||||
selectedBulkUnits: [],
|
||||
selectedBulkUnitTags: [],
|
||||
bulkUnitTableHeaders: [],
|
||||
warrantyInfo: null
|
||||
warrantyInfo: {},
|
||||
warrantyDisplay: null
|
||||
};
|
||||
},
|
||||
props: {
|
||||
@@ -375,6 +379,7 @@ export default {
|
||||
methods: {
|
||||
async getWarrantyInfo() {
|
||||
this.warrantyInfo = null;
|
||||
|
||||
const id = this.value.items[this.activeWoItemIndex].units[
|
||||
this.activeItemIndex
|
||||
].unitId;
|
||||
@@ -388,7 +393,19 @@ export default {
|
||||
window.$gz.errorHandler.errorToString(res, this)
|
||||
);
|
||||
} 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() {
|
||||
@@ -434,7 +451,8 @@ export default {
|
||||
isDirty: true,
|
||||
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
|
||||
uid: Date.now(),
|
||||
unitViz: z.unitSerial
|
||||
unitViz: z.unitSerial,
|
||||
warrantyViz: null
|
||||
});
|
||||
});
|
||||
this.$emit("change");
|
||||
@@ -447,7 +465,9 @@ export default {
|
||||
this.value.items[this.activeWoItemIndex].units[
|
||||
this.activeItemIndex
|
||||
].unitViz = newName;
|
||||
this.warrantyInfo = null;
|
||||
this.value.items[this.activeWoItemIndex].units[
|
||||
this.activeItemIndex
|
||||
].warrantyViz = null;
|
||||
},
|
||||
newItem() {
|
||||
let newIndex = this.value.items[this.activeWoItemIndex].units.length;
|
||||
@@ -476,8 +496,10 @@ export default {
|
||||
isDirty: true,
|
||||
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
|
||||
uid: Date.now(),
|
||||
unitViz: null
|
||||
unitViz: null,
|
||||
warrantyViz: null
|
||||
});
|
||||
|
||||
this.$emit("change");
|
||||
this.selectedRow = [{ index: newIndex }];
|
||||
this.activeItemIndex = newIndex;
|
||||
|
||||
Reference in New Issue
Block a user