รายการเงินเดือน
This commit is contained in:
parent
42badd9978
commit
84978b8ada
4 changed files with 18 additions and 18 deletions
|
|
@ -34,7 +34,7 @@ function close() {
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
if (amount.value) {
|
if (amount.value !== null) {
|
||||||
const amountString: string = amount.value.toString();
|
const amountString: string = amount.value.toString();
|
||||||
const body = {
|
const body = {
|
||||||
profileId: profileId.value,
|
profileId: profileId.value,
|
||||||
|
|
@ -58,13 +58,6 @@ function onSubmit() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function inputEdit(val: boolean) {
|
|
||||||
return {
|
|
||||||
"full-width cursor-pointer inputgreen ": val,
|
|
||||||
"full-width cursor-pointer inputgreen": !val,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -76,7 +69,6 @@ function inputEdit(val: boolean) {
|
||||||
<q-card-section class="scroll" style="max-height: 70vh">
|
<q-card-section class="scroll" style="max-height: 70vh">
|
||||||
<div class="q-gutter-y-sm">
|
<div class="q-gutter-y-sm">
|
||||||
<q-input
|
<q-input
|
||||||
ref="salaryRef"
|
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="amount"
|
v-model="amount"
|
||||||
|
|
@ -92,7 +84,6 @@ function inputEdit(val: boolean) {
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<form @submit.prevent="validateForm">
|
<form @submit.prevent="validateForm">
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
<!-- <q-btn flat label="OK" v-close-popup /> -->
|
|
||||||
<q-btn
|
<q-btn
|
||||||
type="submit"
|
type="submit"
|
||||||
for="#submitForm"
|
for="#submitForm"
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,17 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const group = ref<string>("");
|
const group = ref<string>("");
|
||||||
|
const groupRef = ref<any>(null);
|
||||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
||||||
function validateForm() {
|
function validateForm() {
|
||||||
onSubmit();
|
groupRef.value.validate();
|
||||||
|
if (groupRef.value.validate()) {
|
||||||
|
onSubmit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
|
|
@ -76,7 +80,7 @@ function inputEdit(val: boolean) {
|
||||||
<q-card-section class="scroll" style="max-height: 70vh">
|
<q-card-section class="scroll" style="max-height: 70vh">
|
||||||
<div class="q-gutter-y-sm">
|
<div class="q-gutter-y-sm">
|
||||||
<q-select
|
<q-select
|
||||||
ref="periodRef"
|
ref="groupRef"
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
v-model="group"
|
v-model="group"
|
||||||
label="กลุ่ม"
|
label="กลุ่ม"
|
||||||
|
|
@ -87,7 +91,7 @@ function inputEdit(val: boolean) {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:options="store.groupOp.filter((e) => e.name !== props.group)"
|
:options="store.groupOp.filter((e) => e.name !== props.group)"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกรอบการขึ้นเงินเดือน'}`]"
|
:rules="[(val) => !!val || `${'กรุณากลุ่ม'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ const store = useSalaryListSDataStore();
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const profileId = defineModel<string>("profileId", { required: true });
|
const profileId = defineModel<string>("profileId", { required: true });
|
||||||
const type = ref<string>("");
|
const type = ref<string>("");
|
||||||
|
const typeRef = ref<any>(null);
|
||||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
@ -25,14 +26,17 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
const typeOp = ref<DataOption[]>([
|
const typeOp = ref<DataOption[]>([
|
||||||
{ id: "NONE", name: "ไม่ได้เลื่อน" },
|
{ id: "NONE", name: "ไม่ได้เลื่อน" },
|
||||||
{ id: "HAFT", name: "ครึ่งขั้น" },
|
{ id: "HAFT", name: "0.5 ขั้น" },
|
||||||
{ id: "FULL", name: "1ขั้น" },
|
{ id: "FULL", name: "1 ขั้น" },
|
||||||
{ id: "FULLHAFT", name: "1.5ขั้น" },
|
{ id: "FULLHAFT", name: "1.5 ขั้น" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
||||||
function validateForm() {
|
function validateForm() {
|
||||||
onSubmit();
|
typeRef.value.validate();
|
||||||
|
if (typeRef.value.validate()) {
|
||||||
|
onSubmit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
|
|
@ -80,7 +84,7 @@ function inputEdit(val: boolean) {
|
||||||
<q-card-section class="scroll" style="max-height: 70vh">
|
<q-card-section class="scroll" style="max-height: 70vh">
|
||||||
<div class="q-gutter-y-sm">
|
<div class="q-gutter-y-sm">
|
||||||
<q-select
|
<q-select
|
||||||
ref="periodRef"
|
ref="typeRef"
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
v-model="type"
|
v-model="type"
|
||||||
label="เลื่อนขั้น"
|
label="เลื่อนขั้น"
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,7 @@ function changeTabType() {
|
||||||
|
|
||||||
function updatePagination() {
|
function updatePagination() {
|
||||||
store.groupId && fetchDataPeriod(store.groupId);
|
store.groupId && fetchDataPeriod(store.groupId);
|
||||||
|
store.groupId && fetchDataQuota(store.groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue