This commit is contained in:
@@ -614,6 +614,10 @@ export default {
|
|||||||
activeWoItemIndex: {
|
activeWoItemIndex: {
|
||||||
default: null,
|
default: null,
|
||||||
type: Number
|
type: Number
|
||||||
|
},
|
||||||
|
gotoIndex: {
|
||||||
|
default: null,
|
||||||
|
type: Number
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -621,6 +625,12 @@ export default {
|
|||||||
if (val != oldVal) {
|
if (val != oldVal) {
|
||||||
this.setDefaultView();
|
this.setDefaultView();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
gotoIndex(val, oldVal) {
|
||||||
|
if (val != oldVal) {
|
||||||
|
this.selectedRow = [{ index: val }];
|
||||||
|
this.activeItemIndex = val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -515,6 +515,7 @@
|
|||||||
v-model="value"
|
v-model="value"
|
||||||
:pvm="pvm"
|
:pvm="pvm"
|
||||||
:active-wo-item-index="activeItemIndex"
|
:active-wo-item-index="activeItemIndex"
|
||||||
|
:goto-index="gotoOutsideServiceIndex"
|
||||||
data-cy="woItemOutsideServices"
|
data-cy="woItemOutsideServices"
|
||||||
@change="$emit('change')"
|
@change="$emit('change')"
|
||||||
/>
|
/>
|
||||||
@@ -559,7 +560,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
activeItemIndex: null,
|
activeItemIndex: null,
|
||||||
selectedRow: [],
|
selectedRow: [],
|
||||||
test: null
|
gotoOutsideServiceIndex: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -623,56 +624,23 @@ export default {
|
|||||||
// WorkOrderItemOutsideService: 73,
|
// WorkOrderItemOutsideService: 73,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// z.expenses.forEach((x, index) => {
|
|
||||||
// x.uid = index;
|
|
||||||
// x.isDirty = false;
|
|
||||||
// });
|
|
||||||
// z.labors.forEach((x, index) => {
|
|
||||||
// x.uid = index;
|
|
||||||
// x.isDirty = false;
|
|
||||||
// });
|
|
||||||
// z.loans.forEach((x, index) => {
|
|
||||||
// x.uid = index;
|
|
||||||
// x.isDirty = false;
|
|
||||||
// });
|
|
||||||
// z.parts.forEach((x, index) => {
|
|
||||||
// x.uid = index;
|
|
||||||
// x.isDirty = false;
|
|
||||||
// });
|
|
||||||
// z.partRequests.forEach((x, index) => {
|
|
||||||
// x.uid = index;
|
|
||||||
// x.isDirty = false;
|
|
||||||
// });
|
|
||||||
// z.scheduledUsers.forEach((x, index) => {
|
|
||||||
// x.uid = index;
|
|
||||||
// x.isDirty = false;
|
|
||||||
// });
|
|
||||||
// z.tasks.forEach((x, index) => {
|
|
||||||
// x.uid = index;
|
|
||||||
// x.isDirty = false;
|
|
||||||
// });
|
|
||||||
// z.travels.forEach((x, index) => {
|
|
||||||
// x.uid = index;
|
|
||||||
// x.isDirty = false;
|
|
||||||
// });
|
|
||||||
// z.units.forEach((x, index) => {
|
|
||||||
// x.uid = index;
|
|
||||||
// x.isDirty = false;
|
|
||||||
// });
|
|
||||||
// z.outsideServices.forEach((x, index) => {
|
|
||||||
// x.uid = index;
|
|
||||||
// x.isDirty = false;
|
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// if (gotype != window.$gz.type.WorkOrder) {
|
|
||||||
// //not workorder? Then must be a descendant so let's gooooooooooo!
|
|
||||||
// this.goto = { type: gotype, id: goid };
|
|
||||||
// }
|
|
||||||
if (navto.woitemindex != null) {
|
if (navto.woitemindex != null) {
|
||||||
this.selectedRow = [{ index: navto.woitemindex }];
|
this.selectedRow = [{ index: navto.woitemindex }];
|
||||||
this.activeItemIndex = navto.woitemindex;
|
this.activeItemIndex = navto.woitemindex;
|
||||||
|
if (navto.childindex != null) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
switch (val.type) {
|
||||||
|
case window.$gz.type.WorkOrderItemOutsideService:
|
||||||
|
this.gotoOutsideServiceIndex = navto.childindex;
|
||||||
|
break;
|
||||||
|
case window.$gz.type.WorkOrderItemScheduledUser:
|
||||||
|
this.gotoScheduledUserIndex = navto.childindex;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user