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

# Conflicts:
#	src/modules/03_recruiting/components/Address.vue
#	src/modules/03_recruiting/views/03_editor/index.vue
#	src/modules/04_registryPerson/components/Dialog/02_Address.vue
#	src/modules/04_registryPerson/components/detail/PersonalInformation/03_Address.vue
#	src/modules/05_placement/components/PersonalDetail/CheckInformation/02_FormAddress.vue
#	src/modules/05_placement/components/PersonalDetail/Information/Address.vue
This commit is contained in:
Warunee Tamkoo 2024-11-27 18:18:21 +07:00
commit 563f3e1b16
95 changed files with 580 additions and 489 deletions

View file

@ -416,7 +416,7 @@ watch(
class="cursor-pointer"
@click="filter = ''"
/>
<q-icon name="search" color="grey-5" />
<q-icon name="search" color="grey-5" v-else />
</template>
</q-input>
</div>

View file

@ -258,7 +258,11 @@ const getClass = (val: boolean) => {
:class="getClass(status == 'checkRegister' || status == 'payment')"
:readonly="!(status == 'checkRegister' || status == 'payment')"
:borderless="!(status == 'checkRegister' || status == 'payment')"
<<<<<<< HEAD
:rules="[(val:string) => !!val || `${'กรุณาเลือกแขวง/ตำบล '}`]"
=======
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง/ตำบล '}`]"
>>>>>>> 62f1c818415d928fd00ea2ddbde5ab6143efa1a1
:outlined="status == 'checkRegister' || status == 'payment'"
dense
lazy-rules
@ -382,7 +386,11 @@ const getClass = (val: boolean) => {
:class="getClass(status == 'checkRegister' || status == 'payment')"
:readonly="!(status == 'checkRegister' || status == 'payment')"
:borderless="!(status == 'checkRegister' || status == 'payment')"
<<<<<<< HEAD
:rules="[(val:string) => !!val || `${'กรุณาเลือกแขวง/ตำบล '}`]"
=======
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง/ตำบล '}`]"
>>>>>>> 62f1c818415d928fd00ea2ddbde5ab6143efa1a1
:outlined="status == 'checkRegister' || status == 'payment'"
dense
lazy-rules

View file

@ -1017,7 +1017,7 @@ onMounted(async () => {
:options="provinceOptions"
option-value="id"
:label="`${'จังหวัด'}`"
@update:model-value="(value) => selectProvince(value)"
@update:model-value="(value:any) => selectProvince(value)"
/>
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
@ -1036,8 +1036,8 @@ onMounted(async () => {
option-label="name"
:options="districtOptions"
option-value="id"
:label="`${'เขต/อำเภอ'}`"
@update:model-value="(value) => selectDistrict(value)"
:label="`${'เขต / อำเภอ'}`"
@update:model-value="(value:any) => selectDistrict(value)"
/>
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
@ -1057,7 +1057,7 @@ onMounted(async () => {
:options="subdistrictOptions"
option-value="id"
:label="`${'แขวง/ตำบล '}`"
@update:model-value="(value) => selectSubDistrict(value)"
@update:model-value="(value:any) => selectSubDistrict(value)"
/>
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
@ -1085,8 +1085,8 @@ onMounted(async () => {
v-model="address.tel"
:borderless="!enable.about"
:rules="[
(val) => !!val || `${'กรุณากรอก เบอร์โทร'}`,
(val) =>
(val:any) => !!val || `${'กรุณากรอก เบอร์โทร'}`,
(val:any) =>
val.length >= 10 || `${'กรุณากรอกข้อมูลเบอร์โทรให้ครบ'}`,
]"
:label="`${'เบอร์โทร'}`"

View file

@ -16,7 +16,7 @@ const dataLabel = {
registrationAddress: "ที่อยู่ตามทะเบียนบ้าน",
registrationProvince: "จังหวัด",
registrationDistrict: "เขต/อำเภอ",
registrationSubDistrict: "แขวง / ตำบล",
registrationSubDistrict: "แขวง/ตำบล",
registrationZipCode: "รหัสไปรษณีย์",
};
@ -51,8 +51,8 @@ async function selectDistrict(e: string | null, name: string) {
}
/**
* งกนเลอก แขวง / ตำบล
* @param e แขวง / ตำบล เลอก
* งกนเลอก แขวง/ตำบล
* @param e แขวง/ตำบล เลอก
* @param name 1 อยตามทะเบยนบาน 2 อยจจ
*/
function selectSubDistrict(e: string | null, name: string) {

View file

@ -63,6 +63,7 @@ const formInformations = reactive<RequestObject>({
firstName: "",
prefix: "",
rank: null,
prefixMain: "",
});
const formDataAddress = reactive<RequestregistrationAddressObject>({
@ -257,7 +258,7 @@ async function amiRequest() {
formInformations.nationality = data.value.nationalityDesc;
// dateOfBirth format 1989-01-01
formInformations.birthDate = conventDateOfBirth(`${data.value.dateOfBirth}`);
formInformations.birthDate = data.value.dateOfBirth ? conventDateOfBirth(`${data.value.dateOfBirth}`) : null;
age.value = storeLinkCenter.calculateAge(data.value.age);
formInformations.gender = data.value.genderDesc;
@ -327,15 +328,15 @@ async function convertDistrict(val: string) {
const id = storeLinkCenter.OpsAddress.districtOps.find(
(e: DataOption) => e.name === val
)?.id;
// /
// /
await storeLinkCenter.fetchSubDistrict(id ? id : null, "1", false);
return id ? id : null;
}
/**
* งกนแปลงชอแขวง / ตำบล เป ID
* @param val อแขวง / ตำบล
* งกนแปลงชอแขวง/ตำบล เป ID
* @param val อแขวง/ตำบล
*/
async function convertSubdistrict(val: string) {
const result = storeLinkCenter.OpsAddress.subdistrictOps.find(

View file

@ -66,7 +66,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
field: "name",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -261,8 +261,8 @@ function closeDialog() {
<q-form ref="myForm">
<div class="col-12 bg-grey-2 q-pa-sm">
<div class="col-12 row q-pb-sm q-col-gutter-sm items-center"></div>
<div class="q-col-gutter-xs row no-wrap">
<div class="col-4">
<q-toolbar>
<div class="row q-col-gutter-sm">
<q-select
hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]"
@ -279,9 +279,9 @@ function closeDialog() {
use-input
input-debounce="0"
@update:model-value="changeEmployeeClass"
style="width: 250px"
/>
</div>
<div class="col-3">
<q-select
hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือก ฟิลด์ที่จะค้น'}`]"
@ -298,59 +298,18 @@ function closeDialog() {
use-input
input-debounce="0"
@update:model-value="selectTypeKeyword(typeKeyword)"
style="width: 250px"
/>
</div>
<div class="col" v-if="typeKeyword === 'no'">
<q-input
borderless
outlined
dense
debounce="300"
v-model="Keyword"
placeholder="ตำแหน่งเลขที่"
:rules="[(val:string) => !!val || `${'กรุณากรอก ตำแหน่งเลขที่'}`]"
hide-bottom-space
/>
</div>
<div class="col" v-if="typeKeyword === 'position'">
<q-select
hide-bottom-space
:rules="[(val:string) => !!val || `${'กรุณาเลือก ตำแหน่ง'}`]"
outlined
dense
v-model="positionKeyword"
emit-value
map-options
:options="options"
option-label="name"
option-value="id"
:label="`${' เลือกตำแหน่ง'}`"
use-input
input-debounce="0"
@filter="filterFn"
behavior="menu"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template></q-select
>
</div>
<q-space />
<q-btn
color="primary"
icon="mdi-magnify"
label="ค้นหา"
@click="clickSearch(employeeClass)"
/>
</div>
</q-toolbar>
</div>
<div class="col-12 q-mt-sm">

View file

@ -47,7 +47,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "fullName",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullName",
headerStyle: "font-size: 14px; min-width: 200px",

View file

@ -215,6 +215,8 @@ async function getData() {
.get(config.API.profileNewGovernmentById(profileId.value, empType.value))
.then(async (res) => {
const data = await res.data.result;
console.log(data);
formMain.ocId = data.org ?? "-"; //
formMain.positionId = data.position ?? "-"; //
formMain.positionLine = data.positionField ?? "-"; //

View file

@ -39,7 +39,7 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const isLeave = defineModel<boolean>("isLeave", {
const isLeave = defineModel<boolean>("isLeave", {
required: true,
});
@ -230,7 +230,7 @@ function openDialogAdd() {
/**
* function fetch อมลรายการว
*/
function fetchData(id: string) {
async function fetchData(id: string) {
showLoader();
http
.get(config.API.profileNewDisciplineByProfileId(id, empType.value))
@ -398,7 +398,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
<q-btn-toggle

View file

@ -256,7 +256,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
<q-btn-toggle
@ -366,7 +365,7 @@ onMounted(() => {
flat
round
@click="openDialogEdit(props.row)"
><q-tooltip>แกไข</q-tooltip></q-btn
><q-tooltip>แกไขอม</q-tooltip></q-btn
>
</div>
</div>

View file

@ -82,7 +82,7 @@ const dataLabel = {
religion: "ศาสนา",
bloodGroup: "หมู่เลือด",
phone: "เบอร์โทร",
email: "อีเมล",
email: "อีเมล",
prefix: "คำนำหน้าชื่อ",
rank: "ยศ",
firstName: "ชื่อ",
@ -316,10 +316,11 @@ async function getData() {
function onClickOpenDialog() {
if (!informaData.value) return;
modal.value = true;
id.value = informaData.value.id;
age.value = calculateAge(informaData.value.birthDate);
formData.citizenId = informaData.value.citizenId;
formData.prefix = informaData.value.prefix;
formData.prefix = informaData.value.prefixMain;
formData.rank = informaData.value.rank;
formData.firstName = informaData.value.firstName;
formData.lastName = informaData.value.lastName;

View file

@ -461,7 +461,7 @@ onMounted(async () => {
icon="add"
@click="
() => {
changeNameData.prefix = profileInfo?.prefix;
changeNameData.prefix = profileInfo?.prefixMain;
changeNameData.firstName = profileInfo?.firstName;
changeNameData.lastName = profileInfo?.lastName;
prefixChange = changeNameData.prefix;
@ -496,7 +496,6 @@ onMounted(async () => {
outlined
emit-value
map-options
options-dense
option-value="name"
style="min-width: 140px"

View file

@ -252,7 +252,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
/**
* งกนดงขอมลทอย
*
* งขอมลทอย อมลจงหว อม เขต / อำเภอ และขอม แขวง / ตำบล
* งขอมลทอย อมลจงหว อม เขต / อำเภอ และขอม แขวง/ตำบล
*/
async function getData() {
showLoader();
@ -337,8 +337,8 @@ async function selectDistrict(e: string | null, name: string) {
}
/**
* งกนเลอก แขวง / ตำบล
* @param e แขวง / ตำบล เลอก
* งกนเลอก แขวง/ตำบล
* @param e แขวง/ตำบล เลอก
* @param name 1 อยตามทะเบยนบาน 2 อยจจ
*/
function selectSubDistrict(e: string | null, name: string) {
@ -941,7 +941,6 @@ onMounted(async () => {
map-options
:options="columnsHistory"
option-value="name"
style="min-width: 140px"
/>
</div>

View file

@ -1008,7 +1008,7 @@ onMounted(async () => {
/>
</div>
</div>
<div class="row q-mt-md">
<div class="row">
<div class="q-mr-sm">สถานภาพการม</div>
<div>
<q-radio

View file

@ -15,6 +15,7 @@ interface RequestObject {
relationship?: string | null;
religion?: string | null;
phone?: string | null;
prefixMain: string;
// telephoneNumber: string | null;
}

View file

@ -3,6 +3,7 @@ interface DataType {
posLevels: any;
posTypeName: string;
posTypeRank: number;
posTypeShortName?: string;
}
interface DataLevel {
@ -27,7 +28,7 @@ interface DataPerson {
}
interface DataRequest {
createdAt: string|Date;
createdAt: string | Date;
createdFullName?: string;
detail: string;
fullname: string;
@ -117,6 +118,7 @@ interface DataProfile {
posTypeName: string;
posTypeRank: number;
};
prefixMain: string;
}
interface DataLeave {

View file

@ -32,6 +32,7 @@ interface ResponseObject {
relationship: string | null;
religion: string | null;
telephoneNumber: string | null;
prefixMain: string;
}
interface Religion {
@ -94,6 +95,7 @@ interface PosType {
lastUpdateFullName: string;
posTypeName: string;
posTypeRank: number;
posTypeShortName?: string;
}
export type {

View file

@ -33,16 +33,17 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
]);
function fetchType(data: DataType[]) {
posTypeMain.value = data;
const list: DataOption[] = data.map((e: DataType) => ({
id: e.id,
name: e.posTypeName,
}));
posTypeOps.value = list;
}
function fetchLevel(data: DataLevel[]) {
function fetchLevel(data: DataLevel[], shortName: string = "") {
const list: DataOption[] = data.map((e: DataLevel) => ({
id: e.id,
name: e.posLevelName,
name: `${shortName} ${e.posLevelName} `,
}));
const seen = new Set();
posLevelOps.value = list.filter((item: DataOption) => {

View file

@ -130,7 +130,7 @@ export const useAddressDataStore = defineStore("addess", () => {
}
/**
* /
* /
* @param id /
* @param position ,
*/

View file

@ -243,7 +243,7 @@ export const useDataLinkCenter = defineStore("DataLinkCenter", () => {
}
/**
* /
* /
* @param id /
* @param position ,
*/

View file

@ -349,6 +349,8 @@ async function fetchDataPersonal() {
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
.then(async (res) => {
formDetail.value = res.data.result;
console.log(formDetail.value);
storeRegistry.isLeave = res.data.result.isLeave;
if (res.data.result.leaveReason) {
@ -956,7 +958,7 @@ onMounted(async () => {
{{ empType === "" ? "ระดับ" : "ระดับชั้นงาน" }}
</div>
<div class="col">
{{ formDetail?.posLevel?.posLevelName || "-" }}
{{ `${ empType === "" ? '': formDetail?.posType?.posTypeShortName } ${formDetail?.posLevel?.posLevelName}` || "-" }}
</div>
</div>
</div>

View file

@ -242,7 +242,10 @@ function selectType() {
*/
function selectPosType(item: DataOption) {
const dataType = store.posTypeMain.find((e: DataType) => e.id === item.id);
store.fetchLevel(dataType?.posLevels);
const shortName =
empType.value === "officer" ? "" : dataType?.posTypeShortName;
store.fetchLevel(dataType?.posLevels, shortName);
store.labelOption.posType = item.name;
store.labelOption.posLevel = "ทั้งหมด";
store.formFilter.page = 1;

View file

@ -13,6 +13,9 @@ const route = useRoute();
const store = useRegistryNewDataStore();
const isIDP = ref<boolean | null>(null);
const isEmployee = ref<boolean>(
route.name?.toString() == "registryNewRequestEditEMP" ? true : false
);
onBeforeMount(async () => {
isIDP.value = await (route.name?.toString() == "registryNewRequestEditEMP"
@ -39,6 +42,7 @@ onMounted(() => {
@click="router.go(-1)"
/>
รายการคำรองขอแกไขทะเบยนประว
{{ `(${isEmployee ? "ลูกจ้างประจำ" : "ข้าราชการ กทม.สามัญ"})` }}
</div>
</div>

View file

@ -16,8 +16,6 @@ import DialogPopupReason from "@/components/Dialogs/PopupReason.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
import AddList from "../ListRetirement/AddList.vue";
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
/** Use */
const route = useRoute();
const checkRoutePermisson = ref<boolean>(route.name == "retirementidDetail");
@ -38,10 +36,12 @@ const myForm = ref<QForm | null>(null);
/** ตัวแปร */
const retireld_params = route.params.retirementId;
const retireld = ref<string>(retireld_params.toString());
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
const modalNote = ref<boolean>(false);
const note = ref<string>("");
const retireProfileId = ref<string>("");
const retireld = ref<string>(retireld_params.toString());
const profileId = ref<string>("");
const filter = ref<string>("");
const statusUpload = ref<boolean>();
@ -56,7 +56,69 @@ const statusReport = ref<boolean>();
const dataProfile = ref<Object>([]);
/** คอลัมน์ที่แสดง */
const columns = ref<any["columns"]>([]);
const columns = ref<any["columns"]>([
{
name: "order",
label: "ลำดับ",
title: "ลำดับ",
field: "order",
align: "left",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "name",
align: "left",
label: "ชื่อ-นามสกุล",
title: "ชื่อ-นามสกุล",
field: "name",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "position",
align: "left",
label: "ตำแหน่ง",
title: "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ในสายงาน" : "",
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionType",
align: "left",
label: "ตำแหน่ง",
title: "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ประเภท" : "กลุ่มงาน",
field: "positionType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionNumber",
align: "left",
label: "ตำแหน่ง (เลขที่) ",
title: "ตำแหน่ง",
subtitle: "เลขที่",
field: "positionNumber",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "organization",
align: "left",
label: "สังกัด",
title: "สังกัด",
field: "organization",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val: any, row: any) {
return findOrgName(row);
},
},
]);
const rows = ref<RetirementList[]>([]);
const visibleColumns = ref<string[]>([
"order",
@ -79,118 +141,58 @@ function closeDialog() {
}
// fecthlist
async function fecthlistprofile(id: string) {
async function fetchlistprofile(id: string) {
showLoader();
await http
.get(config.API.listRetire(id))
.then((res) => {
dataProfile.value = res.data.result;
round.value = res.data.result.round;
statusReport.value = res.data.result.json;
typeReport.value = res.data.result.typeReport;
textReport.value = res.data.result.detail;
employeeType.value = res.data.result.type;
.then(async (res) => {
const data = await res.data.result;
dataProfile.value = data;
round.value = data.round;
statusReport.value = data.json;
typeReport.value = data.typeReport;
textReport.value = data.detail;
employeeType.value = data.type;
//
rows.value = res.data.result.profile.map((e: any) => ({
id: e.id,
profileId: e.profileId,
order: e.order,
prefix: e.prefix,
firstName: e.firstName,
lastName: e.lastName,
name: e.prefix + e.firstName + " " + e.lastName,
organization: e.root,
position: e.position,
positionNumber: e.posNo,
positionType: e.posTypeName,
positionLevel: e.posLevelName,
reason: e.reason,
remove: e.remove,
root: e.root,
rootId: e.rootId,
child1: e.child1,
child1Id: e.child1Id,
child2: e.child2,
child2Id: e.child2Id,
child3: e.child3,
child3Id: e.child3Id,
child4: e.child4,
child4Id: e.child4Id,
}));
if (data.profile !== null) {
rows.value = data.profile.map((e: any) => ({
id: e.id,
profileId: e.profileId,
order: e.order,
prefix: e.prefix,
firstName: e.firstName,
lastName: e.lastName,
name: e.prefix + e.firstName + " " + e.lastName,
organization: e.root,
position: e.position,
positionNumber: e.posNo,
positionType: e.posTypeName,
positionLevel: e.posLevelName,
reason: e.reason,
remove: e.remove,
root: e.root,
rootId: e.rootId,
child1: e.child1,
child1Id: e.child1Id,
child2: e.child2,
child2Id: e.child2Id,
child3: e.child3,
child3Id: e.child3Id,
child4: e.child4,
child4Id: e.child4Id,
}));
}
if (statusReport.value == false) {
fecthCheck(retireld.value);
await fecthCheck(retireld.value);
} else statusUpload.value = true;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
//
columns.value = [
{
name: "order",
label: "ลำดับ",
title: "ลำดับ",
field: "order",
align: "left",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
title: "ชื่อ - นามสกุล",
field: "name",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "position",
align: "left",
label: "ตำแหน่ง",
title: "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ในสายงาน" : "",
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionType",
align: "left",
label: "ตำแหน่ง",
title: "ตำแหน่ง",
subtitle: employeeType.value == "OFFICER" ? "ประเภท" : "กลุ่มงาน",
field: "positionType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionNumber",
align: "left",
label: "ตำแหน่ง (เลขที่) ",
title: "ตำแหน่ง",
subtitle: "เลขที่",
field: "positionNumber",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "organization",
align: "left",
label: "สังกัด",
title: "สังกัด",
field: "organization",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val: any, row: any) {
return findOrgName(row);
},
},
];
hideLoader();
});
}
@ -212,21 +214,23 @@ function clickDelete() {
dialogRemove(
$q,
async () => {
showLoader();
await http
.post(config.API.removeProfile(), {
retireProfileId: retireProfileId.value,
reason: note.value,
})
.then(() => {
.then(async () => {
retireld.value = retireld_params.toString();
await fetchlistprofile(retireld.value);
modalNote.value = false;
success($q, "ลบข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
retireld.value = retireld_params.toString();
await fecthlistprofile(retireld.value);
modalNote.value = false;
hideLoader();
});
},
"ยืนยันการลบข้อมูล",
@ -239,21 +243,23 @@ function saveNote() {
dialogConfirm(
$q,
async () => {
showLoader();
await http
.post(config.API.createnote(), {
retireProfileId: retireProfileId.value,
reason: note.value,
})
.then(() => {
.then(async () => {
retireld.value = retireld_params.toString();
await fetchlistprofile(retireld.value);
modalNote.value = false;
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
retireld.value = retireld_params.toString();
fecthlistprofile(retireld.value);
modalNote.value = false;
.finally(() => {
hideLoader();
});
},
"ยืนยันการบันทึกข้อมูล",
@ -264,7 +270,7 @@ function saveNote() {
// ListId
function UpdateListId(retireld: string, pId: string) {
profileId.value = pId;
fecthlistprofile(retireld);
fetchlistprofile(retireld);
}
//
@ -300,18 +306,18 @@ async function uploadFile(event: any, signDate: any) {
formdata
)
.then(async (res) => {
await fetchlistprofile(retireld.value);
modalUpload.value = false;
success($q, "เพิ่มไฟล์สำเร็จ");
fileUpload.value = null;
signDate.value = null;
modalUpload.value = false;
await fecthlistprofile(retireld.value);
await fecthCheck(retireld.value);
hideLoader();
success($q, "เพิ่มไฟล์สำเร็จ");
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {});
.finally(() => {
hideLoader();
});
},
"ยืนยันการอัปโหลดเอกสาร",
"ต้องการยืนยันการอัปโหลดเอกสารนี้หรือไม่ ?"
@ -333,13 +339,13 @@ async function downloadAttachment(type: string, id: string) {
.then(async (res) => {
const data = res.data.result;
await genReport(data, `รายชื่อผู้เกษียณอายุราชการ`, type);
hideLoader();
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
//
@ -349,17 +355,19 @@ function saveEdiitReport(reason: string) {
dialogConfirm(
$q,
async () => {
showLoader();
await http
.put(config.API.editDetail(retireld.value), formdata)
.then(() => {
fetchlistprofile(retireld.value);
modalEdit.value = false;
success($q, "แก้ไขข้อความสำเร็จ");
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
fecthlistprofile(retireld.value);
modalEdit.value = false;
hideLoader();
});
},
"ยืนยันการแก้ไขข้อมูล",
@ -400,9 +408,9 @@ function updatemodalPersonal(modal: boolean) {
}
/** Hook */
onMounted(() => {
onMounted(async () => {
retireld.value = retireld_params.toString();
fecthlistprofile(retireld.value);
await fetchlistprofile(retireld.value);
});
</script>
@ -525,7 +533,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
class="gt-xs q-ml-sm"
>

View file

@ -100,10 +100,10 @@ const yearOptions = ref<any>([{ id: "", year: "ทั้งหมด" }]);
//
async function fetchRetirement(type: string, year: any) {
showLoader();
rows.value = [];
await http
.get(config.API.retirement(type, year))
.then((res) => {
rows.value = [];
let data = res.data.result;
rows.value = data.map((items: any) => ({
id: items.id,
@ -335,7 +335,6 @@ onMounted(async () => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
class="col-xs-12 col-sm-3 col-md-2"
/>

View file

@ -308,7 +308,7 @@ const filterOption = ref<OptionData[]>([
},
{
id: "fullName",
name: "ชื่อ - นามสกุล",
name: "ชื่อ-นามสกุล",
},
]);

View file

@ -98,7 +98,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
field: "name",
sortable: true,
sort: (a: string, b: string) =>

View file

@ -76,7 +76,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
field: "name",
sortable: true,
headerStyle: "font-size: 14px",

View file

@ -128,12 +128,13 @@ const columns = ref<QTableProps["columns"]>([
},
{
name: "salaryDate",
name: "dateAppoint",
align: "left",
label: "วันที่แต่งตั้ง",
sortable: true,
field: "salaryDate",
field: "dateAppoint",
headerStyle: "font-size: 14px",
format: (val) => date2Thai(val),
style: "font-size: 14px",
},
{
@ -191,6 +192,7 @@ const visibleColumns = ref<String[]>([
"createdAt",
"dateRetireLaw",
"statustext",
"dateAppoint",
]);
/**

View file

@ -16,7 +16,7 @@ import DialogHeader from "@/components/DialogHeader.vue";
const $q = useQuasar();
const mixin = useCounterMixin();
const { dialogConfirm, success, messageError } = mixin;
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
const isRead = defineModel<boolean>("isRead", { required: true });
/** propsData จาก RoundMain */
const props = defineProps({
@ -104,22 +104,25 @@ function onSubmit() {
/** Function สร้างรอบการปฏิบัติงาน*/
async function postRoundDuty() {
showLoader();
await http
.post(config.API.roundDutytime(), formData)
.then(() => {
.then(async () => {
await props.fetchData?.();
await props.closeDialog?.();
success($q, "บันทึกข้อมูล");
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
props.fetchData?.();
props.closeDialog?.();
hideLoader();
});
}
/** Functiom แก้ไข้รอบการปฏิบัติงาน*/
async function putRoundDuty(id: string) {
showLoader();
const data = {
description: formData.description,
isDefault: formData.isDefault,
@ -127,15 +130,16 @@ async function putRoundDuty(id: string) {
};
await http
.put(config.API.roundDutytimeByid(id), data)
.then(() => {
.then(async () => {
await props.fetchData?.();
await props.closeDialog?.();
success($q, "บันทึกข้อมูล");
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
props.fetchData?.();
props.closeDialog?.();
hideLoader();
});
}

View file

@ -8,7 +8,7 @@ import { useQuasar } from "quasar";
import type { FormDetail } from "@/modules/09_leave/interface/response/work";
/** importComponents*/
import Map from "@/modules/09_leave/components/1_Work/DialogMap.vue";
import Map from "@/modules/09_leave/components/02_WorkList/DialogMap.vue";
/** importStores */
import { useCounterMixin } from "@/stores/mixin";

View file

@ -65,7 +65,9 @@ async function onClickSave() {
showLoader();
await http
.put(config.API.leaveEditCheckin(props.detail?.id), body)
.then(() => {
.then(async () => {
await props.fetchData?.();
await props.close?.();
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((err) => {
@ -73,14 +75,12 @@ async function onClickSave() {
})
.finally(() => {
hideLoader();
props.fetchData?.();
props.close?.();
});
});
}
}
function filterFnOptions(val: any, update: Function) {
function filterFnOptions(val: string, update: Function) {
update(() => {
options.value = optionsMain.value.filter(
(v: DataOption) => v.name.indexOf(val) > -1
@ -143,7 +143,7 @@ watch(
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
hide-bottom-space
use-input
@filter="(inputValue: any,doneFn: Function) => filterFnOptions(inputValue, doneFn)"
@filter="(inputValue: string,doneFn: Function) => filterFnOptions(inputValue, doneFn)"
><template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
@ -178,7 +178,7 @@ watch(
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
hide-bottom-space
use-input
@filter="(inputValue: any,doneFn: Function) => filterFnOptions(inputValue, doneFn)"
@filter="(inputValue: string,doneFn: Function) => filterFnOptions(inputValue, doneFn)"
><template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">

View file

@ -21,8 +21,8 @@ const mixin = useCounterMixin();
const $q = useQuasar();
const { date2Thai, monthYear2Thai, dateToISO, messageError } = mixin;
const apiGenReport =
"https://report-server.frappet.synology.me/api/v1/report-template/xlsx";
// const apiGenReport =
// "https://report-server.frappet.synology.me/api/v1/report-template/xlsx";
const props = defineProps({
modal: {
@ -126,7 +126,7 @@ function filterFnOptions(val: any, update: Function) {
*/
async function genReportXLSX(data: any) {
await axios
.post(apiGenReport, data, {
.post(`${config.API.reportTemplate}/xlsx`, data, {
headers: {
accept:
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
@ -134,9 +134,9 @@ async function genReportXLSX(data: any) {
},
responseType: "blob",
})
.then((res) => {
.then(async (res) => {
const blob = new Blob([res.data]);
downloadReport(blob, "xlsx");
await downloadReport(blob, "xlsx");
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));

View file

@ -12,8 +12,8 @@ import type {
} from "@/modules/09_leave/interface/response/work";
/** importComponents */
import ToolBar from "@/modules/09_leave/components/1_Work/ToolBar.vue";
import TableList from "@/modules/09_leave/components/1_Work/TableList.vue";
import ToolBar from "@/modules/09_leave/components/02_WorkList/ToolBar.vue";
import TableList from "@/modules/09_leave/components/02_WorkList/TableList.vue";
/** importStores */
import { useCounterMixin } from "@/stores/mixin";
@ -121,6 +121,7 @@ const rows = ref<TableRowsTime[]>([]);
/** function เรียกข้อมูล รายการลงเวลาที่ประมวลผลแล้ว*/
async function fetchListTimeRecord() {
rows.value = [];
const date = new Date(workStore.selectDate as string | Date);
const querySting = {
startDate: dateToISO(date), //*

View file

@ -12,8 +12,8 @@ import type {
} from "@/modules/09_leave/interface/response/work";
/** importComponents */
import ToolBarDate from "@/modules/09_leave/components/1_Work/ToolBarDate.vue";
import TableList from "@/modules/09_leave/components/1_Work/TableList.vue";
import ToolBarDate from "@/modules/09_leave/components/02_WorkList/ToolBarDate.vue";
import TableList from "@/modules/09_leave/components/02_WorkList/TableList.vue";
/** importStores */
import { useCounterMixin } from "@/stores/mixin";
@ -102,6 +102,7 @@ const maxPage = ref<number>(1);
/** function เรียกข้อมูลรายการลงเวลาปฏิบัติงาน (รายการลงเวลา) */
async function fetchListLogRecord() {
rows.value = [];
showLoader();
const date = new Date(workStore.selectDate as string | Date);
await http
@ -132,7 +133,6 @@ async function fetchListLogRecord() {
})
.catch((err) => {
messageError($q, err);
rows.value = [];
})
.finally(() => {
hideLoader();

View file

@ -5,8 +5,8 @@ import { checkPermission } from "@/utils/permissions";
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
/** importComponents */
import DialogDetail from "@/modules/09_leave/components/1_Work/DialogDetail.vue";
import DialogEdit from "@/modules/09_leave/components/1_Work/DialogEdit.vue";
import DialogDetail from "@/modules/09_leave/components/02_WorkList/DialogDetail.vue";
import DialogEdit from "@/modules/09_leave/components/02_WorkList/DialogEdit.vue";
const workStore = useWorklistDataStore();
const props = defineProps({
@ -44,7 +44,7 @@ const emit = defineEmits(["update:pagination"]);
/** ข้อมูล popup */
const modal = ref<boolean>(false);
const dataDetail = ref<any>([]);
const dataDetail = ref<any>();
const modalEdit = ref<boolean>(false);
/** pagination */

View file

@ -68,8 +68,8 @@ const pageSize = ref<number>(10);
const initialPagination = ref<any>({
sortBy: null,
descending: false,
page: 1,
rowsPerPage: pageSize, // set page
page: dataStore.page,
rowsPerPage: dataStore.pageSize, // set page
});
// Pagination - page & change page & get new data
@ -77,7 +77,7 @@ const currentPage = ref<number>(1);
const roundOp = ref<any>([]);
async function updatePagination(newPagination: any) {
initialPagination.value = newPagination;
currentPage.value = 1; // set current page 1 per row
// currentPage.value = 1; // set current page 1 per row
}
/** Function validateForm */
@ -103,7 +103,7 @@ function onSubmit() {
$q,
() => {
changeRound();
props.closeDialog?.();
// props.closeDialog?.();
},
"ยืนยันการบันทึกข้อมูล",
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
@ -112,6 +112,7 @@ function onSubmit() {
/** Function เปลี่ยนรอบเวลา*/
async function changeRound() {
showLoader();
await http
.post(config.API.leaveRound(), {
profileId: props.personId,
@ -121,12 +122,13 @@ async function changeRound() {
})
.then(() => {
success($q, "บันทึกข้อมูลเปลี่ยนรอบเวลา");
props.closeDialog?.();
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
props.closeDialog?.();
hideLoader();
});
}
@ -135,7 +137,7 @@ async function changeRound() {
*
*/
async function fetchDataOption() {
showLoader();
props.editCheck !== "history" && showLoader();
await http
.get(config.API.leaveRound())
.then((res) => {
@ -156,7 +158,7 @@ async function fetchDataOption() {
messageError($q, err);
})
.finally(() => {
hideLoader();
props.editCheck !== "history" && hideLoader();
});
}
@ -168,8 +170,9 @@ function close() {
}
watch(
[() => currentPage.value, () => initialPagination.value.rowsPerPage],
() => initialPagination.value.rowsPerPage,
() => {
currentPage.value = 1;
emit(
"update:change-page",
currentPage.value,
@ -179,6 +182,15 @@ watch(
}
);
function nextPage() {
emit(
"update:change-page",
currentPage.value,
initialPagination.value.rowsPerPage,
true
);
}
watch(
() => props.modal,
async () => {
@ -188,6 +200,7 @@ watch(
formData.effectiveDate = null;
}
if (props.modal === true) {
currentPage.value = 1;
await fetchDataOption();
}
}
@ -355,7 +368,7 @@ watch(
dense
class="custom-header-table"
:visible-columns="dataStore.visibleColumnsHistory"
:rows-per-page-options="[5, 10, 25, 50, 100]"
:rows-per-page-options="[10, 25, 50, 100]"
:pagination="initialPagination"
@update:pagination="updatePagination"
>
@ -370,6 +383,7 @@ watch(
boundary-links
direction-links
:max="Number(dataStore.maxPage)"
@update:model-value="nextPage"
></q-pagination>
</template>
<template v-slot:header="props">
@ -388,7 +402,7 @@ watch(
<q-tr :props="props" class="cursor-pointer">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div>
{{ col.value }}
{{ col.value ?? "-" }}
</div>
</q-td>
</q-tr>

View file

@ -16,18 +16,18 @@ import type { LeaveType } from "@/modules/09_leave/interface/response/leave";
/** importForm*/
import DialogReason from "@/components/Dialogs/PopupReason.vue";
import FormMain from "@/modules/09_leave/components/2_Leave/formDetail/formMain.vue"; // from
import FormLeave from "@/modules/09_leave/components/2_Leave/formDetail/formLeave.vue"; //
import FormChildbirth from "@/modules/09_leave/components/2_Leave/formDetail/formChildbirth.vue"; //
import FormHoliday from "@/modules/09_leave/components/2_Leave/formDetail/formHoliday.vue"; //
import FormUpasom from "@/modules/09_leave/components/2_Leave/formDetail/formUpasom.vue"; //
import FormHajj from "@/modules/09_leave/components/2_Leave/formDetail/formHajj.vue"; //
import FormCheckSelect from "@/modules/09_leave/components/2_Leave/formDetail/formCheckSelect.vue"; //
import FormStudy from "@/modules/09_leave/components/2_Leave/formDetail/formStudy.vue"; //
import FormLeaveToTraining from "@/modules/09_leave/components/2_Leave/formDetail/formLeaveToTraining.vue"; //
import FormLeaveToWorkInternational from "@/modules/09_leave/components/2_Leave/formDetail/formLeaveToWorkInternational.vue"; //
import FormSpouse from "@/modules/09_leave/components/2_Leave/formDetail/formSpouse.vue"; //
import FormVocationalRehabilitation from "@/modules/09_leave/components/2_Leave/formDetail/formVocationalRehabilitation.vue"; //
import FormMain from "@/modules/09_leave/components/05_Leave/formDetail/formMain.vue"; // from
import FormLeave from "@/modules/09_leave/components/05_Leave/formDetail/formLeave.vue"; //
import FormChildbirth from "@/modules/09_leave/components/05_Leave/formDetail/formChildbirth.vue"; //
import FormHoliday from "@/modules/09_leave/components/05_Leave/formDetail/formHoliday.vue"; //
import FormUpasom from "@/modules/09_leave/components/05_Leave/formDetail/formUpasom.vue"; //
import FormHajj from "@/modules/09_leave/components/05_Leave/formDetail/formHajj.vue"; //
import FormCheckSelect from "@/modules/09_leave/components/05_Leave/formDetail/formCheckSelect.vue"; //
import FormStudy from "@/modules/09_leave/components/05_Leave/formDetail/formStudy.vue"; //
import FormLeaveToTraining from "@/modules/09_leave/components/05_Leave/formDetail/formLeaveToTraining.vue"; //
import FormLeaveToWorkInternational from "@/modules/09_leave/components/05_Leave/formDetail/formLeaveToWorkInternational.vue"; //
import FormSpouse from "@/modules/09_leave/components/05_Leave/formDetail/formSpouse.vue"; //
import FormVocationalRehabilitation from "@/modules/09_leave/components/05_Leave/formDetail/formVocationalRehabilitation.vue"; //
import WorkFlow from "@/components/Workflow/Main.vue";
/** use */
@ -574,7 +574,7 @@ onMounted(async () => {
</div>
<div class="col-12 row">
<div class="col-xs-5 col-sm-3 text-grey-8">
- นามสก
-นามสก
</div>
<div class="col text-weight-medium">
{{ formData.fullName }}

View file

@ -19,18 +19,18 @@ import type { FremData } from "@/modules/09_leave/interface/request/leave";
/** importForm*/
import DialogReason from "@/components/Dialogs/PopupReason.vue";
import FormMain from "@/modules/09_leave/components/2_Leave/formDetail/formMain.vue"; // from
import FormLeave from "@/modules/09_leave/components/2_Leave/formDetail/formLeave.vue"; //
import FormChildbirth from "@/modules/09_leave/components/2_Leave/formDetail/formChildbirth.vue"; //
import FormHoliday from "@/modules/09_leave/components/2_Leave/formDetail/formHoliday.vue"; //
import FormUpasom from "@/modules/09_leave/components/2_Leave/formDetail/formUpasom.vue"; //
import FormHajj from "@/modules/09_leave/components/2_Leave/formDetail/formHajj.vue"; //
import FormCheckSelect from "@/modules/09_leave/components/2_Leave/formDetail/formCheckSelect.vue"; //
import FormStudy from "@/modules/09_leave/components/2_Leave/formDetail/formStudy.vue"; //
import FormLeaveToTraining from "@/modules/09_leave/components/2_Leave/formDetail/formLeaveToTraining.vue"; //
import FormLeaveToWorkInternational from "@/modules/09_leave/components/2_Leave/formDetail/formLeaveToWorkInternational.vue"; //
import FormSpouse from "@/modules/09_leave/components/2_Leave/formDetail/formSpouse.vue"; //
import FormVocationalRehabilitation from "@/modules/09_leave/components/2_Leave/formDetail/formVocationalRehabilitation.vue"; //
import FormMain from "@/modules/09_leave/components/05_Leave/formDetail/formMain.vue"; // from
import FormLeave from "@/modules/09_leave/components/05_Leave/formDetail/formLeave.vue"; //
import FormChildbirth from "@/modules/09_leave/components/05_Leave/formDetail/formChildbirth.vue"; //
import FormHoliday from "@/modules/09_leave/components/05_Leave/formDetail/formHoliday.vue"; //
import FormUpasom from "@/modules/09_leave/components/05_Leave/formDetail/formUpasom.vue"; //
import FormHajj from "@/modules/09_leave/components/05_Leave/formDetail/formHajj.vue"; //
import FormCheckSelect from "@/modules/09_leave/components/05_Leave/formDetail/formCheckSelect.vue"; //
import FormStudy from "@/modules/09_leave/components/05_Leave/formDetail/formStudy.vue"; //
import FormLeaveToTraining from "@/modules/09_leave/components/05_Leave/formDetail/formLeaveToTraining.vue"; //
import FormLeaveToWorkInternational from "@/modules/09_leave/components/05_Leave/formDetail/formLeaveToWorkInternational.vue"; //
import FormSpouse from "@/modules/09_leave/components/05_Leave/formDetail/formSpouse.vue"; //
import FormVocationalRehabilitation from "@/modules/09_leave/components/05_Leave/formDetail/formVocationalRehabilitation.vue"; //
import WorkFlow from "@/components/Workflow/Main.vue";
/** use */
@ -549,7 +549,7 @@ async function onClickDownloadFile(id: string, fileName: string, type: string) {
</div>
<div class="col-12 row">
<div class="col-xs-5 col-sm-3 text-grey-8">
- นามสก
-นามสก
</div>
<div class="col text-weight-medium">
{{ formData.fullName }}

View file

@ -8,14 +8,11 @@ import { useCounterMixin } from "@/stores/mixin";
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
/**importType*/
import type {
QuerySting,
DateFilter,
} from "@/modules/09_leave/interface/request/leave";
import type { QuerySting } from "@/modules/09_leave/interface/request/leave";
import TableList from "@/modules/09_leave/components/2_Leave/TableList.vue";
import ToolBar from "@/modules/09_leave/components/2_Leave/ToolBarLeave.vue";
import CalendarView from "@/modules/09_leave/components/2_Leave/Calendar.vue";
import TableList from "@/modules/09_leave/components/05_Leave/TableList.vue";
import ToolBar from "@/modules/09_leave/components/05_Leave/ToolBarLeave.vue";
import CalendarView from "@/modules/09_leave/components/05_Leave/Calendar.vue";
const $q = useQuasar(); // noti quasar
const mixin = useCounterMixin();
@ -49,13 +46,13 @@ async function fecthLeaveList() {
showLoader();
await http
.post(config.API.leaveList(), querySting)
.then((res) => {
.then(async (res) => {
const data = res.data.result;
totalList.value = Math.ceil(
res.data.result.total / querySting.pageSize
);
total.value = res.data.result.total;
leaveStore.fetchListLeave(data.data); /** ส่งข้อมูลไป stores*/
await leaveStore.fetchListLeave(data.data); /** ส่งข้อมูลไป stores*/
})
.catch((err) => {
messageError($q, err);
@ -75,8 +72,7 @@ async function fetchOption() {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {});
});
}
function getSearch() {
@ -95,13 +91,12 @@ watch(
() => leaveStore.tabView,
async () => {
leaveStore.tabView === "list" &&
(await fecthLeaveList(), await fetchOption());
(await Promise.all([fetchOption(), fecthLeaveList()]));
}
);
onMounted(async () => {
await fetchOption();
await fecthLeaveList();
await Promise.all([fetchOption(), fecthLeaveList()]);
});
</script>
<template>
@ -144,7 +139,12 @@ onMounted(async () => {
</q-tabs>
</q-toolbar>
<div v-if="leaveStore.tabView === 'list'">
<ToolBar :dataToobar="dataToobar" v-model:query-sting="querySting" :get-list="fecthLeaveList" :get-search="getSearch"/>
<ToolBar
:dataToobar="dataToobar"
v-model:query-sting="querySting"
:get-list="fecthLeaveList"
:get-search="getSearch"
/>
<TableList
v-model:total="total"
v-model:total-list="totalList"

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, reactive, onMounted,watch } from "vue";
import { ref, reactive, onMounted, watch } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
@ -13,8 +13,8 @@ import type {
DateFilter,
} from "@/modules/09_leave/interface/request/leave";
import TableList from "@/modules/09_leave/components/2_Leave/TableList.vue";
import ToolBar from "@/modules/09_leave/components/2_Leave/ToolBarLeave.vue";
import TableList from "@/modules/09_leave/components/05_Leave/TableList.vue";
import ToolBar from "@/modules/09_leave/components/05_Leave/ToolBarLeave.vue";
const mixin = useCounterMixin();
const leaveStore = useLeavelistDataStore();
@ -63,28 +63,6 @@ async function fecthLeaveList() {
hideLoader();
});
}
// const data = APIDATA.data;
}
/**
*
* @param newPage หน
* @param pageSize จำนวนตอแถว
* @param dateFilter อมลคนหา
*/
async function updatePaging(
newPage: number,
pageSize: number,
dateFilter: DateFilter
) {
querySting.year = dateFilter ? dateFilter.year : querySting.year;
querySting.type = dateFilter ? dateFilter.type : querySting.type;
querySting.status = dateFilter ? dateFilter.status : querySting.status;
querySting.page = newPage;
querySting.pageSize = pageSize ? pageSize : querySting.pageSize;
querySting.keyword = dateFilter ? dateFilter.keyword : querySting.keyword;
await fecthLeaveList();
}
/** function เรียกข้อมูลสถานะ*/
@ -96,8 +74,7 @@ async function fetchOption() {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {});
});
}
function getSearch() {
@ -113,8 +90,7 @@ watch(
);
onMounted(async () => {
await fetchOption();
await fecthLeaveList();
await Promise.all([fetchOption(), fecthLeaveList()]);
});
</script>
<template>

View file

@ -261,7 +261,7 @@ onMounted(() => {
dense
class="custom-header-table"
:visible-columns="leaveStore.visibleColumns"
:rows-per-page-options="[1, 25, 50, 100]"
:rows-per-page-options="[10, 25, 50, 100]"
@update:pagination="updatePagination"
>
<template v-slot:header="props">
@ -290,9 +290,7 @@ onMounted(() => {
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{
(pagination.page - 1) * pagination.pageSize +
props.rowIndex +
1
(pagination.page - 1) * pagination.pageSize + props.rowIndex + 1
}}
</div>
<div v-else-if="col.name == 'leaveTypeName'">

View file

@ -1,4 +1,4 @@
interface dataPost {
interface DataPost {
cardId: string;
firstName: string;
lastName: string;
@ -28,7 +28,7 @@ interface MyObjectRoundChangeMainRef {
[key: string]: any;
}
export type {
dataPost,
DataPost,
changeRoundEdit,
MyObjectRoundChangeRef,
MyObjectRoundChangeMainRef,

View file

@ -1,16 +1,15 @@
const workMain = () => import("@/modules/09_leave/views/WorkingMain.vue");
const leaveMain = () => import("@/modules/09_leave/views/LeaveListMain.vue");
const workMain = () => import("@/modules/09_leave/views/02_WorkingMain.vue");
const leaveMain = () => import("@/modules/09_leave/views/05_LeaveListMain.vue");
const leaveDetail = () =>
import("@/modules/09_leave/components/2_Leave/DetailLeave.vue");
import("@/modules/09_leave/components/05_Leave/DetailLeave.vue");
const leaveDetailReject = () =>
import("@/modules/09_leave/components/2_Leave/DetailLeaveReject.vue");
const RoundMain = () => import("@/modules/09_leave/views/RoundMain.vue");
import("@/modules/09_leave/components/05_Leave/DetailLeaveReject.vue");
const RoundMain = () => import("@/modules/09_leave/views/01_RoundMain.vue");
const ChangeRoundMain = () =>
import("@/modules/09_leave/views/ChangeRoundMain.vue");
import("@/modules/09_leave/views/03_ChangeRoundMain.vue");
const SpecialTimeMain = () =>
import("@/modules/09_leave/views/SpecialTimeMain.vue");
const leaveReport = () =>
import("@/modules/09_leave/components/3_Report/LeaveReport.vue");
import("@/modules/09_leave/views/04_SpecialTimeMain.vue");
const leaveReport = () => import("@/modules/09_leave/views/06_ReportMain.vue");
export default [
{
path: "/round-time",

View file

@ -116,23 +116,22 @@ export const useChangeRoundDataStore = defineStore(
// ข้อมูลในตาราง
function setProfileId(id: string) {
console.log(profileId);
profileId.value = id;
}
const maxPageMain = ref<number>(0);
const totalListMain = ref<number>(0);
function fetchDataForCardId(dataDetail: any) {
async function fetchDataForCardId(dataDetail: any) {
if (dataDetail) {
showLoader();
http
await http
.post(config.API.leaveSearch(), {
citizenId: dataDetail.cardId || "", //เลขประจำตัวประชาชน
firstname: dataDetail.firstName || "", //ชื่อจริง
lastname: dataDetail.lastName || "", //นามสกุล
page: dataDetail.page || 1, //*หน้า
pageSize: dataDetail.pageSize || 10, //*จำนวนแถวต่อหน้า
page: dataDetail.page, //หน้า
pageSize: dataDetail.pageSize || 10, //จำนวนแถวต่อหน้า
keyword: dataDetail.keyword || "", //keyword ค้นหา
})
.then((res) => {
@ -150,10 +149,10 @@ export const useChangeRoundDataStore = defineStore(
roundStart: e.startTimeMorning,
roundEnd: e.leaveTimeAfterNoon,
currentRound: `${e.startTimeMorning}-${e.leaveTimeAfterNoon}`,
effectiveDate: date2Thai(e.effectiveDate) ?? "-",
effectiveDate: e.effectiveDate
? date2Thai(e.effectiveDate)
: "-",
}));
console.log(profileId.value);
console.log(apiData.length);
} else {
rows.value = [];
checkCilck.value = true;
@ -162,7 +161,7 @@ export const useChangeRoundDataStore = defineStore(
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
.finally(() => {
hideLoader();
});
}
@ -181,13 +180,13 @@ export const useChangeRoundDataStore = defineStore(
* @param pageSizeVal pagesize
*/
async function changePage(pageVal: number, pageSizeVal: number) {
page.value = await pageVal;
pageSize.value = await pageSizeVal;
page.value = pageVal;
pageSize.value = pageSizeVal;
fetchDatainHistory();
}
/**ฟังก์ชั่นดึงดาต้าประวัติ */
async function fetchDatainHistory() {
console.log(profileId.value);
rowsHistory.value = [];
showLoader();
await http
.get(
@ -196,7 +195,6 @@ export const useChangeRoundDataStore = defineStore(
)
.then((res) => {
const dataHistory = res.data.result.data;
rowsHistory.value = [];
dataHistory.map((e: DataInterface) => {
rowsHistory.value.push({
round: e.round,
@ -208,9 +206,7 @@ export const useChangeRoundDataStore = defineStore(
});
total.value = res.data.result.total;
maxPage.value = Math.ceil(total.value / pageSize.value);
maxPage.value = maxPage.value < 1 ? 1 : maxPage.value;
});
console.log(rowsHistory.value);
})
.catch((err) => {
messageError($q, err);
@ -234,6 +230,8 @@ export const useChangeRoundDataStore = defineStore(
changePage,
total,
maxPage,
page,
pageSize,
totalListMain,
maxPageMain,

View file

@ -62,7 +62,7 @@ export const useRoundDataStore = defineStore("roundWorkStore", () => {
* Function API map
* @param data API
*/
function fetchData(data: dataRowRound[]) {
async function fetchData(data: dataRowRound[]) {
let datalist: roundShow[] = data.map((e: dataRowRound) => {
return {
id: e.id,

View file

@ -9,7 +9,7 @@ import { useRoundDataStore } from "@/modules/09_leave/stores/RoundStores";
import { useCounterMixin } from "@/stores/mixin";
/** ImportComponents*/
import DialogForm from "@/modules/09_leave/components/3_WorkTime/DialogForm.vue";
import DialogForm from "@/modules/09_leave/components/01_RoundTime/DialogForm.vue";
import { checkPermission } from "@/utils/permissions";
const $q = useQuasar(); // noti quasar
@ -35,13 +35,13 @@ const resetFilter = () => {
};
/** Function get ข้อมูลรายการรอบการปฏิบัติงาน */
async function fetchListRoind() {
async function fetchListRound() {
showLoader();
await http
.get(config.API.roundDutytime())
.then((res) => {
const data = res.data.result;
fetchData(data);
.then(async (res) => {
const data = await res.data.result;
await fetchData(data);
})
.catch((err) => {
messageError($q, err);
@ -57,16 +57,18 @@ async function fetchListRoind() {
*/
function onClickDelete(id: string) {
dialogRemove($q, async () => {
showLoader();
await http
.delete(config.API.roundDutytimeByid(id))
.then(() => {
.then(async () => {
await fetchListRound();
success($q, "ลบข้อมูลสำเร็จ");
})
.catch((err) => {
messageError($q, err);
})
.finally(async () => {
await fetchListRoind();
.finally(() => {
hideLoader();
});
});
}
@ -112,8 +114,8 @@ const pagination = ref({
});
/** Hook*/
onMounted(() => {
fetchListRoind();
onMounted(async () => {
await fetchListRound();
});
</script>
<template>
@ -172,7 +174,6 @@ onMounted(() => {
map-options
:options="dataStore.columns"
option-value="name"
style="min-width: 140px"
class="col-xs-12 col-sm-3 col-md-2"
/>
@ -285,7 +286,7 @@ onMounted(() => {
:closeDialog="closeDialog"
:editCheck="editCheck"
:detailData="detailData"
:fetchData="fetchListRoind"
:fetchData="fetchListRound"
v-model:isRead="isRead"
/>
</template>

View file

@ -2,9 +2,9 @@
import { ref } from "vue";
/** import Components */
import Tab1 from "@/modules/09_leave/components/1_Work/Tab1.vue";
import Tab2 from "@/modules/09_leave/components/1_Work/Tab2.vue";
import DialogReport from "@/modules/09_leave/components/1_Work/DialogReport.vue";
import Tab1 from "@/modules/09_leave/components/02_WorkList/Tab1.vue";
import Tab2 from "@/modules/09_leave/components/02_WorkList/Tab2.vue";
import DialogReport from "@/modules/09_leave/components/02_WorkList/DialogReport.vue";
const tab = ref("1");

View file

@ -8,9 +8,9 @@ import { useCounterMixin } from "@/stores/mixin";
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
import { checkPermission } from "@/utils/permissions";
import type { dataPost } from "@/modules/09_leave/interface/request/changeRound";
import type { DataPost } from "@/modules/09_leave/interface/request/changeRound";
import Dialogform from "@/modules/09_leave/components/4_ChangeRound/DialogForm.vue";
import Dialogform from "@/modules/09_leave/components/03_ChangeRound/DialogForm.vue";
/** useStore */
const mixin = useCounterMixin();
@ -32,7 +32,7 @@ const dateWork = ref<string>("NORMAL");
const modalFix = ref<boolean>(false);
const editCheck = ref<string>("");
const DataRow = ref<any>();
const formData = reactive<dataPost>({
const formData = reactive<DataPost>({
cardId: "",
firstName: "",
lastName: "",
@ -45,14 +45,15 @@ const formData = reactive<dataPost>({
* @param check action edit,history
* @param detail รายละเอยดขอมลรอบการปฏของผใชงาน
*/
function Openmodal(check: string, detail: any) {
async function Openmodal(check: string, detail: any) {
DataRow.value = detail;
modal.value = true;
dataStore.setProfileId(DataRow.value.profileId);
editCheck.value = check;
if (check === "history") {
modal.value = true;
dataStore.fetchDatainHistory();
dataStore.changePage(1, dataStore.pageSize);
// dataStore.fetchDatainHistory();
}
}
@ -71,15 +72,15 @@ async function fetchDataCalendarWork(id: string) {
messageError($q, err);
})
.finally(() => {
modalFix.value = true;
hideLoader();
});
}
const detailByid = ref();
async function OpenmodalFix(detail: any) {
await fetchDataCalendarWork(detail.profileId);
detailByid.value = detail;
modalFix.value = true;
await fetchDataCalendarWork(detail.profileId);
}
/** Function closePopup */
@ -95,14 +96,15 @@ function save() {
.put(config.API.leaveWorkByid(detailByid.value.profileId), {
work: dateWork.value,
})
.then(() => {
.then(async () => {
// await searchData();
success($q, "บันทึกข้อมูลสำเร็จ");
closeDialog();
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
closeDialog();
hideLoader();
});
});
@ -113,14 +115,13 @@ function save() {
* @param newPagination อม Pagination ใหม
*/
function updatePagination(newPagination: any) {
formData.page = 1;
formData.pageSize = newPagination.rowsPerPage;
}
/** Function ค้นหาข้อมูล */
function searchData() {
async function searchData() {
if (formData.cardId || formData.firstName || formData.lastName) {
dataStore.fetchDataForCardId(formData);
await dataStore.fetchDataForCardId(formData);
} else {
dialogMessageNotify($q, "กรุณากรอกข้อมูลอย่างน้อย 1 ช่อง");
}
@ -129,6 +130,7 @@ function searchData() {
watch(
() => formData.pageSize,
() => {
formData.page = 1;
searchData();
}
);
@ -291,7 +293,7 @@ watch(
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div>
{{ col.value }}
{{ col.value ?? '-' }}
</div>
</q-td>
</q-tr>

View file

@ -12,11 +12,10 @@ import { checkPermission } from "@/utils/permissions";
import type {
DataDateMonthObject,
DetailData,
Pagination,
} from "@/modules/09_leave/interface/request/specialTime";
import DialogReason from "@/components/Dialogs/PopupReason.vue";
import DialogApprove from "@/modules/09_leave/components/4_specialTime/DialogApprove.vue";
import DialogApprove from "@/modules/09_leave/components/04_SpecialTime/DialogApprove.vue";
const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
@ -28,6 +27,7 @@ const {
showLoader,
success,
date2Thai,
dialogConfirm,
} = mixin;
const emit = defineEmits(["update:change-page"]);
const rows = ref<any[]>([]);
@ -86,7 +86,6 @@ const visibleColumns = ref<String[]>([
"timeAfternoon",
"description",
]);
const columns = ref<QTableProps["columns"]>([
{
name: "no",
@ -192,23 +191,25 @@ function closeDialog() {
/** API reject */
async function clickSave(reason: string) {
showLoader();
modalUnapprove.value = false;
const body = {
reason: reason,
};
await http
.put(config.API.specialTimeReject(id.value), body)
.then(() => {
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
await fetchData();
hideLoader();
});
dialogConfirm($q, async () => {
showLoader();
modalUnapprove.value = false;
const body = {
reason: reason,
};
await http
.put(config.API.specialTimeReject(id.value), body)
.then(async () => {
await fetchData();
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
}
/**
@ -396,7 +397,6 @@ onMounted(async () => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
class="col-xs-12 col-sm-3 col-md-2"
/>
@ -475,6 +475,7 @@ onMounted(async () => {
"
>อน</q-btn
>
<q-badge
v-if="props.row.status == 'APPROVE'"
rounded

View file

@ -3,8 +3,8 @@
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
/**importComponets*/
import Tab1 from "@/modules/09_leave/components/2_Leave/Tab1.vue";
import Tab2 from "@/modules/09_leave/components/2_Leave/Tab2.vue";
import Tab1 from "@/modules/09_leave/components/05_Leave/Tab1.vue";
import Tab2 from "@/modules/09_leave/components/05_Leave/Tab2.vue";
const leaveStore = useLeavelistDataStore();
</script>

View file

@ -82,17 +82,17 @@ async function fetchLeaveday(
await http
.post(config.API.leaveReportLeaveday(type), body)
.then((res) => {
.then(async (res) => {
const data = res.data.result;
data && genReport(data);
!data && hideLoader();
data && (await genReport(data));
detailReport.value = data;
})
.catch((err) => {
messageError($q, err);
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
/**
@ -101,7 +101,7 @@ async function fetchLeaveday(
*/
async function genReport(data: any) {
await axios
.post(apiGenReport, data, {
.post(`${config.API.reportTemplate}/xlsx`, data, {
headers: {
accept: "application/pdf",
"content-Type": "application/json",
@ -135,7 +135,7 @@ async function genReport(data: any) {
*/
async function genReportXLSX(data: any) {
await axios
.post(apiGenReport, data, {
.post(`${config.API.reportTemplate}/xlsx`, data, {
headers: {
accept:
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",

View file

@ -98,7 +98,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",

View file

@ -1348,7 +1348,7 @@ onMounted(async () => {
@click="openEditDirector(props.row)"
icon="edit"
>
<q-tooltip>แกไข</q-tooltip>
<q-tooltip>แกไขอม</q-tooltip>
</q-btn>
<q-btn
v-if="!checkRoutePermisson && !isReadonly"

View file

@ -1551,7 +1551,7 @@ onMounted(async () => {
@click="openEditDirector(props.row)"
icon="edit"
>
<q-tooltip>แกไข</q-tooltip>
<q-tooltip>แกไขอม</q-tooltip>
</q-btn>
<q-btn

View file

@ -114,7 +114,7 @@ const columnsRespondent = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",

View file

@ -127,7 +127,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "fullname",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullname",
headerStyle: "font-size: 14px",

View file

@ -201,7 +201,7 @@ export const useInvestigateDisStore = defineStore(
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",

View file

@ -56,7 +56,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",
@ -153,7 +153,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",

View file

@ -192,7 +192,7 @@ export const useDisciplineResultStore = defineStore(
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",

View file

@ -49,7 +49,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",

View file

@ -161,7 +161,7 @@ onMounted(() => {
borderless
readonly
:model-value="formDetail.fullName"
label="ชื่อ - นามสกุล"
label="ชื่อ-นามสกุล"
/>
</div>
<div class="col-xs-6 col-sm-4 col-md-3">

View file

@ -106,7 +106,7 @@ const columnsRespondent = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",

View file

@ -105,7 +105,7 @@ const columnsRespondent = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",

View file

@ -13,7 +13,7 @@ import type {
DataOptionTechnique,
FormProjectDetail,
DataOption,
StrategyNode
StrategyNode,
} from "@/modules/15_development/interface/index/Main";
import type { DataStrategic } from "@/modules/15_development/interface/response/Main";
@ -310,12 +310,24 @@ function fetchTree() {
}
/** Main save */
function onSubmit() {
async function onSubmit() {
showLoader();
http
await http
.put(config.API.developmentMainTab("tab3", projectId.value), {
...formData,
totalDate: formData.totalDate === "" ? null : formData.totalDate,
projectDayBackPlanned:
formData.projectDayBackPlanned === ""
? null
: formData.projectDayBackPlanned,
projectDayHoldPlanned:
formData.projectDayHoldPlanned === ""
? null
: formData.projectDayHoldPlanned,
projectNigthHoldPlanned:
formData.projectNigthHoldPlanned === ""
? null
: formData.projectNigthHoldPlanned,
reasonPlanned70: reasonPlanned70.value,
reasonPlanned20: reasonPlanned20.value,
reasonPlanned10: reasonPlanned10.value,
@ -392,6 +404,21 @@ function updatetotalDate() {
function onNextTab() {
step.value == "next" ? props.nextStep() : props.prevStep();
}
const isCheckLocation = computed(() => {
if (formData?.developmentAddresss?.length !== 0) {
if (
formData.developmentAddresss[formData.developmentAddresss.length - 1]
.address !== "" &&
formData.developmentAddresss[formData.developmentAddresss.length - 1]
.provinceId !== ""
) {
return true;
} else return false;
}
return true;
});
/**
* งขอมลเมอคอมโพเนนตโหลดเสรจสมบรณ
*/
@ -465,6 +492,7 @@ defineExpose({
</template>
</q-input>
<q-tree
style="height: 350px; overflow: scroll"
dense
:nodes="nodes"
selected-color="primary"
@ -529,6 +557,7 @@ defineExpose({
</template>
</q-input>
<q-tree
style="height: 350px; overflow: scroll"
dense
:nodes="nodes"
node-key="id"
@ -680,8 +709,9 @@ defineExpose({
<div class="col-12 q-mt-md">
<span class="text-bold">สถานทดำเนนการ</span>
<q-btn
v-if="!checkRoutePermission"
v-if="!checkRoutePermission && isCheckLocation"
dense
flat
round
@ -785,11 +815,15 @@ defineExpose({
value="GO_BLACK"
label="ไป-กลับ"
v-model="formData.isBackPlanned"
@update:model-value="props.onCheckChangeData()"
@update:model-value="
props.onCheckChangeData(),
(formData.projectDayBackPlanned = null)
"
></q-checkbox>
</div>
<div class="col-12 col-md-4">
<q-input
:disable="!formData.isBackPlanned"
:readonly="
store.projectStatus === 'FINISH' || checkRoutePermission
"
@ -816,11 +850,16 @@ defineExpose({
value="HOLD"
label="พักค้าง"
v-model="formData.isHoldPlanned"
@update:model-value="props.onCheckChangeData()"
@update:model-value="
props.onCheckChangeData(),
(formData.projectDayHoldPlanned = null),
(formData.projectNigthHoldPlanned = null)
"
></q-checkbox>
</div>
<div class="col-12 col-md-4">
<q-input
:disable="!formData.isHoldPlanned"
:readonly="
store.projectStatus === 'FINISH' || checkRoutePermission
"
@ -836,6 +875,7 @@ defineExpose({
</div>
<div class="col-12 col-md-4">
<q-input
:disable="!formData.isHoldPlanned"
:readonly="
store.projectStatus === 'FINISH' || checkRoutePermission
"

View file

@ -64,7 +64,7 @@ const baseColumns = ref<QTableProps["columns"]>([
{
name: "fullName",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullName",
headerStyle: "font-size: 14px",

View file

@ -374,7 +374,9 @@ function onSubmitRelate() {
amount: formGroupRelate.amount,
}
)
.then(() => {
.then(async () => {
await fetchData(projectId.value);
onClickCloseDialog();
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((err) => {
@ -395,7 +397,9 @@ function onSubmitRelate() {
amount: formGroupRelate.amount,
}
)
.then(() => {
.then(async () => {
await fetchData(projectId.value);
onClickCloseDialog();
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((err) => {
@ -405,10 +409,6 @@ function onSubmitRelate() {
hideLoader();
});
}
setTimeout(() => {
fetchData(projectId.value);
onClickCloseDialog();
}, 100);
});
}
@ -434,7 +434,7 @@ function onClickCloseDialog() {
modalRelate.value = false;
cleanFormData();
fetchType();
fetchData(projectId.value);
// fetchData(projectId.value);
}
/**

View file

@ -26,7 +26,7 @@ const order = ref<string>(""); //เลขที่คำสั่ง/เลข
/** ตัวแปรข้อมูลข้าราชการ */
const formMain = reactive<FormAddHistory>({
id: "",
name: "", // -
name: "", //-
prefix: "", //
rank: "", //
firstName: "", //
@ -147,7 +147,7 @@ onMounted(async () => {
</div>
<div class="row col-12">
<div class="col-sm-12 col-md-5 text-grey-6 text-weight-medium">
- นามสก
-นามสก
</div>
<div class="col-12 col-sm-12 col-md-7">

View file

@ -56,7 +56,7 @@ const govOp = ref<DataOption[]>([
},
{
id: "fullName",
name: "ชื่อ - นามสกุล",
name: "ชื่อ-นามสกุล",
},
]);
@ -82,7 +82,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",

View file

@ -29,7 +29,7 @@ const order = ref<string>("");
/** ตัวแปรข้อมูลข้าราชการ */
const formMain = reactive<FormAddHistoryEmployee>({
id: "",
name: "", // -
name: "", //-
prefix: "", //
rank: "", //
firstName: "", //
@ -159,7 +159,7 @@ onMounted(() => {
</div>
<div class="row col-12">
<div class="col-sm-12 col-md-5 text-grey-6 text-weight-medium">
- นามสก
-นามสก
</div>
<div class="col-12 col-sm-12 col-md-7">

View file

@ -90,7 +90,12 @@ interface FormProjectDetail {
dateStart: Date | null; //วันที่เริ่มต้น
dateEnd: Date | null; //วันที่สิ้นสุด
totalDate: number | null | string; //รวมระยะเวลา (วัน)
developmentAddresss: [{ address: string; provinceId: string }]; //ที่อยู่ ,จังหวัด
developmentAddresss: DevelopmentAddress[]; //ที่อยู่ ,จังหวัด
}
interface DevelopmentAddress {
address: string;
provinceId: string;
}
interface DataHistory {

View file

@ -88,7 +88,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",
@ -388,7 +388,6 @@ onMounted(async () => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
</div>
</q-toolbar>

View file

@ -65,7 +65,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "name",
align: "left",
label: "ชื่อ - นามสกุล",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "name",
headerStyle: "font-size: 14px",
@ -409,7 +409,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
</div>
</q-toolbar>

View file

@ -417,19 +417,18 @@ onMounted(() => {
map-options
@update:model-value="fetchListProjectNew"
/>
<q-toolbar-title>
<q-btn
v-if="checkPermission($route)?.attrIsCreate"
flat
round
dense
icon="add"
color="primary"
@click="onAdd()"
>
<q-tooltip>เพมขอม</q-tooltip>
</q-btn>
</q-toolbar-title>
<q-btn
v-if="checkPermission($route)?.attrIsCreate"
flat
round
dense
icon="add"
color="primary"
@click="onAdd()"
>
<q-tooltip>เพมขอม</q-tooltip>
</q-btn>
<q-space />
@ -480,7 +479,6 @@ onMounted(() => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
</q-toolbar>