Merge branch 'develop' into dev-tee
This commit is contained in:
commit
b66dfe0142
17 changed files with 730 additions and 300 deletions
|
|
@ -28,9 +28,9 @@ export default {
|
|||
resignReject: (id: string) => `${retirement}/resign/reject/${id}`,
|
||||
// ปลดออก
|
||||
retirementDischarge,
|
||||
listDischared: () => `${retirement}/dischared`,
|
||||
discharedByid: (id: string) => `${retirement}/dischared/${id}`,
|
||||
discharedReport: `${retirement}/dischared/report`,
|
||||
listDischarge: () => `${retirement}/discharge`,
|
||||
dischargeByid: (id: string) => `${retirement}/discharge/${id}`,
|
||||
dischargeReport: `${retirement}/discharge/report`,
|
||||
|
||||
// ไล่ออก
|
||||
retirementExpulsion,
|
||||
|
|
|
|||
|
|
@ -117,17 +117,10 @@
|
|||
</div>
|
||||
<q-separator color="blue-1" />
|
||||
<div class="dialog-card-contain">
|
||||
<q-card-section class="q-pa-md">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div
|
||||
:class="
|
||||
$q.screen.lt.md
|
||||
? ' row col-12 q-col-gutter-xs'
|
||||
: 'no-wrap row col-12 q-col-gutter-xs'
|
||||
"
|
||||
>
|
||||
<q-card-section class="q-pa-sm">
|
||||
<div class="row col-12 q-col-gutter-xs">
|
||||
<selector
|
||||
class="col-3"
|
||||
class="col-4"
|
||||
hide-bottom-space
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]"
|
||||
outlined
|
||||
|
|
@ -160,7 +153,7 @@
|
|||
type="number"
|
||||
/>
|
||||
<q-input
|
||||
class="col-2"
|
||||
class="col-3"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -187,7 +180,7 @@
|
|||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
class="inputgreen cursor-pointer q-mb-sm"
|
||||
class="inputgreen cursor-pointer"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -223,15 +216,6 @@
|
|||
type="number"
|
||||
@update:model-value="updateGovAge"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
:class="
|
||||
$q.screen.lt.md
|
||||
? ' row col-12 q-col-gutter-xs'
|
||||
: 'no-wrap row col-12 q-col-gutter-xs'
|
||||
"
|
||||
>
|
||||
<q-input
|
||||
v-if="employeeClass == 'officer'"
|
||||
clearable
|
||||
|
|
@ -266,7 +250,7 @@
|
|||
hide-bottom-space
|
||||
label="ตำแหน่งทางการบริหาร"
|
||||
@update:model-value="updatePositionExecutive"
|
||||
class="col-3"
|
||||
class="col-4"
|
||||
/>
|
||||
<q-input
|
||||
v-if="employeeClass != 'officer'"
|
||||
|
|
@ -290,7 +274,7 @@
|
|||
hide-bottom-space
|
||||
label="ระดับชั้นงาน"
|
||||
@update:model-value="updateEmployeeLevel"
|
||||
class="col-3"
|
||||
class="col-4"
|
||||
/>
|
||||
<q-input
|
||||
clearable
|
||||
|
|
@ -303,14 +287,6 @@
|
|||
@update:model-value="updatePosNo"
|
||||
class="col-3"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
:class="
|
||||
$q.screen.lt.md
|
||||
? ' row col-12 q-col-gutter-xs'
|
||||
: 'no-wrap row col-12 q-col-gutter-xs'
|
||||
"
|
||||
>
|
||||
<datepicker
|
||||
class="col-2"
|
||||
menu-class-name="modalfix"
|
||||
|
|
@ -372,10 +348,9 @@
|
|||
hide-bottom-space
|
||||
label="ประเภทคำสั่ง"
|
||||
@update:model-value="updateReportType"
|
||||
class="col-3"
|
||||
class="col-4"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 row items-center">
|
||||
|
||||
<q-toggle
|
||||
dense
|
||||
:model-value="isShowRetire"
|
||||
|
|
@ -437,7 +412,6 @@
|
|||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</q-card-section>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ const router = useRouter();
|
|||
const route = useRoute();
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const personalId = ref<string>(route.params.personalId.toString());
|
||||
|
||||
|
||||
const tabHead = ref<string>("save1");
|
||||
const props = defineProps({
|
||||
|
|
@ -39,7 +38,7 @@ const nextPage = () => {
|
|||
<template>
|
||||
<q-header class="bg-grey-1">
|
||||
<div class="bg-grey-1">
|
||||
|{{tabHead}}|
|
||||
|{{ tabHead }}|
|
||||
<div class="col-12 row q-gutter-x-md items-center">
|
||||
<q-tabs
|
||||
dense
|
||||
|
|
@ -48,35 +47,34 @@ const nextPage = () => {
|
|||
indicator-color="grey-1"
|
||||
class="text-grey-7"
|
||||
>
|
||||
|
||||
<q-tab v-for="i in loop" :name="`save${i}`" :label="`ครั้งที่ ${i}`">
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
icon="mdi-download"
|
||||
:disable="tabHead !== 'save'+i"
|
||||
:color="tabHead !== 'save'+i ? 'grey' : 'add'"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar
|
||||
><q-icon color="red" name="mdi-file-pdf"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar
|
||||
><q-icon color="blue" name="mdi-file-word"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-tab>
|
||||
<q-tab v-for="i in loop" :name="`save${i}`" :label="`ครั้งที่ ${i}`">
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
icon="mdi-download"
|
||||
:disable="tabHead !== 'save' + i"
|
||||
:color="tabHead !== 'save' + i ? 'grey' : 'add'"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar
|
||||
><q-icon color="red" name="mdi-file-pdf"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar
|
||||
><q-icon color="blue" name="mdi-file-word"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-tab>
|
||||
|
||||
<!-- <q-tab name="save3" label="ครั้งที่ 3" />
|
||||
<q-btn size="12px" flat dense icon="mdi-download" :disable="tab !== 'save3'"
|
||||
|
|
|
|||
|
|
@ -4,10 +4,16 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
const Header = defineAsyncComponent(
|
||||
() =>import("@/modules/05_placement/components/probation/FormEvaluation/Header.vue")
|
||||
() =>
|
||||
import(
|
||||
"@/modules/05_placement/components/probation/FormEvaluation/Header.vue"
|
||||
)
|
||||
);
|
||||
const FormSaveResult = defineAsyncComponent(
|
||||
() => import( "@/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue")
|
||||
() =>
|
||||
import(
|
||||
"@/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue"
|
||||
)
|
||||
);
|
||||
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -29,7 +35,7 @@ const activeTab = ref<string>("tab2");
|
|||
|
||||
onMounted(async () => {
|
||||
await fecthAssign(assignId.value);
|
||||
tab.value ='save1'
|
||||
tab.value = "save1";
|
||||
});
|
||||
|
||||
const fecthAssign = async (id: string) => {
|
||||
|
|
@ -51,18 +57,24 @@ const fecthAssign = async (id: string) => {
|
|||
};
|
||||
|
||||
const changeTab = (tabVal: string) => {
|
||||
console.log("tabVal===>",tabVal);
|
||||
console.log("tabVal===>", tabVal);
|
||||
tab.value = tabVal;
|
||||
};
|
||||
const addData = () => {
|
||||
router.push(
|
||||
`/probation/detail/addresult/${personalId.value}/${assignId.value}`
|
||||
);
|
||||
`/probation/detail/addresult/${personalId.value}/${assignId.value}`
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Header :change-tab="changeTab" :activeTab="activeTab" :add-data="addData" :loop="tabs.length"/>
|
||||
<Header
|
||||
:change-tab="changeTab"
|
||||
:activeTab="activeTab"
|
||||
:add-data="addData"
|
||||
:loop="tabs.length"
|
||||
v-if="tabs.length > 0"
|
||||
/>
|
||||
<!-- <q-header class="bg-grey-1">
|
||||
<div class="bg-grey-1">
|
||||
<div class="col-12 row q-gutter-xs-md items-center">
|
||||
|
|
@ -99,21 +111,18 @@ const addData = () => {
|
|||
</q-header> -->
|
||||
<q-page-container>
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel v-for="tabName in tabs" :key="tabName" :name="'save' + tabName.no">
|
||||
<q-tab-panel
|
||||
v-for="tabName in tabs"
|
||||
:key="tabName"
|
||||
:name="'save' + tabName.no"
|
||||
>
|
||||
<FormSaveResult :tab="tab" />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-page-container>
|
||||
|
||||
<!-- <q-page-container>
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="save1">
|
||||
<FormSaveResult :tab="tab" />
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="save2">
|
||||
<FormSaveResult :tab="tab" />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-page-container> -->
|
||||
<div class="q-gutter-md" v-if="tabs.length === 0">
|
||||
<div class="flex justify-center items-center q-my-md q-gutter-md">
|
||||
<q-btn outline color="primary" label="สร้างแบบประเมิน" @click="addData" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ const fecthAssign = async (id: string) => {
|
|||
await http
|
||||
.get(config.API.evaluateCreate(id))
|
||||
.then((res: any) => {
|
||||
if (res.data.data.evaluate_no > 2) {
|
||||
if (res.data.data.evaluate_no > 0) {
|
||||
tabs.value = res.data.data.evaluate;
|
||||
} else tabs.value.push({ no: 1 }, { no: 2 });
|
||||
}
|
||||
})
|
||||
.catch((e: any) => {
|
||||
console.log(e);
|
||||
|
|
@ -56,7 +56,9 @@ const fecthAssign = async (id: string) => {
|
|||
});
|
||||
};
|
||||
const addData = () => {
|
||||
router.push(`/probation/detail/addevalua/${personalId.value}/${assignId.value}`);
|
||||
router.push(
|
||||
`/probation/detail/addevalua/${personalId.value}/${assignId.value}`
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
@ -66,6 +68,7 @@ const addData = () => {
|
|||
:activeTab="activeTab"
|
||||
:loop="tabs.length"
|
||||
:add-data="addData"
|
||||
v-if="tabs.length > 0"
|
||||
/>
|
||||
|
||||
<!-- <q-page-container>
|
||||
|
|
@ -90,4 +93,10 @@ const addData = () => {
|
|||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-page-container>
|
||||
|
||||
<div class="q-gutter-md" v-if="tabs.length === 0">
|
||||
<div class="flex justify-center items-center q-my-md q-gutter-md">
|
||||
<q-btn outline color="primary" label="สร้างแบบประเมิน" @click="addData" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ const fecthAssign = async (id: string) => {
|
|||
await http
|
||||
.get(config.API.evaluateChairman(id))
|
||||
.then((res: any) => {
|
||||
if (res.data.data.evaluate_no > 2) {
|
||||
if (res.data.data.evaluate_no > 0 {
|
||||
tabs.value = res.data.data.evaluate;
|
||||
} else tabs.value.push({ no: 1 }, { no: 2 });
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -51,7 +51,9 @@ const fecthAssign = async (id: string) => {
|
|||
});
|
||||
};
|
||||
const addData = () => {
|
||||
router.push(`/probation/detail/addevaluascore/${personalId.value}/${assignId.value}`);
|
||||
router.push(
|
||||
`/probation/detail/addevaluascore/${personalId.value}/${assignId.value}`
|
||||
);
|
||||
};
|
||||
const changeTab = (tabVal: string) => {
|
||||
tab.value = tabVal;
|
||||
|
|
@ -64,6 +66,7 @@ const changeTab = (tabVal: string) => {
|
|||
:activeTab="activeTab"
|
||||
:loop="tabs.length"
|
||||
:add-data="addData"
|
||||
v-if="tabs.length > 0"
|
||||
/>
|
||||
|
||||
<!-- <q-page-container>
|
||||
|
|
@ -88,4 +91,9 @@ const changeTab = (tabVal: string) => {
|
|||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-page-container>
|
||||
<div class="q-gutter-md" v-if="tabs.length === 0">
|
||||
<div class="flex justify-center items-center q-my-md q-gutter-md">
|
||||
<q-btn outline color="primary" label="สร้างแบบประเมิน" @click="addData" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,14 @@ const router = useRouter();
|
|||
const mixin = useCounterMixin();
|
||||
const transferStore = useTransferDataStore();
|
||||
|
||||
const { date2Thai, messageError, showLoader, hideLoader, success } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
dialogMessage,
|
||||
} = mixin;
|
||||
const { statusText } = transferStore;
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -36,7 +43,6 @@ const visibleColumns = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"organization",
|
||||
"statustext",
|
||||
]);
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
@ -45,7 +51,6 @@ const visibleColumns2 = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"organization",
|
||||
"statustext",
|
||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const filterKeyword = ref<string>("");
|
||||
|
|
@ -109,15 +114,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "organization",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่ขอโอนไป",
|
||||
sortable: true,
|
||||
field: "organization",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -174,15 +170,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "organization",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่ขอโอนไป",
|
||||
sortable: true,
|
||||
field: "organization",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -254,33 +241,32 @@ const getData = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
const clickDelete = (id: string) => {
|
||||
$q.dialog({
|
||||
title: "ยืนยันการลบข้อมูล",
|
||||
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
|
||||
cancel: {
|
||||
flat: true,
|
||||
color: "negative",
|
||||
},
|
||||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.discharedByid(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
getData();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
const clickDelete = async (name: string, id: string) => {
|
||||
dialogMessage(
|
||||
$q,
|
||||
`ลบข้อมูล`,
|
||||
`ต้องการทำการลบข้อมูลนี้ใช่หรือไม่?`,
|
||||
"delete",
|
||||
"ยืนยัน",
|
||||
"red",
|
||||
async () => await deleteData(id),
|
||||
async () => await getData()
|
||||
);
|
||||
};
|
||||
|
||||
const deleteData = async (id: string) => {
|
||||
await http
|
||||
.delete(config.API.dischargeByid(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
console.log(res);
|
||||
})
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await getData();
|
||||
});
|
||||
};
|
||||
|
||||
const saveOrder = async () => {
|
||||
|
|
@ -291,7 +277,7 @@ const saveOrder = async () => {
|
|||
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.discharedReport, body)
|
||||
.post(config.API.dischargeReport, body)
|
||||
.then((res: any) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(data);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<!-- <q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการปลดออก</div>
|
||||
<q-space />
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-card> -->
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
|
|
@ -188,6 +188,175 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-form ref="myForm">
|
||||
<div class="row col-12 q-pa-md">
|
||||
<div class="col-12 row bg-white q-col-gutter-md">
|
||||
<div class="col-xs-12 row items-center">
|
||||
<div class="col-12">
|
||||
<div class="text-weight-bold text-grey">
|
||||
ตำแหน่งและหน่วยงานเดิม
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="organizationPositionOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตำแหน่ง/สังกัด'}`"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="positionTypeOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตำแหน่งประเภท'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="positionLevelOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ระดับ'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="posNo"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'เลขที่'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="salary"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'เงินเดือน'}`"
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-xs-6 col-sm-6 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="organization"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกการปลดออก'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'การปลดออก'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 row items-center">
|
||||
<div class="col-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
:readonly="!edit"
|
||||
v-model="date"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตั้งแต่วัน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
:style="
|
||||
edit
|
||||
? 'color: var(--q-primary)'
|
||||
: 'color: var(--q-grey)'
|
||||
"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="reason"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'หมายเหตุ '}`"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -292,20 +461,10 @@ onMounted(async () => {
|
|||
const getData = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.discharedByid(personId.toString()))
|
||||
.get(config.API.dischargeByid(personId.toString()))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
let list: TypeFile[] = [];
|
||||
if (data.docs.length > 0) {
|
||||
data.docs.map((doc: TypeFile) => {
|
||||
list.push({
|
||||
pathName: doc.pathName ?? "",
|
||||
fileName: doc.fileName ?? "",
|
||||
});
|
||||
});
|
||||
}
|
||||
rows.value = list;
|
||||
|
||||
responseData.value.createdAt = data.createdAt;
|
||||
responseData.value.date =
|
||||
data.date !== null ? new Date(data.date) : new Date();
|
||||
|
|
@ -320,9 +479,9 @@ const getData = async () => {
|
|||
responseData.value.salary = data.salary !== null ? data.salary : 0;
|
||||
responseData.value.status = data.status ?? "";
|
||||
responseData.value.avataPath = data.avataPath ?? "";
|
||||
responseData.value.fullname = `${data.prefix ?? "-"} ${
|
||||
data.firstName ?? "-"
|
||||
} ${data.lastName ?? "-"}`;
|
||||
responseData.value.fullname = `${data.firstName ?? "-"} ${
|
||||
data.lastName ?? "-"
|
||||
}`;
|
||||
|
||||
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||
|
|
@ -404,7 +563,7 @@ const saveData = async () => {
|
|||
};
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.discharedByid(personId.toString()), body)
|
||||
.put(config.API.dischargeByid(personId.toString()), body)
|
||||
.then((res: any) => {
|
||||
// const data = res.data.result;
|
||||
// console.log(data);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,14 @@ const router = useRouter();
|
|||
const mixin = useCounterMixin();
|
||||
const transferStore = useTransferDataStore();
|
||||
|
||||
const { date2Thai, messageError, showLoader, hideLoader, success } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
dialogMessage,
|
||||
} = mixin;
|
||||
const { statusText } = transferStore;
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -36,7 +43,6 @@ const visibleColumns = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"organization",
|
||||
"statustext",
|
||||
]);
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
@ -45,7 +51,6 @@ const visibleColumns2 = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"organization",
|
||||
"statustext",
|
||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const filterKeyword = ref<string>("");
|
||||
|
|
@ -109,15 +114,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "organization",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่ขอโอนไป",
|
||||
sortable: true,
|
||||
field: "organization",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -174,15 +170,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "organization",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่ขอโอนไป",
|
||||
sortable: true,
|
||||
field: "organization",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -254,33 +241,32 @@ const getData = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
const clickDelete = (id: string) => {
|
||||
$q.dialog({
|
||||
title: "ยืนยันการลบข้อมูล",
|
||||
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
|
||||
cancel: {
|
||||
flat: true,
|
||||
color: "negative",
|
||||
},
|
||||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.outByid(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
getData();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
const clickDelete = async (name: string, id: string) => {
|
||||
dialogMessage(
|
||||
$q,
|
||||
`ลบข้อมูล`,
|
||||
`ต้องการทำการลบข้อมูลนี้ใช่หรือไม่?`,
|
||||
"delete",
|
||||
"ยืนยัน",
|
||||
"red",
|
||||
async () => await deleteData(id),
|
||||
async () => await getData()
|
||||
);
|
||||
};
|
||||
|
||||
const deleteData = async (id: string) => {
|
||||
await http
|
||||
.delete(config.API.outByid(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
console.log(res);
|
||||
})
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await getData();
|
||||
});
|
||||
};
|
||||
|
||||
const saveOrder = async () => {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<!-- <q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการให้ออก</div>
|
||||
<q-space />
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-card> -->
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
|
|
@ -188,6 +188,175 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-form ref="myForm">
|
||||
<div class="row col-12 q-pa-md">
|
||||
<div class="col-12 row bg-white q-col-gutter-md">
|
||||
<div class="col-xs-12 row items-center">
|
||||
<div class="col-12">
|
||||
<div class="text-weight-bold text-grey">
|
||||
ตำแหน่งและหน่วยงานเดิม
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="organizationPositionOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตำแหน่ง/สังกัด'}`"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="positionTypeOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตำแหน่งประเภท'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="positionLevelOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ระดับ'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="posNo"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'เลขที่'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="salary"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'เงินเดือน'}`"
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-xs-6 col-sm-6 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="organization"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกการให้ออกสังกัด'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'การให้ออกสังกัด'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 row items-center">
|
||||
<div class="col-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
:readonly="!edit"
|
||||
v-model="date"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตั้งแต่วัน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
:style="
|
||||
edit
|
||||
? 'color: var(--q-primary)'
|
||||
: 'color: var(--q-grey)'
|
||||
"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="reason"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'หมายเหตุ '}`"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -295,17 +464,7 @@ const getData = async () => {
|
|||
.get(config.API.outByid(personId.toString()))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
let list: TypeFile[] = [];
|
||||
if (data.docs.length > 0) {
|
||||
data.docs.map((doc: TypeFile) => {
|
||||
list.push({
|
||||
pathName: doc.pathName ?? "",
|
||||
fileName: doc.fileName ?? "",
|
||||
});
|
||||
});
|
||||
}
|
||||
rows.value = list;
|
||||
|
||||
responseData.value.createdAt = data.createdAt;
|
||||
responseData.value.date =
|
||||
data.date !== null ? new Date(data.date) : new Date();
|
||||
|
|
@ -320,9 +479,9 @@ const getData = async () => {
|
|||
responseData.value.salary = data.salary !== null ? data.salary : 0;
|
||||
responseData.value.status = data.status ?? "";
|
||||
responseData.value.avataPath = data.avataPath ?? "";
|
||||
responseData.value.fullname = `${data.prefix ?? "-"} ${
|
||||
data.firstName ?? "-"
|
||||
} ${data.lastName ?? "-"}`;
|
||||
responseData.value.fullname = `${data.firstName ?? "-"} ${
|
||||
data.lastName ?? "-"
|
||||
}`;
|
||||
|
||||
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||
|
|
|
|||
|
|
@ -26,7 +26,14 @@ const router = useRouter();
|
|||
const mixin = useCounterMixin();
|
||||
const transferStore = useTransferDataStore();
|
||||
|
||||
const { date2Thai, messageError, showLoader, hideLoader, success } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
dialogMessage,
|
||||
} = mixin;
|
||||
const { statusText } = transferStore;
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -36,7 +43,6 @@ const visibleColumns = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"organization",
|
||||
"statustext",
|
||||
]);
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
@ -45,7 +51,6 @@ const visibleColumns2 = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"organization",
|
||||
"statustext",
|
||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const filterKeyword = ref<string>("");
|
||||
|
|
@ -109,15 +114,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "organization",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่ขอโอนไป",
|
||||
sortable: true,
|
||||
field: "organization",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -174,15 +170,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "organization",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่ขอโอนไป",
|
||||
sortable: true,
|
||||
field: "organization",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -254,33 +241,32 @@ const getData = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
const clickDelete = (id: string) => {
|
||||
$q.dialog({
|
||||
title: "ยืนยันการลบข้อมูล",
|
||||
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
|
||||
cancel: {
|
||||
flat: true,
|
||||
color: "negative",
|
||||
},
|
||||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.expulsionByid(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
getData();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
const clickDelete = async (name: string, id: string) => {
|
||||
dialogMessage(
|
||||
$q,
|
||||
`ลบข้อมูล`,
|
||||
`ต้องการทำการลบข้อมูลนี้ใช่หรือไม่?`,
|
||||
"delete",
|
||||
"ยืนยัน",
|
||||
"red",
|
||||
async () => await deleteData(id),
|
||||
async () => await getData()
|
||||
);
|
||||
};
|
||||
|
||||
const deleteData = async (id: string) => {
|
||||
await http
|
||||
.delete(config.API.expulsionByid(id))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
console.log(res);
|
||||
})
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await getData();
|
||||
});
|
||||
};
|
||||
|
||||
const saveOrder = async () => {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<!-- <q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
<div class="q-pl-sm text-weight-bold text-dark">ข้อมูลการไล่ออก</div>
|
||||
<q-space />
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-card> -->
|
||||
|
||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
|
|
@ -188,6 +188,175 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-form ref="myForm">
|
||||
<div class="row col-12 q-pa-md">
|
||||
<div class="col-12 row bg-white q-col-gutter-md">
|
||||
<div class="col-xs-12 row items-center">
|
||||
<div class="col-12">
|
||||
<div class="text-weight-bold text-grey">
|
||||
ตำแหน่งและหน่วยงานเดิม
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="organizationPositionOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตำแหน่ง/สังกัด'}`"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="positionTypeOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตำแหน่งประเภท'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="positionLevelOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ระดับ'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="posNo"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'เลขที่'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="salary"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'เงินเดือน'}`"
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-xs-6 col-sm-6 row items-center">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="organization"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกการไล่ออกจากสังกัด'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ไล่ออกจากสังกัด'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 row items-center">
|
||||
<div class="col-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
:readonly="!edit"
|
||||
v-model="date"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตั้งแต่วัน'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
:style="
|
||||
edit
|
||||
? 'color: var(--q-primary)'
|
||||
: 'color: var(--q-grey)'
|
||||
"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="reason"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกหมายเหตุ '}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'หมายเหตุ '}`"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -295,17 +464,7 @@ const getData = async () => {
|
|||
.get(config.API.expulsionByid(personId.toString()))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
let list: TypeFile[] = [];
|
||||
if (data.docs.length > 0) {
|
||||
data.docs.map((doc: TypeFile) => {
|
||||
list.push({
|
||||
pathName: doc.pathName ?? "",
|
||||
fileName: doc.fileName ?? "",
|
||||
});
|
||||
});
|
||||
}
|
||||
rows.value = list;
|
||||
|
||||
responseData.value.createdAt = data.createdAt;
|
||||
responseData.value.date =
|
||||
data.date !== null ? new Date(data.date) : new Date();
|
||||
|
|
@ -320,9 +479,9 @@ const getData = async () => {
|
|||
responseData.value.salary = data.salary !== null ? data.salary : 0;
|
||||
responseData.value.status = data.status ?? "";
|
||||
responseData.value.avataPath = data.avataPath ?? "";
|
||||
responseData.value.fullname = `${data.prefix ?? "-"} ${
|
||||
data.firstName ?? "-"
|
||||
} ${data.lastName ?? "-"}`;
|
||||
responseData.value.fullname = `${data.firstName ?? "-"} ${
|
||||
data.lastName ?? "-"
|
||||
}`;
|
||||
|
||||
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||
|
|
|
|||
|
|
@ -239,10 +239,9 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
>
|
||||
|
||||
<q-dialog v-model="modal">
|
||||
<q-card style="width: 850px; max-width: 80vw" class="q-px-sm q-pb-md">
|
||||
<q-card style="width: 850px; max-width: 80vw" class="q-pb-md">
|
||||
<q-toolbar class="q-py-md">
|
||||
<q-toolbar-title class="header-text text-weight-bolder"
|
||||
>เพิ่มรายชื่อ
|
||||
<q-toolbar-title class="text-h6">เพิ่มรายชื่อ
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export default [
|
|||
component: Main,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: [9],
|
||||
Key: [11],
|
||||
Role: "registryEmployee",
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -991,12 +991,12 @@ const Retire = async () => {
|
|||
}
|
||||
|
||||
.text-name {
|
||||
font-size: 1.5em;
|
||||
font-size: 1.3em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.text-sub {
|
||||
font-size: 1.5em;
|
||||
font-size: 1.3em;
|
||||
overflow: hidden;
|
||||
color: var(--q-primary);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@
|
|||
:historyClick="clickHistory"
|
||||
:addEmployee="statusAdd()"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-form ref="myform" class="col-12">
|
||||
<q-form ref="myform" class="col-12 q-pt-md">
|
||||
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-sm">
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
|
|
@ -346,10 +345,9 @@
|
|||
) "
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 q-pt-md q-pb-sm"><q-separator /></div>
|
||||
</div>
|
||||
</q-form>
|
||||
|
||||
<div class="col-12 q-pt-md q-pb-sm"><q-separator /></div>
|
||||
<HistoryTable
|
||||
:rows="rowsHistory"
|
||||
:columns="columnsHistory"
|
||||
|
|
@ -376,7 +374,7 @@
|
|||
</q-tr>
|
||||
</template>
|
||||
</HistoryTable>
|
||||
<div class="row col-12 q-pa-sm">
|
||||
<div class="row col-12">
|
||||
<q-space />
|
||||
<q-btn
|
||||
unelevated
|
||||
|
|
@ -387,7 +385,6 @@
|
|||
@click="saveData"
|
||||
/>
|
||||
</div>
|
||||
<q-separator />
|
||||
</q-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
|
|||
|
|
@ -133,9 +133,10 @@ const selectInbox = (id: string) => {
|
|||
bordered
|
||||
:style="$q.screen.gt.xs ? 'height: 80vh' : 'height: auto;'"
|
||||
>
|
||||
<div class="col-12 q-pt-sm q-px-md">
|
||||
<div class="col-12 q-py-sm q-px-md bg-grey-1">
|
||||
<div class="text-subtitle1 text-weight-medium">กล่องข้อความ</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
<q-scroll-area
|
||||
:style="$q.screen.gt.xs ? 'height: 74vh' : 'height: 40vh;'"
|
||||
class="bg-white rounded-borders q-px-md row col-12"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue