Merge branch 'develop' into devTee

This commit is contained in:
STW_TTTY\stwtt 2024-05-31 09:10:51 +07:00
commit 804cfadfe5
130 changed files with 2610 additions and 2398 deletions

View file

@ -2,6 +2,8 @@ const supportMain = () => import("@/modules/00_support/views/MainPage.vue");
const supportCategory = () =>
import("@/modules/00_support/views/ManageCategory.vue");
const testView = () => import("@/views/TestManagement.vue");
export default [
{
path: "/support",
@ -23,4 +25,15 @@ export default [
Role: "support",
},
},
{
path: "/test",
name: "testView",
component: testView,
meta: {
Auth: true,
Key: [1.1],
Role: "support",
},
},
];

View file

@ -1,4 +1,4 @@
<!-- tab ตำแหนประเภท หนาจดการขอมลหล/อมลตำแหนงของขาราชการกรงเทพมหานคร -->
<!-- tab ประเภทตำแหน หนาจดการขอมลหล/อมลตำแหนงของขาราชการกรงเทพมหานคร -->
<template>
<div>
<q-form ref="myForm">
@ -207,7 +207,7 @@ const { manageData, changeManageColumns, getPositionType, dataPositionType } =
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
const tittleHistory = ref<string>("ประวัติแก้ไขตำแหน่งประเภท"); //
const tittleHistory = ref<string>("ประวัติแก้ไขประเภทตำแหน่ง"); //
const myForm = ref<any>(null); //ref
const filter = ref<string>(""); //search data table
const filterHistory = ref<string>(""); //search data table history
@ -223,7 +223,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",
@ -292,7 +292,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",

View file

