ปรับวินัย
This commit is contained in:
parent
58c2bfc467
commit
015d2d9857
9 changed files with 35 additions and 50 deletions
|
|
@ -200,13 +200,13 @@ async function onSubmit(data: any) {
|
|||
http
|
||||
.put(config.API.complaintbyId(id.value), data)
|
||||
.then((res) => {
|
||||
getData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
getData();
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,9 +175,7 @@ function onSubmit() {
|
|||
}
|
||||
await props.onSubmit(formData);
|
||||
isSave.value = false;
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ async function onSubmit(data: any) {
|
|||
http
|
||||
.put(config.API.investigateById(id.value), data)
|
||||
.then((res) => {
|
||||
getData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
// router.push(`/discipline/complaints`);
|
||||
})
|
||||
|
|
@ -193,7 +194,6 @@ async function onSubmit(data: any) {
|
|||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
getData();
|
||||
});
|
||||
// router.push(`/discipline/investigatefacts`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,10 +137,6 @@ const formData = reactive<FormData>({
|
|||
});
|
||||
|
||||
const rows = ref([]);
|
||||
const rowsChack = ref([]);
|
||||
const statusStep = computed(() => {
|
||||
return route.name === "/discipline-disciplinaryEdit" ? true : false;
|
||||
});
|
||||
const dateEndInputStyle = computed(() => {
|
||||
const currentDate = new Date();
|
||||
const investigationDateEnd = new Date(formData.investigationDateEnd as Date);
|
||||
|
|
@ -150,7 +146,6 @@ const dateEndInputStyle = computed(() => {
|
|||
investigationDateEnd <=
|
||||
new Date(currentDate.getTime() + 7 * 24 * 60 * 60 * 1000);
|
||||
|
||||
console.log(isInNext7Days);
|
||||
return isInNext7Days ? "input-alert" : "";
|
||||
});
|
||||
|
||||
|
|
@ -173,7 +168,6 @@ function validateForm() {
|
|||
* หากยกเลิกจะกลับไปหน้าฟอร์ม
|
||||
*/
|
||||
function onSubmit() {
|
||||
console.log(formData);
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
|
|
@ -199,9 +193,7 @@ function onSubmit() {
|
|||
props.onSubmit(formData);
|
||||
isSave.value = false;
|
||||
investigationExtendStatus.value = false;
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -621,10 +613,10 @@ watch(
|
|||
);
|
||||
|
||||
function calculateMinDate() {
|
||||
const startDate = new Date(formData.investigationDateStart as Date);
|
||||
startDate.setDate(startDate.getDate() + 1);
|
||||
return startDate;
|
||||
}
|
||||
const startDate = new Date(formData.investigationDateStart as Date);
|
||||
startDate.setDate(startDate.getDate() + 1);
|
||||
return startDate;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
mainStore.rowsAdd = [];
|
||||
|
|
@ -1020,7 +1012,12 @@ onMounted(async () => {
|
|||
</q-icon>
|
||||
</template>
|
||||
<template
|
||||
v-if="formData.investigationDateStart && isReadonly === false && formData.investigationExtendHistory.length === 0"
|
||||
v-if="
|
||||
formData.investigationDateStart &&
|
||||
isReadonly === false &&
|
||||
formData.investigationExtendHistory
|
||||
.length === 0
|
||||
"
|
||||
v-slot:append
|
||||
>
|
||||
<q-icon
|
||||
|
|
@ -1093,7 +1090,12 @@ onMounted(async () => {
|
|||
</q-icon>
|
||||
</template>
|
||||
<template
|
||||
v-if="formData.investigationDateEnd && isReadonly === false && formData.investigationExtendHistory.length === 0"
|
||||
v-if="
|
||||
formData.investigationDateEnd &&
|
||||
isReadonly === false &&
|
||||
formData.investigationExtendHistory
|
||||
.length === 0
|
||||
"
|
||||
v-slot:append
|
||||
>
|
||||
<q-icon
|
||||
|
|
@ -1277,7 +1279,6 @@ onMounted(async () => {
|
|||
:options="mainStore.statusResultOptions"
|
||||
label="ผลการสืบสวน"
|
||||
emit-value
|
||||
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
|
|
|
|||
|
|
@ -220,25 +220,18 @@ async function fetchDetailComplaints() {
|
|||
* @param data ข้อมูล ใน form
|
||||
*/
|
||||
async function onSubmitDisciplinary(data: any) {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.disciplineDisciplinaryById(id.value), data)
|
||||
.then(() => {
|
||||
.then(async () => {
|
||||
await fetchDetailDisciplinary();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {})
|
||||
.finally(async () => {
|
||||
const fetchFunction =
|
||||
store.tabMenu === "disciplinary"
|
||||
? fetchDetailDisciplinary
|
||||
: store.tabMenu === "investigatefacts"
|
||||
? fetchDetailInvestigate
|
||||
: store.tabMenu === "complaints"
|
||||
? fetchDetailComplaints
|
||||
: null;
|
||||
|
||||
if (fetchFunction) {
|
||||
await fetchFunction();
|
||||
}
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -271,13 +264,14 @@ function confirmSentIssueGate() {
|
|||
showLoader();
|
||||
http
|
||||
.get(config.API.disciplinaryApprove(id.value))
|
||||
.then((res) => {})
|
||||
.then((res) => {
|
||||
// fetchDetailDisciplinary();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
router.push(`/discipline/disciplinary`);
|
||||
fetchDetailDisciplinary();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -264,9 +264,7 @@ function onSubmit() {
|
|||
emit("submit:disciplinary", formData);
|
||||
isSave.value = false;
|
||||
extendStatus.value = false;
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -141,9 +141,7 @@ function onSubmit() {
|
|||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {});
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -331,9 +331,7 @@ function onSubmit() {
|
|||
status: formData.status,
|
||||
};
|
||||
props.onSubmit(data);
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,9 +55,7 @@ async function submit() {
|
|||
await props.save(props.id, duty.value, resolution.value);
|
||||
duty.value = "";
|
||||
resolution.value = "";
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลหรือไม่?"
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue