diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue index 465bb607f..0bdbf2899 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue @@ -193,7 +193,7 @@ function validateForm() { * @param val จำนวนวันที่ต้องการขยาย */ function calEndDate(val: string) { - const date = new Date(props.data.investigationDateEnd); + const date = new Date(props.data.disciplinaryDateEnd); const dateNew = new Date(); formData.disciplinaryDateEnd = new Date( dateNew.setDate(date.getDate() + Number(val)) @@ -459,6 +459,7 @@ onMounted(async () => {
{ id="organizationId" > { > ผู้ถูกร้องเรียน { formData.disciplinaryDateEnd != null && ((isReadonly && formData.extendStatus) || !isReadonly) " + :disable="isReadonly" for="#extendStatus" size="md" v-model="formData.extendStatus" @@ -697,7 +701,7 @@ onMounted(async () => {
{ for="#date" class="full-width cursor-pointer" ref="dateRef" - :readonly="isUpdate" + :readonly="isReadonly" outlined dense lazy-rules @@ -748,7 +752,8 @@ onMounted(async () => {
- { hide-bottom-space map-options :rules="[ - (val: any) => - formData.extendStatus - ? !!val || 'กรุณาเลือกจำนวนวันที่ต้องการขยาย' - : true, - ]" + (val) => + formData.extendStatus + ? !!val || 'กรุณาเลือกจำนวนวันที่ต้องการขยาย' + : true, + ]" option-label="name" option-value="id" use-input @@ -777,14 +782,14 @@ onMounted(async () => { - +
{ for="#dateEnd" ref="dateEndRef" class="full-width cursor-pointer" - :readonly="isUpdate" + :readonly="isReadonly" outlined dense lazy-rules @@ -838,6 +843,7 @@ onMounted(async () => {
{ -@/modules/11_discipline/store/store + \ No newline at end of file diff --git a/src/modules/11_discipline/components/UploadFile.vue b/src/modules/11_discipline/components/UploadFile.vue index a5dfa639b..376893de2 100644 --- a/src/modules/11_discipline/components/UploadFile.vue +++ b/src/modules/11_discipline/components/UploadFile.vue @@ -11,7 +11,7 @@ import { useCounterMixin } from "@/stores/mixin"; const $q = useQuasar(); const mixin = useCounterMixin(); -const { showLoader, hideLoader, success, messageError,dialogRemove } = mixin; +const { showLoader, hideLoader, success, messageError, dialogRemove } = mixin; const fileRef = ref(null); const file = ref(); @@ -47,6 +47,9 @@ const props = defineProps({ type: Function, default: () => "", }, + isReadonly: { + type: Boolean, + }, }); /** @@ -73,8 +76,8 @@ async function uploadFile() { }); } -function popupRemove(id:string){ - dialogRemove($q,()=> removeFile(id)) +function popupRemove(id: string) { + dialogRemove($q, () => removeFile(id)); } async function removeFile(id: string) { @@ -109,7 +112,7 @@ function downloadFile(link: string) { {{ title }}
-
+