Merge branch 'develop' into devTee
This commit is contained in:
commit
456a0d3e9f
13 changed files with 373 additions and 247 deletions
|
|
@ -60,8 +60,7 @@ export default {
|
||||||
// clear Position
|
// clear Position
|
||||||
clearPosition: (personalId: string) =>
|
clearPosition: (personalId: string) =>
|
||||||
`${placement}/position/clear/${personalId}`,
|
`${placement}/position/clear/${personalId}`,
|
||||||
clearDate: (personalId: string) =>
|
clearDate: (personalId: string) => `${placement}/date/update/${personalId}`,
|
||||||
`${placement}/date/update/${personalId}`,
|
|
||||||
// Document
|
// Document
|
||||||
documentByid: (personalId: string) => `${placement}/doc/${personalId}`,
|
documentByid: (personalId: string) => `${placement}/doc/${personalId}`,
|
||||||
documentDelid: (personalId: string, docid: string) =>
|
documentDelid: (personalId: string, docid: string) =>
|
||||||
|
|
@ -69,7 +68,8 @@ export default {
|
||||||
|
|
||||||
// order
|
// order
|
||||||
organizationsOrder: () => `${order}/order/organizations`,
|
organizationsOrder: () => `${order}/order/organizations`,
|
||||||
approverOC: (id: string) => `${order}/order/approver/${id}`,
|
// approverOC: (id: string) => `${order}/order/approver/${id}`,
|
||||||
|
approverOC: (id: string) => `${order}/org/approver/${id}`,
|
||||||
yearOptionsOrder: () => `${order}/order/fiscal-year`,
|
yearOptionsOrder: () => `${order}/order/fiscal-year`,
|
||||||
listOrder: () => `${order}/order`,
|
listOrder: () => `${order}/order`,
|
||||||
detailOrder: (orderId: string) => `${order}/order/detail/${orderId}`,
|
detailOrder: (orderId: string) => `${order}/order/detail/${orderId}`,
|
||||||
|
|
@ -175,7 +175,4 @@ export default {
|
||||||
appointEmployeeOrder: (typeId: string) =>
|
appointEmployeeOrder: (typeId: string) =>
|
||||||
`${placement}/appointment/temp/report/${typeId}`,
|
`${placement}/appointment/temp/report/${typeId}`,
|
||||||
apppointmentPositionUse: () => `${placement}/appointment/temp/use`,
|
apppointmentPositionUse: () => `${placement}/appointment/temp/use`,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -602,87 +602,87 @@ const menuList = readonly<any[]>([
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
key: 13,
|
// key: 13,
|
||||||
icon: "o_note",
|
// icon: "o_note",
|
||||||
label: "ระบบเดิม",
|
// label: "ระบบเดิม",
|
||||||
path: "registry",
|
// path: "registry",
|
||||||
role: "organization",
|
// role: "organization",
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
key: 13.0,
|
// key: 13.0,
|
||||||
icon: "o_person",
|
// icon: "o_person",
|
||||||
label: "ข้อมูลหลัก",
|
// label: "ข้อมูลหลัก",
|
||||||
path: "metadata",
|
// path: "metadata",
|
||||||
role: "metadata",
|
// role: "metadata",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 13.1,
|
// key: 13.1,
|
||||||
icon: "o_groups",
|
// icon: "o_groups",
|
||||||
label: "โครงสร้างอัตรากำลัง",
|
// label: "โครงสร้างอัตรากำลัง",
|
||||||
path: "organizational",
|
// path: "organizational",
|
||||||
role: "organization",
|
// role: "organization",
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
key: 3.1,
|
// key: 3.1,
|
||||||
label: "จัดการตำแหน่ง",
|
// label: "จัดการตำแหน่ง",
|
||||||
path: "organizationalMapping",
|
// path: "organizationalMapping",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 3.2,
|
// key: 3.2,
|
||||||
label: "แผนภูมิโครงสร้าง",
|
// label: "แผนภูมิโครงสร้าง",
|
||||||
path: "organizationalStructChart",
|
// path: "organizationalStructChart",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 3.3,
|
// key: 3.3,
|
||||||
label: "แผนภูมิองค์กร",
|
// label: "แผนภูมิองค์กร",
|
||||||
path: "organizationalOrgChart",
|
// path: "organizationalOrgChart",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 3.4,
|
// key: 3.4,
|
||||||
label: "ผังโครงสร้าง",
|
// label: "ผังโครงสร้าง",
|
||||||
path: "organizationalTree",
|
// path: "organizationalTree",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 3.5,
|
// key: 3.5,
|
||||||
label: "ผังโครงสร้างลูกจ้าง",
|
// label: "ผังโครงสร้างลูกจ้าง",
|
||||||
path: "organizationalEmployee",
|
// path: "organizationalEmployee",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 3.6,
|
// key: 3.6,
|
||||||
label: "จัดการบัญชี 2",
|
// label: "จัดการบัญชี 2",
|
||||||
path: "manageReport2",
|
// path: "manageReport2",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 3.7,
|
// key: 3.7,
|
||||||
label: "รายงานบัญชี",
|
// label: "รายงานบัญชี",
|
||||||
path: "organizationalReport",
|
// path: "organizationalReport",
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 13.0,
|
// key: 13.0,
|
||||||
icon: "o_contact_page",
|
// icon: "o_contact_page",
|
||||||
label: "ทะเบียนประวัติ",
|
// label: "ทะเบียนประวัติ",
|
||||||
path: "registry",
|
// path: "registry",
|
||||||
role: "registry",
|
// role: "registry",
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 4,
|
// key: 4,
|
||||||
icon: "o_contact_page",
|
// icon: "o_contact_page",
|
||||||
label: "ทะเบียนประวัติ",
|
// label: "ทะเบียนประวัติ",
|
||||||
path: "registry",
|
// path: "registry",
|
||||||
role: "registry",
|
// role: "registry",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 4,
|
// key: 4,
|
||||||
icon: "verified",
|
// icon: "verified",
|
||||||
label: "รายการรอตรวจสอบ",
|
// label: "รายการรอตรวจสอบ",
|
||||||
path: "verified",
|
// path: "verified",
|
||||||
role: "registryverify",
|
// role: "registryverify",
|
||||||
},
|
// },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const tabList = readonly<tabType[]>([
|
const tabList = readonly<tabType[]>([
|
||||||
|
|
|
||||||
|
|
@ -366,8 +366,42 @@ watch(
|
||||||
|
|
||||||
<q-card-section class="q-pa-sm">
|
<q-card-section class="q-pa-sm">
|
||||||
<q-card bordered class="bg-grey-13">
|
<q-card bordered class="bg-grey-13">
|
||||||
<q-list dense class="q-py-sm">
|
<q-card-section>
|
||||||
<q-item dense>
|
<div class="text-grey">ตำแหน่งเลขที่</div>
|
||||||
|
<div class="text-subtitle2 text-black q-ml-sm">
|
||||||
|
{{ props.row.posNo ? props.row.posNo : "-" }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-grey">
|
||||||
|
{{ empType === "officer" ? `ตำแหน่งในสายงาน` : `ตำแหน่ง` }}
|
||||||
|
</div>
|
||||||
|
<div class="text-subtitle2 text-black q-ml-sm">
|
||||||
|
{{ props.row.position ? props.row.position : "-" }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-grey">
|
||||||
|
{{ empType === "officer" ? "ตำแหน่งประเภท" : "กลุ่มงาน" }}
|
||||||
|
</div>
|
||||||
|
<div class="text-subtitle2 text-black q-ml-sm">
|
||||||
|
{{ props.row.posType ? props.row.posType : "-" }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-grey">
|
||||||
|
{{ empType === "officer" ? "ระดับ" : "ระดับชั้นงาน" }}
|
||||||
|
</div>
|
||||||
|
<div class="text-subtitle2 text-black q-ml-sm">
|
||||||
|
{{
|
||||||
|
props.row.posLevel
|
||||||
|
? props.row.posTypeShortName
|
||||||
|
? `${props.row.posTypeShortName} ${props.row.posLevel}`
|
||||||
|
: props.row.posLevel
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
|
||||||
|
<!-- <q-list dense class="q-py-sm"> -->
|
||||||
|
<!-- <q-item dense>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label caption>ตำแหน่งเลขที่</q-item-label>
|
<q-item-label caption>ตำแหน่งเลขที่</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
@ -376,9 +410,9 @@ watch(
|
||||||
props.row.posNo ? props.row.posNo : "-"
|
props.row.posNo ? props.row.posNo : "-"
|
||||||
}}</q-item-label>
|
}}</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item> -->
|
||||||
|
|
||||||
<q-item dense>
|
<!-- <q-item dense>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label caption>{{
|
<q-item-label caption>{{
|
||||||
empType === "officer" ? `ตำแหน่งในสายงาน` : `ตำแหน่ง`
|
empType === "officer" ? `ตำแหน่งในสายงาน` : `ตำแหน่ง`
|
||||||
|
|
@ -391,9 +425,9 @@ watch(
|
||||||
}}</q-item-label
|
}}</q-item-label
|
||||||
>
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item> -->
|
||||||
|
|
||||||
<q-item dense>
|
<!-- <q-item dense>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label caption>
|
<q-item-label caption>
|
||||||
{{
|
{{
|
||||||
|
|
@ -408,9 +442,9 @@ watch(
|
||||||
}}</q-item-label
|
}}</q-item-label
|
||||||
>
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item> -->
|
||||||
|
|
||||||
<q-item dense>
|
<!-- <q-item dense>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label caption>
|
<q-item-label caption>
|
||||||
{{
|
{{
|
||||||
|
|
@ -429,8 +463,8 @@ watch(
|
||||||
}}</q-item-label
|
}}</q-item-label
|
||||||
>
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item> -->
|
||||||
</q-list>
|
<!-- </q-list> -->
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator inset />
|
<q-separator inset />
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||||
const posTypeMain = ref<DataType[]>([]);
|
const posTypeMain = ref<DataType[]>([]);
|
||||||
const posLevelOps = ref<DataOption[]>([]);
|
const posLevelOps = ref<DataOption[]>([]);
|
||||||
const yearOps = ref<DataOption[]>([]);
|
const yearOps = ref<DataOption[]>([]);
|
||||||
const mode = ref<string>("card");
|
const mode = ref<string>("table");
|
||||||
|
|
||||||
function fetchType(data: DataType[]) {
|
function fetchType(data: DataType[]) {
|
||||||
posTypeMain.value = data;
|
posTypeMain.value = data;
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ function updateSelected(data: TreeMain) {
|
||||||
* @param level levelTree
|
* @param level levelTree
|
||||||
*/
|
*/
|
||||||
const isAll = ref<boolean>(false);
|
const isAll = ref<boolean>(false);
|
||||||
const isBlank = ref<boolean>(false);
|
const isBlank = ref<boolean>(true);
|
||||||
async function fetchDataTable(id: string, level: number = 0) {
|
async function fetchDataTable(id: string, level: number = 0) {
|
||||||
showLoader();
|
showLoader();
|
||||||
const body = {
|
const body = {
|
||||||
|
|
|
||||||
|
|
@ -137,12 +137,10 @@ watch(props, () => {
|
||||||
<q-dialog v-model="props.Modal" persistent>
|
<q-dialog v-model="props.Modal" persistent>
|
||||||
<q-card style="max-width: 100%; width: 80%">
|
<q-card style="max-width: 100%; width: 80%">
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<div class="row">
|
<DialogHeader
|
||||||
<DialogHeader
|
:tittle="`รายละเอียดของ ${personalForm.fullName}`"
|
||||||
:tittle="`รายละเอียดของ ${personalForm.fullName}`"
|
:close="close"
|
||||||
@click="close"
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { useQuasar } from "quasar";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
// import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import keycloak from "@/plugins/keycloak";
|
import keycloak from "@/plugins/keycloak";
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,14 @@ import { useRoute } from "vue-router";
|
||||||
/** Use */
|
/** Use */
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin;
|
const {
|
||||||
|
messageError,
|
||||||
|
success,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
dialogConfirm,
|
||||||
|
findOrgName,
|
||||||
|
} = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const retireld_params = route.params.id;
|
const retireld_params = route.params.id;
|
||||||
|
|
||||||
|
|
@ -82,7 +89,7 @@ watch(modal, () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function findOrgName(obj: any) {
|
function findOrgChildName(obj: any) {
|
||||||
if (obj) {
|
if (obj) {
|
||||||
let name =
|
let name =
|
||||||
obj.orgChild4Name != null && obj.orgChild3Name != null
|
obj.orgChild4Name != null && obj.orgChild3Name != null
|
||||||
|
|
@ -112,7 +119,7 @@ function findOrgName(obj: any) {
|
||||||
? obj.orgChild1Name
|
? obj.orgChild1Name
|
||||||
: "";
|
: "";
|
||||||
name += obj.orgRootName != null ? obj.orgRootName : "";
|
name += obj.orgRootName != null ? obj.orgRootName : "";
|
||||||
return name == "" ? "" : name;
|
return name == "" ? "-" : name;
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
@ -120,36 +127,77 @@ function findOrgName(obj: any) {
|
||||||
|
|
||||||
const formPagePersonList = reactive({ keyword: "", pageSize: 10, page: 1 });
|
const formPagePersonList = reactive({ keyword: "", pageSize: 10, page: 1 });
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
|
const totalList = ref<number>(0);
|
||||||
|
|
||||||
// fecth profile
|
// fecth profile
|
||||||
const fecthProfile = async () => {
|
const fecthProfile = async () => {
|
||||||
showLoader();
|
if (props?.dataProfile?.type === "OFFICER") {
|
||||||
await http
|
showLoader();
|
||||||
.post(config.API.orgProfileProbation, formPagePersonList)
|
formPagePersonList.keyword =
|
||||||
.then((res) => {
|
formPagePersonList.keyword === null ? "" : formPagePersonList.keyword;
|
||||||
maxPage.value = Math.ceil(
|
await http
|
||||||
res.data.result.total / formPagePersonList.pageSize
|
.post(config.API.orgProfileProbation, formPagePersonList)
|
||||||
);
|
.then((res) => {
|
||||||
rows.value = res.data.result.data.map((e: any) => ({
|
maxPage.value = Math.ceil(
|
||||||
id: e.id,
|
res.data.result.total / formPagePersonList.pageSize
|
||||||
prefix:e.prefix,
|
);
|
||||||
firstName:e.firstName,
|
totalList.value = res.data.result.total;
|
||||||
lastName:e.lastName,
|
rows.value = res.data.result.data.map((e: any) => ({
|
||||||
fullname: e.prefix + e.firstName + " " + e.lastName,
|
id: e.id,
|
||||||
position: e.position,
|
prefix: e.prefix,
|
||||||
level:
|
firstName: e.firstName,
|
||||||
e.posTypeName && e.posLevelName
|
lastName: e.lastName,
|
||||||
? e.posTypeName + " (" + e.posLevelName + ")"
|
fullname: e.prefix + e.firstName + " " + e.lastName,
|
||||||
: "",
|
position: e.position,
|
||||||
organizationOrganization: findOrgName(e),
|
level:
|
||||||
}));
|
e.posTypeName && e.posLevelName
|
||||||
})
|
? e.posTypeName + " (" + e.posLevelName + ")"
|
||||||
.catch((err) => {
|
: "-",
|
||||||
messageError($q, err);
|
organizationOrganization: findOrgChildName(e),
|
||||||
})
|
}));
|
||||||
.finally(() => {
|
})
|
||||||
hideLoader();
|
.catch((err) => {
|
||||||
});
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let queryParams: any = {
|
||||||
|
page: formPagePersonList.page,
|
||||||
|
pageSize: formPagePersonList.pageSize,
|
||||||
|
searchKeyword: formPagePersonList.keyword,
|
||||||
|
searchField: "fullName",
|
||||||
|
type: "perm",
|
||||||
|
};
|
||||||
|
http
|
||||||
|
.get(config.API.registryNew("-employee"), { params: queryParams })
|
||||||
|
.then((res) => {
|
||||||
|
maxPage.value = Math.ceil(
|
||||||
|
res.data.result.total / formPagePersonList.pageSize
|
||||||
|
);
|
||||||
|
totalList.value = res.data.result.total;
|
||||||
|
rows.value = res.data.result.data.map((e: any) => ({
|
||||||
|
id: e.id,
|
||||||
|
prefix: e.prefix,
|
||||||
|
firstName: e.firstName,
|
||||||
|
lastName: e.lastName,
|
||||||
|
fullname: e.prefix + e.firstName + " " + e.lastName,
|
||||||
|
position: e.position,
|
||||||
|
level:
|
||||||
|
e.posTypeName && e.posLevelName
|
||||||
|
? e.posTypeName + " (" + e.posLevelName + ")"
|
||||||
|
: "-",
|
||||||
|
organizationOrganization: findOrgName(e),
|
||||||
|
}));
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// ยืนยันการเพิ่มราชชื่อ
|
// ยืนยันการเพิ่มราชชื่อ
|
||||||
|
|
@ -183,20 +231,17 @@ const updateListData = (retireld: string, pId: string) => {
|
||||||
props.UpdateListId(retireld, pId);
|
props.UpdateListId(retireld, pId);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
function updatePageSize(newPagination: any) {
|
||||||
* Setiting Pagination
|
formPagePersonList.page = 1;
|
||||||
*/
|
formPagePersonList.pageSize = newPagination.rowsPerPage;
|
||||||
const paging = ref<boolean>(true);
|
}
|
||||||
const pagination = ref({
|
|
||||||
sortBy: "fullname",
|
watch(
|
||||||
descending: true,
|
() => formPagePersonList.pageSize,
|
||||||
page: 1,
|
() => {
|
||||||
rowsPerPage: 10,
|
fecthProfile();
|
||||||
});
|
}
|
||||||
const paginationLabel = (start: number, end: number, total: number) => {
|
);
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
|
||||||
else return start + "-" + end + " ใน " + total;
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -232,17 +277,18 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
borderless
|
borderless
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
debounce="300"
|
clearable
|
||||||
v-model="filter"
|
v-model="formPagePersonList.keyword"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="width: 850px; max-width: auto"
|
style="width: 850px; max-width: auto"
|
||||||
|
@keyup.enter="(formPagePersonList.page = 1), fecthProfile()"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<q-table
|
<d-table
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
dense
|
dense
|
||||||
|
|
@ -250,9 +296,8 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
row-key="name"
|
row-key="name"
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:filter="filter"
|
:rows-per-page-options="[10, 20, 50, 100]"
|
||||||
:pagination-label="paginationLabel"
|
@update:pagination="updatePageSize"
|
||||||
v-model:pagination="pagination"
|
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -266,20 +311,27 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td>{{ props.rowIndex + 1 }}</q-td>
|
<q-td>{{
|
||||||
|
(formPagePersonList.page - 1) *
|
||||||
|
Number(formPagePersonList.pageSize) +
|
||||||
|
props.rowIndex +
|
||||||
|
1
|
||||||
|
}}</q-td>
|
||||||
<q-td key="fullname" :props="props">
|
<q-td key="fullname" :props="props">
|
||||||
{{ props.row.prefix ? props.row.prefix:'' }}{{ props.row.firstName ? props.row.firstName:'' }} {{ props.row.lastName ? props.row.lastName:'' }}
|
{{ props.row.prefix ? props.row.prefix : ""
|
||||||
|
}}{{ props.row.firstName ? props.row.firstName : "" }}
|
||||||
|
{{ props.row.lastName ? props.row.lastName : "" }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="position" :props="props">
|
<q-td key="position" :props="props">
|
||||||
{{ props.row.position ? props.row.position:'-' }}
|
{{ props.row.position ? props.row.position : "-" }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="level" :props="props">{{ props.row.level ? props.row.level :'-' }}</q-td>
|
<q-td key="level" :props="props">{{ props.row.level }}</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
key="organizationOrganization"
|
key="organizationOrganization"
|
||||||
:props="props"
|
:props="props"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ props.row.organizationOrganization ? props.row.organizationOrganization:'-' }}
|
{{ props.row.organizationOrganization }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -293,17 +345,19 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ totalList }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="pagination.page"
|
v-model="formPagePersonList.page"
|
||||||
color="primary"
|
color="primary"
|
||||||
:max="scope.pagesNumber"
|
:max="maxPage"
|
||||||
:max-pages="5"
|
:max-pages="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
boundary-links
|
boundary-links
|
||||||
direction-links
|
direction-links
|
||||||
|
@update:model-value="fecthProfile"
|
||||||
></q-pagination>
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
|
||||||
|
|
@ -731,11 +731,7 @@ function removeFile(fileName: string) {
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<q-card
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||||
v-if="dataDetail.status == 'WAITTING'"
|
|
||||||
bordered
|
|
||||||
class="row col-12 text-dark q-mt-sm"
|
|
||||||
>
|
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">
|
<div class="q-pl-sm text-weight-bold text-dark">
|
||||||
รายการตรวจสอบเงื่อนไขต่าง ๆ
|
รายการตรวจสอบเงื่อนไขต่าง ๆ
|
||||||
|
|
@ -749,37 +745,40 @@ function removeFile(fileName: string) {
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">เงื่อนไขต่าง ๆ</div>
|
<div class="q-pl-sm text-weight-bold text-dark">เงื่อนไขต่าง ๆ</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div v-if="!conditions">
|
|
||||||
<q-btn
|
<div v-if="dataDetail.status == 'WAITTING' && roleUser === 'admin'">
|
||||||
outline
|
<div v-if="!conditions">
|
||||||
color="primary"
|
<q-btn
|
||||||
dense
|
outline
|
||||||
icon-right="mdi-file-edit-outline"
|
color="primary"
|
||||||
class="q-px-sm"
|
dense
|
||||||
label="แก้ไข"
|
icon-right="mdi-file-edit-outline"
|
||||||
style="width: 80px"
|
class="q-px-sm"
|
||||||
@click="conditions = !conditions"
|
label="แก้ไข"
|
||||||
/>
|
style="width: 80px"
|
||||||
</div>
|
@click="conditions = !conditions"
|
||||||
<div v-else class="q-gutter-x-sm">
|
/>
|
||||||
<q-btn
|
</div>
|
||||||
outline
|
<div v-else class="q-gutter-x-sm">
|
||||||
color="public"
|
<q-btn
|
||||||
dense
|
outline
|
||||||
class="q-px-sm"
|
color="public"
|
||||||
label="บันทึก"
|
dense
|
||||||
style="width: 80px"
|
class="q-px-sm"
|
||||||
@click="onSubmitConditions"
|
label="บันทึก"
|
||||||
/>
|
style="width: 80px"
|
||||||
<q-btn
|
@click="onSubmitConditions"
|
||||||
outline
|
/>
|
||||||
color="red"
|
<q-btn
|
||||||
dense
|
outline
|
||||||
class="q-px-sm"
|
color="red"
|
||||||
label="ยกเลิก"
|
dense
|
||||||
style="width: 80px"
|
class="q-px-sm"
|
||||||
@click="clickCancelConditions"
|
label="ยกเลิก"
|
||||||
/>
|
style="width: 80px"
|
||||||
|
@click="clickCancelConditions"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
@ -826,6 +825,7 @@ function removeFile(fileName: string) {
|
||||||
<div class="row col-12 q-col-gutter-y-sm q-pa-sm">
|
<div class="row col-12 q-col-gutter-y-sm q-pa-sm">
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<q-file
|
<q-file
|
||||||
|
v-if="dataDetail.status == 'WAITTING' && roleUser === 'admin'"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
for="#evidenceFiles"
|
for="#evidenceFiles"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -879,6 +879,10 @@ function removeFile(fileName: string) {
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="
|
||||||
|
dataDetail.status == 'WAITTING' &&
|
||||||
|
roleUser === 'admin'
|
||||||
|
"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -1047,38 +1051,40 @@ function removeFile(fileName: string) {
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<div class="q-gutter-sm" v-if="!edit">
|
<div v-if="roleUser === 'admin'">
|
||||||
<q-btn
|
<div class="q-gutter-sm" v-if="!edit">
|
||||||
outline
|
<q-btn
|
||||||
color="primary"
|
outline
|
||||||
dense
|
color="primary"
|
||||||
icon-right="mdi-file-edit-outline"
|
dense
|
||||||
class="q-px-sm"
|
icon-right="mdi-file-edit-outline"
|
||||||
label="แก้ไข"
|
class="q-px-sm"
|
||||||
style="width: 80px"
|
label="แก้ไข"
|
||||||
@click="edit = !edit"
|
style="width: 80px"
|
||||||
v-if="!(status == 'REPORT' || status == 'DONE')"
|
@click="edit = !edit"
|
||||||
/>
|
v-if="!(status == 'REPORT' || status == 'DONE')"
|
||||||
</div>
|
/>
|
||||||
<div class="q-gutter-sm" v-else>
|
</div>
|
||||||
<q-btn
|
<div class="q-gutter-sm" v-else>
|
||||||
outline
|
<q-btn
|
||||||
color="public"
|
outline
|
||||||
dense
|
color="public"
|
||||||
class="q-px-sm"
|
dense
|
||||||
label="บันทึก"
|
class="q-px-sm"
|
||||||
style="width: 80px"
|
label="บันทึก"
|
||||||
type="submit"
|
style="width: 80px"
|
||||||
/>
|
type="submit"
|
||||||
<q-btn
|
/>
|
||||||
outline
|
<q-btn
|
||||||
color="red"
|
outline
|
||||||
dense
|
color="red"
|
||||||
class="q-px-sm"
|
dense
|
||||||
label="ยกเลิก"
|
class="q-px-sm"
|
||||||
style="width: 80px"
|
label="ยกเลิก"
|
||||||
@click="clickCancel"
|
style="width: 80px"
|
||||||
/>
|
@click="clickCancel"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ async function fecthInsigniaByOc(
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
// messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
|
||||||
|
|
@ -288,7 +288,7 @@ onMounted(() => {
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else>
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
|
|
@ -86,14 +86,14 @@ async function fetchLeaveday(
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
data && genReport(data);
|
data && genReport(data);
|
||||||
|
!data && hideLoader();
|
||||||
detailReport.value = data;
|
detailReport.value = data;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
})
|
||||||
|
.finally(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -114,18 +114,19 @@ async function genReport(data: any) {
|
||||||
const objectUrl = URL.createObjectURL(blob);
|
const objectUrl = URL.createObjectURL(blob);
|
||||||
fileBlob.value = blob;
|
fileBlob.value = blob;
|
||||||
const pdfData = await usePDF(`${objectUrl}`);
|
const pdfData = await usePDF(`${objectUrl}`);
|
||||||
showLoader();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
pdfSrc.value = pdfData.pdf.value;
|
pdfSrc.value = pdfData.pdf.value;
|
||||||
numOfPages.value = pdfData.pages.value;
|
numOfPages.value = pdfData.pages.value;
|
||||||
hideLoader();
|
|
||||||
}, 1500);
|
}, 1500);
|
||||||
})
|
})
|
||||||
.catch(async (e) => {
|
.catch(async (e) => {
|
||||||
messageError($q, JSON.parse(await e.response.data.text()));
|
messageError($q, JSON.parse(await e.response.data.text()));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
setTimeout(() => {
|
||||||
|
hideLoader();
|
||||||
|
}, 2000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||||
import CurruncyInput from "@/components/CurruncyInput.vue";
|
// import CurruncyInput from "@/components/CurruncyInput.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
next: {
|
next: {
|
||||||
|
|
@ -628,34 +628,70 @@ const pagination = ref({
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="col-12 row q-py-sm q-col-gutter-sm">
|
<div class="col-12 row q-py-sm q-col-gutter-sm">
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<CurruncyInput
|
<q-input
|
||||||
|
v-model="modalData.salaryAmount"
|
||||||
|
:outlined="true"
|
||||||
|
dense
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'เงินเดือน'}`"
|
||||||
|
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||||
|
lazy-rules
|
||||||
|
class="inputgreen"
|
||||||
|
mask="###,###,###,###"
|
||||||
|
reverse-fill-mask
|
||||||
|
/>
|
||||||
|
<!-- <CurruncyInput
|
||||||
:edit="true"
|
:edit="true"
|
||||||
:dense="true"
|
:dense="true"
|
||||||
v-model="modalData.salaryAmount"
|
v-model="modalData.salaryAmount"
|
||||||
:label="`${'เงินเดือน'}`"
|
:label="`${'เงินเดือน'}`"
|
||||||
:rules="[(val: any) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
:rules="[(val: any) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<CurruncyInput
|
<q-input
|
||||||
|
v-model="modalData.positionSalaryAmount"
|
||||||
|
:outlined="true"
|
||||||
|
dense
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'เงินประจำตำแหน่ง'}`"
|
||||||
|
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินประจำตำแหน่ง'}`]"
|
||||||
|
lazy-rules
|
||||||
|
class="inputgreen"
|
||||||
|
mask="###,###,###,###"
|
||||||
|
reverse-fill-mask
|
||||||
|
/>
|
||||||
|
<!-- <CurruncyInput
|
||||||
:edit="true"
|
:edit="true"
|
||||||
:dense="true"
|
:dense="true"
|
||||||
v-model="modalData.positionSalaryAmount"
|
v-model="modalData.positionSalaryAmount"
|
||||||
:label="`${'เงินประจำตำแหน่ง'}`"
|
:label="`${'เงินประจำตำแหน่ง'}`"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<CurruncyInput
|
<q-input
|
||||||
|
v-model="modalData.monthSalaryAmount"
|
||||||
|
:outlined="true"
|
||||||
|
dense
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
||||||
|
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินค่าตอบแทนรายเดือน'}`]"
|
||||||
|
lazy-rules
|
||||||
|
class="inputgreen"
|
||||||
|
mask="###,###,###,###"
|
||||||
|
reverse-fill-mask
|
||||||
|
/>
|
||||||
|
<!-- <CurruncyInput
|
||||||
:edit="true"
|
:edit="true"
|
||||||
:dense="true"
|
:dense="true"
|
||||||
v-model="modalData.monthSalaryAmount"
|
v-model="modalData.monthSalaryAmount"
|
||||||
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-12" v-if="checkNote">
|
<div class="col-xs-6 col-sm-6 col-md-12" v-if="checkNote">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue