diff --git a/src/modules/18_command/components/Step/0_Main.vue b/src/modules/18_command/components/Step/0_Main.vue
index f45c19ae3..cf9415f61 100644
--- a/src/modules/18_command/components/Step/0_Main.vue
+++ b/src/modules/18_command/components/Step/0_Main.vue
@@ -46,6 +46,7 @@ async function fetchData() {
isDraft.value = data.isDraft;
isSign.value = data.isSign;
isAttachment.value = data.isAttachment;
+ store.readonly = step.value === 5;
})
.catch((err) => {
messageError($q, err);
diff --git a/src/modules/18_command/components/Step/1_Detail.vue b/src/modules/18_command/components/Step/1_Detail.vue
index 7ef602a47..d1ab3c6d6 100644
--- a/src/modules/18_command/components/Step/1_Detail.vue
+++ b/src/modules/18_command/components/Step/1_Detail.vue
@@ -1,5 +1,5 @@
diff --git a/src/modules/18_command/components/Step/2_ListPersons.vue b/src/modules/18_command/components/Step/2_ListPersons.vue
index abfd7ec40..a9464e53a 100644
--- a/src/modules/18_command/components/Step/2_ListPersons.vue
+++ b/src/modules/18_command/components/Step/2_ListPersons.vue
@@ -122,9 +122,9 @@ async function onSawpPos(val: any, type: string) {
showLoader();
await http
.get(config.API.commandSwap("tab2", type, val.id))
- .then((res) => {
+ .then(async () => {
+ await getPersonList();
success($q, "แก้ไขข้อมูลสำเร็จ");
- getPersonList();
})
.catch((e) => {
messageError($q, e);
@@ -139,9 +139,9 @@ function onDelete(id: string) {
showLoader();
await http
.delete(config.API.commandAction(id, "tab2"))
- .then((res) => {
+ .then(async () => {
+ await getPersonList();
success($q, "ลบข้อมูลสำเร็จ");
- getPersonList();
})
.catch((e) => {
messageError($q, e);
@@ -228,8 +228,8 @@ async function getPersonList() {
showLoader();
await http
.get(config.API.commandAction(commandId.value, "tab2"))
- .then((res) => {
- const data = res.data.result;
+ .then(async (res) => {
+ const data = await res.data.result;
templatePos.value = data.commandSalaryId;
position.value = data.positionDetail;
rows.value = data.commandRecives;
@@ -248,13 +248,6 @@ onMounted(async () => {
await getCommandSalaryList(props.commandSysId);
}
});
-
-/**
- * ฟังก์ชันที่ต้องการนำฟังก์ชันออกไปใช้ใน Components แม่
- */
-defineExpose({
- onSubmit,
-});
diff --git a/src/modules/18_command/components/Step/3_ReceivedCopy.vue b/src/modules/18_command/components/Step/3_ReceivedCopy.vue
index d8a70db27..4f20c3626 100644
--- a/src/modules/18_command/components/Step/3_ReceivedCopy.vue
+++ b/src/modules/18_command/components/Step/3_ReceivedCopy.vue
@@ -196,13 +196,6 @@ function onSubmit() {
onMounted(() => {
fetchData();
});
-
-/**
- * ฟังก์ชันที่ต้องการนำฟังก์ชันออกไปใช้ใน Components แม่
- */
-defineExpose({
- onSubmit,
-});
diff --git a/src/modules/18_command/views/detail.vue b/src/modules/18_command/views/detail.vue
index 340ced511..0314e0e77 100644
--- a/src/modules/18_command/views/detail.vue
+++ b/src/modules/18_command/views/detail.vue
@@ -1,5 +1,5 @@