fix ทะเบียนประวัติ
This commit is contained in:
parent
7933047d04
commit
8ff3456a23
5 changed files with 29 additions and 37 deletions
|
|
@ -19,8 +19,10 @@ import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
|||
const link = ref<string>("");
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const dataPerson = useDataStore()
|
||||
const checkType = ref<boolean>(dataPerson.officerType == 'OFFICER' ? true:false)
|
||||
const dataPerson = useDataStore();
|
||||
const checkType = ref<boolean>(
|
||||
dataPerson.officerType == "OFFICER" ? true : false
|
||||
);
|
||||
const store = useRegistryInFormationStore();
|
||||
const { showLoader, hideLoader, messageError, date2Thai, dateToISO } = mixin;
|
||||
|
||||
|
|
@ -383,7 +385,7 @@ function getData() {
|
|||
/** get history */
|
||||
function getHistory() {
|
||||
const url =
|
||||
dataPerson.officerType == 'OFFICER'
|
||||
dataPerson.officerType == "OFFICER"
|
||||
? config.API.dataUserGovernmentHistory("")
|
||||
: config.API.dataUserGovernmentHistory("-employee");
|
||||
showLoader();
|
||||
|
|
@ -402,7 +404,7 @@ function getHistory() {
|
|||
});
|
||||
}
|
||||
|
||||
onMounted(async() => {
|
||||
onMounted(async () => {
|
||||
link.value = await dataPerson.getProFileType();
|
||||
getData();
|
||||
});
|
||||
|
|
@ -433,31 +435,25 @@ onMounted(async() => {
|
|||
{{ formData.org ? formData.org : "-" }}
|
||||
</div>
|
||||
<div class="col-5 text-grey-6 text-weight-medium">
|
||||
{{ checkType ? 'ตำแหน่งในสายงาน':'ตำแหน่ง' }}
|
||||
{{ checkType ? "ตำแหน่งในสายงาน" : "ตำแหน่ง" }}
|
||||
</div>
|
||||
<div class="col-7">
|
||||
{{ formData.position ? formData.position : "-" }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-5 text-grey-6 text-weight-medium">
|
||||
ตำแหน่งเลขที่
|
||||
{{ checkType ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่" }}
|
||||
</div>
|
||||
<div class="col-7">
|
||||
{{ formData.posMasterNo ? formData.posMasterNo : "-" }}
|
||||
</div>
|
||||
<div
|
||||
v-if="checkType"
|
||||
class="col-5 text-grey-6 text-weight-medium"
|
||||
>
|
||||
<div v-if="checkType" class="col-5 text-grey-6 text-weight-medium">
|
||||
ตำแหน่งทางการบริหาร
|
||||
</div>
|
||||
<div v-if="checkType" class="col-7">
|
||||
{{ formData.posExecutive ? formData.posExecutive : "-" }}
|
||||
</div>
|
||||
<div
|
||||
v-if="checkType"
|
||||
class="col-5 text-grey-6 text-weight-medium"
|
||||
>
|
||||
<div v-if="checkType" class="col-5 text-grey-6 text-weight-medium">
|
||||
ด้านทางการบริหาร
|
||||
</div>
|
||||
<div v-if="checkType" class="col-7">
|
||||
|
|
@ -472,19 +468,14 @@ onMounted(async() => {
|
|||
|
||||
<div class="col-12 col-sm-12 col-md-6">
|
||||
<div class="row q-col-gutter-y-sm">
|
||||
<div
|
||||
v-if="checkType"
|
||||
class="col-5 text-grey-6 text-weight-medium"
|
||||
>
|
||||
<div v-if="checkType" class="col-5 text-grey-6 text-weight-medium">
|
||||
สายงาน
|
||||
</div>
|
||||
<div v-if="checkType" class="col-7">
|
||||
{{ formData.positionField ? formData.positionField : "-" }}
|
||||
</div>
|
||||
<div class="col-5 text-grey-6 text-weight-medium">
|
||||
{{
|
||||
checkType ? "ตำแหน่งประเภท" : "กลุ่มงาน"
|
||||
}}
|
||||
{{ checkType ? "ตำแหน่งประเภท" : "กลุ่มงาน" }}
|
||||
</div>
|
||||
<div class="col-7">
|
||||
{{ formData.posType ? formData.posType : "-" }}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
|||
mixin;
|
||||
|
||||
const modalHistory = ref<boolean>(false);
|
||||
const checkType = ref<boolean>(
|
||||
dataStore.officerType == "OFFICER" ? true : false
|
||||
);
|
||||
/** ตัวแปรข้อมูล */
|
||||
|
||||
const visibleColumns = ref<String[]>([
|
||||
|
|
@ -60,7 +63,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "posNo",
|
||||
align: "left",
|
||||
label: "ตำแหน่งเลขที่",
|
||||
label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่",
|
||||
sortable: true,
|
||||
field: "posNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -138,7 +141,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "posNo",
|
||||
align: "left",
|
||||
label: "ตำแหน่งเลขที่",
|
||||
label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่",
|
||||
sortable: true,
|
||||
field: "posNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ const baseColumns = ref<QTableColumn[]>([
|
|||
{
|
||||
name: "posNo",
|
||||
align: "left",
|
||||
label: "ตำแหน่งเลขที่",
|
||||
label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่",
|
||||
sortable: true,
|
||||
field: "posNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -153,7 +153,7 @@ const baseColumns = ref<QTableColumn[]>([
|
|||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
label: link.value === "-employee" ? "ค่าตอบแทนรายเดือน" : "เงินเดือน",
|
||||
label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน",
|
||||
sortable: true,
|
||||
field: "amount",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
label: checkType.value ? "เงินเดือน" : "ค่าตอบแทนรายเดือน",
|
||||
label: checkType.value ? "เงินเดือน" : "ค่าจ้าง",
|
||||
sortable: true,
|
||||
field: "amount",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -105,7 +105,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "posNo",
|
||||
align: "left",
|
||||
label: "ตำแหน่งเลขที่",
|
||||
label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่",
|
||||
sortable: true,
|
||||
field: "posNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -257,7 +257,7 @@ const baseColumnsHistory = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
label: checkType.value ? "เงินเดือน" : "ค่าตอบแทนรายเดือน",
|
||||
label: checkType.value ? "เงินเดือน" : "ค่าจ้าง",
|
||||
sortable: true,
|
||||
field: "amount",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -297,7 +297,7 @@ const baseColumnsHistory = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "posNo",
|
||||
align: "left",
|
||||
label: "ตำแหน่งเลขที่",
|
||||
label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่",
|
||||
sortable: true,
|
||||
field: "posNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import avatar from "@/assets/avatar_user.jpg";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import axios from "axios";
|
||||
import { ref } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry";
|
||||
|
|
@ -24,7 +22,7 @@ const store = useRegistryInFormationStore();
|
|||
const $q = useQuasar();
|
||||
const dataStore = useDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, dialogConfirm, showLoader, hideLoader } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const router = useRouter();
|
||||
const tab = ref<string>("information");
|
||||
|
||||
|
|
@ -56,13 +54,13 @@ async function onClickDownloadKp7(type: string) {
|
|||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
await genReport(data, fileName, "pdf");
|
||||
hideLoader();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue