รายการเงินเดือน =>ปรับ validate
This commit is contained in:
parent
9fb2a155fa
commit
df58602563
3 changed files with 7 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -24,9 +25,13 @@ const props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const amountRef = ref<any>();
|
||||
|
||||
/** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
||||
function validateForm() {
|
||||
onSubmit();
|
||||
if (amountRef.value.validate()) {
|
||||
onSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
/** function ปืด Popup */
|
||||
|
|
@ -73,6 +78,7 @@ function onSubmit() {
|
|||
<q-card-section class="scroll" style="max-height: 70vh">
|
||||
<div class="q-gutter-y-sm">
|
||||
<q-input
|
||||
ref="amountRef"
|
||||
dense
|
||||
outlined
|
||||
v-model="amount"
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ const isReadonly = ref<boolean>(false); // อ่านได้อย่าง
|
|||
|
||||
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
||||
function validateForm() {
|
||||
groupRef.value.validate();
|
||||
if (groupRef.value.validate()) {
|
||||
onSubmit();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ const typeRangeOps = computed(() => {
|
|||
|
||||
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
||||
function validateForm() {
|
||||
typeRef.value.validate();
|
||||
if (typeRef.value.validate()) {
|
||||
onSubmit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue