diff --git a/src/modules/05_placement/components/Help-Government/HelpGovernmentDetail.vue b/src/modules/05_placement/components/Help-Government/HelpGovernmentDetail.vue index 5a7f91234..ef2b689ac 100644 --- a/src/modules/05_placement/components/Help-Government/HelpGovernmentDetail.vue +++ b/src/modules/05_placement/components/Help-Government/HelpGovernmentDetail.vue @@ -80,6 +80,7 @@ function onSubmit() { dialogConfirm( $q, () => { + showLoader(); const body = { organizationPositionOld: organizationPositionOld.value, organization: organization.value, @@ -87,7 +88,6 @@ function onSubmit() { dateEnd: dateEnd.value, reason: reason.value, }; - showLoader(); http .put(config.API.officerMainEdit(dataId), body) .then(async () => { diff --git a/src/modules/05_placement/components/Other/OtherDetail.vue b/src/modules/05_placement/components/Other/OtherDetail.vue index 2f62484ae..290d235b4 100644 --- a/src/modules/05_placement/components/Other/OtherDetail.vue +++ b/src/modules/05_placement/components/Other/OtherDetail.vue @@ -94,6 +94,7 @@ function onSubmit() { dialogConfirm( $q, async () => { + showLoader(); let data = { educationOld: educationOld.value, organizationPositionOld: organizationPositionOld.value, diff --git a/src/modules/18_command/components/DialogCreateCommand.vue b/src/modules/18_command/components/DialogCreateCommand.vue index bab69f28e..30937102d 100644 --- a/src/modules/18_command/components/DialogCreateCommand.vue +++ b/src/modules/18_command/components/DialogCreateCommand.vue @@ -131,7 +131,8 @@ const columns = ref([ */ function createCommand(isRedirect: boolean) { dialogConfirm($q, async () => { - const data = props?.persons?.map((e: any) => ({ + showLoader(); + const data = await props?.persons?.map((e: any) => ({ refId: e.id, prefix: e.prefix, firstName: e.firstName, @@ -144,16 +145,15 @@ function createCommand(isRedirect: boolean) { commandTypeId: commandType.value, persons: data, }; - - showLoader(); await http .post(config.API.command + `/person`, body) .then(async (res) => { const id = await res.data.result; + modal.value = false; if (isRedirect) { router.push(`/command/edit/${id}`); } else { - modal.value = false; + // modal.value = false; clearValue(); } }) diff --git a/src/modules/18_command/components/Step/2_ListPersons.vue b/src/modules/18_command/components/Step/2_ListPersons.vue index 848a8d85e..b206f24f0 100644 --- a/src/modules/18_command/components/Step/2_ListPersons.vue +++ b/src/modules/18_command/components/Step/2_ListPersons.vue @@ -242,9 +242,9 @@ async function getPersonList() { } onMounted(async () => { + await getPersonList(); if (props.commandSysId) { await getCommandSalaryList(props.commandSysId); - await getPersonList(); } }); diff --git a/src/modules/18_command/store/DetailStore.ts b/src/modules/18_command/store/DetailStore.ts index 17e77d4fb..5ce3bff4a 100644 --- a/src/modules/18_command/store/DetailStore.ts +++ b/src/modules/18_command/store/DetailStore.ts @@ -19,6 +19,8 @@ export const useCommandDetail = defineStore("commandDetailStore", () => { return 3; case "REPORTED": return 5; + case "NEW": + return 1; default: return 0; }