Merge branch 'develop' into devTee
This commit is contained in:
commit
c008cd5c81
13 changed files with 175 additions and 163 deletions
|
|
@ -36,7 +36,9 @@ const modalPersonal = ref<boolean>(false);
|
|||
const profileId = ref<string | null>("");
|
||||
|
||||
function fetchDataProfile(data: DataProfile) {
|
||||
fetchProfile(data.profileId);
|
||||
if (data.profileId) {
|
||||
fetchProfile(data.profileId);
|
||||
}
|
||||
profile.id = data.profileId;
|
||||
profile.fullName = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||
profile.position =
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ const {
|
|||
dialogMessageNotify,
|
||||
} = mixin;
|
||||
const { calculateAge, fetchPerson, filterSelector } = store;
|
||||
const props = defineProps({
|
||||
fetchDataPersonal: { type: Function, require: true },
|
||||
});
|
||||
|
||||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
);
|
||||
|
|
@ -291,6 +295,7 @@ async function editData() {
|
|||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
getData(), (modal.value = false);
|
||||
props.fetchDataPersonal?.();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ const profileId = ref<string>(route.params.id.toString());
|
|||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
const props = defineProps({
|
||||
fetchDataPersonal: { type: Function, require: true },
|
||||
});
|
||||
|
||||
const editId = ref<string>("");
|
||||
const dialog = ref<boolean>(false);
|
||||
|
|
@ -371,6 +374,7 @@ async function addData() {
|
|||
subId.value = res.data.result;
|
||||
|
||||
fetchData(profileId.value);
|
||||
props?.fetchDataPersonal?.();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -392,6 +396,7 @@ function editData(idData: string) {
|
|||
)
|
||||
.then(() => {
|
||||
fetchData(profileId.value);
|
||||
props.fetchDataPersonal?.();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataOption } from "@/modules/04_registryNew/interface/index/Main";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
|
|
@ -18,15 +19,8 @@ const route = useRoute();
|
|||
|
||||
const store = useProfileDataStore();
|
||||
const { fetchPerson, filterSelector } = store;
|
||||
const {
|
||||
dialogRemove,
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
date2Thai,
|
||||
} = useCounterMixin();
|
||||
const { dialogConfirm, showLoader, hideLoader, messageError, success } =
|
||||
useCounterMixin();
|
||||
|
||||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
|
|
@ -34,6 +28,8 @@ const profileId = ref<string>(
|
|||
const empType = ref<string>(
|
||||
route.name === "registryNewByid" ? "" : "-employee"
|
||||
);
|
||||
|
||||
/** TableHisoty*/
|
||||
const visibleColumns = ref<String[]>([
|
||||
"citizenId",
|
||||
"prefix",
|
||||
|
|
@ -102,8 +98,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
const rows = ref<any[]>([]);
|
||||
|
||||
const childData = ref<any[]>([{}]);
|
||||
const coupleData = ref<any[]>([{}]);
|
||||
/** ข้อมูล*/
|
||||
const fatherData = ref({
|
||||
isLive: 1,
|
||||
citizenId: "1231231231231",
|
||||
|
|
@ -112,7 +107,7 @@ const fatherData = ref({
|
|||
lastName: "หวังดี",
|
||||
job: "จอมพล",
|
||||
});
|
||||
const momData = ref({
|
||||
const motherData = ref({
|
||||
isLive: 0,
|
||||
citizenId: "1572476458930",
|
||||
prefix: "นาง",
|
||||
|
|
@ -120,6 +115,17 @@ const momData = ref({
|
|||
lastName: "มาดี",
|
||||
job: "พยาบาล",
|
||||
});
|
||||
const coupleData = ref<any>({
|
||||
isLive: 1,
|
||||
citizenId: "1231231231231",
|
||||
prefix: "นาย",
|
||||
firstName: "ตรีชาไทย",
|
||||
lastName: "หวังดี",
|
||||
job: "จอมพล",
|
||||
lastNameOld: "หวังดี",
|
||||
statusMarital: "แต่งงานแล้ว",
|
||||
});
|
||||
const childData = ref<any[]>([{}]);
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
const modalHistory = ref<boolean>(false);
|
||||
|
|
@ -129,8 +135,8 @@ const titleForm = ref<string>("");
|
|||
const typeForm = ref<string>("");
|
||||
const isEdit = ref<boolean>(false);
|
||||
|
||||
const optionRelationshipMain = ref<any>([]);
|
||||
const optionRelationship = ref<any>([]);
|
||||
const optionRelationshipMain = ref<DataOption[]>([]);
|
||||
const optionRelationship = ref<DataOption[]>([]);
|
||||
|
||||
const fromData = reactive({
|
||||
isLive: 0,
|
||||
|
|
@ -203,7 +209,7 @@ function fetchDataChildren() {
|
|||
function onSubmit(type: string) {
|
||||
dialogConfirm($q, () => {
|
||||
if (type === "father") {
|
||||
} else if (type === "mom") {
|
||||
} else if (type === "mother") {
|
||||
} else if (type === "couple") {
|
||||
} else if (type === "child") {
|
||||
submitChildren();
|
||||
|
|
@ -244,15 +250,15 @@ function onOpenDialogForm(
|
|||
fromData.lastName = fatherData.value.lastName;
|
||||
fromData.job = fatherData.value.job;
|
||||
}
|
||||
} else if (type === "mom") {
|
||||
} else if (type === "mother") {
|
||||
titleForm.value = "มารดา";
|
||||
if (isStatusEdit) {
|
||||
fromData.isLive = momData.value.isLive;
|
||||
fromData.citizenId = momData.value.citizenId;
|
||||
fromData.prefix = momData.value.prefix;
|
||||
fromData.firstName = momData.value.firstName;
|
||||
fromData.lastName = momData.value.lastName;
|
||||
fromData.job = momData.value.job;
|
||||
fromData.isLive = motherData.value.isLive;
|
||||
fromData.citizenId = motherData.value.citizenId;
|
||||
fromData.prefix = motherData.value.prefix;
|
||||
fromData.firstName = motherData.value.firstName;
|
||||
fromData.lastName = motherData.value.lastName;
|
||||
fromData.job = motherData.value.job;
|
||||
}
|
||||
} else if (type === "couple") {
|
||||
titleForm.value = "คู่สมรส";
|
||||
|
|
@ -269,38 +275,9 @@ function onOpenDialogForm(
|
|||
|
||||
function onOpenDialogHistory(type: string) {
|
||||
modalHistory.value = true;
|
||||
console.log(type);
|
||||
}
|
||||
|
||||
// function fetchData() {
|
||||
// const data = [
|
||||
// {
|
||||
// isLive: 0,
|
||||
// citizenId: "123456789101",
|
||||
// prefix: "นาง",
|
||||
// firstName: "บุษดี",
|
||||
// lastName: "มาดีหกหฟก",
|
||||
// job: "12",
|
||||
// lastNameOld: "",
|
||||
// statusMarital: "แต่งงาน",
|
||||
// },
|
||||
// ];
|
||||
// const data2 = [
|
||||
// {
|
||||
// isLive: 1,
|
||||
// citizenId: "123456789101",
|
||||
// prefix: "นาง",
|
||||
// firstName: "บุษดี",
|
||||
// lastName: "มาดีหกหฟก",
|
||||
// job: "12",
|
||||
// lastNameOld: "",
|
||||
// statusMarital: "แต่งงาน",
|
||||
// },
|
||||
// ];
|
||||
|
||||
// coupleData.value = data;
|
||||
// childData.value = data2;
|
||||
// }
|
||||
|
||||
function fetchDataRelationship() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -362,6 +339,8 @@ function submitChildren() {
|
|||
});
|
||||
}
|
||||
|
||||
function fetchHistory() {}
|
||||
|
||||
onMounted(() => {
|
||||
fetchDataFather();
|
||||
fetchDataMother();
|
||||
|
|
@ -457,7 +436,7 @@ onMounted(() => {
|
|||
icon="mdi-pencil-outline"
|
||||
size="14px"
|
||||
dense
|
||||
@click="onOpenDialogForm('mom', true)"
|
||||
@click="onOpenDialogForm('mother', true)"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
|
|
@ -468,7 +447,7 @@ onMounted(() => {
|
|||
color="info"
|
||||
icon="mdi-history"
|
||||
size="14px"
|
||||
@click="onOpenDialogHistory('mom')"
|
||||
@click="onOpenDialogHistory('mother')"
|
||||
>
|
||||
<q-tooltip>ประวัติการแก้ไขข้อมูลครอบครัว</q-tooltip></q-btn
|
||||
>
|
||||
|
|
@ -481,21 +460,21 @@ onMounted(() => {
|
|||
<div>เลขบัตรประจำตัวประชาชน</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
{{ momData.citizenId ? momData.citizenId : "-" }}
|
||||
{{ motherData.citizenId ? motherData.citizenId : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row items-center">
|
||||
<div class="col-2 text-grey-6 text-weight-medium">ชื่อ-นามสกุล</div>
|
||||
<div class="col-6">
|
||||
{{
|
||||
momData.prefix
|
||||
? momData.prefix + momData.firstName + " " + momData.lastName
|
||||
motherData.prefix
|
||||
? motherData.prefix + motherData.firstName + " " + motherData.lastName
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="col-1 text-grey-6 text-weight-medium">อาชีพ</div>
|
||||
<div class="col">
|
||||
{{ momData.job ? momData.job : "-" }}
|
||||
{{ motherData.job ? motherData.job : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row items-center">
|
||||
|
|
@ -503,7 +482,7 @@ onMounted(() => {
|
|||
สถานภาพการมีชีวิต
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<div v-if="momData.isLive">มีชีวิตอยู่</div>
|
||||
<div v-if="motherData.isLive">มีชีวิตอยู่</div>
|
||||
<div v-else>ถึงแก่กรรม</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -545,59 +524,56 @@ onMounted(() => {
|
|||
</div>
|
||||
</q-toolbar>
|
||||
|
||||
<div v-for="(item, index) in coupleData" :key="index">
|
||||
<q-card bordered class="bg-grey-1 q-pb-md">
|
||||
<div class="col-12 row q-py-sm q-px-md bg-grey-2 items-center">
|
||||
<div class="text-weight-medium q-pr-md">
|
||||
คู่สมรสที่ : {{ index + 1 }}
|
||||
<q-card bordered class="bg-grey-1 q-pb-md">
|
||||
<div class="col-12 row q-py-sm q-px-md bg-grey-2 items-center">
|
||||
<div class="text-weight-medium q-pr-md">คู่สมรส</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="col-12 q-pa-md q-col-gutter-md">
|
||||
<div class="row items-center">
|
||||
<div class="col-2 text-grey-6 text-weight-medium">
|
||||
<div>สถานภาพการสมรส</div>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
{{ coupleData.statusMarital }}
|
||||
</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="col-12 q-pa-md q-col-gutter-md">
|
||||
<div class="row items-center">
|
||||
<div class="col-2 text-grey-6 text-weight-medium">
|
||||
<div>สถานภาพการสมรส</div>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
{{ item.statusMarital }}
|
||||
</div>
|
||||
<div class="row items-center">
|
||||
<div class="col-2 text-grey-6 text-weight-medium">
|
||||
<div>เลขบัตรประจำตัวประชาชน</div>
|
||||
</div>
|
||||
<div class="row items-center">
|
||||
<div class="col-2 text-grey-6 text-weight-medium">
|
||||
<div>เลขบัตรประจำตัวประชาชน</div>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
{{ item.citizenId }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row items-center">
|
||||
<div class="col-2 text-grey-6 text-weight-medium">
|
||||
ชื่อ-นามสกุล
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{
|
||||
item.prefix
|
||||
? item.prefix + item.firstName + " " + item.lastName
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="col-1 text-grey-6 text-weight-medium">อาชีพ</div>
|
||||
<div class="col">
|
||||
{{ item.job }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row items-center">
|
||||
<div class="col-2 text-grey-6 text-weight-medium">
|
||||
สถานภาพการมีชีวิต
|
||||
</div>
|
||||
<div class="col">
|
||||
<div v-if="item.isLive">มีชีวิตอยู่</div>
|
||||
<div v-else>ถึงแก่กรรม</div>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
{{ coupleData.citizenId }}
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="row items-center">
|
||||
<div class="col-2 text-grey-6 text-weight-medium">ชื่อ-นามสกุล</div>
|
||||
<div class="col-6">
|
||||
{{
|
||||
coupleData.prefix
|
||||
? coupleData.prefix +
|
||||
coupleData.firstName +
|
||||
" " +
|
||||
coupleData.lastName
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="col-1 text-grey-6 text-weight-medium">อาชีพ</div>
|
||||
<div class="col">
|
||||
{{ coupleData.job }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row items-center">
|
||||
<div class="col-2 text-grey-6 text-weight-medium">
|
||||
สถานภาพการมีชีวิต
|
||||
</div>
|
||||
<div class="col">
|
||||
<div v-if="coupleData.isLive">มีชีวิตอยู่</div>
|
||||
<div v-else>ถึงแก่กรรม</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
<!-- • บุตร -->
|
||||
|
|
|
|||
|
|
@ -637,6 +637,8 @@ async function addData() {
|
|||
startYear: undefined,
|
||||
endYear: undefined,
|
||||
isDate: isDate.value === "false" ? false : true,
|
||||
profileId: empType.value === "" ? id.value : undefined,
|
||||
profileEmployeeId: empType.value !== "" ? id.value : undefined,
|
||||
})
|
||||
.then(() => {
|
||||
fetchData(id.value);
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ function editForm(row: any) {
|
|||
async function fetchData(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileNewAbilityByProfileId(id,empType.value))
|
||||
.get(config.API.profileNewAbilityByProfileId(id, empType.value))
|
||||
.then(async (res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
|
|
@ -243,7 +243,7 @@ async function fetchData(id: string) {
|
|||
async function fetchHistoryData(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileNewAbilityHisByAbilityId(id,empType.value))
|
||||
.get(config.API.profileNewAbilityHisByAbilityId(id, empType.value))
|
||||
.then(async (res) => {
|
||||
historyRows.value = res.data.result;
|
||||
})
|
||||
|
|
@ -261,6 +261,8 @@ async function addData() {
|
|||
...specialSkill,
|
||||
dateStart: null,
|
||||
dateEnd: null,
|
||||
profileId: empType.value === "" ? id.value : undefined,
|
||||
profileEmployeeId: empType.value !== "" ? id.value : undefined,
|
||||
})
|
||||
.then(() => {
|
||||
fetchData(id.value);
|
||||
|
|
@ -276,7 +278,7 @@ async function addData() {
|
|||
|
||||
async function editData(idData: string) {
|
||||
await http
|
||||
.patch(config.API.profileNewAbilityByAbilityId(idData,empType.value), {
|
||||
.patch(config.API.profileNewAbilityByAbilityId(idData, empType.value), {
|
||||
...specialSkill,
|
||||
dateStart: null,
|
||||
dateEnd: null,
|
||||
|
|
@ -297,7 +299,7 @@ async function editData(idData: string) {
|
|||
async function deleteData(idData: string) {
|
||||
dialogRemove($q, () =>
|
||||
http
|
||||
.delete(config.API.profileNewAbilityByAbilityId(idData,empType.value))
|
||||
.delete(config.API.profileNewAbilityByAbilityId(idData, empType.value))
|
||||
.then(() => {
|
||||
fetchData(id.value);
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ import SpecialSkill from "@/modules/04_registryNew/components/detail/PersonalInf
|
|||
import FamilyNew from "@/modules/04_registryNew/components/detail/PersonalInformation/04_FamilyNew.vue";
|
||||
|
||||
const tab = ref<string>("1");
|
||||
const props = defineProps({
|
||||
fetchDataPersonal: { type: Function, require: true },
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="row items-center q-my-md">
|
||||
|
|
@ -44,10 +47,10 @@ const tab = ref<string>("1");
|
|||
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="1">
|
||||
<Profile />
|
||||
<Profile :fetchDataPersonal="props.fetchDataPersonal"/>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="2">
|
||||
<NameChangeHistory />
|
||||
<NameChangeHistory :fetchDataPersonal="props.fetchDataPersonal" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="3">
|
||||
<Address />
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ import AchievementMain from "@/modules/04_registryNew/components/detail/Achievem
|
|||
import OtherMaim from "@/modules/04_registryNew/components/detail/Other/Main.vue";
|
||||
|
||||
const store = useRegistryDetailNewDataStore();
|
||||
const props = defineProps({
|
||||
fetchDataPersonal: { type: Function, require: true },
|
||||
});
|
||||
|
||||
const itemsTab = ref<any>([
|
||||
{
|
||||
|
|
@ -81,7 +84,10 @@ const splitterModel = ref<number>(12);
|
|||
:name="tab.name"
|
||||
class="q-pa-none"
|
||||
>
|
||||
<PersonalInformationMain v-if="store.tabMain === '1'" />
|
||||
<PersonalInformationMain
|
||||
v-if="store.tabMain === '1'"
|
||||
:fetchDataPersonal="props.fetchDataPersonal"
|
||||
/>
|
||||
<GovernmentInformationMain v-if="store.tabMain === '2'" />
|
||||
<salaryMain v-if="store.tabMain === '3'" />
|
||||
<AchievementMain v-if="store.tabMain === '4'" />
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@ onMounted(async () => {
|
|||
</q-card>
|
||||
|
||||
<q-card bordered class="q-mt-md rounded">
|
||||
<TabMain />
|
||||
<TabMain :fetchDataPersonal="fetchDataPersonal"/>
|
||||
</q-card>
|
||||
|
||||
<!-- Dialog แนบใบมรณบัตร -->
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { onMounted, ref } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
|
||||
import type {
|
||||
appointmentData,
|
||||
|
|
@ -119,7 +118,7 @@ const putAppointment = async () => {
|
|||
positionTypeOld: positionTypeOld.value,
|
||||
positionLevelOld: positionLevelOld.value,
|
||||
positionNumberOld: posNo.value,
|
||||
amountOld: Number(salary.value),
|
||||
amountOld: salary.value.toString().replace(/,/g, ""),
|
||||
reason: reason.value,
|
||||
positionDate: date.value,
|
||||
};
|
||||
|
|
@ -364,12 +363,19 @@ onMounted(async () => {
|
|||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row">
|
||||
<div class="col-12">
|
||||
<CurrencyInput
|
||||
<q-input
|
||||
v-model="salary"
|
||||
label="เงินเดือน"
|
||||
:edit="edit"
|
||||
:rules="[(val: number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
:outlined="edit"
|
||||
dense
|
||||
:readonly="!edit"
|
||||
hide-bottom-space
|
||||
:borderless="!edit"
|
||||
:label="`${'เงินเดือน'}`"
|
||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
lazy-rules
|
||||
mask="###,###,###,###"
|
||||
reverse-fill-mask
|
||||
class="inputgreen"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import keycloak from "@/plugins/keycloak";
|
|||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||
import type { QTableProps, QForm } from "quasar";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
const $q = useQuasar();
|
||||
|
|
@ -300,39 +300,40 @@ onMounted(async () => {
|
|||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
</div>
|
||||
<q-space />
|
||||
<div v-if="status !== 'REPORT' && status !== 'DONE'"> <div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
dense
|
||||
icon-right="mdi-file-edit-outline"
|
||||
class="q-px-sm"
|
||||
label="แก้ไข"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
<div v-if="status !== 'REPORT' && status !== 'DONE'">
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
dense
|
||||
icon-right="mdi-file-edit-outline"
|
||||
class="q-px-sm"
|
||||
label="แก้ไข"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-else>
|
||||
<q-btn
|
||||
outline
|
||||
color="public"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="บันทึก"
|
||||
style="width: 80px"
|
||||
@click="conditionSave"
|
||||
/>
|
||||
<q-btn
|
||||
outline
|
||||
color="red"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="cancelBtn"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-else>
|
||||
<q-btn
|
||||
outline
|
||||
color="public"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="บันทึก"
|
||||
style="width: 80px"
|
||||
@click="conditionSave"
|
||||
/>
|
||||
<q-btn
|
||||
outline
|
||||
color="red"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="cancelBtn"
|
||||
/>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-form ref="myForm">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { onMounted, ref } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { onMounted, ref } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
|
|
@ -109,7 +108,7 @@ const onSubmit = async () => {
|
|||
positionTypeOld: positionTypeOld.value,
|
||||
positionLevelOld: positionLevelOld.value,
|
||||
positionNumberOld: posNo.value,
|
||||
amountOld: salary.value,
|
||||
amountOld: salary.value.toString().replace(/,/g, ""),
|
||||
organization: organization.value,
|
||||
reason: reason.value,
|
||||
date: date.value,
|
||||
|
|
@ -291,13 +290,19 @@ onMounted(async () => {
|
|||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row">
|
||||
<div class="col-12">
|
||||
<CurrencyInput
|
||||
<q-input
|
||||
v-model="salary"
|
||||
:edit="edit"
|
||||
:options="{
|
||||
currency: 'THB',
|
||||
}"
|
||||
:outlined="edit"
|
||||
dense
|
||||
:readonly="!edit"
|
||||
hide-bottom-space
|
||||
:borderless="!edit"
|
||||
:label="`${'เงินเดือน'}`"
|
||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
lazy-rules
|
||||
mask="###,###,###,###"
|
||||
reverse-fill-mask
|
||||
class="inputgreen"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue