This commit is contained in:
2021-07-28 19:09:37 +00:00
parent eada6c9ace
commit ed0e7dc77c
23 changed files with 12453 additions and 113 deletions

View File

@@ -145,6 +145,52 @@ export default {
});
break;
//### PM AND RELATIVES ###
case ayatype.PMItem:
case ayatype.PMItemExpense:
case ayatype.PMItemLabor:
case ayatype.PMItemLoan:
case ayatype.PMItemOutsideService:
case ayatype.PMItemPart:
case ayatype.PMItemPartRequest:
case ayatype.PMItemScheduledUser:
case ayatype.PMItemTask:
case ayatype.PMItemTravel:
case ayatype.PMItemUnit:
(async () => {
try {
let res = await window.$gz.api.get(
`search/ancestor/${tid.type}/${tid.id}`
);
if (res.error) {
throw new Error(
window.$gz.errorHandler.errorToString(res, vm)
);
}
if (res.data.id && res.data.id != 0) {
this.handleOpenObjectClick(vm, {
type: ayatype.PM,
id: res.data.id,
gotype: tid.type,
goid: tid.id
});
return;
}
} catch (e) {
//throw new Error(e);
throw new Error(window.$gz.errorHandler.errorToString(e, vm));
}
})();
break;
case ayatype.PM:
vm.$router.push({
name: "pm-edit",
params: { recordid: tid.id, gotype: tid.gotype, goid: tid.goid }
});
break;
case ayatype.Memo:
vm.$router.push({
name: "memo-edit",