ทะเบียนประวัติ => ข้อมูลลูกจ้าง ปรับ load
This commit is contained in:
parent
ad53e6bd54
commit
9f4aeec575
2 changed files with 17 additions and 18 deletions
|
|
@ -27,7 +27,6 @@ const {
|
|||
date2Thai,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
dialogMessageNotify,
|
||||
} = useCounterMixin();
|
||||
|
||||
const profileId = ref<string>(
|
||||
|
|
@ -124,9 +123,9 @@ function onSubmit() {
|
|||
showLoader();
|
||||
http
|
||||
.put(config.API.informationEmployee(profileId.value), formData)
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
fetchData();
|
||||
.then(async () => {
|
||||
await fetchData();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
onCloseDialog();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -386,7 +385,7 @@ onMounted(() => {
|
|||
</q-card>
|
||||
|
||||
<!-- Dialog แก้ไขข้อมูลลูกจ้างชั่วคราว -->
|
||||
<q-dialog v-model="modalEdit" persistent full-width>
|
||||
<q-dialog v-model="modalEdit" persistent>
|
||||
<q-card>
|
||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||
<DialogHeader
|
||||
|
|
@ -397,7 +396,7 @@ onMounted(() => {
|
|||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -409,7 +408,7 @@ onMounted(() => {
|
|||
:rules="[(val: string) => !!val || `${'กรุณากรอกกลุ่มงาน'}`]"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -421,7 +420,7 @@ onMounted(() => {
|
|||
:rules="[(val: string) => !!val || `${'กรุณากรอกสายงาน'}`]"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -433,7 +432,7 @@ onMounted(() => {
|
|||
:rules="[(val: string) => !!val || `${'กรุณากรอกตำแหน่งทางสายงาน'}`]"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -446,7 +445,7 @@ onMounted(() => {
|
|||
<!-- :rules="[(val: string) => !!val || `${'กรุณากรอกสังกัด'}`]" -->
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -458,7 +457,7 @@ onMounted(() => {
|
|||
/>
|
||||
<!-- :rules="[(val: string) => !!val || `${'กรุณากรอกประเภทบุคคล'}`]" -->
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -473,7 +472,7 @@ onMounted(() => {
|
|||
<!-- :rules="[(val: string) => !!val || `${'กรุณากรอกค่าจ้าง'}`]" -->
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -487,7 +486,7 @@ onMounted(() => {
|
|||
/>
|
||||
<!-- :rules="[(val: string) => !!val || `${'กรุณากรอกเงินเพิ่มการครองชึพชั่วคราว'}`]" -->
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -501,7 +500,7 @@ onMounted(() => {
|
|||
/>
|
||||
<!-- :rules="[(val: string) => !!val || `${'กรุณากรอกเงินช่วยเหลือการครองชึพชั่วคราว'}`]" -->
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -515,7 +514,7 @@ onMounted(() => {
|
|||
/>
|
||||
<!-- :rules="[(val: string) => !!val || `${'กรุณากรอกเงินสมทบประกันสังคม(ลูกจ้าง)'}`]" -->
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
|
|
|
|||
|
|
@ -156,9 +156,9 @@ function onSubmit() {
|
|||
const methods = isEdit.value ? "put" : "post";
|
||||
const id = isEdit.value ? employmentId.value : profileId.value;
|
||||
http[methods](config.API.employmentEmployee(id), formData)
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
fetchListEmployment();
|
||||
.then(async () => {
|
||||
await fetchListEmployment();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
onCloseDialog();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue