สิทธ์ ออกคำสั่งลงโทษทางวินัย
This commit is contained in:
parent
37f0ecbc1e
commit
a7bd09d0f1
12 changed files with 240 additions and 83 deletions
|
|
@ -31,7 +31,9 @@ const router = useRouter();
|
|||
const step = ref<number>(0);
|
||||
const stepper = ref<QStepper>();
|
||||
const orderId = ref<string>("");
|
||||
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineOrderDatailOnly"
|
||||
);
|
||||
onUnmounted(() => {
|
||||
destroyLocalStorage();
|
||||
DataStore.typeOrder = "";
|
||||
|
|
@ -115,7 +117,8 @@ onMounted(() => {
|
|||
class="q-mr-sm"
|
||||
@click="
|
||||
route.name == 'disciplineOrderDatail' ||
|
||||
route.name == 'disciplineOrderAdd'
|
||||
route.name == 'disciplineOrderAdd' ||
|
||||
route.name == 'disciplineOrderDatailOnly'
|
||||
? router.push(`/discipline-order`)
|
||||
: router.push(`/order`)
|
||||
"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ import type {
|
|||
DataOptionInsigniaType,
|
||||
} from "@/modules/10_order/interface/index/Main";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
const myForm = ref<QForm>();
|
||||
|
|
@ -154,7 +156,14 @@ function updatemodalPersonal(modal: boolean) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<q-btn round flat color="blue" icon="mdi-history" @click="clickOpenpopup">
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
round
|
||||
flat
|
||||
color="blue"
|
||||
icon="mdi-history"
|
||||
@click="clickOpenpopup"
|
||||
>
|
||||
<q-tooltip>แสดงประวัติออกคำสั่ง</q-tooltip></q-btn
|
||||
>
|
||||
<q-dialog v-model="modal">
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ const {
|
|||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineOrderDatailOnly"
|
||||
);
|
||||
const orderId = route.params.orderid;
|
||||
const orderId_paramsName = route.name;
|
||||
|
||||
|
|
@ -909,6 +911,7 @@ const getClass = (val: boolean) => {
|
|||
<div class="row col-12 q-col-gutter-x-lg q-col-gutter-y-md">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<q-select
|
||||
:readonly="checkRoutePermisson"
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -939,6 +942,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="nameOrder"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกคำสั่งเรื่อง'}`]"
|
||||
|
|
@ -952,6 +956,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="command"
|
||||
hide-bottom-space
|
||||
:label="`${'คำสั่งเลขที่'}`"
|
||||
|
|
@ -965,6 +970,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="dateYear"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
>
|
||||
|
|
@ -975,6 +981,7 @@ const getClass = (val: boolean) => {
|
|||
<template #trigger>
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
:readonly="checkRoutePermisson"
|
||||
:model-value="dateYear !== null ? dateYear + 543 : null"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
|
||||
:label="`${'พ.ศ.'}`"
|
||||
|
|
@ -993,6 +1000,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="dateCommand"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1008,6 +1016,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
hide-bottom-space
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
|
|
@ -1033,6 +1042,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="byOrder"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกคำสั่งโดย'}`]"
|
||||
emit-value
|
||||
|
|
@ -1066,6 +1076,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="nameCommand"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกผู้มีอำนาจลงนาม'}`]"
|
||||
hide-bottom-space
|
||||
|
|
@ -1104,6 +1115,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="positionCommand"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`,
|
||||
|
|
@ -1121,6 +1133,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="nameCommand"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]"
|
||||
:label="`${'ผู้มีอำนาจลงนาม'}`"
|
||||
|
|
@ -1135,6 +1148,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="positionCommand"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`,
|
||||
|
|
@ -1168,6 +1182,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="examRound"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกรอบการสอบ'}`]"
|
||||
hide-bottom-space
|
||||
|
|
@ -1186,6 +1201,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="conclusionRegisterNo"
|
||||
:rules="[
|
||||
|
|
@ -1203,6 +1219,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="conclusionRegisterDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1218,6 +1235,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
hide-bottom-space
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
|
|
@ -1248,6 +1266,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="conclusionResultNo"
|
||||
:rules="[
|
||||
(val) =>
|
||||
|
|
@ -1263,6 +1282,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="conclusionResultDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1277,6 +1297,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
hide-bottom-space
|
||||
class="full-width datepicker"
|
||||
|
|
@ -1318,6 +1339,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="meeting"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกการประชุม ครั้งที่'}`]"
|
||||
|
|
@ -1330,6 +1352,7 @@ const getClass = (val: boolean) => {
|
|||
menu-class-name="modalfix"
|
||||
v-model="dateMeeting"
|
||||
:locale="'th'"
|
||||
:readonly="checkRoutePermisson"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
|
|
@ -1346,6 +1369,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
dateMeeting != null ? date2Thai(dateMeeting) : null
|
||||
|
|
@ -1377,6 +1401,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="conclusionReturnNo"
|
||||
:rules="[
|
||||
(val) =>
|
||||
|
|
@ -1393,6 +1418,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="conclusionReturnDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1407,6 +1433,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
|
|
@ -1440,6 +1467,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="organizations"
|
||||
:rules="[(val) => !!val || `${'กรุณากกรอกหน่วยงาน'}`]"
|
||||
|
|
@ -1452,6 +1480,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="order"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกคำสั่งที่'}`]"
|
||||
:label="`${'คำสั่งที่'}`"
|
||||
|
|
@ -1464,6 +1493,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="orderDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1479,6 +1509,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
class="full-width datepicker"
|
||||
:model-value="orderDate != null ? date2Thai(orderDate) : null"
|
||||
:label="`${'ลงวันที่ '}`"
|
||||
|
|
@ -1501,6 +1532,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="book"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณากกรอกหนังสือสำนักงาน ก.พ. ที่ นร'}`,
|
||||
|
|
@ -1516,6 +1548,7 @@ const getClass = (val: boolean) => {
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="checkRoutePermisson"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -1529,6 +1562,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
:model-value="bookDate != null ? date2Thai(bookDate) : null"
|
||||
|
|
@ -1559,6 +1593,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="organizationsOld"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกหน่วยงาน (ต้นทาง)'}`]"
|
||||
:label="`${'ชื่อหน่วยงาน (ต้นทาง)'}`"
|
||||
|
|
@ -1570,6 +1605,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="orderOld"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกคำสั่งที่ (ต้นทาง)'}`]"
|
||||
:label="`${'คำสั่งที่ (ต้นทาง)'}`"
|
||||
|
|
@ -1582,6 +1618,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="orderOldDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1597,6 +1634,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
orderOldDate != null ? date2Thai(orderOldDate) : null
|
||||
|
|
@ -1621,6 +1659,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="locationname"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกให้ดำรงตำแหน่ง ณ'}`]"
|
||||
:label="`${'ให้ดำรงตำแหน่ง ณ'}`"
|
||||
|
|
@ -1633,6 +1672,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="experimentOc"
|
||||
:rules="[
|
||||
(val) =>
|
||||
|
|
@ -1652,6 +1692,7 @@ const getClass = (val: boolean) => {
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="checkRoutePermisson"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -1666,6 +1707,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
experimentformDate != null
|
||||
|
|
@ -1698,6 +1740,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="experimenttoDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1713,6 +1756,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
experimenttoDate != null
|
||||
|
|
@ -1745,6 +1789,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="chairman"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อประธาน'}`]"
|
||||
:label="`${'ประธาน'}`"
|
||||
|
|
@ -1757,6 +1802,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="director"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ'}`]"
|
||||
:label="`${'กรรมการ'}`"
|
||||
|
|
@ -1769,6 +1815,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="director2"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ'}`]"
|
||||
:label="`${'กรรมการ'}`"
|
||||
|
|
@ -1792,6 +1839,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="committeeOc"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณาเลือกชื่อหน่วยงาน (อนุสนธิคำสั่ง)'}`,
|
||||
|
|
@ -1805,6 +1853,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="committeeOrder"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกอนุสนธิคำสั่งที่'}`]"
|
||||
:label="`${'อนุสนธิคำสั่งที่'}`"
|
||||
|
|
@ -1817,6 +1866,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="committeeDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1832,6 +1882,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
committeeDate != null ? date2Thai(committeeDate) : null
|
||||
|
|
@ -1863,6 +1914,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="receiveOc"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกหน่วยงาน'}`]"
|
||||
:label="`${'ชื่อหน่วยงาน'}`"
|
||||
|
|
@ -1881,6 +1933,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="transferOrganizationName"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกส่วนราชการที่ให้โอน'}`]"
|
||||
:label="`${'ส่วนราชการที่ให้โอน'}`"
|
||||
|
|
@ -1891,6 +1944,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="conclusionReceive"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกมติ กก. ครั้งที่'}`]"
|
||||
|
|
@ -1904,6 +1958,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="conclusionReceiveDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1919,6 +1974,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
conclusionReceiveDate != null
|
||||
|
|
@ -1951,6 +2007,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="orderNumber"
|
||||
:rules="[
|
||||
|
|
@ -1965,6 +2022,7 @@ const getClass = (val: boolean) => {
|
|||
menu-class-name="modalfix"
|
||||
v-model="orderNumberDate"
|
||||
:locale="'th'"
|
||||
:readonly="checkRoutePermisson"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
|
|
@ -1979,6 +2037,7 @@ const getClass = (val: boolean) => {
|
|||
<template #trigger>
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
:readonly="checkRoutePermisson"
|
||||
outlined
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
|
|
@ -2011,6 +2070,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="fault"
|
||||
:rules="[
|
||||
|
|
@ -2025,6 +2085,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="guiltyBasis"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกฐานความผิด'}`]"
|
||||
:label="`${'ฐานความผิด'}`"
|
||||
|
|
@ -2037,6 +2098,7 @@ const getClass = (val: boolean) => {
|
|||
outlined
|
||||
dense
|
||||
v-model="conclusionFireNo"
|
||||
:readonly="checkRoutePermisson"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
|
|
@ -2053,6 +2115,7 @@ const getClass = (val: boolean) => {
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="checkRoutePermisson"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -2067,6 +2130,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
conclusionFireDate != null
|
||||
|
|
@ -2096,6 +2160,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="conclusionFireResolution"
|
||||
:rules="[
|
||||
|
|
@ -2123,6 +2188,7 @@ const getClass = (val: boolean) => {
|
|||
<selector
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="complaintId"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกเรื่องร้องเรียน'}`]"
|
||||
|
|
@ -2156,6 +2222,7 @@ const getClass = (val: boolean) => {
|
|||
outlined
|
||||
dense
|
||||
v-model="conclusionFireNo"
|
||||
:readonly="checkRoutePermisson"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
|
|
@ -2170,6 +2237,7 @@ const getClass = (val: boolean) => {
|
|||
menu-class-name="modalfix"
|
||||
v-model="conclusionFireDate"
|
||||
:locale="'th'"
|
||||
:readonly="checkRoutePermisson"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
|
|
@ -2185,6 +2253,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
|
|
@ -2215,6 +2284,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="conclusionFireResolution"
|
||||
:rules="[
|
||||
|
|
@ -2230,6 +2300,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="faultLevel"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับความผิด'}`]"
|
||||
|
|
@ -2240,6 +2311,7 @@ const getClass = (val: boolean) => {
|
|||
<div class="col-xs-12 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
:readonly="checkRoutePermisson"
|
||||
outlined
|
||||
dense
|
||||
v-model="caseFault"
|
||||
|
|
@ -2253,6 +2325,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="result"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกผลดำเนินการพิจารณา'}`]"
|
||||
:label="`${'ผลดำเนินการพิจารณา'}`"
|
||||
|
|
@ -2264,6 +2337,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="refRaw"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`]"
|
||||
:label="`${'อ้างอิงมาตราตามกฎหมาย'}`"
|
||||
|
|
@ -2281,6 +2355,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="conclusionTranferNo"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกครั่งที่'}`]"
|
||||
|
|
@ -2294,6 +2369,7 @@ const getClass = (val: boolean) => {
|
|||
menu-class-name="modalfix"
|
||||
v-model="conclusionTranferDate"
|
||||
:locale="'th'"
|
||||
:readonly="checkRoutePermisson"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
|
|
@ -2309,6 +2385,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
|
|
@ -2352,6 +2429,7 @@ const getClass = (val: boolean) => {
|
|||
<selector
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="complaintId"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกเรื่องร้องเรียน'}`]"
|
||||
|
|
@ -2383,6 +2461,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="faultLevel"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับความผิด'}`]"
|
||||
|
|
@ -2394,6 +2473,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="caseFault"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกกรณีความผิด'}`]"
|
||||
|
|
@ -2405,6 +2485,7 @@ const getClass = (val: boolean) => {
|
|||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
:readonly="checkRoutePermisson"
|
||||
dense
|
||||
v-model="result"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกผลดำเนินการพิจารณา'}`]"
|
||||
|
|
@ -2417,6 +2498,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
v-model="refRaw"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`]"
|
||||
:label="`${'อ้างอิงมาตราตามกฎหมาย'}`"
|
||||
|
|
@ -2434,6 +2516,7 @@ const getClass = (val: boolean) => {
|
|||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="actStartDate"
|
||||
:readonly="checkRoutePermisson"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
|
|
@ -2452,6 +2535,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
actStartDate != null ? date2Thai(actStartDate) : null
|
||||
|
|
@ -2480,6 +2564,7 @@ const getClass = (val: boolean) => {
|
|||
v-model="actEndDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="checkRoutePermisson"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -2496,6 +2581,7 @@ const getClass = (val: boolean) => {
|
|||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
:readonly="checkRoutePermisson"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
actEndDate != null ? date2Thai(actEndDate) : null
|
||||
|
|
@ -2519,8 +2605,8 @@ const getClass = (val: boolean) => {
|
|||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-separator v-if="!checkRoutePermisson" />
|
||||
<q-card-actions align="right" v-if="!checkRoutePermisson">
|
||||
<q-btn label="บันทึก" id="onSubmit" type="submit" color="public">
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@ const {
|
|||
|
||||
const route = useRoute();
|
||||
const $q = useQuasar();
|
||||
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineOrderDatailOnly"
|
||||
);
|
||||
const routeName = ref<string>(route.name ? route.name.toString() : "");
|
||||
const modalData = ref<any>({
|
||||
salaryAmount: null,
|
||||
|
|
@ -453,7 +455,14 @@ const resetFilter = () => {
|
|||
<q-card>
|
||||
<q-card-section>
|
||||
<div class="col-12 row q-pb-sm items-center">
|
||||
<q-btn flat round color="primary" @click="refresh" icon="mdi-plus">
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson"
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click="refresh"
|
||||
icon="mdi-plus"
|
||||
>
|
||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<q-space />
|
||||
|
|
@ -507,9 +516,6 @@ const resetFilter = () => {
|
|||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width />
|
||||
<q-th auto-width />
|
||||
<q-th auto-width />
|
||||
<q-th auto-width v-if="statuscode !== true" />
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
|
|
@ -520,8 +526,8 @@ const resetFilter = () => {
|
|||
<q-td auto-width>
|
||||
<q-btn
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
v-if="!checkRoutePermisson"
|
||||
round
|
||||
:color="props.rowIndex + 1 == 1 ? 'grey' : 'green'"
|
||||
:disable="props.rowIndex + 1 == 1"
|
||||
|
|
@ -530,12 +536,10 @@ const resetFilter = () => {
|
|||
>
|
||||
<!-- <q-tooltip>เลื่อนลำดับขึ้น</q-tooltip> -->
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
v-if="!checkRoutePermisson"
|
||||
round
|
||||
:color="rows.length == props.rowIndex + 1 ? 'grey' : 'red'"
|
||||
:disable="rows.length == props.rowIndex + 1"
|
||||
|
|
@ -544,12 +548,13 @@ const resetFilter = () => {
|
|||
>
|
||||
<!-- <q-tooltip>เลื่อนลำดับลง</q-tooltip> -->
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td auto-width v-if="statuscode !== true">
|
||||
<q-btn
|
||||
v-if="props.row.salaryAmount === 0"
|
||||
v-if="
|
||||
!checkRoutePermisson &&
|
||||
statuscode !== true &&
|
||||
props.row.salaryAmount === 0
|
||||
"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="blue"
|
||||
|
|
@ -559,9 +564,12 @@ const resetFilter = () => {
|
|||
<q-tooltip>เงินเดือน</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-else
|
||||
v-else-if="
|
||||
!checkRoutePermisson &&
|
||||
statuscode !== true &&
|
||||
props.row.salaryAmount !== 0
|
||||
"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
|
|
@ -570,12 +578,9 @@ const resetFilter = () => {
|
|||
>
|
||||
<q-tooltip>เงินเดือน</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="red"
|
||||
|
|
@ -585,6 +590,7 @@ const resetFilter = () => {
|
|||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">{{
|
||||
col.name == "no" ? props.rowIndex + 1 : col.value
|
||||
}}</q-td>
|
||||
|
|
@ -593,8 +599,8 @@ const resetFilter = () => {
|
|||
</d-table>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-separator v-if="!checkRoutePermisson"/>
|
||||
<q-card-actions align="right" v-if="!checkRoutePermisson">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const mixin = useCounterMixin(); //เรียกฟังก์ชันกล
|
|||
const { dialogRemove, messageError, showLoader, hideLoader, success } = mixin;
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "disciplineOrderDatailOnly");
|
||||
const myForm = ref<QForm | null>(null);
|
||||
const filterRef = ref<QInput>();
|
||||
const filter = ref<string>("");
|
||||
|
|
@ -365,7 +365,7 @@ const fetchOrder = async (id: string) => {
|
|||
<q-card>
|
||||
<q-card-section>
|
||||
<div class="col-12 row q-py-sm items-center">
|
||||
<q-btn flat round color="primary" @click="clickAdd" icon="mdi-plus">
|
||||
<q-btn v-if="!checkRoutePermisson" flat round color="primary" @click="clickAdd" icon="mdi-plus">
|
||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<q-space />
|
||||
|
|
@ -429,6 +429,7 @@ const fetchOrder = async (id: string) => {
|
|||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="!checkRoutePermisson"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
|
|
@ -472,6 +473,7 @@ const fetchOrder = async (id: string) => {
|
|||
:label="`${'เลือกช่องทางการส่งสำเนา'}`"
|
||||
emit-value
|
||||
map-options
|
||||
:readonly="checkRoutePermisson"
|
||||
option-label="name"
|
||||
:options="optionSelect"
|
||||
option-value="id"
|
||||
|
|
@ -494,8 +496,8 @@ const fetchOrder = async (id: string) => {
|
|||
</q-form>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-separator v-if="!checkRoutePermisson"/>
|
||||
<q-card-actions align="right" v-if="!checkRoutePermisson">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const {
|
|||
} = mixin;
|
||||
const route = useRoute();
|
||||
const $q = useQuasar();
|
||||
|
||||
const checkRoutePermisson = ref<boolean>(route.name == "disciplineOrderDatailOnly");
|
||||
const orderId_params = route.params.orderid;
|
||||
const dialog = ref<boolean>(false);
|
||||
const dialogFileUpload = ref<boolean>(false);
|
||||
|
|
@ -654,7 +654,6 @@ const viewFileUpload = async (url: string) => {
|
|||
<label class="text-file">คำสั่ง</label>
|
||||
<div v-if="OrderPDFUpload != ''" class="text-right">
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
color="primary"
|
||||
|
|
@ -666,7 +665,6 @@ const viewFileUpload = async (url: string) => {
|
|||
<q-btn
|
||||
type="a"
|
||||
:href="OrderPDFUpload"
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
color="red"
|
||||
|
|
@ -677,7 +675,7 @@ const viewFileUpload = async (url: string) => {
|
|||
</q-btn>
|
||||
</div>
|
||||
<q-file
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'"
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว' && !checkRoutePermisson"
|
||||
outlined
|
||||
dense
|
||||
v-model="fileOrder"
|
||||
|
|
@ -695,7 +693,6 @@ const viewFileUpload = async (url: string) => {
|
|||
<label class="text-file">เอกสารแนบท้าย</label>
|
||||
<div v-if="TailerPDFUpload != ''" class="text-right">
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
color="primary"
|
||||
|
|
@ -707,7 +704,6 @@ const viewFileUpload = async (url: string) => {
|
|||
<q-btn
|
||||
type="a"
|
||||
:href="TailerPDFUpload"
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
color="red"
|
||||
|
|
@ -719,7 +715,7 @@ const viewFileUpload = async (url: string) => {
|
|||
</div>
|
||||
|
||||
<q-file
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'"
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'&&!checkRoutePermisson"
|
||||
outlined
|
||||
dense
|
||||
v-model="fileTailer"
|
||||
|
|
@ -736,7 +732,7 @@ const viewFileUpload = async (url: string) => {
|
|||
|
||||
<!-- บันทึกอัพโหลดเอกสาร -->
|
||||
<div
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'"
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว' && !checkRoutePermisson"
|
||||
class="row col-12 q-mt-md"
|
||||
>
|
||||
<q-space></q-space>
|
||||
|
|
@ -782,7 +778,7 @@ const viewFileUpload = async (url: string) => {
|
|||
<div>
|
||||
<label class="text-file">ปีที่ออกคำสั่ง</label>
|
||||
<datepicker
|
||||
:disabled="orderStatusName == 'ออกคำสั่งแล้ว'"
|
||||
:disabled="orderStatusName == 'ออกคำสั่งแล้ว' && checkRoutePermisson"
|
||||
menu-class-name="modalfix"
|
||||
v-model="years"
|
||||
:locale="'th'"
|
||||
|
|
@ -797,7 +793,7 @@ const viewFileUpload = async (url: string) => {
|
|||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:disable="orderStatusName == 'ออกคำสั่งแล้ว'"
|
||||
:disable="orderStatusName == 'ออกคำสั่งแล้ว' && checkRoutePermisson"
|
||||
outlined
|
||||
dense
|
||||
:model-value="years + 543"
|
||||
|
|
@ -822,7 +818,7 @@ const viewFileUpload = async (url: string) => {
|
|||
<div>
|
||||
<label class="text-file">วันที่ลงนาม</label>
|
||||
<datepicker
|
||||
:disabled="orderStatusName == 'ออกคำสั่งแล้ว'"
|
||||
:disabled="orderStatusName == 'ออกคำสั่งแล้ว' && checkRoutePermisson"
|
||||
menu-class-name="modalfix"
|
||||
v-model="date"
|
||||
:locale="'th'"
|
||||
|
|
@ -839,7 +835,7 @@ const viewFileUpload = async (url: string) => {
|
|||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:disable="orderStatusName == 'ออกคำสั่งแล้ว'"
|
||||
:disable="orderStatusName == 'ออกคำสั่งแล้ว' && checkRoutePermisson"
|
||||
outlined
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
|
|
@ -865,7 +861,7 @@ const viewFileUpload = async (url: string) => {
|
|||
|
||||
<!-- บันทึกรายละเอียดคำสั่ง -->
|
||||
<div
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว'"
|
||||
v-if="orderStatusName != 'ออกคำสั่งแล้ว' && !checkRoutePermisson"
|
||||
class="row col-12 q-mt-md"
|
||||
>
|
||||
<q-space></q-space>
|
||||
|
|
@ -891,8 +887,8 @@ const viewFileUpload = async (url: string) => {
|
|||
</template>
|
||||
</q-splitter>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="flex justify-end q-pa-sm q-gutter-sm">
|
||||
<q-separator v-if="!checkRoutePermisson"/>
|
||||
<div class="flex justify-end q-pa-sm q-gutter-sm" v-if="!checkRoutePermisson">
|
||||
<q-btn
|
||||
v-if="orderStatusName !== 'ออกคำสั่งแล้ว'"
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -254,9 +254,9 @@ onMounted(() => {
|
|||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
@click="openModalOrder"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-account-arrow-right"
|
||||
>
|
||||
|
|
@ -326,7 +326,7 @@ onMounted(() => {
|
|||
</template>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width v-if="checkPermission($route)?.attrIsGet !== false || checkPermission($route)?.attrIsUpdate !== false"/>
|
||||
<q-th auto-width />
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
|
|
@ -335,14 +335,14 @@ onMounted(() => {
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width v-if="checkPermission($route)?.attrIsGet !== false || checkPermission($route)?.attrIsUpdate !== false">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
@click="
|
||||
router.push(`/discipline-suspend-detail/${props.row.id}`)
|
||||
"
|
||||
size="14px"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
|
|
@ -350,10 +350,13 @@ onMounted(() => {
|
|||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet
|
||||
"
|
||||
@click="router.push(`/discipline-suspend/${props.row.id}`)"
|
||||
size="14px"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="edit"
|
||||
icon="edit"
|
||||
|
|
|
|||
|
|
@ -462,7 +462,6 @@ onMounted(() => {
|
|||
ผู้ยื่นอุทธรณ์/ร้องทุกข์
|
||||
<q-btn
|
||||
v-if="!isReadonly"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
|
|
@ -697,7 +696,6 @@ onMounted(() => {
|
|||
<q-item-section>{{ data.fileName }}</q-item-section>
|
||||
<q-space />
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
|
|
@ -708,13 +706,12 @@ onMounted(() => {
|
|||
>
|
||||
<q-btn
|
||||
v-if="!checkRoutePermission"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="red"
|
||||
class="q-ml-sm"
|
||||
icon="mdi-delete-outline"
|
||||
icon="mdi-delete"
|
||||
@click="deleteFile(data.id)"
|
||||
><q-tooltip>ลบไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ onMounted(async () => {
|
|||
v-if="checkPermission($route)?.attrIsCreate"
|
||||
id="addComplaints"
|
||||
for="addComplaints"
|
||||
size="12px"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
|
|
@ -515,13 +515,7 @@ onMounted(async () => {
|
|||
</template>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th
|
||||
auto-width
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsGet !== false ||
|
||||
checkPermission($route)?.attrIsUpdate !== false
|
||||
"
|
||||
></q-th>
|
||||
<q-th auto-width></q-th>
|
||||
<q-th
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
|
|
@ -533,19 +527,13 @@ onMounted(async () => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td
|
||||
auto-width
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsGet !== false ||
|
||||
checkPermission($route)?.attrIsUpdate !== false
|
||||
"
|
||||
>
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
id="addComplaints"
|
||||
for="addComplaints"
|
||||
size="12px"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="info"
|
||||
|
|
@ -554,11 +542,14 @@ onMounted(async () => {
|
|||
><q-tooltip>รายละเอียดการอุทธรณ์/ร้องทุกข์</q-tooltip></q-btn
|
||||
>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet
|
||||
"
|
||||
id="addComplaints"
|
||||
for="addComplaints"
|
||||
size="12px"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="edit"
|
||||
icon="edit"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ import { useOrderStore } from "@/modules/11_discipline/store/OrderStore";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const mixin = useCounterMixin();
|
||||
const DataStore = useOrderPlacementDataStore();
|
||||
|
|
@ -327,6 +329,7 @@ onMounted(async () => {
|
|||
<!-- use-input -->
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsCreate"
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import router from "@/router";
|
|||
import type { QTableProps } from "quasar";
|
||||
/** importStroe */
|
||||
import { useOrderStore } from "@/modules/11_discipline/store/OrderStore";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
const OrderStore = useOrderStore();
|
||||
|
||||
/** รับ props มาจากหน้าหลัก */
|
||||
|
|
@ -208,6 +208,29 @@ const redirectToPage = (id?: string, status?: string) => {
|
|||
}
|
||||
router.push(`/discipline-order/detail/${id}?step=${step}`);
|
||||
};
|
||||
/**
|
||||
* ฟังชั่น redirect
|
||||
* @param id id ออกคำสั่ง
|
||||
* @param status status
|
||||
*/
|
||||
const redirectToDetailPage = (id?: string, status?: string) => {
|
||||
let step = 1;
|
||||
switch (status) {
|
||||
case "จัดทำร่างคำสั่ง":
|
||||
step = 1;
|
||||
break;
|
||||
case "บัญชีแนบท้าย":
|
||||
step = 2;
|
||||
break;
|
||||
case "เลือกผู้ได้รับสำเนาคำสั่ง":
|
||||
step = 3;
|
||||
break;
|
||||
default:
|
||||
step = 4;
|
||||
break;
|
||||
}
|
||||
router.push(`/discipline-order-detail/detail/${id}?step=${step}`);
|
||||
};
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
|
|
@ -233,19 +256,46 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width></q-th>
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
@click="redirectToPage(props.row.orderId, props.row.orderStatusName)"
|
||||
>
|
||||
<q-tr :props="props">
|
||||
<q-td>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-eye"
|
||||
color="info"
|
||||
@click="
|
||||
redirectToDetailPage(props.row.orderId, props.row.orderStatusName)
|
||||
"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="edit"
|
||||
color="edit"
|
||||
@click="
|
||||
redirectToPage(props.row.orderId, props.row.orderStatusName)
|
||||
"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name === 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ const appealComplainDetail = () =>
|
|||
import("@/modules/11_discipline/components/8_AppealComplain/EditPage.vue");
|
||||
|
||||
const DetailPage = () => import("@/modules/10_order/components/Detail.vue");
|
||||
const DetailPageOnly = () => import("@/modules/10_order/components/Detail.vue");
|
||||
export default [
|
||||
{
|
||||
path: "/discipline/complaints",
|
||||
|
|
@ -421,4 +422,14 @@ export default [
|
|||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/discipline-order-detail/detail/:orderid",
|
||||
name: "disciplineOrderDatailOnly",
|
||||
component: DetailPageOnly,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: "SYS_DISCIPLINE_SENTENCE",
|
||||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue