PM Dawn
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user