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