Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop

This commit is contained in:
Kittapath 2024-07-09 14:53:31 +07:00
commit 3437c7c2af
22 changed files with 746 additions and 431 deletions

View file

@ -83,4 +83,10 @@ export default {
kpiSendToGet: (id: string) => `${kpiEvaluationUser}/reason/${id}`, kpiSendToGet: (id: string) => `${kpiEvaluationUser}/reason/${id}`,
openPoint: (id: string) => `${kpiEvaluationUser}/open/${id}`, openPoint: (id: string) => `${kpiEvaluationUser}/open/${id}`,
/**
*
*/
evaluationUser: `${KpiUser}/evaluation/list`,
evaluationUserDone: `${KpiUser}/evaluation/done/kp7`,
}; };

View file

@ -567,6 +567,11 @@ const menuList = readonly<any[]>([
path: "KPIList", path: "KPIList",
role: "evaluateKPI", role: "evaluateKPI",
}, },
{
label: "ประกาศผล",
path: "KPIResults",
role: "evaluateKPI",
},
{ {
label: "รายงาน", label: "รายงาน",
path: "KPIReport", path: "KPIReport",

View file

@ -1,21 +1,44 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, watch } from "vue"; import { ref, watch } from "vue";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
/**
* import Type
*/
import type { QTableProps } from "quasar"; import type { QTableProps } from "quasar";
import type { HistoryPos } from "@/modules/02_organizationalNew/interface/response/organizational"; import type { HistoryPos } from "@/modules/02_organizationalNew/interface/response/organizational";
/**
* import Components
*/
import Header from "@/components/DialogHeader.vue"; import Header from "@/components/DialogHeader.vue";
/**
* import Store
*/
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
import { useOrganizational } from "@/modules/02_organizationalNew/store/organizational"; import { useOrganizational } from "@/modules/02_organizationalNew/store/organizational";
/** Use*/
const store = useOrganizational(); const store = useOrganizational();
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
const $q = useQuasar(); const $q = useQuasar();
const modal = defineModel<boolean>("modal", { required: true });
/**
* props
*/
const modal = defineModel<boolean>("modal", { required: true });
const props = defineProps({
rowId: {
type: String,
},
});
/**
* Table
*/
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{ {
name: "no", name: "no",
@ -26,6 +49,15 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
}, },
{
name: "fullname",
align: "left",
label: "ชื่อคนครอง",
sortable: true,
field: "fullname",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{ {
name: "orgShortName", name: "orgShortName",
align: "left", align: "left",
@ -35,14 +67,6 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
}, },
{
name: "lastUpdatedAt",
align: "left",
label: "วันที่แก้ไข",
field: "lastUpdatedAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{ {
name: "posMasterNoPrefix", name: "posMasterNoPrefix",
align: "left", align: "left",
@ -70,29 +94,66 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
}, },
]); {
const rows = ref<any>([]); name: "position",
align: "left",
const props = defineProps({ label: "ตำแแหน่ง",
rowId: { sortable: true,
type: String, field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posType",
align: "left",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "posType",
format(val, row) {
let name = "";
if (row.posType && row.position) {
name = `${row.posType} (${row.position})`;
} else if (row.posType) {
name = `${row.posType}`;
} else if (row.position) {
name = `(${row.position})`;
} else name = "-";
return name;
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
}, },
});
async function fetchHistoryPos(id: string) { {
name: "posExecutive",
align: "left",
label: "ตำแหน่งทางการบริหาร",
sortable: true,
field: "posExecutive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "lastUpdatedAt",
align: "left",
label: "วันที่แก้ไข",
field: "lastUpdatedAt",
format(val, row) {
return date2Thai(val);
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
const rows = ref<HistoryPos[]>([]);
function fetchHistoryPos(id: string) {
showLoader(); showLoader();
await http http
.get(config.API.orgPosHistory(id)) .get(config.API.orgPosHistory(id))
.then((res) => { .then((res) => {
const data: HistoryPos[] = res.data.result; const data: HistoryPos[] = res.data.result;
const list = data.map((e: HistoryPos) => ({ rows.value = data;
...e,
lastUpdatedAt: e.lastUpdatedAt ? date2Thai(e.lastUpdatedAt) : "-",
posMasterNoPrefix: e.posMasterNoPrefix ?? "-",
posMasterNo: e.posMasterNo ?? "-",
posMasterNoSuffix: e.posMasterNoSuffix ?? "-",
}));
rows.value = list;
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
@ -102,6 +163,9 @@ async function fetchHistoryPos(id: string) {
}); });
} }
/**
* callback function ทำงานเม modal === true
*/
watch( watch(
() => modal.value, () => modal.value,
() => { () => {
@ -111,7 +175,7 @@ watch(
</script> </script>
<template> <template>
<q-dialog v-model="modal"> <q-dialog v-model="modal">
<q-card style="width: 700px; max-width: 80vw"> <q-card style="width: 1000px; max-width: 100vw">
<Header <Header
:tittle="'ประวัติตำแหน่ง'" :tittle="'ประวัติตำแหน่ง'"
:close=" :close="
@ -153,7 +217,7 @@ watch(
</div> </div>
<div v-else> <div v-else>
{{ col.value }} {{ col.value ?? "-" }}
</div> </div>
</q-td> </q-td>
</q-tr> </q-tr>

View file

@ -1706,52 +1706,50 @@ const fetchData = async () => {
.then((res) => { .then((res) => {
let data = res.data.result; let data = res.data.result;
rows.value = []; rows.value = [];
data.map((e: any) => { rows.value = data.map((e: any) => ({
rows.value.push({ id: e.id,
id: e.id, date: new Date(e.date),
date: new Date(e.date), amount: e.amount,
amount: e.amount, positionSalaryAmount: e.positionSalaryAmount,
positionSalaryAmount: e.positionSalaryAmount, mouthSalaryAmount: e.mouthSalaryAmount,
mouthSalaryAmount: e.mouthSalaryAmount, oc: e.oc,
oc: e.oc, ocId: e.ocId,
ocId: e.ocId, position: e.position,
position: e.position, positionName: e.positionName,
positionName: e.positionName, positionId:
positionId: e.positionId !== "00000000-0000-0000-0000-000000000000"
e.positionId !== "00000000-0000-0000-0000-000000000000" ? e.positionId
? e.positionId : "",
: "", posNo: e.posNo,
posNo: e.posNo, posNoId:
posNoId: e.posNoId !== "00000000-0000-0000-0000-000000000000"
e.posNoId !== "00000000-0000-0000-0000-000000000000" ? e.posNoId
? e.posNoId : "",
: "", positionLine: e.positionLine,
positionLine: e.positionLine, positionLineName: e.positionLineName,
positionLineName: e.positionLineName, positionLineId: e.positionLineId,
positionLineId: e.positionLineId, positionPathSide: e.positionPathSide,
positionPathSide: e.positionPathSide, positionPathSideId: e.positionPathSideId,
positionPathSideId: e.positionPathSideId, positionPathSideName: e.positionPathSideName,
positionPathSideName: e.positionPathSideName, positionType: e.positionType,
positionType: e.positionType, positionTypeId: e.positionTypeId,
positionTypeId: e.positionTypeId, positionLevelId: e.positionLevelId,
positionLevelId: e.positionLevelId, positionLevel: e.positionLevel,
positionLevel: e.positionLevel, positionExecutive: e.positionExecutive,
positionExecutive: e.positionExecutive, positionExecutiveId: e.positionExecutiveId,
positionExecutiveId: e.positionExecutiveId, positionExecutiveName: e.positionExecutiveName,
positionExecutiveName: e.positionExecutiveName, positionExecutiveSide: e.positionExecutiveSide,
positionExecutiveSide: e.positionExecutiveSide, positionExecutiveSideId: e.positionExecutiveSideId,
positionExecutiveSideId: e.positionExecutiveSideId, salaryClass: e.salaryClass,
salaryClass: e.salaryClass, salaryRef: e.salaryRef,
salaryRef: e.salaryRef, salaryStatus: e.salaryStatus,
salaryStatus: e.salaryStatus, refCommandNo: e.refCommandNo,
refCommandNo: e.refCommandNo, createdFullName: e.createdFullName,
createdFullName: e.createdFullName, orgName: e.orgName,
orgName: e.orgName, agencyName: e.agencyName,
agencyName: e.agencyName, cLevel: e.cLevel,
cLevel: e.cLevel, createdAt: new Date(e.createdAt),
createdAt: new Date(e.createdAt), }));
});
});
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
@ -2257,46 +2255,44 @@ const clickHistory = async (row: RequestItemsObject) => {
.then((res) => { .then((res) => {
let data = res.data.result; let data = res.data.result;
rowsHistory.value = []; rowsHistory.value = [];
data.map((e: any) => { rowsHistory.value = data.map((e: any) => ({
rowsHistory.value.push({ id: e.id,
id: e.id, date: new Date(e.date),
date: new Date(e.date), amount: e.amount,
amount: e.amount, positionSalaryAmount: e.positionSalaryAmount,
positionSalaryAmount: e.positionSalaryAmount, mouthSalaryAmount: e.mouthSalaryAmount,
mouthSalaryAmount: e.mouthSalaryAmount, oc: e.oc,
oc: e.oc, ocId: e.ocId,
ocId: e.ocId, position: e.position,
position: e.position, positionId: e.positionId,
positionId: e.positionId, positionName: e.positionName,
positionName: e.positionName, posNo: e.posNo,
posNo: e.posNo, posNoId: e.posNoId,
posNoId: e.posNoId, positionLine: e.positionLine,
positionLine: e.positionLine, positionLineName: e.positionLineName,
positionLineName: e.positionLineName, positionLineId: e.positionLineId,
positionLineId: e.positionLineId, positionPathSide: e.positionPathSide,
positionPathSide: e.positionPathSide, positionPathSideId: e.positionPathSideId,
positionPathSideId: e.positionPathSideId, positionPathSideName: e.positionPathSideName,
positionPathSideName: e.positionPathSideName, positionType: e.positionType,
positionType: e.positionType, positionTypeId: e.positionTypeId,
positionTypeId: e.positionTypeId, positionLevel: e.positionLevel,
positionLevel: e.positionLevel, positionLevelId: e.positionLevelId,
positionLevelId: e.positionLevelId, positionExecutive: e.positionExecutive,
positionExecutive: e.positionExecutive, positionExecutiveId: e.positionExecutiveId,
positionExecutiveId: e.positionExecutiveId, positionExecutiveName: e.positionExecutiveName,
positionExecutiveName: e.positionExecutiveName, positionExecutiveSide: e.positionExecutiveSide,
positionExecutiveSide: e.positionExecutiveSide, positionExecutiveSideId: e.positionExecutiveSideId,
positionExecutiveSideId: e.positionExecutiveSideId, salaryClass: e.salaryClass,
salaryClass: e.salaryClass, salaryStatus: e.salaryStatus,
salaryStatus: e.salaryStatus, salaryRef: e.salaryRef,
salaryRef: e.salaryRef, refCommandNo: e.refCommandNo,
refCommandNo: e.refCommandNo, createdFullName: e.createdFullName,
createdFullName: e.createdFullName, orgName: e.orgName,
orgName: e.orgName, agencyName: e.agencyName,
agencyName: e.agencyName, cLevel: e.cLevel,
cLevel: e.cLevel, createdAt: new Date(e.createdAt),
createdAt: new Date(e.createdAt), }));
});
});
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);

View file

@ -5,23 +5,43 @@ import { useRouter } from "vue-router";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
/** importType*/ /**
import type { DataOption } from "@/modules/04_registryNew/interface/index/Main"; * importType*
*/
import type { QTableProps } from "quasar";
import type { QForm } from "quasar"; import type { QForm } from "quasar";
import type { DataOption } from "@/modules/04_registryNew/interface/index/Main";
import type {
HistoryPos,
Position,
} from "@/modules/04_registryNew/interface/response/History";
/** importStore*/ /**
* import components
*/
import DialogHeader from "@/components/DialogHeader.vue";
/**
* importStore
*/
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
/** use*/ /**
* use
*/
const myForm = ref<QForm>(); const myForm = ref<QForm>();
const router = useRouter(); const router = useRouter();
const $q = useQuasar(); const $q = useQuasar();
const { showLoader, hideLoader, messageError, date2Thai, dialogMessageNotify } = const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
useCounterMixin();
/**props*/ /**
* props
*/
const modal = defineModel<boolean>("modal", { required: true }); const modal = defineModel<boolean>("modal", { required: true });
/**
* วแปร
*/
const employeeClass = ref<string>(""); const employeeClass = ref<string>("");
const typeKeyword = ref<string>(""); const typeKeyword = ref<string>("");
const Keyword = ref<string>(""); const Keyword = ref<string>("");
@ -35,7 +55,12 @@ const typeKeywordOps = ref<DataOption[]>([
{ id: "position", name: "ตำแหน่ง" }, { id: "position", name: "ตำแหน่ง" },
]); ]);
const positionOps = ref<DataOption[]>([]); const positionOps = ref<DataOption[]>([]);
const columns = ref<any["columns"]>([ const options = ref<DataOption[]>([]);
/**
* Table
*/
const columns = ref<QTableProps["columns"]>([
{ {
name: "no", name: "no",
label: "ลำดับ", label: "ลำดับ",
@ -81,18 +106,26 @@ const columns = ref<any["columns"]>([
align: "left", align: "left",
label: "วันที่ถือครอง", label: "วันที่ถือครอง",
field: "date", field: "date",
format: (val, row) => `${date2Thai(val)}`,
headerStyle: "font-size: 14px", headerStyle: "font-size: 14px",
style: "font-size: 14px", style: "font-size: 14px",
}, },
]); ]);
const rows = ref<any>([]); const rows = ref<HistoryPos[]>([]);
/**
* function fetch อมลตำแหน าราชการ
*/
function fecthPositionOfficer() { function fecthPositionOfficer() {
http http
.get(config.API.listPositionPathHistory) .get(config.API.listPositionPathHistory)
.then((res) => { .then((res) => {
let data = res.data.result.items; let data = res.data.result.items;
positionOps.value = data.map((e: any) => ({ id: e.id, name: e.name }));
positionOps.value = data.map((e: Position) => ({
id: e.id,
name: e.name,
}));
options.value = positionOps.value; options.value = positionOps.value;
}) })
.catch((err) => { .catch((err) => {
@ -100,12 +133,20 @@ function fecthPositionOfficer() {
}); });
} }
/**
* function fetch อมลตำแหน กจางประจำ
*/
function fetchPositionPerm() { function fetchPositionPerm() {
http http
.get(config.API.listPositionEmployeePositionHistory) .get(config.API.listPositionEmployeePositionHistory)
.then((res) => { .then((res) => {
let data = res.data.result.items; let data = res.data.result.items;
positionOps.value = data.map((e: any) => ({ id: e.id, name: e.name })); console.log(data);
positionOps.value = data.map((e: Position) => ({
id: e.id,
name: e.name,
}));
options.value = positionOps.value; options.value = positionOps.value;
}) })
.catch((err) => { .catch((err) => {
@ -113,12 +154,20 @@ function fetchPositionPerm() {
}); });
} }
/**
* function เปลยนประเภท
*/
function changeEmployeeClass() { function changeEmployeeClass() {
typeKeyword.value = ""; typeKeyword.value = "";
Keyword.value = ""; Keyword.value = "";
positionKeyword.value = ""; positionKeyword.value = "";
rows.value = []; rows.value = [];
} }
/**
* function เลอกฟลดจะคนหา
* @param typeKeyword ประเภทฟลด
*/
function selectTypeKeyword(typeKeyword: string) { function selectTypeKeyword(typeKeyword: string) {
positionOps.value = []; positionOps.value = [];
positionKeyword.value = ""; positionKeyword.value = "";
@ -131,6 +180,10 @@ function selectTypeKeyword(typeKeyword: string) {
} }
} }
/**
* function นหาประวอครองตำแหน
* @param type ประเภทขาราชการ
*/
function clickSearch(type: string) { function clickSearch(type: string) {
myForm.value!.validate().then((result: boolean) => { myForm.value!.validate().then((result: boolean) => {
if (result) { if (result) {
@ -151,16 +204,15 @@ function clickSearch(type: string) {
.then((res) => { .then((res) => {
let data = res.data.result; let data = res.data.result;
if (data.length !== 0) { if (data.length !== 0) {
rows.value = data.map((e: any) => ({ rows.value = data.map((e: HistoryPos) => ({
id: e.id, id: e.id,
citizenId: e.citizenId, citizenId: e.citizenId,
name: e.fullName, name: e.fullName,
posNo: e.posNo, posNo: e.posNo,
position: e.position, position: e.position,
date: date2Thai(e.date), date: e.date,
})); }));
} else { } else {
dialogMessageNotify($q, "ไม่มีข้อมูลที่ต้องการค้นหา");
rows.value = []; rows.value = [];
} }
}) })
@ -174,8 +226,13 @@ function clickSearch(type: string) {
} }
}); });
} }
const options = ref<any>([]);
function filterFn(val: string, update: any) { /**
* function นหาขอม Optiion
* @param val คำคนหา
* @param update function
*/
function filterFn(val: string, update: Function) {
if (val === "") { if (val === "") {
update(() => { update(() => {
options.value = positionOps.value; options.value = positionOps.value;
@ -189,6 +246,11 @@ function filterFn(val: string, update: any) {
}); });
} }
} }
/**
* function redirect ไปทะเบยนประว
* @param id
*/
function clickRedirect(id: string) { function clickRedirect(id: string) {
const url = const url =
employeeClass.value === "officer" employeeClass.value === "officer"
@ -197,42 +259,32 @@ function clickRedirect(id: string) {
router.push(`${url}/${id}`); router.push(`${url}/${id}`);
} }
const paging = ref<boolean>(true); /**
const pagination = ref({ * function popup
sortBy: "order", */
descending: false, function closeDialog() {
page: 1, modal.value = false;
rowsPerPage: 10, employeeClass.value = "";
}); typeKeyword.value = "";
const paginationLabel = (start: number, end: number, total: number) => { Keyword.value = "";
if (paging.value == true) return " " + start + "-" + end + " ใน " + total; positionKeyword.value = "";
else return start + "-" + end + " ใน " + total; rows.value = [];
}; }
</script> </script>
<template> <template>
<q-dialog v-model="modal"> <q-dialog v-model="modal">
<q-card style="width: 850px; max-width: 80vw"> <q-card style="width: 850px; max-width: 80vw">
<q-toolbar> <DialogHeader :tittle="'ประวัติถือครองตำแหน่ง'" :close="closeDialog" />
<q-toolbar-title class="text-subtitle2 text-bold"
>ประวอครองตำแหน</q-toolbar-title
>
<q-btn
icon="close"
unelevated
round
dense
v-close-popup
style="color: #ff8080; background-color: #ffdede"
/>
</q-toolbar>
<q-separator /> <q-separator />
<div class="dialog-card-contain"> <q-card-section class="q-pa-sm">
<q-card-section class="q-pa-sm"> <q-form ref="myForm">
<q-form ref="myForm"> <div class="col-12 bg-grey-2 q-pa-sm">
<div class="col-12 bg-grey-2 q-pa-sm"> <div class="col-12 row q-pb-sm q-col-gutter-sm items-center"></div>
<div class="q-col-gutter-xs row no-wrap"> <div class="q-col-gutter-xs row no-wrap">
<div class="col-4">
<q-select <q-select
hide-bottom-space hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]" :rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]"
@ -250,6 +302,8 @@ const paginationLabel = (start: number, end: number, total: number) => {
input-debounce="0" input-debounce="0"
@update:model-value="changeEmployeeClass" @update:model-value="changeEmployeeClass"
/> />
</div>
<div class="col-3">
<q-select <q-select
hide-bottom-space hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือก ฟิลด์ที่จะค้น'}`]" :rules="[(val:string) => !!val || `${'กรุณาเลือก ฟิลด์ที่จะค้น'}`]"
@ -267,8 +321,10 @@ const paginationLabel = (start: number, end: number, total: number) => {
input-debounce="0" input-debounce="0"
@update:model-value="selectTypeKeyword(typeKeyword)" @update:model-value="selectTypeKeyword(typeKeyword)"
/> />
</div>
<div class="col" v-if="typeKeyword === 'no'">
<q-input <q-input
v-if="typeKeyword === 'no'"
borderless borderless
outlined outlined
dense dense
@ -278,8 +334,10 @@ const paginationLabel = (start: number, end: number, total: number) => {
:rules="[(val:string) => !!val || `${'กรุณากรอก ตำแหน่งเลขที่'}`]" :rules="[(val:string) => !!val || `${'กรุณากรอก ตำแหน่งเลขที่'}`]"
hide-bottom-space hide-bottom-space
/> />
</div>
<div class="col" v-if="typeKeyword === 'position'">
<q-select <q-select
v-if="typeKeyword === 'position'"
hide-bottom-space hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือก ตำแหน่ง'}`]" :rules="[(val:string) => !!val || `${'กรุณาเลือก ตำแหน่ง'}`]"
outlined outlined
@ -304,119 +362,78 @@ const paginationLabel = (start: number, end: number, total: number) => {
</q-item> </q-item>
</template></q-select </template></q-select
> >
<q-space />
<div class="col-2 row">
<q-btn
dense
color="primary"
icon="mdi-magnify"
label="ค้นหา"
class="col-12"
@click="clickSearch(employeeClass)"
/>
</div>
</div> </div>
<q-space />
<q-btn
color="primary"
icon="mdi-magnify"
label="ค้นหา"
@click="clickSearch(employeeClass)"
/>
</div> </div>
</q-form> </div>
</q-card-section>
</div>
<div class="col-12 q-px-sm q-pb-sm"> <div class="col-12 q-mt-sm">
<q-table <d-table
flat flat
dense dense
bordered bordered
:rows="rows" :rows="rows"
:columns="columns" :columns="columns"
row-key="order" row-key="order"
class="custom-header-table" no-data-label="ไม่มีข้อมูล"
no-data-label="ไม่มีข้อมูล" >
:pagination-label="paginationLabel" <template v-slot:header="props">
v-model:pagination="pagination" <q-tr :props="props">
> <q-th
<template v-slot:header="props"> v-for="col in props.cols"
<q-tr :props="props"> :key="col.name"
<q-th v-for="col in props.cols" :key="col.name" :props="props"> :props="props"
<div class="text-grey-7 text-weight-medium"> >
<span class="row">{{ col.label }}</span> <div class="text-grey-7 text-weight-medium">
</div> <span class="row">{{ col.label }}</span>
</q-th> </div>
</q-tr> </q-th>
</template> </q-tr>
<template v-slot:body="props"> </template>
<q-tr :props="props" class="cursor-pointer"> <template v-slot:body="props">
<q-td key="no" :props="props"> {{ props.rowIndex + 1 }}</q-td> <q-tr :props="props" class="cursor-pointer">
<q-td key="order" :props="props">{{ props.row.order }} </q-td> <q-td
<q-td v-for="col in props.cols"
key="citizenId" :key="col.name"
class="text-primary" :props="props"
@click="clickRedirect(props.row.id)" >
:props="props" <div v-if="col.name === 'no'">
>{{ props.row.citizenId }}</q-td {{ props.rowIndex + 1 }}
> </div>
<q-td <div
key="name" v-else-if="col.name === 'citizenId'"
class="text-primary" class="text-primary"
@click="clickRedirect(props.row.id)" @click="clickRedirect(props.row.id)"
:props="props" >
>{{ props.row.name }}</q-td {{ props.row.citizenId ?? "-" }}
> </div>
<div
<q-td key="posNo" :props="props">{{ props.row.posNo }}</q-td> v-else-if="col.name === 'name'"
<q-td key="position" :props="props">{{ class="text-primary"
props.row.position @click="clickRedirect(props.row.id)"
}}</q-td> >
<q-td key="date" :props="props">{{ props.row.date }}</q-td> {{ props.row.name ?? "-" }}
</q-tr> </div>
</template> <div v-else class="table_ellipsis2">
<template v-slot:pagination="scope"> {{ col.value ? col.value : "-" }}
<q-pagination </div>
v-model="pagination.page" </q-td>
color="primary" </q-tr>
:max="scope.pagesNumber" </template>
:max-pages="5" </d-table>
size="sm" </div>
boundary-links </q-form>
direction-links </q-card-section>
></q-pagination>
</template>
</q-table>
</div>
<!-- <q-card-actions align="right">
<q-btn flat label="OK" color="primary" v-close-popup />
</q-card-actions> -->
</q-card> </q-card>
</q-dialog> </q-dialog>
</template> </template>
<style scoped> <style scoped></style>
.custom-header-table {
max-height: 64vh;
.q-table tr:nth-child(odd) td {
background: white;
}
.q-table tr:nth-child(even) td {
background: #f8f8f8;
}
.q-table thead tr {
background: #ecebeb;
}
.q-table thead tr th {
position: sticky;
z-index: 1;
}
.q-table thead tr:last-child th {
top: 48px;
}
.q-table thead tr:first-child th {
top: 0;
}
}
</style>

View file

@ -0,0 +1,23 @@
interface HistoryPos {
citizenId: string;
date: string | Date;
fullName: string;
id: string;
posNo: string;
position: string;
}
interface Position {
createdAt: string;
createdFullName: string;
createdUserId: string;
id: string;
isActive: boolean;
lastUpdateFullName: string;
lastUpdateUserId: "";
lastUpdatedAt: string;
name: string;
note: string;
}
export type { HistoryPos, Position };

View file

@ -299,6 +299,8 @@ function deleteProductivitys(item: number) {
} }
} }
/** get ข้อมูล */ /** get ข้อมูล */
async function getUser() { async function getUser() {
await http await http
@ -980,17 +982,18 @@ watch(knowledge.value, () => {
* @param update fn * @param update fn
*/ */
function filterFnCaretaker(val: string, update: any) { function filterFnCaretaker(val: string, update: any) {
const dataFilter = filtermantor(OPcaretaker.value, [caretaker2.value]).filter(
(i: any) => i.id !== chairman.value.id
);
if (val == "") { if (val == "") {
update(() => { update(() => {
optionCaretaker.value = filtermantor(OPcaretaker.value, [ optionCaretaker.value = dataFilter;
caretaker2.value,
]);
}); });
} else { } else {
update(() => { update(() => {
optionCaretaker.value = filtermantor(OPcaretaker.value, [ optionCaretaker.value = dataFilter.filter(
caretaker2.value, (e: any) => e.name.search(val) !== -1
]).filter((e: any) => e.name.search(val) !== -1); );
}); });
} }
} }
@ -1002,17 +1005,18 @@ function filterFnCaretaker(val: string, update: any) {
*/ */
function filterFnCaretaker2(val: string, update: any) { function filterFnCaretaker2(val: string, update: any) {
const dataFilter = filtermantor(OPcaretaker.value, [caretaker1.value]).filter(
(i: any) => i.id !== chairman.value.id
);
if (val == "") { if (val == "") {
update(() => { update(() => {
optionCaretaker2.value = filtermantor(OPcaretaker.value, [ optionCaretaker2.value = dataFilter;
caretaker1.value,
]);
}); });
} else { } else {
update(() => { update(() => {
optionCaretaker2.value = filtermantor(OPcaretaker.value, [ optionCaretaker2.value = dataFilter.filter(
caretaker1.value, (e: any) => e.name.search(val) !== -1
]).filter((e: any) => e.name.search(val) !== -1); );
}); });
} }
} }
@ -1024,13 +1028,16 @@ function filterFnCaretaker2(val: string, update: any) {
*/ */
function filterFnCommander(val: string, update: any) { function filterFnCommander(val: string, update: any) {
const dataFilter = OPcommander.value.filter(
(i: any) => i.id !== chairman.value.id
);
if (val == "") { if (val == "") {
update(() => { update(() => {
OPcommanderFn.value = OPcommander.value; OPcommanderFn.value = dataFilter;
}); });
} else { } else {
update(() => { update(() => {
OPcommanderFn.value = OPcommander.value.filter( OPcommanderFn.value = dataFilter.filter(
(e: any) => e.name.search(val) !== -1 (e: any) => e.name.search(val) !== -1
); );
}); });
@ -1044,13 +1051,19 @@ function filterFnCommander(val: string, update: any) {
*/ */
function filterFnChairman(val: string, update: any) { function filterFnChairman(val: string, update: any) {
const dataFilter = OPchairman.value.filter(
(i: any) =>
i.id !== caretaker1.value.id &&
i.id !== caretaker2.value.id &&
i.id !== commander.value.id
);
if (val == "") { if (val == "") {
update(() => { update(() => {
OPchairmanFn.value = OPchairman.value; OPchairmanFn.value = dataFilter;
}); });
} else { } else {
update(() => { update(() => {
OPchairmanFn.value = OPchairman.value.filter( OPchairmanFn.value = dataFilter.filter(
(e: any) => e.name.search(val) !== -1 (e: any) => e.name.search(val) !== -1
); );
}); });

View file

@ -972,39 +972,37 @@ const fetchData = async () => {
.then((res) => { .then((res) => {
let data = res.data.result; let data = res.data.result;
rows.value = []; rows.value = [];
data.map((e: ResponseObject) => { rows.value = data.map((e: ResponseObject) => ({
rows.value.push({ id: e.id,
id: e.id, date: new Date(e.date),
date: new Date(e.date), amount: e.amount,
amount: e.amount, positionSalaryAmount: e.positionSalaryAmount,
positionSalaryAmount: e.positionSalaryAmount, mouthSalaryAmount: e.mouthSalaryAmount,
mouthSalaryAmount: e.mouthSalaryAmount, oc: e.oc,
oc: e.oc, ocId: e.ocId,
ocId: e.ocId, position: e.position,
position: e.position, positionId: e.positionId,
positionId: e.positionId, posNo: e.posNo,
posNo: e.posNo, posNoId: e.posNoId,
posNoId: e.posNoId, positionLine: e.positionLine,
positionLine: e.positionLine, positionLineId: e.positionLineId,
positionLineId: e.positionLineId, positionPathSide: e.positionPathSide,
positionPathSide: e.positionPathSide, positionPathSideId: e.positionPathSideId,
positionPathSideId: e.positionPathSideId, positionType: e.positionType,
positionType: e.positionType, positionTypeId: e.positionTypeId,
positionTypeId: e.positionTypeId, positionLevel: e.positionLevel,
positionLevel: e.positionLevel, positionLevelId: e.positionLevelId,
positionLevelId: e.positionLevelId, positionExecutive: e.positionExecutive,
positionExecutive: e.positionExecutive, positionExecutiveId: e.positionExecutiveId,
positionExecutiveId: e.positionExecutiveId, positionExecutiveSide: e.positionExecutiveSide,
positionExecutiveSide: e.positionExecutiveSide, positionExecutiveSideId: e.positionExecutiveSideId,
positionExecutiveSideId: e.positionExecutiveSideId, salaryClass: e.salaryClass,
salaryClass: e.salaryClass, salaryRef: e.salaryRef,
salaryRef: e.salaryRef, salaryStatus: e.salaryStatus,
salaryStatus: e.salaryStatus, refCommandNo: e.refCommandNo,
refCommandNo: e.refCommandNo, createdFullName: e.createdFullName,
createdFullName: e.createdFullName, createdAt: new Date(e.createdAt),
createdAt: new Date(e.createdAt), }));
});
});
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
@ -1450,39 +1448,37 @@ const clickHistory = async (row: RequestItemsObject) => {
.then((res) => { .then((res) => {
let data = res.data.result; let data = res.data.result;
rowsHistory.value = []; rowsHistory.value = [];
data.map((e: ResponseObject) => { rowsHistory.value = data.map((e: ResponseObject) => ({
rowsHistory.value.push({ id: e.id,
id: e.id, date: new Date(e.date),
date: new Date(e.date), amount: e.amount,
amount: e.amount, positionSalaryAmount: e.positionSalaryAmount,
positionSalaryAmount: e.positionSalaryAmount, mouthSalaryAmount: e.mouthSalaryAmount,
mouthSalaryAmount: e.mouthSalaryAmount, oc: e.oc,
oc: e.oc, ocId: e.ocId,
ocId: e.ocId, position: e.position,
position: e.position, positionId: e.positionId,
positionId: e.positionId, posNo: e.posNo,
posNo: e.posNo, posNoId: e.posNoId,
posNoId: e.posNoId, positionLine: e.positionLine,
positionLine: e.positionLine, positionLineId: e.positionLineId,
positionLineId: e.positionLineId, positionPathSide: e.positionPathSide,
positionPathSide: e.positionPathSide, positionPathSideId: e.positionPathSideId,
positionPathSideId: e.positionPathSideId, positionType: e.positionType,
positionType: e.positionType, positionTypeId: e.positionTypeId,
positionTypeId: e.positionTypeId, positionLevel: e.positionLevel,
positionLevel: e.positionLevel, positionLevelId: e.positionLevelId,
positionLevelId: e.positionLevelId, positionExecutive: e.positionExecutive,
positionExecutive: e.positionExecutive, positionExecutiveId: e.positionExecutiveId,
positionExecutiveId: e.positionExecutiveId, positionExecutiveSide: e.positionExecutiveSide,
positionExecutiveSide: e.positionExecutiveSide, positionExecutiveSideId: e.positionExecutiveSideId,
positionExecutiveSideId: e.positionExecutiveSideId, salaryClass: e.salaryClass,
salaryClass: e.salaryClass, salaryRef: e.salaryRef,
salaryRef: e.salaryRef, refCommandNo: e.refCommandNo,
refCommandNo: e.refCommandNo, salaryStatus: e.salaryStatus,
salaryStatus: e.salaryStatus, createdFullName: e.createdFullName,
createdFullName: e.createdFullName, createdAt: new Date(e.createdAt),
createdAt: new Date(e.createdAt), }));
});
});
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);

View file

@ -899,6 +899,7 @@ const getClass = (val: boolean) => {
:rules="[(val) => !!val || `${'กรุณากรอก พ.ศ.'}`]" :rules="[(val) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
:label="`${'พ.ศ.'}`" :label="`${'พ.ศ.'}`"
dense dense
hide-bottom-space
outlined outlined
> >
</q-input> </q-input>
@ -927,6 +928,7 @@ const getClass = (val: boolean) => {
:class="getClass(true)" :class="getClass(true)"
outlined outlined
dense dense
hide-bottom-space
class="full-width datepicker" class="full-width datepicker"
:model-value=" :model-value="
dateCommand != null ? date2Thai(dateCommand) : null dateCommand != null ? date2Thai(dateCommand) : null

View file

@ -243,7 +243,7 @@ onMounted(async () => {
class="q-mr-sm" class="q-mr-sm"
@click="router.go(-1)" @click="router.go(-1)"
/> />
ตราคาจาง กลมท{{ groupSalary }} ตราคาจางของ กลมท {{ groupSalary }}
</div> </div>
</div> </div>
<q-card flat bordered class="q-pa-md"> <q-card flat bordered class="q-pa-md">

View file

@ -240,7 +240,7 @@ watch([() => formQuery.page, () => formQuery.pageSize], async () => {
class="q-mr-sm" class="q-mr-sm"
@click="router.go(-1)" @click="router.go(-1)"
/> />
ตราเงนเดอน ของ{{ posType }} ตราเงนเดอนของ {{ posType }}
</div> </div>
</div> </div>
<q-card flat bordered class="q-pa-md"> <q-card flat bordered class="q-pa-md">

View file

@ -171,11 +171,17 @@ function getData() {
developmentMethod.value = data.developEvaluator; developmentMethod.value = data.developEvaluator;
developmentPeriod.value = data.timeEvaluator; developmentPeriod.value = data.timeEvaluator;
evaluatorComment.value = data.reasonEvaluator; evaluatorComment.value = data.reasonEvaluator;
superiorCommentCheck.value = data.isReasonCommander.toString(); superiorCommentCheck.value =
data.isReasonCommander != null
? data.isReasonCommander.toString()
: null;
superiorComment.value = data.reasonCommander; superiorComment.value = data.reasonCommander;
additionalSuperiorCheck.value = data.isReasonCommanderHigh.toString(); additionalSuperiorCheck.value =
data.isReasonCommanderHigh != null
? data.isReasonCommanderHigh.toString()
: null;
additionalSuperiorComment.value = data.reasonCommanderHigh; additionalSuperiorComment.value = data.reasonCommanderHigh;
result1.value = data.totalPoint1; result1.value = data.totalPoint1;
result2.value = data.totalPoint2_1 + data.totalPoint2_2; result2.value = data.totalPoint2_1 + data.totalPoint2_2;

View file

@ -863,6 +863,7 @@ const title = computed(() => {
autoApply autoApply
:enableTimePicker="false" :enableTimePicker="false"
week-start="0" week-start="0"
@update:model-value="formDetail.endDate = null"
> >
<template #year="{ year }">{{ year + 543 }}</template> <template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{ <template #year-overlay-value="{ value }">{{
@ -906,6 +907,7 @@ const title = computed(() => {
autoApply autoApply
:enableTimePicker="false" :enableTimePicker="false"
week-start="0" week-start="0"
:min-date="formDetail.startDate"
> >
<template #year="{ year }">{{ year + 543 }}</template> <template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{ <template #year-overlay-value="{ value }">{{

View file

@ -349,7 +349,7 @@ onMounted(() => {
<d-table <d-table
ref="table" ref="table"
:columns="columns" :columns="columns"
:rows="rows.length !== 0 ? rows[item.id]:[]" :rows="rows[item.id].length !== 0 ? rows[item.id]:[]"
row-key="id" row-key="id"
flat flat
bordered bordered

View file

@ -0,0 +1,12 @@
<script setup lang="ts">
/**
* props
*/
const tab = defineModel<string>("tab", { required: true });
</script>
<template>
{{ tab }}
</template>
<style scoped></style>

View file

@ -14,6 +14,7 @@ const listPage = () => import("@/modules/14_KPI/views/list.vue");
const detailPage = () => import("@/modules/14_KPI/views/detail.vue"); const detailPage = () => import("@/modules/14_KPI/views/detail.vue");
const reportPage = () => import("@/modules/14_KPI/views/report.vue"); const reportPage = () => import("@/modules/14_KPI/views/report.vue");
const detailView = () => import("@/modules/14_KPI/views/detailView.vue"); const detailView = () => import("@/modules/14_KPI/views/detailView.vue");
const ResultsView = () => import("@/modules/14_KPI/views/resultsMain.vue");
export default [ export default [
{ {
@ -68,4 +69,15 @@ export default [
Role: "evaluateKPI", Role: "evaluateKPI",
}, },
}, },
{
path: "/KPI/results",
name: "KPIResults",
component: ResultsView,
meta: {
Auth: true,
Key: [1.1],
Role: "evaluateKPI",
},
},
]; ];

View file

@ -0,0 +1,99 @@
<script setup lang="ts">
import { ref, onMounted, watch } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
/**
* import type
*/
import type { ItemsTab } from "@/modules/14_KPI/interface/index/Main";
/**
* import components
*/
import TableResults from "@/modules/14_KPI/components/results/tableResults.vue";
/**
* importStore
*/
import { useCounterMixin } from "@/stores/mixin";
/**
* use
*/
const $q = useQuasar();
const { dialogRemove, messageError, showLoader, hideLoader, success } =
useCounterMixin();
/**
* วแปร
*/
const tab = ref<string>("COMPLETE");
const tabItems = ref<ItemsTab[]>([
{ name: "COMPLETE", label: " รอประกาศผล" },
{ name: "KP7", label: "ประกาศผลแล้ว" },
]);
const page = ref<number>(1);
const pageSize = ref<number>(10);
function fetcDatahList() {
showLoader();
http
.post(config.API.evaluationUser, {
status: tab.value,
page: page.value,
pageSize: pageSize.value,
})
.then((res) => {})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
watch(tab, () => {
page.value = 1;
pageSize.value = 10;
fetcDatahList();
});
onMounted(() => {
fetcDatahList();
});
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">ประกาศผล</div>
<q-card flast bordered>
<q-tabs
v-model="tab"
dense
align="left"
inline-label
class="bg-white text-grey"
active-color="primary"
indicator-color="primary"
>
<div v-for="item in tabItems">
<q-tab :name="item.name" :label="item.label" />
</div>
</q-tabs>
<q-separator />
<q-tab-panels v-model="tab" animated class="shadow-2 rounded-borders">
<q-tab-panel name="COMPLETE">
<TableResults :tab="tab" />
</q-tab-panel>
<q-tab-panel name="KP7">
<TableResults :tab="tab" />
</q-tab-panel>
</q-tab-panels>
</q-card>
</template>
<style scoped></style>

View file

@ -441,6 +441,21 @@ onMounted(() => {
<q-separator /> <q-separator />
<q-card-section > <q-card-section >
<div class="row q-col-gutter-sm"> <div class="row q-col-gutter-sm">
<div class="col-12">
<q-input
dense
outlined
class="inputgreen"
label="ชื่อตัวชี้วัด"
v-model="formIndicators.indicators"
hide-bottom-space
:rules="[
(val:string) =>
!!val || `${'กรุณากรอกชื่อตัวชี้วัด'}`,
]"
/>
</div>
<div class="col-6"> <div class="col-6">
<q-select <q-select
dense dense
@ -461,23 +476,9 @@ onMounted(() => {
]" ]"
/> />
</div> </div>
<div class="col-4">
<q-input
dense
outlined
class="inputgreen"
label="ชื่อตัวชี้วัด"
v-model="formIndicators.indicators"
hide-bottom-space
:rules="[
(val:string) =>
!!val || `${'กรุณากรอกชื่อตัวชี้วัด'}`,
]"
/>
</div>
<div class="col-2">
<div class="col-6">
<q-input <q-input
dense dense
outlined outlined

View file

@ -133,7 +133,7 @@ onMounted(() => {
<q-tab-panel name="Target"> <Target /></q-tab-panel> <q-tab-panel name="Target"> <Target /></q-tab-panel>
<q-tab-panel name="ProjectDetail" style="padding: 0px"> <ProjectDetail /> </q-tab-panel> <q-tab-panel name="ProjectDetail" style="padding: 0px"> <ProjectDetail /> </q-tab-panel>
<q-tab-panel name="FollowResult"> <FollowResult /> </q-tab-panel> <q-tab-panel name="FollowResult"> <FollowResult /> </q-tab-panel>
<q-tab-panel name="Other" style="padding: 0px"> <Other /> </q-tab-panel> <q-tab-panel name="Other" style="padding: 0px"> <Other :status="status"/> </q-tab-panel>
<q-tab-panel name="Record"> <Record /> </q-tab-panel> <q-tab-panel name="Record"> <Record /> </q-tab-panel>
</q-tab-panels> </q-tab-panels>
</div> </div>

View file

@ -23,6 +23,7 @@ const {
const route = useRoute(); const route = useRoute();
const projectId = ref<string>(route.params.id.toLocaleString()); const projectId = ref<string>(route.params.id.toLocaleString());
const status = defineModel<string>('status',{required:true})
const provinceOp = ref<DataOption[]>([]); const provinceOp = ref<DataOption[]>([]);
const provinceOpMain = ref<DataOption[]>([]); const provinceOpMain = ref<DataOption[]>([]);
const budgetOp = ref<DataOption[]>([ const budgetOp = ref<DataOption[]>([
@ -475,7 +476,7 @@ onMounted(() => {
reverse-fill-mask reverse-fill-mask
/> />
</div> </div>
<div class="col-3"> <div class="col-3" v-if="status == 'FINISH'">
<q-input <q-input
outlined outlined
dense dense

View file

@ -15,6 +15,11 @@ import { useDevelopmentDataStore } from "@/modules/15_development/store/developm
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
const other1 = ref<boolean>(false);
const other2 = ref<boolean>(false);
const otherInput1 = ref<string>("");
const otherInput2 = ref<string>("");
const $q = useQuasar(); const $q = useQuasar();
const store = useDevelopmentDataStore(); const store = useDevelopmentDataStore();
const route = useRoute(); const route = useRoute();
@ -161,7 +166,9 @@ async function onSubmit() {
projectModal: formData.projectModal, projectModal: formData.projectModal,
isBackPlanned: formData.isBackPlanned, isBackPlanned: formData.isBackPlanned,
isHoldPlanned: formData.isHoldPlanned, isHoldPlanned: formData.isHoldPlanned,
projectDayBackPlanned: formData.isBackPlanned ? formData.projectDayBackPlanned:null, projectDayBackPlanned: formData.isBackPlanned
? formData.projectDayBackPlanned
: null,
projectDayHoldPlanned: formData.projectDayHoldPlanned, projectDayHoldPlanned: formData.projectDayHoldPlanned,
projectNigthHoldPlanned: formData.projectNigthHoldPlanned, projectNigthHoldPlanned: formData.projectNigthHoldPlanned,
developmentProjectTechniquePlanneds: developmentProjectTechniquePlanneds:
@ -206,6 +213,15 @@ function updateSelected(data: DataStrategic, type: string) {
} }
} }
function checkOther(type: number, val: boolean) {
if(val == false){
if(type == 1){
otherInput1.value = ''
}else if(type == 2){
otherInput2.value = ''
}
}
}
/** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */ /** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */
onMounted(() => { onMounted(() => {
fetchData(); fetchData();
@ -232,7 +248,6 @@ onMounted(() => {
/> />
</div> </div>
<q-card bordered class="col-12 q-my-sm"> <q-card bordered class="col-12 q-my-sm">
<div <div
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-3 q-py-xs q-px-md" class="col-xs-12 col-sm-12 text-weight-medium bg-grey-3 q-py-xs q-px-md"
@ -285,7 +300,9 @@ onMounted(() => {
<q-item <q-item
clickable clickable
@click.stop="updateSelected(prop.node, '1')" @click.stop="updateSelected(prop.node, '1')"
:active="formData.strategyChildPlannedId == prop.node.id" :active="
formData.strategyChildPlannedId == prop.node.id
"
active-class="my-list-link text-primary text-weight-medium" active-class="my-list-link text-primary text-weight-medium"
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list" class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
> >
@ -448,7 +465,29 @@ onMounted(() => {
type="checkbox" type="checkbox"
/> />
</div> </div>
<div class="col-12 q-mb-lg">
<div class="row">
<div class="col-4 relative-position">
<div class="other_custom">
<q-checkbox
v-model="other1"
label="อื่นๆ"
size="sm"
color="primary"
keep-color
:disable="store.projectStatus === 'FINISH'"
@update:model-value="checkOther(1, other1)"
/>
</div>
</div>
<div class="col-8 relative-position">
<div class="other_custom_input" v-if="other1 == true">
<q-input v-model="otherInput1" dense outlined label="กรุณากรอก อื่นๆ"></q-input>
</div>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4"> <div class="col-12 col-sm-6 col-md-4">
<q-input <q-input
:disable="store.projectStatus === 'FINISH'" :disable="store.projectStatus === 'FINISH'"
@ -534,6 +573,28 @@ onMounted(() => {
type="checkbox" type="checkbox"
/> />
</div> </div>
<div class="col-12 q-mb-lg">
<div class="row">
<div class="col-4 relative-position">
<div class="other_custom">
<q-checkbox
v-model="other2"
label="อื่นๆ"
size="sm"
color="primary"
keep-color
@update:model-value="checkOther(2, other2)"
/>
</div>
</div>
<div class="col-8 relative-position">
<div class="other_custom_input" v-if="other2 == true">
<q-input v-model="otherInput2" dense outlined label="กรุณากรอก อื่นๆ"></q-input>
</div>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4"> <div class="col-12 col-sm-6 col-md-4">
<q-input <q-input
dense dense
@ -573,4 +634,14 @@ onMounted(() => {
font-weight: 600; font-weight: 600;
border: 1px solid rgba(175, 185, 196, 0.217); border: 1px solid rgba(175, 185, 196, 0.217);
} }
.other_custom {
position: absolute;
left: -7px;
top: -29px;
}
.other_custom_input {
position: absolute;
top: -25px;
width: 100%;
}
</style> </style>

View file

@ -1104,6 +1104,47 @@ onMounted(() => {
v-for="(items, index) in formGroupTarget.positions" v-for="(items, index) in formGroupTarget.positions"
class="col-12 row q-col-gutter-sm" class="col-12 row q-col-gutter-sm"
> >
<div
class="col"
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
>
<q-select
dense
outlined
class="inputgreen"
v-model="items.posTypeId"
:options="posTypeOp"
option-label="name"
option-value="id"
emit-value
map-options
input-class="text-red"
label="ประเภทตำแหน่ง"
@update:model-value="updatePosTypeName"
/>
</div>
<div
class="col"
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
>
<q-select
dense
outlined
class="inputgreen"
v-model="items.posLevelId"
:options="
posTypeMain.find((v) => items.posTypeId === v.id)
?.posLevels || []
"
option-label="posLevelName"
option-value="id"
emit-value
map-options
input-class="text-red"
label="ระดับตำแหน่ง"
/>
</div>
<div <div
class="col" class="col"
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'" v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
@ -1121,58 +1162,6 @@ onMounted(() => {
]" ]"
/> />
</div> </div>
<div
class="col"
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
>
<q-select
dense
outlined
hide-bottom-space
lazy-rules
class="inputgreen"
v-model="items.posTypeId"
:options="posTypeOp"
option-label="name"
option-value="id"
emit-value
map-options
input-class="text-red"
label="ประเภทตำแหน่ง"
@update:model-value="updatePosTypeName"
:rules="[
(val:string) =>
!!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`,
]"
/>
</div>
<div
class="col"
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
>
<q-select
dense
outlined
hide-bottom-space
lazy-rules
class="inputgreen"
v-model="items.posLevelId"
:options="
posTypeMain.find((v) => items.posTypeId === v.id)
?.posLevels || []
"
option-label="posLevelName"
option-value="id"
emit-value
map-options
input-class="text-red"
label="ระดับตำแหน่ง"
:rules="[
(val:string) =>
!!val || `${'กรุณาเลือกระดับ'}`,
]"
/>
</div>
<div <div
class="col-1 q-mt-sm" class="col-1 q-mt-sm"
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'" v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"