fix command
This commit is contained in:
parent
adcb1f034f
commit
d065650e1b
5 changed files with 12 additions and 65 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref, watch } from "vue";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
|
|
@ -102,13 +102,6 @@ onMounted(() => {
|
|||
: props.formCommandList.isBangkok;
|
||||
fetchCheckIdofficer();
|
||||
});
|
||||
|
||||
/**
|
||||
* ฟังก์ชันที่ต้องการนำฟังก์ชันออกไปใช้ใน Components แม่
|
||||
*/
|
||||
defineExpose({
|
||||
onSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -196,13 +196,6 @@ function onSubmit() {
|
|||
onMounted(() => {
|
||||
fetchData();
|
||||
});
|
||||
|
||||
/**
|
||||
* ฟังก์ชันที่ต้องการนำฟังก์ชันออกไปใช้ใน Components แม่
|
||||
*/
|
||||
defineExpose({
|
||||
onSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue