คอมเม้น code ระบบการลา(เพิ่มเติม)
This commit is contained in:
parent
b202f2ed9d
commit
ef6d41ff56
2 changed files with 33 additions and 6 deletions
|
|
@ -1,17 +1,23 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watchEffect, watch } from "vue";
|
import { ref, reactive, watch } from "vue";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
/** importType */
|
||||||
import type {
|
import type {
|
||||||
changeRoundEdit,
|
changeRoundEdit,
|
||||||
MyObjectRoundChangeRef,
|
MyObjectRoundChangeRef,
|
||||||
} from "@/modules/09_leave/interface/request/changeRound";
|
} from "@/modules/09_leave/interface/request/changeRound";
|
||||||
|
|
||||||
|
/** importStore */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
|
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
|
||||||
|
/** useStore */
|
||||||
const dataStore = useChangeRoundDataStore();
|
const dataStore = useChangeRoundDataStore();
|
||||||
const $q = useQuasar();
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, date2Thai } = mixin;
|
const { dialogConfirm, date2Thai } = mixin;
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
|
|
||||||
const roundRef = ref<Object | null>(null);
|
const roundRef = ref<Object | null>(null);
|
||||||
const resonRef = ref<Object | null>(null);
|
const resonRef = ref<Object | null>(null);
|
||||||
const effectiveDateRef = ref<Object | null>(null);
|
const effectiveDateRef = ref<Object | null>(null);
|
||||||
|
|
@ -38,6 +44,7 @@ const objectRoundChange: MyObjectRoundChangeRef = {
|
||||||
effectiveDate: effectiveDateRef,
|
effectiveDate: effectiveDateRef,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Function validateForm */
|
||||||
function validateForm() {
|
function validateForm() {
|
||||||
const hasError = [];
|
const hasError = [];
|
||||||
for (const key in objectRoundChange) {
|
for (const key in objectRoundChange) {
|
||||||
|
|
@ -55,6 +62,8 @@ function validateForm() {
|
||||||
console.log(hasError);
|
console.log(hasError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Function ยืนยันการบันทึกข้อมูล */
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive } from "vue";
|
import { ref, onMounted, reactive } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
// ค้นหาในตาราง
|
|
||||||
|
/** importType */
|
||||||
import type { dataPost } from "@/modules/09_leave/interface/request/changeRound";
|
import type { dataPost } from "@/modules/09_leave/interface/request/changeRound";
|
||||||
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
|
|
||||||
|
/** importComponents */
|
||||||
import Dialogform from "@/modules/09_leave/components/4_ChangeRound/DialogForm.vue";
|
import Dialogform from "@/modules/09_leave/components/4_ChangeRound/DialogForm.vue";
|
||||||
import Modal from "@/modules/05_placement/components/AppointEmployee/Modal.vue";
|
import Modal from "@/modules/05_placement/components/AppointEmployee/Modal.vue";
|
||||||
|
|
||||||
|
/** importStore */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
const $q = useQuasar();
|
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
|
||||||
|
/** useStore */
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, date2Thai, dialogMessageNotify } = mixin;
|
const { dialogConfirm, date2Thai, dialogMessageNotify } = mixin;
|
||||||
const dataStore = useChangeRoundDataStore();
|
const dataStore = useChangeRoundDataStore();
|
||||||
|
|
||||||
|
/** use */
|
||||||
|
const $q = useQuasar();
|
||||||
|
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const editCheck = ref<string>("");
|
const editCheck = ref<string>("");
|
||||||
const DataRow = ref<any>();
|
const DataRow = ref<any>();
|
||||||
|
|
@ -20,16 +29,23 @@ const formData = reactive<dataPost>({
|
||||||
lastName: "",
|
lastName: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function openPopup
|
||||||
|
* @param check action edit,history
|
||||||
|
* @param detail รายละเอียดข้อมูลรอบการปฏิบัติของผู้ใช้งาน
|
||||||
|
*/
|
||||||
function Openmodal(check: string, detail: any) {
|
function Openmodal(check: string, detail: any) {
|
||||||
DataRow.value = detail;
|
DataRow.value = detail;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
editCheck.value = check;
|
editCheck.value = check;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Function closePopup */
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Function ค้นหาข้อมูล */
|
||||||
function searchData() {
|
function searchData() {
|
||||||
if (formData.cardId || formData.firstName || formData.lastName) {
|
if (formData.cardId || formData.firstName || formData.lastName) {
|
||||||
dataStore.fetchDataForCardId(formData, "click");
|
dataStore.fetchDataForCardId(formData, "click");
|
||||||
|
|
@ -37,6 +53,8 @@ function searchData() {
|
||||||
dialogMessageNotify($q, "กรุณากรอกข้อมูลอย่างน้อย 1 ช่อง");
|
dialogMessageNotify($q, "กรุณากรอกข้อมูลอย่างน้อย 1 ช่อง");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Hook */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
dataStore.fetchDatainHistory([
|
dataStore.fetchDatainHistory([
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue