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