Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into me
# Conflicts: # src/modules/04_registry/components/Profile.vue
This commit is contained in:
commit
380c628099
11 changed files with 328 additions and 440 deletions
|
|
@ -495,7 +495,7 @@
|
|||
dense
|
||||
outlined
|
||||
v-model="reasonDeath"
|
||||
label="เหตุผลการเสีบชีวิต"
|
||||
label="เหตุผลการเสียชีวิต"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -131,32 +131,8 @@ const fecthTypeOption = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
const rows = ref<any>([
|
||||
// {
|
||||
// personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1",
|
||||
// citizenId: "1234444332222",
|
||||
// fullname: "นางสาวอย พชช",
|
||||
// organizationName: "นักจัดการงานทั่วไป",
|
||||
// orgName: "กลุ่มงานช่วยนักบริหาร",
|
||||
// organizationShortName: "สกจ.",
|
||||
// positionNumber: "กก. 1",
|
||||
// positionPath: "นักจัดการงานทั่วไป",
|
||||
// birthday: dateText(new Date("1989-09-03")),
|
||||
// },
|
||||
]);
|
||||
const rows2 = ref<any>([
|
||||
// {
|
||||
// personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1",
|
||||
// citizenId: "1234444332222",
|
||||
// fullname: "นางสาวอย พชช",
|
||||
// organizationName: "นักจัดการงานทั่วไป",
|
||||
// orgName: "กลุ่มงานช่วยนักบริหาร",
|
||||
// organizationShortName: "สกจ.",
|
||||
// positionNumber: "กก. 1",
|
||||
// positionPath: "นักจัดการงานทั่วไป",
|
||||
// birthday: dateText(new Date("1989-09-03")),
|
||||
// },
|
||||
]);
|
||||
const rows = ref<any>([]);
|
||||
const rows2 = ref<any>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -714,7 +690,7 @@ const status = (val: string) => {
|
|||
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
<q-btn
|
||||
label="ส่งไปรายการแต่งตั้ง-เลื่อน"
|
||||
label="ส่งไปออกคำสั่ง"
|
||||
@click="clickAddlist"
|
||||
color="public"
|
||||
:disable="checkSelected"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
{{ title.fullname }}
|
||||
</div>
|
||||
<q-space />
|
||||
<q-btn
|
||||
<!-- <q-btn
|
||||
outline
|
||||
color="blue"
|
||||
dense
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
class="q-px-sm"
|
||||
label="ดูข้อมูลทะเบียนประวัติ"
|
||||
@click="router.push(`/registry/${paramsId}`)"
|
||||
/>
|
||||
/> -->
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="row col-12 q-pa-md">
|
||||
|
|
|
|||
|
|
@ -17,15 +17,6 @@ const TabsTemplate2Format2 = defineAsyncComponent(
|
|||
const TabsTemplate3 = defineAsyncComponent(
|
||||
() => import("@/modules/05_placement/components/probation/FormEvaluation/Template3.vue")
|
||||
);
|
||||
// const Tabs2 = defineAsyncComponent(
|
||||
// () => import("@/modules/05_placement/components/probation/tabs/tabs2.vue")
|
||||
// );
|
||||
const Tabs3 = defineAsyncComponent(
|
||||
() => import("@/modules/05_placement/components/probation/tabs/tabs3.vue")
|
||||
);
|
||||
const Tabs4 = defineAsyncComponent(
|
||||
() => import("@/modules/05_placement/components/probation/tabs/tabs4.vue")
|
||||
);
|
||||
|
||||
const router = useRouter();
|
||||
const drawer = ref<boolean>(true);
|
||||
|
|
@ -76,7 +67,7 @@ const activeTab = ref<string>("tab1");
|
|||
</q-item-section> -->
|
||||
|
||||
<q-item-section>
|
||||
แบบประเมินผล<br/>(ผู้บังคับบัญชา)
|
||||
แบบประเมินผล<br />(ผู้บังคับบัญชา)
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
|
|
@ -87,7 +78,7 @@ const activeTab = ref<string>("tab1");
|
|||
</q-item-section> -->
|
||||
|
||||
<q-item-section>
|
||||
แบบประเมินผล<br/>(คณะกรรมการ)
|
||||
แบบประเมินผล<br />(คณะกรรมการ)
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
|
|
@ -98,9 +89,15 @@ const activeTab = ref<string>("tab1");
|
|||
</q-item-section> -->
|
||||
|
||||
<q-item-section>
|
||||
แบบรายงาน<br/>การประเมินฯ
|
||||
แบบรายงาน<br />การประเมินฯ
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item>
|
||||
<q-item-section>
|
||||
ผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
</q-list>
|
||||
</q-scroll-area>
|
||||
</q-drawer>
|
||||
|
|
@ -112,7 +109,7 @@ const activeTab = ref<string>("tab1");
|
|||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="tab2">
|
||||
<TabsTemplate1 :activeTab="activeTab"/>
|
||||
<TabsTemplate1 :activeTab="activeTab" />
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="tab3">
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ const {
|
|||
dateToISO,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
|
|
@ -232,6 +233,32 @@ const clickProposals = (file: string) => {
|
|||
window.open(file);
|
||||
}
|
||||
};
|
||||
const clickListInsignia = async (propsId: string) => {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await getRequest(propsId);
|
||||
},
|
||||
"ยืนยันการคำนวณราชชื่อผู้ได้รับเครื่องราช",
|
||||
"ต้องการยืนยันการคำนวณราชชื่อผู้ได้รับเครื่องราชนี้หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
const getRequest = async (id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.requestInsignia(id))
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
success($q, "ยืนยันสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
});
|
||||
};
|
||||
|
||||
// ค้นหาในตาราง
|
||||
const filterKeyword = ref<string>("");
|
||||
|
|
@ -338,6 +365,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
</q-th>
|
||||
<q-th auto-width />
|
||||
<q-th auto-width />
|
||||
<q-th auto-width />
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
|
|
@ -390,6 +418,19 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
@click="clickEdit(props.row)"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click="clickListInsignia(props.row.id)"
|
||||
icon="mdi-account-star"
|
||||
>
|
||||
<q-tooltip>ผู้ได้รับเครื่องราชฯ</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
dense
|
||||
|
|
@ -436,8 +477,6 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
</q-card>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<style lang="scss" scope>
|
||||
.filter-card {
|
||||
background-color: #f1f1f1b0;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,14 @@ import { onMounted, ref, watch } from "vue";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogRemove, dialogConfirm } = mixin;
|
||||
const $q = useQuasar();
|
||||
const DataStore = useInsigniaDataStore();
|
||||
|
||||
const modalNote = ref<boolean>(false);
|
||||
const organization = ref<number>(1);
|
||||
|
|
@ -187,6 +191,39 @@ const titleModal = ref<string>("");
|
|||
const actionModal = ref<string>("");
|
||||
const person = ref<any>([]);
|
||||
|
||||
const props = defineProps({
|
||||
tab: {
|
||||
type: String,
|
||||
},
|
||||
roundId: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
onMounted(async () => {
|
||||
console.log(props);
|
||||
|
||||
organizationOptions.value = DataStore.optionsTypeOc;
|
||||
console.log(organizationOptions.value);
|
||||
await fecthInsignia();
|
||||
});
|
||||
|
||||
const fecthInsignia = async () => {
|
||||
for (const item of DataStore.optionsTypeOc) {
|
||||
console.log(item.index);
|
||||
|
||||
// await http
|
||||
// .get(
|
||||
// config.API.insigniaList(props.roundId, item["id"], "officer", props.tab)
|
||||
// )
|
||||
// .then((res) => {
|
||||
// console.log(res);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
}
|
||||
};
|
||||
|
||||
const clickAction = (props: any, action: string) => {
|
||||
Note.value = "";
|
||||
person.value = props;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type {
|
||||
FormMainProbation,
|
||||
FormMainProbation2,
|
||||
} from "@/modules/05_placement/interface/request/Main";
|
||||
import type { DataOption1 } from "@/modules/05_placement/interface/index/Main";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import DialogHeader from "@/modules/07_insignia/components/DialogHeader.vue";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { resMain } from "@/modules/06_retirement/interface/response/Main";
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
|
||||
import cardTop from "@/modules/07_insignia/components/2_Manage/StatCard.vue";
|
||||
import tab1 from "@/modules/07_insignia/components/2_Manage/Tab1.vue";
|
||||
|
|
@ -20,20 +14,20 @@ import tab2 from "@/modules/07_insignia/components/2_Manage/Tab2.vue";
|
|||
import tab3 from "@/modules/07_insignia/components/2_Manage/Tab3.vue";
|
||||
import tab4 from "@/modules/07_insignia/components/2_Manage/Tab4.vue";
|
||||
|
||||
const Note = ref<string>("");
|
||||
const addNote = ref<boolean>(false);
|
||||
const saveWriteNote = ref<any[]>([]);
|
||||
const DataStore = useInsigniaDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, date2Thai, showLoader, hideLoader, dialogMessage } =
|
||||
mixin;
|
||||
const router = useRouter();
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
|
||||
const loading = ref<boolean>(false);
|
||||
const round = ref<string>("");
|
||||
const optionRound = ref<any>([]);
|
||||
// const typeOc = ref<string>("kljkljk");
|
||||
const optiontypeOc = ref<any>([]);
|
||||
|
||||
const optionRound = ref<DataOption1[]>([]);
|
||||
|
||||
const tab = ref<any>("haveInsignia");
|
||||
const tab = ref<any>("pending");
|
||||
const stat = ref<any>({
|
||||
total: 0,
|
||||
sendName: 0,
|
||||
|
|
@ -42,20 +36,48 @@ const stat = ref<any>({
|
|||
disclaim: 0,
|
||||
});
|
||||
onMounted(async () => {
|
||||
console.log(DataStore.optionsTypeOc);
|
||||
|
||||
await fecthlistRound();
|
||||
await fecthType();
|
||||
});
|
||||
const fecthlistRound = async () => {
|
||||
await http
|
||||
.get(config.API.listRoundInsignia("insignia"))
|
||||
.then((res: any) => {
|
||||
optionRound.value = res.data.result.map((e) => ({
|
||||
optionRound.value = res.data.result.map((e: any) => ({
|
||||
id: e.period_id,
|
||||
year: e.period_year,
|
||||
name: `รอบการเสนอพระราชทานเครื่องราช ${e.period_name} ปี ${e.period_year} `,
|
||||
}));
|
||||
console.log(optionRound.value);
|
||||
// const lastIndex = optionRound.value.length;
|
||||
const lastValue = optionRound.value[0];
|
||||
round.value = lastValue.id.toString();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
// messageError($q, err);
|
||||
});
|
||||
};
|
||||
const fecthType = async () => {
|
||||
await http
|
||||
.get(config.API.typeOc())
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
optiontypeOc.value = res.data.result.map((e: any) => ({
|
||||
id: e.organizationId,
|
||||
name: e.organizationName,
|
||||
}));
|
||||
console.log(typeof optiontypeOc.value);
|
||||
DataStore.optionsTypeOc = optiontypeOc.value;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
// messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = true;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
@ -105,7 +127,7 @@ const fecthlistRound = async () => {
|
|||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-card flat bordered class="col-12 q-mt-sm">
|
||||
<q-card flat bordered class="col-12 q-mt-sm" v-if="loading">
|
||||
<div class="row col-12">
|
||||
<q-tabs
|
||||
v-model="tab"
|
||||
|
|
@ -116,25 +138,25 @@ const fecthlistRound = async () => {
|
|||
indicator-color="primary"
|
||||
align="left"
|
||||
>
|
||||
<q-tab name="haveInsignia" label="ผู้ที่ได้รับพระราชทานเครื่องราชฯ" />
|
||||
<q-tab name="personNotapply" label="คนที่ไม่ยื่นขอ" />
|
||||
<q-tab name="personRemoved" label="คนที่ถูกลบออก" />
|
||||
<q-tab name="nonInsignia" label="หน่วยงานที่ยังไม่ได้ส่งรายชื่อ" />
|
||||
<q-tab name="pending" label="ผู้ที่ได้รับพระราชทานเครื่องราชฯ" />
|
||||
<q-tab name="reject" label="คนที่ไม่ยื่นขอ" />
|
||||
<q-tab name="delete" label="คนที่ถูกลบออก" />
|
||||
<q-tab name="organization" label="หน่วยงานที่ยังไม่ได้ส่งรายชื่อ" />
|
||||
</q-tabs>
|
||||
</div>
|
||||
<q-separator />
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="haveInsignia">
|
||||
<tab1 />
|
||||
<q-tab-panel name="pending">
|
||||
<tab1 :tab="tab" :roundId="round" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="personNotapply">
|
||||
<tab2 />
|
||||
<q-tab-panel name="reject">
|
||||
<tab2 :tab="tab" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="personRemoved">
|
||||
<tab3 />
|
||||
<q-tab-panel name="delete">
|
||||
<tab3 :tab="tab" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="nonInsignia">
|
||||
<tab4 />
|
||||
<q-tab-panel name="organization">
|
||||
<tab4 :tab="tab" />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref, } from "vue";
|
||||
|
||||
export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||
return {};
|
||||
let optionsTypeOc = ref<any>([]);
|
||||
return {
|
||||
optionsTypeOc
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,62 +7,26 @@
|
|||
<q-btn flat round color="primary" @click="clickAdd" icon="mdi-plus">
|
||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
icon="mdi-account-arrow-right"
|
||||
@click="clickAddOrder"
|
||||
/>
|
||||
<q-btn flat round color="primary" icon="mdi-account-arrow-right" @click="clickAddOrder" />
|
||||
<q-space />
|
||||
<div class="items-center" style="display: flex">
|
||||
<!-- ค้นหาข้อความใน table -->
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="filter"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
class="q-ml-sm"
|
||||
>
|
||||
<q-input standout dense v-model="filter" ref="filterRef" outlined debounce="300" placeholder="ค้นหา"
|
||||
style="max-width: 200px" class="q-ml-sm">
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filter == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filter !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
<q-icon v-if="filter !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
||||
</template>
|
||||
</q-input>
|
||||
<!-- แสดงคอลัมน์ใน table -->
|
||||
<q-select
|
||||
v-model="visibleColumnsEmployeeTemp"
|
||||
:display-value="$q.lang.table.columns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
:options="columns"
|
||||
options-dense
|
||||
option-value="name"
|
||||
map-options
|
||||
emit-value
|
||||
style="min-width: 150px"
|
||||
class="gt-xs q-ml-sm"
|
||||
/>
|
||||
<q-select v-model="visibleColumnsEmployeeTemp" :display-value="$q.lang.table.columns" multiple outlined dense
|
||||
:options="columns" options-dense option-value="name" map-options emit-value style="min-width: 150px"
|
||||
class="gt-xs q-ml-sm" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 q-pt-sm">
|
||||
<d-table
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:visible-columns="visibleColumnsEmployeeTemp"
|
||||
:filter="filter"
|
||||
row-key="id"
|
||||
>
|
||||
<d-table :rows="rows" :columns="columns" :visible-columns="visibleColumnsEmployeeTemp" :filter="filter"
|
||||
row-key="id">
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
|
|
@ -76,25 +40,13 @@
|
|||
<q-td key="no" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="fullname"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="fullname" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.fullname }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="newAgency"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<div
|
||||
class="col-12"
|
||||
v-if="
|
||||
props.row.draftOrganizationOrganization == null &&
|
||||
props.row.draftPositionEmployee == null
|
||||
"
|
||||
>
|
||||
<q-td key="newAgency" :props="props" @click="redirectToPage(props.row.id)">
|
||||
<div class="col-12" v-if="props.row.draftOrganizationOrganization == null &&
|
||||
props.row.draftPositionEmployee == null
|
||||
">
|
||||
<div class="text-weight-medium">
|
||||
{{ "-" }}
|
||||
</div>
|
||||
|
|
@ -108,15 +60,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td
|
||||
key="currentAgency"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<div
|
||||
class="col-12"
|
||||
v-if="props.row.oc == null && props.row.position == null"
|
||||
>
|
||||
<q-td key="currentAgency" :props="props" @click="redirectToPage(props.row.id)">
|
||||
<div class="col-12" v-if="props.row.oc == null && props.row.position == null">
|
||||
<div class="text-weight-medium">
|
||||
{{ "-" }}
|
||||
</div>
|
||||
|
|
@ -161,124 +106,53 @@
|
|||
<q-td key="oc" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.oc }}
|
||||
</q-td> -->
|
||||
<q-td
|
||||
key="amount"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="amount" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.amount }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="govAge"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="govAge" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.govAge }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="dateAppoint"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="dateAppoint" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.dateAppoint }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="dateStart"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="dateStart" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.dateStart }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="salaryDate"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="salaryDate" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.salaryDate }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="refSalary"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="refSalary" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.refSalary }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="age"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="age" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.age }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="fullnameOld"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="fullnameOld" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.fullnameOld }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="createdAt"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="createdAt" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.createdAt }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="isLeave"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="isLeave" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.isLeave }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="leaveDateOrder"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.id)"
|
||||
>
|
||||
<q-td key="leaveDateOrder" :props="props" @click="redirectToPage(props.row.id)">
|
||||
{{ props.row.leaveDateOrder }}
|
||||
</q-td>
|
||||
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
>
|
||||
<q-btn icon="mdi-dots-vertical" size="12px" color="grey-7" flat round dense>
|
||||
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
||||
<q-list dense style="min-width: 160px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="editDetail(props.row)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-icon
|
||||
color="blue"
|
||||
size="xs"
|
||||
name="mdi-account-settings"
|
||||
/>
|
||||
<q-item clickable v-close-popup @click="editDetail(props.row)">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-icon color="blue" size="xs" name="mdi-account-settings" />
|
||||
</q-item-section>
|
||||
<q-item-section>กำหนดตำแหน่ง</q-item-section>
|
||||
</q-item>
|
||||
<q-separator />
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickDelete(props.row.id)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="clickDelete(props.row.id)">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-icon color="red" size="xs" name="mdi-delete" />
|
||||
</q-item-section>
|
||||
<q-item-section>ลบ</q-item-section>
|
||||
|
|
@ -299,34 +173,16 @@
|
|||
<DialogHeader tittle="กำหนดตำแหน่ง" :close="modalOpenClose" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-pa-sm">
|
||||
<d-table
|
||||
:rows="rowsPosition"
|
||||
:columns="columnsPosition"
|
||||
row-key="id"
|
||||
selection="single"
|
||||
v-model:selected="selectedPosition"
|
||||
:visible-columns="visibleColumnsPosition"
|
||||
>
|
||||
<d-table :rows="rowsPosition" :columns="columnsPosition" row-key="id" selection="single"
|
||||
v-model:selected="selectedPosition" :visible-columns="visibleColumnsPosition">
|
||||
<template v-slot:body-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
<q-checkbox keep-color color="primary" dense v-model="scope.selected" />
|
||||
</template>
|
||||
</d-table>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
dense
|
||||
unelevated
|
||||
label="บันทึก"
|
||||
color="public"
|
||||
@click="checkSave"
|
||||
class="q-px-md"
|
||||
><!-- icon="mdi-content-save-outline"
|
||||
<q-btn dense unelevated label="บันทึก" color="public" @click="checkSave" class="q-px-md"><!-- icon="mdi-content-save-outline"
|
||||
<q-tooltip>บันทึก</q-tooltip> -->
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
|
|
@ -336,24 +192,14 @@
|
|||
<!-- dialog ส่งรายชื่อไปออกคำสั่ง -->
|
||||
<q-dialog v-model="modaladdOrder">
|
||||
<q-card style="width: 900px; max-width: 80vw">
|
||||
<DialogHeader
|
||||
tittle="ส่งรายชื่อไปออกคำสั่ง"
|
||||
:close="clickCloseSendModal"
|
||||
/>
|
||||
<DialogHeader tittle="ส่งรายชื่อไปออกคำสั่ง" :close="clickCloseSendModal" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-pt-none">
|
||||
<div class="row justify-end">
|
||||
<div class="col-5">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
v-model="filter"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 850px; max-width: auto"
|
||||
>
|
||||
<q-input borderless outlined dense debounce="300" v-model="filter" placeholder="ค้นหา"
|
||||
style="width: 850px; max-width: auto">
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
|
|
@ -362,32 +208,15 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<d-table
|
||||
:rows="rowsOrder"
|
||||
:columns="columnsOrder"
|
||||
:visible-columns="visibleColumnsOrder"
|
||||
:filter="filter"
|
||||
row-key="id"
|
||||
selection="single"
|
||||
v-model:selected="selectedToOrder"
|
||||
>
|
||||
<d-table :rows="rowsOrder" :columns="columnsOrder" :visible-columns="visibleColumnsOrder" :filter="filter"
|
||||
row-key="id" selection="single" v-model:selected="selectedToOrder">
|
||||
<template v-slot:body-selection="scope">
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="scope.selected"
|
||||
/>
|
||||
<q-checkbox keep-color color="primary" dense v-model="scope.selected" />
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/>
|
||||
<q-checkbox keep-color color="primary" dense v-model="props.selected" />
|
||||
</q-td>
|
||||
<q-td key="no" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
|
|
@ -449,7 +278,7 @@
|
|||
</q-card-section>
|
||||
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
<q-btn label="บันทึก" @click="checkSaveOrder" color="public" />
|
||||
<q-btn label="ส่งไปออกคำสั่ง" @click="checkSaveOrder" color="public" />
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
|
@ -1168,8 +997,8 @@ const checkNull = (text: string) =>
|
|||
text == null
|
||||
? ""
|
||||
: text == "00000000-0000-0000-0000-000000000000"
|
||||
? ""
|
||||
: text;
|
||||
? ""
|
||||
: text;
|
||||
|
||||
const getPosition = async (id: string) => {
|
||||
showLoader();
|
||||
|
|
@ -1251,7 +1080,7 @@ const getPosition = async (id: string) => {
|
|||
const clickAddOrder = () => {
|
||||
modaladdOrder.value = true;
|
||||
const filteredRows = rowsOrder.value.filter(
|
||||
(row) => row.positionEmployeePosition !== null
|
||||
(row) => row.draftPositionEmployee !== null
|
||||
);
|
||||
rowsOrder.value = filteredRows;
|
||||
};
|
||||
|
|
@ -1259,8 +1088,8 @@ const clickAddOrder = () => {
|
|||
const clickCloseSendModal = () => {
|
||||
modaladdOrder.value = false;
|
||||
};
|
||||
const checkSave = () =>{
|
||||
dialogConfirm($q,async() => await saveData())
|
||||
const checkSave = () => {
|
||||
dialogConfirm($q, async () => await saveData())
|
||||
}
|
||||
const saveData = async () => {
|
||||
if (selectedPosition.value.length == 0) {
|
||||
|
|
@ -1280,26 +1109,36 @@ const saveData = async () => {
|
|||
await savePosition();
|
||||
}
|
||||
};
|
||||
const checkSaveOrder = () =>{
|
||||
dialogConfirm($q,async() => await SaveOrder())
|
||||
const checkSaveOrder = () => {
|
||||
dialogConfirm($q, () => SaveOrder())
|
||||
}
|
||||
const SaveOrder = async () => {
|
||||
if (selectedToOrder.value.length == 0) {
|
||||
dialogMessageNotify(
|
||||
$q,
|
||||
"ไม่สามารถบันทึกข้อมูลได้ กรุณาเลือกตำแหน่ง",
|
||||
// "กรุณาเลือกตำแหน่ง",
|
||||
// "warning",
|
||||
// undefined,
|
||||
// "orange",
|
||||
// undefined,
|
||||
// undefined,
|
||||
// true
|
||||
);
|
||||
return;
|
||||
} else {
|
||||
await saveOrder();
|
||||
}
|
||||
// ส่งไปออกคำสั่ง
|
||||
let pId: string[] = [];
|
||||
selectedToOrder.value.forEach((e: any) => {
|
||||
pId.push(e.id);
|
||||
});
|
||||
let data = {
|
||||
id: pId,
|
||||
};
|
||||
console.log(data);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.organizationEmployeeSendOrder, data)
|
||||
.then((res: any) => {
|
||||
// console.log(res);
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.catch((e: any) => {
|
||||
// console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
modaladdOrder.value = false;
|
||||
await showEmployeeTemp();
|
||||
selectedToOrder.value = [];
|
||||
});
|
||||
};
|
||||
|
||||
const savePosition = async () => {
|
||||
|
|
@ -1321,25 +1160,6 @@ const savePosition = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
const saveOrder = async () => {
|
||||
// showLoader();
|
||||
// const data = {
|
||||
// organizationEmployeeId: selectedPosition.value[0].id,
|
||||
// };
|
||||
// await http
|
||||
// .put(config.API.organizationEmployeePositionId(id.value), data)
|
||||
// .then((res) => {
|
||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// await nodeTree();
|
||||
// modalOpenClose();
|
||||
// });
|
||||
};
|
||||
|
||||
const modalOpenClose = () => {
|
||||
modal.value = !modal.value;
|
||||
if (!modal.value) {
|
||||
|
|
@ -1349,9 +1169,9 @@ const modalOpenClose = () => {
|
|||
}
|
||||
};
|
||||
|
||||
const next = (id: string) => {
|
||||
router.push(`/registry-employee/${id}`);
|
||||
};
|
||||
// const next = (id: string) => {
|
||||
// router.push(`/registry-employee/${id}`);
|
||||
// };
|
||||
|
||||
const resetFilter = () => {
|
||||
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
||||
|
|
@ -1359,31 +1179,12 @@ const resetFilter = () => {
|
|||
filterRef.value!.focus();
|
||||
};
|
||||
|
||||
const getClass = (val: boolean) => {
|
||||
return {
|
||||
"full-width inputgreen cursor-pointer": val,
|
||||
"full-width cursor-pointer": !val,
|
||||
};
|
||||
};
|
||||
|
||||
const clickClose = async () => {
|
||||
// if (editRow.value == true) {
|
||||
// dialogMessage(
|
||||
// $q,
|
||||
// "ข้อมูลมีการแก้ไข",
|
||||
// "ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่?",
|
||||
// "mdi-help-circle-outline",
|
||||
// "ตกลง",
|
||||
// "orange",
|
||||
// () => (modal.value = false),
|
||||
// undefined
|
||||
// );
|
||||
// } else {
|
||||
modal.value = false;
|
||||
// next.value = false;
|
||||
// previous.value = false;
|
||||
// }
|
||||
};
|
||||
// const getClass = (val: boolean) => {
|
||||
// return {
|
||||
// "full-width inputgreen cursor-pointer": val,
|
||||
// "full-width cursor-pointer": !val,
|
||||
// };
|
||||
// };
|
||||
|
||||
const clickAdd = () => {
|
||||
// modal.value = true;
|
||||
|
|
@ -1404,24 +1205,24 @@ const editDetail = async (row: any) => {
|
|||
};
|
||||
|
||||
|
||||
const clickDelete = (id: string) =>{
|
||||
dialogRemove($q,async () => await deleteData(id))
|
||||
const clickDelete = (id: string) => {
|
||||
dialogRemove($q, async () => await deleteData(id))
|
||||
}
|
||||
|
||||
const deleteData = async(id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileInforId(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลการสอบสำเร็จ");
|
||||
showEmployeeTemp();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
})
|
||||
const deleteData = async (id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileInforId(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
showEmployeeTemp();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
})
|
||||
};
|
||||
|
||||
const nodeTree = async () => {
|
||||
|
|
@ -1440,11 +1241,13 @@ const nodeTree = async () => {
|
|||
.finally(async () => {
|
||||
hideLoader();
|
||||
await showEmployeeTemp();
|
||||
await showEmployeeTempOrder();
|
||||
// await showEmployeeTempOrder();
|
||||
});
|
||||
};
|
||||
|
||||
const showEmployeeTemp = async () => {
|
||||
showLoader();
|
||||
|
||||
let cirteria = [];
|
||||
|
||||
cirteria.push({
|
||||
|
|
@ -1457,8 +1260,7 @@ const showEmployeeTemp = async () => {
|
|||
criteriaValue: "false",
|
||||
});
|
||||
|
||||
if (selected.value == null || selected.value == "") return;
|
||||
showLoader();
|
||||
if (selected.value == null) return;
|
||||
await http
|
||||
.post(config.API.searchProfileTemp("all"), {
|
||||
criterias: cirteria,
|
||||
|
|
@ -1498,6 +1300,8 @@ const showEmployeeTemp = async () => {
|
|||
draftPositionEmployee: e.draftPositionEmployee,
|
||||
draftOrganizationOrganization: e.draftOrganizationOrganization,
|
||||
});
|
||||
|
||||
rowsOrder.value = rows.value.filter((e: any) => e.draftPositionEmployee !== null);
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -1508,70 +1312,70 @@ const showEmployeeTemp = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
const showEmployeeTempOrder = async () => {
|
||||
let cirteria = [];
|
||||
// const showEmployeeTempOrder = async () => {
|
||||
// let cirteria = [];
|
||||
|
||||
cirteria.push({
|
||||
criteriaType: "employee_class",
|
||||
criteriaValue: "temp",
|
||||
});
|
||||
// cirteria.push({
|
||||
// criteriaType: "employee_class",
|
||||
// criteriaValue: "temp",
|
||||
// });
|
||||
|
||||
cirteria.push({
|
||||
criteriaType: "is_retire",
|
||||
criteriaValue: "false",
|
||||
});
|
||||
// cirteria.push({
|
||||
// criteriaType: "is_retire",
|
||||
// criteriaValue: "false",
|
||||
// });
|
||||
|
||||
if (selected.value == null || selected.value == "") return;
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.searchProfileTemp("all"), {
|
||||
criterias: cirteria,
|
||||
})
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
rowsOrder.value = [];
|
||||
data.map((e: ResponseEmployeeTemp) => {
|
||||
rowsOrder.value.push({
|
||||
id: e.id,
|
||||
fullname: e.fullname,
|
||||
fullnameOld: e.fullnameOld,
|
||||
position: e.position,
|
||||
positionPathSide: e.positionPathSide,
|
||||
positionLine: e.positionLine,
|
||||
govAge: e.govAge,
|
||||
positionEmployeePosition: e.positionEmployeePosition,
|
||||
positionEmployeePositionSide: e.positionEmployeePositionSide,
|
||||
positionEmployeeGroup: e.positionEmployeeGroup,
|
||||
oc: e.oc,
|
||||
age: e.age,
|
||||
amount: e.amount == null ? "" : e.amount.toLocaleString(),
|
||||
refSalary: e.refSalary,
|
||||
dateAppoint:
|
||||
e.dateAppoint == null ? null : date2Thai(new Date(e.dateAppoint)),
|
||||
dateStart:
|
||||
e.dateStart == null ? null : date2Thai(new Date(e.dateStart)),
|
||||
createdAt:
|
||||
e.createdAt == null ? null : date2Thai(new Date(e.createdAt)),
|
||||
isLeave: e.isLeave == false ? "ครอง" : `${typeRetire(e.leaveReason)}`,
|
||||
leaveDateOrder:
|
||||
e.leaveDateOrder == null
|
||||
? null
|
||||
: date2Thai(new Date(e.leaveDateOrder)),
|
||||
newAgency: "",
|
||||
currentAgency: "",
|
||||
draftPositionEmployee: e.draftPositionEmployee,
|
||||
draftOrganizationOrganization: e.draftOrganizationOrganization,
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
// console.log(rowsOrder);
|
||||
});
|
||||
};
|
||||
// if (selected.value == null || selected.value == "") return;
|
||||
// showLoader();
|
||||
// await http
|
||||
// .post(config.API.searchProfileTemp("all"), {
|
||||
// criterias: cirteria,
|
||||
// })
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// rowsOrder.value = [];
|
||||
// data.map((e: ResponseEmployeeTemp) => {
|
||||
// rowsOrder.value.push({
|
||||
// id: e.id,
|
||||
// fullname: e.fullname,
|
||||
// fullnameOld: e.fullnameOld,
|
||||
// position: e.position,
|
||||
// positionPathSide: e.positionPathSide,
|
||||
// positionLine: e.positionLine,
|
||||
// govAge: e.govAge,
|
||||
// positionEmployeePosition: e.positionEmployeePosition,
|
||||
// positionEmployeePositionSide: e.positionEmployeePositionSide,
|
||||
// positionEmployeeGroup: e.positionEmployeeGroup,
|
||||
// oc: e.oc,
|
||||
// age: e.age,
|
||||
// amount: e.amount == null ? "" : e.amount.toLocaleString(),
|
||||
// refSalary: e.refSalary,
|
||||
// dateAppoint:
|
||||
// e.dateAppoint == null ? null : date2Thai(new Date(e.dateAppoint)),
|
||||
// dateStart:
|
||||
// e.dateStart == null ? null : date2Thai(new Date(e.dateStart)),
|
||||
// createdAt:
|
||||
// e.createdAt == null ? null : date2Thai(new Date(e.createdAt)),
|
||||
// isLeave: e.isLeave == false ? "ครอง" : `${typeRetire(e.leaveReason)}`,
|
||||
// leaveDateOrder:
|
||||
// e.leaveDateOrder == null
|
||||
// ? null
|
||||
// : date2Thai(new Date(e.leaveDateOrder)),
|
||||
// newAgency: "",
|
||||
// currentAgency: "",
|
||||
// draftPositionEmployee: e.draftPositionEmployee,
|
||||
// draftOrganizationOrganization: e.draftOrganizationOrganization,
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// // console.log(rowsOrder);
|
||||
// });
|
||||
// };
|
||||
|
||||
const onSelected = async (id: string) => {
|
||||
// await fetchPositionNumber(id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue