Merge branch 'develop' into devTee
This commit is contained in:
commit
0af2e8a5d1
14 changed files with 119 additions and 72 deletions
|
|
@ -1,18 +1,24 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
|
|
||||||
|
/** props จาก TableList */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: {
|
modal: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
require: true,
|
||||||
},
|
},
|
||||||
detail: {
|
detail: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
require: true,
|
||||||
},
|
},
|
||||||
colse: {
|
colse: {
|
||||||
type: Function,
|
type: Function,
|
||||||
|
require: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const statusEdit = ref<boolean>(false);
|
const statusEdit = ref<boolean>(false);
|
||||||
// รายละเอียดข้อมูล
|
|
||||||
|
/** รายละเอียดข้อมูล */
|
||||||
const titlename = ref<string>("");
|
const titlename = ref<string>("");
|
||||||
const timeIn = ref<string>("");
|
const timeIn = ref<string>("");
|
||||||
const timeOut = ref<string>("");
|
const timeOut = ref<string>("");
|
||||||
|
|
@ -33,7 +39,8 @@ watch(props, () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// ปิด popup
|
|
||||||
|
/** Function ปิด popup */
|
||||||
function colsePopup() {
|
function colsePopup() {
|
||||||
props.colse ? props.colse() : false;
|
props.colse ? props.colse() : false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,23 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
|
|
||||||
|
/** importType*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
//import Stores
|
|
||||||
|
/** importComponents */
|
||||||
|
import DialogDetail from "@/modules/09_leave/components/1_Work/DialogDetail.vue";
|
||||||
|
|
||||||
|
/** importStores */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||||
|
|
||||||
//importComponents
|
/** useStore */
|
||||||
import DialogDetail from "@/modules/09_leave/components/1_Work/DialogDetail.vue";
|
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const workStore = useWorklistDataStore();
|
const workStore = useWorklistDataStore();
|
||||||
|
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
const { searchDataFn, filterFn } = workStore;
|
const { searchDataFn, filterFn } = workStore;
|
||||||
|
|
||||||
//ข้อมูล Table
|
/** ข้อมูลหัวตาราง*/
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -80,24 +83,29 @@ const visibleColumns = ref<string[]>([
|
||||||
"coordinatesOut",
|
"coordinatesOut",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/** Hook */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
workStore.columns = columns.value;
|
workStore.columns = columns.value;
|
||||||
workStore.visibleColumns = visibleColumns.value;
|
workStore.visibleColumns = visibleColumns.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
//DialogDetail
|
/** ข้อมูล popup */
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const dataDetail = ref<any>([]);
|
const dataDetail = ref<any>([]);
|
||||||
// เปิด popup ลายละเอียด
|
/**
|
||||||
|
* Function openPopup และแสดงรายละเอียด
|
||||||
|
* @param data ข้อมูลรายละเอียด
|
||||||
|
*/
|
||||||
function clickDetail(data: any) {
|
function clickDetail(data: any) {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
dataDetail.value = data;
|
dataDetail.value = data;
|
||||||
} //ปิด popup ลายละเอียด
|
}
|
||||||
|
/** Function ปิด popup */
|
||||||
function colseDeyail() {
|
function colseDeyail() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//pagination
|
/** pagination */
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
descending: true,
|
descending: true,
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
//import Stores
|
/** importStores */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||||
|
/** useStore */
|
||||||
const workStore = useWorklistDataStore();
|
const workStore = useWorklistDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
const { filterFn, searchDataFn } = workStore;
|
const { filterFn, searchDataFn } = workStore;
|
||||||
|
|
||||||
|
/** Functicon หาค่ามากสุดและปิดวันที่ไม่ให้เลือกวันล่วงหน้า*/
|
||||||
function calculateMaxDate() {
|
function calculateMaxDate() {
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
today.setDate(today.getDate());
|
today.setDate(today.getDate());
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
//import Stores
|
/** importStores */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||||
|
/** useStore */
|
||||||
const workStore = useWorklistDataStore();
|
const workStore = useWorklistDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
const { filterFn, searchDataFn } = workStore;
|
const { searchDataFn } = workStore;
|
||||||
|
|
||||||
|
/** Functicon หาค่ามากสุดและปิดวันที่ไม่ให้เลือกวันล่วงหน้า*/
|
||||||
function calculateMaxDate() {
|
function calculateMaxDate() {
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
today.setDate(today.getDate());
|
today.setDate(today.getDate());
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,17 @@
|
||||||
import { ref, reactive, onMounted } from "vue";
|
import { ref, reactive, onMounted } from "vue";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
//importStore
|
/** importStore */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
||||||
import { useLeavelistDataStoreTest } from "@/modules/09_leave/stores/ListLeave";
|
import { useLeavelistDataStoreTest } from "@/modules/09_leave/stores/ListLeave";
|
||||||
|
|
||||||
const APIDATA = useLeavelistDataStoreTest();
|
const APIDATA = useLeavelistDataStoreTest();
|
||||||
|
|
||||||
//importType
|
/** importType */
|
||||||
import type { FremData } from "@/modules/09_leave/interface/request/leave";
|
import type { FremData } from "@/modules/09_leave/interface/request/leave";
|
||||||
|
|
||||||
// importForm
|
/** importForm*/
|
||||||
import FormMain from "@/modules/09_leave/components/2_Leave/formDetail/formMain.vue"; // from ซ้าย
|
import FormMain from "@/modules/09_leave/components/2_Leave/formDetail/formMain.vue"; // from ซ้าย
|
||||||
import FormLeave from "@/modules/09_leave/components/2_Leave/formDetail/formLeave.vue"; // ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว
|
import FormLeave from "@/modules/09_leave/components/2_Leave/formDetail/formLeave.vue"; // ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว
|
||||||
import FormChildbirth from "@/modules/09_leave/components/2_Leave/formDetail/formChildbirth.vue"; // ลาไปช่วยเหลือภริยาที่คลอดบุตร
|
import FormChildbirth from "@/modules/09_leave/components/2_Leave/formDetail/formChildbirth.vue"; // ลาไปช่วยเหลือภริยาที่คลอดบุตร
|
||||||
|
|
@ -25,6 +25,8 @@ import FormLeaveToTraining from "@/modules/09_leave/components/2_Leave/formDetai
|
||||||
import FormLeaveToWorkInternational from "@/modules/09_leave/components/2_Leave/formDetail/formLeaveToWorkInternational.vue"; // ลาไปปฏิบัติงานในองค์การระหว่างประเทศ
|
import FormLeaveToWorkInternational from "@/modules/09_leave/components/2_Leave/formDetail/formLeaveToWorkInternational.vue"; // ลาไปปฏิบัติงานในองค์การระหว่างประเทศ
|
||||||
import FormSpouse from "@/modules/09_leave/components/2_Leave/formDetail/formSpouse.vue"; // ลาติดตามคู่สมรส
|
import FormSpouse from "@/modules/09_leave/components/2_Leave/formDetail/formSpouse.vue"; // ลาติดตามคู่สมรส
|
||||||
import FormVocationalRehabilitation from "@/modules/09_leave/components/2_Leave/formDetail/formVocationalRehabilitation.vue"; //ลาไปฟื้นฟูสมรรถภาพด้านอาชีพ
|
import FormVocationalRehabilitation from "@/modules/09_leave/components/2_Leave/formDetail/formVocationalRehabilitation.vue"; //ลาไปฟื้นฟูสมรรถภาพด้านอาชีพ
|
||||||
|
|
||||||
|
/** use */
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, showLoader, hideLoader, date2Thai } = mixin;
|
const { dialogConfirm, showLoader, hideLoader, date2Thai } = mixin;
|
||||||
|
|
@ -170,17 +172,15 @@ function fetchDetailLeave(paramsId: string) {
|
||||||
formData.historyFollow = e.historyFollow;
|
formData.historyFollow = e.historyFollow;
|
||||||
});
|
});
|
||||||
|
|
||||||
// setTimeout(() => {
|
/** ส่งประเภทของการลาไป Function เช็คประเภทการลา*/
|
||||||
|
|
||||||
checkLeaveType(formData.leaveType ? formData.leaveType : "");
|
checkLeaveType(formData.leaveType ? formData.leaveType : "");
|
||||||
hideLoader();
|
hideLoader();
|
||||||
// }, 1000);
|
|
||||||
}
|
}
|
||||||
/**Status Form การลา*/
|
/**Status Form การลา*/
|
||||||
const checkForm = ref<string>("");
|
const checkForm = ref<string>("");
|
||||||
/**
|
/**
|
||||||
* Function เช็คประเภทการลา
|
* Function เช็คประเภทการลา
|
||||||
* @param type รับค่าประเภทของการลา
|
* @param type รับค่า
|
||||||
*/
|
*/
|
||||||
function checkLeaveType(type: string) {
|
function checkLeaveType(type: string) {
|
||||||
if (type === "leave1" || type === "leave2" || type === "leave3") {
|
if (type === "leave1" || type === "leave2" || type === "leave3") {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@ q
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
//import Stores
|
|
||||||
|
/** importStores*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -11,10 +12,17 @@ const leaveStore = useLeavelistDataStore();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const { date2Thai } = mixin;
|
/** Hook*/
|
||||||
const { optionYear, searchDataFn, filterOption } = leaveStore; // เรียน funtion จาก stores
|
onMounted(() => {
|
||||||
|
leaveStore.columns = columns.value;
|
||||||
|
leaveStore.visibleColumns = visibleColumns.value;
|
||||||
|
});
|
||||||
|
|
||||||
// ข้อมูล TABLE
|
/** เรียน funtion จาก stores*/
|
||||||
|
// const { date2Thai } = mixin;
|
||||||
|
// const { optionYear, searchDataFn, filterOption } = leaveStore;
|
||||||
|
|
||||||
|
/** ข้อมูลหัวตาราง */
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -70,22 +78,11 @@ const visibleColumns = ref<string[]>([
|
||||||
"status",
|
"status",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
leaveStore.columns = columns.value;
|
|
||||||
leaveStore.visibleColumns = visibleColumns.value;
|
|
||||||
});
|
|
||||||
|
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
descending: true,
|
descending: true,
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
|
||||||
const paging = ref<boolean>(true);
|
|
||||||
const paginationLabel = (start: string, end: string, total: string) => {
|
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
|
||||||
else return start + "-" + end + " ใน " + total;
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -101,7 +98,6 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
||||||
dense
|
dense
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:visible-columns="leaveStore.visibleColumns"
|
:visible-columns="leaveStore.visibleColumns"
|
||||||
:pagination-label="paginationLabel"
|
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
:loading="leaveStore.loadTable"
|
:loading="leaveStore.loadTable"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
//import Stores
|
/** importStores*/
|
||||||
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
||||||
|
|
||||||
const leaveStore = useLeavelistDataStore();
|
const leaveStore = useLeavelistDataStore();
|
||||||
|
|
@ -70,7 +70,13 @@ const { searchDataFn, filterOption } = leaveStore;
|
||||||
(inputValue:any, doneFn:Function) =>
|
(inputValue:any, doneFn:Function) =>
|
||||||
filterOption(inputValue, doneFn, 'status')
|
filterOption(inputValue, doneFn, 'status')
|
||||||
"
|
"
|
||||||
/>
|
>
|
||||||
|
<template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template></q-select
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||||
|
|
@ -99,4 +105,4 @@ const { searchDataFn, filterOption } = leaveStore;
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, dialogConfirm, success, messageError } = mixin;
|
const { dialogConfirm, success, messageError } = mixin;
|
||||||
|
|
||||||
/** propsData จาก RoundMain */
|
/** propsData จาก RoundMain */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -134,6 +134,7 @@ async function putRoundDuty(id: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//** Function ปิด Popup */
|
||||||
function close() {
|
function close() {
|
||||||
props.closeDialog?.();
|
props.closeDialog?.();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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, useAttrs, 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([
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,8 @@ const { fetchList, clearFilter } = leaveStore;
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fecthLeaveList();
|
fecthLeaveList();
|
||||||
});
|
});
|
||||||
/**
|
/** เรียกข้อมูลจาก API*/
|
||||||
* เรียกข้อมูลจาก API
|
|
||||||
*/
|
|
||||||
function fecthLeaveList() {
|
function fecthLeaveList() {
|
||||||
console.log(APIDATA.data);
|
|
||||||
|
|
||||||
const data = APIDATA.data;
|
const data = APIDATA.data;
|
||||||
|
|
||||||
fetchList(data); /** ส่งข้อมูลไป stores*/
|
fetchList(data); /** ส่งข้อมูลไป stores*/
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,9 @@ const pagination = ref({
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="props.row.isActive === false"
|
v-if="
|
||||||
|
props.row.isDefault === false && props.row.isActive === false
|
||||||
|
"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,32 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
//import Stores
|
|
||||||
|
/** importStores */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||||
//import Components
|
|
||||||
|
/** import Components */
|
||||||
import TableList from "@/modules/09_leave/components/1_Work/TableList.vue";
|
import TableList from "@/modules/09_leave/components/1_Work/TableList.vue";
|
||||||
import ToolBar from "@/modules/09_leave/components/1_Work/ToolBar.vue";
|
import ToolBar from "@/modules/09_leave/components/1_Work/ToolBar.vue";
|
||||||
// import Type
|
|
||||||
import type {
|
|
||||||
TableRows,
|
|
||||||
DataRes,
|
|
||||||
} from "@/modules/09_leave/interface/response/work";
|
|
||||||
import ToolBarDate from "../components/1_Work/ToolBarDate.vue";
|
import ToolBarDate from "../components/1_Work/ToolBarDate.vue";
|
||||||
// use Store
|
|
||||||
|
/** import Type */
|
||||||
|
import type { DataRes } from "@/modules/09_leave/interface/response/work";
|
||||||
|
|
||||||
|
/** use Store */
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const workStore = useWorklistDataStore();
|
const workStore = useWorklistDataStore();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
const { fetchList } = workStore;
|
const { fetchList } = workStore;
|
||||||
|
|
||||||
const tab = ref("1")
|
const tab = ref("1");
|
||||||
|
|
||||||
|
/** Hook */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fecthWorkList();
|
fecthWorkList();
|
||||||
});
|
});
|
||||||
//เรียกข้อมูลรายการลงเวลาปฏิบัติงาน
|
|
||||||
|
/** เรียกข้อมูลรายการลงเวลาปฏิบัติงาน */
|
||||||
function fecthWorkList() {
|
function fecthWorkList() {
|
||||||
const listData: DataRes[] = [
|
const listData: DataRes[] = [
|
||||||
{
|
{
|
||||||
|
|
@ -98,10 +101,10 @@ function fecthWorkList() {
|
||||||
active-bg-color="teal-1"
|
active-bg-color="teal-1"
|
||||||
active-class="text-primary"
|
active-class="text-primary"
|
||||||
>
|
>
|
||||||
<q-tab name="1" label="รายการลงเวลาที่ประมวลผลแล้ว"/>
|
<q-tab name="1" label="รายการลงเวลาที่ประมวลผลแล้ว" />
|
||||||
<q-tab name="2" label="รายการลงเวลา" />
|
<q-tab name="2" label="รายการลงเวลา" />
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-tab-panels v-model="tab" animated>
|
<q-tab-panels v-model="tab" animated>
|
||||||
|
|
|
||||||
|
|
@ -376,11 +376,12 @@ export const useCounterMixin = defineStore("mixin", () => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
const message = e.response.data.result ?? e.response.data.message;
|
||||||
q.dialog({
|
q.dialog({
|
||||||
component: CustomComponent,
|
component: CustomComponent,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
title: `พบข้อผิดพลาด`,
|
title: `พบข้อผิดพลาด`,
|
||||||
message: `${e.response.data.message}`,
|
message: `${message}`,
|
||||||
icon: "warning",
|
icon: "warning",
|
||||||
color: "red",
|
color: "red",
|
||||||
onlycancel: true,
|
onlycancel: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue