fix === > แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย ทุกระบบ
This commit is contained in:
parent
bcd5d1d56c
commit
d9bb320b16
17 changed files with 514 additions and 348 deletions
|
|
@ -4,7 +4,6 @@ import { useQuasar } from "quasar";
|
|||
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { tokenParsed } from "@/plugins/auth";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -38,6 +37,7 @@ const dataProfile = ref<DataProfile>(); //ข้อมุลส่วนตั
|
|||
const edit = ref<boolean>(false);
|
||||
const status = ref<string>("");
|
||||
const fullName = ref<string>("");
|
||||
const mainData = ref<any>();
|
||||
|
||||
const educationOld = ref<string>(""); //วุฒิ/สาขา
|
||||
const organizationPositionOld = ref<string>(""); //ตำแหน่ง/สังกัด
|
||||
|
|
@ -49,15 +49,14 @@ const date = ref<Date | null>(null); //ตั้งแต่วัน
|
|||
const militaryDate = ref<Date | null>(null); //พ้นราชการทหารเมื่อ
|
||||
const reason = ref<string>(""); //หมายเหตุ
|
||||
|
||||
/**
|
||||
* fetch รายละเอียดรายการอื่นๆ
|
||||
*/
|
||||
/** fetch รายละเอียดรายการอื่นๆ*/
|
||||
async function fetchData() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.otherByid(paramsId.toString()))
|
||||
.then((res: resApiData) => {
|
||||
const data = res.data.result;
|
||||
mainData.value = res.data.result;
|
||||
dataProfile.value = res.data.result as unknown as DataProfile;
|
||||
|
||||
fullName.value = `${data.prefix ?? "-"}${data.firstName ?? "-"} ${
|
||||
|
|
@ -86,9 +85,7 @@ async function fetchData() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ยืนยันการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
*/
|
||||
/** ยืนยันการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
||||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -128,7 +125,21 @@ function onSubmit() {
|
|||
*/
|
||||
function cancel() {
|
||||
edit.value = false;
|
||||
fetchData();
|
||||
const data = mainData.value;
|
||||
if (data) {
|
||||
educationOld.value = data.educationOld ?? "";
|
||||
organizationPositionOld.value = data.organizationPositionOld
|
||||
? data.organizationPositionOld
|
||||
: findOrgName(data);
|
||||
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||
posNo.value = data.positionNumberOld ?? "";
|
||||
salary.value = data.amountOld ?? "";
|
||||
date.value = data.positionDate ?? null;
|
||||
militaryDate.value = data.militaryDate ?? null;
|
||||
reason.value = data.reason ?? "";
|
||||
}
|
||||
// fetchData();
|
||||
myForm.value?.resetValidation();
|
||||
}
|
||||
|
||||
|
|
@ -309,24 +320,7 @@ onMounted(async () => {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-xs-6 col-sm-3 row">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="salary"
|
||||
:outlined="edit"
|
||||
dense
|
||||
:readonly="!edit"
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:borderless="!edit"
|
||||
:label="`${'เงินเดือน'}`"
|
||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
lazy-rules
|
||||
mask="###,###,###,###"
|
||||
reverse-fill-mask
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-xs-6 col-sm-4 row items-center">
|
||||
<div class="col-12">
|
||||
|
|
@ -351,7 +345,7 @@ onMounted(async () => {
|
|||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วันที่'}`]"
|
||||
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วันที่'}`]:[]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตั้งแต่วันที่'}`"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue