อัตรากำลังลูกจ้างประจำ ฯ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-12-03 13:07:22 +07:00
parent 68bbde3f04
commit ac0bc84da3
11 changed files with 114 additions and 98 deletions

View file

@ -316,6 +316,43 @@ async function onCheckIsDeputy() {
});
}
/** ถ้ามีการเลือก สกจ. และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสกจ. */
function onChangeIsOfficer() {
if (formData.isOfficer === true && checkIsOfficer.value === true) {
dialogConfirm(
$q,
() => (formData.isOfficer = true),
"ยืนยันการแก้ไข",
"คุณต้องการแก้ไข สกจ. เป็นส่วนราชการนี้ใช่หรือไม่?",
() => (formData.isOfficer = false)
);
}
}
/** ถ้ามีการเลือก สำนักปลัด และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสำนักปลัด */
function onChangeIsDeputy() {
if (formData.isDeputy == true && checkIsDeputy.value == true) {
dialogConfirm(
$q,
() => (formData.isDeputy = true),
"ยืนยันการแก้ไข",
"คุณต้องการแก้ไข สำนักปลัด เป็นส่วนราชการนี้ใช่หรือไม่?",
() => (formData.isDeputy = false)
);
}
}
/**
* class input
* @param val
*/
function classInput(val: boolean) {
return {
"full-width cursor-pointer ": val,
"full-width cursor-pointer inputgreen": !val,
};
}
/**
* callback function ทำงานเม props.modal เป true
*/
@ -375,32 +412,6 @@ watch(
}
}
);
/** ถ้ามีการเลือก สกจ. และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสกจ. */
function onChangeIsOfficer() {
if (formData.isOfficer === true && checkIsOfficer.value === true) {
dialogConfirm(
$q,
() => (formData.isOfficer = true),
"ยืนยันการแก้ไข",
"คุณต้องการแก้ไข สกจ. เป็นส่วนราชการนี้ใช่หรือไม่?",
() => (formData.isOfficer = false)
);
}
}
/** ถ้ามีการเลือก สำนักปลัด และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสำนักปลัด */
function onChangeIsDeputy() {
if (formData.isDeputy == true && checkIsDeputy.value == true) {
dialogConfirm(
$q,
() => (formData.isDeputy = true),
"ยืนยันการแก้ไข",
"คุณต้องการแก้ไข สำนักปลัด เป็นส่วนราชการนี้ใช่หรือไม่?",
() => (formData.isDeputy = false)
);
}
}
</script>
<template>
@ -414,6 +425,7 @@ function onChangeIsDeputy() {
<div class="row q-col-gutter-sm">
<div class="col-4">
<q-input
:class="classInput(false)"
v-model="formData.orgName"
ref="orgNameRef"
dense
@ -434,6 +446,14 @@ function onChangeIsDeputy() {
</div>
<div class="col-2">
<q-input
:class="
classInput(
(actionType === 'ADD' &&
props?.dataNode?.orgLevel !== 0 &&
level !== 0) ||
(actionType === 'EDIT' && props?.dataNode?.orgLevel > 1)
)
"
v-model="formData.orgShortName"
:readonly="
(actionType === 'ADD' &&
@ -452,6 +472,14 @@ function onChangeIsDeputy() {
</div>
<div class="col-2">
<q-input
:class="
classInput(
(actionType === 'ADD' &&
props?.dataNode?.orgLevel !== 0 &&
level !== 0) ||
(actionType === 'EDIT' && props?.dataNode?.orgLevel > 1)
)
"
:readonly="
(actionType === 'ADD' &&
props?.dataNode?.orgLevel !== 0 &&
@ -479,6 +507,11 @@ function onChangeIsDeputy() {
</div>
<div class="col-4">
<q-select
:class="
classInput(
level === 0 || formData.orgLevel === 'DEPARTMENT'
)
"
:readonly="level === 0 || formData.orgLevel === 'DEPARTMENT'"
for="#ocLevel"
ref="orgLevelRef"
@ -509,6 +542,7 @@ function onChangeIsDeputy() {
</div>
<div class="col-4" v-if="formData.orgLevel !== ''">
<q-select
:class="classInput(false)"
ref="orgLevelSubRef"
dense
hide-bottom-space
@ -535,6 +569,7 @@ function onChangeIsDeputy() {
for="#telOut"
label="หมายเลขโทรศัพท์ที่ติดต่อจากภายนอก"
hide-bottom-space
:class="classInput(false)"
/>
</div>
<div class="col-4">
@ -546,6 +581,7 @@ function onChangeIsDeputy() {
for="#telIn"
label="หมายเลขโทรศัพท์ที่ติดต่อจากภายใน"
hide-bottom-space
:class="classInput(false)"
/>
</div>
<div class="col-4">
@ -557,6 +593,7 @@ function onChangeIsDeputy() {
for="#tel"
label="หมายเลขโทรสาร"
hide-bottom-space
:class="classInput(false)"
/>
</div>
<div class="col-12">
@ -570,6 +607,7 @@ function onChangeIsDeputy() {
hide-bottom-space
type="textarea"
rows="4"
:class="classInput(false)"
/>
</div>
<div

View file

@ -127,6 +127,7 @@ watch(
:enableTimePicker="false"
week-start="0"
:min-date="minDate"
class="inputgreen"
>
<template #year="{ year }">
{{ year + 543 }}

View file

@ -326,7 +326,7 @@ async function searchInput() {
showLoader();
await http
.get(
config.API.orgPosPosition + `?keyword=${search.value}&type=${type.value}`
config.API.orgPosPosition + `?keyword=${search.value.trim()}&type=${type.value}`
)
.then((res) => {
rowsPositionSelect.value = res.data.result;
@ -556,7 +556,7 @@ watch(
lazy-rules
hide-bottom-space
:rules="[
(val) => !!val || `${'กรุณากรอกตำแหน่งเลขที่'}`,
(val:string) => !!val || `${'กรุณากรอกตำแหน่งเลขที่'}`,
]"
mask="########################"
/>
@ -757,11 +757,8 @@ watch(
<div class="col-12 col-sm-6 col-md-6">
<q-input
:class="inputEdit(isReadonly)"
v-model="search"
outlined
clearable
@clear="search = ''"
dense
lazy-rules
label="คำค้น"
@ -772,6 +769,7 @@ watch(
<div class="col-12 col-sm-6 col-md-3">
<q-btn
outline
color="primary"
icon="search"
label="ค้นหา"

View file

@ -130,6 +130,9 @@ const columns = ref<QTableProps["columns"]>([
field: "posExecutive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return !val ? "-" : val;
},
},
{
name: "lastUpdatedAt",

View file

@ -206,7 +206,11 @@ watch(
<q-space />
<div>
<q-input outlined dense v-model="filterTable" label="ค้นหา" />
<q-input outlined dense v-model="filterTable" label="ค้นหา">
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
</div>
</q-toolbar>
@ -216,7 +220,7 @@ watch(
:rows="rows"
:columns="columns"
row-key="id"
:filter="filterTable"
:filter="filterTable.trim()"
no-data-label="ไม่มีข้อมูล"
selection="multiple"
v-model:selected="selectedFilter"
@ -296,12 +300,7 @@ watch(
label="ค้นหา"
>
<template v-slot:append>
<q-icon
v-if="filterTree !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
<q-icon name="search" />
</template>
</q-input>
<q-tree
@ -311,7 +310,7 @@ watch(
:nodes="nodeTree"
node-key="orgTreeId"
label-key="labelName"
:filter="filterTree"
:filter="filterTree.trim()"
no-results-label="ไม่พบข้อมูลที่ค้นหา"
no-nodes-label="ไม่มีข้อมูล"
>

View file

@ -194,6 +194,7 @@ watch(
<div class="row q-col-gutter-sm">
<div class="col-12">
<q-input
class="inputgreen"
v-model="formData.orgRevisionName"
ref="orgRevisionNameRef"
dense
@ -207,6 +208,7 @@ watch(
<div class="col-12">
<q-input
class="inputgreen"
v-model="formData.remark"
dense
outlined

View file

@ -127,7 +127,10 @@ const selectedPos = ref<PosMaster[]>([]);
async function fetchTable() {
selectedPos.value = [];
await http
.post(config.API.orgPosMasterList, reqMaster)
.post(config.API.orgPosMasterList, {
...reqMaster,
keyword: reqMaster.keyword.trim(),
})
.then((res) => {
totalRow.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
const data = res.data.result.data;
@ -238,7 +241,7 @@ watch([() => reqMaster.page, () => reqMaster.pageSize], async () => {
:tittle="'เลือกตำแหน่งที่ต้องการสืบทอดจากโครงสร้างปัจจุบัน'"
:close="
() => {
modal = false;
(modal = false), (filterTree = '');
}
"
/>
@ -265,12 +268,7 @@ watch([() => reqMaster.page, () => reqMaster.pageSize], async () => {
label="ค้นหา"
>
<template v-slot:append>
<q-icon
v-if="filterTree !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
<q-icon name="search" />
</template>
</q-input>
<q-tree
@ -281,7 +279,7 @@ watch([() => reqMaster.page, () => reqMaster.pageSize], async () => {
:nodes="nodeTree"
node-key="orgTreeId"
label-key="labelName"
:filter="filterTree"
:filter="filterTree.trim()"
no-results-label="ไม่พบข้อมูลที่ค้นหา"
no-nodes-label="ไม่มีข้อมูล"
>
@ -327,7 +325,11 @@ watch([() => reqMaster.page, () => reqMaster.pageSize], async () => {
v-model="reqMaster.keyword"
label="ค้นหา"
@keyup.enter="filterKeyword"
/>
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
</div>
</q-toolbar>
<div class="col-12">

View file

@ -18,7 +18,7 @@ import type { FilterMaster } from "@/modules/02_organization/interface/request/o
/** importComponents*/
import TreeMain from "@/modules/02_organization/components/TreeMain.vue";
import TreeTable from "@/modules/02_organization/components/TreeTable.vue";
import TreeTable from "@/modules/02_organization/components/TableMain.vue";
import LoadView from "@/components/LoadView.vue";
/** use*/
@ -108,7 +108,10 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
}
await http
.post(config.API.orgPosMasterList, reqMaster)
.post(config.API.orgPosMasterList, {
...reqMaster,
keyword: reqMaster.keyword.trim(),
})
.then(async (res) => {
posMaster.value = [];
const dataMain: PosMaster[] = [];
@ -138,9 +141,7 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
});
}
/**
* งขอมลสถจำนวนดานบน
*/
/** ดึงข้อมูลสถิติจำนวนด้านบน*/
function getSummary() {
http
.post(config.API.orgSummary, {
@ -165,9 +166,7 @@ function getSummary() {
});
}
/**
* funcion นหาขอมลใน Table
*/
/** funcion ค้นหาข้อมูลใน Table*/
async function filterKeyword() {
reqMaster.page = 1;
action1.value === false &&
@ -201,9 +200,7 @@ watch(
}
);
/**
* callblck function ทำการ fetch อม Tree เมอมการเปลยนโครงสราง
*/
/** callblck function ทำการ fetch ข้อมูล Tree เมื่อมีการเปลี่ยนโครงสร้าง*/
watch(
() => store.typeOrganizational,
() => {
@ -216,17 +213,13 @@ watch(
}
);
/**
* callblck function ทำการ fetch อม Table เมอมการเปลยนหน
*/
/** callblck function ทำการ fetch ข้อมูล Table เมื่อมีการเปลี่ยนหน้า */
watch([() => reqMaster.page, () => reqMaster.pageSize], () => {
action1.value === false &&
fetchDataTable(reqMaster.id, reqMaster.type, false);
});
/**
* callblck function ทำการ fetch อม Table เมอแสดงตำแหนงทงหมด
*/
/** callblck function ทำการ fetch ข้อมูล Table เมื่อแสดงตำแหน่งทั้งหมด*/
watch(
() => reqMaster.isAll,
() => {

View file

@ -402,7 +402,7 @@ watch(
<div
:class="
store.typeOrganizational === 'draft' &&
checkPermission($route)?.attrOwnership == 'OWNER ' &&
checkPermission($route)?.attrOwnership == 'OWNER' &&
!store.isLosck
? 'col-10'
: 'col-12'
@ -410,13 +410,7 @@ watch(
>
<q-input dense outlined v-model="filter" label="ค้นหา">
<template v-slot:append>
<q-icon
v-if="filter !== ''"
name="clear"
class="cursor-pointer"
@click="filter = ''"
/>
<q-icon name="search" color="grey-5" v-else />
<q-icon name="search" color="grey-5" />
</template>
</q-input>
</div>
@ -429,7 +423,7 @@ watch(
:nodes="lazy"
node-key="orgTreeId"
label-key="labelName"
:filter="filter"
:filter="filter.trim()"
:no-results-label="notFound"
:no-nodes-label="noData"
v-model:expanded="expanded"

View file

@ -8,25 +8,20 @@ import { checkPermission } from "@/utils/permissions";
import { useOrganizational } from "@/modules/02_organization/store/organizational";
import { useCounterMixin } from "@/stores/mixin";
/**
* importType
*/
/** importType*/
import type { DataOrgRevision } from "@/modules/02_organization/interface/index/Main";
import type { OrgRevision } from "@/modules/02_organization/interface/response/organizational";
/**
* importComponents
*/
import TreeView from "@/modules/02_organization/components/TreeView.vue";
/** importComponents*/
import TreeView from "@/modules/02_organization/components/MainView.vue";
import StructureView from "@/modules/02_organization/components/StructureMain.vue";
import StructureOrgMain from "@/modules/02_organization/components/StructureOrgMain.vue";
import DialogFormNewStructure from "@/modules/02_organization/components/DialogNewStructure.vue";
import DialogDateTime from "@/modules/02_organization/components/DialogFormDateTime.vue";
import DialogCreateCommandORG from "@/modules/18_command/components/DialogCreateCommandORG.vue"; //
import DialogHeader from "@/components/DialogHeader.vue";
/**
* use
*/
/** use*/
const $q = useQuasar();
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
const store = useOrganizational();
@ -84,9 +79,7 @@ async function fetchOrganizationActive() {
});
}
/**
* function เรยกขอมรายการลประวโครงสราง
*/
/** function เรียกข้อมูรายการลประวัติโครงสร้าง*/
async function fetchHistory() {
await http
.get(config.API.organizationHistoryNew)
@ -118,9 +111,7 @@ function ocClickAddStructure(type: string) {
typeStructure.value = type;
}
/**
* function openPopup งเวลาเผยแพร
*/
/** function openPopup ตั้งเวลาเผยแพร่ */
function onClickDateTime() {
modalDateTime.value = !modalDateTime.value;
}
@ -138,20 +129,16 @@ function onClickHistory(id: string, name: string) {
}
async function workflowSystem() {
showLoader();
http
.get(config.API.workflowKeycloakSystem("SYS_ORG"))
.then((res) => {
const data = res.data.result;
store.isOfficer = data.isOfficer;
store.isStaff = data.isStaff;
hideLoader();
})
.catch((e) => {
messageError($q, e);
hideLoader();
})
.finally(() => {});
});
}
async function fetchCheckIslock(id: string) {
@ -183,7 +170,6 @@ watch(
/**
* lifecycleHook ทำงานเมอมการเรยกใช Components
*
* งขอมลโครงสรางและรายการประวโครงสราง
*/
onMounted(async () => {