ปรับ ระบบ บรรจุ
This commit is contained in:
parent
ad66cacc1e
commit
94afaca07b
13 changed files with 770 additions and 734 deletions
|
|
@ -45,8 +45,15 @@ const store = useProfileDataStore();
|
|||
const { profileData, changeProfileColumns } = store;
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||
mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
dateToISO,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>("");
|
||||
const certificateNo = ref<string>();
|
||||
|
|
@ -313,15 +320,11 @@ const clickAdd = async () => {
|
|||
* กดบันทึกใน dialog
|
||||
*/
|
||||
const clickSave = async () => {
|
||||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
if (modalEdit.value) {
|
||||
await editData();
|
||||
} else {
|
||||
await saveData();
|
||||
}
|
||||
}
|
||||
});
|
||||
if (modalEdit.value) {
|
||||
await dialogConfirm($q, () => editData());
|
||||
} else {
|
||||
await dialogConfirm($q, () => saveData());
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -476,6 +479,7 @@ const addData = () => {
|
|||
* ฟังก์ชันปุ่มยกเลิกการแก้ไขข้อมูล
|
||||
*/
|
||||
const clickCancel = async () => {
|
||||
myForm.value.resetValidation()
|
||||
if (editRow.value == true) {
|
||||
$q.dialog({
|
||||
title: `ข้อมูลมีการแก้ไข`,
|
||||
|
|
@ -618,7 +622,12 @@ const getClass = (val: boolean) => {
|
|||
<!-- popup Edit window-->
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card style="width: 600px">
|
||||
<q-form ref="myForm">
|
||||
<q-form
|
||||
ref="myForm"
|
||||
greedy
|
||||
@submit.prevent
|
||||
@validation-success="clickSave"
|
||||
>
|
||||
<DialogHeader
|
||||
:tittle="
|
||||
profileType == 'employee'
|
||||
|
|
@ -630,7 +639,7 @@ const getClass = (val: boolean) => {
|
|||
<q-separator />
|
||||
<q-card-section class="q-p-sm">
|
||||
<div
|
||||
class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs"
|
||||
class="row col-12 items-top q-col-gutter-x-xs q-col-gutter-y-xs"
|
||||
>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
|
|
@ -772,8 +781,6 @@ const getClass = (val: boolean) => {
|
|||
<DialogFooter
|
||||
:cancel="clickCancel"
|
||||
:edit="clickEdit"
|
||||
:save="clickSave"
|
||||
:validate="validateData"
|
||||
:clickNext="clickNext"
|
||||
:clickPrevious="clickPrevious"
|
||||
:clickDelete="clickDelete"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue