ประกาศเกษียณอายุราชการ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-19 10:15:14 +07:00
parent 2569fc1573
commit 0de7b3f523
2 changed files with 18 additions and 13 deletions

View file

@ -3,8 +3,8 @@ import { ref } from 'vue'
export const useDataStoreRetirement = defineStore("retirementDatastore", () => {
const tab = ref<any>("officer");
const type = ref<string>("officer");
const clickTab = (role:string) => {
type.value = role
const clickTab = (role: string) => {
type.value = role
}
return {
tab,

View file

@ -13,9 +13,16 @@
indicator-color="primary"
align="left"
>
<q-tab name="officer" label="ขรก.กทม.สามัญ" @click="clickTab('officer')" />
<q-tab name="employee" label="ลูกจ้างประจำ" @click="clickTab('employee')" />
<q-tab
name="officer"
label="ขรก.กทม.สามัญ"
@click="clickTab('officer')"
/>
<q-tab
name="employee"
label="ลูกจ้างประจำ"
@click="clickTab('employee')"
/>
</q-tabs>
</div>
<q-separator />
@ -284,12 +291,12 @@ import { useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useDataStoreRetirement } from '@/modules/06_retirement/storeRetirement'
import { useDataStoreRetirement } from "@/modules/06_retirement/storeRetirement";
import type { resMain } from "@/modules/06_retirement/interface/response/Main";
import { storeToRefs } from "pinia";
const useStoreRetire = useDataStoreRetirement()
const { clickTab} = useStoreRetire
const { tab , type} = storeToRefs(useDataStoreRetirement())
const useStoreRetire = useDataStoreRetirement();
const { clickTab } = useStoreRetire;
const { tab, type } = storeToRefs(useDataStoreRetirement());
const mixin = useCounterMixin();
const { messageError, date2Thai, showLoader, hideLoader, dialogConfirm } =
mixin;
@ -307,7 +314,6 @@ const pagination = ref({
const actionOption = ref<resMain[]>([]);
const action = ref<string>("");
const visibleColumns = ref<string[]>([
"no",
"Date",
@ -484,7 +490,7 @@ const clickAdd = () => {
dialogConfirm(
$q,
async () => {
let data = { type: type, year: currentYear };
let data = { type: useStoreRetire.type, year: currentYear };
await cerateRetirement(data);
},
"ยืนยันการเพิ่มข้อมูลประกาศเกษียณ",
@ -513,7 +519,7 @@ const clickSelect = async (action: string) => {
$q,
async () => {
let data = {
type: type,
type: useStoreRetire.type,
year: currentYear,
retireHistoryId: action,
option: radio.value,
@ -565,7 +571,6 @@ const paginationLabel = (start: string, end: string, total: string) => {
else return start + "-" + end + " ใน " + total;
};
const nextPage = (prop: any) => {
router.push(`/retirement/${prop.id}`);
};