Merge branch 'develop' into devTee
# Conflicts: # src/modules/04_registryPerson/components/requestEdit/01_TabInformation.vue
This commit is contained in:
commit
ea01d168cb
20 changed files with 384 additions and 328 deletions
|
|
@ -147,7 +147,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const columnsPostition = ref<QTableProps["columns"]>([
|
const columnsPostition = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -222,7 +221,6 @@ const columnsPostition = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"isPosition",
|
"isPosition",
|
||||||
"no",
|
"no",
|
||||||
|
|
@ -505,7 +503,7 @@ function onSubmit() {
|
||||||
posmasterId: dataPosMaster.id,
|
posmasterId: dataPosMaster.id,
|
||||||
typeCommand: type.value,
|
typeCommand: type.value,
|
||||||
};
|
};
|
||||||
props.onSubmit?.(body);
|
await props.onSubmit?.(body);
|
||||||
close();
|
close();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,9 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
||||||
|
import { useStructStore } from "@/modules/02_organization/store/chart";
|
||||||
|
|
||||||
|
const storeOrg = useStructStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useOrganizational();
|
const store = useOrganizational();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from "vue";
|
import { ref, onMounted, watch, onBeforeMount } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { OrgChart } from "bma-org-chart";
|
import { OrgChart } from "bma-org-chart";
|
||||||
import "bma-org-chart/org-chart.css";
|
import "bma-org-chart/org-chart.css";
|
||||||
|
|
@ -9,11 +9,13 @@ import config from "@/app.config";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
||||||
|
import { useStructStore } from "@/modules/02_organization/store/chart";
|
||||||
import avatar from "@/assets/avatar_user.jpg";
|
import avatar from "@/assets/avatar_user.jpg";
|
||||||
import chartData from "@/assets/orgChartData";
|
import chartData from "@/assets/orgChartData";
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const store = useOrganizational();
|
const store = useOrganizational();
|
||||||
|
const storeOrg = useStructStore();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
|
|
||||||
|
|
@ -34,10 +36,11 @@ async function fetchOrgChart() {
|
||||||
.get(urlRequest)
|
.get(urlRequest)
|
||||||
.then(async (response) => {
|
.then(async (response) => {
|
||||||
if (response.data.result.length > 0) {
|
if (response.data.result.length > 0) {
|
||||||
const data = response.data.result;
|
const data = await response.data.result;
|
||||||
|
|
||||||
const updatedData = await Promise.all(data.map(addAvatarToData));
|
const updatedData = await Promise.all(data.map(addAvatarToData));
|
||||||
dataSource.value = updatedData[0];
|
|
||||||
|
dataSource.value = await updatedData[0];
|
||||||
|
storeOrg.dataSource = updatedData[0];
|
||||||
|
|
||||||
if (dataSourceLock.value === undefined)
|
if (dataSourceLock.value === undefined)
|
||||||
dataSourceLock.value = dataSource.value;
|
dataSourceLock.value = dataSource.value;
|
||||||
|
|
@ -109,7 +112,7 @@ function savePDF() {
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
[() => store.typeOrganizational, () => store.historyId],
|
[() => store.typeOrganizational, () => store.historyId],
|
||||||
async ([new1], [old1]) => {
|
([new1], [old1]) => {
|
||||||
if (new1 === "old" && old1 !== "old") {
|
if (new1 === "old" && old1 !== "old") {
|
||||||
store.historyId = "";
|
store.historyId = "";
|
||||||
}
|
}
|
||||||
|
|
@ -121,7 +124,7 @@ watch(
|
||||||
? store.draftId
|
? store.draftId
|
||||||
: store.historyId;
|
: store.historyId;
|
||||||
|
|
||||||
await fetchOrgChart();
|
fetchOrgChart();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -133,7 +136,11 @@ onMounted(async () => {
|
||||||
? store.draftId
|
? store.draftId
|
||||||
: store.historyId;
|
: store.historyId;
|
||||||
|
|
||||||
await fetchOrgChart();
|
fetchOrgChart();
|
||||||
|
});
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
storeOrg.dataSource = undefined;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -158,6 +165,7 @@ onMounted(async () => {
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<div style="overflow-x: auto; overflow-y: auto" class="q-pt-md">
|
<div style="overflow-x: auto; overflow-y: auto" class="q-pt-md">
|
||||||
<OrgChart
|
<OrgChart
|
||||||
|
v-if="storeOrg.dataSource"
|
||||||
style="height: 70vh"
|
style="height: 70vh"
|
||||||
ref="chartRef"
|
ref="chartRef"
|
||||||
class="org"
|
class="org"
|
||||||
|
|
|
||||||
9
src/modules/02_organization/store/chart.ts
Normal file
9
src/modules/02_organization/store/chart.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { defineStore } from "pinia";
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
export const useStructStore = defineStore("StructStore", () => {
|
||||||
|
const dataSource = ref();
|
||||||
|
return {
|
||||||
|
dataSource,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
@ -111,6 +111,43 @@ async function closeDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
count.value = 0;
|
count.value = 0;
|
||||||
childData.value = [];
|
childData.value = [];
|
||||||
|
|
||||||
|
formInformations.bloodGroup = null;
|
||||||
|
formInformations.relationship = null;
|
||||||
|
formInformations.gender = null;
|
||||||
|
formInformations.religion = null;
|
||||||
|
formInformations.citizenId = "";
|
||||||
|
formInformations.nationality = null;
|
||||||
|
formInformations.ethnicity = null;
|
||||||
|
formInformations.birthDate = null;
|
||||||
|
formInformations.phone = null;
|
||||||
|
formInformations.lastName = "";
|
||||||
|
formInformations.firstName = "";
|
||||||
|
formInformations.prefix = "";
|
||||||
|
formInformations.rank = null;
|
||||||
|
|
||||||
|
fatherData.isLive = 1;
|
||||||
|
fatherData.citizenId = "";
|
||||||
|
fatherData.prefix = "";
|
||||||
|
fatherData.firstName = "";
|
||||||
|
fatherData.lastName = "";
|
||||||
|
fatherData.job = "";
|
||||||
|
|
||||||
|
motherData.isLive = 1;
|
||||||
|
motherData.citizenId = "";
|
||||||
|
motherData.prefix = "";
|
||||||
|
motherData.firstName = "";
|
||||||
|
motherData.lastName = "";
|
||||||
|
motherData.job = "";
|
||||||
|
|
||||||
|
coupleData.isLive = 1;
|
||||||
|
coupleData.citizenId = "";
|
||||||
|
coupleData.prefix = "";
|
||||||
|
coupleData.firstName = "";
|
||||||
|
coupleData.lastName = "";
|
||||||
|
coupleData.job = "";
|
||||||
|
coupleData.lastNameOld = "";
|
||||||
|
coupleData.statusMarital = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** อัพเดตข้อมูลส่วนตัว */
|
/** อัพเดตข้อมูลส่วนตัว */
|
||||||
|
|
@ -161,9 +198,13 @@ async function upDateAddress() {
|
||||||
async function upDateFamily() {
|
async function upDateFamily() {
|
||||||
await saveFather();
|
await saveFather();
|
||||||
await saveMother();
|
await saveMother();
|
||||||
await saveCouple();
|
if (coupleData.citizenId !== "") {
|
||||||
for (const child of childData.value) {
|
await saveCouple();
|
||||||
await saveChildren(child);
|
}
|
||||||
|
if (childData.value.length !== 0) {
|
||||||
|
for (const child of childData.value) {
|
||||||
|
await saveChildren(child);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
count.value + 1;
|
count.value + 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,7 @@ onMounted(() => {
|
||||||
color="primary"
|
color="primary"
|
||||||
@click.pervent="onDownloadFile(props.row.id)"
|
@click.pervent="onDownloadFile(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>หลักฐานอ้างอิง</q-tooltip>
|
<q-tooltip>ดาวน์โหลดเอกสารหลักฐาน</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis2">
|
<div v-else class="table_ellipsis2">
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,6 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/** HooK lifecycle ทำงานเมื่อมีการเรียกใช้งาน Componenets*/
|
/** HooK lifecycle ทำงานเมื่อมีการเรียกใช้งาน Componenets*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchData();
|
fetchData();
|
||||||
|
|
@ -402,7 +401,7 @@ onMounted(() => {
|
||||||
color="primary"
|
color="primary"
|
||||||
@click.pervent="onDownloadFile(props.row.id)"
|
@click.pervent="onDownloadFile(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>หลักฐานอ้างอิง</q-tooltip>
|
<q-tooltip>ดาวน์โหลดเอกสารหลักฐาน</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
|
||||||
|
|
@ -252,18 +252,18 @@ watch(modal, (val) => {
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card style="min-width: 65%">
|
<q-card style="min-width: 65%">
|
||||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
<DialogHeader
|
||||||
<DialogHeader
|
:tittle="`${formData.createdFullName}
|
||||||
:tittle="`${formData.createdFullName}
|
|
||||||
(ขอแก้ไขเมื่อ ${
|
(ขอแก้ไขเมื่อ ${
|
||||||
formData.createdAt ? date2Thai(formData.createdAt, true, true) : ''
|
formData.createdAt ? date2Thai(formData.createdAt, true, true) : ''
|
||||||
})`"
|
})`"
|
||||||
:close="closeDialog"
|
:close="closeDialog"
|
||||||
/>
|
/>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<!-- สถานะคำร้อง -->
|
<!-- สถานะคำร้อง -->
|
||||||
<q-card-section>
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
|
<q-card-section v-if="formData.status == 'PENDING'">
|
||||||
<q-card bordered class="col-12">
|
<q-card bordered class="col-12">
|
||||||
<div class="row q-pa-md q-col-gutter-sm">
|
<div class="row q-pa-md q-col-gutter-sm">
|
||||||
<!-- สถานะ -->
|
<!-- สถานะ -->
|
||||||
|
|
@ -320,171 +320,171 @@ watch(modal, (val) => {
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<!-- รายละเอียด -->
|
|
||||||
<q-card-section class="q-pt-none">
|
|
||||||
<q-card bordered class="col-12">
|
|
||||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-xs q-px-md">
|
|
||||||
รายละเอียด
|
|
||||||
</div>
|
|
||||||
<q-separator />
|
|
||||||
<div class="row q-col-gutter-sm q-pa-md">
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
readonly
|
|
||||||
outlined
|
|
||||||
v-model="formData.topic"
|
|
||||||
label="ชื่อเรื่อง/เนื้อเรื่อง/หัวข้อการพัฒนา"
|
|
||||||
dense
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="q-mb-sm text-weight-medium text-body2">
|
|
||||||
วิธีการพัฒนา
|
|
||||||
</div>
|
|
||||||
<div class="row col-12 q-ml-md q-col-gutter-sm">
|
|
||||||
<!-- 70 การลงมือปฏิบัติ (โดยผู้บังคับบัญชามอบหมาย) -->
|
|
||||||
<div class="col-4">
|
|
||||||
<div class="q-mb-sm text-weight-medium text-body2">
|
|
||||||
70 การลงมือปฏิบัติ (โดยผู้บังคับบัญชามอบหมาย)
|
|
||||||
</div>
|
|
||||||
<q-option-group
|
|
||||||
disable
|
|
||||||
class="check_box q-mt-sm"
|
|
||||||
keep-color
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
v-model="formData.developmentProjects"
|
|
||||||
:options="itemsDevelopment70"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="row"
|
|
||||||
v-if="formData.developmentProjects.includes('other1')"
|
|
||||||
>
|
|
||||||
<div class="col-8 q-mt-sm relative-position">
|
|
||||||
<div class="other_custom_input">
|
|
||||||
<q-input
|
|
||||||
readonly
|
|
||||||
v-model="formData.reasonDevelopment70"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="กรุณาระบุ"
|
|
||||||
></q-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting) -->
|
|
||||||
<div class="col-4">
|
|
||||||
<div class="q-mb-sm text-weight-medium text-body2">
|
|
||||||
20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting)
|
|
||||||
</div>
|
|
||||||
<q-option-group
|
|
||||||
disable
|
|
||||||
class="check_box q-mt-sm"
|
|
||||||
keep-color
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
v-model="formData.developmentProjects"
|
|
||||||
:options="itemsDevelopment20"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="row"
|
|
||||||
v-if="formData.developmentProjects.includes('other2')"
|
|
||||||
>
|
|
||||||
<div class="col-8 q-mt-sm relative-position">
|
|
||||||
<div class="other_custom_input">
|
|
||||||
<q-input
|
|
||||||
readonly
|
|
||||||
v-model="formData.reasonDevelopment20"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="กรุณาระบุ"
|
|
||||||
></q-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 10 การฝึกอบรมอื่นๆ -->
|
|
||||||
<div class="col-4">
|
|
||||||
<div class="q-mb-sm text-weight-medium text-body2">
|
|
||||||
10 การฝึกอบรมอื่นๆ
|
|
||||||
</div>
|
|
||||||
<q-option-group
|
|
||||||
disable
|
|
||||||
class="check_box q-mt-sm"
|
|
||||||
keep-color
|
|
||||||
color="primary"
|
|
||||||
dense
|
|
||||||
v-model="formData.developmentProjects"
|
|
||||||
:options="itemsDevelopment10"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="row"
|
|
||||||
v-if="formData.developmentProjects.includes('other3')"
|
|
||||||
>
|
|
||||||
<div class="offset-4 col-8 q-mt-sm relative-position">
|
|
||||||
<div class="other_custom_input">
|
|
||||||
<q-input
|
|
||||||
readonly
|
|
||||||
v-model="formData.reasonDevelopment10"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
label="กรุณาระบุ"
|
|
||||||
></q-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- เป้าหมายการนำไปพัฒนางาน -->
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
readonly
|
|
||||||
outlined
|
|
||||||
v-model="formData.developmentTarget"
|
|
||||||
label="เป้าหมายการนำไปพัฒนางาน"
|
|
||||||
dense
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- วิธีการวัดผลการพัฒนา -->
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
readonly
|
|
||||||
outlined
|
|
||||||
v-model="formData.developmentResults"
|
|
||||||
label="วิธีการวัดผลการพัฒนา"
|
|
||||||
dense
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- รายงานผลการพัฒนา -->
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
readonly
|
|
||||||
outlined
|
|
||||||
v-model="formData.developmentReport"
|
|
||||||
label="รายงานผลการพัฒนา"
|
|
||||||
dense
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</q-card-section>
|
|
||||||
</q-form>
|
</q-form>
|
||||||
|
|
||||||
|
<!-- รายละเอียด -->
|
||||||
|
<q-card-section class="q-pt-sm">
|
||||||
|
<q-card bordered class="col-12">
|
||||||
|
<div class="col-12 text-weight-medium bg-grey-1 q-py-xs q-px-md">
|
||||||
|
รายละเอียด
|
||||||
|
</div>
|
||||||
|
<q-separator />
|
||||||
|
<div class="row q-col-gutter-sm q-pa-md">
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
readonly
|
||||||
|
outlined
|
||||||
|
v-model="formData.topic"
|
||||||
|
label="ชื่อเรื่อง/เนื้อเรื่อง/หัวข้อการพัฒนา"
|
||||||
|
dense
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="q-mb-sm text-weight-medium text-body2">
|
||||||
|
วิธีการพัฒนา
|
||||||
|
</div>
|
||||||
|
<div class="row col-12 q-ml-md q-col-gutter-sm">
|
||||||
|
<!-- 70 การลงมือปฏิบัติ (โดยผู้บังคับบัญชามอบหมาย) -->
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="q-mb-sm text-weight-medium text-body2">
|
||||||
|
70 การลงมือปฏิบัติ (โดยผู้บังคับบัญชามอบหมาย)
|
||||||
|
</div>
|
||||||
|
<q-option-group
|
||||||
|
disable
|
||||||
|
class="check_box q-mt-sm"
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
v-model="formData.developmentProjects"
|
||||||
|
:options="itemsDevelopment70"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="row"
|
||||||
|
v-if="formData.developmentProjects.includes('other1')"
|
||||||
|
>
|
||||||
|
<div class="col-8 q-mt-sm relative-position">
|
||||||
|
<div class="other_custom_input">
|
||||||
|
<q-input
|
||||||
|
readonly
|
||||||
|
v-model="formData.reasonDevelopment70"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
label="กรุณาระบุ"
|
||||||
|
></q-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting) -->
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="q-mb-sm text-weight-medium text-body2">
|
||||||
|
20 การเรียนรู้จากผู้อื่น (Coach/Mentor/Consulting)
|
||||||
|
</div>
|
||||||
|
<q-option-group
|
||||||
|
disable
|
||||||
|
class="check_box q-mt-sm"
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
v-model="formData.developmentProjects"
|
||||||
|
:options="itemsDevelopment20"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="row"
|
||||||
|
v-if="formData.developmentProjects.includes('other2')"
|
||||||
|
>
|
||||||
|
<div class="col-8 q-mt-sm relative-position">
|
||||||
|
<div class="other_custom_input">
|
||||||
|
<q-input
|
||||||
|
readonly
|
||||||
|
v-model="formData.reasonDevelopment20"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
label="กรุณาระบุ"
|
||||||
|
></q-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 10 การฝึกอบรมอื่นๆ -->
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="q-mb-sm text-weight-medium text-body2">
|
||||||
|
10 การฝึกอบรมอื่นๆ
|
||||||
|
</div>
|
||||||
|
<q-option-group
|
||||||
|
disable
|
||||||
|
class="check_box q-mt-sm"
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
v-model="formData.developmentProjects"
|
||||||
|
:options="itemsDevelopment10"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="row"
|
||||||
|
v-if="formData.developmentProjects.includes('other3')"
|
||||||
|
>
|
||||||
|
<div class="offset-4 col-8 q-mt-sm relative-position">
|
||||||
|
<div class="other_custom_input">
|
||||||
|
<q-input
|
||||||
|
readonly
|
||||||
|
v-model="formData.reasonDevelopment10"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
label="กรุณาระบุ"
|
||||||
|
></q-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- เป้าหมายการนำไปพัฒนางาน -->
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
readonly
|
||||||
|
outlined
|
||||||
|
v-model="formData.developmentTarget"
|
||||||
|
label="เป้าหมายการนำไปพัฒนางาน"
|
||||||
|
dense
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- วิธีการวัดผลการพัฒนา -->
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
readonly
|
||||||
|
outlined
|
||||||
|
v-model="formData.developmentResults"
|
||||||
|
label="วิธีการวัดผลการพัฒนา"
|
||||||
|
dense
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- รายงานผลการพัฒนา -->
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
readonly
|
||||||
|
outlined
|
||||||
|
v-model="formData.developmentReport"
|
||||||
|
label="รายงานผลการพัฒนา"
|
||||||
|
dense
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -812,6 +812,7 @@ onMounted(async () => {
|
||||||
: formDetail.prefix ?? ""
|
: formDetail.prefix ?? ""
|
||||||
}${formDetail.firstName} ${formDetail.lastName}`
|
}${formDetail.firstName} ${formDetail.lastName}`
|
||||||
}}
|
}}
|
||||||
|
<span class="text-red"> {{ leaveReason }}</span>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -744,7 +744,8 @@ function onSubmitDate() {
|
||||||
function openModalOrder(val: boolean) {
|
function openModalOrder(val: boolean) {
|
||||||
// ยังไม่ได้ดัก ส่ง ไป ทั้ง object #e.draft == "รอส่งตัว" &&
|
// ยังไม่ได้ดัก ส่ง ไป ทั้ง object #e.draft == "รอส่งตัว" &&
|
||||||
rowsOrder.value = rows.value.filter(
|
rowsOrder.value = rows.value.filter(
|
||||||
(e: any) => e.nodeName !== null && e.reportingDate !== null
|
(e: any) =>
|
||||||
|
e.nodeName !== null && e.reportingDate !== null && e.statusId !== "REPORT"
|
||||||
);
|
);
|
||||||
modalOrder.value = val;
|
modalOrder.value = val;
|
||||||
}
|
}
|
||||||
|
|
@ -808,6 +809,7 @@ onMounted(async () => {
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
props.row.statusId !== 'DONE' &&
|
props.row.statusId !== 'DONE' &&
|
||||||
|
props.row.statusId !== 'REPORT' &&
|
||||||
(checkPermission($route)?.attrIsGet ||
|
(checkPermission($route)?.attrIsGet ||
|
||||||
checkPermission($route)?.attrIsUpdate)
|
checkPermission($route)?.attrIsUpdate)
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,7 @@ function openModalOrder() {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSave(data: any) {
|
async function onSave(data: any) {
|
||||||
const dataAppoint = {
|
const dataAppoint = {
|
||||||
node: data.node,
|
node: data.node,
|
||||||
nodeId: data.nodeId,
|
nodeId: data.nodeId,
|
||||||
|
|
@ -314,7 +314,7 @@ function onSave(data: any) {
|
||||||
};
|
};
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.put(config.API.receivePosition(personalId.value), dataAppoint)
|
.put(config.API.receivePosition(personalId.value), dataAppoint)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await fecthlistRecevice();
|
await fecthlistRecevice();
|
||||||
|
|
|
||||||
|
|
@ -414,7 +414,7 @@ watch(
|
||||||
"
|
"
|
||||||
label="วัน/เดือน/ปี เกิด"
|
label="วัน/เดือน/ปี เกิด"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`,
|
(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`,
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import type { DataEmployee } from "@/modules/08_registryEmployee/interface/respo
|
||||||
|
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const {
|
const {
|
||||||
|
|
@ -164,9 +165,9 @@ const visibleColumns = ref<String[]>([
|
||||||
"statustext",
|
"statustext",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/**
|
const modalCommand = ref<boolean>(false); //สร้างคำสั่ง
|
||||||
* ฟังก์ชันยืนยันการส่งออกคำสั่ง
|
|
||||||
*/
|
/** ฟังก์ชันยืนยันการส่งออกคำสั่ง*/
|
||||||
function onClickSendOrder() {
|
function onClickSendOrder() {
|
||||||
if (selected.value.length == 0) {
|
if (selected.value.length == 0) {
|
||||||
dialogMessageNotify($q, "กรุณาเลือกคนออกคำสั่ง");
|
dialogMessageNotify($q, "กรุณาเลือกคนออกคำสั่ง");
|
||||||
|
|
@ -174,27 +175,8 @@ function onClickSendOrder() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => {
|
() => {
|
||||||
showLoader();
|
modalCommand.value = true;
|
||||||
let pId: string[] = [];
|
closeDialog();
|
||||||
selected.value.forEach((e: any) => {
|
|
||||||
pId.push(e.id);
|
|
||||||
});
|
|
||||||
let data = {
|
|
||||||
id: pId,
|
|
||||||
};
|
|
||||||
http
|
|
||||||
.post(config.API.orgProfileReport, data)
|
|
||||||
.then(async () => {
|
|
||||||
await props?.fetchData?.();
|
|
||||||
await success($q, "บันทึกสำเร็จ");
|
|
||||||
closeDialog();
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
messageError($q, err);
|
|
||||||
})
|
|
||||||
.finally(async () => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
"ยื่นยันการส่งรายชื่อไปออกคำสั่ง",
|
"ยื่นยันการส่งรายชื่อไปออกคำสั่ง",
|
||||||
"ต้องการยืนยันการส่งรายชื่อไปออกคำสั่งนี้หรือไม่ ?"
|
"ต้องการยืนยันการส่งรายชื่อไปออกคำสั่งนี้หรือไม่ ?"
|
||||||
|
|
@ -202,15 +184,17 @@ function onClickSendOrder() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันดึงข้อมูลราชชื่อส่งออกคำสั่ง*/
|
||||||
* ฟังก์ชันดึงข้อมูลราชชื่อส่งออกคำสั่ง
|
|
||||||
*/
|
|
||||||
function fetchList() {
|
function fetchList() {
|
||||||
|
selected.value = [];
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.registryNew("-employee") + `/temp`)
|
.get(config.API.registryNew("-employee") + `/temp`)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rows.value = res.data.result.data;
|
rows.value = res.data.result.data.map((e: DataEmployee) => ({
|
||||||
|
...e,
|
||||||
|
profileId: e.id,
|
||||||
|
}));
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -220,17 +204,13 @@ function fetchList() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันปิด Popup*/
|
||||||
* ฟังก์ชันปิด Popup
|
|
||||||
*/
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
selected.value = [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ทำเมื่อ modal เป็น true
|
* ทำเมื่อ modal เป็น true
|
||||||
*
|
|
||||||
* ทำการเรียก fetchList เพื่อข้อมูลราชชื่อส่งออกคำสั่ง
|
* ทำการเรียก fetchList เพื่อข้อมูลราชชื่อส่งออกคำสั่ง
|
||||||
*/
|
*/
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -243,13 +223,14 @@ watch(
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal">
|
<q-dialog v-model="modal">
|
||||||
<q-card style="min-width: 80%">
|
<q-card style="min-width: 70%">
|
||||||
<DialogHeader tittle="ส่งรายชื่อไปออกคำสั่ง" :close="closeDialog" />
|
<DialogHeader tittle="ส่งรายชื่อไปออกคำสั่ง" :close="closeDialog" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pt-none">
|
<q-card-section class="q-pt-none">
|
||||||
<div class="row q-col-gutter-sm">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-toolbar style="padding: 0">
|
<q-toolbar style="padding: 0">
|
||||||
|
<q-space />
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -258,7 +239,7 @@ watch(
|
||||||
v-model="filter"
|
v-model="filter"
|
||||||
ref="filterRef"
|
ref="filterRef"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="width: 850px; max-width: auto"
|
style="max-width: auto"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -336,6 +317,13 @@ watch(
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
|
<!-- dialog สร้างคำสั่ง -->
|
||||||
|
<DialogCreateCommand
|
||||||
|
v-model:modal="modalCommand"
|
||||||
|
:command-type-code="'C-PM-21'"
|
||||||
|
:persons="selected"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ async function fetchData() {
|
||||||
isDraft.value = data.isDraft;
|
isDraft.value = data.isDraft;
|
||||||
isSign.value = data.isSign;
|
isSign.value = data.isSign;
|
||||||
isAttachment.value = data.isAttachment;
|
isAttachment.value = data.isAttachment;
|
||||||
|
store.readonly = step.value > 2;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -64,8 +65,8 @@ function onConfirmSignature() {
|
||||||
.put(config.API.command + `/sign/${commandId.value}`, {
|
.put(config.API.command + `/sign/${commandId.value}`, {
|
||||||
sign: signaturetype.value === "Live" ? true : false,
|
sign: signaturetype.value === "Live" ? true : false,
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async () => {
|
||||||
fetchData();
|
await fetchData();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref, watch } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
||||||
// ฟอร์มข้อมูล
|
// ฟอร์มข้อมูล
|
||||||
let formData = reactive<FormDataDetail>({
|
let formData = reactive({
|
||||||
commandNo: "",
|
commandNo: "",
|
||||||
commandYear: null,
|
commandYear: null,
|
||||||
detailHeader: "",
|
detailHeader: "",
|
||||||
|
|
@ -46,7 +46,7 @@ let formData = reactive<FormDataDetail>({
|
||||||
commandAffectDate: null, //วันที่ลงนาม
|
commandAffectDate: null, //วันที่ลงนาม
|
||||||
commandExcecuteDate: null, //วันที่คำสั่งมีผล
|
commandExcecuteDate: null, //วันที่คำสั่งมีผล
|
||||||
isBangkok: null,
|
isBangkok: null,
|
||||||
isAttachment: true,
|
// isAttachment: true,
|
||||||
});
|
});
|
||||||
const modalPreview = ref<boolean>(false); //แสดงตัวอย่าง
|
const modalPreview = ref<boolean>(false); //แสดงตัวอย่าง
|
||||||
const isIdofficer = ref<boolean>(false); //เช็ค สกจ.
|
const isIdofficer = ref<boolean>(false); //เช็ค สกจ.
|
||||||
|
|
@ -102,13 +102,6 @@ onMounted(() => {
|
||||||
: props.formCommandList.isBangkok;
|
: props.formCommandList.isBangkok;
|
||||||
fetchCheckIdofficer();
|
fetchCheckIdofficer();
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชันที่ต้องการนำฟังก์ชันออกไปใช้ใน Components แม่
|
|
||||||
*/
|
|
||||||
defineExpose({
|
|
||||||
onSubmit,
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -95,8 +95,20 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
|
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "amount",
|
||||||
|
align: "left",
|
||||||
|
label: "เงินเดือน",
|
||||||
|
field: "amount",
|
||||||
|
format(val) {
|
||||||
|
return val ? val.toLocaleString() : "-";
|
||||||
|
},
|
||||||
|
sortable: true,
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
const visibleColumns = ref<String[]>(["no", "citizenId", "fullName"]);
|
const visibleColumns = ref<String[]>(["no", "citizenId", "fullName", "amount"]);
|
||||||
|
|
||||||
const modalSalary = ref<boolean>(false);
|
const modalSalary = ref<boolean>(false);
|
||||||
const titleName = ref<string>("");
|
const titleName = ref<string>("");
|
||||||
|
|
@ -122,9 +134,9 @@ async function onSawpPos(val: any, type: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.commandSwap("tab2", type, val.id))
|
.get(config.API.commandSwap("tab2", type, val.id))
|
||||||
.then((res) => {
|
.then(async () => {
|
||||||
|
await getPersonList();
|
||||||
success($q, "แก้ไขข้อมูลสำเร็จ");
|
success($q, "แก้ไขข้อมูลสำเร็จ");
|
||||||
getPersonList();
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -139,9 +151,9 @@ function onDelete(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.commandAction(id, "tab2"))
|
.delete(config.API.commandAction(id, "tab2"))
|
||||||
.then((res) => {
|
.then(async () => {
|
||||||
|
await getPersonList();
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
getPersonList();
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -221,15 +233,13 @@ async function getCommandSalaryList(type: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {}
|
|
||||||
|
|
||||||
/** ดึงข้อมูล บุคคล */
|
/** ดึงข้อมูล บุคคล */
|
||||||
async function getPersonList() {
|
async function getPersonList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.commandAction(commandId.value, "tab2"))
|
.get(config.API.commandAction(commandId.value, "tab2"))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = await res.data.result;
|
||||||
templatePos.value = data.commandSalaryId;
|
templatePos.value = data.commandSalaryId;
|
||||||
position.value = data.positionDetail;
|
position.value = data.positionDetail;
|
||||||
rows.value = data.commandRecives;
|
rows.value = data.commandRecives;
|
||||||
|
|
@ -248,13 +258,6 @@ onMounted(async () => {
|
||||||
await getCommandSalaryList(props.commandSysId);
|
await getCommandSalaryList(props.commandSysId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชันที่ต้องการนำฟังก์ชันออกไปใช้ใน Components แม่
|
|
||||||
*/
|
|
||||||
defineExpose({
|
|
||||||
onSubmit,
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -196,13 +196,6 @@ function onSubmit() {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchData();
|
fetchData();
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชันที่ต้องการนำฟังก์ชันออกไปใช้ใน Components แม่
|
|
||||||
*/
|
|
||||||
defineExpose({
|
|
||||||
onSubmit,
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,9 @@ const mixin = useCounterMixin();
|
||||||
const { messageError, showLoader, hideLoader } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
const commandId = ref<string>(route.params.id.toString());
|
const commandId = ref<string>(route.params.id.toString());
|
||||||
|
const props = defineProps({
|
||||||
|
formCommandList: { type: Object, required: true },
|
||||||
|
});
|
||||||
|
|
||||||
const isAttachment = defineModel<boolean>("isAttachment", { required: true });
|
const isAttachment = defineModel<boolean>("isAttachment", { required: true });
|
||||||
|
|
||||||
|
|
@ -90,14 +93,14 @@ async function downloadCover(type: string) {
|
||||||
if (tab.value === "main") {
|
if (tab.value === "main") {
|
||||||
genReport(
|
genReport(
|
||||||
dataCover.value,
|
dataCover.value,
|
||||||
"คำสั่ง คำสั่งบรรจุและแต่งตั้ง: สำหรับผู้สอบแข่งขันได้",
|
`คำสั่ง ${props.formCommandList.issue}`,
|
||||||
type,
|
type,
|
||||||
"?folder=command"
|
"?folder=command"
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
genReportXLSX(
|
genReportXLSX(
|
||||||
dataAttachment.value,
|
dataAttachment.value,
|
||||||
"เอกสารแนบท้าย คำสั่งบรรจุและแต่งตั้ง: สำหรับผู้สอบแข่งขันได้",
|
`เอกสารแนบท้าย ${props.formCommandList.issue}`,
|
||||||
type,
|
type,
|
||||||
"?folder=command"
|
"?folder=command"
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
import CurruncyInput from "@/components/CurruncyInput.vue";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { dialogConfirm, messageError, success } = useCounterMixin();
|
const { showLoader, hideLoader, dialogConfirm, messageError, success } =
|
||||||
|
useCounterMixin();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
getData: Function,
|
getData: Function,
|
||||||
|
|
@ -22,41 +22,53 @@ const commandEditRecive = defineModel<string>("commandEditRecive", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const formData = reactive({
|
const formData = reactive<any>({
|
||||||
salaryAmount: 0,
|
amount: null,
|
||||||
positionSalaryAmount: 0,
|
positionSalaryAmount: null,
|
||||||
monthSalaryAmount: 0,
|
mouthSalaryAmount: null,
|
||||||
remarkVertical: null,
|
remarkVertical: null,
|
||||||
remarkHorizontal: null,
|
remarkHorizontal: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.commandEditRecive("tab2", commandEditRecive.value), {
|
.put(config.API.commandEditRecive("tab2", commandEditRecive.value), {
|
||||||
mouthSalaryAmount: formData.salaryAmount, //เงินเดือน
|
mouthSalaryAmount:
|
||||||
positionSalaryAmount: formData.positionSalaryAmount, //เงินประจำตำแหน่ง
|
typeof formData.monthSalaryAmount === "string"
|
||||||
amount: formData.monthSalaryAmount, //เงินค่าตอบแทนรายเดือน
|
? Number(formData.monthSalaryAmount?.replace(/,/g, ""))
|
||||||
|
: formData.monthSalaryAmount, //เงินเดือน
|
||||||
|
positionSalaryAmount:
|
||||||
|
typeof formData.positionSalaryAmount === "string"
|
||||||
|
? Number(formData.positionSalaryAmount?.replace(/,/g, ""))
|
||||||
|
: formData.positionSalaryAmount, //เงินประจำตำแหน่ง
|
||||||
|
amount:
|
||||||
|
typeof formData.amount === "string"
|
||||||
|
? Number(formData.amount?.replace(/,/g, ""))
|
||||||
|
: formData.amount, //เงินค่าตอบแทนรายเดือน
|
||||||
remarkVertical: formData.remarkVertical, //หมายเหตุแนวตั้ง
|
remarkVertical: formData.remarkVertical, //หมายเหตุแนวตั้ง
|
||||||
remarkHorizontal: formData.remarkHorizontal, //หมายเหตุแนวนอน
|
remarkHorizontal: formData.remarkHorizontal, //หมายเหตุแนวนอน
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(async () => {
|
||||||
|
await props.getData?.();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
onClose();
|
onClose();
|
||||||
props.getData?.();
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClose() {
|
function onClose() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
formData.salaryAmount = 0;
|
formData.amount = null;
|
||||||
formData.positionSalaryAmount = 0;
|
formData.positionSalaryAmount = null;
|
||||||
formData.monthSalaryAmount = 0;
|
formData.monthSalaryAmount = null;
|
||||||
formData.remarkVertical = null;
|
formData.remarkVertical = null;
|
||||||
formData.remarkHorizontal = null;
|
formData.remarkHorizontal = null;
|
||||||
}
|
}
|
||||||
|
|
@ -67,9 +79,9 @@ watch(
|
||||||
if (modal.value) {
|
if (modal.value) {
|
||||||
if (props.selectPersonData) {
|
if (props.selectPersonData) {
|
||||||
const list = props.selectPersonData;
|
const list = props.selectPersonData;
|
||||||
formData.salaryAmount = list.mouthSalaryAmount;
|
formData.amount = list.amount;
|
||||||
formData.positionSalaryAmount = list.positionSalaryAmount;
|
formData.positionSalaryAmount = list.positionSalaryAmount;
|
||||||
formData.monthSalaryAmount = list.amount;
|
formData.monthSalaryAmount = list.mouthSalaryAmount;
|
||||||
formData.remarkVertical = list.remarkVertical;
|
formData.remarkVertical = list.remarkVertical;
|
||||||
formData.remarkHorizontal = list.remarkHorizontal;
|
formData.remarkHorizontal = list.remarkHorizontal;
|
||||||
}
|
}
|
||||||
|
|
@ -80,41 +92,76 @@ watch(
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card style="width: 50vw; max-width: 50vw">
|
<q-card style="min-width: 40vw">
|
||||||
<q-form q-form greedy @submit.prevent @validation-success="onSubmit">
|
<q-form q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
<DialogHeader :tittle="titleName" :close="onClose" />
|
<DialogHeader :tittle="titleName" :close="onClose" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<CurruncyInput
|
<!-- <CurruncyInput
|
||||||
:edit="true"
|
:edit="true"
|
||||||
:dense="true"
|
:dense="true"
|
||||||
v-model="formData.salaryAmount"
|
v-model="formData.amount"
|
||||||
:label="`${'เงินเดือน'}`"
|
:label="`${'เงินเดือน'}`"
|
||||||
:rules="[(val: any) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
:rules="[(val: any) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
/> -->
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
v-model="formData.amount"
|
||||||
|
class="inputgreen"
|
||||||
|
mask="###,###,###,###,###,###"
|
||||||
|
reverse-fill-mask
|
||||||
|
:label="`${'เงินเดือน'}`"
|
||||||
|
:rules="[(val: any) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<CurruncyInput
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
v-model="formData.positionSalaryAmount"
|
||||||
|
class="inputgreen"
|
||||||
|
mask="###,###,###,###,###,###"
|
||||||
|
reverse-fill-mask
|
||||||
|
:label="`${'เงินประจำตำแหน่ง'}`"
|
||||||
|
/>
|
||||||
|
<!-- <CurruncyInput
|
||||||
:edit="true"
|
:edit="true"
|
||||||
:dense="true"
|
:dense="true"
|
||||||
v-model="formData.positionSalaryAmount"
|
v-model="formData.positionSalaryAmount"
|
||||||
:label="`${'เงินประจำตำแหน่ง'}`"
|
:label="`${'เงินประจำตำแหน่ง'}`"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<CurruncyInput
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
v-model="formData.monthSalaryAmount"
|
||||||
|
class="inputgreen"
|
||||||
|
mask="###,###,###,###,###,###"
|
||||||
|
reverse-fill-mask
|
||||||
|
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
||||||
|
/>
|
||||||
|
<!-- <CurruncyInput
|
||||||
:edit="true"
|
:edit="true"
|
||||||
:dense="true"
|
:dense="true"
|
||||||
v-model="formData.monthSalaryAmount"
|
v-model="formData.monthSalaryAmount"
|
||||||
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
:label="`${'เงินค่าตอบแทนรายเดือน'}`"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-12">
|
<div class="col-xs-6 col-sm-6 col-md-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -123,7 +170,7 @@ watch(
|
||||||
v-model="formData.remarkVertical"
|
v-model="formData.remarkVertical"
|
||||||
label="หมายเหตุแนวตั้ง"
|
label="หมายเหตุแนวตั้ง"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="2"
|
rows="5"
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -134,7 +181,7 @@ watch(
|
||||||
v-model="formData.remarkHorizontal"
|
v-model="formData.remarkHorizontal"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
label="หมายเหตุแนวนอน"
|
label="หมายเหตุแนวนอน"
|
||||||
rows="2"
|
rows="5"
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch, reactive, onBeforeMount } from "vue";
|
import { onMounted, ref, reactive } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -18,21 +18,13 @@ import ReceivedCopy from "@/modules/18_command/components/Step/3_ReceivedCopy.vu
|
||||||
import Attached from "@/modules/18_command/components/Step/4_Attached.vue"; //คำสั่งและบัญชีแนบท้าบ
|
import Attached from "@/modules/18_command/components/Step/4_Attached.vue"; //คำสั่งและบัญชีแนบท้าบ
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
||||||
const store = useCommandDetail();
|
const store = useCommandDetail();
|
||||||
|
|
||||||
const childDetailRef = ref<InstanceType<typeof Detail> | null>(null); //ref components รายละเอียดคำสั่ง
|
|
||||||
const childListPersonsRef = ref<InstanceType<typeof ListPersons> | null>(null); //ref components รายชื่อผู้ออกคำสั่ง
|
|
||||||
const childReceivedCopyRef = ref<InstanceType<typeof ReceivedCopy> | null>(
|
|
||||||
null
|
|
||||||
); //ref components รายชื่อผู้ได้รับสำเนาคำสั่ง
|
|
||||||
const childAttachedRef = ref<InstanceType<typeof Attached> | null>(null); //ref components คำสั่งและบัญชีแนบท้าบ
|
|
||||||
|
|
||||||
const tabs = ref<string>("Main"); //Tab
|
const tabs = ref<string>("Main"); //Tab
|
||||||
const readonly = ref<boolean>(route.name === "commandViewDetailPage"); //อ่านได้อย่างเดียว
|
|
||||||
const isChangeData = ref<boolean>(false); //การเปลี่ยนแปลงของข้อมูล
|
const isChangeData = ref<boolean>(false); //การเปลี่ยนแปลงของข้อมูล
|
||||||
//รายการ Tab ละเอียดคำสั่ง
|
//รายการ Tab ละเอียดคำสั่ง
|
||||||
const tabsManu = ref<ItemTabs[]>([
|
const tabsManu = ref<ItemTabs[]>([
|
||||||
|
|
@ -62,7 +54,7 @@ let formCommandList = reactive<FormDataDetail>({
|
||||||
commandAffectDate: null, //วันที่ลงนาม
|
commandAffectDate: null, //วันที่ลงนาม
|
||||||
commandExcecuteDate: null, //วันที่คำสั่งมีผล
|
commandExcecuteDate: null, //วันที่คำสั่งมีผล
|
||||||
commandSysId: "", // ประเภท คำสั่ง
|
commandSysId: "", // ประเภท คำสั่ง
|
||||||
isAttachment:true
|
isAttachment: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -97,28 +89,8 @@ async function fetchDataCommandList() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ดูการเปลี่ยนแปลงของ tabs เมื่อมีการเปลี่ยนแปลง
|
|
||||||
*
|
|
||||||
* เช็คการเปลี่ยนแปลงของข้อมูล ถ้าการเปลี่ยนแปลงของข้อมูลจะบันทึกข้อมูล
|
|
||||||
*/
|
|
||||||
// watch(tabs, (newValue, oldValue) => {
|
|
||||||
// //เช็คการเปลี่ยนแปลงของข้อมูล
|
|
||||||
// if (isChangeData.value) {
|
|
||||||
// const refMap: { [key: string]: any } = {
|
|
||||||
// Detail: childDetailRef,
|
|
||||||
// ListPersons: childListPersonsRef,
|
|
||||||
// ReceivedCopy: childReceivedCopyRef,
|
|
||||||
// Attached: childAttachedRef,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// refMap[oldValue]?.value?.onSubmit();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ทำงานเมื่อ Components ถูกเรียกใช้งาน
|
* ทำงานเมื่อ Components ถูกเรียกใช้งาน
|
||||||
*
|
|
||||||
* กำหนดค่า `store.readonly` เมื่อ route.name เป็น "commandViewDetailPage" จะอ่านข้อมูลได้อย่างเดียว
|
* กำหนดค่า `store.readonly` เมื่อ route.name เป็น "commandViewDetailPage" จะอ่านข้อมูลได้อย่างเดียว
|
||||||
*/
|
*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
@ -169,7 +141,6 @@ onMounted(async () => {
|
||||||
<q-tab-panel style="padding: 0px" name="Main">
|
<q-tab-panel style="padding: 0px" name="Main">
|
||||||
<q-card>
|
<q-card>
|
||||||
<Main
|
<Main
|
||||||
ref="childDetailRef"
|
|
||||||
v-model:is-change-data="isChangeData"
|
v-model:is-change-data="isChangeData"
|
||||||
:on-check-change-data="onCheckChangeData"
|
:on-check-change-data="onCheckChangeData"
|
||||||
/>
|
/>
|
||||||
|
|
@ -179,7 +150,6 @@ onMounted(async () => {
|
||||||
<q-tab-panel style="padding: 0px" name="Detail">
|
<q-tab-panel style="padding: 0px" name="Detail">
|
||||||
<q-card>
|
<q-card>
|
||||||
<Detail
|
<Detail
|
||||||
ref="childDetailRef"
|
|
||||||
v-model:is-change-data="isChangeData"
|
v-model:is-change-data="isChangeData"
|
||||||
:on-check-change-data="onCheckChangeData"
|
:on-check-change-data="onCheckChangeData"
|
||||||
:fetch-data-command-list="fetchDataCommandList"
|
:fetch-data-command-list="fetchDataCommandList"
|
||||||
|
|
@ -190,7 +160,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
<q-tab-panel class="bg-grey-2" style="padding: 0px" name="ListPersons">
|
<q-tab-panel class="bg-grey-2" style="padding: 0px" name="ListPersons">
|
||||||
<ListPersons
|
<ListPersons
|
||||||
ref="childListPersonsRef"
|
|
||||||
v-model:is-change-data="isChangeData"
|
v-model:is-change-data="isChangeData"
|
||||||
:on-check-change-data="onCheckChangeData"
|
:on-check-change-data="onCheckChangeData"
|
||||||
:fetch-data-command-list="fetchDataCommandList"
|
:fetch-data-command-list="fetchDataCommandList"
|
||||||
|
|
@ -201,7 +170,6 @@ onMounted(async () => {
|
||||||
<q-tab-panel style="padding: 0px" name="ReceivedCopy">
|
<q-tab-panel style="padding: 0px" name="ReceivedCopy">
|
||||||
<q-card>
|
<q-card>
|
||||||
<ReceivedCopy
|
<ReceivedCopy
|
||||||
ref="childReceivedCopyRef"
|
|
||||||
v-model:is-change-data="isChangeData"
|
v-model:is-change-data="isChangeData"
|
||||||
:on-check-change-data="onCheckChangeData"
|
:on-check-change-data="onCheckChangeData"
|
||||||
/>
|
/>
|
||||||
|
|
@ -211,10 +179,10 @@ onMounted(async () => {
|
||||||
<q-tab-panel style="padding: 0px" name="Attached">
|
<q-tab-panel style="padding: 0px" name="Attached">
|
||||||
<q-card>
|
<q-card>
|
||||||
<Attached
|
<Attached
|
||||||
ref="childAttachedRef"
|
|
||||||
v-model:is-change-data="isChangeData"
|
v-model:is-change-data="isChangeData"
|
||||||
|
v-model:is-attachment="formCommandList.isAttachment"
|
||||||
:on-check-change-data="onCheckChangeData"
|
:on-check-change-data="onCheckChangeData"
|
||||||
v-model:is-attachment="formCommandList.isAttachment "
|
:form-command-list="formCommandList"
|
||||||
/>
|
/>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue