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:
commit
563f3e1b16
95 changed files with 580 additions and 489 deletions
|
|
@ -148,6 +148,7 @@ const path =
|
||||||
"https://bma-ehr-manual.frappet.synology.me";
|
"https://bma-ehr-manual.frappet.synology.me";
|
||||||
|
|
||||||
const generatePopupPath = (routeName: any) => {
|
const generatePopupPath = (routeName: any) => {
|
||||||
|
console.log("🚀 ~ generatePopupPath ~ routeName:", routeName);
|
||||||
if (routeName.includes("metadata")) {
|
if (routeName.includes("metadata")) {
|
||||||
return `${path}/manual/chapter-2-admin-metadata`;
|
return `${path}/manual/chapter-2-admin-metadata`;
|
||||||
} else if (routeName.includes("registryNew")) {
|
} else if (routeName.includes("registryNew")) {
|
||||||
|
|
@ -174,38 +175,74 @@ const generatePopupPath = (routeName: any) => {
|
||||||
return `${path}/manual/chapter-12-admin-retirement`;
|
return `${path}/manual/chapter-12-admin-retirement`;
|
||||||
} else if (routeName.includes("discharged")) {
|
} else if (routeName.includes("discharged")) {
|
||||||
return `${path}/manual/chapter-12-admin-retirement`;
|
return `${path}/manual/chapter-12-admin-retirement`;
|
||||||
} else if (routeName.includes("discipline")) {
|
} else if (routeName.includes("disciplineComplaints")) {
|
||||||
return `${path}/manual/chapter-15-admin-discipline`;
|
return `${path}/manual/chapter-14-admin-discipline-complaints`;
|
||||||
} else if (routeName.includes("appeal")) {
|
} else if (routeName.includes("disciplineInvestigatefacts")) {
|
||||||
return `${path}/manual/chapter-15-admin-discipline`;
|
return `${path}/manual/chapter-14-2-admin-discipline-investigatefacts`;
|
||||||
|
} else if (routeName.includes("disciplineDisciplinary")) {
|
||||||
|
return `${path}/manual/chapter-14-3-admin-discipline-disciplinary`;
|
||||||
|
} else if (routeName.includes("disciplineResult")) {
|
||||||
|
return `${path}/manual/chapter-14-4-admin-discipline-result`;
|
||||||
|
} else if (routeName.includes("disciplineListSuspend")) {
|
||||||
|
return `${path}/manual/chapter-14-5-admin-discipline-suspend`;
|
||||||
|
} else if (routeName.includes("appealComplain")) {
|
||||||
|
return `${path}/manual/chapter-14-6-admin-discipline-appealcomplain`;
|
||||||
|
} else if (routeName.includes("disciplineDirector")) {
|
||||||
|
return `${path}/manual/chapter-14-7-admin-discipline-director`;
|
||||||
|
} else if (routeName.includes("disciplineChannel")) {
|
||||||
|
return `${path}/manual/chapter-14-7-2-admin-discipline-channel`;
|
||||||
} else if (routeName.includes("KPIIndicatorByPlan")) {
|
} else if (routeName.includes("KPIIndicatorByPlan")) {
|
||||||
return `${path}/manual/chapter-2-1-admin-evaluate`;
|
return `${path}/manual/chapter-2-admin-evaluate`;
|
||||||
} else if (routeName.includes("KPIIndicatorByRole")) {
|
} else if (routeName.includes("KPIIndicatorByRole")) {
|
||||||
return `${path}/manual/chapter-2-2-admin-evaluate`;
|
return `${path}/manual/chapter-2-1-2-admin-evaluate`;
|
||||||
} else if (routeName.includes("KPIAssignment")) {
|
} else if (routeName.includes("KPIAssignment")) {
|
||||||
return `${path}/manual/chapter-2-3-admin-evaluate`;
|
return `${path}/manual/chapter-2-1-3-admin-evaluate`;
|
||||||
} else if (routeName.includes("KPICompetency")) {
|
} else if (routeName.includes("KPICompetency")) {
|
||||||
return `${path}/manual/chapter-2-4-admin-evaluate`;
|
return `${path}/manual/chapter-2-2-admin-evaluate`;
|
||||||
} else if (routeName.includes("strategic")) {
|
} else if (routeName.includes("strategic")) {
|
||||||
return `${path}/manual/chapter-2-5-admin-evaluate`;
|
return `${path}/manual/chapter-2-3-admin-evaluate`;
|
||||||
} else if (routeName.includes("salary")) {
|
|
||||||
return `${path}/manual/chapter-17-admin-salary`;
|
|
||||||
} else if (routeName == "commandListPage") {
|
} else if (routeName == "commandListPage") {
|
||||||
return `${path}/manual/chapter-7-admin-order`;
|
return `${path}/manual/chapter-7-admin-order`;
|
||||||
} else if (routeName == "competePeriod") {
|
} else if (routeName == "competePeriod") {
|
||||||
return `${path}/manual/chapter-8-2-1-admin-compete-period`;
|
return `${path}/manual/chapter-8-3-admin-compete-period`;
|
||||||
} else if (routeName == "qualifyPeriod") {
|
} else if (routeName == "qualifyPeriod") {
|
||||||
return `${path}/manual/chapter-8-3-1-admin-qualify-period`;
|
return `${path}/manual/chapter-8-4-1-admin-qualify-period`;
|
||||||
} else if (routeName == "disablePeriod") {
|
} else if (routeName == "disablePeriod") {
|
||||||
return `${path}/manual/chapter-8-3-2-admin-disable-period`;
|
return `${path}/manual/chapter-8-4-2-admin-disable-period`;
|
||||||
} else if (routeName == "manage") {
|
} else if (routeName == "manage") {
|
||||||
return `${path}/manual/chapter-8-3-3-admin-qualify-manage`;
|
return `${path}/manual/chapter-8-4-3-admin-qualify-manage`;
|
||||||
} else if (routeName == "qualifyPeriodStat") {
|
} else if (routeName == "qualifyPeriodStat") {
|
||||||
return `${path}/manual/chapter-8-3-4-admin-qualify-period-stat`;
|
return `${path}/manual/chapter-8-4-4-admin-qualify-period-stat`;
|
||||||
} else if (routeName == "qualifyPeriodStatDisable") {
|
} else if (routeName == "qualifyPeriodStatDisable") {
|
||||||
return `${path}/manual/chapter-8-3-5-admin-qualify-disable-stat`;
|
return `${path}/manual/chapter-8-4-5-admin-qualify-disable-stat`;
|
||||||
} else if (routeName.includes("competePeriodStat")) {
|
} else if (routeName.includes("competePeriodStat")) {
|
||||||
return `${path}/manual/chapter-8-2-2-admin-compete-period-stat`;
|
return `${path}/manual/chapter-8-3-2-admin-compete-period-stat`;
|
||||||
|
} else if (routeName.includes("probation")) {
|
||||||
|
return `${path}/manual/chapter-10-admin-probation`;
|
||||||
|
} else if (routeName.includes("insigniaProposals")) {
|
||||||
|
return `${path}/manual/chapter-12-admin-insignia`;
|
||||||
|
} else if (routeName.includes("insigniaManage")) {
|
||||||
|
return `${path}/manual/chapter-12-2-admin-insignia`;
|
||||||
|
} else if (routeName.includes("insigniaRecord")) {
|
||||||
|
return `${path}/manual/chapter-12-3-admin-insignia`;
|
||||||
|
} else if (routeName.includes("insigniaAllocate")) {
|
||||||
|
return `${path}/manual/chapter-12-4-admin-insignia`;
|
||||||
|
} else if (routeName.includes("insigniaBorrow")) {
|
||||||
|
return `${path}/manual/chapter-12-5-admin-insignia`;
|
||||||
|
} else if (routeName.includes("insigniaReport")) {
|
||||||
|
return `${path}/manual/chapter-12-6-admin-insignia`;
|
||||||
|
} else if (routeName.includes("roundTime")) {
|
||||||
|
return `${path}/manual/chapter-13-admin-leave`;
|
||||||
|
} else if (routeName.includes("workList")) {
|
||||||
|
return `${path}/manual/chapter-13-2-admin-leave`;
|
||||||
|
} else if (routeName.includes("changeRound")) {
|
||||||
|
return `${path}/manual/chapter-13-3-admin-leave`;
|
||||||
|
} else if (routeName.includes("timestampSpecial")) {
|
||||||
|
return `${path}/manual/chapter-13-4-admin-leave`;
|
||||||
|
} else if (routeName == "leave") {
|
||||||
|
return `${path}/manual/chapter-13-5-admin-leave`;
|
||||||
|
} else if (routeName == "leaveReport") {
|
||||||
|
return `${path}/manual/chapter-13-6-admin-leave`;
|
||||||
} else if (
|
} else if (
|
||||||
routeName.includes("qualify") ||
|
routeName.includes("qualify") ||
|
||||||
routeName.includes("recruiting") ||
|
routeName.includes("recruiting") ||
|
||||||
|
|
@ -214,10 +251,38 @@ const generatePopupPath = (routeName: any) => {
|
||||||
routeName.includes("manage")
|
routeName.includes("manage")
|
||||||
) {
|
) {
|
||||||
return `${path}/manual/chapter-9-admin-recruit`;
|
return `${path}/manual/chapter-9-admin-recruit`;
|
||||||
} else if (routeName.includes("development")) {
|
} else if (routeName.includes("developmentMain")) {
|
||||||
return `${path}/manual/chapter-19-admin-development`;
|
return `${path}/manual/chapter-18-admin-development`;
|
||||||
} else if (routeName.includes("evaluate")) {
|
} else if (routeName.includes("developmentHistory")) {
|
||||||
return `${path}/manual/chapter-18-admin-perf-evaluation`;
|
return `${path}/manual/chapter-18-2-admin-development-history`;
|
||||||
|
} else if (routeName.includes("developmentEmployeeHistory")) {
|
||||||
|
return `${path}/manual/chapter-18-3-admin-development-employee-history`;
|
||||||
|
} else if (routeName.includes("developmentScholarship")) {
|
||||||
|
return `${path}/manual/chapter-18-4-admin-development-scholarship`;
|
||||||
|
} else if (routeName == "evaluate") {
|
||||||
|
return `${path}/manual/chapter-15-admin-KPI`;
|
||||||
|
} else if (routeName == "evaluateDirector") {
|
||||||
|
return `${path}/manual/chapter-15-2-admin-KPI`;
|
||||||
|
} else if (routeName == "evaluateMeeting") {
|
||||||
|
return `${path}/manual/chapter-15-2-2-admin-KPI`;
|
||||||
|
} else if (routeName == "salaryChart") {
|
||||||
|
return `${path}/manual/chapter-16-admin-salary`;
|
||||||
|
} else if (routeName == "salaryEmployeeChart") {
|
||||||
|
return `${path}/manual/chapter-16-2-admin-salary`;
|
||||||
|
} else if (routeName == "salaryRound") {
|
||||||
|
return `${path}/manual/chapter-16-3-admin-salary`;
|
||||||
|
} else if (routeName == "salaryLists") {
|
||||||
|
return `${path}/manual/chapter-16-4-admin-salary`;
|
||||||
|
} else if (routeName == "salaryEmployeeLists") {
|
||||||
|
return `${path}/manual/chapter-16-5-admin-salary`;
|
||||||
|
} else if (routeName == "KPIRound") {
|
||||||
|
return `${path}/manual/chapter-17-admin-development`;
|
||||||
|
} else if (routeName == "KPIList") {
|
||||||
|
return `${path}/manual/chapter-17-2-admin-development-history`;
|
||||||
|
} else if (routeName == "KPIResults") {
|
||||||
|
return `${path}/manual/chapter-17-3-admin-development-employee-history`;
|
||||||
|
} else if (routeName == "KPIReport") {
|
||||||
|
return `${path}/manual/chapter-17-4-admin-development-scholarship`;
|
||||||
} else {
|
} else {
|
||||||
return manualConfig[routeName as keyof typeof manualConfig];
|
return manualConfig[routeName as keyof typeof manualConfig];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
dense
|
dense
|
||||||
:pagination-label="paginationLabel"
|
:pagination-label="paginationLabel"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
ทั้งหมด {{ attrs.rows.length }} รายการ
|
ทั้งหมด {{ attrs.rows.length }} รายการ
|
||||||
|
|
|
||||||
|
|
@ -416,7 +416,7 @@ watch(
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
@click="filter = ''"
|
@click="filter = ''"
|
||||||
/>
|
/>
|
||||||
<q-icon name="search" color="grey-5" />
|
<q-icon name="search" color="grey-5" v-else />
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,11 @@ const getClass = (val: boolean) => {
|
||||||
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||||
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||||
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
<<<<<<< HEAD
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกแขวง/ตำบล '}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกแขวง/ตำบล '}`]"
|
||||||
|
=======
|
||||||
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง/ตำบล '}`]"
|
||||||
|
>>>>>>> 62f1c818415d928fd00ea2ddbde5ab6143efa1a1
|
||||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -382,7 +386,11 @@ const getClass = (val: boolean) => {
|
||||||
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||||
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||||
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||||
|
<<<<<<< HEAD
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกแขวง/ตำบล '}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกแขวง/ตำบล '}`]"
|
||||||
|
=======
|
||||||
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง/ตำบล '}`]"
|
||||||
|
>>>>>>> 62f1c818415d928fd00ea2ddbde5ab6143efa1a1
|
||||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
|
||||||
|
|
@ -1017,7 +1017,7 @@ onMounted(async () => {
|
||||||
:options="provinceOptions"
|
:options="provinceOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:label="`${'จังหวัด'}`"
|
:label="`${'จังหวัด'}`"
|
||||||
@update:model-value="(value) => selectProvince(value)"
|
@update:model-value="(value:any) => selectProvince(value)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
|
|
@ -1036,8 +1036,8 @@ onMounted(async () => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="districtOptions"
|
:options="districtOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:label="`${'เขต/อำเภอ'}`"
|
:label="`${'เขต / อำเภอ'}`"
|
||||||
@update:model-value="(value) => selectDistrict(value)"
|
@update:model-value="(value:any) => selectDistrict(value)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
|
|
@ -1057,7 +1057,7 @@ onMounted(async () => {
|
||||||
:options="subdistrictOptions"
|
:options="subdistrictOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:label="`${'แขวง/ตำบล '}`"
|
:label="`${'แขวง/ตำบล '}`"
|
||||||
@update:model-value="(value) => selectSubDistrict(value)"
|
@update:model-value="(value:any) => selectSubDistrict(value)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
|
|
@ -1085,8 +1085,8 @@ onMounted(async () => {
|
||||||
v-model="address.tel"
|
v-model="address.tel"
|
||||||
:borderless="!enable.about"
|
:borderless="!enable.about"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอก เบอร์โทร'}`,
|
(val:any) => !!val || `${'กรุณากรอก เบอร์โทร'}`,
|
||||||
(val) =>
|
(val:any) =>
|
||||||
val.length >= 10 || `${'กรุณากรอกข้อมูลเบอร์โทรให้ครบ'}`,
|
val.length >= 10 || `${'กรุณากรอกข้อมูลเบอร์โทรให้ครบ'}`,
|
||||||
]"
|
]"
|
||||||
:label="`${'เบอร์โทร'}`"
|
:label="`${'เบอร์โทร'}`"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const dataLabel = {
|
||||||
registrationAddress: "ที่อยู่ตามทะเบียนบ้าน",
|
registrationAddress: "ที่อยู่ตามทะเบียนบ้าน",
|
||||||
registrationProvince: "จังหวัด",
|
registrationProvince: "จังหวัด",
|
||||||
registrationDistrict: "เขต/อำเภอ",
|
registrationDistrict: "เขต/อำเภอ",
|
||||||
registrationSubDistrict: "แขวง / ตำบล",
|
registrationSubDistrict: "แขวง/ตำบล",
|
||||||
registrationZipCode: "รหัสไปรษณีย์",
|
registrationZipCode: "รหัสไปรษณีย์",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -51,8 +51,8 @@ async function selectDistrict(e: string | null, name: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชันเลือก แขวง / ตำบล
|
* ฟังก์ชันเลือก แขวง/ตำบล
|
||||||
* @param e แขวง / ตำบล ที่เลือก
|
* @param e แขวง/ตำบล ที่เลือก
|
||||||
* @param name 1 คือ ที่อยู่ตามทะเบียนบ้าน 2 คือ ที่อยู่ปัจจุบัน
|
* @param name 1 คือ ที่อยู่ตามทะเบียนบ้าน 2 คือ ที่อยู่ปัจจุบัน
|
||||||
*/
|
*/
|
||||||
function selectSubDistrict(e: string | null, name: string) {
|
function selectSubDistrict(e: string | null, name: string) {
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ const formInformations = reactive<RequestObject>({
|
||||||
firstName: "",
|
firstName: "",
|
||||||
prefix: "",
|
prefix: "",
|
||||||
rank: null,
|
rank: null,
|
||||||
|
prefixMain: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const formDataAddress = reactive<RequestregistrationAddressObject>({
|
const formDataAddress = reactive<RequestregistrationAddressObject>({
|
||||||
|
|
@ -257,7 +258,7 @@ async function amiRequest() {
|
||||||
formInformations.nationality = data.value.nationalityDesc;
|
formInformations.nationality = data.value.nationalityDesc;
|
||||||
|
|
||||||
// แปลง dateOfBirth เป็น format 1989-01-01
|
// แปลง 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);
|
age.value = storeLinkCenter.calculateAge(data.value.age);
|
||||||
formInformations.gender = data.value.genderDesc;
|
formInformations.gender = data.value.genderDesc;
|
||||||
|
|
||||||
|
|
@ -327,15 +328,15 @@ async function convertDistrict(val: string) {
|
||||||
const id = storeLinkCenter.OpsAddress.districtOps.find(
|
const id = storeLinkCenter.OpsAddress.districtOps.find(
|
||||||
(e: DataOption) => e.name === val
|
(e: DataOption) => e.name === val
|
||||||
)?.id;
|
)?.id;
|
||||||
// เรียกฟังก์ชันดึงข้อมูล แขวง / ตำบล
|
// เรียกฟังก์ชันดึงข้อมูล แขวง/ตำบล
|
||||||
await storeLinkCenter.fetchSubDistrict(id ? id : null, "1", false);
|
await storeLinkCenter.fetchSubDistrict(id ? id : null, "1", false);
|
||||||
|
|
||||||
return id ? id : null;
|
return id ? id : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชันแปลงชื่อแขวง / ตำบล เป็น ID
|
* ฟังก์ชันแปลงชื่อแขวง/ตำบล เป็น ID
|
||||||
* @param val ชื่อแขวง / ตำบล
|
* @param val ชื่อแขวง/ตำบล
|
||||||
*/
|
*/
|
||||||
async function convertSubdistrict(val: string) {
|
async function convertSubdistrict(val: string) {
|
||||||
const result = storeLinkCenter.OpsAddress.subdistrictOps.find(
|
const result = storeLinkCenter.OpsAddress.subdistrictOps.find(
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
@ -261,8 +261,8 @@ function closeDialog() {
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<div class="col-12 bg-grey-2 q-pa-sm">
|
<div class="col-12 bg-grey-2 q-pa-sm">
|
||||||
<div class="col-12 row q-pb-sm q-col-gutter-sm items-center"></div>
|
<div class="col-12 row q-pb-sm q-col-gutter-sm items-center"></div>
|
||||||
<div class="q-col-gutter-xs row no-wrap">
|
<q-toolbar>
|
||||||
<div class="col-4">
|
<div class="row q-col-gutter-sm">
|
||||||
<q-select
|
<q-select
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]"
|
||||||
|
|
@ -279,9 +279,9 @@ function closeDialog() {
|
||||||
use-input
|
use-input
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
@update:model-value="changeEmployeeClass"
|
@update:model-value="changeEmployeeClass"
|
||||||
|
style="width: 250px"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
<div class="col-3">
|
|
||||||
<q-select
|
<q-select
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ฟิลด์ที่จะค้น'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือก ฟิลด์ที่จะค้น'}`]"
|
||||||
|
|
@ -298,59 +298,18 @@ function closeDialog() {
|
||||||
use-input
|
use-input
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
@update:model-value="selectTypeKeyword(typeKeyword)"
|
@update:model-value="selectTypeKeyword(typeKeyword)"
|
||||||
|
style="width: 250px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</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-space />
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-magnify"
|
icon="mdi-magnify"
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
@click="clickSearch(employeeClass)"
|
@click="clickSearch(employeeClass)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</q-toolbar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 q-mt-sm">
|
<div class="col-12 q-mt-sm">
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "fullName",
|
name: "fullName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "fullName",
|
field: "fullName",
|
||||||
headerStyle: "font-size: 14px; min-width: 200px",
|
headerStyle: "font-size: 14px; min-width: 200px",
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,8 @@ async function getData() {
|
||||||
.get(config.API.profileNewGovernmentById(profileId.value, empType.value))
|
.get(config.API.profileNewGovernmentById(profileId.value, empType.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
formMain.ocId = data.org ?? "-"; //สังกัด
|
formMain.ocId = data.org ?? "-"; //สังกัด
|
||||||
formMain.positionId = data.position ?? "-"; //ตำแหน่ง
|
formMain.positionId = data.position ?? "-"; //ตำแหน่ง
|
||||||
formMain.positionLine = data.positionField ?? "-"; //สายงาน
|
formMain.positionLine = data.positionField ?? "-"; //สายงาน
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
||||||
/**
|
/**
|
||||||
* props
|
* props
|
||||||
*/
|
*/
|
||||||
const isLeave = defineModel<boolean>("isLeave", {
|
const isLeave = defineModel<boolean>("isLeave", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -230,7 +230,7 @@ function openDialogAdd() {
|
||||||
/**
|
/**
|
||||||
* function fetch ข้อมูลรายการวินัย
|
* function fetch ข้อมูลรายการวินัย
|
||||||
*/
|
*/
|
||||||
function fetchData(id: string) {
|
async function fetchData(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.profileNewDisciplineByProfileId(id, empType.value))
|
.get(config.API.profileNewDisciplineByProfileId(id, empType.value))
|
||||||
|
|
@ -398,7 +398,6 @@ onMounted(() => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
<q-btn-toggle
|
<q-btn-toggle
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,6 @@ onMounted(() => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
<q-btn-toggle
|
<q-btn-toggle
|
||||||
|
|
@ -366,7 +365,7 @@ onMounted(() => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
@click="openDialogEdit(props.row)"
|
@click="openDialogEdit(props.row)"
|
||||||
><q-tooltip>แก้ไข</q-tooltip></q-btn
|
><q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ const dataLabel = {
|
||||||
religion: "ศาสนา",
|
religion: "ศาสนา",
|
||||||
bloodGroup: "หมู่เลือด",
|
bloodGroup: "หมู่เลือด",
|
||||||
phone: "เบอร์โทร",
|
phone: "เบอร์โทร",
|
||||||
email: "อีเมล์",
|
email: "อีเมล",
|
||||||
prefix: "คำนำหน้าชื่อ",
|
prefix: "คำนำหน้าชื่อ",
|
||||||
rank: "ยศ",
|
rank: "ยศ",
|
||||||
firstName: "ชื่อ",
|
firstName: "ชื่อ",
|
||||||
|
|
@ -316,10 +316,11 @@ async function getData() {
|
||||||
function onClickOpenDialog() {
|
function onClickOpenDialog() {
|
||||||
if (!informaData.value) return;
|
if (!informaData.value) return;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
|
|
||||||
id.value = informaData.value.id;
|
id.value = informaData.value.id;
|
||||||
age.value = calculateAge(informaData.value.birthDate);
|
age.value = calculateAge(informaData.value.birthDate);
|
||||||
formData.citizenId = informaData.value.citizenId;
|
formData.citizenId = informaData.value.citizenId;
|
||||||
formData.prefix = informaData.value.prefix;
|
formData.prefix = informaData.value.prefixMain;
|
||||||
formData.rank = informaData.value.rank;
|
formData.rank = informaData.value.rank;
|
||||||
formData.firstName = informaData.value.firstName;
|
formData.firstName = informaData.value.firstName;
|
||||||
formData.lastName = informaData.value.lastName;
|
formData.lastName = informaData.value.lastName;
|
||||||
|
|
|
||||||
|
|
@ -461,7 +461,7 @@ onMounted(async () => {
|
||||||
icon="add"
|
icon="add"
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
changeNameData.prefix = profileInfo?.prefix;
|
changeNameData.prefix = profileInfo?.prefixMain;
|
||||||
changeNameData.firstName = profileInfo?.firstName;
|
changeNameData.firstName = profileInfo?.firstName;
|
||||||
changeNameData.lastName = profileInfo?.lastName;
|
changeNameData.lastName = profileInfo?.lastName;
|
||||||
prefixChange = changeNameData.prefix;
|
prefixChange = changeNameData.prefix;
|
||||||
|
|
@ -496,7 +496,6 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
||||||
options-dense
|
options-dense
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชันดึงข้อมูลที่อยู่
|
* ฟังก์ชันดึงข้อมูลที่อยู่
|
||||||
*
|
*
|
||||||
* ดึงข้อมูลที่อยู่ ข้อมูลจังหวัด ข้อมูล เขต / อำเภอ และข้อมูล แขวง / ตำบล
|
* ดึงข้อมูลที่อยู่ ข้อมูลจังหวัด ข้อมูล เขต / อำเภอ และข้อมูล แขวง/ตำบล
|
||||||
*/
|
*/
|
||||||
async function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -337,8 +337,8 @@ async function selectDistrict(e: string | null, name: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชันเลือก แขวง / ตำบล
|
* ฟังก์ชันเลือก แขวง/ตำบล
|
||||||
* @param e แขวง / ตำบล ที่เลือก
|
* @param e แขวง/ตำบล ที่เลือก
|
||||||
* @param name 1 คือ ที่อยู่ตามทะเบียนบ้าน 2 คือ ที่อยู่ปัจจุบัน
|
* @param name 1 คือ ที่อยู่ตามทะเบียนบ้าน 2 คือ ที่อยู่ปัจจุบัน
|
||||||
*/
|
*/
|
||||||
function selectSubDistrict(e: string | null, name: string) {
|
function selectSubDistrict(e: string | null, name: string) {
|
||||||
|
|
@ -941,7 +941,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columnsHistory"
|
:options="columnsHistory"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1008,7 +1008,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-mt-md">
|
<div class="row">
|
||||||
<div class="q-mr-sm">สถานภาพการมีชีวิต</div>
|
<div class="q-mr-sm">สถานภาพการมีชีวิต</div>
|
||||||
<div>
|
<div>
|
||||||
<q-radio
|
<q-radio
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ interface RequestObject {
|
||||||
relationship?: string | null;
|
relationship?: string | null;
|
||||||
religion?: string | null;
|
religion?: string | null;
|
||||||
phone?: string | null;
|
phone?: string | null;
|
||||||
|
prefixMain: string;
|
||||||
// telephoneNumber: string | null;
|
// telephoneNumber: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ interface DataType {
|
||||||
posLevels: any;
|
posLevels: any;
|
||||||
posTypeName: string;
|
posTypeName: string;
|
||||||
posTypeRank: number;
|
posTypeRank: number;
|
||||||
|
posTypeShortName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DataLevel {
|
interface DataLevel {
|
||||||
|
|
@ -27,7 +28,7 @@ interface DataPerson {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DataRequest {
|
interface DataRequest {
|
||||||
createdAt: string|Date;
|
createdAt: string | Date;
|
||||||
createdFullName?: string;
|
createdFullName?: string;
|
||||||
detail: string;
|
detail: string;
|
||||||
fullname: string;
|
fullname: string;
|
||||||
|
|
@ -117,6 +118,7 @@ interface DataProfile {
|
||||||
posTypeName: string;
|
posTypeName: string;
|
||||||
posTypeRank: number;
|
posTypeRank: number;
|
||||||
};
|
};
|
||||||
|
prefixMain: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DataLeave {
|
interface DataLeave {
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ interface ResponseObject {
|
||||||
relationship: string | null;
|
relationship: string | null;
|
||||||
religion: string | null;
|
religion: string | null;
|
||||||
telephoneNumber: string | null;
|
telephoneNumber: string | null;
|
||||||
|
prefixMain: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Religion {
|
interface Religion {
|
||||||
|
|
@ -94,6 +95,7 @@ interface PosType {
|
||||||
lastUpdateFullName: string;
|
lastUpdateFullName: string;
|
||||||
posTypeName: string;
|
posTypeName: string;
|
||||||
posTypeRank: number;
|
posTypeRank: number;
|
||||||
|
posTypeShortName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
|
|
|
||||||
|
|
@ -33,16 +33,17 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||||
]);
|
]);
|
||||||
function fetchType(data: DataType[]) {
|
function fetchType(data: DataType[]) {
|
||||||
posTypeMain.value = data;
|
posTypeMain.value = data;
|
||||||
|
|
||||||
const list: DataOption[] = data.map((e: DataType) => ({
|
const list: DataOption[] = data.map((e: DataType) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
name: e.posTypeName,
|
name: e.posTypeName,
|
||||||
}));
|
}));
|
||||||
posTypeOps.value = list;
|
posTypeOps.value = list;
|
||||||
}
|
}
|
||||||
function fetchLevel(data: DataLevel[]) {
|
function fetchLevel(data: DataLevel[], shortName: string = "") {
|
||||||
const list: DataOption[] = data.map((e: DataLevel) => ({
|
const list: DataOption[] = data.map((e: DataLevel) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
name: e.posLevelName,
|
name: `${shortName} ${e.posLevelName} `,
|
||||||
}));
|
}));
|
||||||
const seen = new Set();
|
const seen = new Set();
|
||||||
posLevelOps.value = list.filter((item: DataOption) => {
|
posLevelOps.value = list.filter((item: DataOption) => {
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ export const useAddressDataStore = defineStore("addess", () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชันดึงข้อมูล แขวง / ตำบล
|
* ฟังก์ชันดึงข้อมูล แขวง/ตำบล
|
||||||
* @param id เขต / อำเภอ
|
* @param id เขต / อำเภอ
|
||||||
* @param position ที่อยู่ตามทะเบียนบ้าน, ที่อยู่ปัจจุบัน
|
* @param position ที่อยู่ตามทะเบียนบ้าน, ที่อยู่ปัจจุบัน
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ export const useDataLinkCenter = defineStore("DataLinkCenter", () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชันดึงข้อมูล แขวง / ตำบล
|
* ฟังก์ชันดึงข้อมูล แขวง/ตำบล
|
||||||
* @param id เขต / อำเภอ
|
* @param id เขต / อำเภอ
|
||||||
* @param position ที่อยู่ตามทะเบียนบ้าน, ที่อยู่ปัจจุบัน
|
* @param position ที่อยู่ตามทะเบียนบ้าน, ที่อยู่ปัจจุบัน
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,8 @@ async function fetchDataPersonal() {
|
||||||
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
|
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
formDetail.value = res.data.result;
|
formDetail.value = res.data.result;
|
||||||
|
console.log(formDetail.value);
|
||||||
|
|
||||||
storeRegistry.isLeave = res.data.result.isLeave;
|
storeRegistry.isLeave = res.data.result.isLeave;
|
||||||
|
|
||||||
if (res.data.result.leaveReason) {
|
if (res.data.result.leaveReason) {
|
||||||
|
|
@ -956,7 +958,7 @@ onMounted(async () => {
|
||||||
{{ empType === "" ? "ระดับ" : "ระดับชั้นงาน" }}
|
{{ empType === "" ? "ระดับ" : "ระดับชั้นงาน" }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{{ formDetail?.posLevel?.posLevelName || "-" }}
|
{{ `${ empType === "" ? '': formDetail?.posType?.posTypeShortName } ${formDetail?.posLevel?.posLevelName}` || "-" }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,10 @@ function selectType() {
|
||||||
*/
|
*/
|
||||||
function selectPosType(item: DataOption) {
|
function selectPosType(item: DataOption) {
|
||||||
const dataType = store.posTypeMain.find((e: DataType) => e.id === item.id);
|
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.posType = item.name;
|
||||||
store.labelOption.posLevel = "ทั้งหมด";
|
store.labelOption.posLevel = "ทั้งหมด";
|
||||||
store.formFilter.page = 1;
|
store.formFilter.page = 1;
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@ const route = useRoute();
|
||||||
const store = useRegistryNewDataStore();
|
const store = useRegistryNewDataStore();
|
||||||
|
|
||||||
const isIDP = ref<boolean | null>(null);
|
const isIDP = ref<boolean | null>(null);
|
||||||
|
const isEmployee = ref<boolean>(
|
||||||
|
route.name?.toString() == "registryNewRequestEditEMP" ? true : false
|
||||||
|
);
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
isIDP.value = await (route.name?.toString() == "registryNewRequestEditEMP"
|
isIDP.value = await (route.name?.toString() == "registryNewRequestEditEMP"
|
||||||
|
|
@ -39,6 +42,7 @@ onMounted(() => {
|
||||||
@click="router.go(-1)"
|
@click="router.go(-1)"
|
||||||
/>
|
/>
|
||||||
รายการคำร้องขอแก้ไขทะเบียนประวัติ
|
รายการคำร้องขอแก้ไขทะเบียนประวัติ
|
||||||
|
{{ `(${isEmployee ? "ลูกจ้างประจำ" : "ข้าราชการ กทม.สามัญ"})` }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,6 @@ import DialogPopupReason from "@/components/Dialogs/PopupReason.vue";
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||||
import AddList from "../ListRetirement/AddList.vue";
|
import AddList from "../ListRetirement/AddList.vue";
|
||||||
|
|
||||||
const modalPersonal = ref<boolean>(false);
|
|
||||||
const personId = ref<string>("");
|
|
||||||
/** Use */
|
/** Use */
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const checkRoutePermisson = ref<boolean>(route.name == "retirementidDetail");
|
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_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 modalNote = ref<boolean>(false);
|
||||||
const note = ref<string>("");
|
const note = ref<string>("");
|
||||||
const retireProfileId = ref<string>("");
|
const retireProfileId = ref<string>("");
|
||||||
const retireld = ref<string>(retireld_params.toString());
|
|
||||||
const profileId = ref<string>("");
|
const profileId = ref<string>("");
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const statusUpload = ref<boolean>();
|
const statusUpload = ref<boolean>();
|
||||||
|
|
@ -56,7 +56,69 @@ const statusReport = ref<boolean>();
|
||||||
const dataProfile = ref<Object>([]);
|
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 rows = ref<RetirementList[]>([]);
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"order",
|
"order",
|
||||||
|
|
@ -79,118 +141,58 @@ function closeDialog() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// fecthlist
|
// fecthlist
|
||||||
async function fecthlistprofile(id: string) {
|
async function fetchlistprofile(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listRetire(id))
|
.get(config.API.listRetire(id))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
dataProfile.value = res.data.result;
|
const data = await res.data.result;
|
||||||
round.value = res.data.result.round;
|
|
||||||
statusReport.value = res.data.result.json;
|
dataProfile.value = data;
|
||||||
typeReport.value = res.data.result.typeReport;
|
round.value = data.round;
|
||||||
textReport.value = res.data.result.detail;
|
statusReport.value = data.json;
|
||||||
employeeType.value = res.data.result.type;
|
typeReport.value = data.typeReport;
|
||||||
|
textReport.value = data.detail;
|
||||||
|
employeeType.value = data.type;
|
||||||
|
|
||||||
// รายชื่อผู้เกษียณอายุราชการ
|
// รายชื่อผู้เกษียณอายุราชการ
|
||||||
rows.value = res.data.result.profile.map((e: any) => ({
|
if (data.profile !== null) {
|
||||||
id: e.id,
|
rows.value = data.profile.map((e: any) => ({
|
||||||
profileId: e.profileId,
|
id: e.id,
|
||||||
order: e.order,
|
profileId: e.profileId,
|
||||||
prefix: e.prefix,
|
order: e.order,
|
||||||
firstName: e.firstName,
|
prefix: e.prefix,
|
||||||
lastName: e.lastName,
|
firstName: e.firstName,
|
||||||
name: e.prefix + e.firstName + " " + e.lastName,
|
lastName: e.lastName,
|
||||||
organization: e.root,
|
name: e.prefix + e.firstName + " " + e.lastName,
|
||||||
position: e.position,
|
organization: e.root,
|
||||||
positionNumber: e.posNo,
|
position: e.position,
|
||||||
positionType: e.posTypeName,
|
positionNumber: e.posNo,
|
||||||
positionLevel: e.posLevelName,
|
positionType: e.posTypeName,
|
||||||
reason: e.reason,
|
positionLevel: e.posLevelName,
|
||||||
remove: e.remove,
|
reason: e.reason,
|
||||||
root: e.root,
|
remove: e.remove,
|
||||||
rootId: e.rootId,
|
root: e.root,
|
||||||
child1: e.child1,
|
rootId: e.rootId,
|
||||||
child1Id: e.child1Id,
|
child1: e.child1,
|
||||||
child2: e.child2,
|
child1Id: e.child1Id,
|
||||||
child2Id: e.child2Id,
|
child2: e.child2,
|
||||||
child3: e.child3,
|
child2Id: e.child2Id,
|
||||||
child3Id: e.child3Id,
|
child3: e.child3,
|
||||||
child4: e.child4,
|
child3Id: e.child3Id,
|
||||||
child4Id: e.child4Id,
|
child4: e.child4,
|
||||||
}));
|
child4Id: e.child4Id,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
if (statusReport.value == false) {
|
if (statusReport.value == false) {
|
||||||
fecthCheck(retireld.value);
|
await fecthCheck(retireld.value);
|
||||||
} else statusUpload.value = true;
|
} else statusUpload.value = true;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.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();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -212,21 +214,23 @@ function clickDelete() {
|
||||||
dialogRemove(
|
dialogRemove(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.removeProfile(), {
|
.post(config.API.removeProfile(), {
|
||||||
retireProfileId: retireProfileId.value,
|
retireProfileId: retireProfileId.value,
|
||||||
reason: note.value,
|
reason: note.value,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
retireld.value = retireld_params.toString();
|
||||||
|
await fetchlistprofile(retireld.value);
|
||||||
|
modalNote.value = false;
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
retireld.value = retireld_params.toString();
|
hideLoader();
|
||||||
await fecthlistprofile(retireld.value);
|
|
||||||
modalNote.value = false;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
"ยืนยันการลบข้อมูล",
|
"ยืนยันการลบข้อมูล",
|
||||||
|
|
@ -239,21 +243,23 @@ function saveNote() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.createnote(), {
|
.post(config.API.createnote(), {
|
||||||
retireProfileId: retireProfileId.value,
|
retireProfileId: retireProfileId.value,
|
||||||
reason: note.value,
|
reason: note.value,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
retireld.value = retireld_params.toString();
|
||||||
|
await fetchlistprofile(retireld.value);
|
||||||
|
modalNote.value = false;
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
retireld.value = retireld_params.toString();
|
hideLoader();
|
||||||
fecthlistprofile(retireld.value);
|
|
||||||
modalNote.value = false;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
"ยืนยันการบันทึกข้อมูล",
|
"ยืนยันการบันทึกข้อมูล",
|
||||||
|
|
@ -264,7 +270,7 @@ function saveNote() {
|
||||||
//อัพเดท ListId
|
//อัพเดท ListId
|
||||||
function UpdateListId(retireld: string, pId: string) {
|
function UpdateListId(retireld: string, pId: string) {
|
||||||
profileId.value = pId;
|
profileId.value = pId;
|
||||||
fecthlistprofile(retireld);
|
fetchlistprofile(retireld);
|
||||||
}
|
}
|
||||||
|
|
||||||
// กลับหน้าเดิม
|
// กลับหน้าเดิม
|
||||||
|
|
@ -300,18 +306,18 @@ async function uploadFile(event: any, signDate: any) {
|
||||||
formdata
|
formdata
|
||||||
)
|
)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
await fetchlistprofile(retireld.value);
|
||||||
|
modalUpload.value = false;
|
||||||
|
success($q, "เพิ่มไฟล์สำเร็จ");
|
||||||
fileUpload.value = null;
|
fileUpload.value = null;
|
||||||
signDate.value = null;
|
signDate.value = null;
|
||||||
modalUpload.value = false;
|
|
||||||
await fecthlistprofile(retireld.value);
|
|
||||||
await fecthCheck(retireld.value);
|
|
||||||
hideLoader();
|
|
||||||
success($q, "เพิ่มไฟล์สำเร็จ");
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
"ยืนยันการอัปโหลดเอกสาร",
|
"ยืนยันการอัปโหลดเอกสาร",
|
||||||
"ต้องการยืนยันการอัปโหลดเอกสารนี้หรือไม่ ?"
|
"ต้องการยืนยันการอัปโหลดเอกสารนี้หรือไม่ ?"
|
||||||
|
|
@ -333,13 +339,13 @@ async function downloadAttachment(type: string, id: string) {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
await genReport(data, `รายชื่อผู้เกษียณอายุราชการ`, type);
|
await genReport(data, `รายชื่อผู้เกษียณอายุราชการ`, type);
|
||||||
hideLoader();
|
|
||||||
})
|
})
|
||||||
.catch(async (e) => {
|
.catch(async (e) => {
|
||||||
messageError($q, JSON.parse(await e.response.data.text()));
|
messageError($q, JSON.parse(await e.response.data.text()));
|
||||||
hideLoader();
|
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// ยืนยันการแก้ไขข้อมูล
|
// ยืนยันการแก้ไขข้อมูล
|
||||||
|
|
@ -349,17 +355,19 @@ function saveEdiitReport(reason: string) {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.editDetail(retireld.value), formdata)
|
.put(config.API.editDetail(retireld.value), formdata)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
fetchlistprofile(retireld.value);
|
||||||
|
modalEdit.value = false;
|
||||||
success($q, "แก้ไขข้อความสำเร็จ");
|
success($q, "แก้ไขข้อความสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
fecthlistprofile(retireld.value);
|
hideLoader();
|
||||||
modalEdit.value = false;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
"ยืนยันการแก้ไขข้อมูล",
|
"ยืนยันการแก้ไขข้อมูล",
|
||||||
|
|
@ -400,9 +408,9 @@ function updatemodalPersonal(modal: boolean) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Hook */
|
/** Hook */
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
retireld.value = retireld_params.toString();
|
retireld.value = retireld_params.toString();
|
||||||
fecthlistprofile(retireld.value);
|
await fetchlistprofile(retireld.value);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -525,7 +533,6 @@ onMounted(() => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="gt-xs q-ml-sm"
|
class="gt-xs q-ml-sm"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -100,10 +100,10 @@ const yearOptions = ref<any>([{ id: "", year: "ทั้งหมด" }]);
|
||||||
// ประกาศเกษียณอายุราชการ
|
// ประกาศเกษียณอายุราชการ
|
||||||
async function fetchRetirement(type: string, year: any) {
|
async function fetchRetirement(type: string, year: any) {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
rows.value = [];
|
||||||
await http
|
await http
|
||||||
.get(config.API.retirement(type, year))
|
.get(config.API.retirement(type, year))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rows.value = [];
|
|
||||||
let data = res.data.result;
|
let data = res.data.result;
|
||||||
rows.value = data.map((items: any) => ({
|
rows.value = data.map((items: any) => ({
|
||||||
id: items.id,
|
id: items.id,
|
||||||
|
|
@ -335,7 +335,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ const filterOption = ref<OptionData[]>([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "fullName",
|
id: "fullName",
|
||||||
name: "ชื่อ - นามสกุล",
|
name: "ชื่อ-นามสกุล",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
field: "name",
|
field: "name",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
field: "name",
|
field: "name",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -128,12 +128,13 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "salaryDate",
|
name: "dateAppoint",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันที่แต่งตั้ง",
|
label: "วันที่แต่งตั้ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "salaryDate",
|
field: "dateAppoint",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
format: (val) => date2Thai(val),
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -191,6 +192,7 @@ const visibleColumns = ref<String[]>([
|
||||||
"createdAt",
|
"createdAt",
|
||||||
"dateRetireLaw",
|
"dateRetireLaw",
|
||||||
"statustext",
|
"statustext",
|
||||||
|
"dateAppoint",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, success, messageError } = mixin;
|
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
||||||
const isRead = defineModel<boolean>("isRead", { required: true });
|
const isRead = defineModel<boolean>("isRead", { required: true });
|
||||||
/** propsData จาก RoundMain */
|
/** propsData จาก RoundMain */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -104,22 +104,25 @@ function onSubmit() {
|
||||||
|
|
||||||
/** Function สร้างรอบการปฏิบัติงาน*/
|
/** Function สร้างรอบการปฏิบัติงาน*/
|
||||||
async function postRoundDuty() {
|
async function postRoundDuty() {
|
||||||
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.roundDutytime(), formData)
|
.post(config.API.roundDutytime(), formData)
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
await props.fetchData?.();
|
||||||
|
await props.closeDialog?.();
|
||||||
success($q, "บันทึกข้อมูล");
|
success($q, "บันทึกข้อมูล");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
props.fetchData?.();
|
hideLoader();
|
||||||
props.closeDialog?.();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Functiom แก้ไข้รอบการปฏิบัติงาน*/
|
/** Functiom แก้ไข้รอบการปฏิบัติงาน*/
|
||||||
async function putRoundDuty(id: string) {
|
async function putRoundDuty(id: string) {
|
||||||
|
showLoader();
|
||||||
const data = {
|
const data = {
|
||||||
description: formData.description,
|
description: formData.description,
|
||||||
isDefault: formData.isDefault,
|
isDefault: formData.isDefault,
|
||||||
|
|
@ -127,15 +130,16 @@ async function putRoundDuty(id: string) {
|
||||||
};
|
};
|
||||||
await http
|
await http
|
||||||
.put(config.API.roundDutytimeByid(id), data)
|
.put(config.API.roundDutytimeByid(id), data)
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
await props.fetchData?.();
|
||||||
|
await props.closeDialog?.();
|
||||||
success($q, "บันทึกข้อมูล");
|
success($q, "บันทึกข้อมูล");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
props.fetchData?.();
|
hideLoader();
|
||||||
props.closeDialog?.();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -8,7 +8,7 @@ import { useQuasar } from "quasar";
|
||||||
import type { FormDetail } from "@/modules/09_leave/interface/response/work";
|
import type { FormDetail } from "@/modules/09_leave/interface/response/work";
|
||||||
|
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
import Map from "@/modules/09_leave/components/1_Work/DialogMap.vue";
|
import Map from "@/modules/09_leave/components/02_WorkList/DialogMap.vue";
|
||||||
|
|
||||||
/** importStores */
|
/** importStores */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
@ -65,7 +65,9 @@ async function onClickSave() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.leaveEditCheckin(props.detail?.id), body)
|
.put(config.API.leaveEditCheckin(props.detail?.id), body)
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
await props.fetchData?.();
|
||||||
|
await props.close?.();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -73,14 +75,12 @@ async function onClickSave() {
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
props.fetchData?.();
|
|
||||||
props.close?.();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterFnOptions(val: any, update: Function) {
|
function filterFnOptions(val: string, update: Function) {
|
||||||
update(() => {
|
update(() => {
|
||||||
options.value = optionsMain.value.filter(
|
options.value = optionsMain.value.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name.indexOf(val) > -1
|
||||||
|
|
@ -143,7 +143,7 @@ watch(
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
use-input
|
use-input
|
||||||
@filter="(inputValue: any,doneFn: Function) => filterFnOptions(inputValue, doneFn)"
|
@filter="(inputValue: string,doneFn: Function) => filterFnOptions(inputValue, doneFn)"
|
||||||
><template v-slot:no-option>
|
><template v-slot:no-option>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section class="text-grey">
|
<q-item-section class="text-grey">
|
||||||
|
|
@ -178,7 +178,7 @@ watch(
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
|
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
use-input
|
use-input
|
||||||
@filter="(inputValue: any,doneFn: Function) => filterFnOptions(inputValue, doneFn)"
|
@filter="(inputValue: string,doneFn: Function) => filterFnOptions(inputValue, doneFn)"
|
||||||
><template v-slot:no-option>
|
><template v-slot:no-option>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section class="text-grey">
|
<q-item-section class="text-grey">
|
||||||
|
|
@ -21,8 +21,8 @@ const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { date2Thai, monthYear2Thai, dateToISO, messageError } = mixin;
|
const { date2Thai, monthYear2Thai, dateToISO, messageError } = mixin;
|
||||||
|
|
||||||
const apiGenReport =
|
// const apiGenReport =
|
||||||
"https://report-server.frappet.synology.me/api/v1/report-template/xlsx";
|
// "https://report-server.frappet.synology.me/api/v1/report-template/xlsx";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: {
|
modal: {
|
||||||
|
|
@ -126,7 +126,7 @@ function filterFnOptions(val: any, update: Function) {
|
||||||
*/
|
*/
|
||||||
async function genReportXLSX(data: any) {
|
async function genReportXLSX(data: any) {
|
||||||
await axios
|
await axios
|
||||||
.post(apiGenReport, data, {
|
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||||
headers: {
|
headers: {
|
||||||
accept:
|
accept:
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
|
|
@ -134,9 +134,9 @@ async function genReportXLSX(data: any) {
|
||||||
},
|
},
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const blob = new Blob([res.data]);
|
const blob = new Blob([res.data]);
|
||||||
downloadReport(blob, "xlsx");
|
await downloadReport(blob, "xlsx");
|
||||||
})
|
})
|
||||||
.catch(async (e) => {
|
.catch(async (e) => {
|
||||||
messageError($q, JSON.parse(await e.response.data.text()));
|
messageError($q, JSON.parse(await e.response.data.text()));
|
||||||
|
|
@ -12,8 +12,8 @@ import type {
|
||||||
} from "@/modules/09_leave/interface/response/work";
|
} from "@/modules/09_leave/interface/response/work";
|
||||||
|
|
||||||
/** importComponents */
|
/** importComponents */
|
||||||
import ToolBar from "@/modules/09_leave/components/1_Work/ToolBar.vue";
|
import ToolBar from "@/modules/09_leave/components/02_WorkList/ToolBar.vue";
|
||||||
import TableList from "@/modules/09_leave/components/1_Work/TableList.vue";
|
import TableList from "@/modules/09_leave/components/02_WorkList/TableList.vue";
|
||||||
|
|
||||||
/** importStores */
|
/** importStores */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
@ -121,6 +121,7 @@ const rows = ref<TableRowsTime[]>([]);
|
||||||
|
|
||||||
/** function เรียกข้อมูล รายการลงเวลาที่ประมวลผลแล้ว*/
|
/** function เรียกข้อมูล รายการลงเวลาที่ประมวลผลแล้ว*/
|
||||||
async function fetchListTimeRecord() {
|
async function fetchListTimeRecord() {
|
||||||
|
rows.value = [];
|
||||||
const date = new Date(workStore.selectDate as string | Date);
|
const date = new Date(workStore.selectDate as string | Date);
|
||||||
const querySting = {
|
const querySting = {
|
||||||
startDate: dateToISO(date), //*วันที่เริ่ม
|
startDate: dateToISO(date), //*วันที่เริ่ม
|
||||||
|
|
@ -12,8 +12,8 @@ import type {
|
||||||
} from "@/modules/09_leave/interface/response/work";
|
} from "@/modules/09_leave/interface/response/work";
|
||||||
|
|
||||||
/** importComponents */
|
/** importComponents */
|
||||||
import ToolBarDate from "@/modules/09_leave/components/1_Work/ToolBarDate.vue";
|
import ToolBarDate from "@/modules/09_leave/components/02_WorkList/ToolBarDate.vue";
|
||||||
import TableList from "@/modules/09_leave/components/1_Work/TableList.vue";
|
import TableList from "@/modules/09_leave/components/02_WorkList/TableList.vue";
|
||||||
|
|
||||||
/** importStores */
|
/** importStores */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
@ -102,6 +102,7 @@ const maxPage = ref<number>(1);
|
||||||
|
|
||||||
/** function เรียกข้อมูลรายการลงเวลาปฏิบัติงาน (รายการลงเวลา) */
|
/** function เรียกข้อมูลรายการลงเวลาปฏิบัติงาน (รายการลงเวลา) */
|
||||||
async function fetchListLogRecord() {
|
async function fetchListLogRecord() {
|
||||||
|
rows.value = [];
|
||||||
showLoader();
|
showLoader();
|
||||||
const date = new Date(workStore.selectDate as string | Date);
|
const date = new Date(workStore.selectDate as string | Date);
|
||||||
await http
|
await http
|
||||||
|
|
@ -132,7 +133,6 @@ async function fetchListLogRecord() {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
rows.value = [];
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
@ -5,8 +5,8 @@ import { checkPermission } from "@/utils/permissions";
|
||||||
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||||
|
|
||||||
/** importComponents */
|
/** importComponents */
|
||||||
import DialogDetail from "@/modules/09_leave/components/1_Work/DialogDetail.vue";
|
import DialogDetail from "@/modules/09_leave/components/02_WorkList/DialogDetail.vue";
|
||||||
import DialogEdit from "@/modules/09_leave/components/1_Work/DialogEdit.vue";
|
import DialogEdit from "@/modules/09_leave/components/02_WorkList/DialogEdit.vue";
|
||||||
|
|
||||||
const workStore = useWorklistDataStore();
|
const workStore = useWorklistDataStore();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -44,7 +44,7 @@ const emit = defineEmits(["update:pagination"]);
|
||||||
|
|
||||||
/** ข้อมูล popup */
|
/** ข้อมูล popup */
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const dataDetail = ref<any>([]);
|
const dataDetail = ref<any>();
|
||||||
const modalEdit = ref<boolean>(false);
|
const modalEdit = ref<boolean>(false);
|
||||||
|
|
||||||
/** pagination */
|
/** pagination */
|
||||||
|
|
@ -68,8 +68,8 @@ const pageSize = ref<number>(10);
|
||||||
const initialPagination = ref<any>({
|
const initialPagination = ref<any>({
|
||||||
sortBy: null,
|
sortBy: null,
|
||||||
descending: false,
|
descending: false,
|
||||||
page: 1,
|
page: dataStore.page,
|
||||||
rowsPerPage: pageSize, // set ตาม page หลักส่งมา
|
rowsPerPage: dataStore.pageSize, // set ตาม page หลักส่งมา
|
||||||
});
|
});
|
||||||
|
|
||||||
// Pagination - page & change page & get new data
|
// Pagination - page & change page & get new data
|
||||||
|
|
@ -77,7 +77,7 @@ const currentPage = ref<number>(1);
|
||||||
const roundOp = ref<any>([]);
|
const roundOp = ref<any>([]);
|
||||||
async function updatePagination(newPagination: any) {
|
async function updatePagination(newPagination: any) {
|
||||||
initialPagination.value = newPagination;
|
initialPagination.value = newPagination;
|
||||||
currentPage.value = 1; // set current page เป็น 1 เสมอเมื่อเปลี่ยน per row
|
// currentPage.value = 1; // set current page เป็น 1 เสมอเมื่อเปลี่ยน per row
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Function validateForm */
|
/** Function validateForm */
|
||||||
|
|
@ -103,7 +103,7 @@ function onSubmit() {
|
||||||
$q,
|
$q,
|
||||||
() => {
|
() => {
|
||||||
changeRound();
|
changeRound();
|
||||||
props.closeDialog?.();
|
// props.closeDialog?.();
|
||||||
},
|
},
|
||||||
"ยืนยันการบันทึกข้อมูล",
|
"ยืนยันการบันทึกข้อมูล",
|
||||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||||
|
|
@ -112,6 +112,7 @@ function onSubmit() {
|
||||||
|
|
||||||
/** Function เปลี่ยนรอบเวลา*/
|
/** Function เปลี่ยนรอบเวลา*/
|
||||||
async function changeRound() {
|
async function changeRound() {
|
||||||
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.leaveRound(), {
|
.post(config.API.leaveRound(), {
|
||||||
profileId: props.personId,
|
profileId: props.personId,
|
||||||
|
|
@ -121,12 +122,13 @@ async function changeRound() {
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
success($q, "บันทึกข้อมูลเปลี่ยนรอบเวลา");
|
success($q, "บันทึกข้อมูลเปลี่ยนรอบเวลา");
|
||||||
|
props.closeDialog?.();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
props.closeDialog?.();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -135,7 +137,7 @@ async function changeRound() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
async function fetchDataOption() {
|
async function fetchDataOption() {
|
||||||
showLoader();
|
props.editCheck !== "history" && showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.leaveRound())
|
.get(config.API.leaveRound())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -156,7 +158,7 @@ async function fetchDataOption() {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
props.editCheck !== "history" && hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,8 +170,9 @@ function close() {
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
[() => currentPage.value, () => initialPagination.value.rowsPerPage],
|
() => initialPagination.value.rowsPerPage,
|
||||||
() => {
|
() => {
|
||||||
|
currentPage.value = 1;
|
||||||
emit(
|
emit(
|
||||||
"update:change-page",
|
"update:change-page",
|
||||||
currentPage.value,
|
currentPage.value,
|
||||||
|
|
@ -179,6 +182,15 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function nextPage() {
|
||||||
|
emit(
|
||||||
|
"update:change-page",
|
||||||
|
currentPage.value,
|
||||||
|
initialPagination.value.rowsPerPage,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modal,
|
() => props.modal,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
@ -188,6 +200,7 @@ watch(
|
||||||
formData.effectiveDate = null;
|
formData.effectiveDate = null;
|
||||||
}
|
}
|
||||||
if (props.modal === true) {
|
if (props.modal === true) {
|
||||||
|
currentPage.value = 1;
|
||||||
await fetchDataOption();
|
await fetchDataOption();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -355,7 +368,7 @@ watch(
|
||||||
dense
|
dense
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:visible-columns="dataStore.visibleColumnsHistory"
|
:visible-columns="dataStore.visibleColumnsHistory"
|
||||||
:rows-per-page-options="[5, 10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
:pagination="initialPagination"
|
:pagination="initialPagination"
|
||||||
@update:pagination="updatePagination"
|
@update:pagination="updatePagination"
|
||||||
>
|
>
|
||||||
|
|
@ -370,6 +383,7 @@ watch(
|
||||||
boundary-links
|
boundary-links
|
||||||
direction-links
|
direction-links
|
||||||
:max="Number(dataStore.maxPage)"
|
:max="Number(dataStore.maxPage)"
|
||||||
|
@update:model-value="nextPage"
|
||||||
></q-pagination>
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
|
|
@ -388,7 +402,7 @@ watch(
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div>
|
<div>
|
||||||
{{ col.value }}
|
{{ col.value ?? "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -16,18 +16,18 @@ import type { LeaveType } from "@/modules/09_leave/interface/response/leave";
|
||||||
|
|
||||||
/** importForm*/
|
/** importForm*/
|
||||||
import DialogReason from "@/components/Dialogs/PopupReason.vue";
|
import DialogReason from "@/components/Dialogs/PopupReason.vue";
|
||||||
import FormMain from "@/modules/09_leave/components/2_Leave/formDetail/formMain.vue"; // from ซ้าย
|
import FormMain from "@/modules/09_leave/components/05_Leave/formDetail/formMain.vue"; // from ซ้าย
|
||||||
import FormLeave from "@/modules/09_leave/components/2_Leave/formDetail/formLeave.vue"; // ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว
|
import FormLeave from "@/modules/09_leave/components/05_Leave/formDetail/formLeave.vue"; // ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว
|
||||||
import FormChildbirth from "@/modules/09_leave/components/2_Leave/formDetail/formChildbirth.vue"; // ลาไปช่วยเหลือภริยาที่คลอดบุตร
|
import FormChildbirth from "@/modules/09_leave/components/05_Leave/formDetail/formChildbirth.vue"; // ลาไปช่วยเหลือภริยาที่คลอดบุตร
|
||||||
import FormHoliday from "@/modules/09_leave/components/2_Leave/formDetail/formHoliday.vue"; //ลาพักผ่อน
|
import FormHoliday from "@/modules/09_leave/components/05_Leave/formDetail/formHoliday.vue"; //ลาพักผ่อน
|
||||||
import FormUpasom from "@/modules/09_leave/components/2_Leave/formDetail/formUpasom.vue"; // ลาอุปสมบท
|
import FormUpasom from "@/modules/09_leave/components/05_Leave/formDetail/formUpasom.vue"; // ลาอุปสมบท
|
||||||
import FormHajj from "@/modules/09_leave/components/2_Leave/formDetail/formHajj.vue"; //ลาประกอบพิธีฮัจญ์
|
import FormHajj from "@/modules/09_leave/components/05_Leave/formDetail/formHajj.vue"; //ลาประกอบพิธีฮัจญ์
|
||||||
import FormCheckSelect from "@/modules/09_leave/components/2_Leave/formDetail/formCheckSelect.vue"; //ลาเข้ารับการตรวจเลือกหรือเข้ารับการเตรียมพล
|
import FormCheckSelect from "@/modules/09_leave/components/05_Leave/formDetail/formCheckSelect.vue"; //ลาเข้ารับการตรวจเลือกหรือเข้ารับการเตรียมพล
|
||||||
import FormStudy from "@/modules/09_leave/components/2_Leave/formDetail/formStudy.vue"; //ลาไปศึกษา
|
import FormStudy from "@/modules/09_leave/components/05_Leave/formDetail/formStudy.vue"; //ลาไปศึกษา
|
||||||
import FormLeaveToTraining from "@/modules/09_leave/components/2_Leave/formDetail/formLeaveToTraining.vue"; // ลาไปฝึกอบรม ปฏิบัติการวิจัย หรือดูงาน
|
import FormLeaveToTraining from "@/modules/09_leave/components/05_Leave/formDetail/formLeaveToTraining.vue"; // ลาไปฝึกอบรม ปฏิบัติการวิจัย หรือดูงาน
|
||||||
import FormLeaveToWorkInternational from "@/modules/09_leave/components/2_Leave/formDetail/formLeaveToWorkInternational.vue"; // ลาไปปฏิบัติงานในองค์การระหว่างประเทศ
|
import FormLeaveToWorkInternational from "@/modules/09_leave/components/05_Leave/formDetail/formLeaveToWorkInternational.vue"; // ลาไปปฏิบัติงานในองค์การระหว่างประเทศ
|
||||||
import FormSpouse from "@/modules/09_leave/components/2_Leave/formDetail/formSpouse.vue"; // ลาติดตามคู่สมรส
|
import FormSpouse from "@/modules/09_leave/components/05_Leave/formDetail/formSpouse.vue"; // ลาติดตามคู่สมรส
|
||||||
import FormVocationalRehabilitation from "@/modules/09_leave/components/2_Leave/formDetail/formVocationalRehabilitation.vue"; //ลาไปฟื้นฟูสมรรถภาพด้านอาชีพ
|
import FormVocationalRehabilitation from "@/modules/09_leave/components/05_Leave/formDetail/formVocationalRehabilitation.vue"; //ลาไปฟื้นฟูสมรรถภาพด้านอาชีพ
|
||||||
import WorkFlow from "@/components/Workflow/Main.vue";
|
import WorkFlow from "@/components/Workflow/Main.vue";
|
||||||
|
|
||||||
/** use */
|
/** use */
|
||||||
|
|
@ -574,7 +574,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<div class="col-xs-5 col-sm-3 text-grey-8">
|
<div class="col-xs-5 col-sm-3 text-grey-8">
|
||||||
ชื่อ - นามสกุล
|
ชื่อ-นามสกุล
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-weight-medium">
|
<div class="col text-weight-medium">
|
||||||
{{ formData.fullName }}
|
{{ formData.fullName }}
|
||||||
|
|
@ -19,18 +19,18 @@ import type { FremData } from "@/modules/09_leave/interface/request/leave";
|
||||||
|
|
||||||
/** importForm*/
|
/** importForm*/
|
||||||
import DialogReason from "@/components/Dialogs/PopupReason.vue";
|
import DialogReason from "@/components/Dialogs/PopupReason.vue";
|
||||||
import FormMain from "@/modules/09_leave/components/2_Leave/formDetail/formMain.vue"; // from ซ้าย
|
import FormMain from "@/modules/09_leave/components/05_Leave/formDetail/formMain.vue"; // from ซ้าย
|
||||||
import FormLeave from "@/modules/09_leave/components/2_Leave/formDetail/formLeave.vue"; // ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว
|
import FormLeave from "@/modules/09_leave/components/05_Leave/formDetail/formLeave.vue"; // ลาป่วย ลาคลอดบุตร และลากิจส่วนตัว
|
||||||
import FormChildbirth from "@/modules/09_leave/components/2_Leave/formDetail/formChildbirth.vue"; // ลาไปช่วยเหลือภริยาที่คลอดบุตร
|
import FormChildbirth from "@/modules/09_leave/components/05_Leave/formDetail/formChildbirth.vue"; // ลาไปช่วยเหลือภริยาที่คลอดบุตร
|
||||||
import FormHoliday from "@/modules/09_leave/components/2_Leave/formDetail/formHoliday.vue"; //ลาพักผ่อน
|
import FormHoliday from "@/modules/09_leave/components/05_Leave/formDetail/formHoliday.vue"; //ลาพักผ่อน
|
||||||
import FormUpasom from "@/modules/09_leave/components/2_Leave/formDetail/formUpasom.vue"; // ลาอุปสมบท
|
import FormUpasom from "@/modules/09_leave/components/05_Leave/formDetail/formUpasom.vue"; // ลาอุปสมบท
|
||||||
import FormHajj from "@/modules/09_leave/components/2_Leave/formDetail/formHajj.vue"; //ลาประกอบพิธีฮัจญ์
|
import FormHajj from "@/modules/09_leave/components/05_Leave/formDetail/formHajj.vue"; //ลาประกอบพิธีฮัจญ์
|
||||||
import FormCheckSelect from "@/modules/09_leave/components/2_Leave/formDetail/formCheckSelect.vue"; //ลาเข้ารับการตรวจเลือกหรือเข้ารับการเตรียมพล
|
import FormCheckSelect from "@/modules/09_leave/components/05_Leave/formDetail/formCheckSelect.vue"; //ลาเข้ารับการตรวจเลือกหรือเข้ารับการเตรียมพล
|
||||||
import FormStudy from "@/modules/09_leave/components/2_Leave/formDetail/formStudy.vue"; //ลาไปศึกษา
|
import FormStudy from "@/modules/09_leave/components/05_Leave/formDetail/formStudy.vue"; //ลาไปศึกษา
|
||||||
import FormLeaveToTraining from "@/modules/09_leave/components/2_Leave/formDetail/formLeaveToTraining.vue"; // ลาไปฝึกอบรม ปฏิบัติการวิจัย หรือดูงาน
|
import FormLeaveToTraining from "@/modules/09_leave/components/05_Leave/formDetail/formLeaveToTraining.vue"; // ลาไปฝึกอบรม ปฏิบัติการวิจัย หรือดูงาน
|
||||||
import FormLeaveToWorkInternational from "@/modules/09_leave/components/2_Leave/formDetail/formLeaveToWorkInternational.vue"; // ลาไปปฏิบัติงานในองค์การระหว่างประเทศ
|
import FormLeaveToWorkInternational from "@/modules/09_leave/components/05_Leave/formDetail/formLeaveToWorkInternational.vue"; // ลาไปปฏิบัติงานในองค์การระหว่างประเทศ
|
||||||
import FormSpouse from "@/modules/09_leave/components/2_Leave/formDetail/formSpouse.vue"; // ลาติดตามคู่สมรส
|
import FormSpouse from "@/modules/09_leave/components/05_Leave/formDetail/formSpouse.vue"; // ลาติดตามคู่สมรส
|
||||||
import FormVocationalRehabilitation from "@/modules/09_leave/components/2_Leave/formDetail/formVocationalRehabilitation.vue"; //ลาไปฟื้นฟูสมรรถภาพด้านอาชีพ
|
import FormVocationalRehabilitation from "@/modules/09_leave/components/05_Leave/formDetail/formVocationalRehabilitation.vue"; //ลาไปฟื้นฟูสมรรถภาพด้านอาชีพ
|
||||||
import WorkFlow from "@/components/Workflow/Main.vue";
|
import WorkFlow from "@/components/Workflow/Main.vue";
|
||||||
|
|
||||||
/** use */
|
/** use */
|
||||||
|
|
@ -549,7 +549,7 @@ async function onClickDownloadFile(id: string, fileName: string, type: string) {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<div class="col-xs-5 col-sm-3 text-grey-8">
|
<div class="col-xs-5 col-sm-3 text-grey-8">
|
||||||
ชื่อ - นามสกุล
|
ชื่อ-นามสกุล
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-weight-medium">
|
<div class="col text-weight-medium">
|
||||||
{{ formData.fullName }}
|
{{ formData.fullName }}
|
||||||
|
|
@ -8,14 +8,11 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
||||||
|
|
||||||
/**importType*/
|
/**importType*/
|
||||||
import type {
|
import type { QuerySting } from "@/modules/09_leave/interface/request/leave";
|
||||||
QuerySting,
|
|
||||||
DateFilter,
|
|
||||||
} from "@/modules/09_leave/interface/request/leave";
|
|
||||||
|
|
||||||
import TableList from "@/modules/09_leave/components/2_Leave/TableList.vue";
|
import TableList from "@/modules/09_leave/components/05_Leave/TableList.vue";
|
||||||
import ToolBar from "@/modules/09_leave/components/2_Leave/ToolBarLeave.vue";
|
import ToolBar from "@/modules/09_leave/components/05_Leave/ToolBarLeave.vue";
|
||||||
import CalendarView from "@/modules/09_leave/components/2_Leave/Calendar.vue";
|
import CalendarView from "@/modules/09_leave/components/05_Leave/Calendar.vue";
|
||||||
|
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -49,13 +46,13 @@ async function fecthLeaveList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.leaveList(), querySting)
|
.post(config.API.leaveList(), querySting)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
totalList.value = Math.ceil(
|
totalList.value = Math.ceil(
|
||||||
res.data.result.total / querySting.pageSize
|
res.data.result.total / querySting.pageSize
|
||||||
);
|
);
|
||||||
total.value = res.data.result.total;
|
total.value = res.data.result.total;
|
||||||
leaveStore.fetchListLeave(data.data); /** ส่งข้อมูลไป stores*/
|
await leaveStore.fetchListLeave(data.data); /** ส่งข้อมูลไป stores*/
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -75,8 +72,7 @@ async function fetchOption() {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
});
|
||||||
.finally(() => {});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSearch() {
|
function getSearch() {
|
||||||
|
|
@ -95,13 +91,12 @@ watch(
|
||||||
() => leaveStore.tabView,
|
() => leaveStore.tabView,
|
||||||
async () => {
|
async () => {
|
||||||
leaveStore.tabView === "list" &&
|
leaveStore.tabView === "list" &&
|
||||||
(await fecthLeaveList(), await fetchOption());
|
(await Promise.all([fetchOption(), fecthLeaveList()]));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchOption();
|
await Promise.all([fetchOption(), fecthLeaveList()]);
|
||||||
await fecthLeaveList();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -144,7 +139,12 @@ onMounted(async () => {
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<div v-if="leaveStore.tabView === 'list'">
|
<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
|
<TableList
|
||||||
v-model:total="total"
|
v-model:total="total"
|
||||||
v-model:total-list="totalList"
|
v-model:total-list="totalList"
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted,watch } from "vue";
|
import { ref, reactive, onMounted, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -13,8 +13,8 @@ import type {
|
||||||
DateFilter,
|
DateFilter,
|
||||||
} from "@/modules/09_leave/interface/request/leave";
|
} from "@/modules/09_leave/interface/request/leave";
|
||||||
|
|
||||||
import TableList from "@/modules/09_leave/components/2_Leave/TableList.vue";
|
import TableList from "@/modules/09_leave/components/05_Leave/TableList.vue";
|
||||||
import ToolBar from "@/modules/09_leave/components/2_Leave/ToolBarLeave.vue";
|
import ToolBar from "@/modules/09_leave/components/05_Leave/ToolBarLeave.vue";
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const leaveStore = useLeavelistDataStore();
|
const leaveStore = useLeavelistDataStore();
|
||||||
|
|
@ -63,28 +63,6 @@ async function fecthLeaveList() {
|
||||||
hideLoader();
|
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 เรียกข้อมูลสถานะ*/
|
/** function เรียกข้อมูลสถานะ*/
|
||||||
|
|
@ -96,8 +74,7 @@ async function fetchOption() {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
});
|
||||||
.finally(() => {});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSearch() {
|
function getSearch() {
|
||||||
|
|
@ -113,8 +90,7 @@ watch(
|
||||||
);
|
);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchOption();
|
await Promise.all([fetchOption(), fecthLeaveList()]);
|
||||||
await fecthLeaveList();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -261,7 +261,7 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:visible-columns="leaveStore.visibleColumns"
|
:visible-columns="leaveStore.visibleColumns"
|
||||||
:rows-per-page-options="[1, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
@update:pagination="updatePagination"
|
@update:pagination="updatePagination"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
|
|
@ -290,9 +290,7 @@ onMounted(() => {
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{
|
{{
|
||||||
(pagination.page - 1) * pagination.pageSize +
|
(pagination.page - 1) * pagination.pageSize + props.rowIndex + 1
|
||||||
props.rowIndex +
|
|
||||||
1
|
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'leaveTypeName'">
|
<div v-else-if="col.name == 'leaveTypeName'">
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
interface dataPost {
|
interface DataPost {
|
||||||
cardId: string;
|
cardId: string;
|
||||||
firstName: string;
|
firstName: string;
|
||||||
lastName: string;
|
lastName: string;
|
||||||
|
|
@ -28,7 +28,7 @@ interface MyObjectRoundChangeMainRef {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
export type {
|
export type {
|
||||||
dataPost,
|
DataPost,
|
||||||
changeRoundEdit,
|
changeRoundEdit,
|
||||||
MyObjectRoundChangeRef,
|
MyObjectRoundChangeRef,
|
||||||
MyObjectRoundChangeMainRef,
|
MyObjectRoundChangeMainRef,
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,15 @@
|
||||||
const workMain = () => import("@/modules/09_leave/views/WorkingMain.vue");
|
const workMain = () => import("@/modules/09_leave/views/02_WorkingMain.vue");
|
||||||
const leaveMain = () => import("@/modules/09_leave/views/LeaveListMain.vue");
|
const leaveMain = () => import("@/modules/09_leave/views/05_LeaveListMain.vue");
|
||||||
const leaveDetail = () =>
|
const leaveDetail = () =>
|
||||||
import("@/modules/09_leave/components/2_Leave/DetailLeave.vue");
|
import("@/modules/09_leave/components/05_Leave/DetailLeave.vue");
|
||||||
const leaveDetailReject = () =>
|
const leaveDetailReject = () =>
|
||||||
import("@/modules/09_leave/components/2_Leave/DetailLeaveReject.vue");
|
import("@/modules/09_leave/components/05_Leave/DetailLeaveReject.vue");
|
||||||
const RoundMain = () => import("@/modules/09_leave/views/RoundMain.vue");
|
const RoundMain = () => import("@/modules/09_leave/views/01_RoundMain.vue");
|
||||||
const ChangeRoundMain = () =>
|
const ChangeRoundMain = () =>
|
||||||
import("@/modules/09_leave/views/ChangeRoundMain.vue");
|
import("@/modules/09_leave/views/03_ChangeRoundMain.vue");
|
||||||
const SpecialTimeMain = () =>
|
const SpecialTimeMain = () =>
|
||||||
import("@/modules/09_leave/views/SpecialTimeMain.vue");
|
import("@/modules/09_leave/views/04_SpecialTimeMain.vue");
|
||||||
const leaveReport = () =>
|
const leaveReport = () => import("@/modules/09_leave/views/06_ReportMain.vue");
|
||||||
import("@/modules/09_leave/components/3_Report/LeaveReport.vue");
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: "/round-time",
|
path: "/round-time",
|
||||||
|
|
|
||||||
|
|
@ -116,23 +116,22 @@ export const useChangeRoundDataStore = defineStore(
|
||||||
|
|
||||||
// ข้อมูลในตาราง
|
// ข้อมูลในตาราง
|
||||||
function setProfileId(id: string) {
|
function setProfileId(id: string) {
|
||||||
console.log(profileId);
|
|
||||||
profileId.value = id;
|
profileId.value = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
const maxPageMain = ref<number>(0);
|
const maxPageMain = ref<number>(0);
|
||||||
const totalListMain = ref<number>(0);
|
const totalListMain = ref<number>(0);
|
||||||
|
|
||||||
function fetchDataForCardId(dataDetail: any) {
|
async function fetchDataForCardId(dataDetail: any) {
|
||||||
if (dataDetail) {
|
if (dataDetail) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.post(config.API.leaveSearch(), {
|
.post(config.API.leaveSearch(), {
|
||||||
citizenId: dataDetail.cardId || "", //เลขประจำตัวประชาชน
|
citizenId: dataDetail.cardId || "", //เลขประจำตัวประชาชน
|
||||||
firstname: dataDetail.firstName || "", //ชื่อจริง
|
firstname: dataDetail.firstName || "", //ชื่อจริง
|
||||||
lastname: dataDetail.lastName || "", //นามสกุล
|
lastname: dataDetail.lastName || "", //นามสกุล
|
||||||
page: dataDetail.page || 1, //*หน้า
|
page: dataDetail.page, //หน้า
|
||||||
pageSize: dataDetail.pageSize || 10, //*จำนวนแถวต่อหน้า
|
pageSize: dataDetail.pageSize || 10, //จำนวนแถวต่อหน้า
|
||||||
keyword: dataDetail.keyword || "", //keyword ค้นหา
|
keyword: dataDetail.keyword || "", //keyword ค้นหา
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -150,10 +149,10 @@ export const useChangeRoundDataStore = defineStore(
|
||||||
roundStart: e.startTimeMorning,
|
roundStart: e.startTimeMorning,
|
||||||
roundEnd: e.leaveTimeAfterNoon,
|
roundEnd: e.leaveTimeAfterNoon,
|
||||||
currentRound: `${e.startTimeMorning}-${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 {
|
} else {
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
checkCilck.value = true;
|
checkCilck.value = true;
|
||||||
|
|
@ -162,7 +161,7 @@ export const useChangeRoundDataStore = defineStore(
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -181,13 +180,13 @@ export const useChangeRoundDataStore = defineStore(
|
||||||
* @param pageSizeVal pagesize
|
* @param pageSizeVal pagesize
|
||||||
*/
|
*/
|
||||||
async function changePage(pageVal: number, pageSizeVal: number) {
|
async function changePage(pageVal: number, pageSizeVal: number) {
|
||||||
page.value = await pageVal;
|
page.value = pageVal;
|
||||||
pageSize.value = await pageSizeVal;
|
pageSize.value = pageSizeVal;
|
||||||
fetchDatainHistory();
|
fetchDatainHistory();
|
||||||
}
|
}
|
||||||
/**ฟังก์ชั่นดึงดาต้าประวัติ */
|
/**ฟังก์ชั่นดึงดาต้าประวัติ */
|
||||||
async function fetchDatainHistory() {
|
async function fetchDatainHistory() {
|
||||||
console.log(profileId.value);
|
rowsHistory.value = [];
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
|
|
@ -196,7 +195,6 @@ export const useChangeRoundDataStore = defineStore(
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const dataHistory = res.data.result.data;
|
const dataHistory = res.data.result.data;
|
||||||
rowsHistory.value = [];
|
|
||||||
dataHistory.map((e: DataInterface) => {
|
dataHistory.map((e: DataInterface) => {
|
||||||
rowsHistory.value.push({
|
rowsHistory.value.push({
|
||||||
round: e.round,
|
round: e.round,
|
||||||
|
|
@ -208,9 +206,7 @@ export const useChangeRoundDataStore = defineStore(
|
||||||
});
|
});
|
||||||
total.value = res.data.result.total;
|
total.value = res.data.result.total;
|
||||||
maxPage.value = Math.ceil(total.value / pageSize.value);
|
maxPage.value = Math.ceil(total.value / pageSize.value);
|
||||||
maxPage.value = maxPage.value < 1 ? 1 : maxPage.value;
|
|
||||||
});
|
});
|
||||||
console.log(rowsHistory.value);
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -234,6 +230,8 @@ export const useChangeRoundDataStore = defineStore(
|
||||||
changePage,
|
changePage,
|
||||||
total,
|
total,
|
||||||
maxPage,
|
maxPage,
|
||||||
|
page,
|
||||||
|
pageSize,
|
||||||
|
|
||||||
totalListMain,
|
totalListMain,
|
||||||
maxPageMain,
|
maxPageMain,
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ export const useRoundDataStore = defineStore("roundWorkStore", () => {
|
||||||
* Function รับข้อมูลจาก API map
|
* Function รับข้อมูลจาก API map
|
||||||
* @param data รับข้อมูลจาก API
|
* @param data รับข้อมูลจาก API
|
||||||
*/
|
*/
|
||||||
function fetchData(data: dataRowRound[]) {
|
async function fetchData(data: dataRowRound[]) {
|
||||||
let datalist: roundShow[] = data.map((e: dataRowRound) => {
|
let datalist: roundShow[] = data.map((e: dataRowRound) => {
|
||||||
return {
|
return {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { useRoundDataStore } from "@/modules/09_leave/stores/RoundStores";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
/** ImportComponents*/
|
/** 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";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
|
|
@ -35,13 +35,13 @@ const resetFilter = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Function get ข้อมูลรายการรอบการปฏิบัติงาน */
|
/** Function get ข้อมูลรายการรอบการปฏิบัติงาน */
|
||||||
async function fetchListRoind() {
|
async function fetchListRound() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.roundDutytime())
|
.get(config.API.roundDutytime())
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = await res.data.result;
|
||||||
fetchData(data);
|
await fetchData(data);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -57,16 +57,18 @@ async function fetchListRoind() {
|
||||||
*/
|
*/
|
||||||
function onClickDelete(id: string) {
|
function onClickDelete(id: string) {
|
||||||
dialogRemove($q, async () => {
|
dialogRemove($q, async () => {
|
||||||
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.roundDutytimeByid(id))
|
.delete(config.API.roundDutytimeByid(id))
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
await fetchListRound();
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
await fetchListRoind();
|
hideLoader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -112,8 +114,8 @@ const pagination = ref({
|
||||||
});
|
});
|
||||||
|
|
||||||
/** Hook*/
|
/** Hook*/
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
fetchListRoind();
|
await fetchListRound();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -172,7 +174,6 @@ onMounted(() => {
|
||||||
map-options
|
map-options
|
||||||
:options="dataStore.columns"
|
:options="dataStore.columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
/>
|
/>
|
||||||
|
|
@ -285,7 +286,7 @@ onMounted(() => {
|
||||||
:closeDialog="closeDialog"
|
:closeDialog="closeDialog"
|
||||||
:editCheck="editCheck"
|
:editCheck="editCheck"
|
||||||
:detailData="detailData"
|
:detailData="detailData"
|
||||||
:fetchData="fetchListRoind"
|
:fetchData="fetchListRound"
|
||||||
v-model:isRead="isRead"
|
v-model:isRead="isRead"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
/** import Components */
|
/** import Components */
|
||||||
import Tab1 from "@/modules/09_leave/components/1_Work/Tab1.vue";
|
import Tab1 from "@/modules/09_leave/components/02_WorkList/Tab1.vue";
|
||||||
import Tab2 from "@/modules/09_leave/components/1_Work/Tab2.vue";
|
import Tab2 from "@/modules/09_leave/components/02_WorkList/Tab2.vue";
|
||||||
import DialogReport from "@/modules/09_leave/components/1_Work/DialogReport.vue";
|
import DialogReport from "@/modules/09_leave/components/02_WorkList/DialogReport.vue";
|
||||||
|
|
||||||
const tab = ref("1");
|
const tab = ref("1");
|
||||||
|
|
||||||
|
|
@ -8,9 +8,9 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
|
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
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 */
|
/** useStore */
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -32,7 +32,7 @@ const dateWork = ref<string>("NORMAL");
|
||||||
const modalFix = ref<boolean>(false);
|
const modalFix = ref<boolean>(false);
|
||||||
const editCheck = ref<string>("");
|
const editCheck = ref<string>("");
|
||||||
const DataRow = ref<any>();
|
const DataRow = ref<any>();
|
||||||
const formData = reactive<dataPost>({
|
const formData = reactive<DataPost>({
|
||||||
cardId: "",
|
cardId: "",
|
||||||
firstName: "",
|
firstName: "",
|
||||||
lastName: "",
|
lastName: "",
|
||||||
|
|
@ -45,14 +45,15 @@ const formData = reactive<dataPost>({
|
||||||
* @param check action edit,history
|
* @param check action edit,history
|
||||||
* @param detail รายละเอียดข้อมูลรอบการปฏิบัติของผู้ใช้งาน
|
* @param detail รายละเอียดข้อมูลรอบการปฏิบัติของผู้ใช้งาน
|
||||||
*/
|
*/
|
||||||
function Openmodal(check: string, detail: any) {
|
async function Openmodal(check: string, detail: any) {
|
||||||
DataRow.value = detail;
|
DataRow.value = detail;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
dataStore.setProfileId(DataRow.value.profileId);
|
dataStore.setProfileId(DataRow.value.profileId);
|
||||||
editCheck.value = check;
|
editCheck.value = check;
|
||||||
if (check === "history") {
|
if (check === "history") {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
dataStore.fetchDatainHistory();
|
dataStore.changePage(1, dataStore.pageSize);
|
||||||
|
// dataStore.fetchDatainHistory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,15 +72,15 @@ async function fetchDataCalendarWork(id: string) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
modalFix.value = true;
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const detailByid = ref();
|
const detailByid = ref();
|
||||||
async function OpenmodalFix(detail: any) {
|
async function OpenmodalFix(detail: any) {
|
||||||
await fetchDataCalendarWork(detail.profileId);
|
|
||||||
detailByid.value = detail;
|
detailByid.value = detail;
|
||||||
|
modalFix.value = true;
|
||||||
|
await fetchDataCalendarWork(detail.profileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Function closePopup */
|
/** Function closePopup */
|
||||||
|
|
@ -95,14 +96,15 @@ function save() {
|
||||||
.put(config.API.leaveWorkByid(detailByid.value.profileId), {
|
.put(config.API.leaveWorkByid(detailByid.value.profileId), {
|
||||||
work: dateWork.value,
|
work: dateWork.value,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
// await searchData();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
closeDialog();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
closeDialog();
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -113,14 +115,13 @@ function save() {
|
||||||
* @param newPagination ข้อมูล Pagination ใหม่
|
* @param newPagination ข้อมูล Pagination ใหม่
|
||||||
*/
|
*/
|
||||||
function updatePagination(newPagination: any) {
|
function updatePagination(newPagination: any) {
|
||||||
formData.page = 1;
|
|
||||||
formData.pageSize = newPagination.rowsPerPage;
|
formData.pageSize = newPagination.rowsPerPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Function ค้นหาข้อมูล */
|
/** Function ค้นหาข้อมูล */
|
||||||
function searchData() {
|
async function searchData() {
|
||||||
if (formData.cardId || formData.firstName || formData.lastName) {
|
if (formData.cardId || formData.firstName || formData.lastName) {
|
||||||
dataStore.fetchDataForCardId(formData);
|
await dataStore.fetchDataForCardId(formData);
|
||||||
} else {
|
} else {
|
||||||
dialogMessageNotify($q, "กรุณากรอกข้อมูลอย่างน้อย 1 ช่อง");
|
dialogMessageNotify($q, "กรุณากรอกข้อมูลอย่างน้อย 1 ช่อง");
|
||||||
}
|
}
|
||||||
|
|
@ -129,6 +130,7 @@ function searchData() {
|
||||||
watch(
|
watch(
|
||||||
() => formData.pageSize,
|
() => formData.pageSize,
|
||||||
() => {
|
() => {
|
||||||
|
formData.page = 1;
|
||||||
searchData();
|
searchData();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -291,7 +293,7 @@ watch(
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div>
|
<div>
|
||||||
{{ col.value }}
|
{{ col.value ?? '-' }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -12,11 +12,10 @@ import { checkPermission } from "@/utils/permissions";
|
||||||
import type {
|
import type {
|
||||||
DataDateMonthObject,
|
DataDateMonthObject,
|
||||||
DetailData,
|
DetailData,
|
||||||
Pagination,
|
|
||||||
} from "@/modules/09_leave/interface/request/specialTime";
|
} from "@/modules/09_leave/interface/request/specialTime";
|
||||||
|
|
||||||
import DialogReason from "@/components/Dialogs/PopupReason.vue";
|
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 $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -28,6 +27,7 @@ const {
|
||||||
showLoader,
|
showLoader,
|
||||||
success,
|
success,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
|
dialogConfirm,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const emit = defineEmits(["update:change-page"]);
|
const emit = defineEmits(["update:change-page"]);
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
|
|
@ -86,7 +86,6 @@ const visibleColumns = ref<String[]>([
|
||||||
"timeAfternoon",
|
"timeAfternoon",
|
||||||
"description",
|
"description",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -192,23 +191,25 @@ function closeDialog() {
|
||||||
|
|
||||||
/** API reject */
|
/** API reject */
|
||||||
async function clickSave(reason: string) {
|
async function clickSave(reason: string) {
|
||||||
showLoader();
|
dialogConfirm($q, async () => {
|
||||||
modalUnapprove.value = false;
|
showLoader();
|
||||||
const body = {
|
modalUnapprove.value = false;
|
||||||
reason: reason,
|
const body = {
|
||||||
};
|
reason: reason,
|
||||||
await http
|
};
|
||||||
.put(config.API.specialTimeReject(id.value), body)
|
await http
|
||||||
.then(() => {
|
.put(config.API.specialTimeReject(id.value), body)
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
.then(async () => {
|
||||||
})
|
await fetchData();
|
||||||
.catch((e) => {
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
messageError($q, e);
|
})
|
||||||
})
|
.catch((e) => {
|
||||||
.finally(async () => {
|
messageError($q, e);
|
||||||
await fetchData();
|
})
|
||||||
hideLoader();
|
.finally(() => {
|
||||||
});
|
hideLoader();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -396,7 +397,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
/>
|
/>
|
||||||
|
|
@ -475,6 +475,7 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
>อนุมัติ</q-btn
|
>อนุมัติ</q-btn
|
||||||
>
|
>
|
||||||
|
|
||||||
<q-badge
|
<q-badge
|
||||||
v-if="props.row.status == 'APPROVE'"
|
v-if="props.row.status == 'APPROVE'"
|
||||||
rounded
|
rounded
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
||||||
|
|
||||||
/**importComponets*/
|
/**importComponets*/
|
||||||
import Tab1 from "@/modules/09_leave/components/2_Leave/Tab1.vue";
|
import Tab1 from "@/modules/09_leave/components/05_Leave/Tab1.vue";
|
||||||
import Tab2 from "@/modules/09_leave/components/2_Leave/Tab2.vue";
|
import Tab2 from "@/modules/09_leave/components/05_Leave/Tab2.vue";
|
||||||
|
|
||||||
const leaveStore = useLeavelistDataStore();
|
const leaveStore = useLeavelistDataStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -82,17 +82,17 @@ async function fetchLeaveday(
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.post(config.API.leaveReportLeaveday(type), body)
|
.post(config.API.leaveReportLeaveday(type), body)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
data && genReport(data);
|
data && (await genReport(data));
|
||||||
!data && hideLoader();
|
|
||||||
detailReport.value = data;
|
detailReport.value = data;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
hideLoader();
|
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -101,7 +101,7 @@ async function fetchLeaveday(
|
||||||
*/
|
*/
|
||||||
async function genReport(data: any) {
|
async function genReport(data: any) {
|
||||||
await axios
|
await axios
|
||||||
.post(apiGenReport, data, {
|
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||||
headers: {
|
headers: {
|
||||||
accept: "application/pdf",
|
accept: "application/pdf",
|
||||||
"content-Type": "application/json",
|
"content-Type": "application/json",
|
||||||
|
|
@ -135,7 +135,7 @@ async function genReport(data: any) {
|
||||||
*/
|
*/
|
||||||
async function genReportXLSX(data: any) {
|
async function genReportXLSX(data: any) {
|
||||||
await axios
|
await axios
|
||||||
.post(apiGenReport, data, {
|
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||||
headers: {
|
headers: {
|
||||||
accept:
|
accept:
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
|
|
@ -98,7 +98,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -1348,7 +1348,7 @@ onMounted(async () => {
|
||||||
@click="openEditDirector(props.row)"
|
@click="openEditDirector(props.row)"
|
||||||
icon="edit"
|
icon="edit"
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไข</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!checkRoutePermisson && !isReadonly"
|
v-if="!checkRoutePermisson && !isReadonly"
|
||||||
|
|
|
||||||
|
|
@ -1551,7 +1551,7 @@ onMounted(async () => {
|
||||||
@click="openEditDirector(props.row)"
|
@click="openEditDirector(props.row)"
|
||||||
icon="edit"
|
icon="edit"
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไข</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ const columnsRespondent = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "fullname",
|
name: "fullname",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "fullname",
|
field: "fullname",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ export const useInvestigateDisStore = defineStore(
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -153,7 +153,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ export const useDisciplineResultStore = defineStore(
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ onMounted(() => {
|
||||||
borderless
|
borderless
|
||||||
readonly
|
readonly
|
||||||
:model-value="formDetail.fullName"
|
:model-value="formDetail.fullName"
|
||||||
label="ชื่อ - นามสกุล"
|
label="ชื่อ-นามสกุล"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ const columnsRespondent = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ const columnsRespondent = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import type {
|
||||||
DataOptionTechnique,
|
DataOptionTechnique,
|
||||||
FormProjectDetail,
|
FormProjectDetail,
|
||||||
DataOption,
|
DataOption,
|
||||||
StrategyNode
|
StrategyNode,
|
||||||
} from "@/modules/15_development/interface/index/Main";
|
} from "@/modules/15_development/interface/index/Main";
|
||||||
import type { DataStrategic } from "@/modules/15_development/interface/response/Main";
|
import type { DataStrategic } from "@/modules/15_development/interface/response/Main";
|
||||||
|
|
||||||
|
|
@ -310,12 +310,24 @@ function fetchTree() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Main save */
|
/** Main save */
|
||||||
function onSubmit() {
|
async function onSubmit() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.put(config.API.developmentMainTab("tab3", projectId.value), {
|
.put(config.API.developmentMainTab("tab3", projectId.value), {
|
||||||
...formData,
|
...formData,
|
||||||
totalDate: formData.totalDate === "" ? null : formData.totalDate,
|
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,
|
reasonPlanned70: reasonPlanned70.value,
|
||||||
reasonPlanned20: reasonPlanned20.value,
|
reasonPlanned20: reasonPlanned20.value,
|
||||||
reasonPlanned10: reasonPlanned10.value,
|
reasonPlanned10: reasonPlanned10.value,
|
||||||
|
|
@ -392,6 +404,21 @@ function updatetotalDate() {
|
||||||
function onNextTab() {
|
function onNextTab() {
|
||||||
step.value == "next" ? props.nextStep() : props.prevStep();
|
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>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-tree
|
<q-tree
|
||||||
|
style="height: 350px; overflow: scroll"
|
||||||
dense
|
dense
|
||||||
:nodes="nodes"
|
:nodes="nodes"
|
||||||
selected-color="primary"
|
selected-color="primary"
|
||||||
|
|
@ -529,6 +557,7 @@ defineExpose({
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-tree
|
<q-tree
|
||||||
|
style="height: 350px; overflow: scroll"
|
||||||
dense
|
dense
|
||||||
:nodes="nodes"
|
:nodes="nodes"
|
||||||
node-key="id"
|
node-key="id"
|
||||||
|
|
@ -680,8 +709,9 @@ defineExpose({
|
||||||
|
|
||||||
<div class="col-12 q-mt-md">
|
<div class="col-12 q-mt-md">
|
||||||
<span class="text-bold">สถานที่ดำเนินการ</span>
|
<span class="text-bold">สถานที่ดำเนินการ</span>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!checkRoutePermission"
|
v-if="!checkRoutePermission && isCheckLocation"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -785,11 +815,15 @@ defineExpose({
|
||||||
value="GO_BLACK"
|
value="GO_BLACK"
|
||||||
label="ไป-กลับ"
|
label="ไป-กลับ"
|
||||||
v-model="formData.isBackPlanned"
|
v-model="formData.isBackPlanned"
|
||||||
@update:model-value="props.onCheckChangeData()"
|
@update:model-value="
|
||||||
|
props.onCheckChangeData(),
|
||||||
|
(formData.projectDayBackPlanned = null)
|
||||||
|
"
|
||||||
></q-checkbox>
|
></q-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-4">
|
<div class="col-12 col-md-4">
|
||||||
<q-input
|
<q-input
|
||||||
|
:disable="!formData.isBackPlanned"
|
||||||
:readonly="
|
:readonly="
|
||||||
store.projectStatus === 'FINISH' || checkRoutePermission
|
store.projectStatus === 'FINISH' || checkRoutePermission
|
||||||
"
|
"
|
||||||
|
|
@ -816,11 +850,16 @@ defineExpose({
|
||||||
value="HOLD"
|
value="HOLD"
|
||||||
label="พักค้าง"
|
label="พักค้าง"
|
||||||
v-model="formData.isHoldPlanned"
|
v-model="formData.isHoldPlanned"
|
||||||
@update:model-value="props.onCheckChangeData()"
|
@update:model-value="
|
||||||
|
props.onCheckChangeData(),
|
||||||
|
(formData.projectDayHoldPlanned = null),
|
||||||
|
(formData.projectNigthHoldPlanned = null)
|
||||||
|
"
|
||||||
></q-checkbox>
|
></q-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-4">
|
<div class="col-12 col-md-4">
|
||||||
<q-input
|
<q-input
|
||||||
|
:disable="!formData.isHoldPlanned"
|
||||||
:readonly="
|
:readonly="
|
||||||
store.projectStatus === 'FINISH' || checkRoutePermission
|
store.projectStatus === 'FINISH' || checkRoutePermission
|
||||||
"
|
"
|
||||||
|
|
@ -836,6 +875,7 @@ defineExpose({
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-4">
|
<div class="col-12 col-md-4">
|
||||||
<q-input
|
<q-input
|
||||||
|
:disable="!formData.isHoldPlanned"
|
||||||
:readonly="
|
:readonly="
|
||||||
store.projectStatus === 'FINISH' || checkRoutePermission
|
store.projectStatus === 'FINISH' || checkRoutePermission
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "fullName",
|
name: "fullName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "fullName",
|
field: "fullName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -374,7 +374,9 @@ function onSubmitRelate() {
|
||||||
amount: formGroupRelate.amount,
|
amount: formGroupRelate.amount,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
await fetchData(projectId.value);
|
||||||
|
onClickCloseDialog();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -395,7 +397,9 @@ function onSubmitRelate() {
|
||||||
amount: formGroupRelate.amount,
|
amount: formGroupRelate.amount,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
await fetchData(projectId.value);
|
||||||
|
onClickCloseDialog();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -405,10 +409,6 @@ function onSubmitRelate() {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
|
||||||
fetchData(projectId.value);
|
|
||||||
onClickCloseDialog();
|
|
||||||
}, 100);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -434,7 +434,7 @@ function onClickCloseDialog() {
|
||||||
modalRelate.value = false;
|
modalRelate.value = false;
|
||||||
cleanFormData();
|
cleanFormData();
|
||||||
fetchType();
|
fetchType();
|
||||||
fetchData(projectId.value);
|
// fetchData(projectId.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const order = ref<string>(""); //เลขที่คำสั่ง/เลข
|
||||||
/** ตัวแปรข้อมูลข้าราชการ */
|
/** ตัวแปรข้อมูลข้าราชการ */
|
||||||
const formMain = reactive<FormAddHistory>({
|
const formMain = reactive<FormAddHistory>({
|
||||||
id: "",
|
id: "",
|
||||||
name: "", //ชื่อ - นามสกุล
|
name: "", //ชื่อ-นามสกุล
|
||||||
prefix: "", //คำนำหน้าชื่อ
|
prefix: "", //คำนำหน้าชื่อ
|
||||||
rank: "", //ยศ
|
rank: "", //ยศ
|
||||||
firstName: "", //ชื่อ
|
firstName: "", //ชื่อ
|
||||||
|
|
@ -147,7 +147,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<div class="col-sm-12 col-md-5 text-grey-6 text-weight-medium">
|
<div class="col-sm-12 col-md-5 text-grey-6 text-weight-medium">
|
||||||
ชื่อ - นามสกุล
|
ชื่อ-นามสกุล
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-sm-12 col-md-7">
|
<div class="col-12 col-sm-12 col-md-7">
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ const govOp = ref<DataOption[]>([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "fullName",
|
id: "fullName",
|
||||||
name: "ชื่อ - นามสกุล",
|
name: "ชื่อ-นามสกุล",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -82,7 +82,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ const order = ref<string>("");
|
||||||
/** ตัวแปรข้อมูลข้าราชการ */
|
/** ตัวแปรข้อมูลข้าราชการ */
|
||||||
const formMain = reactive<FormAddHistoryEmployee>({
|
const formMain = reactive<FormAddHistoryEmployee>({
|
||||||
id: "",
|
id: "",
|
||||||
name: "", //ชื่อ - นามสกุล
|
name: "", //ชื่อ-นามสกุล
|
||||||
prefix: "", //คำนำหน้าชื่อ
|
prefix: "", //คำนำหน้าชื่อ
|
||||||
rank: "", //ยศ
|
rank: "", //ยศ
|
||||||
firstName: "", //ชื่อ
|
firstName: "", //ชื่อ
|
||||||
|
|
@ -159,7 +159,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<div class="col-sm-12 col-md-5 text-grey-6 text-weight-medium">
|
<div class="col-sm-12 col-md-5 text-grey-6 text-weight-medium">
|
||||||
ชื่อ - นามสกุล
|
ชื่อ-นามสกุล
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-sm-12 col-md-7">
|
<div class="col-12 col-sm-12 col-md-7">
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,12 @@ interface FormProjectDetail {
|
||||||
dateStart: Date | null; //วันที่เริ่มต้น
|
dateStart: Date | null; //วันที่เริ่มต้น
|
||||||
dateEnd: Date | null; //วันที่สิ้นสุด
|
dateEnd: Date | null; //วันที่สิ้นสุด
|
||||||
totalDate: number | null | string; //รวมระยะเวลา (วัน)
|
totalDate: number | null | string; //รวมระยะเวลา (วัน)
|
||||||
developmentAddresss: [{ address: string; provinceId: string }]; //ที่อยู่ ,จังหวัด
|
developmentAddresss: DevelopmentAddress[]; //ที่อยู่ ,จังหวัด
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DevelopmentAddress {
|
||||||
|
address: string;
|
||||||
|
provinceId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DataHistory {
|
interface DataHistory {
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -388,7 +388,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -409,7 +409,6 @@ onMounted(() => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
style="min-width: 140px"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
|
||||||
|
|
@ -417,19 +417,18 @@ onMounted(() => {
|
||||||
map-options
|
map-options
|
||||||
@update:model-value="fetchListProjectNew"
|
@update:model-value="fetchListProjectNew"
|
||||||
/>
|
/>
|
||||||
<q-toolbar-title>
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkPermission($route)?.attrIsCreate"
|
v-if="checkPermission($route)?.attrIsCreate"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
icon="add"
|
icon="add"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="onAdd()"
|
@click="onAdd()"
|
||||||
>
|
>
|
||||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-toolbar-title>
|
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
|
|
@ -480,7 +479,6 @@ onMounted(() => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue