Merge branch 'develop' into devTee

This commit is contained in:
STW_TTTY\stwtt 2024-09-27 18:05:58 +07:00
commit dfa9f3405b
105 changed files with 1241 additions and 1266 deletions

View file

@ -259,7 +259,7 @@ watch(
clearable
dense
label="คำค้น"
:rules="[(val) => !!val || `กรุณากรอกคำค้น`]"
:rules="[(val:string) => !!val || `กรุณากรอกคำค้น`]"
>
<template v-slot:after>
<q-btn

View file

@ -68,7 +68,7 @@ function closeModal() {
outlined
dense
lazy-rules
:rules="[(val) => !!val || `กรุณากรอก${label}`]"
:rules="[(val:string) => !!val || `กรุณากรอก${label}`]"
v-model="reason"
:label="`${label}`"
/>

View file

@ -71,7 +71,7 @@ async function submit() {
outlined
dense
lazy-rules
:rules="[(val) => !!val || 'กรุณากรอกหัวข้อ']"
:rules="[(val:string) => !!val || 'กรุณากรอกหัวข้อ']"
v-model="subject"
label="หัวข้อ"
/>
@ -83,7 +83,7 @@ async function submit() {
outlined
dense
lazy-rules
:rules="[(val) => !!val || 'กรุณากรอกข้อความ']"
:rules="[(val:string) => !!val || 'กรุณากรอกข้อความ']"
v-model="body"
label="ข้อความ"
/>

View file

@ -85,7 +85,7 @@
dense
:borderless="!edit"
:model-value="date2Thai(date)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
hide-bottom-space
:label="`${'วันที่ได้รับ'}`"
>
@ -114,7 +114,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="point"
:rules="[(val) => !!val || `${'กรุณากรอกคะแนน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกคะแนน'}`]"
hide-bottom-space
:label="`${'คะแนน'}`"
@update:modelValue="clickEditRow"
@ -131,7 +131,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="point1Total"
:rules="[(val) => !!val || `${'กรุณากรอกส่วนที่1 (คะแนน)'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกส่วนที่1 (คะแนน)'}`]"
hide-bottom-space
:label="`${'ส่วนที่1 (คะแนน)'}`"
@update:modelValue="clickEditRow"
@ -149,7 +149,7 @@
:borderless="!edit"
v-model="point1"
:rules="[
(val) => !!val || `${'กรุณากรอกผลประเมินส่วนที่1 (คะแนน)'}`,
(val:string) => !!val || `${'กรุณากรอกผลประเมินส่วนที่1 (คะแนน)'}`,
]"
hide-bottom-space
:label="`${'ผลประเมินส่วนที่1 (คะแนน)'}`"
@ -167,7 +167,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="point2Total"
:rules="[(val) => !!val || `${'กรุณากรอกส่วนที่2 (คะแนน)'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกส่วนที่2 (คะแนน)'}`]"
hide-bottom-space
:label="`${'ส่วนที่2 (คะแนน)'}`"
@update:modelValue="clickEditRow"
@ -185,7 +185,7 @@
:borderless="!edit"
v-model="point2"
:rules="[
(val) => !!val || `${'กรุณากรอกผลประเมินส่วนที่2 (คะแนน)'}`,
(val:string) => !!val || `${'กรุณากรอกผลประเมินส่วนที่2 (คะแนน)'}`,
]"
hide-bottom-space
:label="`${'ผลประเมินส่วนที่2 (คะแนน)'}`"
@ -203,7 +203,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="pointSumTotal"
:rules="[(val) => !!val || `${'กรุณากรอกผลรวม (คะแนน)'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกผลรวม (คะแนน)'}`]"
hide-bottom-space
:label="`${'ผลรวม (คะแนน)'}`"
@update:modelValue="clickEditRow"
@ -221,7 +221,7 @@
:borderless="!edit"
v-model="pointSum"
:rules="[
(val) => !!val || `${'กรุณากรอกผลประเมินรวม (คะแนน)'}`,
(val:string) => !!val || `${'กรุณากรอกผลประเมินรวม (คะแนน)'}`,
]"
hide-bottom-space
:label="`${'ผลประเมินรวม (คะแนน)'}`"
@ -246,7 +246,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="name"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อแบบประเมิน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อแบบประเมิน'}`]"
hide-bottom-space
:label="`${'ชื่อแบบประเมิน'}`"
@update:modelValue="clickEditRow"

View file

@ -79,7 +79,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="certificateType"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อใบอนุญาต'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อใบอนุญาต'}`]"
hide-bottom-space
:label="`${'ชื่อใบอนุญาต'}`"
@update:modelValue="clickEditRow"
@ -95,7 +95,7 @@
:borderless="!edit"
v-model="issuer"
:rules="[
(val) => !!val || `${'กรุณากรอกหน่วยงานผู้ออกใบอนุญาต'}`,
(val:string) => !!val || `${'กรุณากรอกหน่วยงานผู้ออกใบอนุญาต'}`,
]"
hide-bottom-space
:label="`${'หน่วยงานผู้ออกใบอนุญาต'}`"
@ -111,7 +111,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="certificateNo"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่ใบอนุญาต'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่ใบอนุญาต'}`]"
hide-bottom-space
:label="`${'เลขที่ใบอนุญาต'}`"
@update:modelValue="clickEditRow"
@ -140,7 +140,7 @@
:borderless="!edit"
:model-value="date2Thai(issueDate)"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่ออกใบอนุญาต'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่ออกใบอนุญาต'}`,
]"
hide-bottom-space
:label="`${'วันที่ออกใบอนุญาต'}`"
@ -184,7 +184,7 @@
dense
:borderless="!edit"
:model-value="date2Thai(expireDate)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่หมดอายุ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่หมดอายุ'}`]"
hide-bottom-space
:label="`${'วันที่หมดอายุ'}`"
>

View file

@ -90,7 +90,7 @@
dense
:borderless="!edit"
:model-value="date2Thai(issueDate)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
hide-bottom-space
:label="`${'วันที่ได้รับ'}`"
>
@ -120,7 +120,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="issuer"
:rules="[(val) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]"
hide-bottom-space
:label="`${'ผู้มีอำนาจลงนาม'}`"
@update:modelValue="clickEditRow"
@ -136,7 +136,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="detail"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
hide-bottom-space
:label="`${'รายละเอียด'}`"
@update:modelValue="clickEditRow"

View file

@ -56,7 +56,7 @@
lazy-rules
v-model="name"
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณากรอกชื่อเอกสาร'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อเอกสาร'}`]"
:label="`${'ชื่อเอกสาร'}`"
/>
<q-uploader

View file

@ -107,7 +107,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="institute"
:rules="[(val) => !!val || `${'กรุณากรอกสถานศึกษา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกสถานศึกษา'}`]"
hide-bottom-space
:label="`${'สถานศึกษา'}`"
@update:modelValue="clickEditRow"
@ -161,7 +161,7 @@
:borderless="!edit"
:model-value="startDate + 543"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณาเลือกปีที่เริ่มต้นศึกษา'}`,
]"
hide-bottom-space
@ -205,7 +205,7 @@
:borderless="!edit"
:model-value="date2Thai(startDate2)"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือกวัน เดือน ปี ที่เริ่มต้นศึกษา'}`,
]"
@ -254,7 +254,7 @@
:borderless="!edit"
:model-value="endDate + 543"
:rules="[
(val) => !!val || `${'กรุณาเลือกปีที่จบการศึกษา'}`,
(val:string) => !!val || `${'กรุณาเลือกปีที่จบการศึกษา'}`,
]"
hide-bottom-space
:label="`${'ปีที่จบการศึกษา'}`"
@ -297,7 +297,7 @@
:borderless="!edit"
:model-value="date2Thai(endDate2)"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือกวัน เดือน ปี ที่จบการศึกษา'}`,
]"
@ -346,7 +346,7 @@
:borderless="!edit"
:model-value="date2Thai(finishDate)"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
]"
hide-bottom-space
:label="`${'วันที่สำเร็จการศึกษา'}`"
@ -400,7 +400,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="degree"
:rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
hide-bottom-space
:label="`${'วุฒิการศึกษา'}`"
@update:modelValue="clickEditRow"
@ -415,7 +415,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="field"
:rules="[(val) => !!val || `${'กรุณากรอกสาขาวิชา/ทาง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกสาขาวิชา/ทาง'}`]"
hide-bottom-space
:label="`${'สาขาวิชา/ทาง'}`"
@update:modelValue="clickEditRow"
@ -444,7 +444,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="gpa"
:rules="[(val) => !!val || `${'กรุณากรอกเกรดเฉลี่ย'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเกรดเฉลี่ย'}`]"
hide-bottom-space
:label="`${'เกรดเฉลี่ย'}`"
@update:modelValue="clickEditRow"
@ -459,7 +459,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="country"
:rules="[(val) => !!val || `${'กรุณากรอกประเทศ'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเทศ'}`]"
hide-bottom-space
:label="`${'ประเทศ'}`"
@update:modelValue="clickEditRow"
@ -502,7 +502,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="durationYear"
:rules="[(val) => !!val || `${'กรุณากรอกระยะเวลาหลักสูตร'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกระยะเวลาหลักสูตร'}`]"
hide-bottom-space
:label="`${'ระยะเวลาหลักสูตร'}`"
@update:modelValue="clickEditRow"

View file

@ -149,7 +149,7 @@
:borderless="!edit"
:model-value="date2Thai(new Date(govermentData.containDate))"
:rules="[
(val) =>
(val:any) =>
!!val ||
`${
profileType == 'officer'
@ -201,7 +201,7 @@
:borderless="!edit"
:model-value="date2Thai(new Date(govermentData.workDate))"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${
profileType == 'officer'

View file

@ -127,7 +127,7 @@
:readonly="!edit || status == 'lastName'"
:borderless="!edit"
v-model="firstName"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อ'}`]"
hide-bottom-space
:label="`${'ชื่อ'}`"
@update:modelValue="clickEditRow"
@ -142,7 +142,7 @@
:readonly="!edit || status == 'firstName'"
:borderless="!edit"
v-model="lastName"
:rules="[(val) => !!val || `${'กรุณากรอกนามสกุล'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกนามสกุล'}`]"
hide-bottom-space
:label="`${'นามสกุล'}`"
@update:modelValue="clickEditRow"

View file

@ -78,7 +78,7 @@
dense
:borderless="!edit"
:model-value="date2Thai(date)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
hide-bottom-space
:label="`${'วันที่'}`"
>
@ -108,7 +108,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="detail"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
hide-bottom-space
:label="`${'รายละเอียด'}`"
@update:modelValue="clickEditRow"

View file

@ -84,7 +84,7 @@
dense
:borderless="!edit"
:model-value="date2Thai(date)"
:rules="[(val) => !!val || `${'กรุณาเลือกวัน เดือน ปี'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวัน เดือน ปี'}`]"
hide-bottom-space
:label="`${'วัน เดือน ปี'}`"
>
@ -114,7 +114,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="reference"
:rules="[(val) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
hide-bottom-space
:label="`${'เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRow"
@ -130,7 +130,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="detail"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
hide-bottom-space
:label="`${'รายละเอียด'}`"
@update:modelValue="clickEditRow"

View file

@ -63,7 +63,7 @@
autogrow
:borderless="!edit"
v-model="field"
:rules="[(val) => !!val || `${'กรุณากรอกด้าน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกด้าน'}`]"
hide-bottom-space
:label="`${'ด้าน'}`"
@update:modelValue="clickEditRow"
@ -79,7 +79,7 @@
autogrow
:borderless="!edit"
v-model="detail"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
hide-bottom-space
:label="`${'รายละเอียด'}`"
@update:modelValue="clickEditRow"
@ -110,7 +110,7 @@
autogrow
:borderless="!edit"
v-model="reference"
:rules="[(val) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
hide-bottom-space
:label="`${'เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRow"

View file

@ -77,7 +77,7 @@
:borderless="!edit"
v-model="name"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณากรอกชื่อโครงการ/หลักสูตรการฝึกอบรม'}`,
]"
:label="`${'ชื่อโครงการ/หลักสูตรการฝึกอบรม'}`"
@ -95,7 +95,7 @@
:borderless="!edit"
v-model="topic"
:rules="[
(val) => !!val || `${'กรุณากรอกหัวข้อการฝึกอบรม/ดูงาน'}`,
(val:string) => !!val || `${'กรุณากรอกหัวข้อการฝึกอบรม/ดูงาน'}`,
]"
:label="`${'หัวข้อการฝึกอบรม/ดูงาน'}`"
@update:modelValue="clickEditRow"
@ -125,7 +125,7 @@
:borderless="!edit"
:model-value="date2Thai(startDate)"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณาเลือกวันเริ่มต้นการฝึกอบรม/ดูงาน'}`,
]"
:label="`${'วันเริ่มต้นการฝึกอบรม/ดูงาน'}`"
@ -171,7 +171,7 @@
:borderless="!edit"
:model-value="date2Thai(endDate)"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณาเลือกวันสิ้นสุดการฝึกอบรม/ดูงาน'}`,
]"
:label="`${'วันสิ้นสุดการฝึกอบรม/ดูงาน'}`"
@ -215,7 +215,7 @@
dense
:borderless="!edit"
:model-value="yearly + 543"
:rules="[(val) => !!val || `${'กรุณาเลือกปีงบประมาณ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกปีงบประมาณ'}`]"
:label="`${'ปีงบประมาณ'}`"
>
<template v-slot:prepend>
@ -245,7 +245,7 @@
:borderless="!edit"
v-model="place"
:rules="[
(val) => !!val || `${'กรุณากรอกสถานที่ฝึกอบรม/ดูงาน'}`,
(val:string) => !!val || `${'กรุณากรอกสถานที่ฝึกอบรม/ดูงาน'}`,
]"
:label="`${'สถานที่ฝึกอบรม/ดูงาน'}`"
@update:modelValue="clickEditRow"
@ -320,7 +320,7 @@
:label="`${'คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่'}`"
>
<!-- :rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือกคำสั่งลงวันที่/หนังสืออนุมัติลงวันที่'}`,
]" -->

View file

@ -85,7 +85,7 @@
dense
:borderless="!edit"
:model-value="date2Thai(dateStart)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่เริ่มต้น'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่เริ่มต้น'}`]"
hide-bottom-space
:label="`${'วันที่เริ่มต้น'}`"
>
@ -128,7 +128,7 @@
dense
:borderless="!edit"
:model-value="date2Thai(dateEnd)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่สิ้นสุด'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่สิ้นสุด'}`]"
hide-bottom-space
:label="`${'วันที่สิ้นสุด'}`"
>
@ -158,7 +158,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="reference"
:rules="[(val) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
hide-bottom-space
:label="`${'เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRow"
@ -174,7 +174,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="detail"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
hide-bottom-space
:label="`${'รายละเอียด'}`"
@update:modelValue="clickEditRow"

View file

@ -385,7 +385,7 @@ onMounted(async () => {
dense
class="inputgreen"
:rules="[
(val) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,
(val:string) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,
]"
hide-bottom-space
/>
@ -404,7 +404,7 @@ onMounted(async () => {
dense
class="inputgreen"
:rules="[
(val) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,
(val:string) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,
]"
hide-bottom-space
/>
@ -423,7 +423,7 @@ onMounted(async () => {
dense
class="inputgreen"
:rules="[
(val) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,
(val:string) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,
]"
hide-bottom-space
/>
@ -442,7 +442,7 @@ onMounted(async () => {
dense
class="inputgreen"
:rules="[
(val) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,
(val:string) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,
]"
hide-bottom-space
/>
@ -461,7 +461,7 @@ onMounted(async () => {
dense
class="inputgreen"
:rules="[
(val) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,
(val:string) => !!val || `${'กรุณากรอกผลสำเร็จของงาน'}`,
]"
hide-bottom-space
/>

View file

@ -132,7 +132,7 @@ function onSubmit() {
label-slot
borderless
:rules="[
(val) =>
(val:string) =>
!!val || 'กรุณาระบุคำอธิบาย L1 ระดับ หัวหน้าฝ่ายในสังกัด',
]"
hide-bottom-space
@ -185,7 +185,7 @@ function onSubmit() {
label-slot
borderless
:rules="[
(val) =>
(val:string) =>
!!val ||
'กรุณาระบุคำอธิบาย L2 ระดับ ผู้ช่วยผู้อำนวยการเขต',
]"
@ -239,7 +239,7 @@ function onSubmit() {
label-slot
borderless
:rules="[
(val) =>
(val:string) =>
!!val || 'กรุณาระบุคำอธิบาย L3 ระดับ ผู้อำนวยการเขต',
]"
hide-bottom-space

View file

@ -128,7 +128,7 @@ function onSubmit() {
label-slot
borderless
:rules="[
(val) =>
(val:string) =>
!!val || 'กรุณาระบุคำอธิบาย L1 ประเภทอำนวยการ ระดับสูง',
]"
hide-bottom-space
@ -181,7 +181,7 @@ function onSubmit() {
label-slot
borderless
:rules="[
(val) =>
(val:string) =>
!!val || 'กรุณาระบุคำอธิบาย L2 ประเภทบริหาร ระดับสูง',
]"
hide-bottom-space

View file

@ -234,7 +234,7 @@ onMounted(() => {
label-slot
borderless
:rules="[
(val) =>
(val:string) =>
!!val || 'กรุณากรอกพฤติกรรมที่คาดหวัง/พฤติกรรมย่อย',
]"
hide-bottom-space

View file

@ -102,7 +102,7 @@
:borderless="!edit"
v-model="name"
autogrow
:rules="[(val) => (val && val.length > 0) || '']"
:rules="[(val:string) => (val && val.length > 0) || '']"
/>
<q-option-group
v-if="showEdit == false"

View file

@ -149,7 +149,7 @@
class="full-width datepicker q-pb-none"
v-model="name"
type="textarea"
:rules="[(val) => (val && val.length > 0) || '']"
:rules="[(val:string) => (val && val.length > 0) || '']"
/>
</div>
</div>

View file

@ -84,8 +84,8 @@
autofocus
hide-bottom-space
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อมูลให้ครบ',
(val) =>
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อมูลให้ครบ',
(val:string) =>
checkDupDataName(val) || 'ชื่อซ้ำกันกับข้อมูลที่มีอยู่แล้ว',
]"
></q-input>
@ -104,8 +104,8 @@
lazy-rules
hide-bottom-space
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อมูลให้ครบ',
(val) =>
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อมูลให้ครบ',
(val:string) =>
checkDupDataShortName(val) ||
'ชื่อซ้ำกันกับข้อมูลที่มีอยู่แล้ว',
]"

View file

@ -72,8 +72,8 @@
autofocus
hide-bottom-space
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อมูลให้ครบ',
(val) =>
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อมูลให้ครบ',
(val:string) =>
checkDupDataName(val) || 'ชื่อซ้ำกันกับข้อมูลที่มีอยู่แล้ว',
]"
></q-input>

View file

@ -127,7 +127,8 @@ function onSubmit() {
if (type === "Child1") {
body = {
...body,
isOfficer: formData.isOfficer,
isOfficer:
formData.isOfficer !== undefined ? String(formData.isOfficer) : "",
};
}
@ -379,7 +380,7 @@ function onChangeIsOfficer() {
:label="level == 0 ? 'ชื่อหน่วยงาน' : 'ชื่อส่วนราชการ'"
hide-bottom-space
:rules="[
(val) =>
(val:string) =>
!!val ||
`${
level == 0
@ -404,7 +405,7 @@ function onChangeIsOfficer() {
for="#shortName"
label="อักษรย่อ"
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณากรอกอักษรย่อ'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกอักษรย่อ'}`]"
/>
</div>
<div class="col-2">
@ -424,7 +425,7 @@ function onChangeIsOfficer() {
:label="level == 0 ? 'รหัสหน่วยงาน' : 'รหัสส่วนราชการ'"
hide-bottom-space
:rules="[
(val) =>
(val:string) =>
!!val ||
`${
level == 0
@ -453,7 +454,7 @@ function onChangeIsOfficer() {
level == 0 ? 'ระดับของหน่วยงาน' : 'ระดับของส่วนราชการ'
"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${
level == 0
@ -478,7 +479,7 @@ function onChangeIsOfficer() {
:options="orgLevelSubOptionMain"
label="ระดับของส่วนราชการ(ซับ)"
:rules="[
(val) => !!val || 'กรุณาเลือกระดับของส่วนราชการ (ซับ)',
(val:string) => !!val || 'กรุณาเลือกระดับของส่วนราชการ (ซับ)',
]"
lazy-rules
/>

View file

@ -146,7 +146,7 @@ watch(
"
label="วันที่เผยแพร่"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่เผยแพร่'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่เผยแพร่'}`,
]"
>
<template v-slot:prepend>

View file

@ -170,7 +170,7 @@ watch(
for="#orgRevisionName"
label="ชื่อโครงสร้าง"
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณากรอกชื่อโครงสร้าง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อโครงสร้าง'}`]"
/>
</div>
<div class="col-6">
@ -188,7 +188,7 @@ watch(
v-model="formData.typeDraft"
:options="typeOp"
label="ประเภทการโคลน"
:rules="[(val) => !!val || `${'กรุณาเลือกประเภทการโคลน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกประเภทการโคลน'}`]"
lazy-rules
/>
</div>

View file

@ -205,7 +205,7 @@
@filter="positionPathSideFilterFn"
color="primary"
/>
<!-- :rules="[(val) => !!val || `${'กรุณาเลือกด้าน/สาขา'}`]" -->
<!-- :rules="[(val:string) => !!val || `${'กรุณาเลือกด้าน/สาขา'}`]" -->
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<selector
@ -232,7 +232,7 @@
color="primary"
/>
<!-- :rules="[
(val) => !!val || `${'กรุณาเลือกตำแหน่งทางการบริหาร'}`,
(val:string) => !!val || `${'กรุณาเลือกตำแหน่งทางการบริหาร'}`,
]" -->
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
@ -257,7 +257,7 @@
@filter="positionExecutiveSideFilterFn"
color="primary"
/>
<!-- :rules="[(val) => !!val || `${'กรุณาเลือกด้านทางการบริหาร'}`]" -->
<!-- :rules="[(val:string) => !!val || `${'กรุณาเลือกด้านทางการบริหาร'}`]" -->
</div>
<div class="col-xs-8 col-sm-8 col-md-8">
<selector

View file

@ -522,7 +522,7 @@
"
color="primary"
/>
<!-- :rules="[(val) => !!val || `${'กรุณาเลือกด้าน/สาขา'}`]" -->
<!-- :rules="[(val:string) => !!val || `${'กรุณาเลือกด้าน/สาขา'}`]" -->
</div>
<!-- <div class="col-xs-6 col-sm-6 col-md-6">
<selector
@ -1293,7 +1293,7 @@ const fetchAgencyCode = async (val: string) => {
const fetchPosition = async () => {
showLoader();
await http
.get(config.API.positionEmployee)
.get(config.API.positionEmployee(''))
.then((res) => {
const data = res.data.result;

View file

@ -333,7 +333,7 @@
option-value="id"
lazy-rules
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณาเลือก ชื่อหน่วยงาน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก ชื่อหน่วยงาน'}`]"
>
<template v-slot:no-option>
<q-item>
@ -362,7 +362,7 @@
option-value="id"
lazy-rules
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณาเลือก ตำแหน่งเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก ตำแหน่งเลขที่'}`]"
>
<template v-slot:no-option>
<q-item>
@ -391,7 +391,7 @@
option-value="id"
lazy-rules
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณาเลือก ตำแหน่งเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก ตำแหน่งเลขที่'}`]"
>
<template v-slot:no-option>
<q-item>
@ -459,7 +459,7 @@
</q-item>
</template>
</q-select>
<!-- :rules="[(val) => !!val || `${'กรุณาเลือก ด้านทางบริหาร'}`]" -->
<!-- :rules="[(val:string) => !!val || `${'กรุณาเลือก ด้านทางบริหาร'}`]" -->
<q-select
use-input
input-debounce="0"
@ -479,7 +479,7 @@
option-value="id"
lazy-rules
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณาเลือก ตำแหน่งในสายงาน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก ตำแหน่งในสายงาน'}`]"
>
<template v-slot:no-option>
<q-item>
@ -538,7 +538,7 @@
option-value="id"
lazy-rules
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณาเลือก ระดับตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก ระดับตำแหน่ง'}`]"
>
<template v-slot:no-option>
<q-item>

View file

@ -146,7 +146,7 @@ const emit = defineEmits([
]);
const updateInput = async (value: any) => {
await emit("update:inputfilter", value);
emit("update:inputfilter", value);
};
// search & get new data by keyword
@ -193,7 +193,7 @@ async function candidateToPlacement() {
.onOk(async () => {
await http
.get(config.API.periodExamToPlacement(examId.value))
.then((res) => {
.then(() => {
success($q, "นำผู้ผ่านคัดเลือกเข้าสู่ระบบบรรจุ");
})
.catch((e) => {
@ -214,7 +214,7 @@ async function uploadDataSeat() {
formData.append("", files.value[0]);
await http
.put(config.API.periodExamUploadSeat(examId.value), formData)
.then((res) => {
.then(() => {
success($q, "อัพเดทที่นั่งสอบสำเร็จ");
})
.catch((e) => {
@ -233,7 +233,7 @@ async function uploadDataPoint() {
formData.append("", files.value[0]);
await http
.put(config.API.periodExamUploadPoint(examId.value), formData)
.then((res) => {
.then(() => {
success($q, "อัพเดทคะแนนสอบสำเร็จ");
files.value = [];
})
@ -293,7 +293,7 @@ async function checkCandidates() {
.post(config.API.candidateCheckRegisters, {
candidateId: _selected,
})
.then((res) => {
.then(() => {
success($q, "ตรวจสอบข้อมูลสำเร็จ");
selected.value = [];
})
@ -374,7 +374,7 @@ async function clickPassExam() {
showLoader();
await http
.get(config.API.exportExamPassExamList(examId.value))
.then((res) => {
.then(() => {
window.open(config.API.exportExamPassExamList(examId.value));
})
.catch((e) => {
@ -389,7 +389,7 @@ async function clickCandidateList() {
showLoader();
await http
.get(config.API.exportExamCandidateList(examId.value))
.then((res) => {
.then(() => {
window.open(config.API.exportExamCandidateList(examId.value));
})
.catch((e) => {
@ -413,7 +413,6 @@ watch(
);
}
);
</script>
<template>
<div class="q-px-md q-pb-md">

View file

@ -73,7 +73,7 @@
dense
:error="dayChecked"
error-message="กรุณากรอกวันที่ได้รับ"
:rules="[(val) => !!val || `${'กรุณากรอกวันที่ได้รับ'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกวันที่ได้รับ'}`]"
/>
<datepicker
v-else
@ -98,7 +98,7 @@
lazy-rules
:borderless="!edit"
:model-value="date2Thai(date)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
hide-bottom-space
:label="`${'วันที่ได้รับ'}`"
>
@ -127,7 +127,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="point"
:rules="[(val) => !!val || `${'กรุณากรอกคะแนน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกคะแนน'}`]"
hide-bottom-space
:label="`${'คะแนน'}`"
@update:modelValue="clickEditRow"
@ -144,7 +144,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="point1Total"
:rules="[(val) => !!val || `${'กรุณากรอกส่วนที่1 (คะแนน)'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกส่วนที่1 (คะแนน)'}`]"
hide-bottom-space
:label="`${'ส่วนที่1 (คะแนน)'}`"
@update:modelValue="clickEditRow"
@ -162,7 +162,7 @@
:borderless="!edit"
v-model="point1"
:rules="[
(val) => !!val || `${'กรุณากรอกผลประเมินส่วนที่1 (คะแนน)'}`,
(val:string) => !!val || `${'กรุณากรอกผลประเมินส่วนที่1 (คะแนน)'}`,
]"
hide-bottom-space
:label="`${'ผลประเมินส่วนที่1 (คะแนน)'}`"
@ -180,7 +180,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="point2Total"
:rules="[(val) => !!val || `${'กรุณากรอกส่วนที่2 (คะแนน)'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกส่วนที่2 (คะแนน)'}`]"
hide-bottom-space
:label="`${'ส่วนที่2 (คะแนน)'}`"
@update:modelValue="clickEditRow"
@ -198,7 +198,7 @@
:borderless="!edit"
v-model="point2"
:rules="[
(val) => !!val || `${'กรุณากรอกผลประเมินส่วนที่2 (คะแนน)'}`,
(val:string) => !!val || `${'กรุณากรอกผลประเมินส่วนที่2 (คะแนน)'}`,
]"
hide-bottom-space
:label="`${'ผลประเมินส่วนที่2 (คะแนน)'}`"
@ -216,7 +216,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="pointSumTotal"
:rules="[(val) => !!val || `${'กรุณากรอกผลรวม (คะแนน)'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกผลรวม (คะแนน)'}`]"
hide-bottom-space
:label="`${'ผลรวม (คะแนน)'}`"
@update:modelValue="clickEditRow"
@ -234,7 +234,7 @@
:borderless="!edit"
v-model="pointSum"
:rules="[
(val) => !!val || `${'กรุณากรอกผลประเมินรวม (คะแนน)'}`,
(val:string) => !!val || `${'กรุณากรอกผลประเมินรวม (คะแนน)'}`,
]"
hide-bottom-space
:label="`${'ผลประเมินรวม (คะแนน)'}`"
@ -259,7 +259,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="name"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อแบบประเมิน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อแบบประเมิน'}`]"
hide-bottom-space
:label="`${'ชื่อแบบประเมิน'}`"
@update:modelValue="clickEditRow"

View file

@ -110,7 +110,7 @@ a
dense
:error="yearChecked"
error-message="กรุณากรอกปี"
:rules="[(val) => !!val || `${'กรุณากรอกปี'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกปี'}`]"
/>
<q-input
v-if="edit && isDate === 'true'"
@ -121,7 +121,7 @@ a
dense
:error="dayChecked"
error-message="กรุณากรอกวัน/เดือน/ปี"
:rules="[(val) => !!val || `${'กรุณากรอกวัน/เดือน/ปี'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกวัน/เดือน/ปี'}`]"
/>
<datepicker
v-if="isDate === 'false' && !edit"
@ -187,7 +187,7 @@ a
dense
:borderless="!edit"
:model-value="date2Thai(issueDate2)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
hide-bottom-space
:label="`${'วันที่ได้รับ'}`"
:readonly="!edit"
@ -232,7 +232,7 @@ a
:readonly="!edit"
:borderless="!edit"
v-model="detail"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
hide-bottom-space
:label="`${'รายละเอียด'}`"
@update:modelValue="clickEditRow"

View file

@ -69,7 +69,7 @@
dense
:error="dayChecked"
error-message="กรุณากรอก วัน/เดือน/ปี"
:rules="[(val) => !!val || `${'กรุณากรอก วัน/เดือน/ปี'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอก วัน/เดือน/ปี'}`]"
hide-bottom-space
/>
<datepicker

View file

@ -60,7 +60,7 @@
lazy-rules
v-model="name"
hide-bottom-space
:rules="[(val) => !!val || `${'กรุณากรอกชื่อเอกสาร'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อเอกสาร'}`]"
:label="`${'ชื่อเอกสาร'}`"
/>
<q-uploader

View file

@ -111,7 +111,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="institute"
:rules="[(val) => !!val || `${'กรุณากรอกสถานศึกษา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกสถานศึกษา'}`]"
hide-bottom-space
:label="`${'สถานศึกษา'}`"
@update:modelValue="clickEditRow"
@ -177,7 +177,7 @@
:borderless="!edit"
:model-value="Number(startDate) + 543"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณาเลือกปีที่เริ่มต้นศึกษา'}`,
]"
hide-bottom-space
@ -235,7 +235,7 @@
:borderless="!edit"
:model-value="date2Thai(startDate2 as Date)"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือก วัน/เดือน/ปี ที่เริ่มต้นศึกษา'}`,
]"
@ -298,7 +298,7 @@
:borderless="!edit"
:model-value="Number(endDate) + 543"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณาเลือกปีที่จบการศึกษา'}`,
]"
hide-bottom-space
@ -355,7 +355,7 @@
:borderless="!edit"
:model-value="date2Thai(endDate2 as Date)"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือกวัน เดือน ปี ที่จบการศึกษา'}`,
]"
@ -417,7 +417,7 @@
:label="`${'วัน/เดือน/ปี / ที่สำเร็จการศึกษา'}`"
>
<!-- :rules="[
(val) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
]" -->
<template v-slot:prepend>
@ -484,7 +484,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="degree"
:rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
hide-bottom-space
:label="`${'วุฒิการศึกษา'}`"
@update:modelValue="clickEditRow"
@ -503,7 +503,7 @@
:label="`${'สาขาวิชา/ทาง'}`"
@update:modelValue="clickEditRow"
/>
<!-- :rules="[(val) => !!val || `${'กรุณากรอกสาขาวิชา/ทาง'}`]" -->
<!-- :rules="[(val:string) => !!val || `${'กรุณากรอกสาขาวิชา/ทาง'}`]" -->
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
@ -532,7 +532,7 @@
:label="`${'เกรดเฉลี่ย'}`"
@update:modelValue="clickEditRow"
/>
<!-- :rules="[(val) => !!val || `${'กรุณากรอกเกรดเฉลี่ย'}`]" -->
<!-- :rules="[(val:string) => !!val || `${'กรุณากรอกเกรดเฉลี่ย'}`]" -->
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
@ -547,7 +547,7 @@
:label="`${'ประเทศ'}`"
@update:modelValue="clickEditRow"
/>
<!-- :rules="[(val) => !!val || `${'กรุณากรอกประเทศ'}`]" -->
<!-- :rules="[(val:string) => !!val || `${'กรุณากรอกประเทศ'}`]" -->
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
@ -591,7 +591,7 @@
@update:modelValue="clickEditRow"
type="number"
/>
<!-- :rules="[(val) => !!val || `${'กรุณากรอกระยะเวลาหลักสูตร'}`]" -->
<!-- :rules="[(val:string) => !!val || `${'กรุณากรอกระยะเวลาหลักสูตร'}`]" -->
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<q-input

View file

@ -79,7 +79,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="certificateType"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อใบอนุญาต'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อใบอนุญาต'}`]"
hide-bottom-space
:label="`${'ชื่อใบอนุญาต'}`"
@update:modelValue="clickEditRow"
@ -95,7 +95,7 @@
:borderless="!edit"
v-model="issuer"
:rules="[
(val) => !!val || `${'กรุณากรอกหน่วยงานผู้ออกใบอนุญาต'}`,
(val:string) => !!val || `${'กรุณากรอกหน่วยงานผู้ออกใบอนุญาต'}`,
]"
hide-bottom-space
:label="`${'หน่วยงานผู้ออกใบอนุญาต'}`"
@ -111,7 +111,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="certificateNo"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่ใบอนุญาต'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่ใบอนุญาต'}`]"
hide-bottom-space
:label="`${'เลขที่ใบอนุญาต'}`"
@update:modelValue="clickEditRow"

View file

@ -141,7 +141,7 @@
"
:borderless="!edit"
v-model="firstName"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อ'}`]"
hide-bottom-space
:label="`${'ชื่อ'}`"
@update:modelValue="clickEditRow"
@ -156,7 +156,7 @@
:readonly="!edit || status == 'firstName' || status == 'prefix'"
:borderless="!edit"
v-model="lastName"
:rules="[(val) => !!val || `${'กรุณากรอกนามสกุล'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกนามสกุล'}`]"
hide-bottom-space
:label="`${'นามสกุล'}`"
@update:modelValue="clickEditRow"

View file

@ -117,7 +117,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="detail"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
hide-bottom-space
:label="`${'รายละเอียด'}`"
@update:modelValue="clickEditRow"

View file

@ -578,7 +578,7 @@
"
:label="`${'วันที่เสียชีวิต'}`"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่เสียชีวิต'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่เสียชีวิต'}`,
]"
>
<template v-slot:prepend>
@ -668,7 +668,7 @@
dense
lazy-rules
v-model="reason"
:rules="[(val) => !!val || `${'กรุณาเลือกประเภทการพ้นราชการ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกประเภทการพ้นราชการ'}`]"
hide-bottom-space
:label="`${'ประเภทการพ้นราชการ'}`"
emit-value
@ -697,7 +697,7 @@
outlined
dense
:model-value="date2Thai(leaveDate)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่พ้นราชการ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่พ้นราชการ'}`]"
hide-bottom-space
:label="`${'วันที่พ้นราชการ'}`"
>
@ -722,7 +722,7 @@
autogrow
v-model="leaveDetail"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณากรอกสาเหตุ/เหตุผลของการพ้นจากราชการ'}`,
]"
hide-bottom-space
@ -737,7 +737,7 @@
lazy-rules
autogrow
v-model="leaveNumberOrder"
:rules="[(val) => !!val || `${'กรุณากรอกคำสั่ง/เอกสารอ้างอิง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกคำสั่ง/เอกสารอ้างอิง'}`]"
hide-bottom-space
:label="`${'คำสั่ง/เอกสารอ้างอิง'}`"
/>
@ -761,7 +761,7 @@
outlined
dense
:model-value="date2Thai(leaveDateOrder)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่ออกคำสั่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่ออกคำสั่ง'}`]"
hide-bottom-space
:label="`${'วันที่ออกคำสั่ง'}`"
>

View file

@ -72,7 +72,7 @@
label="วัน/เดือน/ปี"
mask="##/##/####"
dense
:rules="[(val) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี'}`]"
:error="dayChecked"
error-message="กรุณากรอก วัน/เดือน/ปี"
/>
@ -100,7 +100,7 @@
dense
:borderless="!edit"
:model-value="date2Thai(date)"
:rules="[(val) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี'}`]"
hide-bottom-space
:label="`${'วัน/เดือน/ปี'}`"
>
@ -130,7 +130,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="reference"
:rules="[(val) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
hide-bottom-space
:label="`${'เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRow"
@ -146,7 +146,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="detail"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
hide-bottom-space
:label="`${'รายละเอียด'}`"
@update:modelValue="clickEditRow"

View file

@ -69,7 +69,7 @@
autogrow
:borderless="!edit"
v-model="field"
:rules="[(val) => !!val || `${'กรุณากรอกด้าน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกด้าน'}`]"
hide-bottom-space
:label="`${'ด้าน'}`"
@update:modelValue="clickEditRow"
@ -85,7 +85,7 @@
autogrow
:borderless="!edit"
v-model="detail"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
hide-bottom-space
:label="`${'รายละเอียด'}`"
@update:modelValue="clickEditRow"
@ -116,7 +116,7 @@
autogrow
:borderless="!edit"
v-model="reference"
:rules="[(val) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
hide-bottom-space
:label="`${'เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRow"

View file

@ -73,7 +73,7 @@
dense
:error="dayCheckedStart"
error-message="กรุณากรอกวัน/เดือน/ปี เริ่มต้น"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่เริ่มต้น'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่เริ่มต้น'}`]"
/>
<datepicker
@ -99,7 +99,7 @@
dense
:borderless="!edit"
:model-value="date2Thai(dateStart)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่เริ่มต้น'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่เริ่มต้น'}`]"
hide-bottom-space
:label="`${'วันที่เริ่มต้น'}`"
>
@ -129,7 +129,7 @@
dense
:error="dayCheckedEnd"
error-message="กรุณากรอกวัน/เดือน/ปี สิ้นสุด"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่สิ้นสุด'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่สิ้นสุด'}`]"
/>
<datepicker
v-else
@ -155,7 +155,7 @@
dense
:borderless="!edit"
:model-value="date2Thai(dateEnd)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่สิ้นสุด'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่สิ้นสุด'}`]"
hide-bottom-space
:label="`${'วันที่สิ้นสุด'}`"
>
@ -185,7 +185,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="reference"
:rules="[(val) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเอกสารอ้างอิง'}`]"
hide-bottom-space
:label="`${'เอกสารอ้างอิง'}`"
@update:modelValue="clickEditRow"
@ -201,7 +201,7 @@
:readonly="!edit"
:borderless="!edit"
v-model="detail"
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
hide-bottom-space
:label="`${'รายละเอียด'}`"
@update:modelValue="clickEditRow"

View file

@ -942,7 +942,7 @@ onMounted(async () => {
class="full-width datepicker"
:model-value="dateDeath != null ? date2Thai(dateDeath) : null"
:label="`${'วันที่เสียชีวิต'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่เสียชีวิต'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่เสียชีวิต'}`]"
>
<template v-slot:prepend>
<q-icon

View file

@ -242,7 +242,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="educationOld"
:rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
hide-bottom-space
:label="`${'วุฒิการศึกษา'}`"
type="text"
@ -265,7 +265,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง/สังกัด'}`"
type="textarea"
@ -283,7 +283,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
/>
@ -299,7 +299,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับตำแหน่ง'}`"
/>
@ -315,7 +315,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
/>
@ -363,7 +363,7 @@ onMounted(() => {
:borderless="!edit"
:readonly="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
hide-bottom-space
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
>

View file

@ -1,25 +1,21 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { ref, watch, type PropType } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCommandMainStore } from "@/modules/18_command/store/Main";
import type { QTableProps } from "quasar";
import type { UserData } from "@/modules/05_placement/interface/response/AppointMent";
import type { ListCommand } from "@/modules/18_command/interface/index/Main";
import type { PersonData } from "@/modules/05_placement/interface/index/Main";
import DialogHeader from "@/components/DialogHeader.vue";
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
const $q = useQuasar();
const storeCommand = useCommandMainStore();
const mixin = useCounterMixin();
const {
showLoader,
success,
messageError,
dialogConfirm,
hideLoader,
date2Thai,
} = mixin;
const { dialogConfirm, date2Thai } = mixin;
const props = defineProps({
Modal: Boolean,
@ -27,7 +23,7 @@ const props = defineProps({
fetchData: Function,
nextPage: Function,
optionsType: Array,
rows2: Array,
rows2: Array as PropType<PersonData[]>,
filterKeyword2: String,
type: String,
});
@ -37,15 +33,22 @@ const emit = defineEmits([
"update:selected",
]);
const selected = ref<[]>([]); //
const rows = ref<PersonData[]>([]); //
const selected = ref<PersonData[]>([]); //
const visibleColumns2 = ref<string[]>([
"no",
"citizenId",
"fullname",
"organizationName",
"typeCommand",
"dateOfBirth",
]);
const commandType = ref<string>(""); //
const commandMainOp = ref<ListCommand[]>([]); //
const commandOp = ref<ListCommand[]>([]); //
const modalCommand = ref<boolean>(false); //
/**
* ปเดทคคนหา
* @param value ตำคนหา
@ -89,6 +92,18 @@ const columns2 = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "typeCommand",
align: "left",
label: "ประเภทคำสั่ง",
sortable: true,
field: "typeCommand",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val: string) => {
return val === "SLIP" ? "เลื่อน" : val === "MOVE" ? "ย้าย" : "-";
},
},
{
name: "dateOfBirth",
align: "left",
@ -100,7 +115,7 @@ const columns2 = ref<QTableProps["columns"]>([
},
]);
function updateInput(value: any) {
function updateInput(value: string) {
emit("update:filterKeyword2", value);
}
@ -116,29 +131,40 @@ function Reset() {
*/
function clickAddlist() {
dialogConfirm($q, async () => {
let pId: string[] = [];
let Type = props.type as string;
selected.value.forEach((e: UserData) => {
pId.push(e.id);
});
let data = {
id: pId,
};
showLoader();
await http
.post(config.API.appointEmployeeOrder(Type), data)
.then(async () => {
await props.fetchData?.();
await props.clickClose?.();
await success($q, "บันทึกสำเร็จ");
selected.value = [];
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
modalCommand.value = true;
await props.clickClose?.();
});
}
/** ฟังก์ชันเลือกประเภทคำสั่ง */
function filterSelectOrder() {
const data = props.rows2 ? props.rows2 : [];
selected.value = [];
rows.value = data.filter((v: PersonData) => {
switch (commandType.value) {
case "C-PM-22":
return v.typeCommand === "SLIP";
case "C-PM-24":
return v.typeCommand === "MOVE";
default:
return [];
}
});
}
/**
* ลเตอร คำส
* @param val าจาก Input
* @param update Funtion quasar
*/
function filterSelector(val: string, update: Function) {
update(() => {
commandType.value = val ? "" : commandType.value;
commandOp.value = commandMainOp.value.filter(
(v: ListCommand) => v.name.indexOf(val) > -1
);
});
}
@ -149,159 +175,208 @@ function clickAddlist() {
*/
watch(
() => props.Modal,
() => {
async () => {
if (props.Modal === true) {
rows.value = props.rows2 ? props.rows2 : [];
selected.value = [];
commandType.value = "";
const data = await storeCommand.getCommandTypes();
commandMainOp.value = data.filter(
(e: ListCommand) => e.code === "C-PM-22" || e.code === "C-PM-24"
);
}
}
);
</script>
<template>
<q-dialog v-model="props.Modal">
<q-card style="width: 1200px; max-width: 80vw">
<DialogHeader :tittle="'ส่งไปออกคำสั่ง'" :close="clickClose" />
<q-separator />
<q-card-section>
<div class="row justify-between">
<div class="col-5"></div>
<div class="col-5">
<q-toolbar style="padding: 0">
<q-input
borderless
outlined
dense
debounce="300"
:model-value="filterKeyword2"
@update:model-value="updateInput"
placeholder="ค้นหา"
style="width: 850px; max-width: auto"
>
<template v-slot:append>
<q-icon v-if="filterKeyword2 == ''" name="search" />
<q-icon
v-if="filterKeyword2 !== ''"
name="clear"
class="cursor-pointer"
@click="Reset"
/>
</template>
</q-input>
<q-form greedy @submit.prevent @validation-success="clickAddlist">
<DialogHeader :tittle="'ส่งไปออกคำสั่ง'" :close="clickClose" />
<q-separator />
<q-card-section>
<div class="row q-col-gutter-sm">
<div class="row col-12">
<q-select
v-model="visibleColumns2"
multiple
outlined
v-model="commandType"
dense
options-dense
:display-value="$q.lang.table.columns"
outlined
label="ประเภทคำสั่ง"
:options="commandOp"
option-label="name"
option-value="code"
emit-value
map-options
:options="columns2"
option-value="name"
options-cover
style="min-width: 150px"
class="gt-xs q-ml-sm"
/>
</q-toolbar>
</div>
</div>
<d-table
:columns="columns2"
:rows="rows2"
:filter="filterKeyword2"
row-key="profileId"
flat
:visible-columns="visibleColumns2"
selection="multiple"
v-model:selected="selected"
>
<template v-slot:header-selection="scope">
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td auto-width>
<q-checkbox
keep-color
color="primary"
use-input
style="width: 350px; max-width: auto"
@update:model-value="filterSelectOrder"
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn
) "
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template>
</q-select>
<q-space />
<div class="row q-col-gutter-sm">
<q-input
borderless
outlined
dense
v-model="props.selected"
debounce="300"
:model-value="filterKeyword2"
@update:model-value="updateInput"
placeholder="ค้นหา"
>
<template v-slot:append>
<q-icon v-if="filterKeyword2 == ''" name="search" />
<q-icon
v-if="filterKeyword2 !== ''"
name="clear"
class="cursor-pointer"
@click="Reset"
/>
</template>
</q-input>
<q-select
v-model="visibleColumns2"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns2"
option-value="name"
options-cover
style="min-width: 150px"
/>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'fullname'">
{{
props.row.firstName
? `${props.row.prefix ?? ""}${
props.row.firstName ?? ""
} ${props.row.lastName ?? ""}`
: "-"
}}
</div>
</div>
</div>
<!-- <div v-else-if="col.name == 'status'">
<div class="col-12">
<d-table
:columns="columns2"
:rows="rows"
:filter="filterKeyword2"
row-key="profileId"
flat
:visible-columns="visibleColumns2"
selection="multiple"
v-model:selected="selected"
>
<template v-slot:header-selection="scope">
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-td auto-width>
<q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
/>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'fullname'">
{{
props.row.firstName
? `${props.row.prefix ?? ""}${
props.row.firstName ?? ""
} ${props.row.lastName ?? ""}`
: "-"
}}
</div>
<!-- <div v-else-if="col.name == 'status'">
{{ props.row.status ? statusText(props.row.status) : "-" }}
</div> -->
<div v-else-if="col.name == 'dateOfBirth'">
{{
props.row.dateOfBirth
? date2Thai(props.row.dateOfBirth)
: "-"
}}
</div>
<div v-else-if="col.name == 'organizationName'">
<div class="col-4">
<div class="text-weight-medium">
{{ props.row.root !== null ? props.row.root : "-" }}
{{
props.row.rootShortName !== null
? `(${props.row.rootShortName})`
: ""
}}
</div>
<div class="text-weight-light">
{{
props.row.nodeName !== null ? props.row.nodeName : ""
}}
{{
props.row.nodeShortName !== null
? `(${props.row.nodeShortName}${props.row.posMasterNo})`
: ""
}}
</div>
</div>
</div>
<div v-else-if="col.name == 'createdAt'">
{{
props.row.createdAt ? date2Thai(props.row.createdAt) : "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn
label="ส่งไปออกคำสั่ง"
@click="clickAddlist"
color="public"
:disable="selected.length === 0"
><q-tooltip>งไปออกคำส</q-tooltip></q-btn
>
</q-card-actions>
<div v-else-if="col.name == 'dateOfBirth'">
{{
props.row.dateOfBirth
? date2Thai(props.row.dateOfBirth)
: "-"
}}
</div>
<div v-else-if="col.name == 'organizationName'">
<div class="col-4">
<div class="text-weight-medium">
{{ props.row.root !== null ? props.row.root : "-" }}
{{
props.row.rootShortName !== null
? `(${props.row.rootShortName})`
: ""
}}
</div>
<div class="text-weight-light">
{{
props.row.nodeName !== null
? props.row.nodeName
: ""
}}
{{
props.row.nodeShortName !== null
? `(${props.row.nodeShortName}${props.row.posMasterNo})`
: ""
}}
</div>
</div>
</div>
<div v-else-if="col.name == 'createdAt'">
{{
props.row.createdAt
? date2Thai(props.row.createdAt)
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn
label="ส่งไปออกคำสั่ง"
type="submit"
color="public"
:disable="selected.length === 0 || commandType === ''"
><q-tooltip>งไปออกคำส</q-tooltip></q-btn
>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
<!-- dialog สรางคำส -->
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="commandType"
:persons-id="selected.map((r) => r.id)"
/>
</template>

View file

@ -226,7 +226,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="educationOld"
:rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
hide-bottom-space
:label="`${'วุฒิการศึกษา'}`"
type="text"
@ -249,7 +249,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง/สังกัด'}`"
type="textarea"
@ -267,7 +267,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
hide-bottom-space
:label="`${'ตำแหน่งประเภท'}`"
/>
@ -283,7 +283,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับตำแหน่ง'}`"
/>
@ -299,7 +299,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
/>
@ -347,7 +347,7 @@ onMounted(() => {
:borderless="!edit"
:readonly="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
hide-bottom-space
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
>

View file

@ -1,31 +1,27 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { ref, watch, type PropType } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useTransferDataStore } from "@/modules/05_placement/store";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCommandMainStore } from "@/modules/18_command/store/Main";
/**
* importType
*/
/** importType*/
import type { QTableProps } from "quasar";
import type { UserDataNew } from "@/modules/05_placement/interface/response/AppointMent";
import type { PersonData } from "@/modules/05_placement/interface/index/Main";
import type { ListCommand } from "@/modules/18_command/interface/index/Main";
/**
* importcomponents
*/
/** importcomponents*/
import DialogHeader from "@/components/DialogHeader.vue";
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
const $q = useQuasar();
const storeFn = useTransferDataStore();
const storeCommand = useCommandMainStore();
const { statusText } = storeFn;
const {
showLoader,
success,
messageError,
dialogConfirm,
hideLoader,
date2Thai,
} = useCounterMixin();
@ -38,7 +34,7 @@ const props = defineProps({
fetchData: Function,
nextPage: Function,
optionsType: Array,
rows2: Array,
rows2: Array as PropType<PersonData[]>,
filterKeyword2: String,
type: String,
});
@ -51,6 +47,8 @@ const emit = defineEmits([
/**
* table
*/
const rows = ref<PersonData[]>([]); //
const selected = ref<PersonData[]>([]); //
const visibleColumns2 = ref<string[]>([
"no",
"citizenId",
@ -126,227 +124,286 @@ const columns2 = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
]);
const selected = ref<[]>([]);
const commandType = ref<string>(""); //
const commandMainOp = ref<ListCommand[]>([]); //
const commandOp = ref<ListCommand[]>([]); //
const modalCommand = ref<boolean>(false);
/**
* ไปหนารายละเอยดทเลอก
* @param item
* @param id รายการทองการดรายละเอยด
*/
function pageNext(item: any) {
props.nextPage?.(item?.id);
function pageNext(id: string) {
props.nextPage?.(id);
}
/**
* ปเดท filter
*/
function updateInput(value: any) {
/** อัปเดท filter*/
function updateInput(value: string) {
emit("update:filterKeyword2", value);
}
/**
* เซตคาในชองคนหา
*/
/** รีเซ็ตค่าในช่องค้นหา*/
function Reset() {
emit("update:filterKeyword2", "");
}
/**
* นยนสงไปออกคำส
*/
/** ยืนยันส่งไปออกคำสั่ง*/
function sendToCommand() {
dialogConfirm($q, async () => {
let pId: string[] = [];
let Type = props.type as string;
selected.value.forEach((e: UserDataNew) => {
pId.push(e.id);
});
let data = {
id: pId,
};
showLoader();
await http
.put(config.API.apppointmentReport(Type), data)
.then(async () => {
await props.fetchData?.();
await props.clickClose?.();
await success($q, "บันทึกสำเร็จ");
selected.value = [];
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
modalCommand.value = true;
await props.clickClose?.();
});
}
/** ฟังก์ชันเลือกประเภทคำสั่ง */
function filterSelectOrder() {
const data = props.rows2 ? props.rows2 : [];
selected.value = [];
rows.value = data.filter((v: PersonData) => {
switch (commandType.value) {
case "C-PM-05":
return v.typeCommand === "APPOINT";
case "C-PM-39":
return v.typeCommand === "SLIP";
case "C-PM-07":
return v.typeCommand === "MOVE";
default:
return [];
}
});
}
/**
* ลเตอร คำส
* @param val าจาก Input
* @param update Funtion quasar
*/
function filterSelector(val: string, update: Function) {
update(() => {
commandType.value = val ? "" : commandType.value;
commandOp.value = commandMainOp.value.filter(
(v: ListCommand) => v.name.indexOf(val) > -1
);
});
}
/**
* เม props.modal เป true
*
* กำหนดให selected เปนคาวาง
*/
watch(
() => props.Modal,
() => {
async () => {
if (props.Modal === true) {
rows.value = props.rows2 ? props.rows2 : [];
selected.value = [];
commandType.value = "";
const data = await storeCommand.getCommandTypes();
commandMainOp.value = data.filter(
(e: ListCommand) =>
e.code === "C-PM-05" || e.code === "C-PM-39" || e.code === "C-PM-07"
);
}
}
);
</script>
<template>
<q-dialog v-model="props.Modal">
<q-card style="width: 1200px; max-width: 80vw">
<DialogHeader :tittle="'ส่งไปออกคำสั่ง'" :close="clickClose" />
<q-separator />
<q-card-section>
<div class="row justify-between">
<div class="col-5"></div>
<div class="col-5">
<q-toolbar style="padding: 0">
<q-input
borderless
outlined
dense
debounce="300"
:model-value="filterKeyword2"
@update:model-value="updateInput"
placeholder="ค้นหา"
style="width: 850px; max-width: auto"
>
<template v-slot:append>
<q-icon v-if="filterKeyword2 == ''" name="search" />
<q-icon
v-if="filterKeyword2 !== ''"
name="clear"
class="cursor-pointer"
@click="Reset"
/>
</template>
</q-input>
<q-form greedy @submit.prevent @validation-success="sendToCommand">
<DialogHeader :tittle="'ส่งไปออกคำสั่ง'" :close="clickClose" />
<q-separator />
<q-card-section>
<div class="row q-col-gutter-sm">
<div class="row col-12">
<q-select
v-model="visibleColumns2"
multiple
outlined
v-model="commandType"
dense
options-dense
:display-value="$q.lang.table.columns"
outlined
label="ประเภทคำสั่ง"
:options="commandOp"
option-label="name"
option-value="code"
emit-value
map-options
:options="columns2"
option-value="name"
options-cover
style="min-width: 150px"
class="gt-xs q-ml-sm"
/>
</q-toolbar>
</div>
</div>
<d-table
:columns="columns2"
:rows="rows2"
:filter="filterKeyword2"
row-key="profileId"
flat
:visible-columns="visibleColumns2"
selection="multiple"
v-model:selected="selected"
>
<template v-slot:header-selection="scope">
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td auto-width>
<q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
/>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="pageNext(props.row)"
use-input
style="width: 350px; max-width: auto"
@update:model-value="filterSelectOrder"
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn
) "
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'fullname'">
{{
props.row.firstName
? `${props.row.prefix ?? ""}${
props.row.firstName ?? ""
} ${props.row.lastName ?? ""}`
: "-"
}}
</div>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template>
</q-select>
<q-space />
<div class="row q-col-gutter-sm">
<q-input
borderless
outlined
dense
debounce="300"
:model-value="filterKeyword2"
@update:model-value="updateInput"
placeholder="ค้นหา"
>
<template v-slot:append>
<q-icon v-if="filterKeyword2 == ''" name="search" />
<q-icon
v-if="filterKeyword2 !== ''"
name="clear"
class="cursor-pointer"
@click="Reset"
/>
</template>
</q-input>
<q-select
v-model="visibleColumns2"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns2"
option-value="name"
options-cover
style="min-width: 150px"
/>
</div>
</div>
<div v-else-if="col.name == 'status'">
{{ props.row.status ? statusText(props.row.status) : "-" }}
</div>
<div v-else-if="col.name == 'dateOfBirth'">
{{
props.row.dateOfBirth
? date2Thai(props.row.dateOfBirth)
: "-"
}}
</div>
<div v-else-if="col.name == 'organizationName'">
<div class="col-4">
<div class="text-weight-medium">
{{ props.row.root !== null ? props.row.root : "-" }}
{{
props.row.rootShortName !== null
? `(${props.row.rootShortName})`
: ""
}}
</div>
<div class="text-weight-light">
{{
props.row.nodeName !== null ? props.row.nodeName : ""
}}
{{
props.row.nodeShortName !== null
? `(${props.row.nodeShortName}${props.row.posMasterNo})`
: ""
}}
</div>
</div>
</div>
<div v-else-if="col.name == 'createdAt'">
{{
props.row.createdAt ? date2Thai(props.row.createdAt) : "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn
label="ส่งไปออกคำสั่ง"
@click="sendToCommand"
color="public"
:disable="selected.length === 0"
>
<q-tooltip>งไปออกคำส</q-tooltip>
</q-btn>
</q-card-actions>
<div class="col-12">
<d-table
:columns="columns2"
:rows="rows"
:filter="filterKeyword2"
row-key="profileId"
flat
:visible-columns="visibleColumns2"
selection="multiple"
v-model:selected="selected"
>
<template v-slot:header-selection="scope">
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td auto-width>
<q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
/>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="pageNext(props.row.id)"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'fullname'">
{{
props.row.firstName
? `${props.row.prefix ?? ""}${
props.row.firstName ?? ""
} ${props.row.lastName ?? ""}`
: "-"
}}
</div>
<div v-else-if="col.name == 'status'">
{{
props.row.status ? statusText(props.row.status) : "-"
}}
</div>
<div v-else-if="col.name == 'dateOfBirth'">
{{
props.row.dateOfBirth
? date2Thai(props.row.dateOfBirth)
: "-"
}}
</div>
<div v-else-if="col.name == 'organizationName'">
<div class="col-4">
<div class="text-weight-medium">
{{ props.row.root !== null ? props.row.root : "-" }}
{{
props.row.rootShortName !== null
? `(${props.row.rootShortName})`
: ""
}}
</div>
<div class="text-weight-light">
{{
props.row.nodeName !== null
? props.row.nodeName
: ""
}}
{{
props.row.nodeShortName !== null
? `(${props.row.nodeShortName}${props.row.posMasterNo})`
: ""
}}
</div>
</div>
</div>
<div v-else-if="col.name == 'createdAt'">
{{
props.row.createdAt
? date2Thai(props.row.createdAt)
: "-"
}}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn
label="ส่งไปออกคำสั่ง"
type="submit"
color="public"
:disable="selected.length === 0 || commandType === ''"
>
<q-tooltip>งไปออกคำส</q-tooltip>
</q-btn>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
<!-- dialog สรางคำส -->
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="commandType"
:persons-id="selected.map((r) => r.id)"
/>
</template>

View file

@ -4,8 +4,6 @@ import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useTransferDataStore } from "@/modules/05_placement/store";
import http from "@/plugins/http";
import config from "@/app.config";
/**
* importType
@ -17,22 +15,15 @@ import type { officerType } from "@/modules/05_placement/interface/response/offi
* importComponents
*/
import DialogHeader from "@/components/DialogHeader.vue";
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
/**
* use
*/
const $q = useQuasar();
const { statusText } = useTransferDataStore();
const {
showLoader,
success,
messageError,
dialogConfirm,
hideLoader,
findOrgNameOld,
findPosMasterNoOld,
date2Thai,
} = useCounterMixin();
const { dialogConfirm, findOrgNameOld, findPosMasterNoOld, date2Thai } =
useCounterMixin();
/**
* props
@ -186,32 +177,15 @@ const visibleColumns2 = ref<string[]>([
"status",
]);
const selected = ref<officerType[]>([]); //
const modalCommand = ref<boolean>(false);
/**
* นยนการสงไปออกคำส
*/
/** ยืนยันการส่งไปออกคำสั่ง*/
function saveOrder() {
dialogConfirm(
$q,
() => {
const id = selected.value.map((item) => item.id);
const body = {
id,
};
showLoader();
http
.post(config.API.officerMainReport(), body)
.then(async () => {
await props.getData?.();
await success($q, "ส่งไปออกคำสั่งช่วยราชการสำเร็จ");
props.closeModal?.();
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
props.closeModal?.();
modalCommand.value = true;
},
"ยืนยันส่งไปออกคำสั่ง",
"ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?"
@ -222,20 +196,17 @@ function saveOrder() {
* ปเดทคคนหา
* @param value ตำคนหา
*/
function updateInput(value: any) {
function updateInput(value: string) {
emit("update:filterKeyword2", value);
}
/**
* เซตคาในชองคนหา
*/
/** รีเซ็ตค่าในช่องค้นหา*/
function Reset() {
emit("update:filterKeyword2", "");
}
/**
* เม props.modal เป true
*
* กำหนดให selected เปนคาวาง
*/
watch(
@ -358,4 +329,10 @@ watch(
</q-card-actions>
</q-card>
</q-dialog>
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="'C-PM-15'"
:persons-id="selected.map((r) => r.id)"
/>
</template>

View file

@ -218,7 +218,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง'}`"
type="textarea"
@ -236,7 +236,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="organization"
:rules="[(val) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]"
hide-bottom-space
:label="`${'หน่วยงานที่ให้ช่วยราชการ'}`"
/>
@ -264,7 +264,7 @@ onMounted(() => {
dense
:readonly="!edit"
:borderless="!edit"
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
:model-value="
dateStart !== null ? date2Thai(dateStart) : null
"
@ -311,7 +311,7 @@ onMounted(() => {
dense
:borderless="!edit"
:model-value="dateEnd !== null ? date2Thai(dateEnd) : null"
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
hide-bottom-space
:label="`${'ถึงวันที่'}`"
>

View file

@ -1,26 +1,24 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { ref, watch, type PropType } from "vue";
import { useQuasar } from "quasar";
import type { QTableProps } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
/**
* importComponents
*/
import DialogHeader from "@/components/DialogHeader.vue";
/**
* importStore
*/
import { useTransferDataStore } from "@/modules/05_placement/store";
import { useCounterMixin } from "@/stores/mixin";
import { useCommandMainStore } from "@/modules/18_command/store/Main";
import type { QTableProps } from "quasar";
import type { ListCommand } from "@/modules/18_command/interface/index/Main";
import type { listMain } from "@/modules/05_placement/interface/response/OhterMain";
/** importComponents*/
import DialogHeader from "@/components/DialogHeader.vue";
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
const $q = useQuasar();
const storeCommand = useCommandMainStore();
const storeFn = useTransferDataStore();
const { statusText } = storeFn;
const { showLoader, success, messageError, dialogConfirm, date2Thai } =
useCounterMixin();
const { dialogConfirm, date2Thai } = useCounterMixin();
/**
* props
@ -31,7 +29,7 @@ const props = defineProps({
resetFilter: Function,
fecthlistOthet: Function,
optionsType: Array,
rows2: Array,
rows2: Array as PropType<listMain[]>,
filterKeyword2: String,
type: String,
});
@ -41,12 +39,9 @@ const emit = defineEmits([
"update:selected",
]);
const selected = ref<any[]>([]); //
const OptionsTypeFn = ref<any[]>([]); //
/**
* Table
*/
//Table
const rows = ref<listMain[]>([]); //
const selected = ref<listMain[]>([]); //
const visibleColumns2 = ref<string[]>([
"no",
"fullname",
@ -128,18 +123,14 @@ const columns2 = ref<QTableProps["columns"]>([
},
]);
/**
* update filter
*/
function updateInput(value: any) {
emit("update:filterKeyword2", value);
}
const commandType = ref<string>(""); //
const commandMainOp = ref<ListCommand[]>([]); //
const commandOp = ref<ListCommand[]>([]); //
const modalCommand = ref<boolean>(false); //
/**
* update ประเภทคำส
*/
function updateInputType(value: any) {
emit("update:type", value);
/** update filter*/
function updateInput(value: string) {
emit("update:filterKeyword2", value);
}
/**
@ -154,62 +145,40 @@ function Reset() {
*/
function clickAddlist() {
dialogConfirm($q, async () => {
let pId: string[] = [];
let Type = props.type as string;
selected.value.forEach((e: any) => {
pId.push(e.id);
});
let data = {
id: pId,
};
showLoader();
await http
.put(config.API.otherReport(Type), data)
.then(() => {
success($q, "บันทึกสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
props.fecthlistOthet?.();
selected.value = [];
props.clickClose?.();
});
modalCommand.value = true;
props.clickClose?.();
});
}
/**
* filter OptionsType
* @param val คำคนหา
* @param update Function
* ลเตอร คำส
* @param val าจาก Input
* @param update Funtion quasar
*/
function filterFnOptionsType(val: string, update: Function) {
if (val == "") {
update(() => {
OptionsTypeFn.value = props.optionsType || [];
});
} else {
update(() => {
if (props.optionsType) {
OptionsTypeFn.value = props.optionsType.filter(
(e: any) => e.name.search(val) !== -1
);
}
});
}
function filterSelector(val: string, update: Function) {
update(() => {
commandType.value = val ? "" : commandType.value;
commandOp.value = commandMainOp.value.filter(
(v: ListCommand) => v.name.indexOf(val) > -1
);
});
}
/**
* เม props.modal เป true
*
* เม props.modal เป tru
* กำหนดให selected เปนคาวาง
*/
watch(
() => props.Modal,
() => {
async () => {
if (props.Modal === true) {
rows.value = props.rows2 ? props.rows2 : [];
selected.value = [];
commandType.value = "";
const data = await storeCommand.getCommandTypes();
commandMainOp.value = data.filter(
(e: ListCommand) => e.code === "C-PM-08" || e.code === "C-PM-09"
);
}
}
);
@ -218,27 +187,32 @@ watch(
<template>
<q-dialog v-model="props.Modal">
<q-card style="width: 1200px; max-width: 80vw">
<DialogHeader :tittle="'ส่งไปออกคำสั่งอื่นๆ'" :close="props.clickClose" />
<q-separator />
<q-card-section>
<div class="row justify-between">
<div class="col-5">
<q-toolbar style="padding: 0">
<q-form greedy @submit.prevent @validation-success="clickAddlist">
<DialogHeader
:tittle="'ส่งไปออกคำสั่งอื่นๆ'"
:close="props.clickClose"
/>
<q-separator />
<q-card-section>
<div class="row q-col-gutter-sm">
<div class="row col-12">
<q-select
outlined
v-model="commandType"
dense
:model-value="type"
@update:model-value="updateInputType"
:options="OptionsTypeFn"
outlined
label="ประเภทคำสั่ง"
style="width: 400px; max-width: auto"
:options="commandOp"
option-label="name"
option-value="code"
emit-value
map-options
option-label="name"
option-value="id"
use-input
@filter="filterFnOptionsType"
><template v-slot:no-option>
style="width: 350px; max-width: auto"
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn
) "
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
@ -246,104 +220,111 @@ watch(
</q-item>
</template>
</q-select>
</q-toolbar>
</div>
<div class="col-5">
<q-toolbar style="padding: 0">
<q-input
borderless
outlined
dense
debounce="300"
:model-value="filterKeyword2"
@update:model-value="updateInput"
placeholder="ค้นหา"
style="width: 850px; max-width: auto"
<q-space />
<div class="row q-col-gutter-sm">
<q-input
borderless
outlined
dense
debounce="300"
:model-value="filterKeyword2"
@update:model-value="updateInput"
placeholder="ค้นหา"
>
<template v-slot:append>
<q-icon v-if="filterKeyword2 == ''" name="search" />
<q-icon
v-if="filterKeyword2 !== ''"
name="clear"
class="cursor-pointer"
@click="Reset"
/>
</template>
</q-input>
<q-select
v-model="visibleColumns2"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns2"
option-value="name"
options-cover
style="min-width: 150px"
/>
</div>
</div>
<div class="col-12">
<d-table
:columns="columns2"
:rows="props.rows2"
:filter="filterKeyword2"
row-key="profileId"
flat
:visible-columns="visibleColumns2"
selection="multiple"
v-model:selected="selected"
>
<template v-slot:append>
<q-icon v-if="filterKeyword2 == ''" name="search" />
<q-icon
v-if="filterKeyword2 !== ''"
name="clear"
class="cursor-pointer"
@click="Reset"
<template v-slot:header-selection="scope">
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
</q-input>
<q-select
v-model="visibleColumns2"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns2"
option-value="name"
options-cover
style="min-width: 150px"
class="gt-xs q-ml-sm"
/>
</q-toolbar>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
/>
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>
<div
v-else
:class="
col.name === 'affiliation' ? 'table_ellipsis' : ''
"
>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</div>
</div>
</div>
<d-table
:columns="columns2"
:rows="props.rows2"
:filter="filterKeyword2"
row-key="profileId"
flat
:visible-columns="visibleColumns2"
selection="multiple"
v-model:selected="selected"
>
<template v-slot:header-selection="scope">
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
/>
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>
<div
v-else
:class="col.name === 'affiliation' ? 'table_ellipsis' : ''"
>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn
label="ส่งไปออกคำสั่ง"
@click="clickAddlist"
:disable="selected.length === 0"
color="public"
>
<q-tooltip>งไปออกคำส</q-tooltip>
</q-btn>
</q-card-actions>
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn
label="ส่งไปออกคำสั่ง"
type="submit"
:disable="selected.length === 0 || commandType === ''"
color="public"
>
<q-tooltip>งไปออกคำส</q-tooltip>
</q-btn>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="commandType"
:persons-id="selected.map((r) => r.id)"
/>
</template>

View file

@ -9,9 +9,7 @@ import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
/**
* impotyType
*/
/** impotyType*/
import type { resApiData } from "@/modules/05_placement/interface/response/OhterMain";
import type { QForm } from "quasar";
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
@ -237,7 +235,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="educationOld"
:rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
hide-bottom-space
:label="`${'วุฒิการศึกษา'}`"
type="text"
@ -258,7 +256,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง/สังกัด'}`"
type="textarea"
@ -275,7 +273,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
/>
@ -291,7 +289,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับตำแหน่ง'}`"
/>
@ -307,7 +305,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
/>
@ -355,7 +353,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
hide-bottom-space
:label="`${'ตั้งแต่วัน'}`"
>

View file

@ -571,7 +571,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="certificateType"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อใบอนุญาต'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อใบอนุญาต'}`]"
hide-bottom-space
:label="`${'ชื่อใบอนุญาต'}`"
@update:modelValue="clickEditRow"
@ -587,7 +587,7 @@ onMounted(() => {
:borderless="!edit"
v-model="issuer"
:rules="[
(val) => !!val || `${'กรุณากรอกหน่วยงานผู้ออกใบอนุญาต'}`,
(val:string) => !!val || `${'กรุณากรอกหน่วยงานผู้ออกใบอนุญาต'}`,
]"
hide-bottom-space
:label="`${'หน่วยงานผู้ออกใบอนุญาต'}`"
@ -603,7 +603,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="certificateNo"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่ใบอนุญาต'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่ใบอนุญาต'}`]"
hide-bottom-space
:label="`${'เลขที่ใบอนุญาต'}`"
@update:modelValue="clickEditRow"
@ -632,7 +632,7 @@ onMounted(() => {
:borderless="!edit"
:model-value="date2Thai(issueDate)"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่ออกใบอนุญาต'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่ออกใบอนุญาต'}`,
]"
hide-bottom-space
:label="`${'วันที่ออกใบอนุญาต'}`"
@ -676,7 +676,7 @@ onMounted(() => {
dense
:borderless="!edit"
:model-value="date2Thai(expireDate)"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่หมดอายุ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่หมดอายุ'}`]"
hide-bottom-space
:label="`${'วันที่หมดอายุ'}`"
>

View file

@ -790,7 +790,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="institute"
:rules="[(val) => !!val || `${'กรุณากรอกสถานศึกษา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกสถานศึกษา'}`]"
hide-bottom-space
:label="`${'สถานศึกษา'}`"
@update:modelValue="clickEditRow"
@ -844,7 +844,7 @@ onMounted(async () => {
:borderless="!edit"
:model-value="startDate + 543"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณาเลือกปีที่เริ่มต้นศึกษา'}`,
]"
hide-bottom-space
@ -888,7 +888,7 @@ onMounted(async () => {
:borderless="!edit"
:model-value="date2Thai(startDate2)"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือกวัน เดือน ปี ที่เริ่มต้นศึกษา'}`,
]"
@ -937,7 +937,7 @@ onMounted(async () => {
:borderless="!edit"
:model-value="endDate + 543"
:rules="[
(val) => !!val || `${'กรุณาเลือกปีที่จบการศึกษา'}`,
(val:string) => !!val || `${'กรุณาเลือกปีที่จบการศึกษา'}`,
]"
hide-bottom-space
:label="`${'ปีที่จบการศึกษา'}`"
@ -980,7 +980,7 @@ onMounted(async () => {
:borderless="!edit"
:model-value="date2Thai(endDate2)"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือกวัน เดือน ปี ที่จบการศึกษา'}`,
]"
@ -1029,7 +1029,7 @@ onMounted(async () => {
:borderless="!edit"
:model-value="date2Thai(finishDate)"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`,
]"
hide-bottom-space
:label="`${'วันที่สำเร็จการศึกษา'}`"
@ -1060,7 +1060,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="degree"
:rules="[(val) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกวุฒิการศึกษา'}`]"
hide-bottom-space
:label="`${'วุฒิการศึกษา'}`"
@update:modelValue="clickEditRow"
@ -1075,7 +1075,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="field"
:rules="[(val) => !!val || `${'กรุณากรอกสาขาวิชา/ทาง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกสาขาวิชา/ทาง'}`]"
hide-bottom-space
:label="`${'สาขาวิชา/ทาง'}`"
@update:modelValue="clickEditRow"
@ -1104,7 +1104,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="gpa"
:rules="[(val) => !!val || `${'กรุณากรอกเกรดเฉลี่ย'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเกรดเฉลี่ย'}`]"
hide-bottom-space
:label="`${'เกรดเฉลี่ย'}`"
@update:modelValue="clickEditRow"
@ -1119,7 +1119,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="country"
:rules="[(val) => !!val || `${'กรุณากรอกประเทศ'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเทศ'}`]"
hide-bottom-space
:label="`${'ประเทศ'}`"
@update:modelValue="clickEditRow"
@ -1162,7 +1162,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="durationYear"
:rules="[(val) => !!val || `${'กรุณากรอกระยะเวลาหลักสูตร'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกระยะเวลาหลักสูตร'}`]"
hide-bottom-space
:label="`${'ระยะเวลาหลักสูตร'}`"
@update:modelValue="clickEditRow"

View file

@ -3,8 +3,6 @@ import { ref, watchEffect } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
import type { QTableProps } from "quasar";
import type { ResponseRow } from "@/modules/05_placement/interface/response/Receive";
@ -12,19 +10,14 @@ import type { ResponseRow } from "@/modules/05_placement/interface/response/Rece
import { useTransferDataStore } from "@/modules/05_placement/store";
import DialogHeader from "@/components/DialogHeader.vue";
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
const transferStore = useTransferDataStore();
const { statusText } = transferStore;
const $q = useQuasar();
const selected = ref<ResponseRow[]>([]);
const mixin = useCounterMixin();
const {
showLoader,
success,
messageError,
dialogConfirm,
hideLoader,
date2Thai,
} = mixin;
const { dialogConfirm, date2Thai } = mixin;
/**
* props
@ -128,54 +121,33 @@ const visibleColumns2 = ref<string[]>([
"status",
]);
/**
* งกนยนยนการสงออกคำส
*/
const modalCommand = ref<boolean>(false); ///
/** ฟังก์ชันยืนยันการส่งออกคำสั่ง*/
function saveOrder() {
dialogConfirm(
$q,
async () => {
const id = selected.value.map((r: ResponseRow) => r.id);
const body = {
id,
};
showLoader();
await http
.post(config.API.receiveReport, body)
.then(async () => {
await props.fecthlistRecevice?.();
success($q, "ส่งไปออกคำสั่งรับโอนสำเร็จ");
props.clickClose?.();
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
hideLoader();
});
props?.clickClose?.();
modalCommand.value = true;
},
"ยืนยันส่งไปออกคำสั่ง",
"ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?"
);
}
/**
* งกนอปเดทคาในชองคนหา
*/
function updateInput(value: any) {
/** ฟังก์ชันอัปเดทค่าในช่องค้นหา*/
function updateInput(value: string) {
emit("update:filterKeyword2", value);
}
/**
* งกนรเซตคาในชองคนหา
*/
/** ฟังก์ชันรีเซ็ตค่าในช่องค้นหา*/
function onReset() {
emit("update:filterKeyword2", "");
}
/**
* เม props.modal เป true
*
* กำหนดให selected เปนคาวาง
*/
watchEffect(() => {
@ -334,4 +306,10 @@ watchEffect(() => {
</q-card-actions>
</q-card>
</q-dialog>
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="'C-PM-14'"
:persons-id="selected.map((r) => r.id)"
/>
</template>

View file

@ -488,7 +488,7 @@ onMounted(async () => {
map-options
hide-bottom-space
:rules="[
(val) => {
(val:string) => {
return val.length > 0 || 'กรุณาเลือกคำนำหน้าชื่อ';
},
]"
@ -505,7 +505,7 @@ onMounted(async () => {
lazy-rules
class="inputgreen"
borderless
:rules="[(val) => val.length > 0 || 'กรุณากรอกชื่อ']"
:rules="[(val:string) => val.length > 0 || 'กรุณากรอกชื่อ']"
hide-bottom-space
/>
</div>
@ -519,7 +519,7 @@ onMounted(async () => {
dense
lazy-rules
borderless
:rules="[(val) => val.length > 0 || 'กรุณากรอกนามสกุล']"
:rules="[(val:string) => val.length > 0 || 'กรุณากรอกนามสกุล']"
hide-bottom-space
/>
</div>
@ -556,7 +556,7 @@ onMounted(async () => {
"
label="วัน/เดือน/ปี เกิด"
:rules="[
(val) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`,
(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`,
]"
>
<template v-slot:prepend>

View file

@ -918,7 +918,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง/สังกัด'}`"
type="textarea"
@ -933,7 +933,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
/>
@ -947,7 +947,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับตำแหน่ง'}`"
/>
@ -961,7 +961,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
/>

View file

@ -2,42 +2,23 @@
import { ref, computed, watch } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useTransferDataStore } from "@/modules/05_placement/store";
/**
* impportType
*/
/** impportType*/
import type { QTableProps } from "quasar";
import type { officerType } from "@/modules/05_placement/interface/response/officer";
/**
* importComponents
*/
/** importComponents*/
import DialogHeader from "@/components/DialogHeader.vue";
/**
* importStore
*/
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
const $q = useQuasar();
const { statusText } = useTransferDataStore();
const mixin = useCounterMixin();
const {
showLoader,
success,
messageError,
dialogConfirm,
hideLoader,
findPosMasterNoOld,
date2Thai,
} = mixin;
const { dialogConfirm, findPosMasterNoOld, date2Thai } = mixin;
/**
* props
*/
/** props*/
const props = defineProps({
Modal: Boolean,
closeModal: Function,
@ -47,9 +28,7 @@ const props = defineProps({
});
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
/**
* table
*/
//table
const selected = ref<officerType[]>([]);
const columns2 = ref<QTableProps["columns"]>([
{
@ -155,41 +134,22 @@ const visibleColumns2 = ref<string[]>([
"status",
]);
/**
* chech การเลอกรายชอสงตวกล
*/
const modalCommand = ref<boolean>(false); ///
/** chech การเลือกรายชื่อส่งตัวกลับ*/
const checkSelected = computed(() => {
if (selected.value.length === 0) {
return true;
}
});
/**
* นยนการสงออกคำสงสงตวกล
*/
/** ยืนยันการส่งออกคำสั่งส่งตัวกลับ*/
function saveOrder() {
dialogConfirm(
$q,
async () => {
const id = selected.value.map((item) => item.id);
const body = {
id,
};
showLoader();
await http
.post(config.API.repatriationMainReport(), body)
.then(async () => {
await props.getData?.();
await success($q, "ส่งไปออกคำสั่งส่งตัวกลับสำเร็จ");
props.closeModal?.();
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
props.closeModal?.();
modalCommand.value = true;
},
"ยืนยันส่งไปออกคำสั่ง",
"ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?"
@ -204,9 +164,7 @@ function updateInput(value: string | number | null) {
emit("update:filterKeyword2", value);
}
/**
* เซตคาในชองคนหา
*/
/** รีเซ็ตค่าในช่องค้นหา*/
function Reset() {
emit("update:filterKeyword2", "");
}
@ -330,4 +288,10 @@ watch(
</q-card-actions>
</q-card>
</q-dialog>
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="'C-PM-16'"
:persons-id="selected.map((r) => r.id)"
/>
</template>

View file

@ -226,7 +226,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง/สังกัด'}`"
type="textarea"
@ -243,7 +243,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
/>
@ -259,7 +259,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับตำแหน่ง'}`"
/>
@ -275,7 +275,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
v-model="positionNumberOld"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
/>
@ -311,7 +311,7 @@ onMounted(() => {
:borderless="!edit"
v-model="organization"
:rules="[
(val) => !!val || `${'กรุณากรอกหน่วยงานที่ให้ช่วยราชการ'}`,
(val:string) => !!val || `${'กรุณากรอกหน่วยงานที่ให้ช่วยราชการ'}`,
]"
hide-bottom-space
:label="`${'หน่วยงานที่ให้ช่วยราชการ'}`"
@ -341,7 +341,7 @@ onMounted(() => {
:readonly="!edit"
:borderless="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
hide-bottom-space
:label="`${'ตั้งแต่วัน'}`"
>
@ -390,7 +390,7 @@ onMounted(() => {
: null
"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่ส่งตัวกลับ'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่ส่งตัวกลับ'}`,
]"
hide-bottom-space
:label="`${'วันที่ส่งตัวกลับ'}`"

View file

@ -521,7 +521,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง/สังกัด'}`"
type="textarea"
@ -539,7 +539,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ประเภทตำแหน่ง'}`"
/>
@ -553,7 +553,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
hide-bottom-space
:label="`${'ระดับตำแหน่ง'}`"
/>
@ -567,7 +567,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
hide-bottom-space
:label="`${'เลขที่'}`"
/>
@ -604,7 +604,7 @@ onMounted(async () => {
:readonly="!edit"
:borderless="!edit"
v-model="organization"
:rules="[(val) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]"
hide-bottom-space
:label="`${'โอนไปสังกัด'}`"
/>
@ -631,7 +631,7 @@ onMounted(async () => {
:borderless="!edit"
:readonly="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
hide-bottom-space
:label="`${'ตั้งแต่วัน'}`"
>

View file

@ -1189,7 +1189,7 @@ onMounted(async () => {
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-6">
<q-input
:rules="[(val) => !!val || 'กรุณากรอกชื่อ']"
:rules="[(val:string) => !!val || 'กรุณากรอกชื่อ']"
hide-bottom-space
readonly
dense
@ -1202,7 +1202,7 @@ onMounted(async () => {
</div>
<div class="col-xs-12 col-sm-6">
<q-input
:rules="[(val) => !!val || 'กรุณากรอกตำเเหน่ง']"
:rules="[(val:string) => !!val || 'กรุณากรอกตำเเหน่ง']"
hide-bottom-space
readonly
dense
@ -1220,7 +1220,7 @@ onMounted(async () => {
<div class="col-12 row q-col-gutter-md">
<div class="col-xs-12 col-sm-4">
<q-select
:rules="[(val) => !!val || 'กรุณาเลือกระยะเวลา']"
:rules="[(val:string) => !!val || 'กรุณาเลือกระยะเวลา']"
hide-bottom-space
:options="monthOp"
class="col-xs-12 col-sm-6"
@ -1260,7 +1260,7 @@ onMounted(async () => {
:readonly="
!isEdit && routeName !== 'probationWorkAdd'
"
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
hide-bottom-space
class="full-width datepicker"
:model-value="
@ -1327,7 +1327,7 @@ onMounted(async () => {
</div>
<div v-if="isEdit == true" class="col-12 row q-col-gutter-md">
<q-select
:rules="[(val) => !!val || 'กรุณาเลือกผู้ดูเเล']"
:rules="[(val:string) => !!val || 'กรุณาเลือกผู้ดูเเล']"
option-value="id"
:options="optionCaretaker"
class="col-xs-12 col-sm-6"
@ -1382,7 +1382,7 @@ onMounted(async () => {
<div v-else class="col-12 row q-col-gutter-md">
<q-select
:rules="[(val) => !!val || 'กรุณาเลือกผู้ดูเเล']"
:rules="[(val:string) => !!val || 'กรุณาเลือกผู้ดูเเล']"
option-value="id"
:options="filtermantor(OPcaretaker, [caretaker2])"
class="col-xs-12 col-sm-6"
@ -1449,7 +1449,7 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-6">
<q-input
:rules="
index < 2 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
index < 2 ? [(val:string) => !!val || 'กรุณากรอกข้อมูล'] : []
"
hide-bottom-space
:readonly="!isEdit && routeName !== 'probationWorkAdd'"
@ -1465,7 +1465,7 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-5">
<q-input
:rules="
index < 2 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
index < 2 ? [(val:string) => !!val || 'กรุณากรอกข้อมูล'] : []
"
hide-bottom-space
:readonly="!isEdit && routeName !== 'probationWorkAdd'"
@ -1526,13 +1526,13 @@ onMounted(async () => {
<div class="col-11 q-my-xs">
<q-select
:option-label="
(item) => `${item.title}-${item.description}`
(item:any) => `${item.title}-${item.description}`
"
option-value="id"
map-options
:rules="
index < 3
? [(val) => !!val || 'กรุณาเลือกความสามารถ']
? [(val:string) => !!val || 'กรุณาเลือกความสามารถ']
: []
"
hide-bottom-space
@ -1773,13 +1773,13 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-6">
<q-select
:option-label="
(item) =>
(item:any) =>
`${item.title} - ${item.level_description}`
"
option-value="id"
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
(val:string) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
]"
:options="OPcomputer"
class="bg-white"
@ -1806,14 +1806,14 @@ onMounted(async () => {
<q-select
ellipsis-2-lines
:option-label="
(item) =>
(item:any) =>
`${item.title} - ${item.level_description}`
"
option-value="id"
map-options
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
(val:string) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
]"
:options="OPenglish"
class="bg-white"
@ -1838,13 +1838,13 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-6">
<q-select
:option-label="
(item) =>
(item:any) =>
`${item.title} - ${item.level_description}`
"
option-value="id"
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
(val:string) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
]"
:options="OPinfomation"
class="bg-white"
@ -1870,13 +1870,13 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-6">
<q-select
:option-label="
(item) =>
(item:any) =>
`${item.title} - ${item.level_description}`
"
option-value="id"
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
(val:string) => !!val || 'กรุณาเลือกความรู้ความสามารถ',
]"
:options="OPresourse"
class="bg-white"
@ -1918,12 +1918,12 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกสมรรถนะ']"
:options="
filterMain(OPmain, [main2, main3, main4, main5])
"
@ -1951,12 +1951,12 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกสมรรถนะ']"
:options="
filterMain(OPmain, [main, main3, main4, main5])
"
@ -1984,12 +1984,12 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกสมรรถนะ']"
:options="
filterMain(OPmain, [main, main2, main4, main5])
"
@ -2017,12 +2017,12 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกสมรรถนะ']"
:options="
filterMain(OPmain, [main, main2, main3, main5])
"
@ -2049,13 +2049,13 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-6">
<q-select
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกสมรรถนะ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกสมรรถนะ']"
:options="
filterMain(OPmain, [main, main2, main3, main4])
"
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๑ ${item.description}`
"
option-value="id"
@ -2088,13 +2088,13 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๒ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
(val:string) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
]"
:options="filterData(OPgroup, [group2, group3])"
class="bg-white"
@ -2121,13 +2121,13 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๒ ${item.description}`
"
option-value="id"
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
(val:string) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
]"
:options="filterData(OPgroup, [group, group3])"
class="bg-white"
@ -2154,14 +2154,14 @@ onMounted(async () => {
<q-select
:options-html="true"
:option-label="
(item) =>
(item:any) =>
`${item.name} - ระดับ:๒ ${item.description}`
"
option-value="id"
map-options
hide-bottom-space
:rules="[
(val) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
(val:string) => !!val || 'กรุณาเลือกสมรรถนะประจํากลุ่มงาน',
]"
:options="filterData(OPgroup, [group, group2])"
class="bg-white"
@ -2311,7 +2311,7 @@ onMounted(async () => {
<q-input
hide-bottom-space
:rules="
index < 1 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
index < 1 ? [(val:string) => !!val || 'กรุณากรอกข้อมูล'] : []
"
type="textarea"
:readonly="
@ -2329,7 +2329,7 @@ onMounted(async () => {
<div class="col-xs-12 col-sm-5">
<q-input
:rules="
index < 1 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
index < 1 ? [(val:string) => !!val || 'กรุณากรอกข้อมูล'] : []
"
hide-bottom-space
bg-color="white"
@ -2562,7 +2562,7 @@ onMounted(async () => {
<template #trigger>
<q-input
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
:readonly="
isEdit != true && routeName !== 'probationWorkAdd'
"
@ -2665,7 +2665,7 @@ onMounted(async () => {
<template #trigger>
<q-input
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
:readonly="
isEdit != true && routeName !== 'probationWorkAdd'
"
@ -2771,7 +2771,7 @@ onMounted(async () => {
dense
:rules="
caretaker2
? [(val) => !!val || 'กรุณาเลือกวันที่']
? [(val:string) => !!val || 'กรุณาเลือกวันที่']
: []
"
outlined
@ -2810,7 +2810,7 @@ onMounted(async () => {
:readonly="isEdit != true"
dense
borderless
:rules="[(val) => !!val || 'กรุณาเลือกผู้บังคับบัญชา']"
:rules="[(val:string) => !!val || 'กรุณาเลือกผู้บังคับบัญชา']"
outlined
v-model="commander"
label="ผู้บังคับบัญชา"
@ -2836,7 +2836,7 @@ onMounted(async () => {
class="col-xs-12 col-sm-8"
:readonly="!isEdit && routeName !== 'probationWorkAdd'"
dense
:rules="[(val) => !!val || 'กรุณาเลือกผู้บังคับบัญชา']"
:rules="[(val:string) => !!val || 'กรุณาเลือกผู้บังคับบัญชา']"
borderless
outlined
v-model="commander"
@ -2876,7 +2876,7 @@ onMounted(async () => {
<template #trigger>
<q-input
hide-bottom-space
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
:readonly="
isEdit != true && routeName !== 'probationWorkAdd'
"
@ -2918,7 +2918,7 @@ onMounted(async () => {
outlined
v-model="chairman"
label="ประธานกรรมการ"
:rules="[(val) => !!val || 'กรุณาเลือก ประธานกรรมการ']"
:rules="[(val:string) => !!val || 'กรุณาเลือก ประธานกรรมการ']"
use-input
behavior="menu"
@filter="filterFnChairman"
@ -2944,7 +2944,7 @@ onMounted(async () => {
borderless
outlined
v-model="chairman"
:rules="[(val) => !!val || 'กรุณาเลือก ประธานกรรมการ']"
:rules="[(val:string) => !!val || 'กรุณาเลือก ประธานกรรมการ']"
label="ประธานกรรมการ"
use-input
behavior="menu"
@ -3014,7 +3014,7 @@ onMounted(async () => {
.q-item span {
white-space: normal;
display: -webkit-box;
-webkit-line-clamp: 2;
// -webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;

View file

@ -638,7 +638,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
</q-item-label>
@ -825,7 +825,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
</q-item-label>
@ -1064,7 +1064,7 @@ onMounted(async () => {
"
:label="`${'ลงวันที่'}`"
:readonly="!status"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon

View file

@ -388,7 +388,7 @@ onMounted(async () => {
start_date != null ? date2Thai(start_date) : null
"
:label="`${'ระหว่างวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -428,7 +428,7 @@ onMounted(async () => {
date_finish != null ? date2Thai(date_finish) : null
"
:label="`${'ถึงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -718,7 +718,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
@ -907,7 +907,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
@ -1166,7 +1166,7 @@ onMounted(async () => {
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon

View file

@ -662,7 +662,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
</q-item-label>
@ -854,7 +854,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
@ -1216,7 +1216,7 @@ onMounted(async () => {
dateAutherise != null ? date2Thai(dateAutherise) : null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -1277,7 +1277,7 @@ onMounted(async () => {
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -1338,7 +1338,7 @@ onMounted(async () => {
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon

View file

@ -507,7 +507,7 @@ watch(lengthdiscipline_level, (newLength) => {
start_date != null ? date2Thai(start_date) : null
"
:label="`${'ระหว่างวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -546,7 +546,7 @@ watch(lengthdiscipline_level, (newLength) => {
date_finish != null ? date2Thai(date_finish) : null
"
:label="`${'ถึงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -740,7 +740,7 @@ watch(lengthdiscipline_level, (newLength) => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
@ -942,7 +942,7 @@ watch(lengthdiscipline_level, (newLength) => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
@ -1233,7 +1233,7 @@ watch(lengthdiscipline_level, (newLength) => {
emit-value
hide-bottom-space
:rules="[
(val) =>
(val:string) =>
(val !== null && val !== undefined) ||
'กรุณาเลือกสรุปผลการพัฒนา',
]"
@ -1262,7 +1262,7 @@ watch(lengthdiscipline_level, (newLength) => {
emit-value
hide-bottom-space
:rules="[
(val) =>
(val:string) =>
(val !== null && val !== undefined) ||
'กรุณาเลือกสรุปผลการประเมินผลทดลองปฎิบัติหน้าที่ราชการ',
]"
@ -1322,7 +1322,7 @@ watch(lengthdiscipline_level, (newLength) => {
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -1382,7 +1382,7 @@ watch(lengthdiscipline_level, (newLength) => {
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -1442,7 +1442,7 @@ watch(lengthdiscipline_level, (newLength) => {
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon

View file

@ -356,7 +356,7 @@ onMounted(() => {
date_start != null ? date2Thai(date_start) : null
"
:label="`${'ระหว่างวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -398,7 +398,7 @@ onMounted(() => {
date_finish != null ? date2Thai(date_finish) : null
"
:label="`${'ถึงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -420,7 +420,7 @@ onMounted(() => {
<div class="col-xs-12 col-sm-6">
<q-select
:rules="[
(val) =>
(val:string) =>
!!val ||
'กรุณาเลือกการพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ',
]"
@ -452,7 +452,7 @@ onMounted(() => {
<q-select
class="col-sm-12"
:rules="[
(val) =>
(val:string) =>
!!val ||
'กรุณาเลือกผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ',
]"
@ -485,7 +485,7 @@ onMounted(() => {
dense
v-model="expand_month"
label="จำนวนเดือน"
:rules="[(val) => !!val || 'กรุณากรอกจำนวนเดือน']"
:rules="[(val:string) => !!val || 'กรุณากรอกจำนวนเดือน']"
type="number"
/>
</div>
@ -507,7 +507,7 @@ onMounted(() => {
v-model="reson"
lazy-rules
label="เหตุผล"
:rules="[(val) => (!!val && val.length > 0) || 'กรุณาระบุเหตุผล']"
:rules="[(val:string) => (!!val && val.length > 0) || 'กรุณาระบุเหตุผล']"
/>
</div>
<div class="col-xs-12 col-sm-6">
@ -522,7 +522,7 @@ onMounted(() => {
v-model="reson52"
lazy-rules
label="ความเห็นของผู้มีอํานาจสั่งบรรจุตามมาตรา 52"
:rules="[(val) => (!!val && val.length > 0) || 'กรุณาระบุเหตุผล']"
:rules="[(val:string) => (!!val && val.length > 0) || 'กรุณาระบุเหตุผล']"
/>
</div>
</div>
@ -576,7 +576,7 @@ onMounted(() => {
chairman_dated != null ? date2Thai(chairman_dated) : null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -638,7 +638,7 @@ onMounted(() => {
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -702,7 +702,7 @@ onMounted(() => {
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon

View file

@ -770,7 +770,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
:readonly="!status"
/>
@ -999,7 +999,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
:readonly="!status"
/>
@ -1236,7 +1236,7 @@ onMounted(async () => {
dateAutherise != null ? date2Thai(dateAutherise) : null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:readonly="!status"
>
<template v-slot:prepend>

View file

@ -461,7 +461,7 @@ onMounted(async () => {
start_date != null ? date2Thai(start_date) : null
"
:label="`${'ระหว่างวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -501,7 +501,7 @@ onMounted(async () => {
date_finish != null ? date2Thai(date_finish) : null
"
:label="`${'ถึงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -890,7 +890,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
@ -1128,7 +1128,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
@ -1377,7 +1377,7 @@ onMounted(async () => {
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon

View file

@ -466,7 +466,7 @@ onMounted(async () => {
start_date != null ? date2Thai(start_date) : null
"
:label="`${'ระหว่างวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -506,7 +506,7 @@ onMounted(async () => {
date_finish != null ? date2Thai(date_finish) : null
"
:label="`${'ถึงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -893,7 +893,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
@ -1131,7 +1131,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) =>
(val:string) =>
(val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
/>
@ -1377,7 +1377,7 @@ onMounted(async () => {
: null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
>
<template v-slot:prepend>
<q-icon

View file

@ -773,7 +773,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
:readonly="!status"
/>
@ -1005,7 +1005,7 @@ onMounted(async () => {
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
(val:string) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]"
:readonly="!status"
/>
@ -1249,7 +1249,7 @@ onMounted(async () => {
dateAutherise != null ? date2Thai(dateAutherise) : null
"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
:readonly="!status"
>
<template v-slot:prepend>

View file

@ -430,7 +430,7 @@ onMounted(() => {
:model-value="
evaluate_date != null ? date2Thai(evaluate_date) : null
"
:rules="[(val) => !!val || `${'วัน เดือน ปี ที่ประเมิน'}`]"
:rules="[(val:string) => !!val || `${'วัน เดือน ปี ที่ประเมิน'}`]"
>
<template v-slot:prepend>
<q-icon

View file

@ -226,7 +226,6 @@ interface DataProfile {
child3ShortName: string | null;
child4: string | null;
child4ShortName: string | null;
child1Old?: string | null;
child1ShortNameOld?: string | null;
child2Old?: string | null;
@ -235,7 +234,6 @@ interface DataProfile {
child3ShortNameOld?: string | null;
child4Old?: string | null;
child4ShortNameOld?: string | null;
createdAt: string | Date;
dateEnd: string | Date;
dateStart: string | Date;
@ -340,9 +338,9 @@ interface PersonData {
deferment: boolean;
statusName: string;
organizationName: string;
id: string;
}
export type {
DataOption,
DataOptionInsignia,
@ -368,7 +366,7 @@ export type {
ListDataText,
ListMenu,
DataEducation,
PersonData
PersonData,
};
export { AddressDataDefualt, FamilyDataDefualt };

View file

@ -23,6 +23,7 @@ interface listMain {
amountOld: number;
positionDate: Date;
leaveDate: Date;
id: string;
}
//ข้อมูลจาก api
interface listMainAPI {

View file

@ -9,19 +9,16 @@ import { useTransferDataStore } from "@/modules/05_placement/store";
import http from "@/plugins/http";
import config from "@/app.config";
/**
* importType
*/
/** importType*/
import type {
listAppointType,
resData,
} from "@/modules/05_placement/interface/response/AppointMent";
import type { OpType } from "@/modules/05_placement/interface/response/Main";
import type { QTableProps } from "quasar";
import type { PersonData } from "@/modules/05_placement/interface/index/Main";
/**
* importComponents
*/
/** importComponents*/
import Dialogbody from "@/modules/05_placement/components/AppointMent/DialogOrders.vue"; //
import DialogOrgSelect from "@/components/Dialogs/DialogOrgSelect.vue"; //
@ -52,11 +49,9 @@ const listRecevice = ref<resData[]>([]); //ข้อมูลรายการ
const optionsType = ref<OpType[]>([]);
const type = ref<string>("");
/**
* Table
*/
const rows = ref<listAppointType[]>([]); //--
const rows2 = ref<listAppointType[]>([]); //
//table
const rows = ref<PersonData[]>([]); //--
const rows2 = ref<PersonData[]>([]); //
const filterKeyword = ref<string>(""); //--
const filterKeyword2 = ref<string>(""); //
const columns = ref<QTableProps["columns"]>([
@ -159,18 +154,14 @@ const pagination = ref({
rowsPerPage: 10,
});
/**
* เซตคำคนหารายการ
*/
/** รีเซ็ตคำค้นหารายการ*/
function resetFilter() {
filterKeyword.value = "";
filterKeyword2.value = "";
filterRef.value.focus();
}
/**
* fetch รายการแตงต-เลอน-าย
*/
/** fetch รายการแต่งตั้ง-เลื่อน-ย้าย*/
async function fecthlistappointment() {
showLoader();
await http
@ -234,9 +225,7 @@ function nextPage(id: string) {
});
}
/**
* เป popup เลอกหนวยงาน
*/
/** เปิด popup เลือกหน่วยงาน*/
function openModalTree(data: any, type: string) {
personalId.value = data.id;
typeModal.value = type;
@ -247,9 +236,7 @@ function openModalTree(data: any, type: string) {
modalTree.value = true;
}
/**
* นยนการเลอกหนวยงานทแตงต
*/
/** ยืนยันการเลือกหน่วยงานที่แต่งตั้ง*/
function onSave(data: any) {
const dataAppoint = {
node: data.node,
@ -283,24 +270,18 @@ function onSave(data: any) {
});
}
/**
* เป popup งไปออกคำส
*/
/** เปิด popup ส่งไปออกคำสั่ง*/
function sendToCommand() {
modal.value = true;
filterKeyword2.value = "";
}
/**
* popup งไปออกคำส
*/
/** ปิด popup ส่งไปออกคำสั่ง*/
function clickClose() {
modal.value = false;
}
/**
* ทำงานเมอมการเรยกใช Components
*/
/** ทำงานเมื่อมีการเรียกใช้ Components*/
onMounted(() => {
fecthlistappointment();
});
@ -582,9 +563,9 @@ onMounted(() => {
v-model:type="type"
:click-close="clickClose"
:options-type="optionsType"
:rows2="rows2"
:next-page="nextPage"
:fetch-data="fecthlistappointment"
:rows2="rows2"
/>
<DialogOrgSelect

View file

@ -10,11 +10,8 @@ import http from "@/plugins/http";
import config from "@/app.config";
import type { QTableProps } from "quasar";
import type {
listAppointType,
resData,
} from "@/modules/05_placement/interface/response/AppointMent";
import type { PersonData } from "@/modules/05_placement/interface/index/Main";
import type { resData } from "@/modules/05_placement/interface/response/AppointMent";
import type { OpType } from "@/modules/05_placement/interface/response/Main";
import DialogOrgSelectEmployee from "@/components/Dialogs/DialogOrgSelectEmployee.vue"; //
@ -49,8 +46,8 @@ const optionsType = ref<OpType[]>([]);
const type = ref<string>("");
// Table
const rows = ref<listAppointType[]>([]); //
const rows2 = ref<listAppointType[]>([]); //
const rows = ref<PersonData[]>([]); //
const rows2 = ref<PersonData[]>([]); //
const filterKeyword = ref<string>(""); //
const filterKeyword2 = ref<string>(""); //
const visibleColumns = ref<string[]>([
@ -59,6 +56,7 @@ const visibleColumns = ref<string[]>([
"fullname",
"organizationName",
"dateOfBirth",
"typeCommand",
"createdAt",
"status",
]);
@ -114,6 +112,18 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "typeCommand",
align: "left",
label: "ประเภทคำสั่ง",
sortable: true,
field: "typeCommand",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val: string) => {
return val === "SLIP" ? "เลื่อน" : val === "MOVE" ? "ย้าย" : "-";
},
},
{
name: "createdAt",
align: "left",
@ -527,9 +537,9 @@ onMounted(() => {
v-model:type="type"
:click-close="clickClose"
:options-type="optionsType"
:rows2="rows2"
:next-page="nextPage"
:fetch-data="fecthlistappointment"
:rows2="rows2"
/>
<DialogOrgSelectEmployee

View file

@ -32,8 +32,6 @@ const {
} = useCounterMixin();
const modal = ref<boolean>(false);
const type = ref<string>("");
const optionsType = ref<OpType[]>([]);
/**
* Table
@ -163,29 +161,6 @@ async function fecthlistOthet() {
});
}
/**
* fetch รายการขอมลประเภทคำส
*/
function fecthTypeOption() {
showLoader();
type.value = "";
http
.get(config.API.typeOrder())
.then((res) => {
// C-PM-08 C-PM-09
optionsType.value = res.data.result.filter(
(e: OpType) =>
e.commandCode === "C-PM-08" || e.commandCode === "C-PM-09"
);
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
/**
* เซตขอมลในชอง input
*/
@ -200,9 +175,6 @@ function resetFilter() {
function popup() {
modal.value = true;
filterKeyword2.value = "";
type.value = "";
// fetch
fecthTypeOption();
}
/**
@ -380,9 +352,7 @@ onMounted(() => {
<Dialogbody
v-model:Modal="modal"
v-model:filter-keyword2="filterKeyword2"
v-model:type="type"
:click-close="clickClose"
:options-type="optionsType"
:rows2="rows2"
:fecthlistOthet="fecthlistOthet"
/>

View file

@ -9,6 +9,8 @@ import { useCounterMixin } from "@/stores/mixin";
import { useTransferDataStore } from "@/modules/05_placement/store";
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
import DialogHeader from "@/modules/06_retirement/components/DialogHeader.vue";
/** use */
@ -98,7 +100,6 @@ const columns2 = ref<QTableProps["columns"]>([
format: (val) => statusText(val),
},
]);
/** คอลัมน์ที่แสดง */
const visibleColumns2 = ref<string[]>([
"no",
@ -118,6 +119,8 @@ const props = defineProps({
filterKeyword2: String,
});
const modalCommand = ref<boolean>(false);
/**
* งกนการ Selected Data
*/
@ -131,34 +134,15 @@ const checkSelected = computed(() => {
function saveOrder() {
dialogConfirm(
$q,
() => Ordersave(),
() => {
modalCommand.value = true;
props.closeModal?.();
},
"ยืนยันส่งไปออกคำสั่ง",
"ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?"
);
}
//
async function Ordersave() {
const id = selected.value.map((r) => r.id);
const body = {
id,
};
showLoader();
await http
.post(config.API.outReport, body)
.then((res: any) => {
success($q, "ส่งไปออกคำสั่งสำเร็จ");
props.closeModal?.();
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
props.fecthlistRecevice?.();
hideLoader();
});
}
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
function updateInput(value: any) {
emit("update:filterKeyword2", value);
@ -275,4 +259,10 @@ watchEffect(() => {
</q-card-actions>
</q-card>
</q-dialog>
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="'C-PM-18'"
:persons-id="selected.map((r) => r.id)"
/>
</template>

View file

@ -309,7 +309,7 @@ onMounted(async () => {
lazy-rules
mask="###,###,###,###"
reverse-fill-mask
class="inputgreen"
:class="getClass(edit)"
/>
</div>
</div>

View file

@ -1,21 +1,20 @@
<script setup lang="ts">
import { ref, computed, watchEffect } from "vue";
import { useQuasar } from "quasar";
import type { QTableProps } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import type { QTableProps } from "quasar";
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
import DialogHeader from "@/components/DialogHeader.vue";
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
/** use */
const $q = useQuasar();
const selected = ref<ResponseItems[]>([]);
const mixin = useCounterMixin();
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
const { dialogConfirm } = mixin;
/** props*/
const props = defineProps({
@ -26,16 +25,14 @@ const props = defineProps({
filterKeyword2: String,
});
/**
* งกนการ Selected Data
*/
/** ฟังก์ชั่นการ Selected Data*/
const checkSelected = computed(() => {
if (selected.value.length === 0) {
return true;
}
});
/** คอลัมน์ */
//Table
const columns2 = ref<QTableProps["columns"]>([
{
name: "no",
@ -136,8 +133,6 @@ const columns2 = ref<QTableProps["columns"]>([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
/** คอลัมน์ที่แสดง */
const visibleColumns2 = ref<string[]>([
"no",
"prefix",
@ -150,36 +145,20 @@ const visibleColumns2 = ref<string[]>([
"statustext",
]);
const modalCommand = ref<boolean>(false);
/** popup ยืนยันส่งัว */
function saveOrder() {
dialogConfirm(
$q,
() => Ordersave(),
() => {
props.closeModal?.();
modalCommand.value = true;
},
"ยืนยันส่งไปออกคำสั่ง",
"ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?"
);
}
/** ส่งไปออกคำสั่ง */
async function Ordersave() {
const id = selected.value.map((r) => r.id);
const body = {
id,
};
showLoader();
await http
.post(config.API.resignReport, body)
.then((res: any) => {
success($q, "ส่งไปออกคำสั่งลาออกสำเร็จ");
props.closeModal?.();
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
props.fecthlist?.();
hideLoader();
});
}
const emit = defineEmits(["update:filterKeyword2", "update:selected"]);
function updateInput(value: any) {
@ -305,4 +284,10 @@ watchEffect(() => {
</q-card-actions>
</q-card>
</q-dialog>
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="'C-PM-17'"
:persons-id="selected.map((r) => r.id)"
/>
</template>

View file

@ -1183,7 +1183,7 @@ onMounted(async () => {
:borderless="!edit"
v-model="location"
:rules="[
(val) => !!val || `${'กรุณากรอกสถานที่ยื่นขอลาออกจากราชการ'}`,
(val:string) => !!val || `${'กรุณากรอกสถานที่ยื่นขอลาออกจากราชการ'}`,
]"
hide-bottom-space
:label="`${'สถานที่ยื่นขอลาออกจากราชการ'}`"
@ -1214,7 +1214,7 @@ onMounted(async () => {
:borderless="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
]"
hide-bottom-space
@ -1247,7 +1247,7 @@ onMounted(async () => {
:borderless="!edit"
v-model="reason"
:rules="[
(val) => !!val || `${'กรุณากรอกเหตุผลที่ลาออกจากราชการ'}`,
(val:string) => !!val || `${'กรุณากรอกเหตุผลที่ลาออกจากราชการ'}`,
]"
hide-bottom-space
:label="`${'เหตุผลที่ลาออกจากราชการ (หมายเหตุแนวตั้ง)'}`"

View file

@ -229,7 +229,7 @@ watch(
option-label="label"
label="รอบการเสนอขอพระราชทานเครื่องราชฯ"
@update:model-value="updateDateRange"
:rules="[(val) => !!val || `${'กรุณาเลือกรอบที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกรอบที่'}`]"
hide-bottom-space
lazy-rules
/>
@ -258,7 +258,7 @@ watch(
outlined
hide-bottom-space
:model-value="yearly + 543"
:rules="[(val) => !!val || `${'กรุณาเลือกปีที่เสนอ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกปีที่เสนอ'}`]"
:label="`${'ปีที่เสนอ'}`"
>
<template v-slot:prepend>
@ -303,7 +303,7 @@ watch(
dateStart != null ? date2Thai(dateStart) : null
"
:label="`${'วันเริ่มต้น'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันเริ่มต้น'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันเริ่มต้น'}`]"
hide-bottom-space
>
<template v-slot:prepend>
@ -345,7 +345,7 @@ watch(
:model-value="dateEnd != null ? date2Thai(dateEnd) : null"
:label="`${'วันสิ้นสุด'}`"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่วันสิ้นสุด'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่วันสิ้นสุด'}`,
]"
:class="classInput(!readonly)"
:readonly="readonly"
@ -373,7 +373,7 @@ watch(
label="จำนวนวันแจ้งเตือนก่อนวันสิ้นสุด"
mask="###"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณากรอกจำนวนวันแจ้งเตือนก่อนวันสิ้นสุด'}`,
]"
lazy-rules

View file

@ -198,6 +198,7 @@ async function selectorRound(round: string | undefined) {
/** function เรียกรายการเครืองราชฯ */
async function fecthlistInsignia() {
DataStore.mainTab = tab.value;
DataStore.rows = [];
showLoader();
await http
.get(config.API.insigniaManageType(tab.value, Number(roundYear.value)))

View file

@ -363,6 +363,7 @@ async function selectorRound(round: number) {
* function เรยกรายชอการเสนอขอเครองราชฯ
*/
async function fecthlistInsignia() {
DataStore.rows = [];
showLoader();
await http
.get(

View file

@ -945,7 +945,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
dense
v-model="nameOrder"
:rules="[(val) => !!val || `${'กรุณากรอกคำสั่งเรื่อง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกคำสั่งเรื่อง'}`]"
:label="`${'คำสั่งเรื่อง'}`"
hide-bottom-space
/>
@ -983,7 +983,7 @@ const getClass = (val: boolean) => {
:class="getClass(true)"
:readonly="checkRoutePermisson"
:model-value="dateYear !== null ? dateYear + 543 : null"
:rules="[(val) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
:label="`${'พ.ศ.'}`"
dense
hide-bottom-space
@ -1023,7 +1023,7 @@ const getClass = (val: boolean) => {
dateCommand != null ? date2Thai(dateCommand) : null
"
:label="`${'วันที่คำสั่งมีผล'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่คำสั่งมีผล'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่คำสั่งมีผล'}`]"
>
<template v-slot:prepend>
<q-icon
@ -1118,7 +1118,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
v-model="positionCommand"
:rules="[
(val) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`,
(val:string) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`,
]"
:label="`${'ตำแหน่งผู้มีอำนาจลงนาม'}`"
hide-bottom-space
@ -1134,7 +1134,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="nameCommand"
:rules="[(val) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]"
:label="`${'ผู้มีอำนาจลงนาม'}`"
hide-bottom-space
/>
@ -1150,7 +1150,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
v-model="positionCommand"
:rules="[
(val) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`,
(val:string) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`,
]"
:label="`${'ตำแหน่งผู้มีอำนาจลงนาม'}`"
hide-bottom-space
@ -1204,7 +1204,7 @@ const getClass = (val: boolean) => {
dense
v-model="conclusionRegisterNo"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณากรอกมติ กก. ครั้งที่ (เรื่อง รับสมัครสอบ ฯ)'}`,
]"
@ -1244,7 +1244,7 @@ const getClass = (val: boolean) => {
"
:label="`${'ลงวันที่ (เรื่อง รับสมัครสอบ ฯ)'}`"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณาเลือกลงวันที่ (เรื่อง รับสมัครสอบ ฯ)'}`,
]"
>
@ -1268,7 +1268,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
v-model="conclusionResultNo"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณากรอกมติ กก. ครั้งที่ (เรื่อง ผลการสอบฯ)'}`,
]"
:label="`${'มติ กก. ครั้งที่ (เรื่อง ผลการสอบ ฯ)'}`"
@ -1307,7 +1307,7 @@ const getClass = (val: boolean) => {
"
:label="`${'ลงวันที่ (เรื่อง ผลการสอบ ฯ)'}`"
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณาเลือกลงวันที่ (เรื่อง ผลการสอบฯ)'}`,
]"
>
@ -1341,7 +1341,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
dense
v-model="meeting"
:rules="[(val) => !!val || `${'กรุณากรอกการประชุม ครั้งที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกการประชุม ครั้งที่'}`]"
:label="`${'การประชุม ครั้งที่'}`"
hide-bottom-space
/>
@ -1374,7 +1374,7 @@ const getClass = (val: boolean) => {
dateMeeting != null ? date2Thai(dateMeeting) : null
"
:label="`${'ลงวันที่ '}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
>
<template v-slot:prepend>
<q-icon
@ -1403,7 +1403,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
v-model="conclusionReturnNo"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณากรอกมติ กก. ครั้งที่ (เรื่อง กลับเข้าราชการ)'}`,
]"
@ -1441,7 +1441,7 @@ const getClass = (val: boolean) => {
: null
"
:label="`${'ลงวันที่ '}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
>
<template v-slot:prepend>
<q-icon
@ -1469,7 +1469,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
dense
v-model="organizations"
:rules="[(val) => !!val || `${'กรุณากกรอกหน่วยงาน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากกรอกหน่วยงาน'}`]"
:label="`${'หน่วยงาน'}`"
hide-bottom-space
/>
@ -1481,7 +1481,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="order"
:rules="[(val) => !!val || `${'กรุณาเลือกคำสั่งที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกคำสั่งที่'}`]"
:label="`${'คำสั่งที่'}`"
hide-bottom-space
/>
@ -1512,7 +1512,7 @@ const getClass = (val: boolean) => {
class="full-width datepicker"
:model-value="orderDate != null ? date2Thai(orderDate) : null"
:label="`${'ลงวันที่ '}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
>
<template v-slot:prepend>
<q-icon
@ -1534,7 +1534,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
v-model="book"
:rules="[
(val) => !!val || `${'กรุณากกรอกหนังสือสำนักงาน ก.พ. ที่ นร'}`,
(val:string) => !!val || `${'กรุณากกรอกหนังสือสำนักงาน ก.พ. ที่ นร'}`,
]"
:label="`${'หนังสือสำนักงาน ก.พ. ที่ นร'}`"
hide-bottom-space
@ -1566,7 +1566,7 @@ const getClass = (val: boolean) => {
class="full-width datepicker"
:model-value="bookDate != null ? date2Thai(bookDate) : null"
:label="`${'ลงวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
>
<template v-slot:prepend>
<q-icon
@ -1594,7 +1594,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="organizationsOld"
:rules="[(val) => !!val || `${'กรุณากรอกหน่วยงาน (ต้นทาง)'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกหน่วยงาน (ต้นทาง)'}`]"
:label="`${'ชื่อหน่วยงาน (ต้นทาง)'}`"
hide-bottom-space
/>
@ -1606,7 +1606,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="orderOld"
:rules="[(val) => !!val || `${'กรุณาเลือกคำสั่งที่ (ต้นทาง)'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกคำสั่งที่ (ต้นทาง)'}`]"
:label="`${'คำสั่งที่ (ต้นทาง)'}`"
hide-bottom-space
/>
@ -1639,7 +1639,7 @@ const getClass = (val: boolean) => {
orderOldDate != null ? date2Thai(orderOldDate) : null
"
:label="`${'ลงวันที่ '}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
>
<template v-slot:prepend>
<q-icon
@ -1660,7 +1660,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="locationname"
:rules="[(val) => !!val || `${'กรุณากรอกให้ดำรงตำแหน่ง ณ'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกให้ดำรงตำแหน่ง ณ'}`]"
:label="`${'ให้ดำรงตำแหน่ง ณ'}`"
hide-bottom-space
/>
@ -1674,7 +1674,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
v-model="experimentOc"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณากรอกหน่วยงานที่ให้ทดลองปฏิบัติหน้าที่ราชการ'}`,
]"
@ -1715,7 +1715,7 @@ const getClass = (val: boolean) => {
"
:label="`${'ทดลองปฏิบัติหน้าที่ราชการตั้งแต่วันที่ '}`"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือกลงวันที่ทดลองปฏิบัติหน้าที่ราชการตั้งแต่วันที่ '}`,
]"
@ -1764,7 +1764,7 @@ const getClass = (val: boolean) => {
"
:label="`${'ทดลองปฏิบัติหน้าที่ราชการถึงวันที่ '}`"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือกลงวันที่ทดลองปฏิบัติหน้าที่ราชการถึงวันที่ '}`,
]"
@ -1790,7 +1790,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="chairman"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อประธาน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อประธาน'}`]"
:label="`${'ประธาน'}`"
hide-bottom-space
@click="openDialog('chairman')"
@ -1803,7 +1803,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="director"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อกรรมการ'}`]"
:label="`${'กรรมการ'}`"
hide-bottom-space
@click="openDialog('director')"
@ -1816,7 +1816,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="director2"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อกรรมการ'}`]"
:label="`${'กรรมการ'}`"
hide-bottom-space
@click="openDialog('director2')"
@ -1841,7 +1841,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
v-model="committeeOc"
:rules="[
(val) => !!val || `${'กรุณาเลือกชื่อหน่วยงาน (อนุสนธิคำสั่ง)'}`,
(val:string) => !!val || `${'กรุณาเลือกชื่อหน่วยงาน (อนุสนธิคำสั่ง)'}`,
]"
:label="`${'ชื่อหน่วยงาน (อนุสนธิคำสั่ง)'}`"
hide-bottom-space
@ -1854,7 +1854,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="committeeOrder"
:rules="[(val) => !!val || `${'กรุณากรอกอนุสนธิคำสั่งที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกอนุสนธิคำสั่งที่'}`]"
:label="`${'อนุสนธิคำสั่งที่'}`"
hide-bottom-space
/>
@ -1887,7 +1887,7 @@ const getClass = (val: boolean) => {
committeeDate != null ? date2Thai(committeeDate) : null
"
:label="`${'ลงวันที่ '}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
>
<template v-slot:prepend>
<q-icon
@ -1915,7 +1915,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="receiveOc"
:rules="[(val) => !!val || `${'กรุณากรอกหน่วยงาน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกหน่วยงาน'}`]"
:label="`${'ชื่อหน่วยงาน'}`"
hide-bottom-space
/>
@ -1934,7 +1934,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="transferOrganizationName"
:rules="[(val) => !!val || `${'กรุณากรอกส่วนราชการที่ให้โอน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกส่วนราชการที่ให้โอน'}`]"
:label="`${'ส่วนราชการที่ให้โอน'}`"
hide-bottom-space
/>
@ -1946,7 +1946,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
dense
v-model="conclusionReceive"
:rules="[(val) => !!val || `${'กรุณากรอกมติ กก. ครั้งที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกมติ กก. ครั้งที่'}`]"
:label="`${'มติ กก. ครั้งที่'}`"
hide-bottom-space
/>
@ -1981,7 +1981,7 @@ const getClass = (val: boolean) => {
: null
"
:label="`${'ลงวันที่ '}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
>
<template v-slot:prepend>
<q-icon
@ -2010,7 +2010,7 @@ const getClass = (val: boolean) => {
dense
v-model="orderNumber"
:rules="[
(val) => !!val || `${'กรุณากรอกคำสั่งให้ช่วยราชการเลขที่'}`,
(val:string) => !!val || `${'กรุณากรอกคำสั่งให้ช่วยราชการเลขที่'}`,
]"
:label="`${'คำสั่งให้ช่วยราชการเลขที่'}`"
hide-bottom-space
@ -2044,7 +2044,7 @@ const getClass = (val: boolean) => {
orderNumberDate != null ? date2Thai(orderNumberDate) : null
"
:label="`${'ลงวันที่ '}`"
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกลงวันที่ '}`]"
>
<template v-slot:prepend>
<q-icon
@ -2073,7 +2073,7 @@ const getClass = (val: boolean) => {
dense
v-model="fault"
:rules="[
(val) => !!val || `${'กรุณากรอกรายละเอียดการกระทำความผิด'}`,
(val:string) => !!val || `${'กรุณากรอกรายละเอียดการกระทำความผิด'}`,
]"
:label="`${'รายละเอียดการกระทำความผิด'}`"
hide-bottom-space
@ -2086,7 +2086,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="guiltyBasis"
:rules="[(val) => !!val || `${'กรุณากรอกฐานความผิด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกฐานความผิด'}`]"
:label="`${'ฐานความผิด'}`"
hide-bottom-space
/>
@ -2099,7 +2099,7 @@ const getClass = (val: boolean) => {
v-model="conclusionFireNo"
:readonly="checkRoutePermisson"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณากรอกครั้งที่ (เรื่องการดำเนินการทางวินัย)'}`,
]"
@ -2138,7 +2138,7 @@ const getClass = (val: boolean) => {
"
:label="`${'ลงวันที่ (เรื่องการดำเนินการทางวินัย) '}`"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือกลงวันที่ (เรื่องการดำเนินการทางวินัย)'}`,
]"
@ -2163,7 +2163,7 @@ const getClass = (val: boolean) => {
dense
v-model="conclusionFireResolution"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณากรอก มติที่ประชุม(เรื่องการดำเนินการทางวินัย)'}`,
]"
@ -2223,7 +2223,7 @@ const getClass = (val: boolean) => {
v-model="conclusionFireNo"
:readonly="checkRoutePermisson"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณากรอกครั้งที่ (เรื่องการดำเนินการทางวินัย)'}`,
]"
@ -2262,7 +2262,7 @@ const getClass = (val: boolean) => {
"
:label="`${'ลงวันที่ (เรื่องการดำเนินการทางวินัย) '}`"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณาเลือกลงวันที่ (เรื่องการดำเนินการทางวินัย)'}`,
]"
@ -2287,7 +2287,7 @@ const getClass = (val: boolean) => {
dense
v-model="conclusionFireResolution"
:rules="[
(val) =>
(val:string) =>
!!val ||
`${'กรุณากรอก มติที่ประชุม(เรื่องการดำเนินการทางวินัย)'}`,
]"
@ -2302,7 +2302,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
dense
v-model="faultLevel"
:rules="[(val) => !!val || `${'กรุณากรอกระดับความผิด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับความผิด'}`]"
:label="`${'ระดับความผิด'}`"
hide-bottom-space
/>
@ -2314,7 +2314,7 @@ const getClass = (val: boolean) => {
outlined
dense
v-model="caseFault"
:rules="[(val) => !!val || `${'กรุณากรอกกรณีความผิด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกกรณีความผิด'}`]"
:label="`${'กรณีความผิด'}`"
hide-bottom-space
/>
@ -2326,7 +2326,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="result"
:rules="[(val) => !!val || `${'กรุณากรอกผลดำเนินการพิจารณา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกผลดำเนินการพิจารณา'}`]"
:label="`${'ผลดำเนินการพิจารณา'}`"
hide-bottom-space
/>
@ -2338,7 +2338,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="refRaw"
:rules="[(val) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`]"
:label="`${'อ้างอิงมาตราตามกฎหมาย'}`"
hide-bottom-space
/>
@ -2357,7 +2357,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
dense
v-model="conclusionTranferNo"
:rules="[(val) => !!val || `${'กรุณากรอกครั่งที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกครั่งที่'}`]"
hide-bottom-space
:label="`${'ครั้งที่'}`"
/>
@ -2393,7 +2393,7 @@ const getClass = (val: boolean) => {
: null
"
:label="`${'เมื่อวันที่'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่'}`]"
>
<template v-slot:prepend>
<q-icon
@ -2463,7 +2463,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
dense
v-model="faultLevel"
:rules="[(val) => !!val || `${'กรุณากรอกระดับความผิด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับความผิด'}`]"
:label="`${'ระดับความผิด'}`"
hide-bottom-space
/>
@ -2475,7 +2475,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
dense
v-model="caseFault"
:rules="[(val) => !!val || `${'กรุณากรอกกรณีความผิด'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกกรณีความผิด'}`]"
:label="`${'กรณีความผิด'}`"
hide-bottom-space
/>
@ -2487,7 +2487,7 @@ const getClass = (val: boolean) => {
:readonly="checkRoutePermisson"
dense
v-model="result"
:rules="[(val) => !!val || `${'กรุณากรอกผลดำเนินการพิจารณา'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกผลดำเนินการพิจารณา'}`]"
:label="`${'ผลดำเนินการพิจารณา'}`"
hide-bottom-space
/>
@ -2499,7 +2499,7 @@ const getClass = (val: boolean) => {
dense
:readonly="checkRoutePermisson"
v-model="refRaw"
:rules="[(val) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`]"
:label="`${'อ้างอิงมาตราตามกฎหมาย'}`"
hide-bottom-space
/>
@ -2541,7 +2541,7 @@ const getClass = (val: boolean) => {
"
:label="`${'วันที่เริ่มรักษาการ'}`"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่เริ่มรักษาการ'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่เริ่มรักษาการ'}`,
]"
>
<template v-slot:prepend>
@ -2587,7 +2587,7 @@ const getClass = (val: boolean) => {
"
:label="`${'วันที่สิ้นสุดรักษาการ'}`"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่สิ้นสุดรักษาการ'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่สิ้นสุดรักษาการ'}`,
]"
>
<template v-slot:prepend>

View file

@ -468,7 +468,7 @@ onMounted(() => {
:options="optionOrganization"
label="หน่วยงานที่ถูกร้องเรียน"
:rules="[
(val) => !!val || `${'กรุณาเลือกหน่วยงานที่ถูกร้องเรียน'}`,
(val:string) => !!val || `${'กรุณาเลือกหน่วยงานที่ถูกร้องเรียน'}`,
]"
@update:model-value="changeFormData()"
use-input
@ -706,7 +706,7 @@ onMounted(() => {
"
label="วันที่รับเรื่อง"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่รับเรื่อง'}`,
(val:any) => !!val || `${'กรุณาเลือกวันที่รับเรื่อง'}`,
]"
>
<template v-slot:prepend>

View file

@ -12,7 +12,7 @@ import DialogHeader from "@/components/DialogHeader.vue";
const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
const { showLoader, messageError, hideLoader } = mixin;
const listCheck = ref<number | null>();
const props = defineProps({

View file

@ -351,8 +351,8 @@ onMounted(() => {
<DialogEdit
v-model:modal="modalEdit"
v-model:personalId="personalId"
:isEdit="isEdit"
:getList="getList"
v-model:personal-id="personalId"
:is-edit="isEdit"
:get-list="getList"
/>
</template>

View file

@ -15,11 +15,11 @@ interface FormData {
status: string;
result: string;
persons: object | null;
organizationId: string | null;
organizationId: string | null | number;
disciplineComplaintDocs: object | null;
activeId?: string | null;
organization?: string;
consideredAgencyId?: string | null;
consideredAgencyId?: string | null | number;
}
interface ArrayPerson {

View file

@ -3,7 +3,7 @@ import { defineStore } from "pinia";
import type { QTableProps } from "quasar";
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/Investigate";
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
/** option ผู้ถูกสอบสวน*/
@ -333,23 +333,23 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
}
}
/**
/**
* status text #
* @param val status
* @returns text
*/
function pathDirector(val: string) {
switch (val) {
case "disciplineInvestigatefactsEdit":
case "disciplineInvestigatefactsDetail":
return "inves";
case "disciplineDisciplinaryEdit":
case "disciplineDisciplinaryDetail":
return "discip";
case "disciplineDirector":
return "main";
}
function pathDirector(val: string) {
switch (val) {
case "disciplineInvestigatefactsEdit":
case "disciplineInvestigatefactsDetail":
return "inves";
case "disciplineDisciplinaryEdit":
case "disciplineDisciplinaryDetail":
return "discip";
case "disciplineDirector":
return "main";
}
}
/**
* status text #
@ -499,6 +499,6 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
pathInves,
pathDiscip,
pathComplaintsChannal,
pathDirector
pathDirector,
};
});

View file

@ -455,7 +455,7 @@ onMounted(async () => {
label="อัปโหลดไฟล์"
accept=".pdf"
:rules="
download10Url === '' ? [(val) => !!val || 'กรุณาเลือกไฟล์'] : []
download10Url === '' ? [(val:string) => !!val || 'กรุณาเลือกไฟล์'] : []
"
>
<template v-slot:prepend>
@ -522,7 +522,7 @@ onMounted(async () => {
outlined
dense
bg-color="white"
:rules="[(val) => !!val || 'กรุณากรอกหัวข้อ']"
:rules="[(val:string) => !!val || 'กรุณากรอกหัวข้อ']"
/>
</div>
<div class="col-12">
@ -533,7 +533,7 @@ onMounted(async () => {
outlined
dense
bg-color="white"
:rules="[(val) => !!val || 'กรุณากรอกข้อความ']"
:rules="[(val:string) => !!val || 'กรุณากรอกข้อความ']"
/>
</div>
</div>

View file

@ -116,7 +116,7 @@ onMounted(async () => {
outlined
label="ชื่อผลงาน"
v-model="subject"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อผลงาน'}`]"
lazy-rules
hide-bottom-space
/>
@ -127,7 +127,7 @@ onMounted(async () => {
outlined
v-model="author"
label="เจ้าของผลงาน"
:rules="[(val) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเจ้าของผลงาน'}`]"
lazy-rules
hide-bottom-space
/>
@ -139,7 +139,7 @@ onMounted(async () => {
v-model="assignedPosition"
label="ตำแหน่งที่ได้รับ"
:rules="[
(val) => !!val || `${'กรุณากรอกตำแหน่งที่ได้รับ'}`,
(val:string) => !!val || `${'กรุณากรอกตำแหน่งที่ได้รับ'}`,
]"
lazy-rules
hide-bottom-space
@ -175,7 +175,7 @@ onMounted(async () => {
outlined
label="ชื่อ-นามสกุล"
v-model="formCommand.elementaryFullName"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
lazy-rules
hide-bottom-space
/>
@ -187,7 +187,7 @@ onMounted(async () => {
outlined
v-model="formCommand.elementaryPosition"
label="ตำแหน่ง"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
lazy-rules
hide-bottom-space
/>
@ -209,7 +209,7 @@ onMounted(async () => {
outlined
v-model="formCommand.abovelevelFullname"
label="ชื่อ-นามสกุล"
:rules="[(val) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อ-นามสกุล'}`]"
lazy-rules
hide-bottom-space
/>
@ -221,7 +221,7 @@ onMounted(async () => {
outlined
v-model="formCommand.abovelevelPosition"
label="ตำแหน่ง"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
lazy-rules
hide-bottom-space
/>

View file

@ -288,7 +288,7 @@ const getClass = (val: boolean) => {
v-model="formData.name"
label="ชื่อผังบัญชีอัตราเงินเดือน"
:rules="[
(val) => !!val || 'กรุณากรอกชื่อผังบัญชีอัตราเงินเดือน',
(val:string) => !!val || 'กรุณากรอกชื่อผังบัญชีอัตราเงินเดือน',
]"
lazy-rules
/>
@ -309,7 +309,7 @@ const getClass = (val: boolean) => {
v-model="formData.posTypeId"
:options="salaryPosTypeOption"
label="ประเภทตำแหน่ง/กลุ่ม"
:rules="[(val) => !!val || 'กรุณาเลือกประเภทตำแหน่ง/กลุ่ม']"
:rules="[(val:string) => !!val || 'กรุณาเลือกประเภทตำแหน่ง/กลุ่ม']"
lazy-rules
use-input
@update:model-value="fetchPosLevel"
@ -341,7 +341,7 @@ const getClass = (val: boolean) => {
v-model="formData.posLevelId"
:options="salaryPosLevelOption"
label="ระดับ"
:rules="[(val) => !!val || 'กรุณาเลือกระดับ']"
:rules="[(val:string) => !!val || 'กรุณาเลือกระดับ']"
lazy-rules
use-input
:disable="formData.posTypeId === ''"

View file

@ -209,7 +209,7 @@ watch(
label="เงินเดือนฐาน"
mask="###,###,###,###"
reverse-fill-mask
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือนฐาน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเงินเดือนฐาน'}`]"
lazy-rules
hide-bottom-space
/>
@ -228,7 +228,7 @@ watch(
label="เลื่อน 0.5 ขั้น"
mask="###,###,###,###"
reverse-fill-mask
:rules="[(val) => !!val || `${'กรุณากรอกเลื่อน 0.5 ขั้น'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลื่อน 0.5 ขั้น'}`]"
lazy-rules
hide-bottom-space
/>
@ -259,7 +259,7 @@ watch(
label="เลื่อน 1 ขั้น"
mask="###,###,###,###"
reverse-fill-mask
:rules="[(val) => !!val || `${'กรุณากรอกเลื่อน 1 ขั้น'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลื่อน 1 ขั้น'}`]"
lazy-rules
hide-bottom-space
/>
@ -290,7 +290,7 @@ watch(
label="เลื่อน 1.5 ขั้น"
mask="###,###,###,###"
reverse-fill-mask
:rules="[(val) => !!val || `${'กรุณากรอกเลื่อน 1.5 ขั้น'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเลื่อน 1.5 ขั้น'}`]"
lazy-rules
hide-bottom-space
/>

View file

@ -173,7 +173,7 @@ const getClass = (val: boolean) => {
outlined
v-model="formData.name"
label="ชื่อผังบัญชีอัตราค่าจ้าง"
:rules="[(val) => !!val || 'กรุณากรอกชื่อผังบัญชีอัตราค่าจ้าง']"
:rules="[(val:string) => !!val || 'กรุณากรอกชื่อผังบัญชีอัตราค่าจ้าง']"
lazy-rules
/>
</div>
@ -192,7 +192,7 @@ const getClass = (val: boolean) => {
mask="#"
reverse-fill-mask
:rules="[
(val) => !!val || 'กรุณากรอกกลุ่มของผังบัญชีอัตราค่าจ้าง',
(val:string) => !!val || 'กรุณากรอกกลุ่มของผังบัญชีอัตราค่าจ้าง',
]"
/>
</div>

View file

@ -175,7 +175,7 @@ watch(
outlined
:model-value="year === 0 ? null : Number(year) + 543"
:label="`${'ปีงบประมาณ'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกเลือกปีงบประมาณ'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกเลือกปีงบประมาณ'}`]"
>
<template v-slot:prepend>
<q-icon
@ -203,7 +203,7 @@ watch(
option-value="id"
:options="typeOptions"
lazy-rules
:rules="[(val) => !!val || `${'กรุณาเลือกรอบการขึ้นเงินเดือน'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกรอบการขึ้นเงินเดือน'}`]"
hide-bottom-space
@update:model-value="onUpdatePeriod"
/>
@ -237,7 +237,7 @@ watch(
"
label="วันที่มีผลบังคับใช้งาน"
:rules="[
(val) => !!val || `${'กรุณาเลือกวันที่มีผลบังคับใช้งาน'}`,
(val:string) => !!val || `${'กรุณาเลือกวันที่มีผลบังคับใช้งาน'}`,
]"
>
<template v-slot:prepend>

View file

@ -81,7 +81,7 @@ function onSubmit() {
label="เงินเดือนฐาน"
mask="###,###,###,###"
reverse-fill-mask
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือนฐาน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเงินเดือนฐาน'}`]"
lazy-rules
hide-bottom-space
class="inputgreen"

View file

@ -136,7 +136,7 @@ watch(
option-label="name"
option-value="id"
:options="typeRangeOps"
:rules="[(val) => !!val || `${'กรุณาเลือก ขั้น'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก ขั้น'}`]"
lazy-rules
hide-bottom-space
@update:model-value="(isChange = true), chengType()"

View file

@ -79,7 +79,7 @@ function onSubmit() {
label="เงินเดือนฐาน"
mask="###,###,###,###"
reverse-fill-mask
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือนฐาน'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกเงินเดือนฐาน'}`]"
lazy-rules
hide-bottom-space
class="inputgreen"

View file

@ -104,7 +104,7 @@ watch(
option-label="name"
option-value="id"
:options="store.groupOp.filter((e) => e.name !== props.group)"
:rules="[(val) => !!val || `${'กรุณากลุ่ม'}`]"
:rules="[(val:string) => !!val || `${'กรุณากลุ่ม'}`]"
lazy-rules
hide-bottom-space
/>

View file

@ -135,7 +135,7 @@ watch(
option-label="name"
option-value="id"
:options="typeRangeOps"
:rules="[(val) => !!val || `${'กรุณาเลือก ขั้น'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือก ขั้น'}`]"
lazy-rules
hide-bottom-space
@update:model-value="(isChange = true), chengType()"

View file

@ -416,7 +416,7 @@ function fetchSalaryRound() {
outlined
dense
v-model="typeOrder"
:rules="[(val) => !!val || `${'กรุณาเลือกประเภทคำสั่ง'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกประเภทคำสั่ง'}`]"
hide-bottom-space
:label="`${'ประเภทคำสั่ง'}`"
map-options
@ -440,7 +440,7 @@ function fetchSalaryRound() {
lazy-rules
dense
v-model="nameOrder"
:rules="[(val) => !!val || `${'กรุณากรอกคำสั่งเรื่อง'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกคำสั่งเรื่อง'}`]"
:label="`${'คำสั่งเรื่อง'}`"
hide-bottom-space
/>
@ -476,7 +476,7 @@ function fetchSalaryRound() {
<q-input
class="inputgreen"
:model-value="dateYear !== null ? dateYear + 543 : null"
:rules="[(val) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
:label="`${'พ.ศ.'}`"
dense
outlined
@ -511,7 +511,7 @@ function fetchSalaryRound() {
dateCommand != null ? date2Thai(dateCommand) : null
"
:label="`${'วันที่คำสั่งมีผล'}`"
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่คำสั่งมีผล'}`]"
:rules="[(val:string) => !!val || `${'กรุณาเลือกวันที่คำสั่งมีผล'}`]"
>
<template v-slot:prepend>
<q-icon
@ -587,7 +587,7 @@ function fetchSalaryRound() {
dense
lazy-rules
v-model="positionCommand"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`]"
:label="`${'ตำแหน่งผู้มีอำนาจลงนาม'}`"
hide-bottom-space
/>
@ -602,7 +602,7 @@ function fetchSalaryRound() {
lazy-rules
dense
v-model="nameCommand"
:rules="[(val) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]"
:label="`${'ผู้มีอำนาจลงนาม'}`"
hide-bottom-space
/>
@ -617,7 +617,7 @@ function fetchSalaryRound() {
dense
lazy-rules
v-model="positionCommand"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`]"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`]"
:label="`${'ตำแหน่งผู้มีอำนาจลงนาม'}`"
hide-bottom-space
/>

Some files were not shown because too many files have changed in this diff Show more