Merge branch 'develop' into devTee

This commit is contained in:
STW_TTTY\stwtt 2024-09-02 11:04:56 +07:00
commit d78b7db124
4 changed files with 503 additions and 515 deletions

View file

@ -177,8 +177,8 @@ const getData = async () => {
showLoader(); showLoader();
await http await http
.get(config.API.questionExitInterview()) .get(config.API.questionExitInterview())
.then((res: any) => { .then(async (res) => {
const data = res.data.result; const data = await res.data.result;
question1Score.value = data.question1Score ?? 0; question1Score.value = data.question1Score ?? 0;
question2Score.value = data.question2Score ?? 0; question2Score.value = data.question2Score ?? 0;
question3Score.value = data.question3Score ?? 0; question3Score.value = data.question3Score ?? 0;
@ -269,14 +269,15 @@ const putData = () => {
showLoader(); showLoader();
http http
.put(config.API.questionExitInterview(), body) .put(config.API.questionExitInterview(), body)
.then((res) => { .then(() => {
router.push(`/retirement/exit-interview`);
success($q, "บันทึกข้อมูลสำเร็จ"); success($q, "บันทึกข้อมูลสำเร็จ");
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
}) })
.finally(async () => { .finally(() => {
router.push(`/retirement/exit-interview`); hideLoader();
}); });
}; };
</script> </script>

View file

@ -170,8 +170,8 @@ const fecthlist = async () => {
showLoader(); showLoader();
await http await http
.get(config.API.listExitInterview()) .get(config.API.listExitInterview())
.then((res: any) => { .then(async (res) => {
const data = res.data.result; const data = await res.data.result;
let list: ResponseItems[] = []; let list: ResponseItems[] = [];
data.map((r: ResponseItems) => { data.map((r: ResponseItems) => {
list.push({ list.push({
@ -215,7 +215,8 @@ const saveAppoint = async () => {
showLoader(); showLoader();
await http await http
.put(config.API.AppointInterview(id.value), body) .put(config.API.AppointInterview(id.value), body)
.then((res: any) => { .then(async () => {
await fecthlist();
success($q, "วันนัดหมายเพื่อทําการสัมภาษณ์การลาออกสำเร็จ"); success($q, "วันนัดหมายเพื่อทําการสัมภาษณ์การลาออกสำเร็จ");
closeModal(); closeModal();
}) })
@ -223,7 +224,6 @@ const saveAppoint = async () => {
messageError($q, e); messageError($q, e);
}) })
.finally(async () => { .finally(async () => {
await fecthlist();
hideLoader(); hideLoader();
}); });
}); });
@ -378,7 +378,10 @@ const openModalCalendar = (rows: any) => {
<q-tooltip>รายละเอยด</q-tooltip> <q-tooltip>รายละเอยด</q-tooltip>
</q-btn> </q-btn>
<q-btn <q-btn
v-if="checkPermission($route)?.attrIsGet && checkPermission($route)?.attrIsUpdate" v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
flat flat
dense dense
round round
@ -393,7 +396,11 @@ const openModalCalendar = (rows: any) => {
<q-tooltip>แกไขขอม</q-tooltip> <q-tooltip>แกไขขอม</q-tooltip>
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!props.row.appointDate && checkPermission($route)?.attrIsGet && checkPermission($route)?.attrIsUpdate" v-if="
!props.row.appointDate &&
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
icon="mdi-calendar" icon="mdi-calendar"
color="blue-7" color="blue-7"
flat flat
@ -407,63 +414,36 @@ const openModalCalendar = (rows: any) => {
<q-td key="no" :props="props"> <q-td key="no" :props="props">
{{ props.rowIndex + 1 }} {{ props.rowIndex + 1 }}
</q-td> </q-td>
<q-td <q-td key="fullname" :props="props">
key="fullname"
:props="props"
>
{{ props.row.fullname }} {{ props.row.fullname }}
</q-td> </q-td>
<q-td <q-td key="realReason" :props="props">
key="realReason"
:props="props"
>
{{ props.row.realReason }} {{ props.row.realReason }}
</q-td> </q-td>
<q-td <q-td key="notExitFactor" :props="props">
key="notExitFactor"
:props="props"
>
{{ props.row.notExitFactor }} {{ props.row.notExitFactor }}
</q-td> </q-td>
<q-td <q-td key="futureWork" :props="props">
key="futureWork"
:props="props"
>
{{ props.row.futureWork ? "ใช่" : "ไม่" }} {{ props.row.futureWork ? "ใช่" : "ไม่" }}
</q-td> </q-td>
<q-td <q-td key="futureWorkReason" :props="props">
key="futureWorkReason"
:props="props"
>
{{ props.row.futureWorkReason }} {{ props.row.futureWorkReason }}
</q-td> </q-td>
<q-td <q-td key="havejob" :props="props">
key="havejob"
:props="props"
>
{{ props.row.havejob ? "ใช่" : "ไม่" }} {{ props.row.havejob ? "ใช่" : "ไม่" }}
</q-td> </q-td>
<q-td <q-td key="havejobReason" :props="props">
key="havejobReason"
:props="props"
>
<div class="table_ellipsis"> <div class="table_ellipsis">
{{ props.row.havejobReason }} {{ props.row.havejobReason }}
</div> </div>
</q-td> </q-td>
<q-td <q-td key="appointDate" :props="props">
key="appointDate"
:props="props"
>
{{ {{
props.row.appointDate == null ? "-" : props.row.appointDate props.row.appointDate == null ? "-" : props.row.appointDate
}} }}
</q-td> </q-td>
<q-td <q-td key="datetext" :props="props">
key="datetext"
:props="props"
>
{{ props.row.datetext }} {{ props.row.datetext }}
</q-td> </q-td>
</q-tr> </q-tr>

View file

@ -101,13 +101,13 @@ const fileDownload = async (type: string) => {
class="q-mr-sm" class="q-mr-sm"
@click="router.push(`/retirement/deceased`)" @click="router.push(`/retirement/deceased`)"
/> />
รายละเอยดบนทกเวยนแจงการถงแกกรรม {{ fullName }} รายละเอยดบนทกเวยนแจงการถงแกกรรม{{ fullName }}
</div> </div>
<CardProfile :data="dataProfile as DataProfile" /> <CardProfile :data="dataProfile as DataProfile" />
<q-card bordered class="row col-12 text-dark q-mt-sm"> <q-card bordered class="q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary"> <div class="bg-grey-1 q-pa-sm col-12 row items-center">
<div class="q-pl-sm text-weight-bold text-dark">อมลการถงแกกรรม</div> <div class="q-pl-sm text-weight-bold text-dark">อมลการถงแกกรรม</div>
<q-space /> <q-space />
<div class="q-gutter-x-sm"> <div class="q-gutter-x-sm">
@ -132,8 +132,8 @@ const fileDownload = async (type: string) => {
</div> </div>
</div> </div>
<div class="col-12"><q-separator /></div> <div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-md"> <q-card-section>
<div class="col-12 row bg-white q-col-gutter-md"> <div class="col-12 row q-col-gutter-md">
<div class="col-xs-6 col-sm-3 row items-center"> <div class="col-xs-6 col-sm-3 row items-center">
<div class="col-12"> <div class="col-12">
<div class="col-12 text-top">เลขทใบมรณบตร</div> <div class="col-12 text-top">เลขทใบมรณบตร</div>
@ -179,18 +179,16 @@ const fileDownload = async (type: string) => {
</div> </div>
</div> </div>
</div> </div>
</q-card-section>
<div class="col-12" v-if="checkPermission($route)?.attrIsUpdate"> <q-separator />
<div class="row"> <q-card-actions align="right">
<q-space /> <q-btn
<q-btn v-if="checkPermission($route)?.attrIsUpdate"
color="public" color="public"
label="ส่งหนังสือเวียน" label="ส่งหนังสือเวียน"
@click="openDeceased(profileId)" @click="openDeceased(profileId)"
/> />
</div> </q-card-actions>
</div>
</div>
</q-card> </q-card>
</template> </template>