Merge branch 'develop' of github.com:Frappet/hrms-mgt into develop

* 'develop' of github.com:Frappet/hrms-mgt:
  fix การทดลองปฏิบัติหน้าที่ราชการ
  แก้คำ
  แก้ ชิดซ้าย
  แก้คำ
  clone เมนูให้ "รายการให้ออก (ลูกจ้าง)"
  fix / เงินเดือน
  fix color pagination
  แก้คำ

# Conflicts:
#	src/modules/05_placement/components/probation/MainSurvey.vue
This commit is contained in:
Warunee Tamkoo 2025-01-22 17:31:09 +07:00
commit 4c8fb456a1
12 changed files with 435 additions and 44 deletions

View file

@ -130,6 +130,11 @@ const itemsMenuEmployee = ref<DataOptionSys[]>([
name: "ถึงแก่กรรม",
system: "SYS_PASSAWAY",
},
{
id: "3",
name: "ให้ออกจากราชการ",
system: "SYS_DISMISS_EMP",
},
]);
const uploadUrl = ref<string>(""); //URL
@ -842,7 +847,11 @@ onMounted(async () => {
v-if="
!storeRegistry.isLeave &&
empType === '-employee' &&
checkPermissionList(['SYS_PROMOTION_EMP', 'SYS_PASSAWAY'])
checkPermissionList([
'SYS_PROMOTION_EMP',
'SYS_PASSAWAY',
'SYS_DISMISS_EMP',
])
"
size="md"
rounded
@ -861,6 +870,8 @@ onMounted(async () => {
? appointEmployeePost()
: item.name == 'ถึงแก่กรรม'
? clickPassaway()
: item.name == 'ให้ออกจากราชการ'
? outPost()
: null
"
v-close-popup

View file

@ -1145,11 +1145,12 @@ onMounted(async () => {
</q-menu>
</q-btn>
<div v-if="!isEdit && !isCheckFile">
<div v-if="!isEdit">
<q-btn
v-if="
!checkRoutePermisson &&
probationStore.dataPermissions?.tab1.isEdit
probationStore.dataPermissions?.tab1.isEdit &&
!isCheckFile
"
dense
flat

View file

@ -795,17 +795,6 @@ onMounted(() => {
</div>
</q-form>
<FormUploadFile
:group="`รายงานผลครั้งที่${props.tab?.charAt(4)}`"
v-model:is-check-file="isCheckFile"
:check-route-permisson="checkRoutePermisson"
:data-permissions="
probationStore.dataPermissions?.tab6.isEdit
? probationStore.dataPermissions?.tab6.isEdit
: false
"
/>
<q-toolbar
class="text-primary"
v-if="
@ -817,6 +806,18 @@ onMounted(() => {
<q-space />
<q-btn label="บันทึก" color="secondary" @click="savaForm" />
</q-toolbar>
<FormUploadFile
v-else
:group="`รายงานผลครั้งที่${props.tab?.charAt(4)}`"
v-model:is-check-file="isCheckFile"
:check-route-permisson="checkRoutePermisson"
:data-permissions="
probationStore.dataPermissions?.tab6.isEdit
? probationStore.dataPermissions?.tab6.isEdit
: false
"
/>
</div>
</template>

View file

@ -801,19 +801,19 @@ onMounted(async () => {
{{
`${
props.row.orgChild4Name
? props.row.orgChild4Name + "/"
? props.row.orgChild4Name + " "
: ""
}${
props.row.orgChild3Name
? props.row.orgChild3Name + "/"
? props.row.orgChild3Name + " "
: ""
}${
props.row.orgChild2Name
? props.row.orgChild2Name + "/"
? props.row.orgChild2Name + " "
: ""
}${
props.row.orgChild1Name
? props.row.orgChild1Name + "/"
? props.row.orgChild1Name + " "
: ""
}${props.row.orgRootName ? props.row.orgRootName : ""}`
}}

View file

@ -193,7 +193,7 @@ onMounted(async () => {
v-model="filterKeyword"
ref="filterRef"
outlined
placeholder="ค้นหาจากชื่อ-นามสกุล/ตำแหน่งผู้ทดลองฯ"
placeholder="ค้นหาจากชื่อ - นามสกุล /ตำแหน่ง"
@keydown.enter.prevent="getData()"
style="width: 350px"
>

View file

@ -337,7 +337,8 @@ watch(modal, () => {
งหมด {{ totalList }} รายการ
<q-pagination
v-model="formPagePersonList.page"
color="primary"
active-color="primary"
color="dark"
:max="maxPage"
:max-pages="5"
size="sm"

View file

@ -54,6 +54,8 @@ const detaildeceasedByid = () =>
/** รายการให้ออก*/
const dismissOrder = () =>
import("@/modules/06_retirement/views/06_dismissOrder.vue");
const dismissOrderEmp = () =>
import("@/modules/06_retirement/views/08_dismissOrderEmp.vue");
const outDetail = () =>
import("@/modules/06_retirement/components/06_dismissOrder/Detail.vue");
const outDetailOnly = () =>
@ -289,6 +291,16 @@ export default [
Role: "STAFF",
},
},
{
path: "/retirementEmployee",
name: "dismiss-order-emp",
component: dismissOrderEmp,
meta: {
Auth: true,
Key: "SYS_DISMISS_EMP",
Role: "STAFF",
},
},
{
path: "/retirement/dismiss-order/:id",
name: "outDetail",

View file

@ -0,0 +1,365 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import type { QTableProps } from "quasar";
import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { checkPermission } from "@/utils/permissions";
import { useTransferDataStore } from "@/modules/05_placement/store";
import type { ResponseData } from "@/modules/06_retirement/interface/response/out";
import DialogSendToCommand from "@/modules/06_retirement/components/06_dismissOrder/DialogSendToCommand.vue";
/** use */
const $q = useQuasar();
const router = useRouter();
const mixin = useCounterMixin();
const transferStore = useTransferDataStore();
const {
date2Thai,
messageError,
showLoader,
hideLoader,
success,
onSearchDataTable,
dialogRemove,
} = mixin;
const { statusText } = transferStore;
const modal = ref<boolean>(false);
/** คอลัมน์ที่แสดง */
const visibleColumns = ref<string[]>([
"no",
"fullname",
"positionLevel",
"organizationPositionOld",
"createdAt",
"status",
]);
//
const filterKeyword = ref<string>("");
const filterKeyword2 = ref<string>("");
const filterRef = ref<any>(null);
//
const rows = ref<ResponseData[]>([]);
const rowsData = ref<ResponseData[]>([]);
const rows2 = ref<ResponseData[]>([]);
const rowsData2 = ref<ResponseData[]>([]);
const filters = ref<ResponseData[]>([]);
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: false,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "fullname",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullname",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
},
{
name: "positionLevel",
align: "left",
label: "กลุ่มงาน",
sortable: true,
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format(val, row) {
let name = "";
if (row.positionTypeOld && row.positionLevelOld) {
name = `${row.positionTypeOld} (${row.positionLevelOld})`;
} else if (row.positionTypeOld) {
name = `${row.positionTypeOld}`;
} else if (row.positionLevelOld) {
name = `(${row.positionLevelOld})`;
} else name = "-";
return name;
},
},
{
name: "organizationPositionOld",
align: "left",
label: "ตำแหน่ง/สังกัดเดิม",
sortable: true,
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "createdAt",
align: "left",
label: "วันที่ดำเนินการ",
sortable: true,
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val) => date2Thai(val),
},
{
name: "status",
align: "left",
label: "สถานะ",
sortable: true,
field: "status",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val) => statusText(val),
},
]);
const pagination = ref({
sortBy: "createdAt",
descending: true,
page: 1,
rowsPerPage: 10,
});
function openModalOrder() {
openModal();
const row = filters.value.filter(
(r: ResponseData) =>
(r.status == "WAITTING" ||
r.status == "PENDING" ||
r.status == "APPROVE") &&
r.organizationPositionOld &&
r.positionTypeOld &&
r.positionLevelOld &&
r.positionNumberOld &&
r.organization &&
r.date
);
rows2.value = row;
rowsData2.value = row;
}
//
async function getData() {
showLoader();
await http
.get(config.API.retirementOut)
.then((res: any) => {
const data = res.data.result;
rows.value = data;
rowsData.value = data;
filters.value = data;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
async function clickDelete(id: string) {
dialogRemove($q, async () => {
showLoader();
await http
.delete(config.API.outByid(id))
.then(async () => {
await getData();
success($q, "ลบข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
hideLoader();
});
});
}
function openModal() {
modal.value = true;
}
function closeModal() {
modal.value = false;
}
function onSearch() {
rows.value = onSearchDataTable(
filterKeyword.value,
rowsData.value,
columns.value ? columns.value : []
);
}
onMounted(async () => {
await getData();
});
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">รายการใหออก (กจาง)</div>
<q-card flat bordered class="col-12 q-mt-sm">
<q-separator />
<div class="row q-pa-md">
<div class="col-12">
<div class="row col-12">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
@click="openModalOrder"
size="14px"
flat
round
color="primary"
icon="mdi-account-arrow-right"
>
<q-tooltip>งไปออกคำสงใหออก</q-tooltip>
</q-btn>
<q-space />
<div class="row q-col-gutter-sm">
<q-input
standout
dense
v-model="filterKeyword"
ref="filterRef"
outlined
placeholder="ค้นหา"
@keydown.enter="onSearch"
>
<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>
<div class="col-12 q-pt-sm">
<d-table
:columns="columns"
:rows="rows"
row-key="id"
:visible-columns="visibleColumns"
v-model:pagination="pagination"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-td auto-width>
<q-btn
v-if="checkPermission($route)?.attrIsGet"
flat
dense
round
color="info"
icon="mdi-eye"
@click="
router.push(
`/retirement/dismiss-order-detail/${props.row.id}`
)
"
>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
<q-btn
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
flat
dense
round
color="edit"
icon="edit"
@click="
router.push(`/retirement/dismiss-order/${props.row.id}`)
"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsDelete"
dense
flat
round
:color="
props.row.status == 'REPORT' || props.row.status == 'DONE'
? 'grey'
: 'red-7'
"
@click="clickDelete(props.row.id)"
icon="mdi-delete"
:disable="
props.row.status == 'REPORT' || props.row.status == 'DONE'
"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</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 === 'organizationPositionOld'
? 'table_ellipsis2'
: ''
"
>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</div>
</div>
</div>
</q-card>
<DialogSendToCommand
v-model:modal="modal"
:closeModal="closeModal"
v-model:rows="rows2"
v-model:rowsData="rowsData2"
v-model:filterKeyword2="filterKeyword2"
:fecthlistRecevice="getData"
/>
</template>
<style scoped lang="scss"></style>

View file

@ -121,7 +121,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "result",
align: "center",
label: "ผลการประเมิน ฯ",
label: "ผลการประเมินฯ",
sortable: false,
field: "result",
headerStyle: "font-size: 14px",
@ -464,10 +464,10 @@ function onClickViewInfo(type: string, id: string) {
-
</div>
{{
`${props.row.child4 ? props.row.child4 + "/" : ""}${
props.row.child3 ? props.row.child3 + "/" : ""
}${props.row.child2 ? props.row.child2 + "-" : ""}${
props.row.child1 ? props.row.child1 + "/" : ""
`${props.row.child4 ? props.row.child4 + " " : ""}${
props.row.child3 ? props.row.child3 + " " : ""
}${props.row.child2 ? props.row.child2 + " " : ""}${
props.row.child1 ? props.row.child1 + " " : ""
}${props.row.root ? props.row.root : ""}`
}}
</div>

View file

@ -158,7 +158,7 @@ const baseColumns = ref<QTableProps["columns"]>([
},
{
name: "remark",
align: "center",
align: "left",
label: "หมายเหตุ",
sortable: false,
field: "remark",

View file

@ -132,7 +132,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "result",
align: "center",
label: "ผลการประเมิน ฯ",
label: "ผลการประเมินฯ",
sortable: false,
field: "result",
headerStyle: "font-size: 14px",
@ -481,10 +481,10 @@ watch(
-
</div>
{{
`${props.row.child4 ? props.row.child4 + "/" : ""}${
props.row.child3 ? props.row.child3 + "/" : ""
}${props.row.child2 ? props.row.child2 + "-" : ""}${
props.row.child1 ? props.row.child1 + "/" : ""
`${props.row.child4 ? props.row.child4 + " " : ""}${
props.row.child3 ? props.row.child3 + " " : ""
}${props.row.child2 ? props.row.child2 + " " : ""}${
props.row.child1 ? props.row.child1 + " " : ""
}${props.row.root ? props.row.root : ""}`
}}
</div>

View file

@ -77,23 +77,23 @@ export const useSalaryEmployeeListSDataStore = defineStore(
},
{
id: "emp-04",
name: "แบบ ลจ.กทม.1-รายชื่อลูกจ้างผู้สมควรได้เลื่อนขั้นค่าจ้าง",
name: "แบบ ลจ. กทม. 1 - รายชื่อลูกจ้างผู้สมควรได้เลื่อนขั้นค่าจ้าง",
},
{
id: "emp-05",
name: "แบบ ลจ.กทม.1-1-รายชื่อลูกจ้างผู้สมควรได้รับค่าตอบแทนพิเศษ",
name: "แบบ ลจ. กทม. 1 - 1 - รายชื่อลูกจ้างผู้สมควรได้รับค่าตอบแทนพิเศษ",
},
{
id: "emp-06",
name: "แบบ ลจ.กทม.2-รายชื่อลูกจ้างผู้ไม่สมควรเลื่อนขั้นค่าจ้าง",
name: "แบบ ลจ. กทม. 2 - รายชื่อลูกจ้างผู้ไม่สมควรเลื่อนขั้นค่าจ้าง",
},
{
id: "emp-07",
name: "แบบ ลจ.กทม.2-1-รายชื่อลูกจ้างผู้ไม่สมควรได้รับค่าตอบแทนพิเศษ",
name: "แบบ ลจ. กทม. 2 - 1 - รายชื่อลูกจ้างผู้ไม่สมควรได้รับค่าตอบแทนพิเศษ",
},
{
id: "emp-08",
name: "แบบ ลจ.กทม.3-บัญชีแสดงวันลาในครึ่งปีของลูกจ้าง",
name: "แบบ ลจ. กทม. 3 - บัญชีแสดงวันลาในครึ่งปีของลูกจ้าง",
},
{
id: "emp-09",
@ -139,7 +139,7 @@ export const useSalaryEmployeeListSDataStore = defineStore(
},
{
id: "emp2-02",
name: "รายชื่อลูกจ้างประจำกรุงเทพมหานครผู้ครองตำแหน่ง ณ วันที่ กันยายน",
name: "รายชื่อลูกจ้างประจำกรุงเทพมหานครผู้ครองตำแหน่ง ณ วันที่ 1 กันยายน",
},
{
id: "emp2-03",
@ -147,23 +147,23 @@ export const useSalaryEmployeeListSDataStore = defineStore(
},
{
id: "emp2-04",
name: "บัญชีรายชื่อลูกจ้างประจำกรุงเทพมหานครผู้สมควรได้เลื่อนขั้นค่าจ้าง (แบบ ลจ.กทม.๑)",
name: "บัญชีรายชื่อลูกจ้างประจำกรุงเทพมหานครผู้สมควรได้เลื่อนขั้นค่าจ้าง (แบบ ลจ. กทม. 1)",
},
{
id: "emp2-05",
name: "บัญชีรายชื่อลูกจ้างประจำกรุงเทพมหานครผู้สมควรได้รับค่าตอบแทนพิเศษ (แบบ ลจ.กทม.๑/๑)",
name: "บัญชีรายชื่อลูกจ้างประจำกรุงเทพมหานครผู้สมควรได้รับค่าตอบแทนพิเศษ (แบบ ลจ. กทม. 1/1)",
},
{
id: "emp2-06",
name: "บัญชีรายชื่อลูกจ้างประจำกรุงเทพมหานครผู้ไม่สมควรเลื่อนขั้นค่าจ้าง (แบบ ลจ.กทม.๒)",
name: "บัญชีรายชื่อลูกจ้างประจำกรุงเทพมหานครผู้ไม่สมควรเลื่อนขั้นค่าจ้าง (แบบ ลจ. กทม. 2)",
},
{
id: "emp2-07",
name: "บัญชีรายชื่อลูกจ้างประจำกรุงเทพมหานครผู้ไม่สมควรได้รับค่าตอบแทนพิเศษ (แบบ ลจ.กทม.๒/๑)",
name: "บัญชีรายชื่อลูกจ้างประจำกรุงเทพมหานครผู้ไม่สมควรได้รับค่าตอบแทนพิเศษ (แบบ ลจ. กทม. 2/1)",
},
{
id: "emp2-08",
name: "บัญชีแสดงวันลาในครึ่งปีที่แล้วมาของลูกจ้างประจำกรุงเทพมหานคร (แบบ ลจ.กทม.๓)",
name: "บัญชีแสดงวันลาในครึ่งปีที่แล้วมาของลูกจ้างประจำกรุงเทพมหานคร (แบบ ลจ. กทม. 3)",
},
{
id: "emp2-09",
@ -179,11 +179,11 @@ export const useSalaryEmployeeListSDataStore = defineStore(
},
{
id: "emp2-13",
name: "บัญชีรายละเอียดแสดงการเลื่อนขั้นค่าจ้างและให้ลูกจ้างประจำกรุงเทพมหานครได้รับอัตราค่าจ้างสูงกว่า ฯ ที่เกษียณอายุราชการ ในสิ้นปีงบประมาณ (แนบท้ายคำสั่ง)",
name: "บัญชีรายละเอียดแสดงการเลื่อนขั้นค่าจ้างและให้ลูกจ้างประจำกรุงเทพมหานครได้รับอัตราค่าจ้างสูงกว่าฯ ที่เกษียณอายุราชการ ในสิ้นปีงบประมาณ (แนบท้ายคำสั่ง)",
},
{
id: "emp2-13",
name: "บัญชีรายละเอียดแสดงการเลื่อนขั้นค่าจ้างและให้ลูกจ้างประจำกรุงเทพมหานครได้รับอัตราค่าจ้างสูงกว่า ฯ ที่เกษียณอายุราชการ ในสิ้นปีงบประมาณ (แนบท้ายคำสั่ง PDF)",
name: "บัญชีรายละเอียดแสดงการเลื่อนขั้นค่าจ้างและให้ลูกจ้างประจำกรุงเทพมหานครได้รับอัตราค่าจ้างสูงกว่าฯ ที่เกษียณอายุราชการ ในสิ้นปีงบประมาณ (แนบท้ายคำสั่ง PDF)",
type: "pdf",
},
{