Merge branch 'develop' of https://github.com/Frappet/bma-ehr-frontend into develop
This commit is contained in:
commit
ee3bf38df2
2 changed files with 17 additions and 21 deletions
|
|
@ -15,6 +15,7 @@ const { date2Thai,showLoader,success,hideLoader,messageError,dialogConfirm } = m
|
|||
const files = ref<any>();
|
||||
const filesReturn = ref<any>();
|
||||
const OrganazationId = ref<string>("");
|
||||
const OrganazationId2 = ref<string>("");
|
||||
const OrgList = ref<DataOption[]>([]);
|
||||
const Datereceive = ref<Date | null>(null);
|
||||
const Datereturn = ref<Date | null>();
|
||||
|
|
@ -25,7 +26,8 @@ const props = defineProps({
|
|||
personId: String,
|
||||
close: Function,
|
||||
fecthlistInsignia: Function,
|
||||
fileCheck:String
|
||||
fileCheck:String,
|
||||
fileCheck2:String
|
||||
});
|
||||
// reset วันที่ประกาศราชกิจจานุเบกษา
|
||||
const clearReceiveDate = () => {
|
||||
|
|
@ -41,7 +43,7 @@ const close = () => {
|
|||
OrganazationId.value = ''
|
||||
Datereturn.value = null
|
||||
filesReturn.value = null
|
||||
OrganazationId.value = ''
|
||||
OrganazationId2.value = ''
|
||||
};
|
||||
|
||||
const SaveData = async (type:string,id:string) => {
|
||||
|
|
@ -81,7 +83,7 @@ const dataSave = (type:string,id:string) => {
|
|||
OrganazationId.value = ''
|
||||
Datereturn.value = null
|
||||
filesReturn.value = null
|
||||
OrganazationId.value = ''
|
||||
OrganazationId2.value = ''
|
||||
props.close?.();
|
||||
hideLoader();
|
||||
props.fecthlistInsignia?.()
|
||||
|
|
@ -173,16 +175,16 @@ onMounted(()=>{
|
|||
:rules="[(val) => !!val || 'กรุณาเลือกหน่วยงานที่รับ']" :disable="fileCheck !== null"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 q-my-sm"> <q-separator/></div>
|
||||
|
||||
<div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
|
||||
<div v-if="fileCheck !== null" class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div class="col-12 q-mt-sm"><q-separator/></div>
|
||||
<div class="col-12 text-weight-bold text-grey-7">
|
||||
คืนเครื่องราชฯ
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
|
||||
<datepicker menu-class-name="modalfix" v-model="Datereturn" :locale="'th'" autoApply borderless
|
||||
:enableTimePicker="false" week-start="0">
|
||||
:enableTimePicker="false" week-start="0" :readonly="fileCheck2 !== null">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
|
|
@ -192,7 +194,7 @@ onMounted(()=>{
|
|||
<template #trigger>
|
||||
<q-input dense borderless outlined lazy-rules :rules="[(val) => !!val || 'กรุณาเลือกวันที่คืน']"
|
||||
hide-bottom-space :model-value="Datereturn != null ? date2Thai(Datereturn) : undefined
|
||||
" :label="`${'วันที่คืน'}`" clearable @clear="clearReturnDate">
|
||||
" :label="`${'วันที่คืน'}`" clearable @clear="clearReturnDate" :disable="fileCheck2 !== null">
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" color="primary">
|
||||
</q-icon>
|
||||
|
|
@ -203,7 +205,7 @@ onMounted(()=>{
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-file outlined dense v-model="filesReturn" label="ไฟล์หลักฐานการคืน" lazy-rules
|
||||
:rules="[(val) => val || 'กรุณาเลือกไฟล์หลักฐานการคืน']" hide-bottom-space>
|
||||
:rules="[(val) => val || 'กรุณาเลือกไฟล์หลักฐานการคืน']" hide-bottom-space :disable="fileCheck2 !== null">
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" color="primary" />
|
||||
</template>
|
||||
|
|
@ -211,14 +213,9 @@ onMounted(()=>{
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-select hide-bottom-space :options="OrgList" dense borderless option-label="name" option-value="id"
|
||||
emit-value map-options outlined v-model="OrganazationId" lazy-rules :label="`หน่วยงานที่คืน`"
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกหน่วยงานที่คืน']" />
|
||||
emit-value map-options outlined v-model="OrganazationId2" lazy-rules :label="`หน่วยงานที่คืน` "
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกหน่วยงานที่คืน']" :disable="fileCheck2 !== null"/>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-xs-12 col-sm-12">
|
||||
<q-input type="textarea" v-model="remark" outlined dense rows="3" :label="`${'หมายเหตุ'}`"/>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -227,7 +224,7 @@ onMounted(()=>{
|
|||
<q-separator />
|
||||
<div class="q-px-md q-py-sm">
|
||||
<div class="row justify-end">
|
||||
<q-btn label="บันทึก" color="public" @click="SaveData(props.fileCheck === null ? 'receive':'return',props.personId as string)">
|
||||
<q-btn v-if="fileCheck2 === null" label="บันทึก" color="public" @click="SaveData(props.fileCheck === null ? 'receive':'return',props.personId as string)">
|
||||
<q-tooltip>บันทึก</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ const filterEmployee = ref<any>(DataStore.employeeClassOps);
|
|||
const ModalDialog = ref<boolean>(false);
|
||||
const dateReceiveInsignia = ref<Date>();
|
||||
const fileCheck = ref<any>();
|
||||
const fileCheck2 = ref<any>();
|
||||
onMounted(async () => {
|
||||
await fecthRound();
|
||||
});
|
||||
|
|
@ -437,6 +438,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
const OpenModal = (data: any) => {
|
||||
ModalDialog.value = true;
|
||||
fileCheck.value = data.docReceiveInsignia;
|
||||
fileCheck2.value = data.docReturnInsignia;
|
||||
personId.value = data.id;
|
||||
};
|
||||
const filterSelector = (val: any, update: Function, name: any) => {
|
||||
|
|
@ -824,10 +826,6 @@ const clearInsigniaFilters = (name: string) => {
|
|||
<q-item-section>เเก้ไขข้อมูล</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
:disable="
|
||||
props.row.docReceiveInsignia !== null &&
|
||||
props.row.docReturnInsignia !== null
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="OpenModal(props.row)"
|
||||
|
|
@ -868,6 +866,7 @@ const clearInsigniaFilters = (name: string) => {
|
|||
:modal="ModalDialog"
|
||||
:close="close"
|
||||
:fileCheck="fileCheck"
|
||||
:fileCheck2="fileCheck2"
|
||||
:personId="personId"
|
||||
:fecthlistInsignia="fecthlistInsignia"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue