Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2025-04-03 09:24:53 +07:00
commit ae8626f382
31 changed files with 782 additions and 150 deletions

View file

@ -4,6 +4,7 @@ import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useCommandMainStore } from "@/modules/18_command/store/Main";
import { useTransferDataStore } from "@/modules/05_placement/store";
import type { QTableProps } from "quasar";
import type { ListCommand } from "@/modules/18_command/interface/index/Main";
@ -16,6 +17,7 @@ const $q = useQuasar();
const storeCommand = useCommandMainStore();
const mixin = useCounterMixin();
const { dialogConfirm, date2Thai, onSearchDataTable } = mixin;
const { statusText } = useTransferDataStore();
const props = defineProps({
Modal: Boolean,
@ -57,9 +59,14 @@ const visibleColumns2 = ref<string[]>([
"no",
"citizenId",
"fullname",
"positionLevel",
"positionNumberOld",
"organizationNameOld",
"organizationName",
"typeCommand",
"dateOfBirth",
"typeCommand",
"createdAt",
"status",
]);
const commandType = ref<string>(""); //
@ -98,10 +105,56 @@ const columns2 = ref<QTableProps["columns"]>([
field: "fullname",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return `${
row.firstName
? `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`
: "-"
}`;
},
},
{
name: "positionNumberOld",
align: "left",
label: "ตำแหน่งเลขที่เดิม",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.positionNumberOld;
},
},
{
name: "positionLevel",
align: "left",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
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: "organizationNameOld",
align: "left",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationNameOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return row.firstName
? `${row.prefix}${row.firstName} ${row.lastName}`
: "-";
return `${row.organizationPositionOld.replace(/(.*)\s(.*)$/, "$1\n$2")}`;
},
},
{
@ -112,10 +165,20 @@ const columns2 = ref<QTableProps["columns"]>([
field: "organizationName",
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.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
return `${row.root.position}${row.root.posTypeName}${row.root.posLevelName}${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
},
},
{
name: "dateOfBirth",
align: "left",
label: "วัน/เดือน/ปี เกิด",
sortable: true,
field: "dateOfBirth",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return date2Thai(row.dateOfBirth);
},
},
{
@ -135,15 +198,27 @@ const columns2 = ref<QTableProps["columns"]>([
},
},
{
name: "dateOfBirth",
name: "createdAt",
align: "left",
label: "วัน/เดือน/ปี เกิด",
label: "วันที่ดำเนินการ",
sortable: true,
field: "dateOfBirth",
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return date2Thai(row.dateOfBirth);
return date2Thai(row.createdAt);
},
},
{
name: "status",
align: "left",
label: "สถานะ",
sortable: true,
field: "status",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return statusText(row.status);
},
},
]);
@ -231,7 +306,7 @@ watch(
<template>
<q-dialog v-model="props.Modal" persistent>
<q-card style="width: 1200px; max-width: 80vw">
<q-card style="min-width: 80%">
<q-form greedy @submit.prevent @validation-success="clickAddlist">
<DialogHeader :tittle="'ส่งไปออกคำสั่ง'" :close="clickClose" />
<q-separator />
@ -342,21 +417,49 @@ watch(
: "-"
}}
</div>
<div
v-else-if="col.name == 'organizationNameOld'"
class="text-html"
>
{{
props.row.organizationPositionOld !== null
? props.row.organizationPositionOld
: "-"
}}
</div>
<div v-else-if="col.name == 'organizationName'">
<div class="col-4">
<div class="text-weight-medium">
{{ props.row.root !== null ? props.row.root : "-" }}
<div>
{{
props.row.position !== null
? props.row.position
: ""
}}{{
(props.row.posTypeName !== null &&
props.row.posTypeName === "บริหาร") ||
props.row.posTypeName === "อำนวยการ"
? `${props.row.posTypeName}`
: ""
}}{{
props.row.posLevelName !== null
? `${props.row.posLevelName}`
: ""
}}
</div>
<div>
{{ props.row.root !== null ? props.row.root : "" }}
{{
props.row.rootShortName !== null
? `(${props.row.rootShortName})`
: ""
}}
</div>
<div class="text-weight-light">
<div>
{{
props.row.nodeName !== null
? props.row.nodeName
: ""
: "-"
}}
{{
props.row.nodeShortName !== null
@ -366,6 +469,7 @@ watch(
</div>
</div>
</div>
<div v-else-if="col.name == 'createdAt'">
{{
props.row.createdAt

View file

@ -66,9 +66,14 @@ const visibleColumns2 = ref<string[]>([
"no",
"citizenId",
"fullname",
"positionNumberOld",
"positionLevel",
"organizationNameOld",
"organizationName",
"dateOfBirth",
"typeCommand",
"dateOfBirth",
"createdAt",
"status",
]);
const columns2 = ref<QTableProps["columns"]>([
{
@ -97,10 +102,56 @@ const columns2 = ref<QTableProps["columns"]>([
field: "fullname",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return `${
row.firstName
? `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`
: "-"
}`;
},
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.positionNumberOld;
},
},
{
name: "positionLevel",
align: "left",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
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: "organizationNameOld",
align: "left",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationNameOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return row.firstName
? `${row.prefix}${row.firstName} ${row.lastName}`
: "-";
return `${row.organizationPositionOld.replace(/(.*)\s(.*)$/, "$1\n$2")}`;
},
},
{
@ -111,10 +162,20 @@ const columns2 = ref<QTableProps["columns"]>([
field: "organizationName",
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.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
return `${row.root.position}${row.root.posTypeName}${row.root.posLevelName}${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
},
},
{
name: "dateOfBirth",
align: "left",
label: "วัน/เดือน/ปี เกิด",
sortable: true,
field: "dateOfBirth",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return date2Thai(row.dateOfBirth);
},
},
{
@ -136,15 +197,27 @@ const columns2 = ref<QTableProps["columns"]>([
},
},
{
name: "dateOfBirth",
name: "createdAt",
align: "left",
label: "วัน/เดือน/ปี เกิด",
label: "วันที่ดำเนินการ",
sortable: true,
field: "dateOfBirth",
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return date2Thai(row.dateOfBirth);
return date2Thai(row.createdAt);
},
},
{
name: "status",
align: "left",
label: "สถานะ",
sortable: true,
field: "status",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return statusText(row.status);
},
},
]);
@ -244,7 +317,7 @@ watch(
<template>
<q-dialog v-model="props.Modal" persistent>
<q-card style="width: 1200px; max-width: 80vw">
<q-card style="min-width: 80%">
<q-form greedy @submit.prevent @validation-success="sendToCommand">
<DialogHeader :tittle="'ส่งไปออกคำสั่ง'" :close="clickClose" />
<q-separator />
@ -351,9 +424,37 @@ watch(
}}
</div>
<div
v-else-if="col.name == 'organizationNameOld'"
class="text-html"
>
{{
props.row.organizationPositionOld !== null
? props.row.organizationPositionOld
: "-"
}}
</div>
<div v-else-if="col.name == 'organizationName'">
<div class="col-4">
<div class="text-weight-medium">
<div>
{{
props.row.position !== null
? props.row.position
: "-"
}}{{
(props.row.posTypeName !== null &&
props.row.posTypeName === "บริหาร") ||
props.row.posTypeName === "อำนวยการ"
? `${props.row.posTypeName}`
: ""
}}{{
props.row.posLevelName !== null
? `${props.row.posLevelName}`
: ""
}}
</div>
<div>
{{ props.row.root !== null ? props.row.root : "-" }}
{{
props.row.rootShortName !== null
@ -361,7 +462,7 @@ watch(
: ""
}}
</div>
<div class="text-weight-light">
<div>
{{
props.row.nodeName !== null
? props.row.nodeName

View file

@ -16,14 +16,8 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
/** use*/
const $q = useQuasar();
const { statusText } = useTransferDataStore();
const {
dialogConfirm,
findOrgNameOld,
findPosMasterNoOld,
date2Thai,
onSearchDataTable,
findOrgNameOldHtml,
} = useCounterMixin();
const { dialogConfirm, findPosMasterNoOld, date2Thai, onSearchDataTable } =
useCounterMixin();
/** props*/
const props = defineProps({
@ -66,7 +60,7 @@ const columns2 = ref<QTableProps["columns"]>([
{
name: "posMasterNoOld",
align: "left",
label: "ตำแหน่งเลขที่",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "posMasterNoOld",
headerStyle: "font-size: 14px",
@ -75,19 +69,10 @@ const columns2 = ref<QTableProps["columns"]>([
return findPosMasterNoOld(row);
},
},
{
name: "positionOld",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "positionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@ -112,7 +97,11 @@ const columns2 = ref<QTableProps["columns"]>([
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => findOrgNameOld(row),
format: (val, row) => {
return row.organizationPositionOld
? `${row.organizationPositionOld.replace(/(.*)\s(.*)$/, "$1\n$2")} `
: "-";
},
},
{
name: "organization",
@ -168,7 +157,6 @@ const visibleColumns2 = ref<string[]>([
"no",
"name",
"posMasterNoOld",
"positionOld",
"positionLevel",
"organizationPositionOld",
"organization",
@ -310,7 +298,7 @@ function onSearch() {
v-else-if="col.name === 'organizationPositionOld'"
class="text-html"
>
{{ findOrgNameOldHtml(props.row) }}
{{ col.value }}
</div>
<div v-else>

View file

@ -53,16 +53,18 @@ const dataMapToSend = computed(() => {
lastName: i.lastName,
citizenId: i.citizenId,
remarkVertical: i.reason,
position: i.positionOld,
posType: i.positionTypeOld,
posLevel: i.positionLevelOld,
position: i.position,
posType: i.posTypeName,
posLevel: i.posLevelName,
}));
});
const visibleColumns2 = ref<string[]>([
"no",
"fullname",
"positionNumberOld",
"positionLevel",
"organizationPositionOld",
"organizationPositionReturn",
"createdAt",
"status",
]);
@ -85,13 +87,29 @@ const columns2 = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return `${row.prefix}${row.firstName} ${row.lastName}`;
return `${row.prefix === null ? "" : row.prefix}${row.firstName} ${
row.lastName
}`;
},
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.positionNumberOld;
},
},
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@ -120,6 +138,19 @@ const columns2 = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "organizationPositionReturn",
align: "left",
label: "ตำแหน่ง/หน่วยงานที่บรรจุกลับ",
sortable: true,
field: "organizationPositionReturn",
format(val, row) {
return row.organizationPositionOld.replace(/\n/g, " ");
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "createdAt",
align: "left",
@ -315,7 +346,51 @@ watch(
v-else-if="col.name === 'organizationPositionOld'"
class="text-html"
>
{{ props.row.organizationPositionOld ?? '-' }}
{{ props.row.organizationPositionOld ?? "-" }}
</div>
<div
v-else-if="col.name === 'organizationPositionReturn'"
>
<div class="col-4">
<div>
{{
props.row.position !== null
? props.row.position
: ""
}}{{
(props.row.posTypeName !== null &&
props.row.posTypeName === "บริหาร") ||
props.row.posTypeName === "อำนวยการ"
? `${props.row.posTypeName}`
: ""
}}{{
props.row.posLevelName !== null
? `${props.row.posLevelName}`
: ""
}}
</div>
<div>
{{ props.row.root !== null ? props.row.root : "-" }}
{{
props.row.rootShortName !== null
? `(${props.row.rootShortName})`
: ""
}}
</div>
<div>
{{
props.row.nodeName !== null
? props.row.nodeName
: ""
}}
{{
props.row.nodeShortName !== null
? `(${props.row.nodeShortName}${props.row.posMasterNo})`
: ""
}}
</div>
</div>
</div>
<div v-else>

View file

@ -42,7 +42,7 @@ const mainData = ref<any>();
const educationOld = ref<string>(""); ///
const organizationPositionOld = ref<string>(""); ///
const positionTypeOld = ref<string>(""); //
const positionTypeOld = ref<string>(""); //
const positionLevelOld = ref<string>(""); //
const posNo = ref<string>(""); //
const salary = ref<number>(0); //
@ -283,9 +283,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
:label="`${'ตำแหน่งประเภท'}`"
/>
</div>
</div>

View file

@ -24,12 +24,12 @@ const selected = defineModel("selectedPos", { required: true }); //ตำแห
const positionId = defineModel<string>("positionId", { required: true }); //id
const seletcId = defineModel<string>("seletcId", { required: true }); //
const date = defineModel<Date>("datePos", { required: true }); //
const positionData = defineModel<any[]>("position", { required: true }); //
const positionData = defineModel<any[]>("position", { required: true }); //
const isAll = defineModel<boolean>("isAll", { required: true }); //
const isBlank = defineModel<boolean>("isBlank", { required: true }); //
const isPosition = defineModel<string>("isPosition", { required: true });
// const isPositionOld = defineModel<boolean>("isPositionOld", { required: true }); //
const posType = defineModel<FormPosType>("posType", { required: true }); //
const posType = defineModel<FormPosType>("posType", { required: true }); //
const posLevel = defineModel<string>("posLevel", { required: true }); //
const optionPosType = defineModel<FormPosType[]>("optionPosType", {
required: true,
@ -74,7 +74,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "posMasterNo",
align: "left",
label: "ตำแหน่งเลขที่",
label: "เลขที่ตำแหน่ง",
sortable: true,
field: "posMasterNo",
headerStyle: "font-size: 14px",
@ -92,7 +92,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "posTypeName",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "posTypeName",
headerStyle: "font-size: 14px",
@ -202,7 +202,7 @@ const visibleColumns = ref<string[]>([
]);
/**
* function เลอกตำแหนเลขท
* function เลอกเลขทตำแหน
* @param id เลชทตำแหน
*/
async function onClickSelectPos(id: string) {
@ -265,11 +265,11 @@ onMounted(async () => {
<template>
<div class="column q-col-gutter-sm">
<!-- เลอกตำแหนเลขท -->
<!-- เลอกเลขทตำแหน -->
<div class="col-7">
<q-card bordered style="height: 100%; 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">
@ -306,7 +306,7 @@ onMounted(async () => {
v-model="posType"
:options="optionPosType"
option-label="posTypeName"
label="ประเภทตำแหน่ง"
label="ตำแหน่งประเภท"
dense
outlined
@update:model-value="props.onPosType?.()"

View file

@ -227,7 +227,7 @@ async function onClickSubmit() {
nodeId: dataPosMaster.nodeId,
orgRevisionId: orgRevisionId.value,
positionId: selectedPos.value[0].id,
posMasterNo: dataPosMaster.posMasterNo, //()
posMasterNo: dataPosMaster.posMasterNo, //()
positionName: selectedPos.value[0].positionName, //
positionField: selectedPos.value[0].positionField, //
posTypeId: selectedPos.value[0].posTypeId, //

View file

@ -86,6 +86,45 @@ const columns2 = ref<QTableProps["columns"]>([
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
},
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posTypeOld",
align: "left",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "posTypeOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.positionTypeOld
? `${row.positionTypeOld}${
row.positionLevelOld ? `(${row.positionLevelOld})` : ""
}`
: "";
},
},
{
name: "organizationNameOld",
align: "left",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationNameOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return row.organizationPositionOld
? `${row.organizationPositionOld.replace(/(.*)\s(.*)$/, "$1\n$2")} `
: "-";
},
},
{
name: "organizationName",
align: "left",
@ -149,6 +188,9 @@ const visibleColumns2 = ref<string[]>([
"no",
"citizenId",
"fullname",
"posTypeOld",
"positionNumberOld",
"organizationNameOld",
"organizationName",
"dateOfBirth",
"createdAt",

View file

@ -88,7 +88,7 @@ const columns = ref<QTableProps["columns"]>([
const profileId = ref<string>("");
const educationOld = ref<string>(""); ///
const organizationPositionOld = ref<string>(""); ///
const positionTypeOld = ref<string>(""); //
const positionTypeOld = ref<string>(""); //
const positionLevelOld = ref<string>(""); //
const posNo = ref<string>(""); //
const salary = ref<number>(0); //
@ -988,9 +988,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
:label="`${'ตำแหน่งประเภท'}`"
/>
</div>
<div class="col-xs-6 col-sm-4">

View file

@ -71,21 +71,21 @@ const columns2 = ref<QTableProps["columns"]>([
},
},
{
name: "posMasterNoOld",
name: "positionNumberOld",
align: "left",
label: "ตำแหน่งเลขที่",
label: "เลขที่ตำแหน่ง",
sortable: true,
field: "posMasterNoOld",
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findPosMasterNoOld(row);
return row.positionNumberOld;
},
},
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@ -147,7 +147,7 @@ const columns2 = ref<QTableProps["columns"]>([
const visibleColumns2 = ref<string[]>([
"no",
"name",
"posMasterNoOld",
"positionNumberOld",
"positionLevel",
"organizationPositionOld",
"organization",

View file

@ -260,9 +260,9 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
:label="`${'ตำแหน่งประเภท'}`"
/>
</div>
</div>

View file

@ -48,6 +48,7 @@ const visibleColumns2 = ref<string[]>([
"no",
"fullname",
"posType",
"positionNumberOld",
"organizationPositionOld",
"organization",
"status",
@ -75,10 +76,19 @@ const columns2 = ref<QTableProps["columns"]>([
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posType",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "posType",
headerStyle: "font-size: 14px",
@ -87,6 +97,7 @@ const columns2 = ref<QTableProps["columns"]>([
return row.positionTypeOld + " (" + row.positionLevelOld + ")";
},
},
{
name: "organizationPositionOld",
align: "left",
@ -94,7 +105,9 @@ const columns2 = ref<QTableProps["columns"]>([
sortable: true,
field: "organizationPositionOld",
format(val, row) {
return row.organizationPositionOld.replace(/\n/g, " ");
return row.organizationPositionOld
? `${row.organizationPositionOld.replace(/\n/g, " ")}`
: "-";
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",

View file

@ -44,7 +44,7 @@ const dataProfile = ref<DataProfile>(); //ข้อมูลส่วนตั
const workflowRef = ref<any>(null);
const organizationPositionOld = ref<string>(""); ///
const positionTypeOld = ref<string>(""); //
const positionTypeOld = ref<string>(""); //
const positionLevelOld = ref<string>(""); //
const posNo = ref<string>(""); //
const salary = ref<number>(0); //
@ -561,9 +561,9 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="edit ? [(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]:[]"
:rules="edit ? [(val:string) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]:[]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
:label="`${'ตำแหน่งประเภท'}`"
/>
</div>
<div class="col-xs-6 col-sm-4">

View file

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

View file

@ -74,7 +74,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "posType",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "posType",
format(val, row) {

View file

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

View file

@ -354,7 +354,7 @@ onMounted(async () => {
<div class="col-xs-6 col-sm-2 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">{{ position_level }}</div>
</div>
</div>

View file

@ -54,10 +54,19 @@ const columns = ref<QTableProps["columns"]>([
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
},
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posType",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "posType",
headerStyle: "font-size: 14px",
@ -70,6 +79,7 @@ const columns = ref<QTableProps["columns"]>([
: "";
},
},
{
name: "organizationPositionOld",
align: "left",
@ -79,7 +89,9 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.organizationPositionOld.replace(/\n/g, " ");
return row.organizationPositionOld
? `${row.organizationPositionOld.replace(/\n/g, " ")}`
: "-";
},
},
{
@ -118,6 +130,7 @@ const visibleColumns = ref<string[]>([
"no",
"fullname",
"posType",
"positionNumberOld",
"organizationPositionOld",
"organization",
"status",

View file

@ -48,7 +48,7 @@ const personalId = ref<string>(""); //บุคคล
const files = ref<any>(); //
const posType = ref<string>(""); //
const posType = ref<string>(""); //
const posLevel = ref<string>(""); //
const position = ref<string>(""); //
const type = ref<string | null>(null);
@ -64,6 +64,9 @@ const visibleColumns = ref<string[]>([
"no",
"citizenId",
"fullname",
"posTypeOld",
"positionNumberOld",
"organizationNameOld",
"organizationName",
"dateOfBirth",
"createdAt",
@ -104,6 +107,46 @@ const columns = ref<QTableProps["columns"]>([
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
},
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posTypeOld",
align: "left",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "posTypeOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.positionTypeOld
? `${row.positionTypeOld}${
row.positionLevelOld ? `(${row.positionLevelOld})` : ""
}`
: "";
},
},
{
name: "organizationNameOld",
align: "left",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationNameOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return row.organizationPositionOld
? `${row.organizationPositionOld.replace(/(.*)\s(.*)$/, "$1\n$2")} `
: "-";
},
},
{
name: "organizationName",
align: "left",
@ -572,9 +615,25 @@ onMounted(async () => {
props.row.createdAt ? date2Thai(props.row.createdAt) : "-"
}}
</div>
<div v-else-if="col.name == 'organizationName'">
<div class="col-4">
<div class="text-weight-medium">
<div>
{{
props.row.position !== null ? props.row.position : ""
}}{{
(props.row.posTypeName !== null &&
props.row.posTypeName === "บริหาร") ||
props.row.posTypeName === "อำนวยการ"
? `${props.row.posTypeName}`
: ""
}}{{
props.row.posLevelName !== null
? `${props.row.posLevelName}`
: ""
}}
</div>
<div>
{{ props.row.root !== null ? props.row.root : "-" }}
{{
props.row.rootShortName !== null
@ -582,7 +641,7 @@ onMounted(async () => {
: ""
}}
</div>
<div class="text-weight-light">
<div>
{{
props.row.nodeName !== null ? props.row.nodeName : ""
}}

View file

@ -28,10 +28,8 @@ const {
hideLoader,
success,
dialogRemove,
findOrgNameOld,
findPosMasterNoOld,
onSearchDataTable,
findOrgNameOldHtml,
} = mixin;
/** Table*/
@ -69,7 +67,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "posMasterNoOld",
align: "left",
label: "ตำแหน่งเลขที่",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "posMasterNoOld",
headerStyle: "font-size: 14px",
@ -78,19 +76,10 @@ const columns = ref<QTableProps["columns"]>([
return findPosMasterNoOld(row);
},
},
{
name: "positionOld",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: true,
field: "positionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@ -110,12 +99,16 @@ const columns = ref<QTableProps["columns"]>([
{
name: "organizationPositionOld",
align: "left",
label: "สังกัด",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px;min-width: 280px",
style: "font-size: 14px",
format: (val, row) => findOrgNameOld(row),
format: (val, row) => {
return row.organizationPositionOld
? `${row.organizationPositionOld.replace(/(.*)\s(.*)$/, "$1\n$2")} `
: "-";
},
},
{
name: "organization",
@ -409,7 +402,7 @@ onMounted(async () => {
v-else-if="col.name === 'organizationPositionOld'"
class="text-html"
>
{{ findOrgNameOldHtml(props.row) }}
{{ col.value }}
</div>
<div v-else>

View file

@ -64,21 +64,21 @@ const columns = ref<QTableProps["columns"]>([
},
},
{
name: "posMasterNoOld",
name: "positionNumberOld",
align: "left",
label: "ตำแหน่งเลขที่",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "posMasterNoOld",
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return findPosMasterNoOld(row);
return row.positionNumberOld;
},
},
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@ -140,7 +140,7 @@ const columns = ref<QTableProps["columns"]>([
const visibleColumns = ref<string[]>([
"no",
"name",
"posMasterNoOld",
"positionNumberOld",
"positionLevel",
"organizationPositionOld",
"organization",

View file

@ -38,7 +38,7 @@ const status = ref<string>("");
const modal = ref<boolean>(false); // popup
const modalTree = ref<boolean>(false); // popup - -
const posType = ref<string>(""); //
const posType = ref<string>(""); //
const posLevel = ref<string>(""); //
const position = ref<string>(""); //
const typeModal = ref<string | null>(null); // popup , ,
@ -90,6 +90,50 @@ const columns = ref<QTableProps["columns"]>([
}`;
},
},
{
name: "positionNumberOld",
align: "left",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.positionNumberOld;
},
},
{
name: "positionLevel",
align: "left",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
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: "organizationNameOld",
align: "left",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationNameOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return `${row.organizationPositionOld.replace(/(.*)\s(.*)$/, "$1\n$2")}`;
},
},
{
name: "organizationName",
align: "left",
@ -99,7 +143,7 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return `${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
return `${row.root.position}${row.root.posTypeName}${row.root.posLevelName}${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
},
},
{
@ -161,6 +205,9 @@ const visibleColumns = ref<string[]>([
"no",
"citizenId",
"fullname",
"positionNumberOld",
"positionLevel",
"organizationNameOld",
"organizationName",
"typeCommand",
"dateOfBirth",
@ -178,7 +225,7 @@ const pagination = ref({
async function fecthlistappointment() {
showLoader();
await http
.get(config.API.appointmentMain()+`?status=${status.value}`)
.get(config.API.appointmentMain() + `?status=${status.value}`)
.then((res) => {
let response = res.data.result;
listRecevice.value = response;
@ -544,10 +591,35 @@ onMounted(async () => {
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div
v-else-if="col.name == 'organizationNameOld'"
class="text-html"
>
{{
props.row.organizationPositionOld !== null
? props.row.organizationPositionOld
: "-"
}}
</div>
<div v-else-if="col.name == 'organizationName'">
<div class="col-4">
<div class="text-weight-medium">
<div>
{{
props.row.position !== null ? props.row.position : ""
}}{{
(props.row.posTypeName !== null &&
props.row.posTypeName === "บริหาร") ||
props.row.posTypeName === "อำนวยการ"
? `${props.row.posTypeName}`
: ""
}}{{
props.row.posLevelName !== null
? `${props.row.posLevelName}`
: ""
}}
</div>
<div>
{{ props.row.root !== null ? props.row.root : "-" }}
{{
props.row.rootShortName !== null
@ -555,7 +627,7 @@ onMounted(async () => {
: ""
}}
</div>
<div class="text-weight-light">
<div>
{{
props.row.nodeName !== null ? props.row.nodeName : ""
}}

View file

@ -39,7 +39,7 @@ const personalId = ref<string>("");
const modal = ref<boolean>(false); // popup
const modalTree = ref<boolean>(false); // popup
const typeModal = ref<string>(""); // popup ,
const posType = ref<string>(""); //
const posType = ref<string>(""); //
const posLevel = ref<string>(""); //
const position = ref<string>(""); //
const dataRows = ref<PersonData>();
@ -58,6 +58,9 @@ const visibleColumns = ref<string[]>([
"no",
"citizenId",
"fullname",
"positionLevel",
"positionNumberOld",
"organizationNameOld",
"organizationName",
"dateOfBirth",
"typeCommand",
@ -105,6 +108,50 @@ const columns = ref<QTableProps["columns"]>([
}`;
},
},
{
name: "positionNumberOld",
align: "left",
label: "ตำแหน่งเลขที่เดิม",
sortable: true,
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.positionNumberOld;
},
},
{
name: "positionLevel",
align: "left",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
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: "organizationNameOld",
align: "left",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationNameOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return `${row.organizationPositionOld.replace(/(.*)\s(.*)$/, "$1\n$2")}`;
},
},
{
name: "organizationName",
align: "left",
@ -114,7 +161,7 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val, row) => {
return `${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
return `${row.root.position}${row.root.posTypeName}${row.root.posLevelName}${row.root} (${row.rootShortName}) ${row.nodeName} (${row.nodeShortName}${row.posMasterNo})`;
},
},
{
@ -175,7 +222,7 @@ const columns = ref<QTableProps["columns"]>([
async function fecthlistappointment() {
showLoader();
await http
.get(config.API.appointEmployee()+`?status=${status.value}`)
.get(config.API.appointEmployee() + `?status=${status.value}`)
.then(async (res) => {
let response = await res.data.result;
listRecevice.value = response;
@ -517,9 +564,35 @@ onMounted(async () => {
{{ props.rowIndex + 1 }}
</div>
<div
v-else-if="col.name == 'organizationNameOld'"
class="text-html"
>
{{
props.row.organizationPositionOld !== null
? props.row.organizationPositionOld
: "-"
}}
</div>
<div v-else-if="col.name == 'organizationName'">
<div class="col-4">
<div class="text-weight-medium">
<div>
{{
props.row.position !== null ? props.row.position : ""
}}{{
(props.row.posTypeName !== null &&
props.row.posTypeName === "บริหาร") ||
props.row.posTypeName === "อำนวยการ"
? `${props.row.posTypeName}`
: ""
}}{{
props.row.posLevelName !== null
? `${props.row.posLevelName}`
: ""
}}
</div>
<div>
{{ props.row.root !== null ? props.row.root : "-" }}
{{
props.row.rootShortName !== null
@ -527,7 +600,7 @@ onMounted(async () => {
: ""
}}
</div>
<div class="text-weight-light">
<div>
{{
props.row.nodeName !== null ? props.row.nodeName : ""
}}

View file

@ -45,9 +45,10 @@ const filterKeyword2 = ref<string>(""); //คำค้นหารายกา
const visibleColumns = ref<string[]>([
"no",
"fullname",
"organizationPositionReturn",
"positionNumberOld",
"positionLevel",
"organizationPositionOld",
"organizationPositionReturn",
"createdAt",
"status",
]);
@ -77,21 +78,22 @@ const columns = ref<QTableProps["columns"]>([
},
{
name: "organizationPositionReturn",
name: "positionNumberOld",
align: "left",
label: "ตำแหน่ง/หน่วยงานที่บรรจุกลับ",
label: "เลขที่ตำแหน่งเดิม",
sortable: true,
field: "organizationPositionReturn",
format(val, row) {
return row.organizationPositionOld.replace(/\n/g, " ");
},
field: "positionNumberOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return row.positionNumberOld;
},
},
{
name: "positionLevel",
align: "left",
label: "ประเภทตำแหน่ง",
label: "ตำแหน่งประเภทเดิม",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
@ -120,6 +122,19 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "organizationPositionReturn",
align: "left",
label: "ตำแหน่ง/หน่วยงานที่บรรจุกลับ",
sortable: true,
field: "organizationPositionReturn",
format(val, row) {
return row.organizationPositionOld.replace(/\n/g, " ");
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "createdAt",
align: "left",
@ -217,7 +232,7 @@ const modalSelectOrg = ref<boolean>(false);
const type = ref<string | null>(null);
const personalId = ref<string>("");
const posType = ref<string>(""); //
const posType = ref<string>(""); //
const posLevel = ref<string>(""); //
const position = ref<string>(""); //
const dataRows = ref<any>(); //
@ -455,9 +470,31 @@ onMounted(() => {
{{ props.rowIndex + 1 }}
</div>
<div
v-else-if="col.name === 'organizationPositionOld'"
class="text-html"
>
{{ props.row.organizationPositionOld ?? "-" }}
</div>
<div v-else-if="col.name === 'organizationPositionReturn'">
<div class="col-4">
<div class="text-weight-medium">
<div>
{{
props.row.position !== null ? props.row.position : ""
}}{{
(props.row.posTypeName !== null &&
props.row.posTypeName === "บริหาร") ||
props.row.posTypeName === "อำนวยการ"
? `${props.row.posTypeName}`
: ""
}}{{
props.row.posLevelName !== null
? `${props.row.posLevelName}`
: ""
}}
</div>
<div>
{{ props.row.root !== null ? props.row.root : "-" }}
{{
props.row.rootShortName !== null
@ -465,7 +502,7 @@ onMounted(() => {
: ""
}}
</div>
<div class="text-weight-light">
<div>
{{
props.row.nodeName !== null ? props.row.nodeName : ""
}}
@ -478,13 +515,6 @@ onMounted(() => {
</div>
</div>
<div
v-else-if="col.name === 'organizationPositionOld'"
class="text-html"
>
{{ props.row.organizationPositionOld ?? "-" }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>

View file

@ -361,7 +361,8 @@ function onClickDownload(data: DataOption, type: string = "xlsx") {
data.id === "gov-05-01" ||
data.id === "gov-07" ||
data.id === "gov-07-01" ||
data.id === "gov-08";
data.id === "gov-08" ||
data.id === "gov-10";
const finalUrl = isGovernmentId ? `${url}/${store.tabGroup}` : url;
http

View file

@ -274,7 +274,7 @@ async function fetchSalalyPeriod(
isLoad.value = true;
}
if (data.group1id) {
if (!data.group1id) {
hideLoader();
}
})

View file

@ -257,7 +257,7 @@ async function fetchSalalyPeriod(
data && store.fetchPeriodLatest(data, store.tabGroup);
periodLatest.value = data;
isLoad.value = data.group1id ? true : false;
if (data.group1id) {
if (!data.group1id) {
hideLoader();
}
})