Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2025-03-24 15:37:50 +07:00
commit 93db49a813
13 changed files with 121 additions and 35 deletions

View file

@ -16,7 +16,7 @@ export default {
reportOrderAttachment: (fileType: string, id: string, commandCode: string) =>
`${reportOrder}/${commandCode}/attachment/${fileType}/${id}`,
reportRetireList: (fileType: string, id: string) =>
`${reportRetire}/${fileType}/${id}`,
`${reportRetire}/31/${fileType}/${id}`, // Get api/v1/retirement/31/{exportType}/{Id} โหลด pdf เกษียณ
reportResignList: (fileType: string, id: string) =>
`${reportResign}/${fileType}/${id}`,

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { ref, watch, computed } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
@ -15,9 +15,16 @@ const { dialogConfirm, showLoader, hideLoader, messageError } =
const modal = defineModel<boolean>("modal", { required: true });
const props = defineProps({
dataUserComment: { type: Object, require: true },
sysName: { type: String, require: true },
fetchData: { type: Function, require: true },
});
const rejectName = computed(() =>
props.sysName && ["SYS_RESIGN", "SYS_RESIGN_EMP"].includes(props.sysName)
? "ยับยั้ง"
: "ไม่อนุมัติ"
);
const isAcceptSetting = ref<boolean>(false);
const isApproveSetting = ref<boolean>(false);
const isReasonSetting = ref<boolean>(false);
@ -107,8 +114,10 @@ watch(modal, (val) => {
label="รับทราบ"
/>
</div>
<div v-if="!isAcceptSetting && isApproveSetting">
<div class="text-weight-bold">จารณา (อน/ไมอน)</div>
<div v-if="isApproveSetting">
<div class="text-weight-bold">
{{ `พิจารณา (อนุมัติ/${rejectName})` }}
</div>
<div class="q-pa-sm q-gutter-sm">
<q-radio
dense
@ -123,13 +132,13 @@ watch(modal, (val) => {
keep-color
color="primary"
v-model="isApprove"
label="ไม่อนุมัติ"
:label="rejectName"
val="reject"
/>
</div>
</div>
<div v-if="!isAcceptSetting && isReasonSetting">
<div v-if="isReasonSetting">
<div class="text-weight-bold">แสดงความเหนในเอกสาร</div>
<div class="q-pa-sm q-gutter-sm">
<div class="col-12">

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { ref, watch, computed } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
@ -19,10 +19,18 @@ const search = ref<string>("");
const modal = defineModel<boolean>("modal", { required: true });
const props = defineProps({
stateId: { type: String, require: true },
keycloakId: { type: String, require: true },
sysName: { type: String, require: true },
fetchData: { type: Function, require: true },
type: { type: String, require: true },
});
const rejectName = computed(() =>
props.sysName && ["SYS_RESIGN", "SYS_RESIGN_EMP"].includes(props.sysName)
? "ยับยั้ง"
: "ไม่อนุมัติ"
);
/** table*/
const selected = ref<any[]>([]);
const rows = ref<any[]>([]);
@ -88,6 +96,7 @@ async function fetchLists() {
keyword: search.value,
page: pagination.value.page,
pageSize: pagination.value.rowsPerPage,
keycloakId: props.keycloakId,
})
.then(async (res) => {
totalList.value = Math.ceil(
@ -136,8 +145,8 @@ function onCloseModal() {
isApproveSetting.value = false;
isReasonSetting.value = false;
search.value = ''
isAct.value = false
search.value = "";
isAct.value = false;
}
function onSearchData() {
@ -174,7 +183,6 @@ watch(modal, (val) => {
<q-form q-form greedy @submit.prevent @validation-success="onSubmit">
<DialogHeader :tittle="`เลือกรายชื่อ`" :close="onCloseModal" />
<q-separator />
<q-card-section>
<div class="row q-col-gutter-sm items-start q-mb-sm">
<div class="col-12 col-sm-4 col-md-4">
@ -271,8 +279,8 @@ watch(modal, (val) => {
props.rowIndex +
1
}}
</div v-else>
<div>
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
@ -298,10 +306,10 @@ watch(modal, (val) => {
keep-color
color="primary"
v-model="isApproveSetting"
label="ให้เลือกพิจารณา (อนุมัติ/ไม่อนุมัติ)"
:label="`ให้เลือกพิจารณา (อนุมัติ/${rejectName})`"
/>
</div>
<div v-if="!isAcceptSetting">
<div>
<q-checkbox
dense
keep-color

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { onMounted, ref, computed } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
@ -30,8 +30,15 @@ const props = defineProps({
},
});
const rejectName = computed(() =>
props.sysName && ["SYS_RESIGN", "SYS_RESIGN_EMP"].includes(props.sysName)
? "ยับยั้ง"
: "ไม่อนุมัติ"
);
const stateId = ref<string>(""); //id state
const state = ref<number>(1); //state
const keycloakId = ref<string>("");
const dataUserComment = ref<any>();
const isPermission = ref<boolean>(true); // Workflow
@ -82,6 +89,8 @@ async function fetchCheckState() {
isCancel: data.can_cancel,
isSign: data.can_sign,
};
keycloakId.value = data.keycloakId;
console.log(keycloakId.value);
})
.catch(() => {
isPermission.value = false;
@ -208,7 +217,7 @@ defineExpose({
? item.isApprove === true
? "อนุมัติ"
: item.isApprove === false
? "ไม่อนุมัติ"
? `${rejectName}`
: ""
: ""
}}
@ -280,11 +289,14 @@ defineExpose({
:state-id="stateId"
:fetch-data="fetchCheckState"
:type="typeSelectPerson"
:sys-name="props.sysName"
:keycloak-id="keycloakId"
/>
<DialogApprove
v-model:modal="modalApprove"
:data-user-comment="dataUserComment"
:fetch-data="fetchCheckState"
:sys-name="props.sysName"
/>
</template>

View file

@ -828,6 +828,11 @@ watch(
? props.row.positionIsSelected
: "-"
}}
{{
props.row.isCondition && props.row.conditionReason
? `(${props.row.conditionReason})`
: ""
}}
<q-btn
size="12px"
dense
@ -835,7 +840,10 @@ watch(
icon="info"
color="info"
round
@click="(modalPerson = true), (personalId = props.row.current_holderId)"
@click="
(modalPerson = true),
(personalId = props.row.current_holderId)
"
>
<q-tooltip>อมลในทะเบยนประว</q-tooltip>
</q-btn>

View file

@ -115,6 +115,9 @@ const columns = ref<QTableProps["columns"]>([
label: "สังกัด",
sortable: false,
field: "org",
format(val, row) {
return val.replace(/(.*)\s(.*)$/, "$1\n$2");
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -361,7 +364,11 @@ onMounted(() => {
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name === 'no'">
{{
(formFilter.page - 1) * formFilter.pageSize + props.rowIndex + 1
(
(formFilter.page - 1) * formFilter.pageSize +
props.rowIndex +
1
)?.toLocaleString()
}}
</div>
<div v-else-if="col.name == 'fullName'">
@ -414,7 +421,11 @@ onMounted(() => {
</q-item>
</div>
</div>
<div v-else class="table_ellipsis">
<div v-else-if="col.name === 'org'" class="text-html">
{{ col.value ? col.value : "-" }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>

View file

@ -282,7 +282,7 @@ onMounted(() => {
<div class="col-12 col-sm-12 col-md-5 text-grey-6 text-weight-medium">
<div>งก</div>
</div>
<div class="col-12 col-sm-12 col-md-7">
<div class="col-12 col-sm-12 col-md-7 text-html">
{{ formMain.ocId ? formMain.ocId : "-" }}
</div>
</div>

View file

@ -52,6 +52,7 @@ const {
formatDatePosition,
findOrgName,
convertDateToAPI,
findOrgNameHtml,
} = useCounterMixin();
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
@ -195,8 +196,9 @@ const baseColumns = ref<QTableColumn[]>([
label: "สังกัด",
sortable: true,
field: "organization",
headerStyle: "font-size: 14px",
headerStyle: "font-size: 14px;",
style: "font-size: 14px",
format(val, row) {
return findOrgName({
root: row.orgRoot,
@ -960,8 +962,21 @@ onMounted(async () => {
<q-tooltip v-if="col.value">ดูคำสั่ง</q-tooltip>
</div>
<div v-else-if="col.name == 'organization'" class="table_ellipsis">
{{ col.value ? col.value : "-" }}
<div
v-else-if="col.name == 'organization'"
class="text-html"
>
{{
props.row
? findOrgNameHtml({
root: props.row.orgRoot,
child1: props.row.orgChild1,
child2: props.row.orgChild2,
child3: props.row.orgChild3,
child4: props.row.orgChild4,
})
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}

View file

@ -50,6 +50,7 @@ const {
pathRegistryEmp,
onSearchDataTable,
convertDateToAPI,
findOrgNameHtml,
} = useCounterMixin();
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
@ -906,8 +907,18 @@ onMounted(async () => {
<q-tooltip v-if="col.value">ดูคำสั่ง</q-tooltip>
</div>
<div v-else-if="col.name == 'organization'" class="table_ellipsis">
{{ col.value ? col.value : "-" }}
<div v-else-if="col.name == 'organization'" class="text-html">
{{
props.row
? findOrgNameHtml({
root: props.row.orgRoot,
child1: props.row.orgChild1,
child2: props.row.orgChild2,
child3: props.row.orgChild3,
child4: props.row.orgChild4,
})
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}

View file

@ -25,6 +25,7 @@ const {
hideLoader,
messageError,
success,
findOrgNameHtml,
} = useCounterMixin();
const empType = ref<string>(route.params.type.toString());
@ -437,7 +438,7 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th v-if="tabs === 'PENDING'" />
<q-th v-if="tabs === 'PENDING' && statusCheckEdit !== 'CHECKED'" />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
@ -508,7 +509,15 @@ onMounted(() => {
v-if="col.name === 'organization'"
class="text-html table_ellipsis"
>
{{ col.value ? col.value : "-" }}
{{
findOrgNameHtml({
root: props.row.orgRoot,
child1: props.row.orgChild1,
child2: props.row.orgChild2,
child3: props.row.orgChild3,
child4: props.row.orgChild4,
})
}}
</div>
<div
v-else-if="col.name === 'commandCode'"

View file

@ -18,7 +18,7 @@ const {
hideLoader,
messageError,
dialogConfirm,
findOrgName,
findOrgNameHtml,
success,
} = useCounterMixin();
const route = useRoute();
@ -49,7 +49,7 @@ async function fetchDataProfile() {
posNo: data.posNo,
posType: data.posTypeName,
posLevel: data.posLevelName,
org: findOrgName(data),
org: findOrgNameHtml(data),
};
})
.catch((err) => {
@ -202,8 +202,9 @@ onMounted(async () => {
<q-item>
<q-item-section>
<q-item-label
><strong>งก:</strong> {{ dataProfile?.org }}</q-item-label
<q-item-label class="text-html"
><strong>งก:</strong> <span></span
>{{ dataProfile?.org }}</q-item-label
>
</q-item-section>
</q-item>

View file

@ -61,9 +61,11 @@ const columns = ref<QTableProps["columns"]>([
label: "ลำดับ",
sortable: false,
field: (row) =>
(queryParams.page - 1) * queryParams.pageSize +
rows.value.indexOf(row) +
1,
(
(queryParams.page - 1) * queryParams.pageSize +
rows.value.indexOf(row) +
1
).toLocaleString(),
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},

View file

@ -31,7 +31,7 @@ const activeType = defineModel<string>("activeType", { required: true });
const props = defineProps({
isStatusEdit: { type: Boolean, required: true },
data: { type: Object, required: true },
data: { type: Object, required: true, default: () => ({}) },
fetchData: {
type: Function,
required: true,