ปรับ รายการบันทึกเวียนแจ้งการถึงแก่กรรม

This commit is contained in:
STW_TTTY\stwtt 2024-08-16 15:40:06 +07:00
parent 911bed1148
commit 7e26314cb6
4 changed files with 11 additions and 88 deletions

View file

@ -416,55 +416,30 @@ const openModalCalendar = (rows: any) => {
<q-td
key="realReason"
:props="props"
@click="
router.push(
`/retirement/exit-interview/questionnair/${props.row.id}`
)
"
>
{{ props.row.realReason }}
</q-td>
<q-td
key="notExitFactor"
:props="props"
@click="
router.push(
`/retirement/exit-interview/questionnair/${props.row.id}`
)
"
>
{{ props.row.notExitFactor }}
</q-td>
<q-td
key="futureWork"
:props="props"
@click="
router.push(
`/retirement/exit-interview/questionnair/${props.row.id}`
)
"
>
{{ props.row.futureWork ? "ใช่" : "ไม่" }}
</q-td>
<q-td
key="futureWorkReason"
:props="props"
@click="
router.push(
`/retirement/exit-interview/questionnair/${props.row.id}`
)
"
>
{{ props.row.futureWorkReason }}
</q-td>
<q-td
key="havejob"
:props="props"
@click="
router.push(
`/retirement/exit-interview/questionnair/${props.row.id}`
)
"
>
{{ props.row.havejob ? "ใช่" : "ไม่" }}
</q-td>
@ -472,11 +447,6 @@ const openModalCalendar = (rows: any) => {
<q-td
key="havejobReason"
:props="props"
@click="
router.push(
`/retirement/exit-interview/questionnair/${props.row.id}`
)
"
>
<div class="table_ellipsis">
{{ props.row.havejobReason }}
@ -485,11 +455,6 @@ const openModalCalendar = (rows: any) => {
<q-td
key="appointDate"
:props="props"
@click="
router.push(
`/retirement/exit-interview/questionnair/${props.row.id}`
)
"
>
{{
props.row.appointDate == null ? "-" : props.row.appointDate
@ -498,11 +463,6 @@ const openModalCalendar = (rows: any) => {
<q-td
key="datetext"
:props="props"
@click="
router.push(
`/retirement/exit-interview/questionnair/${props.row.id}`
)
"
>
{{ props.row.datetext }}
</q-td>

View file

@ -241,25 +241,9 @@ const pagination = ref({
round
color="info"
icon="mdi-eye"
@click="
router.push(`/retirement/deceased-detail/${props.row.id}`)
"
>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
<q-btn
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
flat
dense
round
color="edit"
icon="edit"
@click.stop.prevent="nextPage(props.row.id)"
>
<q-tooltip>แกไขขอม</q-tooltip>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.id">

View file

@ -14,12 +14,14 @@ import CardProfile from "@/components/CardProfile.vue";
/** importStore*/
import { useCounterMixin } from "@/stores/mixin";
import { checkPermission } from "@/utils/permissions";
import genReport from "@/plugins/genreport";
/**use*/
const $q = useQuasar();
const router = useRouter();
const route = useRoute();
const checkRoutePermisson = ref<boolean>(route.name == "deceased-detailOnly");
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const fullName = ref<string>("");
@ -64,17 +66,6 @@ const nextPage = (page: string) => {
window.open(page, "_blank");
};
//downloadFile
const downloadFile = (response: any, filename: string) => {
const link = document.createElement("a");
var fileName = filename;
link.href = window.URL.createObjectURL(new Blob([response.data]));
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
};
/**
* งก ดาวโหลด
* @param type typeของรายละเอยด
@ -82,13 +73,13 @@ const downloadFile = (response: any, filename: string) => {
const fileDownload = async (type: string) => {
showLoader();
await http
.get(config.API.DeceasedReport(type, profileId.value), {
responseType: "blob",
})
.get(config.API.DeceasedReport(type, profileId.value))
.then((res) => {
downloadFile(
res,
`รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม-${fullName.value}.${type}`
const data = res.data.result;
genReport(
data,
`รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม-${fullName.value}`,
type
);
})
.catch(async (e) => {
@ -191,7 +182,7 @@ const fileDownload = async (type: string) => {
</div>
</div>
<div class="col-12" v-if="!checkRoutePermisson">
<div class="col-12" v-if="checkPermission($route)?.attrIsUpdate">
<div class="row">
<q-space />
<q-btn

View file

@ -19,8 +19,6 @@ const deceased = () =>
import("@/modules/06_retirement/components/resign/Deceased.vue");
const detaildeceased = () =>
import("@/modules/06_retirement/components/resign/DetailDeceased.vue");
const detaildeceasedOnly = () =>
import("@/modules/06_retirement/components/resign/DetailDeceased.vue");
const dismissOrder = () =>
import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue");
const outDetail = () =>
@ -190,16 +188,6 @@ export default [
Role: "STAFF",
},
},
{
path: "/retirement/deceased-detail/:id",
name: "deceased-detailOnly",
component: detaildeceasedOnly,
meta: {
Auth: true,
Key: "SYS_PASSAWAY",
Role: "STAFF",
},
},
{
path: "/retirement/deceased/detail/:id",
name: "deceased-detailByid",