เงินเดืน => ปรับ code ผังบัญชีค่าจ้างลูกจ้างประจำ
This commit is contained in:
parent
4232c5d4e8
commit
7c62840eeb
8 changed files with 484 additions and 526 deletions
|
|
@ -4,13 +4,16 @@ import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import type { ObjectCharRef } from "@/modules/13_salary/interface/index/EmployeeChart";
|
/** importType*/
|
||||||
import type { FormDataChar } from "@/modules/13_salary/interface/request/EmployeeChart";
|
import type { FormDataChar } from "@/modules/13_salary/interface/request/EmployeeChart";
|
||||||
|
|
||||||
|
/** importComponentes*/
|
||||||
import Header from "@/components/DialogHeader.vue";
|
import Header from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
|
|
@ -19,9 +22,9 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
messageError,
|
messageError,
|
||||||
success,
|
success,
|
||||||
dialogRemove,
|
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
|
/** props*/
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isStatusEdit: { type: Boolean, required: true },
|
isStatusEdit: { type: Boolean, required: true },
|
||||||
|
|
@ -31,6 +34,8 @@ const props = defineProps({
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** form บัญชีค่าจ้างลูกจ้างประจำ */
|
||||||
const formData = reactive<FormDataChar>({
|
const formData = reactive<FormDataChar>({
|
||||||
name: "", //ชื่อผังบัญชีอัตราค่าจ้าง
|
name: "", //ชื่อผังบัญชีอัตราค่าจ้าง
|
||||||
group: "", //*กลุ่มของผังบัญชีอัตราค่าจ้าง
|
group: "", //*กลุ่มของผังบัญชีอัตราค่าจ้าง
|
||||||
|
|
@ -41,14 +46,12 @@ const formData = reactive<FormDataChar>({
|
||||||
details: "", //คำอธิบาย
|
details: "", //คำอธิบาย
|
||||||
});
|
});
|
||||||
|
|
||||||
const nameRef = ref<Object | null>(null);
|
const isReadonly = ref<boolean>(false);
|
||||||
const groupRef = ref<Object | null>(null);
|
|
||||||
|
|
||||||
const ObjectRef: ObjectCharRef = {
|
|
||||||
name: nameRef,
|
|
||||||
group: groupRef,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function fetch ข้อมูล ผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
* @param id ผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
*/
|
||||||
function fetchSalaryDetail(id: string) {
|
function fetchSalaryDetail(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
@ -72,47 +75,33 @@ function fetchSalaryDetail(id: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const isReadonly = ref<boolean>(false);
|
/** function บันทึกข้อมูลผังบัญชีค่าจ้างลูกจ้างประจำ*/
|
||||||
function onClickSubmit() {
|
function onSubmit() {
|
||||||
const hasError = [];
|
dialogConfirm($q, async () => {
|
||||||
for (const key in ObjectRef) {
|
showLoader();
|
||||||
if (Object.prototype.hasOwnProperty.call(ObjectRef, key)) {
|
try {
|
||||||
const property = ObjectRef[key];
|
const url = !props.isStatusEdit
|
||||||
if (property.value && typeof property.value.validate === "function") {
|
? config.API.salaryEmployeeChart
|
||||||
const isValid = property.value.validate();
|
: config.API.salaryEmployeeChartByid(props.data.id);
|
||||||
hasError.push(isValid);
|
await http[!props.isStatusEdit ? "post" : "put"](url, formData);
|
||||||
}
|
success($q, "บันทีกข้อมูลสำเร็จ");
|
||||||
|
props.fetchData?.();
|
||||||
|
closeDialog();
|
||||||
|
} catch (err) {
|
||||||
|
messageError($q, err);
|
||||||
|
} finally {
|
||||||
|
hideLoader();
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
if (hasError.every((result) => result === true)) {
|
|
||||||
dialogConfirm($q, () => {
|
|
||||||
onSubmit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onSubmit() {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
const url = !props.isStatusEdit
|
|
||||||
? config.API.salaryEmployeeChart
|
|
||||||
: config.API.salaryEmployeeChartByid(props.data.id);
|
|
||||||
await http[!props.isStatusEdit ? "post" : "put"](url, formData);
|
|
||||||
success($q, "บันทีกข้อมูลสำเร็จ");
|
|
||||||
props.fetchData?.();
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
closeDialog();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function ปืด Dialog*/
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
clearFormData();
|
clearFormData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function เคลียข้อมูล form*/
|
||||||
function clearFormData() {
|
function clearFormData() {
|
||||||
formData.name = "";
|
formData.name = "";
|
||||||
formData.group = "";
|
formData.group = "";
|
||||||
|
|
@ -132,6 +121,7 @@ function checkEndDate() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** callbaclFunction fetch ช้อมูลเมื่อแก้ไข*/
|
||||||
watch(
|
watch(
|
||||||
() => modal.value,
|
() => modal.value,
|
||||||
() => {
|
() => {
|
||||||
|
|
@ -144,7 +134,7 @@ watch(
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card class="col-12" style="width: 80%">
|
<q-card class="col-12" style="width: 80%">
|
||||||
<form @submit.prevent.stop="onClickSubmit">
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
<Header
|
<Header
|
||||||
:tittle="
|
:tittle="
|
||||||
props.isStatusEdit
|
props.isStatusEdit
|
||||||
|
|
@ -359,7 +349,7 @@ watch(
|
||||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -5,26 +5,27 @@ import { useRoute } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import type { ObjectReteRef } from "@/modules/13_salary/interface/index/EmployeeChart";
|
/** importType*/
|
||||||
import type { FormDataRate } from "@/modules/13_salary/interface/request/EmployeeChart";
|
import type {
|
||||||
|
FormDataRate,
|
||||||
|
FormDataRateEpm,
|
||||||
|
} from "@/modules/13_salary/interface/request/EmployeeChart";
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
import Header from "@/components/DialogHeader.vue";
|
import Header from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/**use */
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const {
|
const { dialogConfirm, showLoader, hideLoader, messageError, success } =
|
||||||
date2Thai,
|
useCounterMixin();
|
||||||
dialogConfirm,
|
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
messageError,
|
|
||||||
success,
|
|
||||||
} = useCounterMixin();
|
|
||||||
|
|
||||||
const salaryEmployeeId = ref<string>(route.params.id.toString());
|
const salaryEmployeeId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
|
/** props*/
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isStatusEdit: {
|
isStatusEdit: {
|
||||||
|
|
@ -41,53 +42,31 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const formData = reactive<any>({
|
/** form อัตราค่าจ้าง */
|
||||||
|
const formData = reactive<FormDataRateEpm>({
|
||||||
salaryNo: null,
|
salaryNo: null,
|
||||||
salaryMonth: null,
|
salaryMonth: null,
|
||||||
salaryDay: null,
|
salaryDay: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** ตัวแปร ref สำหรับแสดง validate */
|
/** function ปืด Dialog*/
|
||||||
const salaryNoRef = ref<Object | null>(null);
|
|
||||||
const salaryMonthRef = ref<Object | null>(null);
|
|
||||||
const salaryDayRef = ref<Object | null>(null);
|
|
||||||
|
|
||||||
const ObjectRef: ObjectReteRef = {
|
|
||||||
salaryNo: salaryNoRef,
|
|
||||||
salaryMonth: salaryMonthRef,
|
|
||||||
salaryDay: salaryDayRef,
|
|
||||||
};
|
|
||||||
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
modal.value = !modal.value;
|
modal.value = !modal.value;
|
||||||
clearFormData();
|
clearFormData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function เคลียข้อมูล form*/
|
||||||
function clearFormData() {
|
function clearFormData() {
|
||||||
formData.salaryNo = null;
|
formData.salaryNo = null;
|
||||||
formData.salaryMonth = null;
|
formData.salaryMonth = null;
|
||||||
formData.salaryDay = null;
|
formData.salaryDay = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClickSubmit() {
|
/** function บันทึกข้อมูลอัตราค่าจ้าง*/
|
||||||
const hasError = [];
|
|
||||||
for (const key in ObjectRef) {
|
|
||||||
if (Object.prototype.hasOwnProperty.call(ObjectRef, key)) {
|
|
||||||
const property = ObjectRef[key];
|
|
||||||
if (property.value && typeof property.value.validate === "function") {
|
|
||||||
const isValid = property.value.validate();
|
|
||||||
hasError.push(isValid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (hasError.every((result) => result === true)) {
|
|
||||||
onSubmit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm($q, async () => {
|
dialogConfirm($q, async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
||||||
const body: FormDataRate = {
|
const body: FormDataRate = {
|
||||||
salaryEmployeeId: !props.isStatusEdit
|
salaryEmployeeId: !props.isStatusEdit
|
||||||
? salaryEmployeeId.value
|
? salaryEmployeeId.value
|
||||||
|
|
@ -95,18 +74,19 @@ function onSubmit() {
|
||||||
step:
|
step:
|
||||||
typeof formData.salaryNo === "number"
|
typeof formData.salaryNo === "number"
|
||||||
? formData.salaryNo
|
? formData.salaryNo
|
||||||
: Number(formData.salaryNo.replace(/,/g, "")),
|
: Number(formData.salaryNo?.replace(/,/g, "")),
|
||||||
|
|
||||||
salaryMonth:
|
salaryMonth:
|
||||||
typeof formData.salaryMonth === "number"
|
typeof formData.salaryMonth === "number"
|
||||||
? formData.salaryMonth
|
? formData.salaryMonth
|
||||||
: Number(formData.salaryMonth.replace(/,/g, "")), //*เงินเดือนฐาน
|
: Number(formData.salaryMonth?.replace(/,/g, "")), //*เงินเดือนฐาน
|
||||||
|
|
||||||
salaryDay:
|
salaryDay:
|
||||||
typeof formData.salaryDay === "number"
|
typeof formData.salaryDay === "number"
|
||||||
? formData.salaryDay
|
? formData.salaryDay
|
||||||
: Number(formData.salaryDay.replace(/,/g, "")), //0.5 ขั้น
|
: Number(formData.salaryDay?.replace(/,/g, "")), //0.5 ขั้น
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const url = !props.isStatusEdit
|
const url = !props.isStatusEdit
|
||||||
? config.API.salaryEmployeeRateList
|
? config.API.salaryEmployeeRateList
|
||||||
|
|
@ -123,13 +103,13 @@ function onSubmit() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** callbaclFunction fetch ช้อมูลเมื่อแก้ไข*/
|
||||||
watch(
|
watch(
|
||||||
() => modal.value,
|
() => modal.value,
|
||||||
() => {
|
() => {
|
||||||
if (modal.value && props.isStatusEdit) {
|
if (modal.value && props.isStatusEdit) {
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
const data = props.data;
|
const data = props.data;
|
||||||
console.log(data);
|
|
||||||
formData.salaryNo = data.step;
|
formData.salaryNo = data.step;
|
||||||
formData.salaryMonth = data.salaryMonth;
|
formData.salaryMonth = data.salaryMonth;
|
||||||
formData.salaryDay = data.salaryDay;
|
formData.salaryDay = data.salaryDay;
|
||||||
|
|
@ -142,78 +122,81 @@ watch(
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card style="width: 500px">
|
<q-card style="width: 500px">
|
||||||
<Header
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
:tittle="props.isStatusEdit ? 'แก้ไขอัตราค่าจ้าง' : 'เพิ่มอัตราค่าจ้าง'"
|
<Header
|
||||||
:close="closeDialog"
|
:tittle="
|
||||||
/>
|
props.isStatusEdit ? 'แก้ไขอัตราค่าจ้าง' : 'เพิ่มอัตราค่าจ้าง'
|
||||||
<q-separator />
|
"
|
||||||
|
:close="closeDialog"
|
||||||
|
/>
|
||||||
|
<q-separator />
|
||||||
|
<q-card-section>
|
||||||
|
<div class="row q-gutter-sm q-pa-sm">
|
||||||
|
<div class="row col-xs-12 col-md-12 q-col-gutter-sm">
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
ref="salaryNoRef"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="formData.salaryNo"
|
||||||
|
label="ลำดับชั้น"
|
||||||
|
:rules="[
|
||||||
|
(val) => !!val || 'กรุณากรอกลำดับชั้น',
|
||||||
|
(val) =>
|
||||||
|
Number(val) === Math.floor(val) ||
|
||||||
|
Number(val) === Math.floor(val) + 0.5 ||
|
||||||
|
`กรุณากรอกจำนวนเต็มเท่านั้ หรือ .5`,
|
||||||
|
]"
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<q-card-section>
|
<div class="col-12">
|
||||||
<div class="row q-gutter-sm q-pa-sm">
|
<q-input
|
||||||
<div class="row col-xs-12 col-md-12 q-col-gutter-sm">
|
ref="salaryMonthRef"
|
||||||
<div class="col-12">
|
dense
|
||||||
<q-input
|
outlined
|
||||||
ref="salaryNoRef"
|
v-model="formData.salaryMonth"
|
||||||
dense
|
label="อัตราค่าจ้าง/ขั้นวิ่ง (รายเดือน)"
|
||||||
outlined
|
mask="###,###,###,###"
|
||||||
v-model="formData.salaryNo"
|
reverse-fill-mask
|
||||||
label="ลำดับชั้น"
|
:rules="[
|
||||||
:rules="[
|
(val) =>
|
||||||
(val) => !!val || 'กรุณากรอกลำดับชั้น',
|
!!val || `${'กรุณากรอกอัตราค่าจ้าง/ขั้นวิ่ง (รายเดือน)'}`,
|
||||||
(val) =>
|
]"
|
||||||
Number(val) === Math.floor(val) ||
|
lazy-rules
|
||||||
Number(val) === Math.floor(val) + 0.5 ||
|
hide-bottom-space
|
||||||
`กรุณากรอกจำนวนเต็มเท่านั้ หรือ .5`,
|
/>
|
||||||
]"
|
</div>
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
ref="salaryMonthRef"
|
ref="salaryDayRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="formData.salaryMonth"
|
v-model="formData.salaryDay"
|
||||||
label="อัตราค่าจ้าง/ขั้นวิ่ง (รายเดือน)"
|
label="อัตราค่าจ้าง/ขั้นวิ่ง (รายวัน)"
|
||||||
mask="###,###,###,###"
|
mask="###,###,###,###"
|
||||||
reverse-fill-mask
|
reverse-fill-mask
|
||||||
:rules="[
|
lazy-rules
|
||||||
(val) =>
|
hide-bottom-space
|
||||||
!!val || `${'กรุณากรอกอัตราค่าจ้าง/ขั้นวิ่ง (รายเดือน)'}`,
|
:rules="[
|
||||||
]"
|
(val) =>
|
||||||
lazy-rules
|
!!val || `${'กรุณากรอกอัตราค่าจ้าง/ขั้นวิ่ง (รายวัน)'}`,
|
||||||
hide-bottom-space
|
]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
ref="salaryDayRef"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
v-model="formData.salaryDay"
|
|
||||||
label="อัตราค่าจ้าง/ขั้นวิ่ง (รายวัน)"
|
|
||||||
mask="###,###,###,###"
|
|
||||||
reverse-fill-mask
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
!!val || `${'กรุณากรอกอัตราค่าจ้าง/ขั้นวิ่ง (รายวัน)'}`,
|
|
||||||
]"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</q-card-section>
|
||||||
</q-card-section>
|
<q-separator />
|
||||||
<q-separator />
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
|
<q-btn label="บันทึก" type="submit" color="secondary">
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
<q-btn label="บันทึก" color="secondary" @click="onClickSubmit"
|
</q-btn>
|
||||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
</q-card-actions>
|
||||||
>
|
</q-form>
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,21 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch } from "vue";
|
import { ref, reactive, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
ObjectReteRef,
|
|
||||||
DataOptions,
|
DataOptions,
|
||||||
DataListOptions,
|
DataListOptions,
|
||||||
} from "@/modules/13_salary/interface/index/EmployeeChart";
|
} from "@/modules/13_salary/interface/index/EmployeeChart";
|
||||||
import type { FormDataRate } from "@/modules/13_salary/interface/request/EmployeeChart";
|
|
||||||
|
|
||||||
import Header from "@/components/DialogHeader.vue";
|
import Header from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const { dialogConfirm, showLoader, hideLoader, messageError, success } =
|
||||||
const {
|
useCounterMixin();
|
||||||
date2Thai,
|
|
||||||
dialogConfirm,
|
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
messageError,
|
|
||||||
success,
|
|
||||||
} = useCounterMixin();
|
|
||||||
|
|
||||||
// const salaryEmployeeId = ref<string>(route.params.id.toString());
|
// const salaryEmployeeId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
|
|
@ -37,10 +27,6 @@ const props = defineProps({
|
||||||
defult: [],
|
defult: [],
|
||||||
},
|
},
|
||||||
getDataMain: Function,
|
getDataMain: Function,
|
||||||
// fetchData: {
|
|
||||||
// type: Function,
|
|
||||||
// required: true,
|
|
||||||
// },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const posTypeOp = ref<DataOptions[]>([]);
|
const posTypeOp = ref<DataOptions[]>([]);
|
||||||
|
|
@ -49,6 +35,7 @@ const posNameOpMain = ref<DataOptions[]>([]);
|
||||||
const groupOldOp = ref<DataOptions[]>([]);
|
const groupOldOp = ref<DataOptions[]>([]);
|
||||||
const posLevelOp = ref<any[]>([]);
|
const posLevelOp = ref<any[]>([]);
|
||||||
const posNameListOp = ref<DataListOptions[]>([]);
|
const posNameListOp = ref<DataListOptions[]>([]);
|
||||||
|
|
||||||
const formData = reactive<any>({
|
const formData = reactive<any>({
|
||||||
id: "",
|
id: "",
|
||||||
posType: "", //กลุ่มงาน
|
posType: "", //กลุ่มงาน
|
||||||
|
|
@ -62,32 +49,13 @@ const formData = reactive<any>({
|
||||||
rateHighMax: "", //อัตราค่าจ้างสูงกว่าฯ ขั้นสูงใหม่
|
rateHighMax: "", //อัตราค่าจ้างสูงกว่าฯ ขั้นสูงใหม่
|
||||||
});
|
});
|
||||||
|
|
||||||
/** ตัวแปร ref สำหรับแสดง validate */
|
/** function ปืด Dialog*/
|
||||||
const posTypeRef = ref<object | null>(null);
|
|
||||||
const posNameRef = ref<object | null>(null);
|
|
||||||
const posLevelRef = ref<object | null>(null);
|
|
||||||
const rateOldMinRef = ref<object | null>(null);
|
|
||||||
const groupOldRef = ref<object | null>(null);
|
|
||||||
const rateMaxOldRef = ref<object | null>(null);
|
|
||||||
const groupRateHighRef = ref<object | null>(null);
|
|
||||||
const rateHighMaxRef = ref<object | null>(null);
|
|
||||||
|
|
||||||
const ObjectRef: ObjectReteRef = {
|
|
||||||
posType: posTypeRef,
|
|
||||||
posName: posNameRef,
|
|
||||||
posLevel: posLevelRef,
|
|
||||||
rateOldMin: rateOldMinRef,
|
|
||||||
groupOld: groupOldRef,
|
|
||||||
rateMaxOld: rateMaxOldRef,
|
|
||||||
groupRateHigh: groupRateHighRef,
|
|
||||||
rateHighMax: rateHighMaxRef,
|
|
||||||
};
|
|
||||||
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
modal.value = !modal.value;
|
modal.value = !modal.value;
|
||||||
clearFormData();
|
clearFormData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function เคลียข้อมูล form*/
|
||||||
function clearFormData() {
|
function clearFormData() {
|
||||||
isEdit.value = false;
|
isEdit.value = false;
|
||||||
formData.posType = "";
|
formData.posType = "";
|
||||||
|
|
@ -101,25 +69,10 @@ function clearFormData() {
|
||||||
formData.rateHighMax = "";
|
formData.rateHighMax = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClickSubmit() {
|
/** function บันทึกข้อมูลหลักเกณฑ์*/
|
||||||
const hasError = [];
|
|
||||||
for (const key in ObjectRef) {
|
|
||||||
if (Object.prototype.hasOwnProperty.call(ObjectRef, key)) {
|
|
||||||
const property = ObjectRef[key];
|
|
||||||
if (property.value && typeof property.value.validate === "function") {
|
|
||||||
const isValid = property.value.validate();
|
|
||||||
hasError.push(isValid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (hasError.every((result) => result === true)) {
|
|
||||||
onSubmit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm($q, async () => {
|
dialogConfirm($q, async () => {
|
||||||
// showLoader();
|
showLoader();
|
||||||
const body = {
|
const body = {
|
||||||
posTypeId: formData.posType.id,
|
posTypeId: formData.posType.id,
|
||||||
position: formData.posName,
|
position: formData.posName,
|
||||||
|
|
@ -147,7 +100,7 @@ function onSubmit() {
|
||||||
? config.API.salaryFormula()
|
? config.API.salaryFormula()
|
||||||
: config.API.salaryFormulaById(formData.id);
|
: config.API.salaryFormulaById(formData.id);
|
||||||
await http[!isEdit.value ? "post" : "put"](url, body)
|
await http[!isEdit.value ? "post" : "put"](url, body)
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
closeDialog();
|
closeDialog();
|
||||||
props.getDataMain?.();
|
props.getDataMain?.();
|
||||||
|
|
@ -161,21 +114,6 @@ function onSubmit() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// watch(
|
|
||||||
// () => modal.value,
|
|
||||||
// () => {
|
|
||||||
// if (modal.value && props.isStatusEdit) {
|
|
||||||
// if (props.data) {
|
|
||||||
// const data = props.data;
|
|
||||||
// console.log(data);
|
|
||||||
// formData.salaryNo = data.step;
|
|
||||||
// formData.salaryMonth = data.salaryMonth;
|
|
||||||
// formData.salaryDay = data.salaryDay;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
|
|
||||||
/** ดึงข้อมูล กลุ่มงาน */
|
/** ดึงข้อมูล กลุ่มงาน */
|
||||||
function getPosType() {
|
function getPosType() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -247,6 +185,7 @@ function getPosNameEdit() {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ดึงข้อมูล ระดับชั้นงาน */
|
/** ดึงข้อมูล ระดับชั้นงาน */
|
||||||
function getPosLevel() {
|
function getPosLevel() {
|
||||||
formData.posLevel = "";
|
formData.posLevel = "";
|
||||||
|
|
@ -258,11 +197,9 @@ function getPosLevel() {
|
||||||
formData.posLevel = posLevelOp.value[0];
|
formData.posLevel = posLevelOp.value[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ดึงข้อมูล ระดับชั้นงาน */
|
/** ดึงข้อมูล ระดับชั้นงาน */
|
||||||
function getPosLevelEdit() {
|
function getPosLevelEdit() {
|
||||||
console.log(1);
|
|
||||||
console.log(posNameListOp.value);
|
|
||||||
|
|
||||||
posLevelOp.value = posNameListOp.value
|
posLevelOp.value = posNameListOp.value
|
||||||
.filter((item) => item.posDictName === formData.posName)
|
.filter((item) => item.posDictName === formData.posName)
|
||||||
.map((i) => ({ id: i.posLevelId, name: i.posLevelName }))
|
.map((i) => ({ id: i.posLevelId, name: i.posLevelName }))
|
||||||
|
|
@ -272,6 +209,7 @@ function getPosLevelEdit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ดึงข้อมูล กลุ่ม */
|
||||||
function getSalaryGroup() {
|
function getSalaryGroup() {
|
||||||
http
|
http
|
||||||
.get(config.API.salaryEmployeeActive())
|
.get(config.API.salaryEmployeeActive())
|
||||||
|
|
@ -282,14 +220,13 @@ function getSalaryGroup() {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: `กลุ่มที่ ${item.group}`,
|
name: `กลุ่มที่ ${item.group}`,
|
||||||
}));
|
}));
|
||||||
console.log(groupOldOp.value);
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
});
|
||||||
.finally(() => {});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function fetch ข้อมูลหลักเกณฑ์ */
|
||||||
function getDataEdit() {
|
function getDataEdit() {
|
||||||
http.get(config.API.salaryFormula() + `/${formData.id}`).then(async (res) => {
|
http.get(config.API.salaryFormula() + `/${formData.id}`).then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -314,10 +251,10 @@ function getDataEdit() {
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
() => modal.value,
|
() => modal.value,
|
||||||
async (check) => {
|
(check) => {
|
||||||
if (check) {
|
if (check) {
|
||||||
await getPosType();
|
getPosType();
|
||||||
await getSalaryGroup();
|
getSalaryGroup();
|
||||||
|
|
||||||
if (isEdit.value) {
|
if (isEdit.value) {
|
||||||
formData.id = props.data?.id ? props.data.id : null;
|
formData.id = props.data?.id ? props.data.id : null;
|
||||||
|
|
@ -333,7 +270,7 @@ watch(
|
||||||
* @param update อัพเดทค่า
|
* @param update อัพเดทค่า
|
||||||
* @param refData ดาต้าที่ต้องการฟิลเตอร์
|
* @param refData ดาต้าที่ต้องการฟิลเตอร์
|
||||||
*/
|
*/
|
||||||
function filterOption(val: any, update: Function) {
|
function filterOption(val: any, update: Function) {
|
||||||
update(() => {
|
update(() => {
|
||||||
posNameOp.value = posNameOpMain.value.filter(
|
posNameOp.value = posNameOpMain.value.filter(
|
||||||
(v: any) => v.name.indexOf(val) > -1
|
(v: any) => v.name.indexOf(val) > -1
|
||||||
|
|
@ -345,188 +282,192 @@ watch(
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card class="col-12" style="width: 80%">
|
<q-card class="col-12" style="width: 80%">
|
||||||
<Header
|
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||||
:tittle="isEdit ? 'แก้ไขหลักเกณฑ์' : 'เพิ่มหลักเกณฑ์'"
|
<Header
|
||||||
:close="closeDialog"
|
:tittle="isEdit ? 'แก้ไขหลักเกณฑ์' : 'เพิ่มหลักเกณฑ์'"
|
||||||
/>
|
:close="closeDialog"
|
||||||
<q-separator />
|
/>
|
||||||
|
<q-separator />
|
||||||
|
<q-card-section>
|
||||||
|
<div class="row q-gutter-sm q-pa-sm">
|
||||||
|
<div class="row col-xs-12 col-md-12 q-col-gutter-sm">
|
||||||
|
<div class="col-4">
|
||||||
|
<q-select
|
||||||
|
ref="posTypeRef"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="formData.posType"
|
||||||
|
label="กลุ่มงาน"
|
||||||
|
:rules="[(val) => !!val || 'กรุณาเลือกกลุ่มงาน']"
|
||||||
|
:options="posTypeOp"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
map-options
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
@update:model-value="getPosName()"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<q-select
|
||||||
|
ref="posNameRef"
|
||||||
|
dense
|
||||||
|
:readonly="formData.posType"
|
||||||
|
outlined
|
||||||
|
v-model="formData.posName"
|
||||||
|
label="ตำแหน่ง"
|
||||||
|
:rules="[(val) => !!val || 'กรุณาเลือกตำแหน่ง']"
|
||||||
|
:options="posNameOp"
|
||||||
|
option-label="name"
|
||||||
|
option-value="name"
|
||||||
|
emit-value
|
||||||
|
lazy-rules
|
||||||
|
use-input
|
||||||
|
@filter="(inputValue:any,doneFn:Function) => filterOption(inputValue, doneFn) "
|
||||||
|
hide-bottom-space
|
||||||
|
@update:model-value="getPosLevel()"
|
||||||
|
>
|
||||||
|
<template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<q-select
|
||||||
|
:readonly="formData.posName"
|
||||||
|
ref="posLevelRef"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="formData.posLevel"
|
||||||
|
:options="posLevelOp"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
map-options
|
||||||
|
label="ระดับชั้นงาน"
|
||||||
|
:rules="[(val) => !!val || 'กรุณาเลือกระดับชั้นงาน']"
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<q-card-section>
|
<div class="col-8">
|
||||||
<div class="row q-gutter-sm q-pa-sm">
|
<q-input
|
||||||
<div class="row col-xs-12 col-md-12 q-col-gutter-sm">
|
dense
|
||||||
<div class="col-4">
|
outlined
|
||||||
<q-select
|
v-model="formData.reson"
|
||||||
ref="posTypeRef"
|
label="หมายเหตุ"
|
||||||
dense
|
/>
|
||||||
outlined
|
</div>
|
||||||
v-model="formData.posType"
|
|
||||||
label="กลุ่มงาน"
|
|
||||||
:rules="[(val) => !!val || 'กรุณาเลือกกลุ่มงาน']"
|
|
||||||
:options="posTypeOp"
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
map-options
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
@update:model-value="getPosName()"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<q-select
|
|
||||||
ref="posNameRef"
|
|
||||||
dense
|
|
||||||
:readonly="formData.posType"
|
|
||||||
outlined
|
|
||||||
v-model="formData.posName"
|
|
||||||
label="ตำแหน่ง"
|
|
||||||
:rules="[(val) => !!val || 'กรุณาเลือกตำแหน่ง']"
|
|
||||||
:options="posNameOp"
|
|
||||||
option-label="name"
|
|
||||||
option-value="name"
|
|
||||||
emit-value
|
|
||||||
lazy-rules
|
|
||||||
use-input
|
|
||||||
@filter="(inputValue:any,doneFn:Function) => filterOption(inputValue, doneFn) "
|
|
||||||
hide-bottom-space
|
|
||||||
@update:model-value="getPosLevel()"
|
|
||||||
>
|
|
||||||
<template v-slot:no-option>
|
|
||||||
<q-item>
|
|
||||||
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</template>
|
|
||||||
</q-select>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<q-select
|
|
||||||
:readonly="formData.posName"
|
|
||||||
ref="posLevelRef"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
v-model="formData.posLevel"
|
|
||||||
:options="posLevelOp"
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
map-options
|
|
||||||
label="ระดับชั้นงาน"
|
|
||||||
:rules="[(val) => !!val || 'กรุณาเลือกระดับชั้นงาน']"
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-8">
|
<div class="col-12 text-bold">อัตราค่าจ้าง</div>
|
||||||
<q-input
|
<div class="col-4">
|
||||||
dense
|
<q-input
|
||||||
outlined
|
ref="rateOldMinRef"
|
||||||
v-model="formData.reson"
|
dense
|
||||||
label="หมายเหตุ"
|
outlined
|
||||||
/>
|
v-model="formData.rateOldMin"
|
||||||
</div>
|
label="ขั้นต่ำสุด"
|
||||||
|
mask="###,###,###,###"
|
||||||
|
reverse-fill-mask
|
||||||
|
:rules="[
|
||||||
|
(val) => !!val || `${'กรุณากรอกอัตราค่าจ้าง ขั้นต่ำสุด'}`,
|
||||||
|
]"
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<q-select
|
||||||
|
ref="groupOldRef"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
multiple
|
||||||
|
v-model="formData.groupOld"
|
||||||
|
label="กลุ่มของผังบัญชีอัตราค่าจ้าง"
|
||||||
|
:rules="[
|
||||||
|
(val) =>
|
||||||
|
!!val ||
|
||||||
|
`${'กรุณาเลือกอัตราค่าจ้าง กลุ่มของผังบัญชีอัตราค่าจ้าง'}`,
|
||||||
|
]"
|
||||||
|
:options="groupOldOp"
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<q-input
|
||||||
|
ref="rateMaxOldRef"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="formData.rateMaxOld"
|
||||||
|
label="ขั้นสูงสุดเดิม"
|
||||||
|
mask="###,###,###,###"
|
||||||
|
reverse-fill-mask
|
||||||
|
:rules="[
|
||||||
|
(val) =>
|
||||||
|
!!val || `${'กรุณากรอกอัตราค่าจ้าง ขั้นสูงสุดเดิม'}`,
|
||||||
|
]"
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-12 text-bold">อัตราค่าจ้าง</div>
|
<div class="col-12 text-bold">
|
||||||
<div class="col-4">
|
อัตราค่าจ้างสูงกว่าอัตราค่าจ้างขั้นสูงของตำแหน่งที่ได้รับแต่งตั้งในแต่ละระดับ
|
||||||
<q-input
|
</div>
|
||||||
ref="rateOldMinRef"
|
<div class="col-4">
|
||||||
dense
|
<q-select
|
||||||
outlined
|
ref="groupRateHighRef"
|
||||||
v-model="formData.rateOldMin"
|
dense
|
||||||
label="ขั้นต่ำสุด"
|
outlined
|
||||||
mask="###,###,###,###"
|
v-model="formData.groupRateHigh"
|
||||||
reverse-fill-mask
|
label="กลุ่มบัญชีค่าจ้าง"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอกอัตราค่าจ้าง ขั้นต่ำสุด'}`,
|
(val) => !!val || `${'กรุณากรอกเลือกกลุ่มบัญชีค่าจ้าง'}`,
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
:options="groupOldOp"
|
||||||
/>
|
map-options
|
||||||
</div>
|
option-label="name"
|
||||||
<div class="col-4">
|
option-value="id"
|
||||||
<q-select
|
emit-value
|
||||||
ref="groupOldRef"
|
hide-bottom-space
|
||||||
dense
|
/>
|
||||||
outlined
|
</div>
|
||||||
multiple
|
<div class="col-4">
|
||||||
v-model="formData.groupOld"
|
<q-input
|
||||||
label="กลุ่มของผังบัญชีอัตราค่าจ้าง"
|
ref="rateHighMaxRef"
|
||||||
:rules="[
|
dense
|
||||||
(val) =>
|
outlined
|
||||||
!!val ||
|
v-model="formData.rateHighMax"
|
||||||
`${'กรุณาเลือกอัตราค่าจ้าง กลุ่มของผังบัญชีอัตราค่าจ้าง'}`,
|
label="อัตราค่าจ้างขั้นสูงใหม่"
|
||||||
]"
|
mask="###,###,###,###"
|
||||||
:options="groupOldOp"
|
reverse-fill-mask
|
||||||
map-options
|
:rules="[
|
||||||
option-label="name"
|
(val) => !!val || `${'กรุณากรอกอัตราค่าจ้างขั้นสูงใหม่'}`,
|
||||||
option-value="id"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
|
||||||
<q-input
|
|
||||||
ref="rateMaxOldRef"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
v-model="formData.rateMaxOld"
|
|
||||||
label="ขั้นสูงสุดเดิม"
|
|
||||||
mask="###,###,###,###"
|
|
||||||
reverse-fill-mask
|
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณากรอกอัตราค่าจ้าง ขั้นสูงสุดเดิม'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12 text-bold">
|
|
||||||
อัตราค่าจ้างสูงกว่าอัตราค่าจ้างขั้นสูงของตำแหน่งที่ได้รับแต่งตั้งในแต่ละระดับ
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<q-select
|
|
||||||
ref="groupRateHighRef"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
v-model="formData.groupRateHigh"
|
|
||||||
label="กลุ่มบัญชีค่าจ้าง"
|
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณากรอกเลือกกลุ่มบัญชีค่าจ้าง'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
:options="groupOldOp"
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
emit-value
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<q-input
|
|
||||||
ref="rateHighMaxRef"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
v-model="formData.rateHighMax"
|
|
||||||
label="อัตราค่าจ้างขั้นสูงใหม่"
|
|
||||||
mask="###,###,###,###"
|
|
||||||
reverse-fill-mask
|
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณากรอกอัตราค่าจ้างขั้นสูงใหม่'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</q-card-section>
|
||||||
</q-card-section>
|
<q-separator />
|
||||||
<q-separator />
|
|
||||||
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
<q-btn label="บันทึก" color="secondary" @click="onClickSubmit"
|
<q-btn label="บันทึก" color="secondary" type="submit"
|
||||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted, watch } from "vue";
|
import { ref, reactive, onMounted, watch } from "vue";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
/** importType*/
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
ListData,
|
ListData,
|
||||||
ResponseData,
|
ResponseData,
|
||||||
|
|
@ -9,28 +14,17 @@ import type {
|
||||||
NewPagination,
|
NewPagination,
|
||||||
DataOption,
|
DataOption,
|
||||||
} from "@/modules/13_salary/interface/index/Main";
|
} from "@/modules/13_salary/interface/index/Main";
|
||||||
import DialogFormCriteria from "@/modules/13_salary/components/salaryEmployeeChart/DialogFormCriteria.vue";
|
import type { PosType } from "@/modules/13_salary/interface/response/salaryEmployeeChart";
|
||||||
|
|
||||||
/** importType*/
|
/** importCompopnents*/
|
||||||
import type { QTableProps } from "quasar";
|
import DialogFormCriteria from "@/modules/13_salary/components/salaryEmployeeChart/DialogFormCriteria.vue";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
|
|
||||||
const posTypeOp = ref<DataOption[]>([]);
|
|
||||||
const posType = ref<string>("");
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const {
|
const { dialogRemove, messageError, showLoader, hideLoader, success } =
|
||||||
date2Thai,
|
useCounterMixin();
|
||||||
dialogRemove,
|
|
||||||
messageError,
|
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
success,
|
|
||||||
} = useCounterMixin();
|
|
||||||
|
|
||||||
/** ข้อมูล Table*/
|
/** ข้อมูล Table*/
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
|
@ -138,7 +132,6 @@ const visibleColumns = ref<string[]>([
|
||||||
"rateHighMax",
|
"rateHighMax",
|
||||||
"reson",
|
"reson",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const rows = ref<ListData[]>([]);
|
const rows = ref<ListData[]>([]);
|
||||||
|
|
||||||
const formFilter = reactive({
|
const formFilter = reactive({
|
||||||
|
|
@ -146,23 +139,34 @@ const formFilter = reactive({
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keyword: "",
|
keyword: "",
|
||||||
});
|
});
|
||||||
const maxPage = ref<number>(1);
|
|
||||||
const totalList = ref<number>(0);
|
|
||||||
|
|
||||||
function filterFn() {
|
|
||||||
formFilter.page = 1;
|
|
||||||
getData();
|
|
||||||
}
|
|
||||||
|
|
||||||
const pagination = ref({
|
|
||||||
page: formFilter.page,
|
|
||||||
rowsPerPage: formFilter.pageSize,
|
|
||||||
});
|
|
||||||
|
|
||||||
const modalForm = ref<boolean>(false);
|
const modalForm = ref<boolean>(false);
|
||||||
const isStatusEdit = ref<boolean>(false);
|
const isStatusEdit = ref<boolean>(false);
|
||||||
const dataRow = ref<any>({});
|
const dataRow = ref<ListData>();
|
||||||
|
|
||||||
|
const posTypeOp = ref<DataOption[]>([]);
|
||||||
|
const posType = ref<string>("");
|
||||||
|
const maxPage = ref<number>(1);
|
||||||
|
const totalList = ref<number>(0);
|
||||||
|
|
||||||
|
/** ดึงข้อมูลกลุ่มงาน */
|
||||||
|
function getPosType() {
|
||||||
|
http
|
||||||
|
.get(config.API.salaryEmployeePosType())
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
|
||||||
|
posTypeOp.value = data.map((item: PosType) => ({
|
||||||
|
id: item.id,
|
||||||
|
name: item.posTypeName,
|
||||||
|
}));
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ดึงข้อมูลรายการหลักเกณฑ์ */
|
||||||
function getData() {
|
function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
@ -188,42 +192,61 @@ function getData() {
|
||||||
}));
|
}));
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function editPopup(params: any) {
|
/**
|
||||||
|
* เปิด dialog แก้ไขหลักเกณฑ์
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
function editPopup(params: ListData) {
|
||||||
modalForm.value = true;
|
modalForm.value = true;
|
||||||
isStatusEdit.value = true;
|
isStatusEdit.value = true;
|
||||||
dataRow.value = params;
|
dataRow.value = params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function fetch ข้อมูลรายการตามหน้า
|
||||||
|
* @param val หน้า
|
||||||
|
*/
|
||||||
function updatePage(val: number) {
|
function updatePage(val: number) {
|
||||||
formFilter.page = val;
|
formFilter.page = val;
|
||||||
getData();
|
getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function อัปเดทแถวต่อหน้า*/
|
||||||
function updatePageSize(newPagination: NewPagination) {
|
function updatePageSize(newPagination: NewPagination) {
|
||||||
formFilter.page = 1;
|
formFilter.page = 1;
|
||||||
formFilter.pageSize = newPagination.rowsPerPage;
|
formFilter.pageSize = newPagination.rowsPerPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ลบรายการหลักเกณฑ์
|
||||||
|
* @param id หลักเกณฑ์
|
||||||
|
*/
|
||||||
function onClickDelete(id: string) {
|
function onClickDelete(id: string) {
|
||||||
dialogRemove($q, () => {
|
dialogRemove($q, () => {
|
||||||
|
showLoader();
|
||||||
http
|
http
|
||||||
.delete(config.API.salaryFormula() + `/${id}`)
|
.delete(config.API.salaryFormula() + `/${id}`)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getData();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
|
getData();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** callbackFuntioon ทำงานเมื่อมี่การอัปเดทแถว */
|
||||||
watch(
|
watch(
|
||||||
() => formFilter.pageSize,
|
() => formFilter.pageSize,
|
||||||
() => {
|
() => {
|
||||||
|
|
@ -231,23 +254,17 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
/** ดึงข้อมูลกลุ่มงาน */
|
/** functionn fetch ข้อมูลรายการหน้าแรก*/
|
||||||
function getPosType() {
|
function filterFn() {
|
||||||
http
|
formFilter.page = 1;
|
||||||
.get(config.API.salaryEmployeePosType())
|
getData();
|
||||||
.then((res) => {
|
|
||||||
const data = res.data.result;
|
|
||||||
posTypeOp.value = data.map((item: any) => ({
|
|
||||||
id: item.id,
|
|
||||||
name: item.posTypeName,
|
|
||||||
}));
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const pagination = ref({
|
||||||
|
page: formFilter.page,
|
||||||
|
rowsPerPage: formFilter.pageSize,
|
||||||
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
getPosType();
|
getPosType();
|
||||||
|
|
@ -267,14 +284,14 @@ onMounted(() => {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
@update:model-value="getData"
|
@update:model-value="filterFn"
|
||||||
>
|
>
|
||||||
<template v-if="posType" v-slot:append>
|
<template v-if="posType" v-slot:append>
|
||||||
<q-icon
|
<q-icon
|
||||||
name="cancel"
|
name="cancel"
|
||||||
@click.stop.prevent="
|
@click.stop.prevent="
|
||||||
posType = '';
|
posType = '';
|
||||||
getData();
|
filterFn();
|
||||||
"
|
"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
/>
|
/>
|
||||||
|
|
@ -347,16 +364,6 @@ onMounted(() => {
|
||||||
1
|
1
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div v-else-if="col.name === 'group'">
|
|
||||||
{{ col.value ? `กลุ่มที่ (${col.value})` : "-" }}
|
|
||||||
</div> -->
|
|
||||||
<!-- <div v-else-if="col.name === 'isActive'">
|
|
||||||
<q-icon
|
|
||||||
:name="col.value ? 'done' : 'close'"
|
|
||||||
:color="col.value ? 'primary' : 'grey'"
|
|
||||||
size="24px"
|
|
||||||
></q-icon>
|
|
||||||
</div> -->
|
|
||||||
<div
|
<div
|
||||||
v-else-if="
|
v-else-if="
|
||||||
col.name == 'rateOldMin' ||
|
col.name == 'rateOldMin' ||
|
||||||
|
|
@ -370,7 +377,6 @@ onMounted(() => {
|
||||||
<span v-for="(item, index) in col.value">
|
<span v-for="(item, index) in col.value">
|
||||||
{{ item }}{{ index + 1 == col.value.length ? "" : "," }}
|
{{ item }}{{ index + 1 == col.value.length ? "" : "," }}
|
||||||
</span>
|
</span>
|
||||||
<!-- {{ col.value }} -->
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>{{ col.value != "" ? col.value : "-" }}</div>
|
<div v-else>{{ col.value != "" ? col.value : "-" }}</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,10 @@ const formFilter = reactive<FormFilter>({
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
const totalList = ref<number>(0);
|
const totalList = ref<number>(0);
|
||||||
|
|
||||||
|
const modalDialogEmployeeChart = ref<boolean>(false);
|
||||||
|
const isStatusEdit = ref<boolean>(false);
|
||||||
|
const dataRow = ref<EmployeeSalary>();
|
||||||
|
|
||||||
/** ข้อมูล Table*/
|
/** ข้อมูล Table*/
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -111,6 +115,7 @@ const itemMenu = ref<ItemsMenu[]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/** function fetch ข้แมูลรายาการผังบัญชีค่าจ้างลูกจ้างประจำ */
|
||||||
function fetchListChart() {
|
function fetchListChart() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
@ -131,6 +136,11 @@ function fetchListChart() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function เลือกเมนู
|
||||||
|
* @param type ประเทภเมนู
|
||||||
|
* @param data ข้อมูลผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
*/
|
||||||
function onClickAction(type: string, data: EmployeeSalary) {
|
function onClickAction(type: string, data: EmployeeSalary) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "edit":
|
case "edit":
|
||||||
|
|
@ -145,12 +155,15 @@ function onClickAction(type: string, data: EmployeeSalary) {
|
||||||
case "copy":
|
case "copy":
|
||||||
onCoppy(data.id);
|
onCoppy(data.id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function openDialog แก้ไขผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
* @param data ข้อมูลผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
*/
|
||||||
function onEdit(data: EmployeeSalary) {
|
function onEdit(data: EmployeeSalary) {
|
||||||
modalDialogEmployeeChart.value = true;
|
modalDialogEmployeeChart.value = true;
|
||||||
isStatusEdit.value = true;
|
isStatusEdit.value = true;
|
||||||
|
|
@ -160,16 +173,30 @@ function onEdit(data: EmployeeSalary) {
|
||||||
const modalDialogUpload = ref<boolean>(false);
|
const modalDialogUpload = ref<boolean>(false);
|
||||||
const salaryChartId = ref<string>("");
|
const salaryChartId = ref<string>("");
|
||||||
const isActive = ref<boolean>(false);
|
const isActive = ref<boolean>(false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function เปิด Dialog อัปโหลดเอกสารอ้างอิง
|
||||||
|
* @param id ผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
* @param status สะถานะการใช่งาน
|
||||||
|
*/
|
||||||
function onUpload(id: string, status: boolean) {
|
function onUpload(id: string, status: boolean) {
|
||||||
modalDialogUpload.value = true;
|
modalDialogUpload.value = true;
|
||||||
salaryChartId.value = id;
|
salaryChartId.value = id;
|
||||||
isActive.value = status;
|
isActive.value = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* functiuon redirect page อัตราค่าจ้าง
|
||||||
|
* @param id ผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
*/
|
||||||
function onSalaryRate(id: string) {
|
function onSalaryRate(id: string) {
|
||||||
router.push(`/salary-employee/rate/${id}`);
|
router.push(`/salary-employee/rate/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* funtion คัดลอกรายการผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
* @param id ผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
*/
|
||||||
function onCoppy(id: string) {
|
function onCoppy(id: string) {
|
||||||
http
|
http
|
||||||
.post(config.API.salaryEmployeeChartCopy, { id: id })
|
.post(config.API.salaryEmployeeChartCopy, { id: id })
|
||||||
|
|
@ -181,6 +208,11 @@ function onCoppy(id: string) {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* funtion ลบรายการผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
* @param id ผังบัญชีค่าจ้างลูกจ้างประจำ
|
||||||
|
*/
|
||||||
function onClickDelete(id: string) {
|
function onClickDelete(id: string) {
|
||||||
dialogRemove($q, () => {
|
dialogRemove($q, () => {
|
||||||
http
|
http
|
||||||
|
|
@ -195,29 +227,34 @@ function onClickDelete(id: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const modalDialogEmployeeChart = ref<boolean>(false);
|
/** function เปิด dialog เพิ่มผังบัญชีค่าจ้างลูกจ้างประจำ*/
|
||||||
const isStatusEdit = ref<boolean>(false);
|
|
||||||
const dataRow = ref<EmployeeSalary>();
|
|
||||||
function onClickAdd() {
|
function onClickAdd() {
|
||||||
modalDialogEmployeeChart.value = true;
|
modalDialogEmployeeChart.value = true;
|
||||||
isStatusEdit.value = false;
|
isStatusEdit.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** functionn fetch ข้อมูลรายการหน้าแรก*/
|
||||||
function filterFn() {
|
function filterFn() {
|
||||||
formFilter.page = 1;
|
formFilter.page = 1;
|
||||||
fetchListChart();
|
fetchListChart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function fetch ข้อมูลรายการตามหน้า
|
||||||
|
* @param val หน้า
|
||||||
|
*/
|
||||||
function updatePage(val: number) {
|
function updatePage(val: number) {
|
||||||
formFilter.page = val;
|
formFilter.page = val;
|
||||||
fetchListChart();
|
fetchListChart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function อัปเดทแถวต่อหน้า*/
|
||||||
function updatePageSize(newPagination: NewPagination) {
|
function updatePageSize(newPagination: NewPagination) {
|
||||||
formFilter.page = 1;
|
formFilter.page = 1;
|
||||||
formFilter.pageSize = newPagination.rowsPerPage;
|
formFilter.pageSize = newPagination.rowsPerPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** callbackFuntioon ทำงานเมื่อมี่การอัปเดทแถว */
|
||||||
watch(
|
watch(
|
||||||
() => formFilter.pageSize,
|
() => formFilter.pageSize,
|
||||||
() => {
|
() => {
|
||||||
|
|
|
||||||
|
|
@ -1,58 +1,38 @@
|
||||||
interface ObjectCharRef {
|
|
||||||
name: object | null;
|
|
||||||
group: object | null;
|
|
||||||
|
|
||||||
[key: string]: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ObjectReteRef {
|
|
||||||
posType: object | null
|
|
||||||
posName: object | null
|
|
||||||
posLevel: object | null
|
|
||||||
rateOldMin: object | null
|
|
||||||
groupOld: object | null
|
|
||||||
rateMaxOld: object | null
|
|
||||||
groupRateHigh: object | null
|
|
||||||
rateHighMax: object | null
|
|
||||||
|
|
||||||
[key: string]: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DataOptions {
|
interface DataOptions {
|
||||||
id: string
|
id: string;
|
||||||
name: string
|
name: string;
|
||||||
}
|
}
|
||||||
interface DataListOptions {
|
interface DataListOptions {
|
||||||
id: string
|
id: string;
|
||||||
posDictName: string
|
posDictName: string;
|
||||||
posTypeId: string
|
posTypeId: string;
|
||||||
posTypeName: string
|
posTypeName: string;
|
||||||
posLevelId: string
|
posLevelId: string;
|
||||||
posLevelName: number
|
posLevelName: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ListData {
|
interface ListData {
|
||||||
id: string
|
id: string;
|
||||||
posType: string
|
posType: string;
|
||||||
posName: string
|
posName: string;
|
||||||
posLevel: string
|
posLevel: string;
|
||||||
rateOldMin: string
|
rateOldMin: string;
|
||||||
groupOld: Array<number>
|
groupOld: Array<number>;
|
||||||
rateMaxOld: string
|
rateMaxOld: string;
|
||||||
groupRateHigh: string
|
groupRateHigh: string;
|
||||||
rateHighMax: string
|
rateHighMax: string;
|
||||||
reson: string
|
reson: string;
|
||||||
}
|
}
|
||||||
interface ResponseData {
|
interface ResponseData {
|
||||||
id: string
|
id: string;
|
||||||
posLevel: string
|
posLevel: string;
|
||||||
position: string
|
position: string;
|
||||||
posType: string
|
posType: string;
|
||||||
details: string
|
details: string;
|
||||||
salaryMin: string
|
salaryMin: string;
|
||||||
salary: string
|
salary: string;
|
||||||
salaryMax: string
|
salaryMax: string;
|
||||||
group: string
|
group: string;
|
||||||
salaryEmployeeMin: Array<number>
|
salaryEmployeeMin: Array<number>;
|
||||||
}
|
}
|
||||||
export type { ObjectCharRef, ObjectReteRef, DataOptions, DataListOptions, ListData,ResponseData };
|
export type { DataOptions, DataListOptions, ListData, ResponseData };
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,10 @@ interface FormDataRate {
|
||||||
salaryDay: number;
|
salaryDay: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { FormDataChar, FormFilter, FormDataRate };
|
interface FormDataRateEpm {
|
||||||
|
salaryNo: null | number | string;
|
||||||
|
salaryMonth: null | number | string;
|
||||||
|
salaryDay: null | number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type { FormDataChar, FormFilter, FormDataRate, FormDataRateEpm };
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,19 @@ interface EmployeeRateSalary {
|
||||||
salaryMonth: number;
|
salaryMonth: number;
|
||||||
step: number;
|
step: number;
|
||||||
}
|
}
|
||||||
export type { EmployeeSalary, EmployeeRateSalary };
|
|
||||||
|
interface PosType {
|
||||||
|
id: string;
|
||||||
|
posLevels: PosLevel[];
|
||||||
|
posTypeName: string;
|
||||||
|
posTypeRank: number;
|
||||||
|
posTypeShortName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PosLevel {
|
||||||
|
id: string;
|
||||||
|
posLevelAuthority: string;
|
||||||
|
posLevelName: number;
|
||||||
|
posLevelRank: number;
|
||||||
|
}
|
||||||
|
export type { EmployeeSalary, EmployeeRateSalary, PosType };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue