no message
This commit is contained in:
parent
44a6ef192b
commit
d62a7e536c
1 changed files with 26 additions and 1 deletions
|
|
@ -16,7 +16,6 @@ import Header from "@/components/DialogHeader.vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { dialogConfirm, showLoader, hideLoader, messageError, success } =
|
const { dialogConfirm, showLoader, hideLoader, messageError, success } =
|
||||||
|
|
@ -39,6 +38,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const isReadonly = ref<boolean>(false);
|
||||||
const salaryId = ref<string>(route.params.id.toString());
|
const salaryId = ref<string>(route.params.id.toString());
|
||||||
const formData = reactive<FormSalaryRate>({
|
const formData = reactive<FormSalaryRate>({
|
||||||
salaryId: "",
|
salaryId: "",
|
||||||
|
|
@ -170,6 +170,17 @@ watch(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* class จัดรูปแบบแสดงระหว่างข้อมูลที่แก้ไขหรือแสดงเฉยๆ
|
||||||
|
* @param val ข้อมูล input สำหรับแก้ไขหรือไม่
|
||||||
|
*/
|
||||||
|
const getClass = (val: boolean) => {
|
||||||
|
return {
|
||||||
|
"full-width inputgreen cursor-pointer": val,
|
||||||
|
"full-width cursor-pointer": !val,
|
||||||
|
};
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -184,6 +195,8 @@ watch(
|
||||||
<div class="row col-xs-12 col-md-12 q-col-gutter-sm">
|
<div class="row col-xs-12 col-md-12 q-col-gutter-sm">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
:readonly="isReadonly"
|
||||||
|
:class="getClass(!isReadonly)"
|
||||||
ref="salaryRef"
|
ref="salaryRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -201,6 +214,8 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
:readonly="isReadonly"
|
||||||
|
:class="getClass(!isReadonly)"
|
||||||
ref="salaryHalfRef"
|
ref="salaryHalfRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -215,6 +230,8 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
:readonly="isReadonly"
|
||||||
|
:class="getClass(!isReadonly)"
|
||||||
ref="salaryHalfSpecialRef"
|
ref="salaryHalfSpecialRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -228,6 +245,8 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
:readonly="isReadonly"
|
||||||
|
:class="getClass(!isReadonly)"
|
||||||
ref="salaryFullRef"
|
ref="salaryFullRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -242,6 +261,8 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
:readonly="isReadonly"
|
||||||
|
:class="getClass(!isReadonly)"
|
||||||
ref="salaryFullSpecialRef"
|
ref="salaryFullSpecialRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -255,6 +276,8 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
:readonly="isReadonly"
|
||||||
|
:class="getClass(!isReadonly)"
|
||||||
ref="salaryFullHalfRef"
|
ref="salaryFullHalfRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -269,6 +292,8 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-input
|
||||||
|
:readonly="isReadonly"
|
||||||
|
:class="getClass(!isReadonly)"
|
||||||
ref="salaryFullHalfSpecialRef"
|
ref="salaryFullHalfSpecialRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue