diff --git a/src/modules/05_placement/components/AppointEmployee/AppointEmployeeDetail.vue b/src/modules/05_placement/components/AppointEmployee/AppointEmployeeDetail.vue index c9ee1855f..b0fc6b38d 100644 --- a/src/modules/05_placement/components/AppointEmployee/AppointEmployeeDetail.vue +++ b/src/modules/05_placement/components/AppointEmployee/AppointEmployeeDetail.vue @@ -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="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`" > diff --git a/src/modules/05_placement/components/AppointEmployee/DialogOrders.vue b/src/modules/05_placement/components/AppointEmployee/DialogOrders.vue index 854a13966..3524658bd 100644 --- a/src/modules/05_placement/components/AppointEmployee/DialogOrders.vue +++ b/src/modules/05_placement/components/AppointEmployee/DialogOrders.vue @@ -1,25 +1,21 @@ + + + + + + + + ส่งไปออกคำสั่ง + + + + + diff --git a/src/modules/05_placement/components/AppointMent/AppointMentDetail.vue b/src/modules/05_placement/components/AppointMent/AppointMentDetail.vue index 09fdf66cf..997194e36 100644 --- a/src/modules/05_placement/components/AppointMent/AppointMentDetail.vue +++ b/src/modules/05_placement/components/AppointMent/AppointMentDetail.vue @@ -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="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`" > diff --git a/src/modules/05_placement/components/AppointMent/DialogOrders.vue b/src/modules/05_placement/components/AppointMent/DialogOrders.vue index 9726cb6b9..003d9828e 100644 --- a/src/modules/05_placement/components/AppointMent/DialogOrders.vue +++ b/src/modules/05_placement/components/AppointMent/DialogOrders.vue @@ -1,31 +1,27 @@ + diff --git a/src/modules/05_placement/components/Help-Government/DialogOrders.vue b/src/modules/05_placement/components/Help-Government/DialogOrders.vue index 370960370..7500c2643 100644 --- a/src/modules/05_placement/components/Help-Government/DialogOrders.vue +++ b/src/modules/05_placement/components/Help-Government/DialogOrders.vue @@ -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([ "status", ]); const selected = ref([]); //รายการที่เลือก +const modalCommand = ref(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( + + diff --git a/src/modules/05_placement/components/Other/DialogOrders.vue b/src/modules/05_placement/components/Other/DialogOrders.vue index c13572d6e..00c38496f 100644 --- a/src/modules/05_placement/components/Other/DialogOrders.vue +++ b/src/modules/05_placement/components/Other/DialogOrders.vue @@ -1,26 +1,24 @@