@ -491,7 +491,7 @@ const tabsOrganization = [
{ label: "หมายเลขโทรสาร", value: "organization_fax" },
];
const tabsPosition = [
{ label: "ตำแหน่งประเภท", value: "position_type" },
{ label: "ประเภทตำแหน่ง", value: "position_type" },
{ label: "ชื่อสายงาน", value: "position_line" },
{ label: "ชื่อตำแหน่งสายงาน", value: "position_path" },
{ label: "ด้าน/สาขา ของสายงาน", value: "position_pathSide" },

View file

@ -329,12 +329,12 @@ async function onSubmit() {
ref="posTypeRankRef"
outlined
v-model="posTypeRank"
label="ระดับ"
label="ระดับตำแหน่ง"
dense
lazy-rules
borderless
min="1"
:rules="[(val) => val != undefined || 'กรุณากรอกระดับ']"
:rules="[(val) => val != undefined || 'กรุณากรอกระดับตำแหน่ง']"
hide-bottom-space
mask="############"
/>

View file

@ -1,5 +1,5 @@
<!-- =============================== -->
<!-- หนตำแหนประเภท สายงาน -->
<!-- หนประเภทตำแหน สายงาน -->
<!-- component เพมตำแหนงในดรอบดาวน ของ โครงสรางอตรากำล -->
<!-- เพอใหมาเลอกในหน Mapping -->
<template>
@ -118,8 +118,8 @@
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeId"
:rules="[(val:any) => !!val || `${'กรุณาเลือกตำแหน่งประเภท'}`]"
:label="`${'ตำแหน่งประเภท'}`"
:rules="[(val:any) => !!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`]"
:label="`${'ประเภทตำแหน่ง'}`"
@update:modelValue="clickEditRow"
emit-value
map-options
@ -537,7 +537,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -672,7 +672,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -1043,7 +1043,7 @@ const fetchPosition = async () => {
};
/**
* filter select ตำแหนประเภท
* filter select ประเภทตำแหน
* @param val text filter
* @param update
* @param abort

View file

@ -83,7 +83,7 @@
<div class="text-weight-medium q-pt-md row items-center">
<q-icon size="10px" color="grey-4" name="mdi-circle" />
<div class="q-pl-sm">ตำแหนประเภท</div>
<div class="q-pl-sm">ประเภทตำแหน</div>
</div>
<div class="text-grey-7 q-pl-lg">
{{ personDetail ? personDetail.positionType : "" }}

View file

@ -431,8 +431,8 @@
dense
lazy-rules
v-model="positionTypeId"
:rules="[(val:any) => !!val || `${'กรุณาเลือกตำแหน่งประเภท'}`]"
:label="`${'ตำแหน่งประเภท'}`"
:rules="[(val:any) => !!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`]"
:label="`${'ประเภทตำแหน่ง'}`"
emit-value
map-options
option-label="name"

View file

@ -14,7 +14,7 @@
@click="clickBack"
/>
<label
>ญชดขาราชการกรงเทพมหานครสามญเขตำแหนประเภท สายงาน
>ญชดขาราชการกรงเทพมหานครสามญเขประเภทตำแหน สายงาน
และระดบตำแหน</label
>
</div>
@ -154,7 +154,7 @@
<q-select
class="col-xs-12 col-sm-6"
v-model="myData.category"
label="ตำแหน่งประเภท"
label="ประเภทตำแหน่ง"
dense
emit-value
map-options
@ -384,7 +384,7 @@
dense
:options="categoryOP"
v-model="myData.category2"
label="ตำแหน่งประเภท"
label="ประเภทตำแหน่ง"
emit-value
map-options
option-label="name"
@ -938,7 +938,7 @@ const fetchPositionNum = async () => {
});
};
//
//
const fetchCategory = async () => {
// showLoader();
await http
@ -1083,7 +1083,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
});
break;
case "4":
//
//
update(() => {
categoryOP.value = categoryOPfilter.value.filter(
(v: DataOption) => v.name.indexOf(val) > -1

View file

@ -11,7 +11,7 @@
@click="clickBack"
/>
<label
>ประวญชดขาราชการกรงเทพมหานครสามญเขตำแหนประเภท สายงาน
>ประวญชดขาราชการกรงเทพมหานครสามญเขประเภทตำแหน สายงาน
และระดบตำแหน</label
>
<q-card flat bordered class="col-12 q-my-sm q-pt-sm">
@ -147,7 +147,7 @@
/>
<q-input
v-model="items.oldPositionType"
label="ตำแหน่งประเภท"
label="ประเภทตำแหน่ง"
class="col-xs-12 col-sm-6"
hide-bottom-space
:outlined="false"
@ -259,7 +259,7 @@
/>
<q-input
v-model="items.newPositionType"
label="ตำแหน่งประเภท"
label="ประเภทตำแหน่ง"
class="col-xs-12 col-sm-6"
hide-bottom-space
:outlined="false"

View file

@ -33,7 +33,7 @@ const prosp = defineProps({
/** formData*/
const formData = reactive<FormDetailPosition>({
positionNo: "", //*
positionType: "", //*
positionType: "", //*
positionPathSide: "", //*
positionLine: "", //*
positionSide: "", //*/
@ -137,15 +137,22 @@ watch(
: store.typeOrganizational === "draft"
? "แบบร่าง"
: "ยุบเลิก";
formData.positionType = prosp.dataDetailPos.posTypeName
formData.positionPathSide = prosp.dataDetailPos.positionName
formData.positionLine = prosp.dataDetailPos.positionField
formData.positionSide = prosp.dataDetailPos.positionArea ? prosp.dataDetailPos.positionArea : "-"
formData.positionLevel = prosp.dataDetailPos.posLevelName
formData.positionExecutive = prosp.dataDetailPos.posExecutiveName ? prosp.dataDetailPos.posExecutiveName : "-"
formData.positionExecutiveSide = prosp.dataDetailPos.positionExecutiveField ? prosp.dataDetailPos.positionExecutiveField : "-"
// row.value = prosp.dataDetailPos.positions.map((e: Position) => ({
formData.positionType = prosp.dataDetailPos.posTypeName;
formData.positionPathSide = prosp.dataDetailPos.positionName;
formData.positionLine = prosp.dataDetailPos.positionField;
formData.positionSide = prosp.dataDetailPos.positionArea
? prosp.dataDetailPos.positionArea
: "-";
formData.positionLevel = prosp.dataDetailPos.posLevelName;
formData.positionExecutive = prosp.dataDetailPos.posExecutiveName
? prosp.dataDetailPos.posExecutiveName
: "-";
formData.positionExecutiveSide = prosp.dataDetailPos
.positionExecutiveField
? prosp.dataDetailPos.positionExecutiveField
: "-";
// row.value = prosp.dataDetailPos.positions.map((e: Position) => ({
// ...e,
// positionName: e.positionName ? e.positionName : "-",
// positionField: e.positionField ? e.positionField : "-",
@ -183,15 +190,15 @@ watch(
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">
<div>
<p>ตำแหนประเภท</p>
<p>ประเภทตำแหน</p>
</div>
</div>
<div class="col-8 text-grey-8">
<p>{{ formData.positionType }}</p>
</div>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">
<div>
<p>ตำแหนงในสายงาน</p>
@ -200,9 +207,9 @@ watch(
<div class="col-8 text-grey-8">
<p>{{ formData.positionPathSide }}</p>
</div>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">
<div>
<p>สายงาน</p>
@ -211,7 +218,7 @@ watch(
<div class="col-8 text-grey-8">
<p>{{ formData.positionLine }}</p>
</div>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">
@ -222,7 +229,7 @@ watch(
<div class="col-8 text-grey-8">
<p>{{ formData.positionSide }}</p>
</div>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">
@ -233,9 +240,9 @@ watch(
<div class="col-8 text-grey-8">
<p>{{ formData.positionLevel }}</p>
</div>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">
<div>
<p>ตำแหนงทางการบรหาร</p>
@ -244,7 +251,7 @@ watch(
<div class="col-8 text-grey-8">
<p>{{ formData.positionExecutive }}</p>
</div>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">
@ -255,7 +262,7 @@ watch(
<div class="col-8 text-grey-8">
<p>{{ formData.positionExecutiveSide }}</p>
</div>
</div>
</div>
<div class="row q-col-gutter-sm q-mb-xs">
<div class="col-4 text-bold">

View file

@ -155,7 +155,9 @@
<q-space />
<div v-if="roleRegistryverify || roleKeyregistry">
<q-btn
v-if="!profileStore.isVerified && isSendVerified && roleRegistryverify"
v-if="
!profileStore.isVerified && isSendVerified && roleRegistryverify
"
outlined
color="green"
icon="verified"
@ -165,7 +167,9 @@
<q-tooltip>นยนการตรวจสอบขอม</q-tooltip>
</q-btn>
<q-btn
v-else-if="!profileStore.isVerified && !isSendVerified && roleKeyregistry"
v-else-if="
!profileStore.isVerified && !isSendVerified && roleKeyregistry
"
outlined
color="secondary"
icon="send"
@ -692,7 +696,6 @@
class="full-width inputgreen cursor-pointer"
outlined
dense
:model-value="date2Thai(leaveDate)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่พ้นราชการ'}`]"
hide-bottom-space
@ -757,7 +760,6 @@
class="full-width inputgreen cursor-pointer"
outlined
dense
:model-value="date2Thai(leaveDateOrder)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่ออกคำสั่ง'}`]"
hide-bottom-space

View file

@ -250,7 +250,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="formDataSalary.typePosition"
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
emit-value
map-options
option-label="name"
@ -550,7 +550,7 @@ const refOptions = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "21",
@ -686,7 +686,7 @@ const refOptionsFilter = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "0",
@ -947,7 +947,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "postionTypeName",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "postionTypeName",
headerStyle: "font-size: 14px",
@ -1125,7 +1125,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -1290,7 +1290,7 @@ function inputPositionLevelBlur() {
if (
!optionStore.optipnLevel.some(
(v:any) => v.name === tempPositionLevelInput.value
(v: any) => v.name === tempPositionLevelInput.value
)
) {
createValue(tempPositionLevelInput.value);

View file

@ -142,7 +142,6 @@
:class="getClass(edit)"
:outlined="edit"
dense
:borderless="!edit"
:model-value="date2Thai(date)"
:rules="[
@ -531,7 +530,7 @@
</q-form>
</q-card>
</q-dialog>
<HistoryTable
:rows="rowsHistory"
:columns="columnsHistory"
@ -670,7 +669,7 @@ const refOptions = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "21",
@ -806,7 +805,7 @@ const refOptionsFilter = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "0",
@ -1417,7 +1416,7 @@ const nodeTree = async () => {
messageError($q, e);
})
.finally(() => {
store.isLoad++
store.isLoad++;
});
};
@ -1494,7 +1493,7 @@ const fetchData = async () => {
.get(config.API.profileSalaryEmployeeId(profileId.value))
.then((res) => {
const data = res.data.result;
rows.value = [];
data.map((e: any) => {
rows.value.push({
@ -1541,7 +1540,7 @@ const fetchData = async () => {
// refCommandDate: new Date(e.refCommandDate),
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
salaryStatus: null
salaryStatus: null,
});
});
})
@ -1549,7 +1548,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
store.isLoad++
store.isLoad++;
});
}
};
@ -1698,7 +1697,7 @@ const templateDetail = async () => {
// );
// if (positionTypeF.length > 0) {
// salaryClass.value =
// salaryClass.value + `${positionTypeF[0].name} `;
// salaryClass.value + `${positionTypeF[0].name} `;
// }
// const positionLevelF = positionLevelOptions.value.filter(
// (r: DataOption) => r.id == positionLevelId.value
@ -2022,7 +2021,7 @@ const clickHistory = async (row: RequestItemsEmployee) => {
refCommandNo: e.refCommandNo,
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
salaryStatus: null
salaryStatus: null,
});
});
})

View file

@ -142,7 +142,6 @@
:class="getClass(edit)"
:outlined="edit"
dense
:borderless="!edit"
:model-value="date2Thai(date)"
:rules="[
@ -645,7 +644,7 @@ const refOptions = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "21",
@ -781,7 +780,7 @@ const refOptionsFilter = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "0",
@ -1726,7 +1725,7 @@ const templateDetail = async () => {
// );
// if (positionTypeF.length > 0) {
// salaryClass.value =
// salaryClass.value + `${positionTypeF[0].name} `;
// salaryClass.value + `${positionTypeF[0].name} `;
// }
// const positionLevelF = positionLevelOptions.value.filter(
// (r: DataOption) => r.id == positionLevelId.value

View file

@ -324,9 +324,9 @@
:borderless="!edit"
v-model="positionTypeId"
:rules="[
(val: string) => !!val || `${'กรุณาเลือกตำแหน่งประเภท'}`,
(val: string) => !!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`,
]"
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
@update:modelValue="updateSelectType"
emit-value
map-options
@ -824,7 +824,7 @@ const refOptions = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "21",
@ -960,7 +960,7 @@ const refOptionsFilter = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "0",
@ -1221,7 +1221,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -1399,7 +1399,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -1928,7 +1928,7 @@ const clickAdd = async () => {
// );
// if (positionTypeF.length > 0) {
// salaryClass.value =
// salaryClass.value + `${positionTypeF[0].name} `;
// salaryClass.value + `${positionTypeF[0].name} `;
// }
// const positionLevelF = positionLevelOptions.value.filter(

View file

@ -142,7 +142,6 @@
:class="getClass(edit)"
:outlined="edit"
dense
:borderless="!edit"
:model-value="date2Thai(date)"
:rules="[
@ -531,7 +530,7 @@
</q-form>
</q-card>
</q-dialog>
<HistoryTable
:rows="rowsHistory"
:columns="columnsHistory"
@ -670,7 +669,7 @@ const refOptions = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "21",
@ -806,7 +805,7 @@ const refOptionsFilter = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "0",
@ -1417,7 +1416,7 @@ const nodeTree = async () => {
messageError($q, e);
})
.finally(() => {
store.isLoad++
store.isLoad++;
});
};
@ -1494,7 +1493,7 @@ const fetchData = async () => {
.get(config.API.profileSalaryEmployeeId(profileId.value))
.then((res) => {
const data = res.data.result;
rows.value = [];
data.map((e: any) => {
rows.value.push({
@ -1541,7 +1540,7 @@ const fetchData = async () => {
// refCommandDate: new Date(e.refCommandDate),
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
salaryStatus: null
salaryStatus: null,
});
});
})
@ -1549,7 +1548,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
store.isLoad++
store.isLoad++;
});
}
};
@ -1698,7 +1697,7 @@ const templateDetail = async () => {
// );
// if (positionTypeF.length > 0) {
// salaryClass.value =
// salaryClass.value + `${positionTypeF[0].name} `;
// salaryClass.value + `${positionTypeF[0].name} `;
// }
// const positionLevelF = positionLevelOptions.value.filter(
// (r: DataOption) => r.id == positionLevelId.value
@ -2022,7 +2021,7 @@ const clickHistory = async (row: RequestItemsEmployee) => {
refCommandNo: e.refCommandNo,
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
salaryStatus: null
salaryStatus: null,
});
});
})

View file

@ -644,7 +644,7 @@ const refOptions = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "21",
@ -780,7 +780,7 @@ const refOptionsFilter = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "0",
@ -1725,7 +1725,7 @@ const templateDetail = async () => {
// );
// if (positionTypeF.length > 0) {
// salaryClass.value =
// salaryClass.value + `${positionTypeF[0].name} `;
// salaryClass.value + `${positionTypeF[0].name} `;
// }
// const positionLevelF = positionLevelOptions.value.filter(
// (r: DataOption) => r.id == positionLevelId.value

View file

@ -92,7 +92,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -772,7 +772,7 @@ onMounted(() => {
lazy-rules
borderless
v-model="formDataSalary.positionType"
:label="empType == '' ? 'ตำแหน่งประเภท' : 'กลุ่มงาน'"
:label="empType == '' ? 'ประเภทตำแหน่ง' : 'กลุ่มงาน'"
emit-value
map-options
option-label="name"
@ -782,7 +782,7 @@ onMounted(() => {
use-input
input-debounce="0"
@update:model-value="updateSelectType"
:rules="empType == '' ? [(val: string) => !!val || 'กรุณาเลือกตำแหน่งประเภท' ]:[(val: string) => !!val || 'กรุณาเลือกกลุ่มงาน' ]"
:rules="empType == '' ? [(val: string) => !!val || 'กรุณาเลือกประเภทตำแหน่ง' ]:[(val: string) => !!val || 'กรุณาเลือกกลุ่มงาน' ]"
@filter="(inputValue: any,
doneFn: Function) => filterSelector(inputValue, doneFn, 'posType'
)"

View file

@ -118,7 +118,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",

View file

@ -183,12 +183,66 @@ async function fetchProfile(id: string) {
});
}
const reasonStatus = ref<boolean>(false);
const leaveReason = ref<string>("");
const reasonOptions = ref<DataOption[]>([
{
id: "RETIRE",
name: "เกษียณอายุราชการ",
},
{
id: "RESIGN",
name: "ลาออก",
},
{
id: "TRANSFER",
name: "ให้โอน",
},
{
id: "DEATH",
name: "ถึงแก่กรรม",
},
{
id: "LAYOFF",
name: "ให้ออก",
},
{
id: "DISCHARGE",
name: "ปลดออก",
},
{
id: "DISMISS",
name: "ไล่ออก",
},
{
id: "OTHER",
name: "อื่นๆ",
},
]);
async function fetchDataPersonal() {
showLoader();
await http
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
.then((res) => {
formDetail.value = res.data.result;
if (res.data.result.leaveReason) {
//
const reason = reasonOptions.value.filter(
(r: DataOption) => r.id == res.data.result.leaveReason
);
if (reason.length > 0) {
leaveReason.value = ` (พ้นจากราชการด้วยสาเหตุ: ${reason[0].name})`;
} else if (
res.data.result.leaveReason !== null &&
res.data.result.leaveReason !== ""
) {
leaveReason.value = ` (พ้นจากราชการด้วยสาเหตุ: ${res.data.result.leaveReason})`;
}
reasonStatus.value = reason.length > 0 ? true : false;
}
fileName.value = res.data.result.avatarName;
if (formDetail.value?.avatarName) {
fetchProfile(profileId.value);
@ -205,11 +259,32 @@ async function fetchDataPersonal() {
}
function onClickDownloadKp7(type: string) {
if (type === "FULL") {
window.open(config.API.profileReportId(profileId.value));
} else if (type === "SHORT") {
window.open(config.API.profileKp7ShortId(profileId.value));
}
showLoader();
const url =
type === "FULL"
? config.API.profileReportId(profileId.value)
: config.API.profileKp7ShortId(profileId.value);
const fileName = type === "FULL" ? "ก.พ.7/ก.ก.1" : "ประวัติแบบย่อ";
http
.get(url, {
responseType: "arraybuffer", //
})
.then((res) => {
const data = res.data;
const blob = new Blob([data], { type: "application/pdf" });
const url = URL.createObjectURL(blob);
const link = document.createElement("a");
link.href = url;
link.download = `${fileName}.pdf`;
document.body.appendChild(link);
link.click();
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
/** ช่วยราชการ */
@ -593,7 +668,7 @@ onMounted(async () => {
v-if="formDetail && formDetail.firstName && formDetail.lastName"
>
{{
`${formDetail?.prefix}${formDetail?.firstName} ${formDetail?.lastName}`
`${formDetail?.prefix}${formDetail?.firstName} ${formDetail?.lastName} ${leaveReason}`
}}
</h2>
</div>

View file

@ -7,7 +7,7 @@ import type { ResponseTitle } from "@/modules/05_placement/interface/response/Re
import type {
appointmentData,
ResponseData,
DataProfile
DataProfile,
} from "@/modules/05_placement/interface/response/AppointMent";
import type { QForm } from "quasar";
import http from "@/plugins/http";
@ -181,11 +181,8 @@ onMounted(async () => {
/>
รายละเอยดการปรบระดบชนงานลกจาง {{ title.fullname }}
</div>
<CardProfile
:data="dataProfile as DataProfile"
:type="'employee'"
/>
<CardProfile :data="dataProfile as DataProfile" :type="'employee'" />
<q-card 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">
@ -254,7 +251,7 @@ onMounted(async () => {
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-12 row q-pa-md items-center">
<div class="col-12">
<div class="text-weight-bold">ตำแหนและหนวยงานเด</div>
<div class="text-weight-bold">ตำแหน/งกเด</div>
</div>
<div class="col-12">
@ -284,9 +281,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
/>
</div>
</div>
@ -300,9 +297,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับ'}`"
:label="`${'ระดับตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -15,7 +15,14 @@ const storeFn = useTransferDataStore();
const { statusText } = storeFn;
const mixin = useCounterMixin();
const { showLoader, success, messageError, dialogConfirm, hideLoader ,date2Thai} = mixin;
const {
showLoader,
success,
messageError,
dialogConfirm,
hideLoader,
date2Thai,
} = mixin;
const $q = useQuasar();
const selected = ref<[]>([]);
@ -73,7 +80,7 @@ const columns2 = ref<QTableProps["columns"]>([
{
name: "organizationName",
align: "left",
label: "หน่วยงานที่รับการแต่งตั้ง-เลื่อน-ย้าย",
label: "หน่วยงานที่รับปรับระดับชั้นงาน-ย้าย",
sortable: true,
field: "organizationName",
headerStyle: "font-size: 14px",
@ -241,11 +248,7 @@ watchEffect(() => {
v-model="props.selected"
/>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>

View file

@ -213,7 +213,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "organizationName",
align: "left",
label: "หน่วยงานที่รับการแต่งตั้ง-เลื่อน-ย้าย",
label: "หน่วยงานที่รับปรับระดับชั้นงาน-ย้าย",
sortable: true,
field: "organizationName",
headerStyle: "font-size: 14px",
@ -260,7 +260,7 @@ const fecthlistappointment = async () => {
.then((res) => {
let response = res.data.result;
listRecevice.value = response;
rows.value = response
rows.value = response;
// rows.value = response.map((e: resData) => ({
// personalId: e.id,
// citizenId: e.citizenId,
@ -485,17 +485,14 @@ const savePosition = async () => {
// }
// };
function openModalTree(data:any,type:string){
modalTree.value = true
function openModalTree(data: any, type: string) {
modalTree.value = true;
typeModal.value = type;
personalId.value = data.id;
dataRows.value = data;
posType.value = data.posTypeId;
posLevel.value = data.posLevelId;
position.value = data.positionName;
posType.value = data.posTypeNameOld;
posLevel.value = data.posLevelNameOld;
position.value = data.positionOld;
}
function onSave(data: any) {
@ -532,7 +529,6 @@ function onSave(data: any) {
hideLoader();
});
}
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">
@ -711,7 +707,7 @@ function onSave(data: any) {
<q-item
clickable
v-close-popup
@click="openModalTree(props.row,'SLIP')"
@click="openModalTree(props.row, 'SLIP')"
>
<q-item-section
style="min-width: 0px"
@ -724,12 +720,14 @@ function onSave(data: any) {
name="mdi-bookmark-outline"
/>
</q-item-section>
<q-item-section>เลอกหนวยงานทบปรบระดบชนงาน</q-item-section>
<q-item-section
>เลอกหนวยงานทบปรบระดบชนงาน</q-item-section
>
</q-item>
<q-item
clickable
v-close-popup
@click="openModalTree(props.row,'MOVE')"
@click="openModalTree(props.row, 'MOVE')"
>
<q-item-section
style="min-width: 0px"
@ -742,7 +740,9 @@ function onSave(data: any) {
name="mdi-bookmark-outline"
/>
</q-item-section>
<q-item-section>เลอกหนวยงานทบยาย</q-item-section>
<q-item-section
>เลอกหนวยงานทบยาย</q-item-section
>
</q-item>
<q-item
clickable
@ -877,6 +877,5 @@ function onSave(data: any) {
:dataRows="dataRows"
:onSubmit="onSave"
/>
</template>
<style scoped lang="scss"></style>

View file

@ -228,7 +228,7 @@ const positionPathSideOptions = ref<Object[]>([
value: "",
},
]);
//
//
const positionTypeOptions = ref<Object[]>([
{
label: "",

View file

@ -47,7 +47,6 @@ let dataForm = reactive({
positionTypeId: "",
});
const fetchPublishFile = async () => {
await http
.get(config.API.getPublishFileHistory)
@ -237,7 +236,7 @@ const positionPathSideOptions = ref<Object[]>([
value: "",
},
]);
//
//
const positionTypeOptions = ref<Object[]>([
{
label: "",
@ -673,9 +672,9 @@ onMounted(async () => {
lazy-rules
:options="positionLevelOptions"
v-model="dataForm.positionLevelId"
:label="`${'ระดับ'}`"
:label="`${'ระดับตำแหน่ง'}`"
hide-bottom-space
:rules="[(val: string) => !!val || `${'กรุณาเลือกระดับ'}`]"
:rules="[(val: string) => !!val || `${'กรุณาเลือกระดับตำแหน่ง'}`]"
emit-value
map-options
/>

View file

@ -233,7 +233,7 @@ onMounted(async () => {
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-12 row q-pa-md items-center">
<div class="col-12">
<div class="text-weight-bold">ตำแหนและหนวยงานเด</div>
<div class="text-weight-bold">ตำแหน/งกเด</div>
</div>
<div class="col-12">
@ -279,9 +279,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
:label="`${'ระดับตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -6,11 +6,10 @@ import { useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { useTransferDataStore } from "@/modules/05_placement/store";
import Dialogbody from "@/modules/05_placement/components/AppointMent/Dialogbody.vue";
import DialogOrgTree from "@/modules/05_placement/components/AppointMent/AppointmentModal.vue";
import type {
listAppointType,
resData,
orgFilter,
} from "@/modules/05_placement/interface/response/AppointMent";
import type { OpType } from "@/modules/05_placement/interface/response/Main";
import http from "@/plugins/http";
@ -255,9 +254,9 @@ const openModalTree = (data: any, type: string) => {
modalTree.value = true;
typeModal.value = type;
dataRows.value = data;
posType.value = data.posTypeId;
posLevel.value = data.posLevelId;
position.value = data.positionName;
posType.value = data.posTypeNameOld;
posLevel.value = data.positionLevelOld;
position.value = data.positionOld;
};
//
const clickDelete = (id: string) => {

View file

@ -230,7 +230,7 @@ onMounted(async () => {
<div class="col-xs-12 row items-center">
<div class="col-12">
<div class="text-weight-bold">ตำแหนและหนวยงานเด</div>
<div class="text-weight-bold">ตำแหน/งกเด</div>
</div>
<div class="col-12">
<q-input
@ -258,9 +258,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
/>
</div>
</div>
@ -274,9 +274,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับ'}`"
:label="`${'ระดับตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -43,9 +43,8 @@ const props = defineProps({
const visibleColumns2 = ref<string[]>([
"no",
"fullname",
"position",
"positionLevel",
"affiliation",
"organizationPositionOld",
"createdAt",
"status",
]);
@ -71,15 +70,6 @@ const columns2 = ref<QTableProps["columns"]>([
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
},
{
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
@ -90,27 +80,24 @@ const columns2 = ref<QTableProps["columns"]>([
style: "font-size: 14px",
format(val, row) {
let name = "";
if (row.posTypeName && row.posLevelName) {
name = `${row.posTypeName} (${row.posLevelName})`;
} else if (row.posTypeName) {
name = `${row.posTypeName}`;
} else if (row.posLevelName) {
name = `(${row.posLevelName})`;
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
},
{
name: "affiliation",
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "affiliation",
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findOrgName(row);
},
},
{
name: "createdAt",

View file

@ -47,9 +47,8 @@ const filterRef = ref<any>(null);
const visibleColumns = ref<string[]>([
"no",
"fullname",
"position",
"positionLevel",
"affiliation",
"organizationPositionOld",
"createdAt",
"status",
]);
@ -75,15 +74,6 @@ const columns = ref<QTableProps["columns"]>([
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
},
{
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
@ -94,27 +84,24 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
format(val, row) {
let name = "";
if (row.posTypeName && row.posLevelName) {
name = `${row.posTypeName} (${row.posLevelName})`;
} else if (row.posTypeName) {
name = `${row.posTypeName}`;
} else if (row.posLevelName) {
name = `(${row.posLevelName})`;
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
},
{
name: "affiliation",
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "affiliation",
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findOrgName(row);
},
},
{
name: "createdAt",

View file

@ -253,7 +253,7 @@ const positionPathSideOptions = ref<Object[]>([
value: "",
},
]);
//
//
const positionTypeOptions = ref<Object[]>([
{
label: "",

View file

@ -145,8 +145,12 @@ async function fetchDataTable(id: string, level: number = 0) {
nodeId: id,
position: props?.dataRow?.positionCandidate,
typeCommand: props.typeCommand,
posLevel: props.dataRow?.posLevelCandidateId,
posType: props.dataRow?.posTypeCandidateId,
posLevel: props.dataRow?.posLevelCandidateId
? props.dataRow?.posLevelCandidateId
: "",
posType: props.dataRow?.posTypeCandidateId
? props.dataRow?.posTypeCandidateId
: "",
isAll: isAll.value,
isBlank: isBlank.value,
};

View file

@ -41,7 +41,7 @@ const posNoOptions = ref<Object[]>([{ label: "", value: "" }]);
const positionOptions = ref<Object[]>([{ label: "", value: "" }]);
// /
const positionPathSideOptions = ref<Object[]>([{ label: "", value: "" }]);
//
//
const positionTypeOptions = ref<Object[]>([{ label: "", value: "" }]);
//
const positionLineOptions = ref<Object[]>([{ label: "", value: "" }]);

View file

@ -385,8 +385,8 @@ function insertAvatar(items: any) {
config.API.fileByFile(
"ทะเบียนประวัติ",
"โปรไฟล์",
x.id,
"profile-" + x.id
x.personalId,
"profile-" + x.personalId
)
)
.then((img) => {

View file

@ -114,12 +114,11 @@ const fetchPerson = async () => {
OpsFilter.value.genderOps = optiongenders;
let optionprefixs: DataOption[] = [];
data.prefixs.map((r: DataOptioninfo) => {
optionprefixs.push({
id: r.id.toString(),
name: r.name.toString(),
});
});
optionprefixs = data.prefixs.map((v: any) => ({
id: v.id,
name: v.name,
}));
Ops.value.prefixOps = optionprefixs;
OpsFilter.value.prefixOps = optionprefixs;
@ -302,22 +301,22 @@ const onSubmit = async () => {
if (informaData.value.lastName != undefined)
formData.append("lastName", informaData.value.lastName);
if (informaData.value.genderId != undefined)
formData.append("genderId", informaData.value.genderId);
formData.append("gender", informaData.value.genderId);
if (informaData.value.nationality != undefined)
formData.append("nationality", informaData.value.nationality);
if (informaData.value.ethnicity != undefined)
formData.append("race", informaData.value.ethnicity);
if (informaData.value.religionId != undefined)
formData.append("religionId", informaData.value.religionId);
formData.append("religion", informaData.value.religionId);
if (informaData.value.birthDate != undefined)
formData.append(
"birthDate",
dateToISO(informaData.value.birthDate) ?? dateToISO(new Date())
);
if (informaData.value.bloodId != undefined)
formData.append("bloodGroupId", informaData.value.bloodId);
formData.append("bloodGroup", informaData.value.bloodId);
if (informaData.value.statusId != undefined)
formData.append("relationshipId", informaData.value.statusId);
formData.append("relationship", informaData.value.statusId);
if (informaData.value.tel != undefined)
formData.append("telephoneNumber", informaData.value.tel);
if (informaData.value.employeeType != undefined)
@ -348,20 +347,6 @@ const clickBack = () => {
router.push("/receive");
};
function fetchPrefix() {
http
.get(config.API.orgPrefix)
.then((res) => {
prefixOps.value = res.data.result.map((v: any) => ({
id: v.name,
name: v.name,
}));
})
.catch((err) => {
messageError($q, err);
});
}
function calculateAge(birthDate: Date | null) {
if (!birthDate) return null;
const birthDateTimeStamp = new Date(birthDate).getTime();
@ -394,7 +379,6 @@ watch(
onMounted(async () => {
await fetchPerson();
await fetchPrefix();
});
</script>
@ -749,9 +733,9 @@ onMounted(async () => {
dense
lazy-rules
class="inputgreen"
:options="prefixOps"
:options="Ops.prefixOps"
option-label="name"
option-value="id"
option-value="name"
map-options
hide-bottom-space
:rules="[
@ -857,7 +841,7 @@ onMounted(async () => {
hide-bottom-space
input-debounce="0"
option-label="name"
option-value="id"
option-value="name"
v-model="informaData.genderId"
class="inputgreen"
:options="Ops.genderOps"
@ -877,7 +861,7 @@ onMounted(async () => {
emit-value
map-options
hide-bottom-space
option-value="id"
option-value="name"
option-label="name"
input-debounce="0"
class="inputgreen"
@ -921,7 +905,7 @@ onMounted(async () => {
emit-value
map-options
hide-bottom-space
option-value="id"
option-value="name"
option-label="name"
input-debounce="0"
v-model="informaData.religionId"
@ -943,7 +927,7 @@ onMounted(async () => {
emit-value
map-options
hide-bottom-space
option-value="id"
option-value="name"
option-label="name"
input-debounce="0"
v-model="informaData.bloodId"

View file

@ -43,8 +43,6 @@ const columns2 = ref<QTableProps["columns"]>([
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "citizenId",

View file

@ -41,8 +41,8 @@ const {
dialogConfirm,
} = mixin;
const profileStore = useProfileDataStore();
const { changeRetireText } = profileStore;
// const profileStore = useProfileDataStore();
// const { changeRetireText } = profileStore;
const title = ref<ResponseTitle>({
fullname: "",
@ -132,10 +132,11 @@ const OpsFilter = ref<InformationOps>({
],
});
/*** get รายการข้อมูลเกี่ยวกับบุคคล (dropdown list) */
const fetchPerson = async () => {
showLoader();
await http
.get(config.API.person)
.get(config.API.profileNewMetaMain)
.then((res) => {
const data = res.data.result;
let optionbloodGroups: DataOption[] = [];
@ -159,12 +160,11 @@ const fetchPerson = async () => {
OpsFilter.value.genderOps = optiongenders;
let optionprefixs: DataOption[] = [];
data.prefixs.map((r: DataOptioninfo) => {
optionprefixs.push({
id: r.id.toString(),
name: r.name.toString(),
});
});
optionprefixs = data.prefixs.map((v: any) => ({
id: v.id,
name: v.name,
}));
Ops.value.prefixOps = optionprefixs;
OpsFilter.value.prefixOps = optionprefixs;
@ -189,7 +189,9 @@ const fetchPerson = async () => {
OpsFilter.value.religionOps = optionreligions;
})
.catch((e: any) => {})
.finally(() => {});
.finally(() => {
hideLoader();
});
};
const getData = async () => {
@ -391,14 +393,14 @@ const calRetire = async (birth: Date) => {
.then((res: any) => {
const data = res.data.result;
informaData.value.age = data.age;
changeRetireText(data.retireDate);
// changeRetireText(data.retireDate);
dateBefore.value = birth;
})
.catch((e: any) => {
messageError($q, e);
const retire = new Date(`${birth.getFullYear() + 60}-09-30`);
informaData.value.birthDate = dateBefore.value;
changeRetireText(date2Thai(retire));
// changeRetireText(date2Thai(retire));
})
.finally(() => {
hideLoader();
@ -419,12 +421,12 @@ function saveData() {
informaData.value.birthDate !== null
? dateToISO(informaData.value.birthDate)
: null,
genderId: informaData.value.genderId,
gender: informaData.value.genderId,
nationality: informaData.value.nationality,
race: informaData.value.ethnicity,
religionId: informaData.value.religionId,
bloodGroupId: informaData.value.bloodId,
relationshipId: informaData.value.statusId,
religion: informaData.value.religionId,
bloodGroup: informaData.value.bloodId,
relationship: informaData.value.statusId,
telephoneNumber: informaData.value.tel,
reason: reason.value,
educationOld: educationOld.value,
@ -564,7 +566,7 @@ onMounted(async () => {
map-options
option-label="name"
:options="Ops.prefixOps"
option-value="id"
option-value="name"
:label="`${'คำนำหน้าชื่อ'}`"
use-input
input-debounce="0"
@ -673,7 +675,7 @@ onMounted(async () => {
map-options
option-label="name"
:options="Ops.genderOps"
option-value="id"
option-value="name"
:label="`${'เพศ'}`"
use-input
input-debounce="0"
@ -695,7 +697,7 @@ onMounted(async () => {
map-options
option-label="name"
:options="Ops.statusOps"
option-value="id"
option-value="name"
:label="`${'สถานภาพ'}`"
use-input
input-debounce="0"
@ -743,7 +745,7 @@ onMounted(async () => {
map-options
option-label="name"
:options="Ops.religionOps"
option-value="id"
option-value="name"
:label="`${'ศาสนา'}`"
use-input
input-debounce="0"
@ -767,7 +769,7 @@ onMounted(async () => {
map-options
option-label="name"
:options="Ops.bloodOps"
option-value="id"
option-value="name"
:label="`${'หมู่เลือด'}`"
use-input
input-debounce="0"
@ -845,7 +847,7 @@ onMounted(async () => {
/>
</div>
<div class="col-xs-12">
<div class="text-weight-bold">ตำแหนและหนวยงานเด</div>
<div class="text-weight-bold">ตำแหน/งกเด</div>
</div>
<div class="col-xs-12">
<q-input
@ -887,9 +889,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
/>
</div>
<div class="col-xs-6 col-sm-3">
@ -901,9 +903,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับ'}`"
:label="`${'ระดับตำแหน่ง'}`"
/>
</div>
<div class="col-xs-6 col-sm-3">

View file

@ -273,10 +273,11 @@ const openModalTree = (id: string, data: any) => {
modalTree.value = true;
type.value = null;
dataRows.value = data;
// console.log("data===>", data);
posType.value = data.posTypeId;
posLevel.value = data.posLevelId;
position.value = data.positionName;
posType.value = data.posTypeOldId;
posLevel.value = data.posLevelOldId;
position.value = data.positionOld;
};
//
const openUpload = (id: string) => {

View file

@ -84,7 +84,7 @@ const positionOptions = ref<Object[]>([{ label: "", value: "" }]);
// /
const positionPathSideOptions = ref<Object[]>([{ label: "", value: "" }]);
//
//
const positionTypeOptions = ref<Object[]>([{ label: "", value: "" }]);
//

View file

@ -259,7 +259,7 @@ const positionPathSideOptions = ref<Object[]>([
value: "",
},
]);
//
//
const positionTypeOptions = ref<Object[]>([
{
label: "",

View file

@ -350,7 +350,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="educationOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'วุฒิ/สาขา'}`"
/>
@ -360,9 +360,7 @@ onMounted(async () => {
<div class="col-12 q-pb-sm"><q-separator /></div>
<div class="col-12">
<div class="text-weight-bold text-grey">
ตำแหนงและหนวยงานเด
</div>
<div class="text-weight-bold text-grey">ตำแหน/งกดเด</div>
</div>
<div class="col-12">
<q-input
@ -390,9 +388,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -23,8 +23,7 @@ const {
messageError,
dialogConfirm,
hideLoader,
findOrgName,
findPosMasterNo,
findPosMasterNoOld,
date2Thai,
} = mixin;
@ -51,26 +50,17 @@ const columns2 = ref<QTableProps["columns"]>([
},
},
{
name: "posNo",
name: "posMasterNoOld",
align: "left",
label: "เลขที่ตำแหน่ง",
sortable: true,
field: "posNo",
field: "posMasterNoOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findPosMasterNo(row);
return findPosMasterNoOld(row);
},
},
{
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
@ -80,20 +70,25 @@ const columns2 = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return `${row.posTypeName} (${row.posLevelName})`;
let name = "";
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
},
{
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findOrgName(row);
},
},
{
name: "organization",
@ -128,8 +123,7 @@ const columns2 = ref<QTableProps["columns"]>([
const visibleColumns2 = ref<string[]>([
"no",
"name",
"posNo",
"position",
"posMasterNoOld",
"positionLevel",
"organizationPositionOld",
"organization",

View file

@ -30,8 +30,7 @@ const {
hideLoader,
success,
dialogRemove,
findOrgName,
findPosMasterNo,
findPosMasterNoOld,
} = mixin;
//
@ -58,26 +57,17 @@ const columns = ref<QTableProps["columns"]>([
},
},
{
name: "posNo",
name: "posMasterNoOld",
align: "left",
label: "เลขที่ตำแหน่ง",
sortable: true,
field: "posNo",
field: "posMasterNoOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findPosMasterNo(row);
return findPosMasterNoOld(row);
},
},
{
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
@ -88,12 +78,12 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
format(val, row) {
let name = "";
if (row.posTypeName && row.posLevelName) {
name = `${row.posTypeName} (${row.posLevelName})`;
} else if (row.posTypeName) {
name = `${row.posTypeName}`;
} else if (row.posLevelName) {
name = `(${row.posLevelName})`;
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
@ -101,14 +91,11 @@ const columns = ref<QTableProps["columns"]>([
{
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findOrgName(row);
},
},
{
name: "organization",
@ -143,8 +130,7 @@ const columns = ref<QTableProps["columns"]>([
const visibleColumns = ref<string[]>([
"no",
"name",
"posNo",
"position",
"posMasterNoOld",
"positionLevel",
"organizationPositionOld",
"organization",
@ -324,7 +310,7 @@ onMounted(async () => {
: ''
"
>
{{ col.value ? col.value : "-" }}
{{ col.value == null ? "" : col.value }}
</div>
</q-td>
<q-td auto-width>

View file

@ -203,7 +203,7 @@ onMounted(() => {
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-12 row items-center">
<div class="col-12">
<div class="text-weight-bold">ตำแหนและหนวยงานเด</div>
<div class="text-weight-bold">ตำแหน/งกเด</div>
</div>
<div class="col-12">
<q-input
@ -231,9 +231,9 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
/>
</div>
</div>
@ -247,9 +247,9 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับ'}`"
:label="`${'ระดับตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -2,6 +2,7 @@
import { ref, computed, watchEffect } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useTransferDataStore } from "@/modules/05_placement/store";
import type { QTableProps } from "quasar";
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
@ -9,21 +10,30 @@ import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogH
import http from "@/plugins/http";
import config from "@/app.config";
const transferStore = useTransferDataStore();
const { statusText } = transferStore;
const $q = useQuasar();
const selected = ref<ResponseData[]>([]);
const mixin = useCounterMixin();
const { showLoader, success, messageError, dialogConfirm,hideLoader } = mixin;
const {
showLoader,
success,
messageError,
dialogConfirm,
hideLoader,
date2Thai,
} = mixin;
//
const visibleColumns2 = ref<string[]>([
"no",
"fullname",
"position",
"positionLevel",
"posType",
"organizationPositionOld",
"organization",
"statustext",
"dateText",
"status",
"createdAt",
]);
const columns2 = ref<QTableProps["columns"]>([
{
@ -34,8 +44,6 @@ const columns2 = ref<QTableProps["columns"]>([
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "fullname",
@ -47,33 +55,26 @@ const columns2 = ref<QTableProps["columns"]>([
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format(val, row) {
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
},
{
name: "position",
name: "posType",
align: "left",
label: "ตำแหน่งในสายงาน",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "position",
field: "posType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionLevel",
align: "left",
label: "ระดับ",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format(val, row) {
return row.positionTypeOld + " (" + row.positionLevelOld + ")";
},
},
{
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
@ -93,27 +94,28 @@ const columns2 = ref<QTableProps["columns"]>([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "dateText",
name: "createdAt",
align: "left",
label: "วันที่ดำเนินการ",
sortable: true,
field: "dateText",
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
sortOrder: "da",
format(val) {
return date2Thai(val);
},
},
{
name: "statustext",
name: "status",
align: "left",
label: "สถานะ",
sortable: true,
field: "statustext",
field: "status",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format: (val) => statusText(val),
},
]);
@ -122,11 +124,9 @@ const props = defineProps({
closeModal: Function,
getData: Function,
rows2: Array,
filterKeyword2:String,
filterKeyword2: String,
});
const checkSelected = computed(() => {
if (selected.value.length === 0) {
return true;
@ -135,8 +135,13 @@ const checkSelected = computed(() => {
//popup
const saveOrder = () => {
dialogConfirm($q,() => Ordersave(),"ยืนยันส่งไปออกคำสั่ง","ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?" )
}
dialogConfirm(
$q,
() => Ordersave(),
"ยืนยันส่งไปออกคำสั่ง",
"ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?"
);
};
//
const Ordersave = async () => {
const id = selected.value.map((r) => r.id);
@ -160,17 +165,13 @@ const Ordersave = async () => {
});
};
const emit = defineEmits([
"update:filterKeyword2",
"update:selected",
]);
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
const updateInput = (value: any) => {
emit("update:filterKeyword2", value);
};
//
const Reset = () => {
emit("update:filterKeyword2", "");
emit("update:filterKeyword2", "");
};
watchEffect(() => {
if (props.Modal === true) {
@ -192,7 +193,7 @@ watchEffect(() => {
outlined
dense
debounce="300"
:model-value="filterKeyword2"
:model-value="filterKeyword2"
@update:model-value="updateInput"
placeholder="ค้นหา"
style="width: 850px; max-width: auto"
@ -254,34 +255,23 @@ watchEffect(() => {
v-model="props.selected"
/>
</q-td>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
<q-td key="position" :props="props">
{{ props.row.position }}
</q-td>
<q-td key="positionLevel" :props="props">
{{ props.row.positionLevel }}
</q-td>
<q-td key="organizationPositionOld" :props="props">
<div class="table_ellipsis">
{{ props.row.organizationPositionOld }}
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>
</q-td>
<q-td key="organization" :props="props">
<div class="table_ellipsis">
{{ props.row.organization }}
<div
v-else
:class="
col.name === 'organizationPositionOld' ||
col.name === 'organization'
? 'table_ellipsis'
: ''
"
>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td key="dateText" :props="props">
{{ props.row.dateText }}
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>
</q-tr>
</template>
</d-table>
@ -297,4 +287,4 @@ watchEffect(() => {
</q-card-actions>
</q-card>
</q-dialog>
</template>
</template>

View file

@ -15,9 +15,10 @@ const router = useRouter();
const mixin = useCounterMixin();
const transferStore = useTransferDataStore();
const { date2Thai, messageError, showLoader, hideLoader, success } = mixin;
const { statusText } = transferStore;
const { date2Thai, messageError, showLoader, hideLoader } = mixin;
const modal = ref<boolean>(false);
const filterKeyword = ref<string>("");
const filterKeyword2 = ref<string>("");
@ -30,12 +31,11 @@ const filters = ref<ResponseData[]>([]);
const visibleColumns = ref<string[]>([
"no",
"fullname",
"position",
"positionLevel",
"posType",
"organizationPositionOld",
"organization",
"statustext",
"dateText",
"status",
"createdAt",
]);
const resetFilter = () => {
@ -65,33 +65,26 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format(val, row) {
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
},
{
name: "position",
name: "posType",
align: "left",
label: "ตำแหน่งในสายงาน",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "position",
field: "posType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionLevel",
align: "left",
label: "ระดับ",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format(val, row) {
return row.positionTypeOld + " (" + row.positionLevelOld + ")";
},
},
{
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
@ -111,27 +104,28 @@ const columns = ref<QTableProps["columns"]>([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "dateText",
name: "createdAt",
align: "left",
label: "วันที่ดำเนินการ",
sortable: true,
field: "dateText",
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
sortOrder: "da",
format(val) {
return date2Thai(val);
},
},
{
name: "statustext",
name: "status",
align: "left",
label: "สถานะ",
sortable: true,
field: "statustext",
field: "status",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format: (val) => statusText(val),
},
]);
@ -144,17 +138,16 @@ const closeModal = () => {
//
const openModalOrder = () => {
openModal();
console.log("filters===>",filters.value)
const row = filters.value.filter(
(r: ResponseData) =>
(r.status == "APPROVE") &&
r.status == "APPROVE" &&
r.organizationPositionOld &&
r.positionTypeOld &&
r.positionLevelOld &&
r.positionNumberOld &&
r.salary !== null &&
r.organization &&
r.date
r.date
);
rows2.value = row;
};
@ -164,38 +157,8 @@ const getData = async () => {
await http
.get(config.API.transfer)
.then((res: any) => {
const data = res.data.result;
let list: ResponseData[] = [];
data.map((r: ResponseData) => {
list.push({
dateText:
r.createdAt !== null ? date2Thai(new Date(r.createdAt)) : "-",
createdAt: r.createdAt !== null ? new Date(r.createdAt) : null,
date: r.date,
firstName: r.firstName ?? "",
id: r.id ?? "",
isActive: r.isActive ? r.isActive : false,
lastName: r.lastName ?? "",
organization: r.organization ?? "",
organizationPositionOld: r.organizationPositionOld ?? "",
posNo: r.posNo ?? "",
position: r.position ?? "",
positionLevel: r.positionLevel ?? "",
positionLevelOld: r.positionLevelOld ?? "",
positionNumberOld: r.positionNumberOld ?? "",
positionTypeOld: r.positionTypeOld ?? "",
prefix: r.prefix ?? "",
reason: r.reason ?? "",
salary: r.salary ? r.salary : 0,
status: r.status ?? "",
statustext: statusText(r.status ?? ""),
fullname: `${r.prefix ?? ""} ${r.firstName ?? ""} ${
r.lastName ?? ""
}`,
});
});
rows.value = list;
filters.value = list;
rows.value = res.data.result;
filters.value = rows.value;
})
.catch((e) => {
messageError($q, e);
@ -282,39 +245,23 @@ onMounted(async () => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr
:props="props"
class="cursor-pointer"
@click="router.push(`/transfer/${props.row.id}`)"
>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
<q-td key="position" :props="props">
{{ props.row.position }}
</q-td>
<q-td key="positionLevel" :props="props">
{{ props.row.positionLevel }}
</q-td>
<q-td key="organizationPositionOld" :props="props">
<div class="table_ellipsis">
{{ props.row.organizationPositionOld }}
<q-tr :props="props" class="cursor-pointer">
<q-td
v-for="col in props.cols"
:key="col.id"
class="cursor-pointer"
@click="router.push(`/transfer/${props.row.id}`)"
>
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>
</q-td>
<q-td key="organization" :props="props">
<div class="table_ellipsis">
{{ props.row.organization }}
<div v-else>
{{
col.value == null ? "" : col.value == "" ? "-" : col.value
}}
</div>
</q-td>
<q-td key="dateText" :props="props">
{{ props.row.dateText }}
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -360,7 +360,7 @@ onMounted(async () => {
</div>
<div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12">
<div class="col-12 text-top">ระด</div>
<div class="col-12 text-top">ระดตำแหน</div>
<div class="col-12 text-detail">
{{ responseData.positionLevelOld }}
</div>
@ -555,7 +555,7 @@ onMounted(async () => {
<div class="row bg-white q-col-gutter-y-md">
<div class="col-xs-12 row items-center">
<div class="col-12">
<div class="text-weight-bold">ตำแหนและหนวยงานเด</div>
<div class="text-weight-bold">ตำแหน/งกเด</div>
</div>
<div class="col-12">
<q-input
@ -584,9 +584,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
/>
</div>
<div class="col-xs-6 col-sm-3">
@ -598,9 +598,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับ'}`"
:label="`${'ระดับตำแหน่ง'}`"
/>
</div>
<div class="col-xs-6 col-sm-3">

View file

@ -22,8 +22,8 @@ const {
messageError,
dialogConfirm,
hideLoader,
findOrgName,
findPosMasterNo,
findOrgNameOld,
findPosMasterNoOld,
date2Thai,
} = mixin;
@ -51,23 +51,23 @@ const columns2 = ref<QTableProps["columns"]>([
},
},
{
name: "posNo",
name: "posMasterNoOld",
align: "left",
label: "เลขที่ตำแหน่ง",
sortable: true,
field: "posNo",
field: "posMasterNoOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findPosMasterNo(row);
return findPosMasterNoOld(row);
},
},
{
name: "position",
name: "positionOld",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
field: "positionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -80,7 +80,15 @@ const columns2 = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return `${row.posTypeName} (${row.posLevelName})`;
let name = "";
if (row.posTypeNameOld && row.posLevelNameOld) {
name = `${row.posTypeNameOld} (${row.posLevelNameOld})`;
} else if (row.posTypeNameOld) {
name = `${row.posTypeNameOld}`;
} else if (row.posLevelNameOld) {
name = `(${row.posLevelNameOld})`;
} else name = "-";
return name;
},
},
{
@ -88,13 +96,10 @@ const columns2 = ref<QTableProps["columns"]>([
align: "left",
label: "สังกัด",
sortable: true,
field: "organizationPositionOld",
field: "organization",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
classes: "table_ellipsis",
format(val, row) {
return findOrgName(row);
},
format: (val, row) => findOrgNameOld(row),
},
{
name: "organization",
@ -104,7 +109,6 @@ const columns2 = ref<QTableProps["columns"]>([
field: "organization",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
classes: "table_ellipsis",
},
{
name: "dateStart",
@ -150,8 +154,8 @@ const columns2 = ref<QTableProps["columns"]>([
const visibleColumns2 = ref<string[]>([
"no",
"name",
"posNo",
"position",
"posMasterNoOld",
"positionOld",
"positionLevel",
"organizationPositionOld",
"organization",
@ -301,13 +305,18 @@ watchEffect(() => {
{{ props.rowIndex + 1 }}
</div>
<div v-else :class="
col.name === 'organizationPositionOld' ||
col.name === 'organization'
? 'table_ellipsis'
: ''
">
{{ col.value ? col.value : "-" }}
<div
v-else
:class="
col.name === 'organizationPositionOld' ||
col.name === 'organization'
? 'table_ellipsis'
: ''
"
>
{{
col.value == null ? "" : col.value == "" ? "-" : col.value
}}
</div>
</q-td>
</q-tr>

View file

@ -39,7 +39,7 @@ const dataProfile = ref<DataProfile>();
const fullname = ref<string>("");
/** form แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/
const organizationPositionOld = ref<string>(""); //
const organizationPositionOld = ref<string>(""); ///
const organization = ref<string>(""); //
const dateStart = ref<Date | null>(null); //
const dateEnd = ref<Date | null>(null); //
@ -196,7 +196,7 @@ onMounted(() => {
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-12 row items-center">
<div class="col-12">
<div class="text-weight-bold">ตำแหนและหนวยงานเด</div>
<div class="text-weight-bold">ตำแหน/งกเด</div>
</div>
<div class="col-12">
<q-input

View file

@ -31,8 +31,8 @@ const {
hideLoader,
success,
dialogRemove,
findOrgName,
findPosMasterNo,
findOrgNameOld,
findPosMasterNoOld,
} = mixin;
//
@ -59,23 +59,23 @@ const columns = ref<QTableProps["columns"]>([
},
},
{
name: "posNo",
name: "posMasterNoOld",
align: "left",
label: "เลขที่ตำแหน่ง",
sortable: true,
field: "posNo",
field: "posMasterNoOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findPosMasterNo(row);
return findPosMasterNoOld(row);
},
},
{
name: "position",
name: "positionOld",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
field: "positionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -89,12 +89,12 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
format(val, row) {
let name = "";
if (row.posTypeName && row.posLevelName) {
name = `${row.posTypeName} (${row.posLevelName})`;
} else if (row.posTypeName) {
name = `${row.posTypeName}`;
} else if (row.posLevelName) {
name = `(${row.posLevelName})`;
if (row.posTypeNameOld && row.posLevelNameOld) {
name = `${row.posTypeNameOld} (${row.posLevelNameOld})`;
} else if (row.posTypeNameOld) {
name = `${row.posTypeNameOld}`;
} else if (row.posLevelNameOld) {
name = `(${row.posLevelNameOld})`;
} else name = "-";
return name;
},
@ -104,12 +104,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "สังกัด",
sortable: true,
field: "organizationPositionOld",
field: "organization",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findOrgName(row);
},
format: (val, row) => findOrgNameOld(row),
},
{
name: "organization",
@ -164,8 +162,8 @@ const columns = ref<QTableProps["columns"]>([
const visibleColumns = ref<string[]>([
"no",
"name",
"posNo",
"position",
"posMasterNoOld",
"positionOld",
"positionLevel",
"organizationPositionOld",
"organization",
@ -334,7 +332,9 @@ onMounted(async () => {
: ''
"
>
{{ col.value ? col.value : "-" }}
{{
col.value == null ? "" : col.value == "" ? "-" : col.value
}}
</div>
</q-td>
<q-td auto-width>

View file

@ -221,6 +221,16 @@ interface DataProfile {
child3ShortName: string | null;
child4: string | null;
child4ShortName: string | null;
child1Old?: string | null;
child1ShortNameOld?: string | null;
child2Old?: string | null;
child2ShortNameOld?: string | null;
child3Old?: string | null;
child3ShortNameOld?: string | null;
child4Old?: string | null;
child4ShortNameOld?: string | null;
createdAt: string | Date;
dateEnd: string | Date;
dateStart: string | Date;
@ -231,15 +241,22 @@ interface DataProfile {
organization: string;
organizationPositionOld: string;
posLevelName: string;
posLevelNameOld?: string;
posMasterNo: number | null;
posTypeName: string;
posTypeNameOld?: string;
position: string;
positionOld?: string;
prefix: string;
profileId: string;
reason: string;
root: string;
rootShortName: string | null;
rootOld?: string;
rootShortNameOld?: string | null;
status: string;
positionType?: string;
positionLevel?: string;
}
export type {
DataOption,

View file

@ -10,7 +10,7 @@ interface ResponseData {
organizationPositionOld: string;
posNo: string;
position: string;
positionLevel: string;
positionLevel?: string;
positionLevelOld: string;
positionNumberOld: string;
positionTypeOld: string;
@ -20,6 +20,9 @@ interface ResponseData {
status: string;
fullname: string;
statustext: string;
positionOld?: string;
posTypeNameOld?: string;
posLevelNameOld?: string;
}
interface TypeFile {
@ -44,9 +47,8 @@ interface ResponseDataDetail {
fullname: string;
}
interface rowFile {
no: number
fileName: string
pathName: string
no: number;
fileName: string;
pathName: string;
}
export type { ResponseData, ResponseDataDetail, TypeFile ,rowFile};
export type { ResponseData, ResponseDataDetail, TypeFile, rowFile };

View file

@ -307,7 +307,7 @@ function updatemodalPersonal(modal: boolean) {
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-12 row items-center">
<div class="col-12">
<div class="text-weight-bold">ตำแหนและหนวยงานเด</div>
<div class="text-weight-bold">ตำแหน/งกเด</div>
</div>
<div class="col-12">
<q-input
@ -335,9 +335,9 @@ function updatemodalPersonal(modal: boolean) {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -20,7 +20,7 @@ const {
messageError,
dialogConfirm,
hideLoader,
findOrgName,
date2Thai,
} = mixin;
/** คอลัมน์ */
@ -46,15 +46,6 @@ const columns2 = ref<QTableProps["columns"]>([
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
},
{
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
@ -65,27 +56,34 @@ const columns2 = ref<QTableProps["columns"]>([
style: "font-size: 14px",
format(val, row) {
let name = "";
if (row.posTypeName && row.posLevelName) {
name = `${row.posTypeName} (${row.posLevelName})`;
} else if (row.posTypeName) {
name = `${row.posTypeName}`;
} else if (row.posLevelName) {
name = `(${row.posLevelName})`;
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
},
{
name: "org",
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "org",
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findOrgName(row);
},
},
{
name: "createdAt",
align: "left",
label: "วันที่ดำเนินการ",
sortable: true,
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val) => date2Thai(val),
},
{
name: "status",
@ -103,9 +101,9 @@ const columns2 = ref<QTableProps["columns"]>([
const visibleColumns2 = ref<string[]>([
"no",
"fullname",
"position",
"positionLevel",
"org",
"organizationPositionOld",
"createdAt",
"status",
]);

View file

@ -22,7 +22,7 @@ const {
hideLoader,
success,
dialogMessage,
findOrgName,
findOrgNameOld,
} = mixin;
const { statusText } = transferStore;
const modal = ref<boolean>(false);
@ -31,9 +31,8 @@ const modal = ref<boolean>(false);
const visibleColumns = ref<string[]>([
"no",
"fullname",
"position",
"positionLevel",
"org",
"organizationPositionOld",
"createdAt",
"status",
]);
@ -69,15 +68,6 @@ const columns = ref<QTableProps["columns"]>([
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
},
{
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
@ -88,27 +78,24 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
format(val, row) {
let name = "";
if (row.posTypeName && row.posLevelName) {
name = `${row.posTypeName} (${row.posLevelName})`;
} else if (row.posTypeName) {
name = `${row.posTypeName}`;
} else if (row.posLevelName) {
name = `(${row.posLevelName})`;
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
},
{
name: "org",
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "org",
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findOrgName(row);
},
},
{
name: "createdAt",

View file

@ -222,7 +222,7 @@ onMounted(async () => {
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-12 row items-center">
<div class="col-12">
<div class="text-weight-bold">ตำแหนและหนวยงานเด</div>
<div class="text-weight-bold">ตำแหน/งกเด</div>
</div>
<div class="col-12">
<q-input
@ -250,9 +250,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -307,7 +307,7 @@ function updatemodalPersonal(modal: boolean) {
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-12 row items-center">
<div class="col-12">
<div class="text-weight-bold">ตำแหนและหนวยงานเด</div>
<div class="text-weight-bold">ตำแหน/งกเด</div>
</div>
<div class="col-12">
<q-input
@ -335,9 +335,9 @@ function updatemodalPersonal(modal: boolean) {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
/>
</div>
</div>

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { reactive, ref, watch } from "vue";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
@ -55,7 +55,7 @@ const columns = ref<any["columns"]>([
{
name: "level",
required: true,
label: "ระดับ",
label: "ประเภทตำแหน่ง",
field: "level",
align: "left",
},
@ -78,51 +78,72 @@ watch(modal, () => {
} else type.value = "all";
}
fecthlistRetire();
fecthProfile();
}
});
function findOrgName(obj: any) {
if (obj) {
let name =
obj.orgChild4Name != null && obj.orgChild3Name != null
? obj.orgChild4Name + "/"
: obj.orgChild4Name != null
? obj.orgChild4Name
: "";
name +=
obj.orgChild3Name != null && obj.orgChild2Name != null
? obj.orgChild3Name + "/"
: obj.orgChild3Name !== null
? obj.orgChild3Name
: "";
name +=
obj.orgChild2Name != null && obj.orgChild1Name != null
? obj.orgChild2Name + "/"
: obj.orgChild2Name != null
? obj.orgChild2Name
: "";
name +=
obj.orgChild1Name != null && obj.orgRootName != null
? obj.orgChild1Name + "/"
: obj.orgChild1Name != null
? obj.orgChild1Name
: "";
name += obj.orgRootName != null ? obj.orgRootName : "";
return name == "" ? "-" : name;
} else {
return "";
}
}
const formPagePersonList = reactive({ keyword: "", pageSize: 10, page: 1 });
const maxPage = ref<number>(1);
// fecth profile
const fecthlistRetire = async () => {
const fecthProfile = async () => {
showLoader();
await http
.get(config.API.profileOrganizRoot)
.post(config.API.orgProfileProbation, formPagePersonList)
.then((res) => {
const id = res.data.result[0].id;
if (id !== "") {
findlist(id);
}
})
.catch((e) => {
messageError($q, e);
});
};
//
const findlist = async (id: string) => {
let data = [{}];
if (type.value === "officer") {
data = [{ criteriaType: "is_retire", criteriaValue: "false" }];
} else if (type.value === "all") {
data = [
{ criteriaType: "is_retire", criteriaValue: "false" },
{ criteriaType: "employee_class", criteriaValue: "perm" },
];
}
await http
.post(config.API.profileSearchNewOcIdType(id, type.value), {
criterias: data,
})
.then((res) => {
rows.value = res.data.result.map((e: any) => ({
maxPage.value = Math.ceil(
res.data.result.total / formPagePersonList.pageSize
);
rows.value = res.data.result.data.map((e: any) => ({
id: e.id,
fullname: e.fullname,
fullname: e.prefix + e.firstName + " " + e.lastName,
position: e.position,
level: e.positionEmployeeLevel,
organizationOrganization: e.oc,
level:
e.posTypeName && e.posLevelName
? e.posTypeName + " (" + e.posLevelName + ")"
: "-",
organizationOrganization: findOrgName(e),
}));
})
.catch((e) => {})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
@ -250,7 +271,11 @@ const paginationLabel = (start: number, end: number, total: number) => {
{{ props.row.position }}
</q-td>
<q-td key="level" :props="props">{{ props.row.level }}</q-td>
<q-td key="organizationOrganization" :props="props">
<q-td
key="organizationOrganization"
:props="props"
class="table_ellipsis"
>
{{ props.row.organizationOrganization }}
</q-td>
<q-td>

View file

@ -9,7 +9,9 @@ import http from "@/plugins/http";
import config from "@/app.config";
import DialogHeader from "@/components/DialogHeader.vue";
import DialogPopupReason from "@/components/Dialogs/PopupReason.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
import { format } from "path";
import type { substitute } from "esri/intl";
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
@ -27,6 +29,7 @@ const {
dialogRemove,
date2Thai,
dateToISO,
findOrgName,
} = mixin;
const myForm = ref<QForm | null>(null);
@ -56,15 +59,15 @@ const visibleColumns = ref<string[]>([
"order",
"name",
"organizationOrganization",
"positionEmployeePosition",
"positionEmployeeLevel",
"positionEmployeeGroup",
"organizationAgency",
"organizationGovernmentAgency",
"position",
"positionType",
// "organizationAgency",
// "organizationGovernmentAgency",
"positionNumber",
"govGroup",
"govOffice",
"bureau",
"organization",
// "bureau",
]);
/** Hook */
@ -100,28 +103,26 @@ const fecthlistprofile = async (id: string) => {
profileId: e.profileId,
order: e.order,
name: e.fullName,
organizationOrganization: e.organizationOrganization,
positionEmployeePosition:
res.data.result.type == "OFFICER"
? e.positionType
: e.positionEmployeePosition,
positionEmployeeLevel:
res.data.result.type == "OFFICER"
? e.positionExecutive != null
? e.positionExecutive
: "-"
: e.positionEmployeeLevel,
positionNumber:
res.data.result.type == "OFFICER" ? e.posNo : e.posNoEmployee,
positionEmployeeGroup:
res.data.result.type == "OFFICER"
? e.position
: e.positionEmployeeGroup,
organizationAgency: e.organizationAgency,
organizationGovernmentAgency: e.organizationGovernmentAgency,
bureau: e.oc,
organization: e.root,
position: e.position,
positionNumber: e.posNo,
positionType: e.positionType,
positionLevel: e.positionLevel,
// organizationAgency: e.organizationAgency,
// organizationGovernmentAgency: e.organizationGovernmentAgency,
// bureau: e.oc,
reason: e.reason,
remove: e.remove,
root: e.root,
rootId: e.rootId,
child1: e.child1,
child1Id: e.child1Id,
child2: e.child2,
child2Id: e.child2Id,
child3: e.child3,
child3Id: e.child3Id,
child4: e.child4,
child4Id: e.child4Id,
}));
if (statusReport.value == false) {
fecthCheck(retireld.value);
@ -152,48 +153,22 @@ const fecthlistprofile = async (id: string) => {
style: "font-size: 14px",
},
{
name: "organizationOrganization",
name: "position",
align: "left",
label: "สังกัด",
title: "สังกัด",
field: "organizationOrganization",
label: "ตำแหน่ง",
title: "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ในสายงาน" : "",
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionEmployeeGroup",
name: "positionType",
align: "left",
label:
employeeType.value == "OFFICER"
? "ตำแหน่ง (ในสายงาน/ระดับ)"
: "กลุ่มงาน",
title: employeeType.value == "OFFICER" ? "ตำแหน่ง" : "กลุ่มงาน",
subtitle: employeeType.value == "OFFICER" ? "ในสายงาน/ระดับ" : "",
field: "positionEmployeeGroup",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionEmployeePosition",
align: "left",
label:
employeeType.value == "OFFICER" ? "ตำแหน่ง (ประเภท)" : "ตำแหน่ง",
title: employeeType.value == "OFFICER" ? "ตำแหน่ง" : "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ประเภท" : "",
field: "positionEmployeePosition",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionEmployeeLevel",
align: "left",
label:
employeeType.value == "OFFICER"
? "ตำแหน่ง (ทางการบริหาร)"
: "ระดับชั้น",
title: employeeType.value == "OFFICER" ? "ตำแหน่ง" : "ระดับชั้น",
subtitle: employeeType.value == "OFFICER" ? "ทางการบริหาร" : "",
field: "positionEmployeeLevel",
label: "ตำแหน่ง",
title: "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ประเภท" : "กลุ่มงาน",
field: "positionType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -208,34 +183,37 @@ const fecthlistprofile = async (id: string) => {
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
// {
// name: "organizationAgency",
// align: "left",
// label: " (//)",
// title: "",
// subtitle: "//",
// field: "organizationAgency",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
// {
// name: "organizationGovernmentAgency",
// align: "left",
// label: " (//)",
// title: "",
// subtitle: "//",
// field: "organizationGovernmentAgency",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
{
name: "organizationAgency",
name: "organization",
align: "left",
label: "ส่วนราชการ (ระดับฝ่าย/กลุ่มงาน/ส่วน)",
title: "ส่วนราชการ",
subtitle: "ระดับฝ่าย/กลุ่มงาน/ส่วน",
field: "organizationAgency",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "organizationGovernmentAgency",
align: "left",
label: "ส่วนราชการ (ระดับสถาบัน/สำนักงาน/กอง)",
title: "ส่วนราชการ",
subtitle: "ระดับสถาบัน/สำนักงาน/กอง",
field: "organizationGovernmentAgency",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "bureau",
align: "left",
label: "หน่วยงาน",
title: "หน่วยงาน",
field: "bureau",
label: "สังกัด",
title: "สังกัด",
field: "organization",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val: any, row: any) {
return findOrgName(row);
},
},
];
@ -653,34 +631,39 @@ function updatemodalPersonal(modal: boolean) {
>
<q-td key="order" :props="props">{{ props.row.order }} </q-td>
<q-td key="name" :props="props">{{ props.row.name }}</q-td>
<q-td
<!-- <q-td
class="table_ellipsis"
key="organizationOrganization"
:props="props"
>{{ props.row.organizationOrganization }}</q-td
>
<q-td key="positionEmployeeGroup" :props="props">{{
props.row.positionEmployeeGroup
}}</q-td>
<q-td key="positionEmployeePosition" :props="props">{{
props.row.positionEmployeePosition
}}</q-td>
<q-td key="positionEmployeeLevel" :props="props">{{
props.row.positionEmployeeLevel
> -->
<q-td key="position" :props="props">{{
props.row.position
}}</q-td>
<q-td key="positionType" :props="props"
>{{ props.row.positionType ? props.row.positionType : "-" }}
{{
props.row.positionLevel
? " (" + props.row.positionLevel + ")"
: ""
}}
</q-td>
<q-td key="positionNumber" :props="props">{{
props.row.positionNumber
}}</q-td>
<q-td key="organizationAgency" :props="props">{{
<!-- <q-td key="organizationAgency" :props="props">{{
props.row.organizationAgency
}}</q-td>
<q-td key="organizationGovernmentAgency" :props="props">{{
props.row.organizationGovernmentAgency
}}</q-td> -->
<q-td class="table_ellipsis" key="organization" :props="props">{{
props.row.organization
}}</q-td>
<q-td class="table_ellipsis" key="bureau" :props="props">{{
<!-- <q-td class="table_ellipsis" key="bureau" :props="props">{{
props.row.bureau
}}</q-td>
}}</q-td> -->
<q-td auto-width></q-td>
<q-td
auto-width
@ -881,6 +864,7 @@ function updatemodalPersonal(modal: boolean) {
:modal="modalPersonal"
:id="personId"
@update:modal="updatemodalPersonal"
v-model:is-employee="employeeType"
/>
</template>

View file

@ -40,28 +40,36 @@ const columns2 = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionTypeOld",
name: "location",
align: "left",
label: "ตำแหน่งในสายงาน",
label: "สถานที่ยื่นขอลาออกจากราชการ",
sortable: true,
field: "positionTypeOld",
field: "location",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionLevelOld",
name: "positionLevel",
align: "left",
label: "ระดับ",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionLevelOld",
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format(val, row) {
let name = "";
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
},
{
name: "positionNumberOld",
@ -77,7 +85,7 @@ const columns2 = ref<QTableProps["columns"]>([
{
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
@ -113,9 +121,10 @@ const columns2 = ref<QTableProps["columns"]>([
/** คอลัมน์ที่แสดง */
const visibleColumns2 = ref<string[]>([
"no",
"prefix",
"fullname",
"positionTypeOld",
"positionLevelOld",
"location",
"positionLevel",
"positionNumberOld",
"organizationPositionOld",
"datetext",
@ -268,35 +277,22 @@ watchEffect(() => {
v-model="props.selected"
/>
</q-td>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="prefix" :props="props">
{{ props.row.prefix }}
</q-td>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
<q-td key="positionTypeOld" :props="props">
{{ props.row.positionTypeOld }}
</q-td>
<q-td key="positionLevelOld" :props="props">
{{ props.row.positionLevelOld }}
</q-td>
<q-td key="positionNumberOld" :props="props">
{{ props.row.positionNumberOld }}
</q-td>
<q-td key="organizationPositionOld" :props="props">
<div class="table_ellipsis">
{{ props.row.organizationPositionOld }}
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>
<div
v-else
:class="
col.name === 'organizationPositionOld' ||
col.name === 'organization'
? 'table_ellipsis'
: ''
"
>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td key="datetext" :props="props">
{{ props.row.datetext }}
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>
</q-tr>
</template>

View file

@ -55,26 +55,24 @@ const columns = ref<QTableProps["columns"]>([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionTypeOld",
name: "positionLevel",
align: "left",
label: "ตำแหน่งในสายงาน",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionTypeOld",
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionLevelOld",
align: "left",
label: "ระดับ",
sortable: true,
field: "positionLevelOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
format(val, row) {
let name = "";
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
},
{
name: "positionNumberOld",
@ -90,7 +88,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
@ -129,8 +127,7 @@ const visibleColumns = ref<string[]>([
"prefix",
"fullname",
"location",
"positionTypeOld",
"positionLevelOld",
"positionLevel",
"positionNumberOld",
"organizationPositionOld",
"datetext",
@ -310,40 +307,27 @@ const pagination = ref({
</q-tr>
</template>
<template v-slot:body="props">
<q-tr
:props="props"
class="cursor-pointer"
@click="router.push(`/retirement/resign/${props.row.id}`)"
>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
<q-td key="location" :props="props">
{{ props.row.location }}
</q-td>
<q-td key="positionTypeOld" :props="props">
{{ props.row.positionTypeOld }}
</q-td>
<q-td key="positionLevelOld" :props="props">
{{ props.row.positionLevelOld }}
</q-td>
<q-td key="positionNumberOld" :props="props">
{{ props.row.positionNumberOld }}
</q-td>
<q-td key="organizationPositionOld" :props="props">
<div class="table_ellipsis">
{{ props.row.organizationPositionOld }}
<q-tr :props="props" class="cursor-pointer">
<q-td
v-for="col in props.cols"
:key="col.id"
@click="router.push(`/retirement/resign/${props.row.id}`)"
>
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>
<div
v-else
:class="
col.name === 'organizationPositionOld' ||
col.name === 'organization'
? 'table_ellipsis'
: ''
"
>
{{ col.value == null ? "" : col.value }}
</div>
</q-td>
<q-td key="datetext" :props="props">
{{ props.row.datetext }}
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>
</q-tr>
</template>

File diff suppressed because it is too large Load diff

View file

@ -36,21 +36,26 @@ interface TypeFile {
}
interface rowFile {
fileName: string
pathName: string
fileName: string;
pathName: string;
}
interface FileList {
id: string
fileName: string
pathName: string
id: string;
fileName: string;
pathName: string;
title: string;
}
interface CheckBoxType {
label: string
value: string
label: string;
value: string;
}
export type { resMain, ResponseItems, TypeFile, rowFile,FileList,CheckBoxType };
export type {
resMain,
ResponseItems,
TypeFile,
rowFile,
FileList,
CheckBoxType,
};

View file

@ -89,7 +89,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",

View file

@ -92,7 +92,7 @@ const refOptions = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "21",
@ -228,7 +228,7 @@ const refOptionsFilter = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "0",
@ -489,7 +489,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -667,7 +667,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -1180,7 +1180,7 @@ const templateDetail = async () => {
);
if (positionTypeF.length > 0) {
salaryClass.value =
salaryClass.value + `ตำแหน่งประเภท${positionTypeF[0].name} `;
salaryClass.value + `ประเภทตำแหน่ง${positionTypeF[0].name} `;
}
const positionLevelF = positionLevelOptions.value.filter(
@ -1792,9 +1792,9 @@ const resetFilter = () => {};
:borderless="!edit"
v-model="positionTypeId"
:rules="[
(val:string) => !!val || `${'กรุณาเลือกตำแหน่งประเภท'}`,
(val:string) => !!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`,
]"
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
@update:modelValue="clickEditRow"
emit-value
map-options

View file

@ -100,7 +100,7 @@ const refOptions = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "21",
@ -236,7 +236,7 @@ const refOptionsFilter = ref<DataOption[]>([
},
{
id: "20",
name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}",
},
{
id: "0",
@ -1111,7 +1111,7 @@ const templateDetail = async () => {
// );
// if (positionTypeF.length > 0) {
// salaryClass.value =
// salaryClass.value + `${positionTypeF[0].name} `;
// salaryClass.value + `${positionTypeF[0].name} `;
// }
// const positionLevelF = positionLevelOptions.value.filter(
// (r: DataOption) => r.id == positionLevelId.value

View file

@ -1071,9 +1071,9 @@ const getClass = (val: boolean) => {
:rules="[
(val) =>
!!val ||
`${'กรุณากรอกมติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)'}`,
`${'กรุณากรอกมติ กก. ครั้งที่ (เรื่อง รับสมัครสอบ ฯ)'}`,
]"
:label="`${'มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)'}`"
:label="`${'มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบ ฯ)'}`"
hide-bottom-space
/>
</div>
@ -1104,10 +1104,10 @@ const getClass = (val: boolean) => {
? date2Thai(conclusionRegisterDate)
: null
"
:label="`${'ลงวันที่ (เรื่อง รับสมัครสอบฯ)'}`"
:label="`${'ลงวันที่ (เรื่อง รับสมัครสอบ ฯ)'}`"
:rules="[
(val) =>
!!val || `${'กรุณาเลือกลงวันที่ (เรื่อง รับสมัครสอบฯ)'}`,
!!val || `${'กรุณาเลือกลงวันที่ (เรื่อง รับสมัครสอบ ฯ)'}`,
]"
>
<template v-slot:prepend>
@ -1132,7 +1132,7 @@ const getClass = (val: boolean) => {
(val) =>
!!val || `${'กรุณากรอกมติ กก. ครั้งที่ (เรื่อง ผลการสอบฯ)'}`,
]"
:label="`${'มติ กก. ครั้งที่ (เรื่อง ผลการสอบฯ)'}`"
:label="`${'มติ กก. ครั้งที่ (เรื่อง ผลการสอบ ฯ)'}`"
hide-bottom-space
/>
</div>
@ -1163,7 +1163,7 @@ const getClass = (val: boolean) => {
? date2Thai(conclusionResultDate)
: null
"
:label="`${'ลงวันที่ (เรื่อง ผลการสอบฯ)'}`"
:label="`${'ลงวันที่ (เรื่อง ผลการสอบ ฯ)'}`"
:rules="[
(val) =>
!!val || `${'กรุณาเลือกลงวันที่ (เรื่อง ผลการสอบฯ)'}`,

View file

@ -18,46 +18,7 @@ async function onSubmit(data: any) {
/** post */
showLoader();
http
.post(config.API.complaintAdd(), {
id: data.id,
respondentType: data.respondentType,
organizationId: data.organizationId,
consideredAgency: data.consideredAgency,
title: data.title,
description: data.description,
dateReceived: data.dateReceived,
dateConsideration: data.dateConsideration,
offenseDetails: data.offenseDetails,
levelConsideration: data.levelConsideration,
dateNotification: data.dateNotification,
complaintFrom: data.complaintFrom,
appellant: data.appellant,
documentFile: data.documentFile,
status: data.status,
result: data.result,
persons: data.persons.map((item: any) => ({
personId: item.personId,
idcard: item.idcard,
prefix: item.prefix,
firstName: item.firstName,
lastName: item.lastName,
name: item.name,
posNo: item.posNo === "-" ? null : item.posNo,
position: item.position,
positionLevel: item.positionLevel,
salary: item.salary === "-" ? null : item.salary,
organization: item.organization,
phone: item.phone === "-" ? null : item.phone,
email: item.email,
})),
disciplineComplaintDocs: data.disciplineComplaintDocs.map(
(file: any) => ({
id: file.id,
fileName: file.fileName,
pathName: file.pathName,
})
),
})
.post(config.API.complaintAdd(), data)
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
router.push(`/discipline/complaints/${res.data.result}`);
@ -70,6 +31,7 @@ async function onSubmit(data: any) {
});
}
</script>
<template>
<div class="col-xs-12 col-sm-12 col-md-11">
<div class="toptitle text-dark col-12 row items-center">

View file

@ -168,7 +168,9 @@ async function getData() {
data.id = dataList.id;
data.respondentType = dataList.respondentType;
data.organizationId = dataList.organizationId;
data.organization = dataList.organization;
data.consideredAgency = dataList.consideredAgency;
data.consideredAgencyId = dataList.consideredAgencyId;
data.title = dataList.title;
data.description = dataList.description;
data.dateReceived = dataList.dateReceived;
@ -182,6 +184,7 @@ async function getData() {
data.persons = dataList.persons;
data.result = dataList.result;
data.disciplineComplaintDocs = dataList.disciplineComplaintDocs;
data.activeId = dataList.activeId;
})
.catch((e) => {
messageError($q, e);
@ -197,47 +200,9 @@ async function getData() {
*/
async function onSubmit(data: any) {
showLoader();
http
.put(config.API.complaintbyId(id.value), {
id: data.id,
respondentType: data.respondentType,
organizationId: data.organizationId,
consideredAgency: data.consideredAgency,
title: data.title,
description: data.description,
dateReceived: data.dateReceived,
dateConsideration: data.dateConsideration,
offenseDetails: data.offenseDetails,
levelConsideration: data.levelConsideration,
dateNotification: data.dateNotification,
complaintFrom: data.complaintFrom,
appellant: data.appellant,
documentFile: data.documentFile,
status: data.status,
result: data.result,
persons: data.persons.map((item: any) => ({
personId: item.personId,
idcard: item.idcard,
prefix: item.prefix,
firstName: item.firstName,
lastName: item.lastName,
name: item.name,
posNo: item.posNo === "-" ? null : item.posNo,
position: item.position,
positionLevel: item.positionLevel,
salary: item.salary === "-" ? null : item.salary,
organization: item.organization,
phone: item.phone === "-" ? null : item.phone,
email: item.email,
})),
disciplineComplaintDocs: data.disciplineComplaintDocs.map(
(file: any) => ({
id: file.id,
fileName: file.fileName,
pathName: file.pathName,
})
),
})
.put(config.API.complaintbyId(id.value), data)
.then((res) => {
getData();
success($q, "บันทึกข้อมูลสำเร็จ");
@ -406,7 +371,9 @@ onMounted(() => {
</div>
</div>
<q-card bordered><Form :on-submit="onSubmit" :data="data" :get-data="getData" /></q-card>
<q-card bordered
><Form :on-submit="onSubmit" :data="data" :get-data="getData"
/></q-card>
<PopupSendToNext
:modal="modalPopup"
:close="closePopup"

View file

@ -4,7 +4,6 @@ import { useQuasar } from "quasar";
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
import type {
FormData,
MyObjectComplaintsRef,
ArrayFileList,
} from "@/modules/11_discipline/interface/request/complaint";
@ -15,8 +14,9 @@ import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
import config from "@/app.config";
import http from "@/plugins/http";
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
const $q = useQuasar();
const fileDocDataUpload = ref<File[]>([]);
@ -28,6 +28,8 @@ const mainStore = useDisciplineMainStore();
const complainstStore = useComplainstDataStore();
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
const organization = ref<OptionData>();
const consideredAgency = ref<OptionData>();
/**ชั่งฟังเพิ่มข้อมูล ลง ตาราง */
const modal = ref<boolean>(false);
@ -43,21 +45,6 @@ const {
} = mixin;
const { filterSelector } = complainstStore; // function store complainstStore
/** validateForm */
const respondentTypeRef = ref<Object | null>(null);
const organizationIdRef = ref<Object | null>(null);
const consideredAgencyRef = ref<Object | null>(null);
const titleRef = ref<Object | null>(null);
const descriptionRef = ref<Object | null>(null);
const dateReceivedRef = ref<Object | null>();
const dateConsiderationRef = ref<Object | null>(null);
const offenseDetailsRef = ref<Object | null>(null);
const levelConsiderationRef = ref<Object | null>(null);
const dateNotificationRef = ref<Object | null>(null);
const complaintFromRef = ref<Object | null>(null);
const appellantRef = ref<Object | null>(null);
const resultRef = ref<Object | null>(null);
const isSave = ref<boolean>(false); //
const isReadonly = ref<boolean>(false); //
const fileList = ref<ArrayFileList[]>([]);
@ -98,18 +85,11 @@ const formData = reactive<FormData>({
result: "",
persons: [],
disciplineComplaintDocs: fileList.value ?? null,
activeId: null,
organization: "",
consideredAgencyId: null,
});
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
const objectComplaintsRef: MyObjectComplaintsRef = {
respondentType: respondentTypeRef,
organizationId: organizationIdRef,
consideredAgency: consideredAgencyRef,
title: titleRef,
dateReceived: dateReceivedRef,
offenseDetails: offenseDetailsRef,
};
/**
* งชนอปโหลดไฟล
* @param documentFile ไฟลบมา
@ -143,38 +123,17 @@ function selectLevel(val: string) {
}
}
/** ฟังก์ชั่นตรวจสอบความถูกต้องของข้อมูลในฟอร์ม */
function validateForm() {
const hasError = [];
for (const key in objectComplaintsRef) {
if (Object.prototype.hasOwnProperty.call(objectComplaintsRef, key)) {
const property = objectComplaintsRef[key];
if (property.value && typeof property.value.validate === "function") {
const isValid = property.value.validate();
hasError.push(isValid);
}
}
}
if (hasError.every((result) => result === true)) {
countNum.value = 1;
onSubmit();
} else {
}
}
/** ฟังชั่น บันทึก */
function onSubmit() {
dialogConfirm(
$q,
async () => {
if (mainStore.rowsAdd) {
formData.persons = await mainStore.rowsAdd;
}
await props.onSubmit(formData);
isSave.value = false;
dialogConfirm($q, async () => {
if (mainStore.rowsAdd) {
formData.persons = await mainStore.rowsAdd;
}
);
console.log("formData===>", formData);
await props.onSubmit(formData);
isSave.value = false;
});
}
/**
@ -228,7 +187,17 @@ watch(props.data, async () => {
formData.id = props.data.id;
formData.respondentType = props.data.respondentType;
formData.organizationId = props.data.organizationId;
formData.organization = props.data.organization;
organization.value = {
id: props.data.organizationId,
name: props.data.organization,
};
formData.consideredAgency = props.data.consideredAgency;
formData.consideredAgencyId = props.data.consideredAgencyId;
consideredAgency.value = {
id: props.data.consideredAgencyId,
name: props.data.consideredAgency,
};
formData.title = props.data.title;
formData.description = props.data.description;
formData.dateReceived = props.data.dateReceived;
@ -241,6 +210,7 @@ watch(props.data, async () => {
formData.status = props.data.status;
formData.result = props.data.result;
formData.persons = mainStore.rowsAdd;
formData.activeId = props.data.activeId ? props.data.activeId : null;
} else if (countNum.value === 2) {
fileList.value = props.data.disciplineComplaintDocs;
}
@ -289,12 +259,52 @@ async function addPerson(data: any) {
await mainStore.fetchData(data);
}
/** ดึงข้อมูล active */
async function getActive() {
if (!formData.activeId) {
showLoader();
await http
.get(config.API.activeOrganization)
.then(async (res) => {
const data = await res.data.result;
formData.activeId = data.activeId;
getOc(data.activeId);
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
} else {
getOc(formData.activeId);
}
}
/** ดึงข้อมูลหน่วยงานจาก api */
function getOc() {
http.get(config.API.typeOc()).then((res) => {
const data = res.data.result;
complainstStore.ocListFn(data);
});
async function getOc(activeId: string) {
showLoader();
await http
.get(config.API.orgByid(activeId))
.then(async (res) => {
const data = await res.data.result.map((item: any) => ({
organizationId: item.orgTreeId,
organizationName: item.orgName,
}));
complainstStore.ocListFn(data);
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
// http.get(config.API.typeOc()).then((res) => {
// const data = res.data.result;
// complainstStore.ocListFn(data);
// });
}
/**
@ -321,6 +331,14 @@ function getListChannel() {
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
function changeFormData() {
isSave.value = props.data != null ?? true;
if (organization.value) {
formData.organizationId = organization.value.id;
formData.organization = organization.value.name;
}
if (consideredAgency.value) {
formData.consideredAgencyId = consideredAgency.value.id;
formData.consideredAgency = consideredAgency.value.name;
}
}
/** readonly
@ -354,13 +372,14 @@ function updatemodalPersonal(modal: boolean) {
onMounted(() => {
mainStore.rowsAdd = [];
getListChannel();
getOc();
getActive();
});
</script>
<template>
<div class="row col-12 bg-white">
<div v-if="isSave" class=" col-12">
<div class="row col-12 bg-white">
<div v-if="isSave" class="col-12">
<q-banner
inline-actions
bordered
@ -373,7 +392,12 @@ onMounted(() => {
<q-separator />
</div>
<form @submit.prevent="validateForm" class="col-12 row">
<q-form
greedy
@submit.prevent
@validation-success="onSubmit"
class="col-12 row"
>
<div class="col-12 row">
<div class="col-sm-12 col-md-9 row no-wrap">
<div class="col-12 row q-pl-md q-py-md">
@ -427,12 +451,13 @@ onMounted(() => {
outlined
option-label="name"
option-value="id"
emit-value
map-options
v-model="formData.organizationId"
v-model="organization"
:options="complainstStore.organizationIdOp"
label="เลือกสำนักงาน"
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
label="หน่วยงานที่ถูกร้องเรียน"
:rules="[
(val) => !!val || `${'กรุณาเลือกหน่วยงานที่ถูกร้องเรียน'}`,
]"
@update:model-value="changeFormData()"
/>
</div>
@ -444,14 +469,13 @@ onMounted(() => {
for="selectAgency"
dense
outlined
v-model="formData.consideredAgency"
v-model="consideredAgency"
:options="complainstStore.consideredAgencytoptions"
label="หน่วยงานที่พิจารณา"
option-value="id"
option-label="name"
:readonly="isReadonly"
hide-bottom-space
emit-value
map-options
:rules="[(val) => !!val || `${'กรุณาเลือกหน่วยงาน'}`]"
use-input
@ -460,13 +484,6 @@ onMounted(() => {
)"
@update:model-value="changeFormData()"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template>
</q-select>
</div>
@ -500,86 +517,86 @@ onMounted(() => {
<div class="col-12"><q-separator /></div>
<div class="col-12 row q-pa-sm">
<d-table
ref="table"
:columns="mainStore.columnsRespondent"
:rows="mainStore.rowsAdd"
row-key="idcard"
flat
bordered
:paging="true"
dense
class="col-12"
:visible-columns="mainStore.visibleColumnsRespondent"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th
v-for="col in props.cols"
:key="col.name"
:props="props"
style="color: #000000; font-weight: 500"
<d-table
ref="table"
:columns="mainStore.columnsRespondent"
:rows="mainStore.rowsAdd"
row-key="idcard"
flat
bordered
:paging="true"
dense
class="col-12"
:visible-columns="mainStore.visibleColumnsRespondent"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th
v-for="col in props.cols"
:key="col.name"
:props="props"
style="color: #000000; font-weight: 500"
>
<span class="text-weight-medium">{{
col.label
}}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<td>
<q-btn
dense
flat
round
color="info"
icon="info"
@click="onclickViewinfo(props.row.personId)"
>
<span class="text-weight-medium">{{
col.label
}}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<td>
<q-btn
dense
flat
round
color="info"
icon="info"
@click="onclickViewinfo(props.row.personId)"
>
<q-tooltip>อมลในทะเบยนประว</q-tooltip>
</q-btn>
</td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
<q-tooltip>อมลในทะเบยนประว</q-tooltip>
</q-btn>
</td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div
v-else-if="col.name === 'organization'"
class="table_ellipsis"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div
v-else-if="col.name === 'organization'"
class="table_ellipsis"
>
{{ props.row.organization }}
</div>
<div v-else-if="col.name === 'salary'">
{{ props.row.salary.toLocaleString() }}
</div>
<div v-else>
{{ col.value }}
</div>
</q-td>
<q-td auto-width>
<q-btn
v-if="!isReadonly"
size="12px"
flat
round
dense
color="red"
class="q-ml-sm"
icon="mdi-delete-outline"
@click="deletePerson(props.row.personId)"
><q-tooltip>ลบผกรองเรยน</q-tooltip></q-btn
>
</q-td>
</q-tr>
</template>
</d-table>
{{ props.row.organization }}
</div>
<div v-else-if="col.name === 'salary'">
{{ props.row.salary.toLocaleString() }}
</div>
<div v-else>
{{ col.value }}
</div>
</q-td>
<q-td auto-width>
<q-btn
v-if="!isReadonly"
size="12px"
flat
round
dense
color="red"
class="q-ml-sm"
icon="mdi-delete-outline"
@click="deletePerson(props.row.personId)"
><q-tooltip>ลบผกรองเรยน</q-tooltip></q-btn
>
</q-td>
</q-tr>
</template>
</d-table>
</div>
</q-card>
</div>
@ -655,7 +672,6 @@ onMounted(() => {
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่รับเรื่อง'}`,
]"
>
<template v-slot:prepend>
<q-icon
@ -736,10 +752,15 @@ onMounted(() => {
>
</q-icon>
</template>
<template v-if="formData.dateConsideration && !isReadonly" v-slot:append>
<template
v-if="formData.dateConsideration && !isReadonly"
v-slot:append
>
<q-icon
name="cancel"
@click.stop.prevent="formData.dateConsideration = null"
@click.stop.prevent="
formData.dateConsideration = null
"
class="cursor-pointer"
/>
</template>
@ -811,14 +832,16 @@ onMounted(() => {
>
</q-icon>
</template>
<template v-if="formData.dateNotification && !isReadonly" v-slot:append>
<template
v-if="formData.dateNotification && !isReadonly"
v-slot:append
>
<q-icon
name="cancel"
@click.stop.prevent="formData.dateNotification = null"
class="cursor-pointer"
/>
</template>
</q-input>
</template>
</datepicker>
@ -880,11 +903,11 @@ onMounted(() => {
</div>
</div>
<div class="row"><q-separator vertical /></div>
</div>
</div>
<!-- พโหลดไฟล -->
<div class="col-sm-12 col-md-3">
<div flat class="q-pa-md" >
<div flat class="q-pa-md">
<div class="col-12 row q-col-gutter-md">
<div class="row col-12">
<q-card
@ -892,9 +915,13 @@ onMounted(() => {
class="row col-12"
style="border: 1px solid #d6dee1"
>
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
<div
class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
>
{{
!isReadonly ? "อัปโหลดไฟล์เอกสารหลักฐาน" : "ไฟล์เอกสารหลักฐาน"
!isReadonly
? "อัปโหลดไฟล์เอกสารหลักฐาน"
: "ไฟล์เอกสารหลักฐาน"
}}
</div>
<div class="col-12"><q-separator /></div>
@ -920,15 +947,16 @@ onMounted(() => {
</template>
<template v-slot:after>
<q-btn
size="14px"
v-if="formData.documentFile"
flat
round
dense
color="add"
icon="mdi-upload"
@click="upLoadFileDoc()"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn>
size="14px"
v-if="formData.documentFile"
flat
round
dense
color="add"
icon="mdi-upload"
@click="upLoadFileDoc()"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn
>
</template>
</q-file>
@ -941,13 +969,13 @@ onMounted(() => {
bordered
separator
>
<q-item
clickable
v-ripple
<q-item
clickable
v-ripple
v-for="data in fileList"
:key="data.id"
class="items-center"
>
>
<q-item-section>{{ data.fileName }}</q-item-section>
<q-space />
<div>
@ -979,7 +1007,9 @@ onMounted(() => {
</div>
<div class="col-12" v-else>
<q-card class="q-pa-md" bordered> ไมรายการเอกสาร </q-card>
<q-card class="q-pa-md" bordered>
ไมรายการเอกสาร
</q-card>
</div>
</div>
</q-card>
@ -988,7 +1018,7 @@ onMounted(() => {
</div>
</div>
<div class="col-12 "><q-separator /></div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-sm" v-if="!isReadonly">
<q-space />
<q-btn
@ -1001,9 +1031,7 @@ onMounted(() => {
>
</div>
</div>
</form>
</q-form>
</div>
<!-- Popup กรองเรยน -->

View file

@ -115,7 +115,9 @@ async function getDataComplaint() {
dataComplaints.id = dataList.id;
dataComplaints.respondentType = dataList.respondentType;
dataComplaints.organizationId = dataList.organizationId;
dataComplaints.organization = dataList.organization;
dataComplaints.consideredAgency = dataList.consideredAgency;
dataComplaints.consideredAgencyId = dataList.consideredAgencyId;
dataComplaints.title = dataList.title;
dataComplaints.description = dataList.description;
dataComplaints.dateReceived = dataList.dateReceived;
@ -148,6 +150,7 @@ function getData() {
data.idComplaint = dataList.idComplaint;
data.respondentType = dataList.respondentType;
data.organizationId = dataList.organizationId;
data.organization = dataList.organization;
data.persons = dataList.persons;
data.investigationDetail = dataList.investigationDetail;
data.investigationDetailOther = dataList.investigationDetailOther;
@ -185,50 +188,7 @@ async function onSubmit(data: any) {
// put
showLoader();
http
.put(config.API.investigateById(id.value), {
id: data.id,
idComplaint: data.idComplaint,
complaint: data.complaint,
complaintdetail: data.complaintdetail,
investigationDescription: data.investigationDescription,
fault: data.fault,
investigationDetailOther: data.investigationDetailOther,
evidenceFiles: data.evidenceFiles,
fileComplaint: data.fileComplaint,
investigationExtendStatus: data.investigationExtendStatus,
investigationDateStart: data.investigationDateStart,
investigationDateEnd: data.investigationDateEnd,
investigationDetail: data.investigationDetail,
investigationDaysExtend: data.investigationDaysExtend,
investigationStatusResult: data.investigationStatusResult,
investigationCauseText: data.investigationCauseText,
complaintStatus: data.complaintStatus,
result: data.result,
directors: data.directors,
disciplineInvestigateDocs: data.disciplineInvestigateDocs,
disciplineInvestigateRelevantDocs: data.disciplineInvestigateRelevantDocs,
status: data.status,
documentFile: data.documentFile,
respondentType: data.respondentType,
organizationId: data.organizationId,
persons: data.persons.map((item: any) => ({
personId: item.personId,
idcard: item.idcard,
prefix: item.prefix,
firstName: item.firstName,
lastName: item.lastName,
name: item.name,
posNo: item.posNo === "-" ? null : item.posNo,
position: item.position,
positionLevel: item.positionLevel,
salary: item.salary === "-" ? null : item.salary,
organization: item.organization,
phone: item.phone === "-" ? null : item.phone,
email: item.email,
})),
investigationExtendHistory: data.investigationExtendHistory,
isDisciplinary: data.isDisciplinary,
})
.put(config.API.investigateById(id.value), data)
.then((res) => {
getData();
success($q, "บันทึกข้อมูลสำเร็จ");

View file

@ -14,15 +14,13 @@ import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
import DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
import type {
FormData,
MyObjectInvestigateRef,
} from "@/modules/11_discipline/interface/request/investigateFact";
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
import config from "@/app.config";
import http from "@/plugins/http";
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
@ -68,21 +66,6 @@ const maxPage = ref<number>(1);
const page = ref<number>(1);
const rowsPerPage = ref<number>(10);
/** ตัวแปร ref สำหรับแสดง validate */
const complaintRef = ref<Object | null>(null);
const complaintdetailRef = ref<Object | null>(null);
const investigationDescriptionRef = ref<Object | null>(null);
const faultRef = ref<Object | null>(null);
const investigationDetailOtherRef = ref<Object | null>(null);
const fileComplaintRef = ref<Object | null>(null);
const extendStatusRef = ref<Object | null>(null);
const dateRef = ref<Object | null>(null);
const dateEndRef = ref<Object | null>(null);
const investigationDetailRef = ref<Object | null>(null);
const daysExtendRef = ref<Object | null>(null);
const investigationStatusResultRef = ref<Object | null>(null);
const investigationCauseTextRef = ref<Object | null>(null);
const resultRef = ref<Object | null>(null);
const investigationExtendStatus = ref<boolean>(false);
const isSave = ref<boolean>(false); //
@ -131,6 +114,7 @@ const formData = reactive<FormData>({
documentFile: null,
respondentType: "",
organizationId: "",
organization: "",
persons: [],
investigationExtendHistory: [],
isDisciplinary: false,
@ -139,17 +123,19 @@ const formData = reactive<FormData>({
const rows = ref([]);
const dateEndInputStyle = computed(() => {
if(formData.investigationDateStart){
const currentDate = new Date();
const investigationDateEnd = new Date(formData.investigationDateEnd as Date);
if (formData.investigationDateStart) {
const currentDate = new Date();
const investigationDateEnd = new Date(
formData.investigationDateEnd as Date
);
const isInNext7Days =
investigationDateEnd >= currentDate &&
investigationDateEnd <=
new Date(currentDate.getTime() + 7 * 24 * 60 * 60 * 1000);
const isInNext7Days =
investigationDateEnd >= currentDate &&
investigationDateEnd <=
new Date(currentDate.getTime() + 7 * 24 * 60 * 60 * 1000);
return isInNext7Days ? "input-alert" : "";
}
return isInNext7Days ? "input-alert" : "";
}
});
const initialPagination = ref<any>({
@ -159,18 +145,13 @@ const initialPagination = ref<any>({
const calendarModal = ref<boolean>(false);
const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
function validateForm() {
countNum.value = 1;
onSubmit();
}
/**
* งกนสำหรบบนทกขอม ระบบจะแสดง dialog ใหนยนการบนท
* หากยนยนจะสงขอมลไปบนทกท api
* หากยกเลกจะกลบไปหนาฟอร
*/
function onSubmit() {
countNum.value = 1;
dialogConfirm($q, async () => {
if (
formData.investigationDateStart !== null &&
@ -189,12 +170,14 @@ function onSubmit() {
if (mainStore.rowsAdd) {
formData.persons = mainStore.rowsAdd;
}
props.onSubmit(formData);
isSave.value = false;
investigationExtendStatus.value = false;
});
}
const organization = ref<OptionData>();
/**
* งชนคำนวณเวลาวนทนสดจาก นทนสดการสบสวน
* @param val จำนวนวนทองการขยาย
@ -237,6 +220,11 @@ watch(props.data, async () => {
formData.id = props.data.id;
formData.complaint = props.data.complaint;
formData.organizationId = props.data.organizationId;
formData.organization = props.data.organization;
organization.value = {
id: props.data.organizationId,
name: props.data.organization,
};
formData.respondentType = props.data.respondentType;
formData.complaintdetail = props.data.complaintdetail;
formData.investigationDescription = props.data.investigationDescription;
@ -267,13 +255,33 @@ watch(props.data, async () => {
lastName: person.lastName,
position: person.position,
positionLevel: person.positionLevel,
salary: person.salary === null ? "-" : person.salary,
salary: person.salary === null ? "" : person.salary,
personId: person.personId,
posNo: person.posNo === null ? "-" : person.posNo,
organization: person.organization,
isSend: person.isSend,
isDisciplinary: person.isDisciplinary,
isAncestorDNA: person.isAncestorDNA,
root: person.root,
rootId: person.rootId,
rootShortName: person.rootShortName,
child1: person.child1,
child1Id: person.child1Id,
child1ShortName: person.child1ShortName,
child2: person.child2,
child2Id: person.child2Id,
child2ShortName: person.child2ShortName,
child3: person.child3,
child3Id: person.child3Id,
child3ShortName: person.child3ShortName,
child4: person.child4,
child4Id: person.child4Id,
child4ShortName: person.child4ShortName,
posMasterNo: person.posMasterNo,
posTypeId: person.posTypeId,
posTypeName: person.posTypeName,
posLevelId: person.posLevelId,
posLevelName: person.posLevelName,
}));
mainStore.rowsCheck = mainStore.rowsAdd.filter(
(item: any) => item.isDisciplinary === false && item.isSend === "NEW"
@ -286,11 +294,11 @@ watch(props.data, async () => {
prefix: item.prefix,
firstName: item.firstName,
lastName: item.lastName,
position: item.position == '' ? "-" : item.position,
email: item.email == '' ? '-' : item.email,
phone: item.phone == '' ? '-' : item.phone,
commandNo: item.commandNo == '' ? '-' : item.commandNo,
duty: item.duty == '' ? '-' : item.duty,
position: item.position == "" ? "-" : item.position,
email: item.email == "" ? "-" : item.email,
phone: item.phone == "" ? "-" : item.phone,
commandNo: item.commandNo == "" ? "-" : item.commandNo,
duty: item.duty == "" ? "-" : item.duty,
check: "props",
}));
@ -430,11 +438,45 @@ function handleSave(returnData: any) {
toggleModal();
}
function getOc() {
http.get(config.API.typeOc()).then((res) => {
const data = res.data.result;
investigateFactStore.ocListFn(data);
});
/** ดึงข้อมูล active */
async function getActive() {
showLoader();
await http
.get(config.API.activeOrganization)
.then((res) => {
getOc(res.data.result.activeId);
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
async function getOc(activeId: string) {
showLoader();
await http
.get(config.API.orgByid(activeId))
.then(async (res) => {
const data = await res.data.result.map((item: any) => ({
organizationId: item.orgTreeId,
organizationName: item.orgName,
}));
investigateFactStore.ocListFn(data);
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
// http.get(config.API.typeOc()).then((res) => {
// const data = res.data.result;
// investigateFactStore.ocListFn(data);
// });
}
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
@ -496,6 +538,11 @@ function deleteDirector(id: string) {
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
function changeFormData() {
isSave.value = true;
if (organization.value) {
formData.organizationId = organization.value.id;
formData.organization = organization.value.name;
}
}
/** เช็ควันที่สิ้นสุดต้องมากกว่า หรือเท่ากับวันเริ่ม */
@ -560,7 +607,7 @@ function emitPerson(data: FormData[]) {
Id: dataMapId,
})
.then((res) => {
getOc();
getActive();
})
.catch((e) => {
messageError($q, e);
@ -638,12 +685,13 @@ watch(
onMounted(async () => {
mainStore.rowsAdd = [];
getOc();
getActive();
});
</script>
<template>
<div class="row col-12 bg-white">
<div v-if="isSave" class=" col-12">
<div v-if="isSave" class="col-12">
<q-banner
inline-actions
bordered
@ -655,12 +703,16 @@ onMounted(async () => {
</q-banner>
<q-separator />
</div>
<form @submit.prevent="validateForm" class="col-12 row">
<q-form
greedy
@submit.prevent
@validation-success="onSubmit"
class="col-12 row"
>
<div class="col-12 row">
<div class="col-xs-12 col-sm-12 col-md-9 row no-wrap">
<div class="col-12 row q-pl-md q-py-md">
<div class="row col-12 q-col-gutter-md">
<div class="col-xs-12 col-sm-5" id="respondentType">
<q-select
:class="inputEdit(isReadonly)"
@ -709,11 +761,9 @@ onMounted(async () => {
outlined
option-label="name"
option-value="id"
emit-value
map-options
v-model="formData.organizationId"
v-model="organization"
:options="investigateFactStore.organizationIdOp"
label="เลือกสำนักงาน"
label="หน่วยงานที่ถูกร้องเรียน"
clearable
@update:model-value="changeFormData()"
/>
@ -857,7 +907,9 @@ onMounted(async () => {
</q-td>
<q-td auto-width>
<q-btn
v-if="!isReadonly && props.row.isAncestorDNA === false"
v-if="
!isReadonly && props.row.isAncestorDNA === false
"
size="12px"
flat
round
@ -1365,14 +1417,20 @@ onMounted(async () => {
</div>
</div>
</div>
<div class="row"><q-separator vertical /></div>
<div class="row"><q-separator vertical /></div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3">
<div class="q-col-gutter-md row q-pa-md">
<div class="col-xs-12">
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
<q-card
bordered
class="row col-12"
style="border: 1px solid #d6dee1"
>
<div
class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
>
ปโหลดไฟลเอกสารทเกยวของกบการสบสวน
</div>
<div class="col-12"><q-separator /></div>
@ -1394,22 +1452,25 @@ onMounted(async () => {
<q-icon name="attach_file" color="primary" />
</template>
<template v-slot:after>
<q-btn
v-if="formData.evidenceFiles"
size="14px"
flat
round
dense
color="add"
icon="mdi-upload"
@click="uploadFileRelevant"
><q-tooltip>ปโหลดเอกสาร</q-tooltip></q-btn>
<q-btn
v-if="formData.evidenceFiles"
size="14px"
flat
round
dense
color="add"
icon="mdi-upload"
@click="uploadFileRelevant"
><q-tooltip>ปโหลดเอกสาร</q-tooltip></q-btn
>
</template>
</q-file>
</div>
<div
v-if="props.data.disciplineInvestigateRelevantDocs.length > 0"
v-if="
props.data.disciplineInvestigateRelevantDocs.length > 0
"
class="col-xs-12 row"
>
<q-list
@ -1417,12 +1478,13 @@ onMounted(async () => {
bordered
separator
>
<q-item
v-for="file in props.data.disciplineInvestigateRelevantDocs"
<q-item
v-for="file in props.data
.disciplineInvestigateRelevantDocs"
:key="file.id"
clickable
clickable
v-ripple
>
>
<q-item-section>{{ file.fileName }}</q-item-section>
<q-item-section avatar>
<div class="row">
@ -1459,14 +1521,22 @@ onMounted(async () => {
</div>
<div class="col-12" v-else>
<q-card class="q-pa-md" bordered> ไมรายการเอกสาร </q-card>
<q-card class="q-pa-md" bordered>
ไมรายการเอกสาร
</q-card>
</div>
</div>
</q-card>
</div>
<div class="col-xs-12">
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
<q-card
bordered
class="row col-12"
style="border: 1px solid #d6dee1"
>
<div
class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md"
>
ปโหลดไฟลเอกสารหลกฐาน
</div>
<div class="col-12"><q-separator /></div>
@ -1491,15 +1561,15 @@ onMounted(async () => {
</template>
<template v-slot:after>
<q-btn
v-if="formData.documentFile"
size="14px"
flat
round
dense
color="add"
icon="mdi-upload"
@click="uploadFile"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn
v-if="formData.documentFile"
size="14px"
flat
round
dense
color="add"
icon="mdi-upload"
@click="uploadFile"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn
>
</template>
</q-file>
@ -1514,11 +1584,12 @@ onMounted(async () => {
bordered
separator
>
<q-item
<q-item
v-for="file in props.data.disciplineInvestigateDocs"
:key="file.id"
clickable
v-ripple>
clickable
v-ripple
>
<q-item-section>{{ file.fileName }}</q-item-section>
<q-item-section avatar>
<div class="row">
@ -1555,31 +1626,29 @@ onMounted(async () => {
</div>
<div class="col-12" v-else>
<q-card class="q-pa-md" bordered> ไมรายการเอกสาร </q-card>
<q-card class="q-pa-md" bordered>
ไมรายการเอกสาร
</q-card>
</div>
</div>
</q-card>
</div>
</div>
</div>
<div class="col-12 "><q-separator /></div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-sm" v-if="!isReadonly">
<q-space />
<q-btn
id="onSubmit"
type="submit"
label="บันทึก"
color="secondary"
<q-btn id="onSubmit" type="submit" label="บันทึก" color="secondary"
><q-tooltip>นทกขอม</q-tooltip></q-btn
>
</div>
</div>
</form>
</q-form>
</div>
<!-- พโหลดไฟล -->
<!-- พโหลดไฟล -->
<DialogDuty
:modal="modalEditDirector"
:close-popup="closeEditDirector"

View file

@ -71,7 +71,9 @@ const dataComplaints = reactive<FormDataComplaint>({
id: "",
respondentType: "",
organizationId: "",
organization: "",
consideredAgency: "",
consideredAgencyId: "",
title: "",
description: "",
dateReceived: null,
@ -115,10 +117,11 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
documentFile: null,
respondentType: "",
organizationId: "",
organization: "",
persons: [],
investigationExtendHistory: [],
isDisciplinary: false,
isAncestorDNA:false
isAncestorDNA: false,
});
/** function fetchData สอบสวนความผิดทางวินัย*/
@ -174,6 +177,8 @@ async function fetchDetailInvestigate() {
dataList.investigationExtendStatus;
dataInvestigatefacts.investigationDaysExtend =
dataList.investigationDaysExtend;
dataInvestigatefacts.organizationId = dataList.organizationId;
dataInvestigatefacts.organization = dataList.organization;
})
.catch((err) => {
messageError($q, err);
@ -193,7 +198,9 @@ async function fetchDetailComplaints() {
dataComplaints.id = dataList.id;
dataComplaints.respondentType = dataList.respondentType;
dataComplaints.organizationId = dataList.organizationId;
dataComplaints.organization = dataList.organization;
dataComplaints.consideredAgency = dataList.consideredAgency;
dataComplaints.consideredAgencyId = dataList.consideredAgencyId;
dataComplaints.title = dataList.title;
dataComplaints.description = dataList.description;
dataComplaints.dateReceived = dataList.dateReceived;
@ -223,47 +230,7 @@ async function fetchDetailComplaints() {
async function onSubmitDisciplinary(data: any) {
showLoader();
await http
.put(config.API.disciplineDisciplinaryById(id.value), {
respondentType:data.respondentType ,
organizationId:data.organizationId ,
disciplinaryDateAllegation:data.disciplinaryDateAllegation ,
disciplinaryDateEvident:data.disciplinaryDateEvident ,
disciplinaryCaseFault:data.disciplinaryCaseFault ,
disciplinaryInvestigateAt:data.disciplinaryInvestigateAt ,
disciplinaryFaultLevel:data.disciplinaryFaultLevel ,
disciplinaryRefLaw:data.disciplinaryRefLaw ,
disciplinarySummaryEvidence:data.disciplinarySummaryEvidence ,
disciplinaryRecordAccuser:data.disciplinaryRecordAccuser ,
disciplinaryWitnesses:data.disciplinaryWitnesses ,
result:data.result ,
directors: data.directors,
persons: data.persons.map((item: any) => (
{
id:item.id ,
idcard:item.idcard ,
name:item.name ,
prefix:item.prefix ,
firstName:item.firstName ,
lastName:item.lastName ,
position:item.position === "-" ? null:item.position,
positionLevel:item.positionLevel === "-" ? null:item.positionLevel,
salary:item.salary === "-" ? null:item.salary,
personId:item.personId ,
posNo:item.posNo === "-" ? null:item.posNo,
organization:item.organization ,
})),
extendStatus:data.extendStatus ,
disciplinaryDateStart:data.disciplinaryDateStart ,
disciplinaryDateEnd:data.disciplinaryDateEnd ,
daysExtend:data.daysExtend ,
disciplinaryDateInvestigation:data.disciplinaryDateInvestigation ,
disciplinaryDateResult:data.disciplinaryDateResult ,
disciplinaryStatusResult:data.disciplinaryStatusResult ,
disciplinaryCauseText:data.disciplinaryCauseText ,
disciplinaryResult:data.disciplinaryResult ,
disciplinaryExtendHistory:data.disciplinaryExtendHistory ,
disciplinaryFaultLevelOther:data.disciplinaryFaultLevelOther ,
})
.put(config.API.disciplineDisciplinaryById(id.value), data)
.then(async () => {
await fetchDetailDisciplinary();
success($q, "บันทึกข้อมูลสำเร็จ");

View file

@ -35,7 +35,8 @@ import { useComplainstDataStore } from "@/modules/11_discipline/store/Complaints
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
import DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
@ -89,7 +90,8 @@ const countNum = ref<number>(1);
/** formData*/
const formData = reactive<FormData>({
respondentType: "",
organizationId: "",
organizationId: null,
organization: "",
consideredAgency: "",
disciplinaryDateAllegation: null, //*
disciplinaryDateEvident: null, //*
@ -121,42 +123,6 @@ const disciplineDisciplinary_DocRecordAccusers = ref<FileLists[]>([]);
const disciplineDisciplinary_DocWitnessess = ref<FileLists[]>([]);
const disciplineDisciplinary_DocOthers = ref<FileLists[]>([]);
/** ตัวแปร ref สำหรับแสดง validate */
const respondentTypeRef = ref<Object | null>(null);
const organizationIdRef = ref<Object | null>(null);
const consideredAgencyRef = ref<Object | null>(null);
const disciplinaryDateAllegationRef = ref<Object | null>(null);
const disciplinaryDateEvidentRef = ref<Object | null>(null);
const disciplinaryCaseFaultRef = ref<Object | null>(null);
const disciplinaryInvestigateAtRef = ref<Object | null>(null);
const disciplinaryFaultLevelRef = ref<Object | null>(null);
const disciplinaryRefLawRef = ref<Object | null>(null);
const disciplinarySummaryEvidenceRef = ref<Object | null>(null);
const disciplinaryRecordAccuserRef = ref<Object | null>(null);
const disciplinaryWitnessesRef = ref<Object | null>(null);
const resultRef = ref<Object | null>(null);
const dateRef = ref<Object | null>(null);
const dateEndRef = ref<Object | null>(null);
const daysExtendRef = ref<Object | null>(null);
const disciplinaryDateResultRef = ref<Object | null>(null);
const disciplinaryStatusResultRef = ref<Object | null>(null);
const disciplinaryCauseTextRef = ref<Object | null>(null);
const disciplinaryResultRef = ref<Object | null>(null);
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
const objectdisciplinary: DisciplinaryRef = {
// respondentType: respondentTypeRef,
// organizationId: organizationIdRef,
// consideredAgency: consideredAgencyRef,
// disciplinaryFaultLevel: disciplinaryFaultLevelRef,
// date: dateRef,
// dateEnd: dateEndRef,
// daysExtend: daysExtendRef,
// disciplinaryDateResult: disciplinaryDateResultRef,
// disciplinaryStatusResult: disciplinaryStatusResultRef,
// disciplinaryResult: disciplinaryResultRef,
};
const initialPagination = ref<any>({
rowsPerPage: 0,
});
@ -206,24 +172,6 @@ function toggleModal() {
modalPerson.value = !modalPerson.value;
}
/** ฟังชั่นตรวจสอบความถูกต้องก่อน บันทึก */
function validateForm() {
const hasError = [];
for (const key in objectdisciplinary) {
if (Object.prototype.hasOwnProperty.call(objectdisciplinary, key)) {
const property = objectdisciplinary[key];
if (property.value && typeof property.value.validate === "function") {
const isValid = property.value.validate();
hasError.push(isValid);
}
}
}
if (hasError.every((result) => result === true)) {
countNum.value = 1;
onSubmit();
}
}
/**
* งชนคำนวณเวลาวนทนสดจาก นทนสดการสอบสวน
* @param val จำนวนวนทองการขยาย
@ -287,6 +235,11 @@ async function fetchDatadetail() {
formData.respondentType = props.data.respondentType;
formData.organizationId = props.data.organizationId;
formData.organization = props.data.organization;
organization.value = {
id: props.data.organizationId,
name: props.data.organization,
};
formData.consideredAgency = props.data.consideredAgency;
formData.disciplinaryDateAllegation =
props.data.disciplinaryDateAllegation;
@ -338,6 +291,26 @@ async function fetchDatadetail() {
isSuspend: person.isSuspend,
status: person.status,
statusDiscard: person.statusDiscard,
root: person.root,
rootId: person.rootId,
rootShortName: person.rootShortName,
child1: person.child1,
child1Id: person.child1Id,
child1ShortName: person.child1ShortName,
child2: person.child2,
child2Id: person.child2Id,
child2ShortName: person.child2ShortName,
child3: person.child3,
child3Id: person.child3Id,
child3ShortName: person.child3ShortName,
child4: person.child4,
child4Id: person.child4Id,
child4ShortName: person.child4ShortName,
posMasterNo: person.posMasterNo,
posTypeId: person.posTypeId,
posTypeName: person.posTypeName,
posLevelId: person.posLevelId,
posLevelName: person.posLevelName,
}));
formData.disciplinaryStatusResult = props.data.disciplinaryStatusResult
@ -357,7 +330,7 @@ async function fetchDatadetail() {
position: person.position === null ? "-" : person.position,
positionLevel:
person.positionLevel === null ? "-" : person.positionLevel,
salary: person.salary === null ? "-" : person.salary,
salary: person.salary === null ? "" : person.salary,
personId: person.personId,
posNo: person.posNo === null ? "-" : person.posNo,
organization: person.organization,
@ -439,18 +412,37 @@ watch(
);
/** function เรียกรายชื่อหน่วยงาน*/
async function fetchOrganization() {
/** ดึงข้อมูล active */
async function getActive() {
showLoader();
await http
.get(config.API.typeOc())
.get(config.API.activeOrganization)
.then((res) => {
const data = res.data.result;
organizationOption.value = data.map((e: DataOptionRes) => ({
id: e.organizationId,
name: e.organizationName,
getOc(res.data.result.activeId);
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
async function getOc(activeId: string) {
showLoader();
await http
.get(config.API.orgByid(activeId))
.then(async (res) => {
organizationOption.value = await res.data.result.map((item: any) => ({
id: item.orgTreeId,
name: item.orgName,
}));
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
@ -517,6 +509,8 @@ function returnDirector(data: any) {
clickClose();
}
const organization = ref<OptionData>();
async function selectComplainant(val: string) {
formData.organizationId = "";
formData.consideredAgency = "";
@ -533,6 +527,11 @@ function changeFormData() {
if (formData.disciplinaryFaultLevel !== "อื่นๆ") {
formData.disciplinaryFaultLevelOther = "";
}
if (organization.value) {
formData.organizationId = organization.value.id;
formData.organization = organization.value.name;
}
}
/** เช็ควันที่สิ้นสุดต้องมากกว่า หรือเท่ากับวันเริ่ม */
@ -602,7 +601,7 @@ function emitPerson(data: PersonsArray[]) {
Id: dataMapId,
})
.then((res) => {
fetchOrganization();
getActive();
})
.catch((e) => {
messageError($q, e);
@ -679,19 +678,25 @@ function deletePerson(id: string) {
/** Hook */
onMounted(async () => {
mainStore.rowsAdd = [];
await fetchOrganization();
getActive();
});
</script>
<template>
<div class="row col-12 bg-white">
<div v-if="isSave" class="q-pa-sm q-gutter-sm">
<div v-if="isSave" class="col-12 q-pa-sm q-gutter-sm">
<q-banner inline-actions bordered class="bg-red-1 text-red border-orange">
<q-icon name="mdi-information-outline" size="20px" /> แจงเตอน
งไมไดนทกขอม
</q-banner>
</div>
<form @submit.prevent="validateForm" class="col-12 row">
<q-form
greedy
@submit.prevent
@validation-success="onSubmit"
class="col-12 row"
>
<div class="row col-12">
<div class="col-xs-12 col-sm-12 col-md-9 row no-wrap">
<div class="col-12 row q-pl-md q-py-md">
@ -747,11 +752,10 @@ onMounted(async () => {
outlined
option-label="name"
option-value="id"
emit-value
map-options
v-model="formData.organizationId"
v-model="organization"
:options="organizationOption"
label="เลือกสำนักงาน"
label="หน่วยงานที่ถูกร้องเรียน"
@update:model-value="changeFormData()"
/>
</div>
@ -1822,7 +1826,7 @@ onMounted(async () => {
><q-tooltip>บทกขอม</q-tooltip></q-btn
>
</div>
</form>
</q-form>
</div>
<DialogDuty

View file

@ -63,10 +63,11 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
documentFile: null,
respondentType: "",
organizationId: "",
organization: "",
persons: [],
investigationExtendHistory: [],
isDisciplinary:false,
isAncestorDNA:false
isDisciplinary: false,
isAncestorDNA: false,
});
const personObjComplaint = reactive<ArrayPerson>({
@ -92,7 +93,9 @@ const dataComplaints = reactive<FormDataComplaint>({
id: "",
respondentType: "",
organizationId: "",
organization: "",
consideredAgency: "",
consideredAgencyId: "",
title: "",
description: "",
dateReceived: null,
@ -197,6 +200,8 @@ async function fetchDetailInvestigate() {
dataList.investigationExtendStatus;
dataInvestigatefacts.investigationDaysExtend =
dataList.investigationDaysExtend;
dataInvestigatefacts.organizationId = dataList.organizationId;
dataInvestigatefacts.organization = dataList.organization;
})
.catch((err) => {
messageError($q, err);
@ -216,7 +221,9 @@ async function fetchDetailComplaints() {
dataComplaints.id = dataList.id;
dataComplaints.respondentType = dataList.respondentType;
dataComplaints.organizationId = dataList.organizationId;
dataComplaints.organization = dataList.organization;
dataComplaints.consideredAgency = dataList.consideredAgency;
dataComplaints.consideredAgencyId = dataList.consideredAgencyId;
dataComplaints.title = dataList.title;
dataComplaints.description = dataList.description;
dataComplaints.dateReceived = dataList.dateReceived;
@ -263,6 +270,7 @@ onMounted(async () => {
await fetchDetailResult();
});
</script>
<template>
<div class="col-xs-12 col-sm-12 col-md-11">
<div class="toptitle col-12 row items-center">

View file

@ -8,7 +8,7 @@ import { useCounterMixin } from "@/stores/mixin";
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
import type {
FormData,
@ -42,7 +42,9 @@ const $q = useQuasar();
const id = ref<string>(route.params.id as string);
const isSave = ref<boolean>(false); //
const respondentType = ref<string>("");
const organization = ref<DataOption>();
const organizationId = ref<string>("");
const organizationName = ref<string>("");
const consideredAgency = ref<string>("");
const organizationOption = ref<DataOption[]>([]);
/** ตัวแปร ref สำหรับแสดง validate */
@ -83,18 +85,37 @@ const objectdisciplinary: FormRef = {
};
/** function เรียกรายชื่อหน่วยงาน*/
async function fetchOrganization() {
/** ดึงข้อมูล active */
async function getActive() {
showLoader();
await http
.get(config.API.typeOc())
.get(config.API.activeOrganization)
.then((res) => {
const data = res.data.result;
organizationOption.value = data.map((e: DataOptionRes) => ({
id: e.organizationId,
name: e.organizationName,
getOc(res.data.result.activeId);
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
async function getOc(activeId: string) {
showLoader();
await http
.get(config.API.orgByid(activeId))
.then(async (res) => {
organizationOption.value = await res.data.result.map((item: any) => ({
id: item.orgTreeId,
name: item.orgName,
}));
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
@ -103,46 +124,25 @@ async function selectComplainant(val: string) {
consideredAgency.value = "";
}
/** ฟังชั่นตรวจสอบความถูกต้องก่อน บันทึก */
function validateForm() {
const hasError = [];
for (const key in objectdisciplinary) {
if (Object.prototype.hasOwnProperty.call(objectdisciplinary, key)) {
const property = objectdisciplinary[key];
if (property.value && typeof property.value.validate === "function") {
const isValid = property.value.validate();
hasError.push(isValid);
}
}
}
if (hasError.every((result) => result === true)) {
countNum.value = 1;
onSubmit();
}
}
/**
* งกนสำหรบบนทกขอม ระบบจะแสดง dialog ใหนยนการบนท
* หากยนยนจะสงขอมลไปบนทกท api
* หากยกเลกจะกลบไปหนาฟอร
*/
function onSubmit() {
dialogConfirm(
$q,
async () => {
await http
.put(config.API.listResultById(id.value), formData)
.then(() => {
isSave.value = false;
success($q, "บันทึกข้อมูลสำเร็จ");
props.fetchData();
})
.catch((err) => {
messageError($q, err);
})
.finally(async () => {});
}
);
dialogConfirm($q, async () => {
await http
.put(config.API.listResultById(id.value), formData)
.then(() => {
isSave.value = false;
success($q, "บันทึกข้อมูลสำเร็จ");
props.fetchData();
})
.catch((err) => {
messageError($q, err);
})
.finally(async () => {});
});
}
async function fetchDatadetail() {
@ -166,7 +166,14 @@ watch(
formData.year = props.data.resultYear ?? 0;
mainStore.rowsAdd = props.data.persons;
await fetchDatadetail();
await fetchOrganization();
await getActive();
organizationId.value = props.data.organizationId;
organizationName.value = props.data.organization;
organization.value = {
id: props.data.organizationId,
name: props.data.organization,
};
} else if (countNum.value === 2) {
formData.disciplineDisciplinary_DocResults =
props.data.disciplineDisciplinary_DocResults;
@ -260,7 +267,7 @@ function updatemodalPersonal(modal: boolean) {
</script>
<template>
<div class="row col-12 bg-white">
<div v-if="isSave" class=" col-12">
<div v-if="isSave" class="col-12">
<q-banner
inline-actions
bordered
@ -272,13 +279,17 @@ function updatemodalPersonal(modal: boolean) {
</q-banner>
<q-separator />
</div>
<form @submit.prevent="validateForm" class="col-12 row">
<q-form
greedy
@submit.prevent
@validation-success="onSubmit"
class="col-12 row"
>
<div class="col-12 row">
<div class="col-sm-12 col-md-9 row no-wrap">
<div class=" col-12 q-pa-md">
<div class="col-12 q-pa-md">
<div class="row col-12 q-col-gutter-md">
<div class="col-xs-12 col-sm-4">
<q-select
readonly
@ -310,11 +321,12 @@ function updatemodalPersonal(modal: boolean) {
</q-select>
</div>
<div
class="col-xs-12 col-sm-3"
class="col-xs-12 col-sm-4"
v-if="respondentType === 'ORGANIZATION'"
id="organizationId"
>
<q-select
readonly
for="inputOffice"
name="organizationId"
ref="organizationIdRef"
@ -323,11 +335,10 @@ function updatemodalPersonal(modal: boolean) {
outlined
option-label="name"
option-value="id"
emit-value
map-options
v-model="organizationId"
v-model="organization"
:options="organizationOption"
label="เลือกสำนักงาน"
label="หน่วยงานที่ถูกร้องเรียน"
/>
</div>
<div class="row col-12" v-if="respondentType === 'PERSON'">
@ -401,7 +412,11 @@ function updatemodalPersonal(modal: boolean) {
{{ props.row.organization }}
</div>
<div v-else-if="col.name === 'salary'">
{{ props.row.salary.toLocaleString() }}
{{
props.row.salary
? props.row.salary.toLocaleString()
: ""
}}
</div>
<div v-else>
{{ col.value }}
@ -474,9 +489,7 @@ function updatemodalPersonal(modal: boolean) {
:class="inputEdit(isReadonly)"
outlined
:model-value="
formData.year === 0
? null
: Number(formData.year) + 543
formData.year === 0 ? null : Number(formData.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>
@ -501,7 +514,7 @@ function updatemodalPersonal(modal: boolean) {
</div>
</div>
</div>
<div class="row"><q-separator vertical /></div>
<div class="row"><q-separator vertical /></div>
</div>
<!-- พโหลดไฟล -->
@ -530,66 +543,64 @@ function updatemodalPersonal(modal: boolean) {
</template>
<template v-slot:after>
<q-btn
v-if="formData.file"
size="14px"
flat
round
dense
color="add"
icon="mdi-upload"
@click="uploadFile"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn>
v-if="formData.file"
size="14px"
flat
round
dense
color="add"
icon="mdi-upload"
@click="uploadFile"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn
>
</template>
</q-file>
</div>
</div>
<div
v-if="formData.disciplineDisciplinary_DocResults.length > 0"
class="col-xs-12 row"
>
<q-list
class="full-width"
bordered
separator
</div>
<div
v-if="formData.disciplineDisciplinary_DocResults.length > 0"
class="col-xs-12 row"
>
<q-list class="full-width" bordered separator>
<q-item
v-for="data in formData.disciplineDisciplinary_DocResults"
:key="data.id"
clickable
v-ripple
>
<q-item
v-for="data in formData.disciplineDisciplinary_DocResults"
:key="data.id"
clickable
v-ripple>
<q-item-section>{{ data.fileName }}</q-item-section>
<q-space />
<q-btn
size="12px"
flat
round
dense
color="blue"
icon="mdi-download"
@click="downloadFile(data.pathName)"
><q-tooltip>ดาวนโหลดไฟล</q-tooltip></q-btn
>
<q-btn
size="12px"
flat
round
dense
color="red"
class="q-ml-sm"
icon="mdi-delete-outline"
@click="deleteFile(data.id)"
><q-tooltip>ลบไฟล</q-tooltip></q-btn
>
</q-item>
</q-list>
</div>
<div class="col-12 q-pa-sm" v-else>
<q-card class="q-pa-md" bordered> ไมรายการเอกสาร </q-card>
<q-item-section>{{ data.fileName }}</q-item-section>
<q-space />
<q-btn
size="12px"
flat
round
dense
color="blue"
icon="mdi-download"
@click="downloadFile(data.pathName)"
><q-tooltip>ดาวนโหลดไฟล</q-tooltip></q-btn
>
<q-btn
size="12px"
flat
round
dense
color="red"
class="q-ml-sm"
icon="mdi-delete-outline"
@click="deleteFile(data.id)"
><q-tooltip>ลบไฟล</q-tooltip></q-btn
>
</q-item>
</q-list>
</div>
<div class="col-12 q-pa-sm" v-else>
<q-card class="q-pa-md" bordered> ไมรายการเอกสาร </q-card>
</div>
</q-card>
</div>
<div class="col-12 "><q-separator /></div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-sm">
<q-space />
<q-btn
@ -602,9 +613,9 @@ function updatemodalPersonal(modal: boolean) {
>
</div>
</div>
</form>
</q-form>
</div>
<PopupPersonal
:modal="modalPersonal"
:id="personId"

View file

@ -36,7 +36,7 @@ function nextPage(type: string, title: string) {
<q-item
clickable
@click=" nextPage( '2', 'รายงานเรื่องร้องเรียนข้าราชการสามัญฯ ในสังกัดกรุงเทพมหานคร แยกตามหน่วยงาน' ) "
@click=" nextPage( '2', 'รายงานเรื่องร้องเรียนข้าราชการสามัญ ฯ ในสังกัดกรุงเทพมหานคร แยกตามหน่วยงาน' ) "
dense
class="hover-green"
>
@ -44,14 +44,14 @@ function nextPage(type: string, title: string) {
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>
<q-item-section class="text-dark">
รายงานเรองรองเรยนขาราชการสามในสงกดกรงเทพมหานคร
รายงานเรองรองเรยนขาราชการสาม ในสงกดกรงเทพมหานคร
แยกตามหนวยงาน
</q-item-section>
</q-item>
<q-item
clickable
@click=" nextPage( '3', 'รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัย แยกตามลักษณะความผิด' ) "
@click=" nextPage( '3', 'รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัย แยกตามลักษณะความผิด' ) "
dense
class="hover-green"
>
@ -59,7 +59,7 @@ function nextPage(type: string, title: string) {
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>
<q-item-section class="text-dark">
รายงานจำนวนขาราชการสามกระทำความผดทางว
รายงานจำนวนขาราชการสาม กระทำความผดทางว
แยกตามลกษณะความผ
</q-item-section>
</q-item>
@ -74,7 +74,7 @@ function nextPage(type: string, title: string) {
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>
<q-item-section class="text-dark">
รายงานรายชอขาราชการสาม
รายงานรายชอขาราชการสาม
กระทำความผดทางวยแยกตามลกษณะความผ
</q-item-section>
</q-item>
@ -89,13 +89,13 @@ function nextPage(type: string, title: string) {
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>
<q-item-section class="text-dark">
รายงานจำนวนขาราชการสามกระทำความผดแยกตามระดบความผ
รายงานจำนวนขาราชการสาม กระทำความผดแยกตามระดบความผ
</q-item-section>
</q-item>
<q-item
clickable
@click=" nextPage( '6', 'รายงานรายชื่อข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด' ) "
@click=" nextPage( '6', 'รายงานรายชื่อข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด' ) "
dense
class="hover-green"
>
@ -103,14 +103,14 @@ function nextPage(type: string, title: string) {
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>
<q-item-section class="text-dark">
รายงานรายชอขาราชการสาม
รายงานรายชอขาราชการสาม
กระทำความผดทางวยแยกตามลกษณะความผ
</q-item-section>
</q-item>
<q-item
clickable
@click=" nextPage( '7', 'รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกลักษณะความผิด' ) "
@click=" nextPage( '7', 'รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกลักษณะความผิด' ) "
dense
class="hover-green"
>
@ -118,14 +118,14 @@ function nextPage(type: string, title: string) {
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>
<q-item-section class="text-dark">
รายงานจำนวนขาราชการสามกระทำความผดทางวยแตเรอง
รายงานจำนวนขาราชการสาม กระทำความผดทางวยแตเรอง
แยกลกษณะความผ
</q-item-section>
</q-item>
<q-item
clickable
@click=" nextPage( '8', 'รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกตามตำแหน่ง' ) "
@click=" nextPage( '8', 'รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกตามตำแหน่ง' ) "
dense
class="hover-green"
>
@ -133,7 +133,7 @@ function nextPage(type: string, title: string) {
<q-icon color="primary" name="mdi-file" size="xs" />
</q-item-section>
<q-item-section class="text-dark">
รายงานจำนวนขาราชการสามกระทำความผดทางวยแตเรอง
รายงานจำนวนขาราชการสาม กระทำความผดทางวยแตเรอง
แยกตามตำแหน
</q-item-section>
</q-item>

View file

@ -13,7 +13,7 @@ import type {
import http from "@/plugins/http";
import config from "@/app.config";
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
@ -201,8 +201,7 @@ async function searchInput() {
rows.value = list;
})
.catch((err) => {
})
.catch((err) => {})
.finally(() => {
hideLoader();
});
@ -240,7 +239,7 @@ function updatemodalPersonal(modal: boolean) {
* เมอมอม
* เกบขอมลลง formData
*/
watch(props.data, async () => {
watch(props.data, async () => {
formData.prefix = props.data.prefix;
formData.firstname = props.data.firstname;
formData.lastname = props.data.lastname;
@ -283,16 +282,16 @@ function updatemodalPersonal(modal: boolean) {
label="คำค้น"
:rules="[(val) => !!val || `กรุณากรอกคำค้น`]"
>
<template v-slot:after>
<q-btn
color="primary"
icon="search"
label="ค้นหา"
class="full-width q-py-sm q-px-md"
@click="searchInput()"
>
</q-btn>
</template>
<template v-slot:after>
<q-btn
color="primary"
icon="search"
label="ค้นหา"
class="full-width q-py-sm q-px-md"
@click="searchInput()"
>
</q-btn>
</template>
</q-input>
</div>
</div>

View file

@ -3,7 +3,6 @@ import { onMounted, ref, reactive } from "vue";
import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import CurrencyInput from "@/components/CurruncyInput.vue";
import http from "@/plugins/http";
import config from "@/app.config";
import keycloak from "@/plugins/keycloak";
@ -12,7 +11,10 @@ import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/Suspend
/**Import type */
import type { QForm } from "quasar";
import type { dataDetail } from "@/modules/11_discipline/interface/response/suspend";
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
import CardProfile from "@/components/CardProfile.vue";
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
@ -38,6 +40,7 @@ const {
const myForm = ref<QForm | null>(null);
const roleAdmin = ref<boolean>(false);
const edit = ref<boolean>(false);
const dataProfile = ref<DataProfile>();
const data = reactive<dataDetail>({
id: "",
@ -51,6 +54,7 @@ const data = reactive<dataDetail>({
organization: "",
position: "",
posNo: "",
posTypeName: "",
positionLevel: "",
salary: 0,
status: "",
@ -61,6 +65,22 @@ const data = reactive<dataDetail>({
offenseDetails: "",
disciplinaryFaultLevel: "",
disciplinaryCaseFault: "",
child1: "",
child1Id: null,
child1ShortName: "",
child2: "",
child2Id: null,
child2ShortName: "",
child3: "",
child3Id: null,
child3ShortName: "",
child4: "",
child4Id: null,
child4ShortName: "",
root: "",
rootId: null,
rootShortName: "",
positionType: "",
});
/**นำข้อมูลจาก API มาแสดง */
@ -70,6 +90,8 @@ async function getData() {
.get(config.API.suspendById(dataId))
.then((res) => {
const dataGet = res.data.result;
dataProfile.value = dataGet as DataProfile;
data.id = dataGet.id;
data.personId = dataGet.personId;
data.citizenId = dataGet.citizenId;
@ -81,6 +103,7 @@ async function getData() {
data.position = dataGet.position;
data.posNo = dataGet.posNo;
data.positionLevel = dataGet.positionLevel;
data.positionType = dataGet.positionType;
data.salary = dataGet.salary;
data.status = dataGet.status;
data.descriptionSuspend = dataGet.descriptionSuspend
@ -92,7 +115,22 @@ async function getData() {
data.offenseDetails = dataGet.offenseDetails;
data.disciplinaryFaultLevel = dataGet.disciplinaryFaultLevel;
data.disciplinaryCaseFault = dataGet.disciplinaryCaseFault;
getAvatar(dataGet.personId);
data.child1 = dataGet.child1;
data.child1Id = dataGet.child1Id;
data.child1ShortName = dataGet.child1ShortName;
data.child2 = dataGet.child2;
data.child2Id = dataGet.child2Id;
data.child2ShortName = dataGet.child2ShortName;
data.child3 = dataGet.child3;
data.child3Id = dataGet.child3Id;
data.child3ShortName = dataGet.child3ShortName;
data.child4 = dataGet.child4;
data.child4Id = dataGet.child4Id;
data.child4ShortName = dataGet.child4ShortName;
data.root = dataGet.root;
data.rootId = dataGet.rootId;
data.rootShortName = dataGet.rootShortName;
// getAvatar(dataGet.personId);
})
.catch((e) => {
messageError($q, e);
@ -130,24 +168,24 @@ async function clickCancel() {
/**
* งก Save
*/
async function conditionSave() {
if (myForm.value !== null) {
myForm.value.validate().then((success) => {
if (success) {
dialogMessage(
$q,
"ต้องการแก้ไขข้อมูลหรือไม่?",
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
"mdi-help-circle-outline",
"ตกลง",
"public",
async () => await saveData(),
undefined
);
}
});
}
}
// async function conditionSave() {
// if (myForm.value !== null) {
// myForm.value.validate().then((success) => {
// if (success) {
// dialogMessage(
// $q,
// "?",
// "",
// "mdi-help-circle-outline",
// "",
// "public",
// async () => await saveData(),
// undefined
// );
// }
// });
// }
// }
/**
* งก Saveจาก API
@ -155,7 +193,7 @@ async function conditionSave() {
async function saveData() {
const body = {
organization: data.organization,
position: data.position,
positionType: data.positionType,
posNo: data.posNo,
positionLevel: data.positionLevel,
salary: data.salary,
@ -231,7 +269,8 @@ onMounted(async () => {
/>
รายละเอยดการของ {{ data.name }}
</div>
<q-card bordered class="row col-12 text-dark">
<!-- <q-card bordered class="row col-12 text-dark">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-subtitle2">
{{ data.name }}
@ -283,51 +322,54 @@ onMounted(async () => {
</div>
</div>
</div>
</q-card>
</q-card> -->
<CardProfile :data="dataProfile as DataProfile" />
<q-card 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="q-pl-sm text-weight-bold text-dark">
แกไขขอมลเพอลงบญชแนบทาย
</div>
<q-space />
<div v-if="data.status !== 'DONE' && data.status !== 'REPORT'">
<div class="q-gutter-sm" v-if="!edit">
<q-btn
outline
color="primary"
dense
icon-right="mdi-file-edit-outline"
class="q-px-sm"
label="แก้ไข"
style="width: 80px"
@click="edit = !edit"
/>
<q-form greedy @submit.prevent @validation-success="saveData">
<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-gutter-sm" v-else>
<q-btn
outline
color="public"
dense
class="q-px-sm"
label="บันทึก"
style="width: 80px"
@click="conditionSave"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="clickCancel"
/>
<q-space />
<div v-if="data.status !== 'DONE' && data.status !== 'REPORT'">
<div class="q-gutter-sm" v-if="!edit">
<q-btn
outline
color="primary"
dense
icon-right="mdi-file-edit-outline"
class="q-px-sm"
label="แก้ไข"
style="width: 80px"
@click="edit = !edit"
/>
</div>
<div class="q-gutter-sm" v-else>
<q-btn
outline
color="public"
dense
class="q-px-sm"
label="บันทึก"
style="width: 80px"
type="submit"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="clickCancel"
/>
</div>
</div>
</div>
</div>
<div class="col-12"><q-separator /></div>
<q-form ref="myForm">
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-6 col-sm-3 row">
@ -339,10 +381,10 @@ onMounted(async () => {
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="data.position"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
v-model="data.positionType"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
:label="`${'ประเภทตำแหน่ง'}`"
/>
</div>
</div>
@ -356,9 +398,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="data.positionLevel"
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับ'}`"
:label="`${'ระดับตำแหน่ง'}`"
/>
</div>
</div>
@ -380,13 +422,19 @@ onMounted(async () => {
</div>
<div class="col-xs-6 col-sm-3 row">
<div class="col-12">
<CurrencyInput
<q-input
v-model="data.salary"
:edit="edit"
:options="{
currency: 'THB',
}"
:outlined="edit"
dense
:readonly="!edit"
hide-bottom-space
:borderless="!edit"
:label="`${'เงินเดือน'}`"
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
lazy-rules
mask="###,###,###,###"
reverse-fill-mask
class="inputgreen"
/>
</div>
</div>

View file

@ -27,7 +27,7 @@ const visibleColumns = ref<string[]>([
"no",
"title",
"name",
"position",
"positionType",
"positionLevel",
"organization",
"dateTotal",
@ -70,23 +70,19 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
label: "ระดับ",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return row.positionLevel
? `${row.positionType} (${row.positionLevel})`
: "-";
},
},
{
name: "organization",
@ -160,7 +156,7 @@ function openModalOrder() {
r.statusEn == "PENDING" &&
r.name &&
r.organization &&
r.position &&
r.positionType &&
r.positionLevel &&
r.posNo &&
r.organization
@ -244,6 +240,7 @@ onMounted(() => {
dataStore.visibleColumns = visibleColumns.value;
});
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">
รายชอผกพกราชการ

View file

@ -1,68 +1,71 @@
interface FormData {
id:string
respondentType: string
consideredAgency: string
title: string
description: string
dateReceived: Date | null
dateConsideration: Date | null
offenseDetails: string
levelConsideration: string
dateNotification: Date | null
complaintFrom: string
appellant: string
documentFile: any | null
status: string
result: string
persons: object|null
organizationId:string|null
disciplineComplaintDocs:object|null
id: string;
respondentType: string;
consideredAgency: string;
title: string;
description: string;
dateReceived: Date | null;
dateConsideration: Date | null;
offenseDetails: string;
levelConsideration: string;
dateNotification: Date | null;
complaintFrom: string;
appellant: string;
documentFile: any | null;
status: string;
result: string;
persons: object | null;
organizationId: string | null;
disciplineComplaintDocs: object | null;
activeId?: string | null;
organization?: string;
consideredAgencyId?: string | null;
}
interface ArrayPerson {
id: string
personId:string
idcard:string
name:string
prefix:string
firstName:string
lastName:string
posNo:string
position:string
positionLevel:string
salary:number|null
organization:string
id: string;
personId: string;
idcard: string;
name: string;
prefix: string;
firstName: string;
lastName: string;
posNo: string;
position: string;
positionLevel: string;
salary: number | null;
organization: string;
}
interface ArrayFileList {
id:string
pathName:string
fileName:string
id: string;
pathName: string;
fileName: string;
}
interface MyObjectComplaintsRef {
respondentType: object | null;
organizationId: object | null;
consideredAgency: object | null;
title: object | null;
dateReceived: object | null;
offenseDetails: object | null;
[key: string]: any;
respondentType: object | null;
organizationId: object | null;
consideredAgency: object | null;
title: object | null;
dateReceived: object | null;
offenseDetails: object | null;
[key: string]: any;
}
interface DataAddRequest {
id: string
idcard: string
name: string
positionNo: string
position: string
positionLevel: string
salary: string
organization: string
id: string;
idcard: string;
name: string;
positionNo: string;
position: string;
positionLevel: string;
salary: string;
organization: string;
}
export type {
FormData,
MyObjectComplaintsRef,
DataAddRequest,
ArrayPerson,
ArrayFileList
}
FormData,
MyObjectComplaintsRef,
DataAddRequest,
ArrayPerson,
ArrayFileList,
};

View file

@ -56,7 +56,8 @@ interface Director {
interface FormData {
respondentType: string;
organizationId: string;
organizationId: string | null;
organization: string;
consideredAgency: string;
disciplinaryDateAllegation: Date | null;
disciplinaryDateEvident: Date | null;
@ -71,8 +72,8 @@ interface FormData {
directors: Director[];
persons: Persons[];
extendStatus: boolean;
disciplinaryDateStart: Date | null|string;
disciplinaryDateEnd: Date | null|string;
disciplinaryDateStart: Date | null | string;
disciplinaryDateEnd: Date | null | string;
daysExtend: number;
disciplinaryDateInvestigation: Date | null;
disciplinaryDateResult: Date | null;
@ -80,7 +81,7 @@ interface FormData {
disciplinaryCauseText: string;
disciplinaryResult: string;
disciplinaryExtendHistory: ExtendHistoryObject[];
disciplinaryFaultLevelOther:string
disciplinaryFaultLevelOther: string;
}
interface ExtendHistoryObject {

View file

@ -10,8 +10,8 @@ interface FormData {
evidenceFiles: any | null;
fileComplaint: File | null;
investigationExtendStatus: boolean | null;
investigationDateStart: Date | null|string;
investigationDateEnd: Date | null|string;
investigationDateStart: Date | null | string;
investigationDateEnd: Date | null | string;
investigationDaysExtend: number | null;
investigationStatusResult: string;
investigationCauseText: string;
@ -26,8 +26,9 @@ interface FormData {
organizationId: string;
persons: object | null;
investigationExtendHistory: ExtendHistoryObject[];
isDisciplinary:boolean
isAncestorDNA:boolean
isDisciplinary: boolean;
isAncestorDNA: boolean;
organization?: string;
}
interface ExtendHistoryObject {

View file

@ -8,6 +8,7 @@ interface listData {
position: string;
posNo: string;
positionLevel: string;
positionType: string;
salary: number;
status: string;
descriptionSuspend: string;
@ -30,6 +31,7 @@ interface dataType {
position: string;
posNo: string;
positionLevel: string;
positionType: string;
salary: number;
status: string;
statusEn: string;
@ -65,6 +67,23 @@ interface dataDetail {
offenseDetails: string;
disciplinaryFaultLevel: string;
disciplinaryCaseFault: string;
posTypeName: string;
child1: string;
child1Id: string | null;
child1ShortName: string;
child2: string;
child2Id: string | null;
child2ShortName: string;
child3: string;
child3Id: string | null;
child3ShortName: string;
child4: string;
child4Id: string | null;
child4ShortName: string;
root: string;
rootId: string | null;
rootShortName: string;
positionType?: string;
}
interface DataOption {

View file

@ -22,13 +22,13 @@ export const useReportDataStore = defineStore("DisciplineReport11", () => {
]);
const optionReport = ref<DataOption[]>([
{ id: "1", name: "รายงานเรื่องร้องเรียนแยกรายวัน รายเดือน รายปี" },
{ id: "2", name: "รายงานเรื่องร้องเรียนข้าราชการสามัญฯ ในสังกัดกรุงเทพมหานคร แยกตามหน่วยงาน" },
{ id: "3", name: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัย แยกตามลักษณะความผิด" },
{ id: "4", name: "รายงานรายชื่อข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด" },
{ id: "5", name: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดแยกตามระดับความผิด" },
{ id: "6", name: "รายงานรายชื่อข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด" },
{ id: "7", name: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกลักษณะความผิด" },
{ id: "8", name: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกตามตำแหน่ง" },
{ id: "2", name: "รายงานเรื่องร้องเรียนข้าราชการสามัญ ฯ ในสังกัดกรุงเทพมหานคร แยกตามหน่วยงาน" },
{ id: "3", name: "รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัย แยกตามลักษณะความผิด" },
{ id: "4", name: "รายงานรายชื่อข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด" },
{ id: "5", name: "รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดแยกตามระดับความผิด" },
{ id: "6", name: "รายงานรายชื่อข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด" },
{ id: "7", name: "รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกลักษณะความผิด" },
{ id: "8", name: "รายงานจำนวนข้าราชการสามัญ ฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกตามตำแหน่ง" },
]);
/**

View file

@ -1,18 +1,22 @@
import { defineStore } from "pinia";
import { ref } from 'vue'
import type { listData, dataType, DataOption } from '@/modules/11_discipline/interface/response/suspend'
import { ref } from "vue";
import type {
listData,
dataType,
DataOption,
} from "@/modules/11_discipline/interface/response/suspend";
import type { QTableProps } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
export const useDisciplineSuspendStore = defineStore(
"disciplineSuspendStore",
() => {
const rows = ref<dataType[]>([])
const columns = ref<QTableProps["columns"]>([])
const visibleColumns = ref<string[]>([])
const rows = ref<dataType[]>([]);
const columns = ref<QTableProps["columns"]>([]);
const visibleColumns = ref<string[]>([]);
const mixin = useCounterMixin()
const { date2Thai } = mixin
const mixin = useCounterMixin();
const { date2Thai } = mixin;
const offenseDetailsOps = ref<DataOption[]>([
{ id: "NOT_SPECIFIED", name: "ยังไม่ระบุ" },
@ -35,21 +39,27 @@ export const useDisciplineSuspendStore = defineStore(
organization: item.organization,
position: item.position,
posNo: item.posNo,
positionType: item.positionType,
positionLevel: item.positionLevel,
salary: item.salary,
status: statusTothai(item.status),
statusEn: item.status,
descriptionSuspend: item.descriptionSuspend,
dateTotal: item.startDateSuspend && item.endDateSuspend ? `${date2Thai(item.startDateSuspend)} - ${date2Thai(item.endDateSuspend)}` : '-',
dateTotal:
item.startDateSuspend && item.endDateSuspend
? `${date2Thai(item.startDateSuspend)} - ${date2Thai(
item.endDateSuspend
)}`
: "-",
startDateSuspend: item.startDateSuspend,
endDateSuspend: item.endDateSuspend,
title: item.title,
offenseDetails: item.offenseDetails,
disciplinaryFaultLevel: item.disciplinaryFaultLevel,
disciplinaryCaseFault: item.disciplinaryCaseFault,
}))
}));
rows.value = dataList
rows.value = dataList;
}
/**
@ -82,7 +92,7 @@ export const useDisciplineSuspendStore = defineStore(
columns,
visibleColumns,
getData,
offenseDetailsOps
offenseDetailsOps,
};
}
);

View file

@ -218,10 +218,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
]);
/**
* option
* @param val API
* @returns name id
*/
* option
* @param val API
* @returns name id
*/
function convertComplaintType(val: string) {
const result = complainantoptionsMain.value.find(
(x: any) => x.id == val
@ -248,10 +248,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
}
/**
* status text
* @param val status
* @returns text
*/
* status text
* @param val status
* @returns text
*/
function convertStatus(val: string) {
switch (val) {
case "NEW":
@ -266,10 +266,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
}
/**
* option
* @param val API
* @returns name id
*/
* option
* @param val API
* @returns name id
*/
function convertOffenseDetailst(val: string) {
return (
offenseDetailstOptions.value.find((x: any) => x.id == val)?.name ?? "-"
@ -277,10 +277,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
}
/**
* option
* @param val API
* @returns name id
*/
* option
* @param val API
* @returns name id
*/
function convertStatusResult(val: string) {
const result = statusResultOptions.value.find(
(x: any) => x.id == val
@ -293,26 +293,43 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
* @param data
*/
function fetchData(data: ArrayPersonAdd[]) {
const dataList:any = data.map((item: any) => (
{
id: item.id,
idcard: item.idcard,
name: item.name,
prefix: item.prefix,
firstName: item.firstName,
lastName: item.lastName,
position: item.position,
positionLevel: item.positionLevel,
salary: item.salary === null ? '-':item.salary,
personId: item.personId,
posNo: item.posNo === null ? '-':item.posNo,
organization: item.organization,
}
))
const dataList: any = data.map((item: any) => ({
id: item.id,
idcard: item.idcard,
name: item.name,
prefix: item.prefix,
firstName: item.firstName,
lastName: item.lastName,
position: item.position,
positionLevel: item.positionLevel,
salary: item.salary === null ? "" : item.salary,
personId: item.personId,
posNo: item.posNo === null ? "-" : item.posNo,
organization: item.organization,
root: item.root,
rootId: item.rootId,
rootShortName: item.rootShortName,
child1: item.child1,
child1Id: item.child1Id,
child1ShortName: item.child1ShortName,
child2: item.child2,
child2Id: item.child2Id,
child2ShortName: item.child2ShortName,
child3: item.child3,
child3Id: item.child3Id,
child3ShortName: item.child3ShortName,
child4: item.child4,
child4Id: item.child4Id,
child4ShortName: item.child4ShortName,
posMasterNo: item.posMasterNo,
posTypeId: item.posTypeId,
posTypeName: item.posTypeName,
posLevelId: item.posLevelId,
posLevelName: item.posLevelName,
}));
rowsAdd.value = dataList;
}
return {
complainantoptionsMain,
convertFault,
@ -330,6 +347,6 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
statusResultOptions,
convertStatusResult,
rowsCheck,
causeTextOptions
causeTextOptions,
};
});

View file

@ -101,8 +101,8 @@ async function onClickDowloadFile(
tp === "EV1_005" || tp === "EV1_007"
? { organizationName: "หน่วยงาน" }
: null,
tp === "EV1_007" ? { positionName: "ตำแหน่ง" } : null,
tp === "EV1_007" ? { positionLeaveName: "ระดับ" } : null
tp === "EV1_007" ? { positionName: "ประเภทตำแหน่ง" } : null,
tp === "EV1_007" ? { positionLeaveName: "ระดับตำแหน่ง" } : null
);
const body = {
template: tp,
@ -401,7 +401,9 @@ onMounted(async () => {
bordered
>
<q-item clickable v-ripple>
<q-item-section class="text-grey-9">{{ file.fileName }}</q-item-section>
<q-item-section class="text-grey-9">{{
file.fileName
}}</q-item-section>
<q-item-section avatar>
<div class="row">
<div>
@ -427,10 +429,12 @@ onMounted(async () => {
<!-- ประกาศผลการคดเลอกบคคล (เอกสารหมายเลข 10) -->
<div class="col-12">
<q-card bordered style="border: 1px solid #d6dee1">
<div class="text-weight-medium row col-12 bg-grey-1 q-py-sm q-px-md items-center">
<div
class="text-weight-medium row col-12 bg-grey-1 q-py-sm q-px-md items-center"
>
<div>ประกาศผลการคดเลอกบคคล (เอกสารหมายเลข 10)</div>
<q-space/>
<div v-if="store.currentStep == 4" >
<q-space />
<div v-if="store.currentStep == 4">
<q-btn
icon="download"
color="indigo"
@ -448,7 +452,7 @@ onMounted(async () => {
<q-tooltip> ดาวนโหลดตนแบบ </q-tooltip></q-btn
>
</div>
<div >
<div>
<q-btn
v-if="download10Url != ''"
:href="download10Url"
@ -464,39 +468,37 @@ onMounted(async () => {
>
</div>
</div>
<div class="col-12" v-if="store.currentStep == 4"><q-separator /></div>
<div class="col-12" v-if="store.currentStep == 4"><q-separator /></div>
<div class="row">
<div class="col-12 q-pa-sm" v-if="store.currentStep == 4">
<q-file
ref="fileEvaluationUploadRef"
v-model="fileEvaluationUpload"
class="col-12"
outlined
dense
hide-bottom-space
lazy-rules
accept=".pdf"
:rules="
download10Url === ''
? [(val) => !!val || 'กรุณาเลือกไฟล์']
: []
"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
<template v-slot:after>
<q-btn
flat
round
dense
color="primary"
icon="mdi-upload "
@click="upLoadFile(fileEvaluationUpload)"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn
>
</template>
</q-file>
<div class="col-12 q-pa-sm" v-if="store.currentStep == 4">
<q-file
ref="fileEvaluationUploadRef"
v-model="fileEvaluationUpload"
class="col-12"
outlined
dense
hide-bottom-space
lazy-rules
accept=".pdf"
:rules="
download10Url === '' ? [(val) => !!val || 'กรุณาเลือกไฟล์'] : []
"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
<template v-slot:after>
<q-btn
flat
round
dense
color="primary"
icon="mdi-upload "
@click="upLoadFile(fileEvaluationUpload)"
><q-tooltip>ปโหลดไฟล</q-tooltip></q-btn
>
</template>
</q-file>
</div>
</div>
</q-card>

View file

@ -134,7 +134,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
{
name: "positionType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "positionType",
headerStyle: "font-size: 14px",
@ -143,7 +143,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
{
name: "level",
align: "left",
label: "ระดับ",
label: "ระดับตำแหน่ง",
sortable: true,
field: "level",
headerStyle: "font-size: 14px",

View file

@ -28,7 +28,7 @@ function closeDialog() {
>
<thead>
<tr>
<th class="text-center">หลกเกณฑในการพจารณาเลอนข</th>
<th class="text-center">หลกเกณฑในการพจารณาเลอนข </th>
<th class="text-center">หนงข</th>
<th class="text-center">ครงข</th>
<th class="text-center">ไมไดบการเลอนข</th>

View file

@ -112,7 +112,7 @@ function inputEdit(val: boolean) {
<template>
<q-dialog v-model="modal" persistent>
<q-card class="col-12" style="width: 30%">
<Header :tittle="`ย้ายขั้น`" :close="close" />
<Header :tittle="`เลื่อนขั้น`" :close="close" />
<q-separator />
<q-card-section class="scroll" style="max-height: 70vh">

View file

@ -131,7 +131,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "result",
align: "center",
label: "ผลการประเมินฯ",
label: "ผลการประเมิน ฯ",
sortable: false,
field: "result",
headerStyle: "font-size: 14px",

View file

@ -28,7 +28,7 @@ function closeDialog() {
>
<thead>
<tr>
<th class="text-center">หลกเกณฑในการพจารณาเลอนข</th>
<th class="text-center">หลกเกณฑในการพจารณาเลอนข </th>
<th class="text-center">หนงข</th>
<th class="text-center">ครงข</th>
<th class="text-center">ไมไดบการเลอนข</th>

View file

@ -118,7 +118,7 @@ function inputEdit(val: boolean) {
<template>
<q-dialog v-model="modal" persistent>
<q-card class="col-12" style="width: 30%">
<Header :tittle="`ย้ายขั้น`" :close="close" />
<Header :tittle="`เลื่อนขั้น`" :close="close" />
<q-separator />
<q-card-section class="scroll" style="max-height: 70vh">

View file

@ -79,7 +79,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "posType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: false,
field: "posType",
headerStyle: "font-size: 14px",

View file

@ -65,7 +65,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "posType",
align: "left",
label: "ตำแหน่งประเภท",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "posType",
headerStyle: "font-size: 14px",
@ -119,7 +119,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "result",
align: "center",
label: "ผลการประเมินฯ",
label: "ผลการประเมิน ฯ",
sortable: false,
field: "result",
headerStyle: "font-size: 14px",

View file

@ -127,6 +127,8 @@ watch(
() => {
if (modal.value && props.isStatusEdit) {
fetchSalaryDetail(props.data.id);
} else {
isReadonly.value = false;
}
}
);

View file

@ -94,7 +94,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "groupRateHigh",
align: "left",
label: "อัตราค่าจ้างสูงกว่าฯ กลุ่มบัญชีค่าจ่าง",
label: "อัตราค่าจ้างสูงกว่า ฯ กลุ่มบัญชีค่าจ่าง",
sortable: true,
field: "groupRateHigh",
headerStyle: "font-size: 14px",
@ -103,7 +103,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "rateHighMax",
align: "left",
label: "อัตราค่าจ้างสูงกว่าฯ ขั้นสูงใหม่",
label: "อัตราค่าจ้างสูงกว่า ฯ ขั้นสูงใหม่",
sortable: true,
field: "rateHighMax",
headerStyle: "font-size: 14px",

View file

@ -66,11 +66,11 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
{
name: "date",
name: "startDate",
align: "left",
label: "วันที่มีผลบังคับใช้",
sortable: true,
field: "date",
field: "startDate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -85,7 +85,12 @@ const columns = ref<QTableProps["columns"]>([
},
]);
const rows = ref<EmployeeSalary[]>([]);
const visibleColumns = ref<string[]>(["name", "group", "date", "isActive"]);
const visibleColumns = ref<string[]>([
"name",
"group",
"startDate",
"isActive",
]);
/** List Mune*/
const itemMenu = ref<ItemsMenu[]>([
@ -229,8 +234,8 @@ function onClickDelete(id: string) {
/** function เปิด dialog เพิ่มผังบัญชีค่าจ้างลูกจ้างประจำ*/
function onClickAdd() {
modalDialogEmployeeChart.value = true;
isStatusEdit.value = false;
modalDialogEmployeeChart.value = true;
}
/** functionn fetch ข้อมูลรายการหน้าแรก*/
@ -324,7 +329,7 @@ onMounted(() => {
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'date'">
<div v-if="col.name === 'startDate'">
{{ col.value ? date2Thai(col.value) : "-" }}
</div>
<div v-else-if="col.name === 'group'">

View file

@ -1,5 +1,6 @@
interface DataPersonReq {
id: string;
profileId?: string;
type: string;
amount: number;
child1: string;
@ -29,5 +30,7 @@ interface DataPersonReq {
prefix: string;
root: string;
rootId: string;
isSpecial?: boolean;
rank?: string | null;
}
export type { DataPersonReq };

Some files were not shown because too many files have changed in this diff Show more