Merge branch 'develop' into devTee
This commit is contained in:
commit
bf175c7750
8 changed files with 513 additions and 43 deletions
|
|
@ -23,6 +23,7 @@ export default {
|
|||
salaryReportemployeeByid: (id: string) => `${salary}/report/employee/${id}`,
|
||||
salaryPeriod: () => `${salary}/period`,
|
||||
salaryPeriodActive: (year: string) => `${salary}/period/active/${year}`,
|
||||
salaryChangeIsclose: `${salaryPeriod}/change/isclose`,
|
||||
|
||||
/** รายการเงินเดือน*/
|
||||
keycloakPositionByid: (id: string) =>
|
||||
|
|
|
|||
|
|
@ -586,9 +586,9 @@ onMounted(async () => {
|
|||
props.row.posTypeName === "อำนวยการ"
|
||||
? `${props.row.posTypeName}`
|
||||
: ""
|
||||
}}{{
|
||||
}} {{
|
||||
props.row.posLevelName !== null
|
||||
? `${props.row.posLevelName}`
|
||||
? `(${props.row.posLevelName})`
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -93,21 +93,21 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "draftOrganizationOrganization",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่รับการบรรจุ",
|
||||
label: "ตำแหน่ง/หน่วยงานที่รับการบรรจุ",
|
||||
sortable: false,
|
||||
field: "draftOrganizationOrganization",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "draftPositionEmployee",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่บรรจุ",
|
||||
sortable: false,
|
||||
field: "draftPositionEmployee",
|
||||
headerStyle: "font-size: 14px; min-width: 200px",
|
||||
style: "font-size: 14px; ",
|
||||
},
|
||||
// {
|
||||
// name: "draftPositionEmployee",
|
||||
// align: "left",
|
||||
// label: "ตำแหน่งที่บรรจุ",
|
||||
// sortable: false,
|
||||
// field: "draftPositionEmployee",
|
||||
// headerStyle: "font-size: 14px; min-width: 200px",
|
||||
// style: "font-size: 14px; ",
|
||||
// },
|
||||
|
||||
{
|
||||
name: "govAge",
|
||||
|
|
@ -193,7 +193,7 @@ const visibleColumns = ref<String[]>([
|
|||
"citizenId",
|
||||
"fullname",
|
||||
"draftOrganizationOrganization",
|
||||
"draftPositionEmployee",
|
||||
// "draftPositionEmployee",
|
||||
"govAge",
|
||||
"dateEmployment",
|
||||
"age",
|
||||
|
|
@ -465,8 +465,23 @@ onMounted(async () => {
|
|||
"
|
||||
>
|
||||
<div class="col-4">
|
||||
<div>
|
||||
{{
|
||||
props.row.position !== null ? props.row.position : "-"
|
||||
}}
|
||||
{{
|
||||
props.row.posTypeShortName !== null
|
||||
? `(${props.row.posTypeShortName}`
|
||||
: ""
|
||||
}}
|
||||
{{
|
||||
props.row.posLevel !== null
|
||||
? `${props.row.posLevel})`
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
<div class="text-weight-medium">
|
||||
{{ props.row.root !== null ? props.row.root : "-" }}
|
||||
{{ props.row.root !== null ? props.row.root : "" }}
|
||||
{{
|
||||
props.row.rootShortName !== null
|
||||
? `(${props.row.rootShortName})`
|
||||
|
|
|
|||
|
|
@ -0,0 +1,353 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import type { QTableColumn } from "quasar";
|
||||
import type { PropType } from "vue";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/** importComponents*/
|
||||
import Header from "@/components/DialogHeader.vue";
|
||||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
const store = useSalaryListSDataStore();
|
||||
const {
|
||||
dialogConfirm,
|
||||
success,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
findOrgNameHtml,
|
||||
onSearchDataTable,
|
||||
} = useCounterMixin();
|
||||
|
||||
/**porps*/
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const columns = defineModel<QTableColumn[]>("columns", {
|
||||
required: true,
|
||||
});
|
||||
const visibleColumns = defineModel<string[]>("visibleColumns", {
|
||||
required: true,
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
fetchData: {
|
||||
type: Function,
|
||||
},
|
||||
total: {
|
||||
type: Number,
|
||||
},
|
||||
columns: {
|
||||
type: Array as PropType<QTableColumn[]>,
|
||||
},
|
||||
visibleColumns: {
|
||||
type: Array as PropType<string[]>,
|
||||
},
|
||||
isRetire: {
|
||||
type: Boolean,
|
||||
},
|
||||
});
|
||||
|
||||
const rows = ref<any[]>([]);
|
||||
const rowsMain = ref<any[]>([]);
|
||||
const selectedData = ref<any[]>([]); //ตำแหน่งที่ต้องการย้าย
|
||||
|
||||
const type = ref<string>(""); //เลื่อนขั้น
|
||||
const note = ref<string>(""); //หมายเหตุ
|
||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||
const isReserve = ref<boolean>(false); // สำรองหรือไม่
|
||||
|
||||
const typeRangeOps = computed(() => {
|
||||
return store.roundMainCode == "OCT"
|
||||
? [
|
||||
{ id: "NONE", name: "ไม่ได้เลื่อน" },
|
||||
{ id: "HAFT", name: "0.5 ขั้น" },
|
||||
{ id: "FULL", name: "1 ขั้น" },
|
||||
{ id: "FULLHAFT", name: "1.5 ขั้น" },
|
||||
]
|
||||
: store.roundMainCode == "APR"
|
||||
? [
|
||||
{ id: "NONE", name: "ไม่ได้เลื่อน" },
|
||||
{ id: "HAFT", name: "0.5 ขั้น" },
|
||||
{ id: "FULL", name: "1 ขั้น" },
|
||||
]
|
||||
: [
|
||||
{ id: "HAFT", name: "0.5 ขั้น" },
|
||||
{ id: "FULL", name: "1 ขั้น" },
|
||||
];
|
||||
});
|
||||
|
||||
const keyword = ref<string>("");
|
||||
|
||||
/**
|
||||
* function เรียกข้อมูลรายชื่อ
|
||||
* @param id กลุ่ม
|
||||
*/
|
||||
async function fetchDataPeriod() {
|
||||
showLoader();
|
||||
let formData = {
|
||||
page: "1",
|
||||
pageSize: props.total?.toString(),
|
||||
keyword: keyword.value,
|
||||
type: store.tabType,
|
||||
isRetire: store.roundMainCode !== "OCT" ? null : props.isRetire ? "1" : "0",
|
||||
};
|
||||
|
||||
await http
|
||||
.put(config.API.salaryListPeriodORG(store.groupId), formData)
|
||||
.then((res) => {
|
||||
rowsMain.value = res.data.result.data;
|
||||
rows.value = res.data.result.data;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function ปืด Popup
|
||||
*/
|
||||
function close() {
|
||||
modal.value = false;
|
||||
}
|
||||
|
||||
/** function ยืนยันการบันทึกข้อมูล*/
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
const ArrayProfileId = selectedData.value.map((e) => e.id);
|
||||
const body = {
|
||||
type: type.value,
|
||||
isReserve: isReserve.value,
|
||||
remark: type.value === "NONE" ? note.value : undefined,
|
||||
profileId: ArrayProfileId,
|
||||
};
|
||||
await http
|
||||
.post(config.API.salaryPeriod() + `/change/type-multi`, body)
|
||||
.then(async () => {
|
||||
await props.fetchData?.();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
close();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function เปลี่ยนระดับ
|
||||
*/
|
||||
function chengType() {}
|
||||
|
||||
function serchDataTable() {
|
||||
rows.value = onSearchDataTable(
|
||||
keyword.value,
|
||||
rowsMain.value,
|
||||
props.columns ? props.columns : []
|
||||
);
|
||||
}
|
||||
|
||||
function inputEdit(val: boolean) {
|
||||
return {
|
||||
"full-width cursor-pointer inputgreen ": val,
|
||||
"full-width cursor-pointer inputgreen": !val,
|
||||
};
|
||||
}
|
||||
|
||||
watch(
|
||||
() => modal.value,
|
||||
() => {
|
||||
if (modal.value) {
|
||||
fetchDataPeriod();
|
||||
} else {
|
||||
rows.value = [];
|
||||
rowsMain.value = [];
|
||||
keyword.value = "";
|
||||
type.value = "";
|
||||
selectedData.value = [];
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card class="col-12" style="width: 85%">
|
||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||
<Header :tittle="`เลื่อนขั้น`" :close="close" />
|
||||
<q-separator />
|
||||
|
||||
<q-card-section class="scroll" style="max-height: 80vh">
|
||||
<div class="q-gutter-y-sm">
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-select
|
||||
class="inputgreen"
|
||||
v-model="type"
|
||||
label="เลื่อนขั้น"
|
||||
dense
|
||||
outlined
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="typeRangeOps"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ขั้น'}`]"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
@update:model-value="chengType()"
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
<q-space />
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="keyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter.pervent="serchDataTable"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
:visible-columns="visibleColumns"
|
||||
selection="multiple"
|
||||
v-model:selected="selectedData"
|
||||
>
|
||||
<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
|
||||
v-model="props.selected"
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
/>
|
||||
</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.prefix}${props.row.firstName} ${props.row.lastName}`
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="col.name == 'organization'"
|
||||
class="text-html"
|
||||
>
|
||||
{{ findOrgNameHtml(props.row) }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'amount'">
|
||||
{{ Number(props.row.amount).toLocaleString() }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'isSuspension'">
|
||||
<q-icon
|
||||
v-if="props.row.isSuspension !== null"
|
||||
:name="props.row.isSuspension ? 'done' : 'close'"
|
||||
:color="props.row.isSuspension ? 'primary' : 'red'"
|
||||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isSuspension == null">
|
||||
{{ props.row.isSuspension == null ? "-" : "" }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<q-checkbox
|
||||
v-if="type === 'FULL'"
|
||||
keep-color
|
||||
label="สำรอง"
|
||||
dense
|
||||
v-model="isReserve"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
v-if="type === 'NONE'"
|
||||
outlined
|
||||
dense
|
||||
v-model="note"
|
||||
label="หมายเหตุ"
|
||||
type="textarea"
|
||||
:class="inputEdit(isReadonly)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
:disable="selectedData.length === 0 || type === ''"
|
||||
type="submit"
|
||||
color="secondary"
|
||||
label="บันทึก"
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
@ -31,6 +31,7 @@ const props = defineProps({
|
|||
rootId: String,
|
||||
periodId: String,
|
||||
getData: Function,
|
||||
periodLatest: Object,
|
||||
});
|
||||
|
||||
const modalRecommend = ref<boolean>(false); //popup
|
||||
|
|
@ -287,7 +288,8 @@ onMounted(() => {
|
|||
class="q-pa-none"
|
||||
v-if="
|
||||
store.statusQuota == 'PENDING' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
!periodLatest?.group1IsClose
|
||||
"
|
||||
>
|
||||
<q-file
|
||||
|
|
@ -360,7 +362,10 @@ onMounted(() => {
|
|||
</div>
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsDelete"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsDelete &&
|
||||
!periodLatest?.group1IsClose
|
||||
"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
|
|
@ -380,10 +385,10 @@ onMounted(() => {
|
|||
</q-card-section>
|
||||
|
||||
<!-- <q-separator /> -->
|
||||
<!-- <q-card-actions align="right"> -->
|
||||
<!-- <div> -->
|
||||
<!-- การเจ้าหน้าที่ของหน่วยงานส่งเอกสารให้ ผอ. หน่วยงานตรวจสอบ -->
|
||||
<!-- <q-btn
|
||||
<!-- <q-card-actions align="right"> -->
|
||||
<!-- <div> -->
|
||||
<!-- การเจ้าหน้าที่ของหน่วยงานส่งเอกสารให้ ผอ. หน่วยงานตรวจสอบ -->
|
||||
<!-- <q-btn
|
||||
v-if="
|
||||
store.statusQuota == 'PENDING' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
|
|
@ -394,8 +399,8 @@ onMounted(() => {
|
|||
@click="sendToDirector('ส่งเอกสารให้ ผอ. ตรวจสอบ', 'officer')"
|
||||
/> -->
|
||||
|
||||
<!-- ผอ. หน่วยงานทำการยืนยันและส่งให้ สกจ. -->
|
||||
<!-- <q-btn
|
||||
<!-- ผอ. หน่วยงานทำการยืนยันและส่งให้ สกจ. -->
|
||||
<!-- <q-btn
|
||||
v-if="
|
||||
store.statusQuota == 'WAITHEAD1' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
|
|
@ -406,8 +411,8 @@ onMounted(() => {
|
|||
@click="sendToDirector('ยืนยันและส่งเอกสารให้ สกจ.', 'head')"
|
||||
/> -->
|
||||
|
||||
<!-- สกจ. ตรวจสอบเอกสารและข้อมูลรายการเงินเดือนที่แต่ละหน่วยงานส่งมา ไม่มีปรับโควต้า -->
|
||||
<!-- <q-btn
|
||||
<!-- สกจ. ตรวจสอบเอกสารและข้อมูลรายการเงินเดือนที่แต่ละหน่วยงานส่งมา ไม่มีปรับโควต้า -->
|
||||
<!-- <q-btn
|
||||
v-if="
|
||||
store.statusQuota == 'WAITOWNER1' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
|
|
@ -418,8 +423,8 @@ onMounted(() => {
|
|||
@click="sendToDirector('ยืนยันการตรวจสอบ', 'owner')"
|
||||
/> -->
|
||||
|
||||
<!-- สกจ. ตรวจสอบเอกสารและข้อมูลรายการเงินเดือนที่แต่ละหน่วยงานส่งมา มีปรับโควต้า -->
|
||||
<!-- <q-btn
|
||||
<!-- สกจ. ตรวจสอบเอกสารและข้อมูลรายการเงินเดือนที่แต่ละหน่วยงานส่งมา มีปรับโควต้า -->
|
||||
<!-- <q-btn
|
||||
v-if="
|
||||
store.statusQuota == 'WAITOWNER1' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
|
|
@ -431,8 +436,8 @@ onMounted(() => {
|
|||
@click="sendAndRecommend('ส่งคำแนะนำให้ ผอ. ตรวจสอบ', 'owner')"
|
||||
/> -->
|
||||
|
||||
<!-- ผอ.หน่วยงานส่งคำแนะนำให้การเจ้าหน้าที่หน่วยงาน -->
|
||||
<!-- <q-btn
|
||||
<!-- ผอ.หน่วยงานส่งคำแนะนำให้การเจ้าหน้าที่หน่วยงาน -->
|
||||
<!-- <q-btn
|
||||
v-if="
|
||||
store.statusQuota == 'WAITHEAD2' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
|
|
@ -445,8 +450,8 @@ onMounted(() => {
|
|||
"
|
||||
/> -->
|
||||
|
||||
<!-- ส่งไปออกคำสั่ง -->
|
||||
<!-- <q-btn
|
||||
<!-- ส่งไปออกคำสั่ง -->
|
||||
<!-- <q-btn
|
||||
v-if="
|
||||
store.statusQuota == 'WAITOFFICER2' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
|
|
@ -456,8 +461,8 @@ onMounted(() => {
|
|||
label="ส่งไปออกคำสั่ง"
|
||||
/> -->
|
||||
|
||||
<!-- รอออกคำสั่ง -->
|
||||
<!-- <q-btn
|
||||
<!-- รอออกคำสั่ง -->
|
||||
<!-- <q-btn
|
||||
v-if="
|
||||
store.statusQuota == 'REPORT' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
|
|
@ -467,7 +472,7 @@ onMounted(() => {
|
|||
disable
|
||||
label="รอออกคำสั่ง"
|
||||
/> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </q-card-actions> -->
|
||||
</q-card>
|
||||
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ async function fetchDataPeriod(id: string) {
|
|||
let formData = {
|
||||
page: formFilter.page.toString(),
|
||||
pageSize: formFilter.pageSize.toString(),
|
||||
keyword: formFilter.keyword,
|
||||
keyword: formFilter.keyword.trim(),
|
||||
type: store.tabType,
|
||||
isRetire:
|
||||
store.roundMainCode !== "OCT"
|
||||
|
|
@ -638,6 +638,7 @@ const updateIsShowRetire = async () => {
|
|||
:total="total"
|
||||
:snap-shot="props?.snapShot"
|
||||
:is-close="props.periodLatest?.group1IsClose ?? false"
|
||||
:is-retire="isRetire"
|
||||
/>
|
||||
<TableTabType2
|
||||
v-else
|
||||
|
|
@ -648,7 +649,7 @@ const updateIsShowRetire = async () => {
|
|||
:total="total"
|
||||
:type="item.type"
|
||||
:snap-shot="props?.snapShot"
|
||||
:is-close="props.periodLatest?.group2IsClose ?? false"
|
||||
:is-close="props.periodLatest?.group1IsClose ?? false"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { useQuasar } from "quasar";
|
|||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
/** importType*/
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { QTableColumn } from "quasar";
|
||||
import type { NewPagination } from "@/modules/13_salary/interface/index/Main";
|
||||
import type { DataFilter } from "@/modules/13_salary/interface/index/SalaryList";
|
||||
|
||||
|
|
@ -13,6 +13,8 @@ import DialogAddPerson from "@/modules/13_salary/components/04_salaryLists//Dial
|
|||
import DialogFormEdit from "@/modules/13_salary/components/04_salaryLists/DialogFormEditSalary.vue"; // แก้ไขเงินเดือน
|
||||
import DialogMoveGroup from "@/modules/13_salary/components/04_salaryLists/DialogMoveGroup.vue"; // ย้ายกลุ่ม
|
||||
import DialogMoveLevel from "@/modules/13_salary/components/04_salaryLists/DialogMoveLevel.vue"; // เลื่อนขั้น
|
||||
import DialogMoveLevelMulti from "@/modules/13_salary/components/04_salaryLists/DialogMoveLevelMulti.vue";
|
||||
|
||||
import DialogProperties from "@/modules/13_salary/components/04_salaryLists/DialogProperties.vue"; //แก้ไขคุณสมบัติ
|
||||
import DialogInfo from "@/modules/13_salary/components/DialogInfoMain.vue";
|
||||
|
||||
|
|
@ -32,6 +34,7 @@ const {
|
|||
hideLoader,
|
||||
success,
|
||||
findOrgNameHtml,
|
||||
findOrgName,
|
||||
} = useCounterMixin();
|
||||
|
||||
/** Props*/
|
||||
|
|
@ -50,10 +53,13 @@ const props = defineProps({
|
|||
total: {
|
||||
type: Number,
|
||||
},
|
||||
isRetire: {
|
||||
type: Boolean,
|
||||
},
|
||||
});
|
||||
|
||||
/** ข้อมูล Table*/
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
const columns = ref<QTableColumn[]>([
|
||||
{
|
||||
name: "no",
|
||||
align: "left",
|
||||
|
|
@ -138,6 +144,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
label: "สังกัด",
|
||||
sortable: false,
|
||||
field: "organization",
|
||||
format(val, row) {
|
||||
return findOrgName(row);
|
||||
},
|
||||
headerStyle: "font-size: 14px;min-width:280px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -209,6 +218,7 @@ const modalDialogAddPerson = ref<boolean>(false); //popup เพิ่มคน
|
|||
const modalDialogForm = ref<boolean>(false); //popup แก้ไขเงินเดือน
|
||||
const modalDialogMoveGroup = ref<boolean>(false); //popup ย้ายกลุ่ม
|
||||
const modalDialogMoveLeve = ref<boolean>(false); //popup เลื่อนขั้น
|
||||
const modalDialogMoveLeveMulti = ref<boolean>(false); //popup เลื่อนขั้น
|
||||
const modalDialogProperties = ref<boolean>(false);
|
||||
const modalDialogInfo = ref<boolean>(false); // /popup ข้อมูลส่วนตัว
|
||||
|
||||
|
|
@ -321,6 +331,15 @@ function onProperties(data: any) {
|
|||
isLeave.value = data.isLeave;
|
||||
}
|
||||
|
||||
/**
|
||||
* function openPopup ย้ายกขั้น
|
||||
* @param id profileId
|
||||
*
|
||||
*/
|
||||
function onClickMoveLevelMulti() {
|
||||
modalDialogMoveLeveMulti.value = !modalDialogMoveLeve.value;
|
||||
}
|
||||
|
||||
/** callblack function เรียกข้อมูลรายชื่อใหม่ เมื่อมีการเปลี่ยน PageSize*/
|
||||
watch(
|
||||
() => formFilter.value.pageSize,
|
||||
|
|
@ -360,6 +379,23 @@ function onClickViewInfo(type: string, id: string) {
|
|||
>
|
||||
<q-tooltip>เพิ่ม </q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="
|
||||
!store.isClosedRound &&
|
||||
checkPermission($route)?.attrIsCreate &&
|
||||
!isClose
|
||||
"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="public"
|
||||
icon="mdi-stairs-up"
|
||||
@click="onClickMoveLevelMulti"
|
||||
>
|
||||
<q-tooltip>เลื่อนขั้น</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-space />
|
||||
<q-input
|
||||
borderless
|
||||
|
|
@ -574,6 +610,23 @@ function onClickViewInfo(type: string, id: string) {
|
|||
:remark="''"
|
||||
/>
|
||||
|
||||
<!-- เลื่อนขั้นเลือกหลายคน -->
|
||||
<DialogMoveLevelMulti
|
||||
v-model:modal="modalDialogMoveLeveMulti"
|
||||
:fetch-data="props.fetchDataTable"
|
||||
:columns="
|
||||
columns.filter(
|
||||
(e) =>
|
||||
e.name !== 'leave' &&
|
||||
e.name !== 'discipline' &&
|
||||
e.name !== 'posSalary'
|
||||
)
|
||||
"
|
||||
:visible-columns="visibleColumns"
|
||||
:total="props?.total"
|
||||
:is-retire="isRetire"
|
||||
/>
|
||||
|
||||
<!-- แก้ไขคุณสมบัติ -->
|
||||
<DialogProperties
|
||||
v-model:modal="modalDialogProperties"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ import DialogCommand from "@/modules/18_command/components/DialogCreateCommandOR
|
|||
/** use*/
|
||||
const store = useSalaryListSDataStore();
|
||||
const $q = useQuasar();
|
||||
const { messageError, showLoader, hideLoader } = useCounterMixin();
|
||||
const { messageError, showLoader, hideLoader, success, dialogConfirm } =
|
||||
useCounterMixin();
|
||||
|
||||
/** ตัวแปร*/
|
||||
const year = ref<number>(new Date().getFullYear()); //ปีงบประมาณ
|
||||
|
|
@ -73,9 +74,7 @@ const titleCommand = computed(() => {
|
|||
return `ปีงบประมาณ ${year.value + 543} รอบการขึ้นเงินเดือน ${txt}`;
|
||||
});
|
||||
|
||||
/**
|
||||
* function เรียกข้อมูลรอบการขึ้นเงินเดือน
|
||||
*/
|
||||
/** function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
|
||||
async function getRound() {
|
||||
showLoader();
|
||||
isDisable.value = false;
|
||||
|
|
@ -392,6 +391,34 @@ async function fetchCheckisOfficer() {
|
|||
});
|
||||
}
|
||||
|
||||
function onClosePeriodSalalry() {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.put(
|
||||
config.API.salaryChangeIsclose +
|
||||
`/${snapFilter.value}/${roundFilter.value.id}`,
|
||||
{
|
||||
isClose: true,
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
await fetchSalalyPeriod(
|
||||
agencyFilter.value,
|
||||
roundFilter.value.id,
|
||||
snapFilter.value
|
||||
);
|
||||
success($q, "ปิดการแก้ไขสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await Promise.all([getRound(), fetchCheckisOfficer()]);
|
||||
});
|
||||
|
|
@ -409,8 +436,9 @@ onMounted(async () => {
|
|||
<div class="row q-col-gutter-sm items-center q-py-xs">
|
||||
<div
|
||||
v-if="
|
||||
((isOfficer || isStaff) && snapFilter === 'SNAP2') ||
|
||||
roundFilter?.shortCode === 'SPECIAL'
|
||||
(((isOfficer || isStaff) && snapFilter === 'SNAP2') ||
|
||||
roundFilter?.shortCode === 'SPECIAL') &&
|
||||
periodLatest?.group1IsClose
|
||||
"
|
||||
>
|
||||
<q-btn
|
||||
|
|
@ -425,6 +453,19 @@ onMounted(async () => {
|
|||
</q-btn>
|
||||
</div>
|
||||
|
||||
<div v-if="isOfficer && !periodLatest?.group1IsClose">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="red"
|
||||
icon="mdi-pencil-lock-outline"
|
||||
@click.stop.prevent="onClosePeriodSalalry"
|
||||
>
|
||||
<q-tooltip>ปิดให้แก้ไข</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<datepicker
|
||||
v-model="year"
|
||||
:locale="'th'"
|
||||
|
|
@ -579,6 +620,7 @@ onMounted(async () => {
|
|||
:period-id="roundFilter.id"
|
||||
:root-id="agencyFilter"
|
||||
:get-data="getQuota"
|
||||
:period-latest="periodLatest"
|
||||
/>
|
||||
</q-card>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue