Merge branch 'develop' into devTee
This commit is contained in:
commit
3ccf016eca
26 changed files with 1228 additions and 336 deletions
|
|
@ -137,7 +137,7 @@ const API = {
|
|||
...file,
|
||||
};
|
||||
|
||||
const path = "http://chamomind.ddns.net:20006";
|
||||
const path = "https://bma-ehr-manual.frappet.synology.me";
|
||||
|
||||
const generatePopupPath = (routeName: any) => {
|
||||
if (routeName.includes("metadata")) {
|
||||
|
|
@ -147,19 +147,19 @@ const generatePopupPath = (routeName: any) => {
|
|||
// return `${path}/manual/chapter-3-admin-evaluate`;
|
||||
// }
|
||||
if (routeName.includes("compete")) {
|
||||
return `${path}/manual/chapter-10-admin-recruit`;
|
||||
return `${path}/manual/chapter-9-admin-recruit`;
|
||||
}
|
||||
if (routeName.includes("registryNew")) {
|
||||
return `${path}/manual/chapter-7-admin-registry`;
|
||||
return `${path}/manual/chapter-6-admin-registry`;
|
||||
}
|
||||
if (routeName.includes("registry-employee")) {
|
||||
return `${path}/manual/chapter-8-admin-registry-employee`;
|
||||
return `${path}/manual/chapter-7-admin-registry-employee`;
|
||||
}
|
||||
if (routeName.includes("qualify")) {
|
||||
return `${path}/manual/chapter-10-admin-recruit`;
|
||||
return `${path}/manual/chapter-9-admin-recruit`;
|
||||
}
|
||||
if (routeName.includes("insignia")) {
|
||||
return `${path}/manual/chapter-14-admin-insignia`;
|
||||
return `${path}/manual/chapter-13-admin-insignia`;
|
||||
}
|
||||
if (routeName.includes("acting")) {
|
||||
return `${path}/manual/chapter-5-admin-acting`;
|
||||
|
|
@ -168,37 +168,37 @@ const generatePopupPath = (routeName: any) => {
|
|||
return `${path}/manual/chapter-6-admin-position-employee`;
|
||||
}
|
||||
if (routeName.includes("resign")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
return `${path}/manual/chapter-12-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("retirement")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
return `${path}/manual/chapter-12-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("deceased")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
return `${path}/manual/chapter-12-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("exit-Interview")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
return `${path}/manual/chapter-12-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("expulsion")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
return `${path}/manual/chapter-12-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("discharged")) {
|
||||
return `${path}/manual/chapter-13-admin-retirement`;
|
||||
return `${path}/manual/chapter-12-admin-retirement`;
|
||||
}
|
||||
if (routeName.includes("discipline")) {
|
||||
return `${path}/manual/chapter-16-admin-discipline`;
|
||||
return `${path}/manual/chapter-15-admin-discipline`;
|
||||
}
|
||||
if (routeName.includes("appeal")) {
|
||||
return `${path}/manual/chapter-16-admin-discipline`;
|
||||
return `${path}/manual/chapter-15-admin-discipline`;
|
||||
}
|
||||
if (routeName.includes("evaluate")) {
|
||||
return `${path}/manual/chapter-17-admin-KPI`;
|
||||
return `${path}/manual/chapter-16-admin-KPI`;
|
||||
}
|
||||
if (routeName.includes("salary")) {
|
||||
return `${path}/manual/chapter-18-admin-salary`;
|
||||
return `${path}/manual/chapter-17-admin-salary`;
|
||||
}
|
||||
if (routeName.includes("development")) {
|
||||
return `${path}/manual/chapter-20-admin-development`;
|
||||
return `${path}/manual/chapter-19-admin-development`;
|
||||
} else {
|
||||
return manualConfig[routeName as keyof typeof manualConfig];
|
||||
}
|
||||
|
|
@ -206,53 +206,61 @@ const generatePopupPath = (routeName: any) => {
|
|||
|
||||
const manualConfig = {
|
||||
dashboard: `${path}/`,
|
||||
strategic: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
KPIIndicatorByRoleAdd: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
KPIIndicatorByPlan: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
"KPIIndicatorByPlan/Add": `${path}/manual/chapter-3-admin-evaluate`,
|
||||
KPIIndicatorByPlanByid: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
KPIIndicatorByRoleByid: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
KPICompetency: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
KPIAssignment: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
KPIAssignmentById: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
KPIIndicatorByRole: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
KPICompetencyAdd: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
KPICompetencyByid: `${path}/manual/chapter-3-admin-evaluate`,
|
||||
organizationalNew: `${path}/manual/chapter-4-admin-organization`,
|
||||
organization: `${path}/manual/chapter-7-admin-registry`,
|
||||
registry: `${path}/manual/chapter-7-admin-registry`,
|
||||
registryDetail: `${path}/manual/chapter-7-admin-registry`,
|
||||
verified: `${path}/manual/chapter-7-admin-registry`,
|
||||
order: `${path}/manual/chapter-9-admin-order`,
|
||||
OrderDetail: `${path}/manual/chapter-9-admin-order`,
|
||||
OrderAdd: `${path}/manual/chapter-9-admin-order`,
|
||||
disableperiod: `${path}/manual/chapter-10-admin-recruit`,
|
||||
manage: `${path}/manual/chapter-10-admin-recruit`,
|
||||
editorweb: `${path}/manual/chapter-10-admin-recruit`,
|
||||
manageDetaill: `${path}/manual/chapter-10-admin-recruit`,
|
||||
ExamForm: `${path}/manual/chapter-10-admin-recruit`,
|
||||
Payment: `${path}/manual/chapter-10-admin-recruit`,
|
||||
placement: `${path}/manual/chapter-11-admin-appointment`,
|
||||
transfer: `${path}/manual/chapter-11-admin-appointment`,
|
||||
receive: `${path}/manual/chapter-11-admin-appointment`,
|
||||
"help-government": `${path}/manual/chapter-11-admin-appointment`,
|
||||
repatriate: `${path}/manual/chapter-11-admin-appointment`,
|
||||
"appoint-promote": `${path}/manual/chapter-11-admin-appointment`,
|
||||
"appoint-employee": `${path}/manual/chapter-11-admin-appointment`,
|
||||
other: `${path}/manual/chapter-11-admin-appointment`,
|
||||
probation: `${path}/manual/chapter-12-admin-probation`,
|
||||
retirement: `${path}/manual/chapter-13-admin-retirement`,
|
||||
resign: `${path}/manual/chapter-13-admin-retirement`,
|
||||
ExitInterviewEditQuestion: `${path}/manual/chapter-13-admin-retirement`,
|
||||
"dismiss-order": `${path}/manual/chapter-13-admin-retirement`,
|
||||
"report-report": `${path}/manual/chapter-14-admin-insignia`,
|
||||
"report-report-01": `${path}/manual/chapter-14-admin-insignia`,
|
||||
appealComplain: `${path}/manual/chapter-16-admin-discipline`,
|
||||
KPIRound: `${path}/manual/chapter-19-admin-perf-evaluation`,
|
||||
"KPIList": `${path}/manual/chapter-19-admin-perf-evaluation`,
|
||||
KPIDetail: `${path}/manual/chapter-19-admin-perf-evaluation`,
|
||||
KPIReport: `${path}/manual/chapter-19-admin-perf-evaluation`,
|
||||
KPIDetailnew: `${path}/manual/chapter-19-admin-perf-evaluation`,
|
||||
strategic: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
KPIIndicatorByRoleAdd: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
KPIIndicatorByPlan: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
"KPIIndicatorByPlan/Add": `${path}/manual/chapter-2-admin-evaluate`,
|
||||
KPIIndicatorByPlanByid: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
KPIIndicatorByRoleByid: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
KPICompetency: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
KPIAssignment: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
KPIAssignmentById: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
KPIIndicatorByRole: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
KPICompetencyAdd: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
KPICompetencyByid: `${path}/manual/chapter-2-admin-evaluate`,
|
||||
organizationalNew: `${path}/manual/chapter-3-admin-organization`,
|
||||
organization: `${path}/manual/chapter-6-admin-registry`,
|
||||
registry: `${path}/manual/chapter-6-admin-registry`,
|
||||
registryDetail: `${path}/manual/chapter-6-admin-registry`,
|
||||
verified: `${path}/manual/chapter-6-admin-registry`,
|
||||
order: `${path}/manual/chapter-8-admin-order`,
|
||||
OrderDetail: `${path}/manual/chapter-8-admin-order`,
|
||||
OrderAdd: `${path}/manual/chapter-8-admin-order`,
|
||||
disableperiod: `${path}/manual/chapter-9-admin-recruit`,
|
||||
manage: `${path}/manual/chapter-9-admin-recruit`,
|
||||
editorweb: `${path}/manual/chapter-9-admin-recruit`,
|
||||
manageDetaill: `${path}/manual/chapter-9-admin-recruit`,
|
||||
ExamForm: `${path}/manual/chapter-9-admin-recruit`,
|
||||
Payment: `${path}/manual/chapter-9-admin-recruit`,
|
||||
placement: `${path}/manual/chapter-10-admin-appointment`,
|
||||
transfer: `${path}/manual/chapter-10-admin-appointment`,
|
||||
receive: `${path}/manual/chapter-10-admin-appointment`,
|
||||
"help-government": `${path}/manual/chapter-10-admin-appointment`,
|
||||
repatriate: `${path}/manual/chapter-10-admin-appointment`,
|
||||
"appoint-promote": `${path}/manual/chapter-10-admin-appointment`,
|
||||
"appoint-employee": `${path}/manual/chapter-10-admin-appointment`,
|
||||
other: `${path}/manual/chapter-10-admin-appointment`,
|
||||
probation: `${path}/manual/chapter-11-admin-probation`,
|
||||
retirement: `${path}/manual/chapter-12-admin-retirement`,
|
||||
resign: `${path}/manual/chapter-12-admin-retirement`,
|
||||
ExitInterviewEditQuestion: `${path}/manual/chapter-12-admin-retirement`,
|
||||
"dismiss-order": `${path}/manual/chapter-12-admin-retirement`,
|
||||
"report-report": `${path}/manual/chapter-13-admin-insignia`,
|
||||
"report-report-01": `${path}/manual/chapter-13-admin-insignia`,
|
||||
roundTime: `${path}/manual/chapter-14-admin-leave`,
|
||||
changeRound: `${path}/manual/chapter-14-admin-leave`,
|
||||
workList: `${path}/manual/chapter-14-admin-leave`,
|
||||
timestampSpecial: `${path}/manual/chapter-14-admin-leave`,
|
||||
leave: `${path}/manual/chapter-14-admin-leave`,
|
||||
leaveDetail: `${path}/manual/chapter-14-admin-leave`,
|
||||
leaveRejectDetail: `${path}/manual/chapter-14-admin-leave`,
|
||||
leaveReport: `${path}/manual/chapter-14-admin-leave`,
|
||||
appealComplain: `${path}/manual/chapter-15-admin-discipline`,
|
||||
KPIRound: `${path}/manual/chapter-18-admin-perf-evaluation`,
|
||||
"KPIList": `${path}/manual/chapter-18-admin-perf-evaluation`,
|
||||
KPIDetail: `${path}/manual/chapter-18-admin-perf-evaluation`,
|
||||
KPIReport: `${path}/manual/chapter-18-admin-perf-evaluation`,
|
||||
KPIDetailnew: `${path}/manual/chapter-18-admin-perf-evaluation`,
|
||||
};
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -137,7 +137,9 @@ const columnsHistory = ref<QTableColumn[]>([
|
|||
field: "birthDate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => date2Thai(v),
|
||||
format: (v) => {
|
||||
return v ? date2Thai(v) : "";
|
||||
},
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
|
|
@ -265,17 +267,15 @@ async function getData() {
|
|||
showLoader();
|
||||
http
|
||||
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
|
||||
.then(async (res) => {
|
||||
informaData.value = await res.data.result;
|
||||
if (informaData.value) {
|
||||
id.value = informaData.value.id;
|
||||
.then((res) => {
|
||||
informaData.value = res.data.result;
|
||||
id.value = res.data.result.id;
|
||||
|
||||
if (informaData.value.birthDate) {
|
||||
console.log("birthDate===>", informaData.value.birthDate);
|
||||
if (res.data.result.birthDate) {
|
||||
console.log("birthDate===>", res.data.result.birthDate);
|
||||
|
||||
age.value = calculateAge(informaData.value.birthDate);
|
||||
console.log("age===>", age.value);
|
||||
}
|
||||
age.value = calculateAge(res.data.result.birthDate);
|
||||
console.log("age===>", age.value);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
|
|
@ -87,8 +87,6 @@ const onCancel = async () => {
|
|||
`ข้อมูลมีการแก้ไข`,
|
||||
`ยืนยันยกเลิกการแก้ไขใช่หรือไม่?`
|
||||
);
|
||||
|
||||
|
||||
} else {
|
||||
edit.value = false;
|
||||
}
|
||||
|
|
@ -252,7 +250,6 @@ const getClass = (val: boolean) => {
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
function checkEdit() {
|
||||
onEdit.value = true;
|
||||
}
|
||||
|
|
@ -470,7 +467,6 @@ function checkEdit() {
|
|||
:class="getClass(edit)"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก หมู่เลือด'}`]"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -556,10 +552,6 @@ function checkEdit() {
|
|||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="informaData.telephone"
|
||||
:rules="[
|
||||
(val:string) => !!val || `${'กรุณากรอก เบอร์โทร'}`,
|
||||
(val:string) => val.length >= 10 || `${'กรุณากรอกข้อมูลเบอร์โทรให้ครบ'}`,
|
||||
]"
|
||||
:label="`${'เบอร์โทร'}`"
|
||||
mask="##########"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -135,8 +135,8 @@ const totalList = ref<number>(0);
|
|||
|
||||
// fecth profile
|
||||
const fecthProfile = async () => {
|
||||
showLoader();
|
||||
if (props?.dataProfile?.type === "OFFICER") {
|
||||
showLoader();
|
||||
formPagePersonList.keyword =
|
||||
formPagePersonList.keyword === null ? "" : formPagePersonList.keyword;
|
||||
await http
|
||||
|
|
@ -154,7 +154,9 @@ const fecthProfile = async () => {
|
|||
fullname: e.prefix + e.firstName + " " + e.lastName,
|
||||
position: e.position,
|
||||
level:
|
||||
e.posTypeName && e.posLevelName ? e.posTypeName + " (" + e.posLevelName + ")" : "-",
|
||||
e.posTypeName && e.posLevelName
|
||||
? e.posTypeName + " (" + e.posLevelName + ")"
|
||||
: "-",
|
||||
organizationOrganization: findOrgChildName(e),
|
||||
}));
|
||||
})
|
||||
|
|
@ -187,9 +189,7 @@ const fecthProfile = async () => {
|
|||
fullname: e.prefix + e.firstName + " " + e.lastName,
|
||||
position: e.position,
|
||||
level:
|
||||
e.posType && e.posLevel
|
||||
? e.posType + " (" + e.posLevel + ")"
|
||||
: "-",
|
||||
e.posType && e.posLevel ? e.posType + " (" + e.posLevel + ")" : "-",
|
||||
organizationOrganization: findOrgName(e),
|
||||
}));
|
||||
})
|
||||
|
|
|
|||
|
|
@ -636,12 +636,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
}}{{ props.row.firstName ? props.row.firstName : "" }}
|
||||
{{ props.row.lastName ? props.row.lastName : "" }}</q-td
|
||||
>
|
||||
<!-- <q-td
|
||||
class="table_ellipsis"
|
||||
key="organizationOrganization"
|
||||
:props="props"
|
||||
>{{ props.row.organizationOrganization }}</q-td
|
||||
> -->
|
||||
|
||||
<q-td key="position" :props="props">{{
|
||||
props.row.position ? props.row.position : "-"
|
||||
}}</q-td>
|
||||
|
|
@ -697,7 +692,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
flat
|
||||
round
|
||||
color="primary"
|
||||
icon="mdi-pencil"
|
||||
:icon="props.row.remove === 'EDIT' ? 'info' : 'mdi-pencil'"
|
||||
dense
|
||||
@click.stop="
|
||||
(modalNote = true),
|
||||
|
|
@ -724,7 +719,7 @@ function updatemodalPersonal(modal: boolean) {
|
|||
flat
|
||||
round
|
||||
class="text-red-14"
|
||||
icon="mdi-delete"
|
||||
:icon="props.row.remove === 'REMOVE' ? 'info' : 'mdi-delete'"
|
||||
dense
|
||||
@click.stop="
|
||||
(modalNote = true),
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
|||
(DataMainOrigOrder.value = val);
|
||||
|
||||
const DataUpdateOrder = (
|
||||
filter_1: string,
|
||||
filter_1: string | null,
|
||||
filter_2: string,
|
||||
filterYear: number | null
|
||||
) => {
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ const fiscalYearFilter = async () => {
|
|||
};
|
||||
|
||||
// รายการข้อมูลประเภทคำสั่ง
|
||||
const OrderType = ref<string>("");
|
||||
const OrderType = ref<string | null>("");
|
||||
const OrderTypeFilter1 = ref<any>([]);
|
||||
const OrderTypeOption = ref<DataOption1[]>([{ id: "", name: "ทั้งหมด" }]);
|
||||
|
||||
|
|
@ -278,6 +278,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
|||
switch (refData) {
|
||||
case "fiscalyearOP":
|
||||
update(() => {
|
||||
fiscalyear.value = null;
|
||||
fiscalyearOP.value = fiscalyearFilter1.value.filter(
|
||||
(v: any) => v.name.indexOf(val) > -1
|
||||
);
|
||||
|
|
@ -285,6 +286,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
|||
break;
|
||||
case "OrderTypeOption":
|
||||
update(() => {
|
||||
OrderType.value = null;
|
||||
OrderTypeOption.value = OrderTypeFilter1.value.filter(
|
||||
(v: any) => v.name.indexOf(val) > -1
|
||||
);
|
||||
|
|
@ -292,6 +294,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
|||
break;
|
||||
case "OrderStatusOption":
|
||||
update(() => {
|
||||
OrderStatus.value = "";
|
||||
OrderStatusOption.value = OrderStatusFilter1.value.filter(
|
||||
(v: any) => v.name.indexOf(val) > -1
|
||||
);
|
||||
|
|
@ -342,6 +345,17 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
<template v-if="fiscalyear !== 0" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(fiscalyearOP = fiscalyearFilter1),
|
||||
(fiscalyear = 0),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-select>
|
||||
<!-- use-input -->
|
||||
<div>
|
||||
|
|
@ -427,6 +441,17 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
<template v-if="OrderType !== ''" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(OrderTypeOption = OrderTypeFilter1),
|
||||
(OrderType = ''),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
|
|
@ -458,6 +483,17 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
<template v-if="OrderStatus !== 'ทั้งหมด'" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(OrderStatusOption = OrderStatusFilter1),
|
||||
(OrderStatus = 'ทั้งหมด'),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
<q-space />
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export const useOrderStore = defineStore("DisciplineOrder", () => {
|
|||
}
|
||||
|
||||
function filterListOrder(
|
||||
filter_1: string,
|
||||
filter_1: string | null,
|
||||
filter_2: string,
|
||||
filterYear: number | null
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -131,14 +131,14 @@ const fecthTypeOption = async (actions: string) => {
|
|||
name: e.name,
|
||||
category: e.category,
|
||||
commandCode: e.commandCode,
|
||||
fullname: e.commandCode + " " + e.name,
|
||||
fullname: e.name,
|
||||
}));
|
||||
typeOrderFilter.value = data.map((e: OrederResult) => ({
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
category: e.category,
|
||||
commandCode: e.commandCode,
|
||||
fullname: e.commandCode + " " + e.name,
|
||||
fullname: e.name,
|
||||
}));
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -455,7 +455,6 @@ function fetchSalaryRound() {
|
|||
v-model="command"
|
||||
hide-bottom-space
|
||||
:label="`${'คำสั่งเลขที่'}`"
|
||||
|
||||
/>
|
||||
</div>
|
||||
<label class="col-1 flex justify-center items-center text-bold"
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ const saveUpload = () => {
|
|||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await postfileOrder();
|
||||
if (attachmentStatus.value) {
|
||||
if (fileTailer.value) {
|
||||
await postfileTailer();
|
||||
}
|
||||
await fetchAttachment(orderId.value);
|
||||
|
|
|
|||
189
src/modules/13_salary/components/DialogInfoMain.vue
Normal file
189
src/modules/13_salary/components/DialogInfoMain.vue
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/**
|
||||
* importCOmponents
|
||||
*/
|
||||
import InfoSalary from "@/modules/13_salary/components/InfoSalary.vue";
|
||||
import InfoDiscipline from "@/modules/13_salary/components/InfoDiscipline.vue";
|
||||
import InfoLeave from "@/modules/13_salary/components/InfoLeave.vue";
|
||||
|
||||
/**
|
||||
* importStore
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const profileId = defineModel<string>("profileId", { required: true });
|
||||
const props = defineProps({
|
||||
type: { type: String, default: "" },
|
||||
employeeClass: { type: String, default: "" },
|
||||
});
|
||||
|
||||
/**
|
||||
* ตัวแปร
|
||||
*/
|
||||
const avatar = ref<string>("");
|
||||
const fullName = ref<string>("");
|
||||
const position = ref<string>("");
|
||||
|
||||
/**
|
||||
* function เรียกข้อมูลส่วนตัว
|
||||
*/
|
||||
function fetchInformation() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.orgProfileById(profileId.value, props.employeeClass))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
fullName.value = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||
position.value = data.position;
|
||||
if (data.avatarName) {
|
||||
fetchProfile(data.id as string, data.avatarName);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function fetch รูปโปรไฟล์
|
||||
* @param id profileId
|
||||
* @param avatarName ชื้อไฟล์
|
||||
*/
|
||||
function fetchProfile(id: string, avatarName: string) {
|
||||
http
|
||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName))
|
||||
.then(async (res) => {
|
||||
avatar.value = res.data.downloadUrl;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function rediract ไปทะเบียนประวัติ
|
||||
*/
|
||||
function redirecToRegistry() {
|
||||
router.push(`/registry-new${props.employeeClass}/${profileId.value}`);
|
||||
modal.value = false;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => modal.value,
|
||||
async () => {
|
||||
modal.value && fetchInformation();
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="modal" position="right" :maximized="true">
|
||||
<q-card style="width: 1300px; overflow: visible">
|
||||
<q-toolbar>
|
||||
<q-space />
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="modal = false"
|
||||
style="color: red; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-card-section class="col q-pt-none bg-grey-12" style="height: 100%">
|
||||
<div class="q-gutter-md">
|
||||
<q-card bordered class="text-center bg-grey-12">
|
||||
<div class="q-mt-md">
|
||||
<q-avatar size="120px" color="grey-4">
|
||||
<img
|
||||
v-if="avatar"
|
||||
:src="avatar"
|
||||
class="bg-grey-3"
|
||||
style="object-fit: cover"
|
||||
/>
|
||||
<img
|
||||
src="@/assets/avatar_user.jpg"
|
||||
class="bg-grey-3"
|
||||
style="object-fit: cover"
|
||||
/>
|
||||
</q-avatar>
|
||||
</div>
|
||||
<div
|
||||
class="q-mt-md text-subtitle2 text-bold"
|
||||
style="font-size: 18px"
|
||||
>
|
||||
{{ fullName }}
|
||||
</div>
|
||||
|
||||
<div class="q-mb-xs text-center text-grey" v-if="position">
|
||||
{{ position }}
|
||||
</div>
|
||||
<div class="q-mt-md">
|
||||
<q-btn
|
||||
class="bg-white"
|
||||
outline
|
||||
rounded
|
||||
label="ดูรายละเอียดเพิ่มเติมทั้งหมด"
|
||||
color="secondary"
|
||||
@click.prevent="redirecToRegistry"
|
||||
/>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-scroll-area style="height: 65vh; max-width: 100%">
|
||||
<div class="q-gutter-md q-pa-sm">
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
<q-card-section>
|
||||
<div class="text-weight-bold row items-center">
|
||||
<span class="q-ml-md">
|
||||
{{
|
||||
type === "posSalary"
|
||||
? "ข้อมูลเงินเดือน / ค่าจ้าง"
|
||||
: type === "discipline"
|
||||
? "ข้อมูลวินัย"
|
||||
: "ข้อมูลการลา"
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<InfoSalary
|
||||
v-if="type === 'posSalary'"
|
||||
v-model:profileId="profileId"
|
||||
:employeeClass="employeeClass"
|
||||
/>
|
||||
<InfoDiscipline
|
||||
v-if="type === 'discipline'"
|
||||
v-model:profileId="profileId"
|
||||
:employeeClass="employeeClass"
|
||||
/>
|
||||
<InfoLeave
|
||||
v-if="type === 'leave'"
|
||||
v-model:profileId="profileId"
|
||||
:employeeClass="employeeClass"
|
||||
/>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-scroll-area>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
194
src/modules/13_salary/components/InfoDiscipline.vue
Normal file
194
src/modules/13_salary/components/InfoDiscipline.vue
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
/**
|
||||
* importType
|
||||
*/
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataDiscipline } from "@/modules/13_salary/interface/response/Main";
|
||||
|
||||
/**
|
||||
* importStore
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const $q = useQuasar();
|
||||
const { date2Thai, showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
|
||||
const profileId = defineModel<string>("profileId", { required: true });
|
||||
const employeeClass = defineModel<string>("employeeClass", { required: true });
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
const keyword = ref<string>("");
|
||||
const rows = ref<DataDiscipline[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "date",
|
||||
align: "left",
|
||||
label: "วัน เดือน ปี",
|
||||
sortable: true,
|
||||
field: "date",
|
||||
format: (v) => date2Thai(v),
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "detail",
|
||||
align: "left",
|
||||
label: "รายละเอียด",
|
||||
sortable: true,
|
||||
field: "detail",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "level",
|
||||
align: "left",
|
||||
label: "ระดับการลงโทษทางวินัย",
|
||||
sortable: true,
|
||||
field: "level",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "unStigma",
|
||||
align: "left",
|
||||
label: "ประเภทคำสั่ง",
|
||||
sortable: true,
|
||||
field: "unStigma",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "refCommandNo",
|
||||
align: "left",
|
||||
label: "เลขที่คำสั่ง",
|
||||
sortable: true,
|
||||
field: "refCommandNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "refCommandDate",
|
||||
align: "left",
|
||||
label: "เอกสารอ้างอิง (ลงวันที่)",
|
||||
sortable: true,
|
||||
field: "refCommandDate",
|
||||
format: (v) => date2Thai(v),
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"level",
|
||||
"detail",
|
||||
"unStigma",
|
||||
"refCommandNo",
|
||||
"refCommandDate",
|
||||
"date",
|
||||
]);
|
||||
|
||||
/**
|
||||
* function fetch ข้อมูลวินัย
|
||||
*/
|
||||
function fetchListDiscipline() {
|
||||
showLoader();
|
||||
http
|
||||
.get(
|
||||
config.API.profileNewDisciplineByProfileId(
|
||||
profileId.value,
|
||||
employeeClass.value
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchListDiscipline();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-card-section>
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-space />
|
||||
<q-input dense outlined v-model="keyword" label="ค้นหา" class="q-mr-sm">
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="keyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-else
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="keyword = ''"
|
||||
/>
|
||||
</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"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
ref="table"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
:filter="keyword"
|
||||
:paging="true"
|
||||
:rows-per-page-options="[20, 50, 100]"
|
||||
:visible-columns="visibleColumns"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<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" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
219
src/modules/13_salary/components/InfoLeave.vue
Normal file
219
src/modules/13_salary/components/InfoLeave.vue
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
/**
|
||||
* importType
|
||||
*/
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataLeave } from "@/modules/13_salary/interface/response/Main";
|
||||
|
||||
/**
|
||||
* importStore
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const $q = useQuasar();
|
||||
const { date2Thai, showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
|
||||
const profileId = defineModel<string>("profileId", { required: true });
|
||||
const employeeClass = defineModel<string>("employeeClass", { required: true });
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
const keyword = ref<string>("");
|
||||
const rows = ref<DataLeave[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
align: "left",
|
||||
label: "ลำดับ",
|
||||
sortable: false,
|
||||
field: "no",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
field: (row) => rows.value.indexOf(row) + 1,
|
||||
},
|
||||
{
|
||||
name: "leaveType",
|
||||
align: "left",
|
||||
label: "ประเภทการลา",
|
||||
sortable: true,
|
||||
field: "leaveType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
field: (row) => row.leaveType.name,
|
||||
},
|
||||
{
|
||||
name: "dateLeave",
|
||||
align: "left",
|
||||
label: "วัน เดือน ปี ที่ลา",
|
||||
sortable: true,
|
||||
field: "dateLeave",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
field: (row) => dateThaiRange([row.dateLeaveStart, row.dateLeaveEnd]),
|
||||
},
|
||||
{
|
||||
name: "leaveDays",
|
||||
align: "left",
|
||||
label: "จำนวนวันลา",
|
||||
sortable: true,
|
||||
field: "leaveDays",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "status",
|
||||
align: "left",
|
||||
label: "สถานะ",
|
||||
sortable: true,
|
||||
field: "status",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => convertStatus(v),
|
||||
},
|
||||
{
|
||||
name: "reason",
|
||||
align: "left",
|
||||
label: "เหตุผล",
|
||||
sortable: true,
|
||||
field: "reason",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"leaveType",
|
||||
"dateLeave",
|
||||
"leaveDays",
|
||||
"status",
|
||||
"reason",
|
||||
]);
|
||||
|
||||
/**
|
||||
* function fetch ข้อมูลการลา
|
||||
*/
|
||||
function fetchListSalary() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileNewLeaveById(profileId.value, employeeClass.value))
|
||||
.then((res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* แปลงช่วงวันที่ถ้า2ค่าเป็นวันเดียวกันจะโชววันเดียวแต่ถ้าไม่เท่ากันจะแสดงเป็นช่วง
|
||||
* @param val ช่วงวันที่
|
||||
*/
|
||||
function dateThaiRange(val: [Date, Date]) {
|
||||
if (val === null) {
|
||||
} else if (date2Thai(val[0]) === date2Thai(val[1])) {
|
||||
return `${date2Thai(val[0])}`;
|
||||
} else {
|
||||
return `${date2Thai(val[0])} - ${date2Thai(val[1])} `;
|
||||
}
|
||||
}
|
||||
|
||||
function convertStatus(val: string) {
|
||||
switch (val) {
|
||||
case "waitting":
|
||||
return "รออนุมัติ";
|
||||
case "reject":
|
||||
return "ไม่ผ่านการอนุมัติ";
|
||||
case "approve":
|
||||
return "ผ่านการอนุมัติ";
|
||||
case "cancel":
|
||||
return "ยกเลิก";
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchListSalary();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-card-section>
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-space />
|
||||
<q-input dense outlined v-model="keyword" label="ค้นหา" class="q-mr-sm">
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="keyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-else
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="keyword = ''"
|
||||
/>
|
||||
</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"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
ref="table"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
:filter="keyword"
|
||||
:paging="true"
|
||||
:rows-per-page-options="[20, 50, 100]"
|
||||
:visible-columns="visibleColumns"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<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" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
237
src/modules/13_salary/components/InfoSalary.vue
Normal file
237
src/modules/13_salary/components/InfoSalary.vue
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
/**
|
||||
* importType
|
||||
*/
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataPosSalary } from "@/modules/13_salary/interface/response/Main";
|
||||
|
||||
/**
|
||||
* importStore
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const $q = useQuasar();
|
||||
const { date2Thai, showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
|
||||
const profileId = defineModel<string>("profileId", { required: true });
|
||||
const employeeClass = defineModel<string>("employeeClass", { required: true });
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
const keyword = ref<string>("");
|
||||
const rows = ref<DataPosSalary[]>([]);
|
||||
const baseColumns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "date",
|
||||
align: "left",
|
||||
label: "วัน เดือน ปี",
|
||||
sortable: true,
|
||||
field: "date",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => date2Thai(v),
|
||||
},
|
||||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
label:
|
||||
employeeClass.value === "-employee" ? "ค่าตอบแทนรายเดือน" : "เงินเดือน",
|
||||
sortable: true,
|
||||
field: "amount",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => Number(v).toLocaleString(),
|
||||
},
|
||||
{
|
||||
name: "positionSalaryAmount",
|
||||
align: "left",
|
||||
label: "เงินประจำตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "positionSalaryAmount",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => Number(v).toLocaleString(),
|
||||
},
|
||||
{
|
||||
name: "mouthSalaryAmount",
|
||||
align: "left",
|
||||
label: "เงินค่าตอบแทนรายเดือน",
|
||||
sortable: true,
|
||||
field: "mouthSalaryAmount",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => Number(v).toLocaleString(),
|
||||
},
|
||||
|
||||
{
|
||||
name: "posNo",
|
||||
align: "left",
|
||||
label: "ตำแหน่งเลขที่",
|
||||
sortable: true,
|
||||
field: "posNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
{
|
||||
name: "positionType",
|
||||
align: "left",
|
||||
label: "ประเภทตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "positionType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "positionLevel",
|
||||
align: "left",
|
||||
label: "ระดับ",
|
||||
sortable: true,
|
||||
field: "positionLevel",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
{
|
||||
name: "templateDoc",
|
||||
align: "left",
|
||||
label: "เอกสารอ้างอิง",
|
||||
sortable: true,
|
||||
field: "templateDoc",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "refCommandNo",
|
||||
align: "left",
|
||||
label: "เลขที่คำสั่ง",
|
||||
sortable: true,
|
||||
field: "refCommandNo",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const columns = computed(() => {
|
||||
if (employeeClass.value === "-employee") {
|
||||
if (baseColumns.value) {
|
||||
return baseColumns.value.filter(
|
||||
(column) =>
|
||||
column.name !== "positionSalaryAmount" &&
|
||||
column.name !== "mouthSalaryAmount"
|
||||
);
|
||||
}
|
||||
}
|
||||
return baseColumns.value;
|
||||
});
|
||||
const visibleColumns = ref<string[]>([
|
||||
"date",
|
||||
"amount",
|
||||
"positionSalaryAmount",
|
||||
"mouthSalaryAmount",
|
||||
"posNo",
|
||||
"positionType",
|
||||
"positionLevel",
|
||||
"templateDoc",
|
||||
"refCommandNo",
|
||||
]);
|
||||
|
||||
/**
|
||||
* function fetch ข้อมูลเงินเดือน / ค่าจ้าง
|
||||
*/
|
||||
function fetchListSalary() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileListSalaryNew(profileId.value, employeeClass.value))
|
||||
.then((res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchListSalary();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-card-section>
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-space />
|
||||
<q-input dense outlined v-model="keyword" label="ค้นหา" class="q-mr-sm">
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="keyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-else
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="keyword = ''"
|
||||
/>
|
||||
</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"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
ref="table"
|
||||
row-key="id"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
:filter="keyword"
|
||||
:paging="true"
|
||||
:rows-per-page-options="[20, 50, 100]"
|
||||
:visible-columns="visibleColumns"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<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" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -122,7 +122,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
label: "เงินเดือนฐาน",
|
||||
label: "ค่าจ้างฐาน",
|
||||
sortable: false,
|
||||
field: "amount",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -141,7 +141,7 @@ const baseColumns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "positionSalaryAmount",
|
||||
align: "left",
|
||||
label: "เงินเดือนหลังเลื่อน",
|
||||
label: "ค่าจ้างหลังเลื่อน",
|
||||
sortable: false,
|
||||
field: "positionSalaryAmount",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -201,15 +201,15 @@ const modalDialogMoveLeve = ref<boolean>(false);
|
|||
const profileId = ref<string>("");
|
||||
const amount = ref<number>(0);
|
||||
|
||||
/** function openPopup เพิ่มคนเลื่อนเงินเดือน*/
|
||||
/** function openPopup เพิ่มคนเลื่อนค่าจ้าง*/
|
||||
function onClickAddPerson() {
|
||||
modalDialogAddPerson.value = !modalDialogAddPerson.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* function openPopup แก้ไขเงินเดือน
|
||||
* function openPopup แก้ไขค่าจ้าง
|
||||
* @param id profileId
|
||||
* @param amountSalary จำนวนเงินเดือน
|
||||
* @param amountSalary จำนวนค่าจ้าง
|
||||
*
|
||||
*/
|
||||
function onClickEdit(id: string, amountSalary: number) {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import DialogFormEdit from "@/modules/13_salary/components/SalaryEmployeeLists/D
|
|||
import DialogMoveGroup from "@/modules/13_salary/components/SalaryEmployeeLists/DialogMoveGroup.vue";
|
||||
import DialogMoveLevel from "@/modules/13_salary/components/SalaryEmployeeLists/DialogMoveLevel.vue";
|
||||
import DialogProperties from "@/modules/13_salary/components/SalaryEmployeeLists/DialogProperties.vue";
|
||||
import DialogInfo from "@/modules/13_salary/components/DialogInfoMain.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -113,7 +114,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
label: "เงินเดือน",
|
||||
label: "ค่าจ้าง",
|
||||
field: "amount",
|
||||
sortable: true,
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -137,24 +138,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "duration",
|
||||
align: "center",
|
||||
label: "ระยะเวลาการปฏิบัติราชการในรอบครึ่งปี",
|
||||
sortable: false,
|
||||
field: "duration",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "isPunish",
|
||||
align: "center",
|
||||
label: "ไม่ถูกลงโทษทางวินัย",
|
||||
sortable: false,
|
||||
field: "isPunish",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "isSuspension",
|
||||
align: "center",
|
||||
|
|
@ -165,20 +148,29 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "isAbsent",
|
||||
name: "posSalary",
|
||||
align: "center",
|
||||
label: "ไม่ขาดราชการ",
|
||||
label: "ประวัติตำแหน่ง/ค่าจ้าง",
|
||||
sortable: false,
|
||||
field: "isAbsent",
|
||||
field: "posSalary",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "isLeave",
|
||||
name: "discipline",
|
||||
align: "center",
|
||||
label: "วันลาไม่เกิน",
|
||||
label: "วินัย",
|
||||
sortable: false,
|
||||
field: "isLeave",
|
||||
field: "discipline",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "leave",
|
||||
align: "center",
|
||||
label: "การลา",
|
||||
sortable: false,
|
||||
field: "leave",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -192,13 +184,12 @@ const visibleColumns = ref<string[]>([
|
|||
"amount",
|
||||
"organization",
|
||||
"result",
|
||||
"duration",
|
||||
"isPunish",
|
||||
"isSuspension",
|
||||
"isAbsent",
|
||||
"isLeave",
|
||||
"group",
|
||||
"salaryLevel",
|
||||
"posSalary",
|
||||
"discipline",
|
||||
"leave",
|
||||
]);
|
||||
|
||||
/** modalDialog*/
|
||||
|
|
@ -207,6 +198,7 @@ const modalDialogForm = ref<boolean>(false);
|
|||
const modalDialogMoveGroup = ref<boolean>(false);
|
||||
const modalDialogMoveLeve = ref<boolean>(false);
|
||||
const modalDialogProperties = ref<boolean>(false);
|
||||
const modalDialogInfo = ref<boolean>(false);
|
||||
|
||||
/** ตัวแปร*/
|
||||
const profileId = ref<string>("");
|
||||
|
|
@ -237,15 +229,15 @@ function onClickDelete(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/** function openPopup เพิ่มคนเลื่อนเงินเดือน*/
|
||||
/** function openPopup เพิ่มคนเลื่อนค่าจ้าง*/
|
||||
function onClickAddPerson() {
|
||||
modalDialogAddPerson.value = !modalDialogAddPerson.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* function openPopup แก้ไขเงินเดือน
|
||||
* function openPopup แก้ไขค่าจ้าง
|
||||
* @param id profileId
|
||||
* @param amountSalary จำนวนเงินเดือน
|
||||
* @param amountSalary จำนวนค่าจ้าง
|
||||
*
|
||||
*/
|
||||
function onClickEdit(id: string, amountSalary: number) {
|
||||
|
|
@ -311,6 +303,13 @@ watch(
|
|||
updatePagePagination();
|
||||
}
|
||||
);
|
||||
|
||||
const infoType = ref<string>("");
|
||||
function onClickViewInfo(type: string, id: string) {
|
||||
infoType.value = type;
|
||||
profileId.value = id;
|
||||
modalDialogInfo.value = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -410,58 +409,7 @@ watch(
|
|||
}${props.row.root ? props.row.root : ""}`
|
||||
}}
|
||||
</div>
|
||||
<!-- <div v-else-if="col.name === 'isResult'">
|
||||
<q-checkbox
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="props.row.isResult"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="col.name === 'isDuration'">
|
||||
<q-checkbox
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="props.row.isDuration"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="col.name === 'isPunish'">
|
||||
<q-checkbox
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="props.row.isPunish"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="col.name === 'isRetired'">
|
||||
<q-checkbox
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="props.row.isRetired"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="col.name === 'isRetired2'">
|
||||
<q-checkbox
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="props.row.isRetired2"
|
||||
false
|
||||
/>
|
||||
</div> -->
|
||||
<div v-else-if="col.name == 'isPunish'">
|
||||
<q-icon
|
||||
v-if="props.row.isPunish !== null"
|
||||
:name="props.row.isPunish ? 'done' : 'close'"
|
||||
:color="props.row.isPunish ? 'primary' : 'red'"
|
||||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isPunish == null">
|
||||
{{ props.row.isPunish == null ? "-" : "" }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'isSuspension'">
|
||||
<q-icon
|
||||
v-if="props.row.isSuspension !== null"
|
||||
|
|
@ -473,31 +421,30 @@ watch(
|
|||
{{ props.row.isSuspension == null ? "-" : "" }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'isAbsent'">
|
||||
<q-icon
|
||||
v-if="props.row.isAbsent !== null"
|
||||
:name="props.row.isAbsent ? 'done' : 'close'"
|
||||
:color="props.row.isAbsent ? 'primary' : 'red'"
|
||||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isAbsent == null">
|
||||
{{ props.row.isAbsent == null ? "-" : "" }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'amount'">
|
||||
{{ Number(props.row.amount).toLocaleString() }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'isLeave'">
|
||||
<q-icon
|
||||
v-if="props.row.isLeave !== null"
|
||||
:name="props.row.isLeave ? 'done' : 'close'"
|
||||
:color="props.row.isLeave ? 'primary' : 'red'"
|
||||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isLeave == null">
|
||||
{{ props.row.isLeave == null ? "-" : "" }}
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-else-if="
|
||||
col.name == 'posSalary' ||
|
||||
col.name == 'discipline' ||
|
||||
col.name == 'leave'
|
||||
"
|
||||
>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
icon="info"
|
||||
class="q-pa-none q-ml-xs"
|
||||
color="info"
|
||||
size="12px"
|
||||
@click.pervent="onClickViewInfo(col.name, props.row.profileId)"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
@ -593,6 +540,7 @@ watch(
|
|||
v-model:modal="modalDialogMoveLeve"
|
||||
v-model:profileId="profileId"
|
||||
:fetchData="props.fetchDataTable"
|
||||
:remark="''"
|
||||
/>
|
||||
<DialogProperties
|
||||
v-model:modal="modalDialogProperties"
|
||||
|
|
@ -603,6 +551,13 @@ watch(
|
|||
:is-leave="isLeave"
|
||||
:fetch-data="props.fetchDataTable"
|
||||
/>
|
||||
|
||||
<DialogInfo
|
||||
v-model:modal="modalDialogInfo"
|
||||
v-model:profileId="profileId"
|
||||
:type="infoType"
|
||||
:employeeClass="'-employee'"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ function chengType() {
|
|||
watch(
|
||||
() => modal.value,
|
||||
() => {
|
||||
console.log(props.remark);
|
||||
|
||||
type.value = props.typeLevel == "PENDING" ? "" : props.typeLevel;
|
||||
note.value = props.typeLevel === "NONE" ? props.remark : "";
|
||||
isReserve.value = props.isReserve;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import DialogFormEdit from "@/modules/13_salary/components/SalaryLists/DialogFor
|
|||
import DialogMoveGroup from "@/modules/13_salary/components/SalaryLists/DialogMoveGroup.vue";
|
||||
import DialogMoveLevel from "@/modules/13_salary/components/SalaryLists/DialogMoveLevel.vue";
|
||||
import DialogProperties from "@/modules/13_salary/components/SalaryLists/DialogProperties.vue";
|
||||
import DialogInfo from "@/modules/13_salary/components/DialogInfoMain.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -125,24 +126,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "duration",
|
||||
align: "center",
|
||||
label: "ระยะเวลาการปฏิบัติราชการในรอบครึ่งปี",
|
||||
sortable: false,
|
||||
field: "duration",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "isPunish",
|
||||
align: "center",
|
||||
label: "ไม่ถูกลงโทษทางวินัย",
|
||||
sortable: false,
|
||||
field: "isPunish",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "isSuspension",
|
||||
align: "center",
|
||||
|
|
@ -152,21 +135,31 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
{
|
||||
name: "isAbsent",
|
||||
name: "posSalary",
|
||||
align: "center",
|
||||
label: "ไม่ขาดราชการ",
|
||||
label: "ประวัติตำแหน่ง/เงินเดือน",
|
||||
sortable: false,
|
||||
field: "isAbsent",
|
||||
field: "posSalary",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "isLeave",
|
||||
name: "discipline",
|
||||
align: "center",
|
||||
label: "วันลาไม่เกิน",
|
||||
label: "วินัย",
|
||||
sortable: false,
|
||||
field: "isLeave",
|
||||
field: "discipline",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "leave",
|
||||
align: "center",
|
||||
label: "การลา",
|
||||
sortable: false,
|
||||
field: "leave",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -181,11 +174,10 @@ const visibleColumns = ref<string[]>([
|
|||
"amount",
|
||||
"organization",
|
||||
"result",
|
||||
"duration",
|
||||
"isPunish",
|
||||
"posSalary",
|
||||
"discipline",
|
||||
"leave",
|
||||
"isSuspension",
|
||||
"isAbsent",
|
||||
"isLeave",
|
||||
]);
|
||||
|
||||
/** modalDialog*/
|
||||
|
|
@ -194,6 +186,7 @@ const modalDialogForm = ref<boolean>(false);
|
|||
const modalDialogMoveGroup = ref<boolean>(false);
|
||||
const modalDialogMoveLeve = ref<boolean>(false);
|
||||
const modalDialogProperties = ref<boolean>(false);
|
||||
const modalDialogInfo = ref<boolean>(false);
|
||||
|
||||
/** ตัวแปร*/
|
||||
const profileId = ref<string>("");
|
||||
|
|
@ -253,6 +246,7 @@ function onClickMovieGroup(id: string) {
|
|||
|
||||
const typeLevel = ref<string>("");
|
||||
const isReserve = ref<boolean>(false);
|
||||
|
||||
/**
|
||||
* function openPopup ย้ายกขั้น
|
||||
* @param id profileId
|
||||
|
|
@ -290,6 +284,7 @@ function onProperties(data: any) {
|
|||
isAbsent.value = data.isAbsent;
|
||||
isLeave.value = data.isLeave;
|
||||
}
|
||||
|
||||
/** callblack function เรียกข้อมูลรายชื่อใหม่ เมื่อมีการเปลี่ยน PageSize*/
|
||||
watch(
|
||||
() => formFilter.value.pageSize,
|
||||
|
|
@ -297,6 +292,13 @@ watch(
|
|||
updatePagePagination();
|
||||
}
|
||||
);
|
||||
|
||||
const infoType = ref<string>("");
|
||||
function onClickViewInfo(type: string, id: string) {
|
||||
infoType.value = type;
|
||||
profileId.value = id;
|
||||
modalDialogInfo.value = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -396,57 +398,8 @@ watch(
|
|||
}${props.row.root ? props.row.root : ""}`
|
||||
}}
|
||||
</div>
|
||||
<!-- <div v-else-if="col.name === 'isResult'">
|
||||
<q-checkbox
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="props.row.isResult"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="col.name === 'isDuration'">
|
||||
<q-checkbox
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="props.row.isDuration"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="col.name === 'isPunish'">
|
||||
<q-checkbox
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="props.row.isPunish"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="col.name === 'isRetired'">
|
||||
<q-checkbox
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="props.row.isRetired"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="col.name === 'isRetired2'">
|
||||
<q-checkbox
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
v-model="props.row.isRetired2"
|
||||
false
|
||||
/>
|
||||
</div> -->
|
||||
<div v-else-if="col.name == 'isPunish'">
|
||||
<q-icon
|
||||
v-if="props.row.isPunish !== null"
|
||||
:name="props.row.isPunish ? 'done' : 'close'"
|
||||
:color="props.row.isPunish ? 'primary' : 'red'"
|
||||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isPunish == null">
|
||||
{{ props.row.isPunish == null ? "-" : "" }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'amount'">
|
||||
{{ Number(props.row.amount).toLocaleString() }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'isSuspension'">
|
||||
<q-icon
|
||||
|
|
@ -459,31 +412,25 @@ watch(
|
|||
{{ props.row.isSuspension == null ? "-" : "" }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'isAbsent'">
|
||||
<q-icon
|
||||
v-if="props.row.isAbsent !== null"
|
||||
:name="props.row.isAbsent ? 'done' : 'close'"
|
||||
:color="props.row.isAbsent ? 'primary' : 'red'"
|
||||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isAbsent == null">
|
||||
{{ props.row.isAbsent == null ? "-" : "" }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'amount'">
|
||||
{{ Number(props.row.amount).toLocaleString() }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'isLeave'">
|
||||
<q-icon
|
||||
v-if="props.row.isLeave !== null"
|
||||
:name="props.row.isLeave ? 'done' : 'close'"
|
||||
:color="props.row.isLeave ? 'primary' : 'red'"
|
||||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isLeave == null">
|
||||
{{ props.row.isLeave == null ? "-" : "" }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
col.name == 'posSalary' ||
|
||||
col.name == 'discipline' ||
|
||||
col.name == 'leave'
|
||||
"
|
||||
>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
icon="info"
|
||||
class="q-pa-none q-ml-xs"
|
||||
color="info"
|
||||
size="12px"
|
||||
@click.pervent="onClickViewInfo(col.name, props.row.profileId)"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
@ -579,6 +526,7 @@ watch(
|
|||
v-model:modal="modalDialogMoveLeve"
|
||||
v-model:profileId="profileId"
|
||||
:fetchData="props.fetchDataTable"
|
||||
:remark="''"
|
||||
/>
|
||||
<DialogProperties
|
||||
v-model:modal="modalDialogProperties"
|
||||
|
|
@ -589,6 +537,13 @@ watch(
|
|||
:is-leave="isLeave"
|
||||
:fetch-data="props.fetchDataTable"
|
||||
/>
|
||||
|
||||
<DialogInfo
|
||||
v-model:modal="modalDialogInfo"
|
||||
v-model:profileId="profileId"
|
||||
:type="infoType"
|
||||
:employeeClass="''"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
|||
|
|
@ -56,6 +56,75 @@ interface Row {
|
|||
total: number;
|
||||
}
|
||||
|
||||
interface DataPosSalary {
|
||||
amount: number;
|
||||
createdAt: string;
|
||||
createdFullName: string;
|
||||
createdUserId: string;
|
||||
date: string;
|
||||
id: string;
|
||||
lastUpdateFullName: string;
|
||||
lastUpdateUserId: string;
|
||||
lastUpdatedAt: string;
|
||||
mouthSalaryAmount: number;
|
||||
order: number;
|
||||
posNo: string;
|
||||
position: string;
|
||||
positionExecutive: string;
|
||||
positionLevel: string;
|
||||
positionLine: string;
|
||||
positionPathSide: string;
|
||||
positionSalaryAmount: number;
|
||||
positionType: string;
|
||||
profileEmployeeId: string;
|
||||
profileId: string;
|
||||
refCommandNo: string;
|
||||
templateDoc: string;
|
||||
}
|
||||
|
||||
interface DataDiscipline {
|
||||
date: string;
|
||||
detail: string;
|
||||
id: string;
|
||||
lastUpdateFullName: string;
|
||||
lastUpdatedAt: string;
|
||||
level: string;
|
||||
refCommandDate: string;
|
||||
refCommandNo: string;
|
||||
unStigma: string;
|
||||
}
|
||||
interface DataLeave {
|
||||
id: string;
|
||||
createdAt: string;
|
||||
createdUserId: string;
|
||||
lastUpdatedAt: string;
|
||||
lastUpdateUserId: string;
|
||||
createdFullName: string;
|
||||
lastUpdateFullName: string;
|
||||
profileId: string;
|
||||
profileEmployeeId: string;
|
||||
leaveTypeId: string;
|
||||
dateLeaveStart: string;
|
||||
dateLeaveEnd: string;
|
||||
leaveDays: number;
|
||||
leaveCount: number;
|
||||
totalLeave: number;
|
||||
status: string;
|
||||
reason: string;
|
||||
leaveType: {
|
||||
id: string;
|
||||
createdAt: string;
|
||||
createdUserId: string;
|
||||
lastUpdatedAt: string;
|
||||
lastUpdateUserId: string;
|
||||
createdFullName: string;
|
||||
lastUpdateFullName: string;
|
||||
name: string;
|
||||
code: string;
|
||||
limit: number;
|
||||
};
|
||||
}
|
||||
|
||||
export type {
|
||||
Salary,
|
||||
SalaryRate,
|
||||
|
|
@ -64,4 +133,7 @@ export type {
|
|||
RowList,
|
||||
Row,
|
||||
DataOption,
|
||||
DataPosSalary,
|
||||
DataDiscipline,
|
||||
DataLeave,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ export const useSalaryEmployeeListSDataStore = defineStore(
|
|||
const itemDownloadOct = ref<DataOption[]>([
|
||||
{
|
||||
id: "emp2-01",
|
||||
name: "บัญชีการคำนวณวงเงินเลื่อนขั้นค่าจางลูกจ้างประจำกรุงเทพมหานคร",
|
||||
name: "บัญชีการคำนวณวงเงินเลื่อนขั้นค่าจ้างลูกจ้างประจำกรุงเทพมหานคร",
|
||||
},
|
||||
{
|
||||
id: "emp2-02",
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ async function fetchOrderlist() {
|
|||
.get(config.API.listOrder())
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
|
||||
const typeid = OrderTypeOption.value.map((e: DataOption1) => e.id);
|
||||
const filterListOrder = data.filter((e: ResListOrder) =>
|
||||
typeid.includes(e.orderTypeValue)
|
||||
|
|
@ -238,9 +239,7 @@ async function OrderTypeFilter() {
|
|||
|
||||
/** ฟังชั่นฟิลเตอร์ตามค่า ประเภท สถานะ ปี */
|
||||
async function searchFilterTable() {
|
||||
if (OrderType.value) {
|
||||
stroe.filterListOrder(OrderType.value, OrderStatus.value, fiscalyear.value);
|
||||
}
|
||||
stroe.filterListOrder(OrderType.value, OrderStatus.value, fiscalyear.value);
|
||||
}
|
||||
|
||||
/** fucnction หาสถานะทั่งหมด*/
|
||||
|
|
@ -373,7 +372,9 @@ onMounted(async () => {
|
|||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(fiscalyearOP = fiscalyearFilter1), (fiscalyear = 0)
|
||||
(fiscalyearOP = fiscalyearFilter1),
|
||||
(fiscalyear = 0),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
|
|
@ -467,7 +468,9 @@ onMounted(async () => {
|
|||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(OrderTypeOption = OrderTypeFilter1), (OrderType = '')
|
||||
(OrderTypeOption = OrderTypeFilter1),
|
||||
(OrderType = ''),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
|
|
@ -508,7 +511,8 @@ onMounted(async () => {
|
|||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(OrderStatusOption = OrderStatusFilter1),
|
||||
(OrderStatus = 'ทั้งหมด')
|
||||
(OrderStatus = 'ทั้งหมด'),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ const lastPage = ref<number>(0);
|
|||
const loading = ref(false);
|
||||
const nextPage = ref<number>(1);
|
||||
|
||||
/**function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
|
||||
/**function เรียกข้อมูลรอบการขึ้นค่าจ้าง*/
|
||||
function getRound() {
|
||||
roundOptions.value = [];
|
||||
isDisable.value = false;
|
||||
|
|
@ -210,7 +210,7 @@ async function getAgencyPosition(id: string) {
|
|||
/**
|
||||
*
|
||||
* @param rootId id หน่วยงาน
|
||||
* @param periodId id รอบการขึ้นเงินเดือน
|
||||
* @param periodId id รอบการขึ้นค่าจ้าง
|
||||
* @param snap id รอบ
|
||||
*/
|
||||
function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
|
||||
|
|
@ -242,7 +242,7 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
|
|||
}
|
||||
}
|
||||
|
||||
/** function เปลี่ยนรอบการขั้นเงินเดือน*/
|
||||
/** function เปลี่ยนรอบการขั้นค่าจ้าง*/
|
||||
async function onChangeRound() {
|
||||
// เก็บสถานะการปิดรอบในตัวแปร isClosedRound เพื่อใช้ในการเช็ค
|
||||
store.isClosedRound = roundFilter.value.isClose;
|
||||
|
|
@ -292,7 +292,7 @@ async function onChangeAgency() {
|
|||
}
|
||||
}
|
||||
|
||||
/** function onScrollSelect รอบการขึ้นเงินเดือน*/
|
||||
/** function onScrollSelect รอบการขึ้นค่าจ้าง*/
|
||||
function onScroll({ to, ref }: { to: number; ref: any }) {
|
||||
const lastIndex = roundOptions.value.length - 1;
|
||||
|
||||
|
|
@ -382,7 +382,7 @@ onMounted(() => {
|
|||
<q-select
|
||||
class="q-ml-xs"
|
||||
v-model="roundFilter"
|
||||
label="รอบการขึ้นเงินเดือน"
|
||||
label="รอบการขึ้นค่าจ้าง"
|
||||
dense
|
||||
outlined
|
||||
map-options
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ function clickDownload() {
|
|||
.get(config.API.salaryReportemployeeByid(salaryEmployeeId.value))
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
genReportXLSX(dataList, "อัตราเงินเดือน");
|
||||
genReportXLSX(dataList, "อัตราค่าจ้าง");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ function changOption(val: string) {
|
|||
val === "KPI2" ||
|
||||
val === "KPI3" ||
|
||||
val === "KPI7" ||
|
||||
val === "KPI8" ||
|
||||
val === "KPI9"
|
||||
) {
|
||||
persanalId.value = "";
|
||||
|
|
@ -332,6 +333,8 @@ const formFilter = reactive({
|
|||
const maxPage = ref<number>(1);
|
||||
const total = ref<number>(0);
|
||||
|
||||
const roundRef = ref<any>(null);
|
||||
|
||||
const rowsPerson = ref<ResPerson[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -397,8 +400,17 @@ const columns = ref<QTableProps["columns"]>([
|
|||
* function เปิด popup เลือกราชชื่อ
|
||||
*/
|
||||
function onClickModal() {
|
||||
modal.value = true;
|
||||
fetchListPerson();
|
||||
if (typeReport.value === "KPI8") {
|
||||
roundRef.value.validate();
|
||||
|
||||
if (!roundRef.value.hasError) {
|
||||
modal.value = true;
|
||||
fetchListPerson();
|
||||
}
|
||||
} else {
|
||||
modal.value = true;
|
||||
fetchListPerson();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -552,6 +564,7 @@ onMounted(() => {
|
|||
typeReport === 'KPI2' ||
|
||||
typeReport === 'KPI3' ||
|
||||
typeReport === 'KPI7' ||
|
||||
typeReport === 'KPI8' ||
|
||||
typeReport === 'KPI9'
|
||||
"
|
||||
>
|
||||
|
|
@ -590,11 +603,13 @@ onMounted(() => {
|
|||
</template>
|
||||
</datepicker>
|
||||
<q-select
|
||||
ref="roundRef"
|
||||
class="bg-white"
|
||||
v-model="round"
|
||||
outlined
|
||||
label="รอบการประเมิน"
|
||||
dense
|
||||
hide-bottom-space
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="roundOp"
|
||||
|
|
@ -603,8 +618,15 @@ onMounted(() => {
|
|||
map-options
|
||||
:disable="roundOp.length === 0"
|
||||
@update:model-value="changOption(typeReport)"
|
||||
lazy-rules
|
||||
:rules="
|
||||
typeReport === 'KPI8'
|
||||
? [(val) => !!val || 'กรุณาเลือกรอบการประเมิน']
|
||||
: []
|
||||
"
|
||||
/>
|
||||
<q-select
|
||||
v-if="typeReport !== 'KPI8'"
|
||||
class="bg-white"
|
||||
:disable="roundOp.length === 0"
|
||||
style="min-width: 100px"
|
||||
|
|
@ -632,8 +654,21 @@ onMounted(() => {
|
|||
>
|
||||
</div>
|
||||
|
||||
<div class="q-pa-sm" v-else>
|
||||
<q-btn color="primary" label="เลือกรายชื่อ" @click="onClickModal" />
|
||||
<div
|
||||
class="q-pa-sm"
|
||||
v-if="
|
||||
typeReport === 'KPI4' ||
|
||||
typeReport === 'KPI5' ||
|
||||
typeReport === 'KPI6' ||
|
||||
typeReport === 'KPI8'
|
||||
"
|
||||
>
|
||||
<q-btn
|
||||
color="primary"
|
||||
label="เลือกรายชื่อ"
|
||||
@click="onClickModal"
|
||||
:disable="roundOp.length === 0 && typeReport === 'KPI8'"
|
||||
/>
|
||||
</div>
|
||||
</q-toolbar>
|
||||
|
||||
|
|
|
|||
|
|
@ -123,10 +123,10 @@ const itemMenu = ref<ItemsMenu[]>([
|
|||
|
||||
/** Option รอบการประเมิน*/
|
||||
const roundOp = ref<DataOption[]>([
|
||||
{ id: "APR", name: "รอบเมษายน" },
|
||||
{ id: "APR", name: "รอบที่ 1 เมษายน" },
|
||||
{
|
||||
id: "OCT",
|
||||
name: "รอบตุลาคม",
|
||||
name: "รอบที่ 2 ตุลาคม",
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
@ -518,7 +518,7 @@ onMounted(() => {
|
|||
/>
|
||||
<q-separator />
|
||||
|
||||
<q-card-section >
|
||||
<q-card-section>
|
||||
<div class="row col-12 q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<q-select
|
||||
|
|
|
|||
|
|
@ -637,7 +637,7 @@ const handleButtonClick = () => {
|
|||
size="sm"
|
||||
color="yellow-10"
|
||||
/>
|
||||
ไมมีข้อมูล
|
||||
ไม่มีข้อมูล
|
||||
</div>
|
||||
</q-banner>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue