Merge branch 'develop' into dev-tee
This commit is contained in:
commit
5555706f20
25 changed files with 1242 additions and 1009 deletions
|
|
@ -72,7 +72,8 @@ export default {
|
||||||
prevStep: (orderId: string) => `${order}/order/prev/${orderId}`,
|
prevStep: (orderId: string) => `${order}/order/prev/${orderId}`,
|
||||||
executeOrder: (orderId: string) => `${order}/order/execute/${orderId}`,
|
executeOrder: (orderId: string) => `${order}/order/execute/${orderId}`,
|
||||||
createOrder: () => `${order}/order/detail`,
|
createOrder: () => `${order}/order/detail`,
|
||||||
examroundOrder: (commandCode: string) => `${order}/order/detail/exam-round/${commandCode}`,
|
examroundOrder: (commandCode: string) =>
|
||||||
|
`${order}/order/detail/exam-round/${commandCode}`,
|
||||||
personsOrder: (orderId: string) => `${order}/order/persons/${orderId}`, //ข้อมูลเลือกรายชื่อออกคำสั่ง, ลบรายชื่อ
|
personsOrder: (orderId: string) => `${order}/order/persons/${orderId}`, //ข้อมูลเลือกรายชื่อออกคำสั่ง, ลบรายชื่อ
|
||||||
personsselectedOrder: (orderId: string) =>
|
personsselectedOrder: (orderId: string) =>
|
||||||
`${order}/order/persons-selected/${orderId}`,
|
`${order}/order/persons-selected/${orderId}`,
|
||||||
|
|
@ -99,6 +100,7 @@ export default {
|
||||||
receiveDataId: (id: string) => `${receive}/${id}`,
|
receiveDataId: (id: string) => `${receive}/${id}`,
|
||||||
receivePosition: (id: string) => `${receive}/position/${id}`,
|
receivePosition: (id: string) => `${receive}/position/${id}`,
|
||||||
receiveDataPosition: () => `${receive}/use`,
|
receiveDataPosition: () => `${receive}/use`,
|
||||||
|
receiveFile: (id: string) => `${receive}/upload/${id}`,
|
||||||
|
|
||||||
//tranfer ระบบคำขอโอน
|
//tranfer ระบบคำขอโอน
|
||||||
transfer,
|
transfer,
|
||||||
|
|
@ -108,13 +110,13 @@ export default {
|
||||||
transferUserId: (id: string) => `${transfer}/user/${id}`,
|
transferUserId: (id: string) => `${transfer}/user/${id}`,
|
||||||
transferConfirmId: (id: string) => `${transfer}/confirm/${id}`,
|
transferConfirmId: (id: string) => `${transfer}/confirm/${id}`,
|
||||||
|
|
||||||
|
|
||||||
// แต่งตั้ง-เลื่อน
|
// แต่งตั้ง-เลื่อน
|
||||||
placemenAppointment,
|
placemenAppointment,
|
||||||
appointmentMain: () => `${placement}/appointment`,
|
appointmentMain: () => `${placement}/appointment`,
|
||||||
appointmentByid: (id: string) => `${placement}/appointment/${id}`,
|
appointmentByid: (id: string) => `${placement}/appointment/${id}`,
|
||||||
appointmentDelete: (id: string) => `${placement}/appointment/${id}`,
|
appointmentDelete: (id: string) => `${placement}/appointment/${id}`,
|
||||||
appointmentPosition: (id: string) => `${placement}/appointment/position/${id}`,
|
appointmentPosition: (id: string) =>
|
||||||
|
`${placement}/appointment/position/${id}`,
|
||||||
apppointmentReport: (id: string) => `${placement}/appointment/report/${id}`,
|
apppointmentReport: (id: string) => `${placement}/appointment/report/${id}`,
|
||||||
apppointmentPosition: () => `${placement}/appointment/use`,
|
apppointmentPosition: () => `${placement}/appointment/use`,
|
||||||
|
|
||||||
|
|
@ -152,10 +154,8 @@ export default {
|
||||||
|
|
||||||
userPlacement: (id: string) => `${placement}/user/${id}`,
|
userPlacement: (id: string) => `${placement}/user/${id}`,
|
||||||
|
|
||||||
// orderForm
|
// orderForm
|
||||||
orderCPM: (type: string) => `${order}/order/${type}/detail`,
|
orderCPM: (type: string) => `${order}/order/${type}/detail`,
|
||||||
orderCPMUpdate: (type: string, id: string) => `${order}/order/${type}/detail/${id}`,
|
orderCPMUpdate: (type: string, id: string) =>
|
||||||
|
`${order}/order/${type}/detail/${id}`,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ export default {
|
||||||
insigniaManageOrgAdd: () => `${insignia}/manage/org`,
|
insigniaManageOrgAdd: () => `${insignia}/manage/org`,
|
||||||
insigniaManageOrgDashboard: (insigniaManageId: string) =>
|
insigniaManageOrgDashboard: (insigniaManageId: string) =>
|
||||||
`${insignia}/manage/org/dashboard/${insigniaManageId}`,
|
`${insignia}/manage/org/dashboard/${insigniaManageId}`,
|
||||||
|
insigniaDowanload: (id: string) => `${insignia}/request/download/excel/${id}`,
|
||||||
|
|
||||||
// ยืม-คืนเครื่องราชฯ
|
// ยืม-คืนเครื่องราชฯ
|
||||||
insigniaManageBorrow: () => `${insignia}/manage/borrow`,
|
insigniaManageBorrow: () => `${insignia}/manage/borrow`,
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ export default {
|
||||||
`${profile}search/new-employee/oc/${id}`,
|
`${profile}search/new-employee/oc/${id}`,
|
||||||
profileSearchNewEmOcLeaveId: (id: string) =>
|
profileSearchNewEmOcLeaveId: (id: string) =>
|
||||||
`${profile}search/new-employee/oc/leave/${id}`,
|
`${profile}search/new-employee/oc/leave/${id}`,
|
||||||
profileEmployeeTempId: (id: string) => `${profile}/employee/temp/${id}`,
|
profileEmployeeTempId: (id: string) => `${profile}employee/temp/${id}`,
|
||||||
|
|
||||||
profileCoupleId: (profileId: string) => `${profile}couple/${profileId}`,
|
profileCoupleId: (profileId: string) => `${profile}couple/${profileId}`,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, watch } from "vue";
|
||||||
|
|
||||||
const reason = ref<string>("");
|
const reason = ref<string>("");
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -17,11 +17,16 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
clickClose: {
|
clickClose: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => { }
|
default: () => {},
|
||||||
},
|
},
|
||||||
savaForm: {
|
savaForm: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => { }
|
default: () => {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
watch(props, () => {
|
||||||
|
if (props.modal === true) {
|
||||||
|
reason.value = "";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -29,7 +34,7 @@ const myForm = ref<any>();
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
myForm.value.validate().then((result: boolean) => {
|
myForm.value.validate().then((result: boolean) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
props.savaForm(reason.value)
|
props.savaForm(reason.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -40,16 +45,31 @@ const submit = () => {
|
||||||
<q-card style="width: 500px; max-width: 500px">
|
<q-card style="width: 500px; max-width: 500px">
|
||||||
<q-toolbar class="q-py-md">
|
<q-toolbar class="q-py-md">
|
||||||
<q-toolbar-title class="header-text">{{ props.title }}</q-toolbar-title>
|
<q-toolbar-title class="header-text">{{ props.title }}</q-toolbar-title>
|
||||||
<q-btn icon="close" unelevated round dense @click="clickClose"
|
<q-btn
|
||||||
style="color: #ff8080; background-color: #ffdede" />
|
icon="close"
|
||||||
|
unelevated
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
@click="clickClose"
|
||||||
|
style="color: #ff8080; background-color: #ffdede"
|
||||||
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<q-card-section class="q-p-sm">
|
<q-card-section class="q-p-sm">
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<q-input type="textarea" class="full-width inputgreen cursor-pointer" hide-bottom-space outlined dense
|
<q-input
|
||||||
lazy-rules :rules="[(val) => !!val || `กรุณากรอก${label}`]" v-model="reason" :label="`${label}`" />
|
type="textarea"
|
||||||
|
class="full-width inputgreen cursor-pointer"
|
||||||
|
hide-bottom-space
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:rules="[(val) => !!val || `กรุณากรอก${label}`]"
|
||||||
|
v-model="reason"
|
||||||
|
:label="`${label}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
|
|
@ -60,7 +80,6 @@ const submit = () => {
|
||||||
<q-btn label="บันทึก" color="secondary" @click="submit" />
|
<q-btn label="บันทึก" color="secondary" @click="submit" />
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</q-form>
|
</q-form>
|
||||||
|
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -946,10 +946,10 @@ const fetchData = async () => {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let data = res.data.result;
|
let data = res.data.result;
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
data.map((e: ResponseObject) => {
|
data.map((e: any) => {
|
||||||
rows.value.push({
|
rows.value.push({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
insignia: e.insignia,
|
insignia: e.insignia == null ? null : e.insignia.name,
|
||||||
insigniaId: e.insigniaId,
|
insigniaId: e.insigniaId,
|
||||||
insigniaType: e.insigniaType,
|
insigniaType: e.insigniaType,
|
||||||
year: e.year,
|
year: e.year,
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import type {
|
||||||
ResponseRow,
|
ResponseRow,
|
||||||
} from "@/modules/05_placement/interface/response/Receive";
|
} from "@/modules/05_placement/interface/response/Receive";
|
||||||
|
|
||||||
|
const id = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
|
|
@ -39,7 +40,10 @@ const modal = ref<boolean>(false);
|
||||||
const popup = () => {
|
const popup = () => {
|
||||||
const row = filters.value.filter(
|
const row = filters.value.filter(
|
||||||
(r: ResponseRow) =>
|
(r: ResponseRow) =>
|
||||||
(r.status == "WAITTING" || r.status == "PENDING" || r.status == "APPROVE") && r.positionNumber != null
|
(r.status == "WAITTING" ||
|
||||||
|
r.status == "PENDING" ||
|
||||||
|
r.status == "APPROVE") &&
|
||||||
|
r.positionNumber != null
|
||||||
);
|
);
|
||||||
rows2.value = row;
|
rows2.value = row;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
|
|
@ -73,6 +77,8 @@ const filterKeyword = ref<string>("");
|
||||||
const filterKeyword2 = ref<string>("");
|
const filterKeyword2 = ref<string>("");
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
const files = ref<any>();
|
const files = ref<any>();
|
||||||
|
const nameFile = ref<string>("");
|
||||||
|
const fileUpload = ref<any>([]);
|
||||||
const fileDocDataUpload = ref<File[]>([]);
|
const fileDocDataUpload = ref<File[]>([]);
|
||||||
const listRecevice = ref<any[]>([]);
|
const listRecevice = ref<any[]>([]);
|
||||||
const filters = ref<ResponseRow[]>([]);
|
const filters = ref<ResponseRow[]>([]);
|
||||||
|
|
@ -267,6 +273,24 @@ onMounted(() => {
|
||||||
fecthlistRecevice();
|
fecthlistRecevice();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const SaveData = async () => {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append("File", files.value);
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.put(config.API.receiveFile(personalId.value), formData)
|
||||||
|
.then(() => {
|
||||||
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
await clickCloseUpload();
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const fecthlistRecevice = async () => {
|
const fecthlistRecevice = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -312,31 +336,33 @@ const fecthlistRecevice = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fileUploadDoc = async (files: any) => {
|
// const fileUploadDoc = async (val: any) => {
|
||||||
files.forEach((file: any) => {
|
// nameFile.value = val[0].name;
|
||||||
fileDocDataUpload.value.push(file);
|
// fileUpload.value = val;
|
||||||
});
|
// };
|
||||||
};
|
|
||||||
|
|
||||||
const addUpload = async () => {
|
// const addUpload = async () => {
|
||||||
// showLoader();
|
// if (fileUpload.value.length > 0) {
|
||||||
// await http
|
// const blob = fileUpload.value.slice(0, fileUpload.value[0].size);
|
||||||
// .post(config.API.listRoundInsignia())
|
// const newFile = new File(blob, nameFile.value, {
|
||||||
// .then(() => {
|
// type: fileUpload.value[0].type,
|
||||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
// });
|
||||||
// })
|
// const formData = new FormData();
|
||||||
// .catch((e) => {
|
// formData.append("", newFile);
|
||||||
// messageError($q, e);
|
// showLoader();
|
||||||
// })
|
// await http
|
||||||
// .finally(async () => {
|
// .put(config.API.receiveFile(personalId.value), formData)
|
||||||
// hideLoader();
|
// .then(() => {
|
||||||
// });
|
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
};
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
const SaveData = async () => {
|
// messageError($q, e);
|
||||||
await addUpload();
|
// })
|
||||||
await clickCloseUpload();
|
// .finally(async () => {
|
||||||
};
|
// hideLoader();
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
|
||||||
const resetFilter = () => {
|
const resetFilter = () => {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
|
|
@ -372,6 +398,7 @@ const openModalTree = (id: string) => {
|
||||||
const openUpload = (id: string) => {
|
const openUpload = (id: string) => {
|
||||||
personalId.value = id;
|
personalId.value = id;
|
||||||
modalupload.value = true;
|
modalupload.value = true;
|
||||||
|
console.log(personalId.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const openDelete = (id: string) => {
|
const openDelete = (id: string) => {
|
||||||
|
|
@ -682,12 +709,10 @@ const saveOrder = async () => {
|
||||||
<q-dialog v-model="modalupload">
|
<q-dialog v-model="modalupload">
|
||||||
<q-card style="width: 600px">
|
<q-card style="width: 600px">
|
||||||
<DialogHeader title="อัพโหลดเอกสาร" :close="clickCloseUpload" />
|
<DialogHeader title="อัพโหลดเอกสาร" :close="clickCloseUpload" />
|
||||||
<q-separator />
|
|
||||||
<q-separator />
|
|
||||||
<q-card-section class="q-pt-none">
|
<q-card-section class="q-pt-none">
|
||||||
<div class="col-12 row items-center q-col-gutter-sm">
|
<div class="col-12 row items-center q-col-gutter-sm">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-file outlined dense v-model="files" @added="fileUploadDoc" label="อัพโหลดเอกสาร" lazy-rules>
|
<q-file outlined dense v-model="files" label="อัพโหลดเอกสาร" lazy-rules>
|
||||||
<!-- :rules="[
|
<!-- :rules="[
|
||||||
(val) => val || 'กรุณาเลือกไฟล์หนังสือถึงหน่วยงานที่รับโอน',
|
(val) => val || 'กรุณาเลือกไฟล์หนังสือถึงหน่วยงานที่รับโอน',
|
||||||
]" -->
|
]" -->
|
||||||
|
|
@ -700,7 +725,7 @@ const saveOrder = async () => {
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-actions class="text-primary q-py-sm">
|
<q-card-actions class="text-primary q-py-sm">
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn flat round color="public" @click="SaveData" icon="mdi-content-save-outline">
|
<q-btn flat round color="public" @click="SaveData()" icon="mdi-content-save-outline">
|
||||||
<q-tooltip>บันทึก</q-tooltip>
|
<q-tooltip>บันทึก</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ const save = () => {
|
||||||
const validateForm = () => {
|
const validateForm = () => {
|
||||||
return (
|
return (
|
||||||
fileOrder.value !== null &&
|
fileOrder.value !== null &&
|
||||||
fileOrder.value !== null &&
|
fileTailer.value !== null &&
|
||||||
order.value.trim() !== ""
|
order.value.trim() !== ""
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -28,19 +28,14 @@ const personalId = ref<string>(route.params.id.toString());
|
||||||
|
|
||||||
const person = ref<any>([]);
|
const person = ref<any>([]);
|
||||||
const assign = ref<any>([]);
|
const assign = ref<any>([]);
|
||||||
const evaluate_no = ref<string>("");
|
const evaluate_no = ref<any>("");
|
||||||
const start_date = ref<Date>(new Date());
|
const start_date = ref<any>();
|
||||||
const date_finish = ref<Date>(new Date());
|
const date_finish = ref<any>();
|
||||||
const status = ref<boolean>(true);
|
const status = ref<boolean>(true);
|
||||||
const chairman = ref<any>([]);
|
const chairman = ref<any>([]);
|
||||||
const commander = ref<any>([]);
|
const commander = ref<any>([]);
|
||||||
const mentors = ref<any>([{ name: "" }, { name: "" }]);
|
const mentors = ref<any>([{ name: "" }, { name: "" }]);
|
||||||
|
|
||||||
const round = ref<any>();
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
tab: String,
|
|
||||||
});
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fecthAssign(assignId.value);
|
fecthAssign(assignId.value);
|
||||||
});
|
});
|
||||||
|
|
@ -49,15 +44,14 @@ const fecthAssign = async (id: string) => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.evaluateChairman(id))
|
.get(config.API.evaluateChairman(id))
|
||||||
.then(async (res: any) => {
|
.then(async (res: any) => {
|
||||||
person.value = res.data.data.person;
|
person.value = await res.data.data.person;
|
||||||
assign.value = res.data.data.assign;
|
assign.value = await res.data.data.assign;
|
||||||
evaluate_no.value = res.data.data.evaluate_no;
|
evaluate_no.value = await res.data.data.evaluate_no;
|
||||||
start_date.value = res.data.data.start_date;
|
start_date.value = await res.data.data.start_date;
|
||||||
date_finish.value = res.data.data.end_date;
|
date_finish.value = await res.data.data.end_date;
|
||||||
chairman.value = res.data.data.chairman;
|
chairman.value = await res.data.data.chairman;
|
||||||
commander.value = res.data.data.commander;
|
commander.value = await res.data.data.commander;
|
||||||
mentors.value = res.data.data.mentors;
|
mentors.value = await res.data.data.mentors;
|
||||||
round.value = res.data.data.evaluate_no;
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -385,7 +379,7 @@ const putformData = () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 text-top0 row items-center">
|
<div class="col-12 text-top0 row items-center">
|
||||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||||
<span class="text-primary q-pr-sm">{{ "ครั้งที่ " + round }}</span>
|
<span class="text-primary q-pr-sm">{{ `ครั้งที่ ${evaluate_no}` }}</span>
|
||||||
ระหว่างวันที่
|
ระหว่างวันที่
|
||||||
<span class="text-black q-px-sm">{{
|
<span class="text-black q-px-sm">{{
|
||||||
date2Thai(start_date)
|
date2Thai(start_date)
|
||||||
|
|
@ -416,7 +410,7 @@ const putformData = () => {
|
||||||
1.1. ความสามารถในการเรียนรู้งาน</q-item-label>
|
1.1. ความสามารถในการเรียนรู้งาน</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section side>
|
<q-item-section side>
|
||||||
<q-rating :disable="!status" v-model="learn_level" max="5" size="sm" color="grey"
|
<q-rating v-model="learn_level" max="5" size="sm" color="grey"
|
||||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -449,7 +443,7 @@ const putformData = () => {
|
||||||
ความสามารถในการปรับใช้ความรู้กับงานในหน้าที่</q-item-label>
|
ความสามารถในการปรับใช้ความรู้กับงานในหน้าที่</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section side>
|
<q-item-section side>
|
||||||
<q-rating :disable="!status" v-model="apply_level" max="5" size="sm" color="grey"
|
<q-rating v-model="apply_level" max="5" size="sm" color="grey"
|
||||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -481,7 +475,7 @@ const putformData = () => {
|
||||||
1.3. ความสำเร็จของงานที่ได้รับมอบหมาย</q-item-label>
|
1.3. ความสำเร็จของงานที่ได้รับมอบหมาย</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section side>
|
<q-item-section side>
|
||||||
<q-rating :disable="!status" v-model="success_level" max="5" size="sm" color="grey"
|
<q-rating v-model="success_level" max="5" size="sm" color="grey"
|
||||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -511,7 +505,7 @@ const putformData = () => {
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||||
1.4 อื่นๆ
|
1.4 อื่นๆ
|
||||||
<q-checkbox :disable="!status" class="q-ml-sm" dense v-model="etc" @click="
|
<q-checkbox class="q-ml-sm" dense v-model="etc" @click="
|
||||||
(achievement_other.text = ''),
|
(achievement_other.text = ''),
|
||||||
(achievement_other.level = 0)
|
(achievement_other.level = 0)
|
||||||
" /></q-item-label>
|
" /></q-item-label>
|
||||||
|
|
@ -525,7 +519,7 @@ const putformData = () => {
|
||||||
<q-item dense tag="label" v-ripple>
|
<q-item dense tag="label" v-ripple>
|
||||||
<q-item-section class="q-ml-md">
|
<q-item-section class="q-ml-md">
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<q-input :disable="!status" v-model="achievement_other.text" label="กรอกอื่นๆ" dense lazy-rules
|
<q-input v-model="achievement_other.text" label="กรอกอื่นๆ" dense lazy-rules
|
||||||
autogrow hide-bottom-space outlined class="bg-white" :rules="[
|
autogrow hide-bottom-space outlined class="bg-white" :rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
(val && val.length > 0) || 'กรุณากรอกข้อความ',
|
(val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||||
|
|
@ -533,7 +527,7 @@ const putformData = () => {
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section side>
|
<q-item-section side>
|
||||||
<q-rating :disable="!status" v-model="achievement_other.level" max="5" size="sm" color="grey"
|
<q-rating v-model="achievement_other.level" max="5" size="sm" color="grey"
|
||||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -583,7 +577,7 @@ const putformData = () => {
|
||||||
<q-item-label>{{ list.label }}</q-item-label>
|
<q-item-label>{{ list.label }}</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section side>
|
<q-item-section side>
|
||||||
<q-rating :disable="!status" v-model="conduct_level[i]" :val="list.id" max="5" size="sm"
|
<q-rating v-model="conduct_level[i]" :val="list.id" max="5" size="sm"
|
||||||
color="grey" :color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
color="grey" :color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -619,7 +613,7 @@ const putformData = () => {
|
||||||
<q-item-label>{{ list.label }}</q-item-label>
|
<q-item-label>{{ list.label }}</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section side>
|
<q-item-section side>
|
||||||
<q-rating :disable="!status" v-model="moral_level[i]" :val="list.id" max="5" size="sm" color="grey"
|
<q-rating v-model="moral_level[i]" :val="list.id" max="5" size="sm" color="grey"
|
||||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -655,7 +649,7 @@ const putformData = () => {
|
||||||
<q-item-label>{{ list.label }}</q-item-label>
|
<q-item-label>{{ list.label }}</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section side>
|
<q-item-section side>
|
||||||
<q-rating :disable="!status" v-model="discipline_level[i]" :val="list.id" max="5" size="sm"
|
<q-rating v-model="discipline_level[i]" :val="list.id" max="5" size="sm"
|
||||||
color="grey" :color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
color="grey" :color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -683,7 +677,7 @@ const putformData = () => {
|
||||||
<div class="col-12 text-top0 row items-center q-pl-lg">
|
<div class="col-12 text-top0 row items-center q-pl-lg">
|
||||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||||
2.4 อื่นๆ
|
2.4 อื่นๆ
|
||||||
<q-checkbox :disable="!status" class="q-ml-sm" dense v-model="etc2" @click="
|
<q-checkbox class="q-ml-sm" dense v-model="etc2" @click="
|
||||||
(behavio_orther.text = ''), (behavio_orther.level = 0)
|
(behavio_orther.text = ''), (behavio_orther.level = 0)
|
||||||
" />
|
" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -692,7 +686,7 @@ const putformData = () => {
|
||||||
<q-item dense tag="label" v-ripple>
|
<q-item dense tag="label" v-ripple>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<q-input :disable="!status" v-model="behavio_orther.text" label="กรอกอื่นๆ" dense lazy-rules
|
<q-input v-model="behavio_orther.text" label="กรอกอื่นๆ" dense lazy-rules
|
||||||
autogrow hide-bottom-space outlined class="bg-white" :rules="[
|
autogrow hide-bottom-space outlined class="bg-white" :rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
(val && val.length > 0) || 'กรุณากรอกข้อความ',
|
(val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||||
|
|
@ -700,7 +694,7 @@ const putformData = () => {
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section side>
|
<q-item-section side>
|
||||||
<q-rating :disable="!status" v-model="behavio_orther.level" max="5" size="sm" color="grey"
|
<q-rating v-model="behavio_orther.level" max="5" size="sm" color="grey"
|
||||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -856,30 +850,30 @@ const putformData = () => {
|
||||||
<div class="row q-gutter-md align-center q-pl-md">
|
<div class="row q-gutter-md align-center q-pl-md">
|
||||||
<div class="col-8">1. การปฐมนิเทศ</div>
|
<div class="col-8">1. การปฐมนิเทศ</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input outlined :disable="!status" dense type="number" v-model="orientation" />
|
<q-input outlined dense type="number" v-model="orientation" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input outlined :disable="!status" dense type="number" v-model="orientation_percent" />
|
<q-input outlined dense type="number" v-model="orientation_percent" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator class="q-my-xs" />
|
<q-separator class="q-my-xs" />
|
||||||
<div class="row q-gutter-md align-center q-pl-md">
|
<div class="row q-gutter-md align-center q-pl-md">
|
||||||
<div class="col-8">2. การเรียนรู้ด้วยตนเอง</div>
|
<div class="col-8">2. การเรียนรู้ด้วยตนเอง</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input outlined :disable="!status" dense type="number" v-model="self_learning" />
|
<q-input outlined dense type="number" v-model="self_learning" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input outlined :disable="!status" dense type="number" v-model="self_learning_percent" />
|
<q-input outlined dense type="number" v-model="self_learning_percent" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator class="q-my-xs" />
|
<q-separator class="q-my-xs" />
|
||||||
<div class="row q-gutter-md align-center q-pl-md">
|
<div class="row q-gutter-md align-center q-pl-md">
|
||||||
<div class="col-8">3. การอบรมสัมนาร่วมกัน</div>
|
<div class="col-8">3. การอบรมสัมนาร่วมกัน</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input outlined :disable="!status" dense type="number" v-model="training_seminar" />
|
<q-input outlined dense type="number" v-model="training_seminar" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input outlined :disable="!status" dense type="number" v-model="training_seminar_percent" />
|
<q-input outlined dense type="number" v-model="training_seminar_percent" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator class="q-my-xs" />
|
<q-separator class="q-my-xs" />
|
||||||
|
|
@ -888,10 +882,10 @@ const putformData = () => {
|
||||||
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input outlined :disable="!status" dense type="number" v-model="other_training" />
|
<q-input outlined dense type="number" v-model="other_training" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input outlined :disable="!status" dense type="number" v-model="other_training_percent" />
|
<q-input outlined dense type="number" v-model="other_training_percent" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <q-list dense>
|
<!-- <q-list dense>
|
||||||
|
|
@ -1012,7 +1006,7 @@ const putformData = () => {
|
||||||
สรุปผลการพัฒนา
|
สรุปผลการพัฒนา
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-select :disable="!status" class="col-xs-12" dense v-model="develop_result" outlined
|
<q-select class="col-xs-12" dense v-model="develop_result" outlined
|
||||||
:options="develop_result_option" option-label="name" option-value="value"
|
:options="develop_result_option" option-label="name" option-value="value"
|
||||||
label="เลือกสรุปผลการพัฒนา" map-options emit-value />
|
label="เลือกสรุปผลการพัฒนา" map-options emit-value />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1026,7 +1020,7 @@ const putformData = () => {
|
||||||
สรุปผล การประเมินผลทดลองปฎิบัติหน้าที่ราชการ
|
สรุปผล การประเมินผลทดลองปฎิบัติหน้าที่ราชการ
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-select :disable="!status" class="col-xs-12" dense v-model="evaluate_result" outlined
|
<q-select class="col-xs-12" dense v-model="evaluate_result" outlined
|
||||||
:options="evaluate_result_option" option-label="name" option-value="value"
|
:options="evaluate_result_option" option-label="name" option-value="value"
|
||||||
label="เลือกสรุปผล การประเมินผลทดลองปฎิบัติหน้าที่ราชการ" map-options emit-value />
|
label="เลือกสรุปผล การประเมินผลทดลองปฎิบัติหน้าที่ราชการ" map-options emit-value />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1053,7 +1047,7 @@ const putformData = () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input hide-bottom-space outlined :disable="!status" dense class="full-width datepicker col-3" :model-value="dateAutherise != null
|
<q-input hide-bottom-space outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
|
||||||
? date2Thai(dateAutherise)
|
? date2Thai(dateAutherise)
|
||||||
: null
|
: null
|
||||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
||||||
|
|
@ -1077,7 +1071,7 @@ const putformData = () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input hide-bottom-space :disable="!status" outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
|
<q-input hide-bottom-space outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
|
||||||
? date2Thai(dateAutherise)
|
? date2Thai(dateAutherise)
|
||||||
: null
|
: null
|
||||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
||||||
|
|
@ -1100,7 +1094,7 @@ const putformData = () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input hide-bottom-space :disable="!status" outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
|
<q-input hide-bottom-space outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
|
||||||
? date2Thai(dateAutherise)
|
? date2Thai(dateAutherise)
|
||||||
: null
|
: null
|
||||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
||||||
|
|
@ -1131,7 +1125,7 @@ const putformData = () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input :disable="!status" outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
|
<q-input outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
|
||||||
? date2Thai(dateAutherise)
|
? date2Thai(dateAutherise)
|
||||||
: null
|
: null
|
||||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,11 @@ const fecthAssign = async (id: string) => {
|
||||||
date_start.value = assign.value.date_start;
|
date_start.value = assign.value.date_start;
|
||||||
date_finish.value = assign.value.date_finish;
|
date_finish.value = assign.value.date_finish;
|
||||||
|
|
||||||
director_id.value = res.data.data.commander.name;
|
director_id.value = res.data.data.chairman.name;
|
||||||
director_id2.value = mentors.value[0].name;
|
director_id2.value = res.data.data.commander.name;
|
||||||
director_id3.value = mentors.value[1].name;
|
director_id3.value = mentors.value[0].name;
|
||||||
|
|
||||||
commander.value.push(res.data.data.commander);
|
commander.value = res.data.data.commander;
|
||||||
optionDirector.value = mentors.value;
|
optionDirector.value = mentors.value;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -80,21 +80,25 @@ const fullname = ref<string>("");
|
||||||
const fecthResult = async (id: string) => {
|
const fecthResult = async (id: string) => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.createformReport(id))
|
.get(config.API.createformReport(id))
|
||||||
.then((res: any) => {
|
.then(async(res: any) => {
|
||||||
let data = res.data.data.evaluate;
|
if (res.data.data != null) {
|
||||||
fullname.value = res.data.data.profile.name;
|
const data = await res.data.data.evaluate;
|
||||||
date_start.value = data.date_start;
|
console.log("data ===>", data);
|
||||||
date_finish.value = data.date_finish;
|
|
||||||
develop.value = Number(data.develop_complete);
|
fullname.value = res.data.data.profile.name;
|
||||||
result.value = Number(data.pass_result);
|
date_start.value = data.date_start;
|
||||||
reson.value = data.reson;
|
date_finish.value = data.date_finish;
|
||||||
chairman_dated.value = data.chairman_dated;
|
develop.value = await Number(data.develop_complete);
|
||||||
director1_dated.value = data.director1_dated;
|
result.value = await Number(data.pass_result);
|
||||||
director2_dated.value = data.director2_dated;
|
reson.value = await data.reson;
|
||||||
status.value = false;
|
chairman_dated.value = await data.chairman_dated;
|
||||||
action.value = "edit";
|
director1_dated.value = await data.director1_dated;
|
||||||
|
director2_dated.value = await data.director2_dated;
|
||||||
|
status.value = false;
|
||||||
|
action.value = "edit";
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {});
|
.catch((e) => { });
|
||||||
};
|
};
|
||||||
|
|
||||||
// part new
|
// part new
|
||||||
|
|
@ -185,27 +189,16 @@ const selectRuslt = () => {
|
||||||
<div class="toptitle text-dark col-12 row items-center q-gutter-md">
|
<div class="toptitle text-dark col-12 row items-center q-gutter-md">
|
||||||
<div>แบบรายงานการประเมินฯ</div>
|
<div>แบบรายงานการประเมินฯ</div>
|
||||||
<!-- <q-space /> -->
|
<!-- <q-space /> -->
|
||||||
<q-btn
|
<q-btn v-if="!status" size="12px" flat dense icon="mdi-download" color="primary">
|
||||||
v-if="!status"
|
|
||||||
size="12px"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
icon="mdi-download"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
<q-menu>
|
<q-menu>
|
||||||
<q-list style="min-width: 150px">
|
<q-list style="min-width: 150px">
|
||||||
<q-item clickable v-close-popup @click="clickdownloadFile('pdf')">
|
<q-item clickable v-close-popup @click="clickdownloadFile('pdf')">
|
||||||
<q-item-section avatar
|
<q-item-section avatar><q-icon color="red" name="mdi-file-pdf" /></q-item-section>
|
||||||
><q-icon color="red" name="mdi-file-pdf"
|
|
||||||
/></q-item-section>
|
|
||||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable v-close-popup @click="clickdownloadFile('docx')">
|
<q-item clickable v-close-popup @click="clickdownloadFile('docx')">
|
||||||
<q-item-section avatar
|
<q-item-section avatar><q-icon color="blue" name="mdi-file-word" /></q-item-section>
|
||||||
><q-icon color="blue" name="mdi-file-word"
|
|
||||||
/></q-item-section>
|
|
||||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
|
@ -214,14 +207,7 @@ const selectRuslt = () => {
|
||||||
|
|
||||||
<div v-if="action == 'edit'">
|
<div v-if="action == 'edit'">
|
||||||
<div v-if="status == false">
|
<div v-if="status == false">
|
||||||
<q-btn
|
<q-btn dense flat round color="primary" @click="edit()" icon="mdi-pencil-outline">
|
||||||
dense
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
color="primary"
|
|
||||||
@click="edit()"
|
|
||||||
icon="mdi-pencil-outline"
|
|
||||||
>
|
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -229,15 +215,8 @@ const selectRuslt = () => {
|
||||||
<q-btn dense flat round color="red" @click="cancel()" icon="mdi-undo">
|
<q-btn dense flat round color="red" @click="cancel()" icon="mdi-undo">
|
||||||
<q-tooltip>ยกเลิก</q-tooltip>
|
<q-tooltip>ยกเลิก</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn dense flat round class="q-ml-sm" color="public" @click="saveEdit(assignId)"
|
||||||
dense
|
icon="mdi-content-save-outline">
|
||||||
flat
|
|
||||||
round
|
|
||||||
class="q-ml-sm"
|
|
||||||
color="public"
|
|
||||||
@click="saveEdit(assignId)"
|
|
||||||
icon="mdi-content-save-outline"
|
|
||||||
>
|
|
||||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -247,16 +226,8 @@ const selectRuslt = () => {
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<datepicker
|
<datepicker menu-class-name="modalfix" v-model="date_start" :locale="'th'" autoApply borderless
|
||||||
menu-class-name="modalfix"
|
:readonly="!status" :enableTimePicker="false" week-start="0">
|
||||||
v-model="date_start"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
borderless
|
|
||||||
:readonly="!status"
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -264,23 +235,10 @@ const selectRuslt = () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input outlined dense :disable="!status" class="full-width datepicker" :model-value="date_start != null ? date2Thai(date_start) : null
|
||||||
outlined
|
" :label="`${'ระหว่างวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]">
|
||||||
dense
|
|
||||||
:disable="!status"
|
|
||||||
class="full-width datepicker"
|
|
||||||
:model-value="
|
|
||||||
date_start != null ? date2Thai(date_start) : null
|
|
||||||
"
|
|
||||||
:label="`${'ระหว่างวันที่'}`"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||||
name="event"
|
|
||||||
class="cursor-pointer"
|
|
||||||
style="color: var(--q-primary)"
|
|
||||||
>
|
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -288,16 +246,8 @@ const selectRuslt = () => {
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<datepicker
|
<datepicker menu-class-name="modalfix" v-model="date_finish" :locale="'th'" autoApply :readonly="!status"
|
||||||
menu-class-name="modalfix"
|
borderless :enableTimePicker="false" week-start="0">
|
||||||
v-model="date_finish"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
:readonly="!status"
|
|
||||||
borderless
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -305,23 +255,10 @@ const selectRuslt = () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input outlined dense :disable="!status" class="full-width datepicker" :model-value="date_finish != null ? date2Thai(date_finish) : null
|
||||||
outlined
|
" :label="`${'ถึงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]">
|
||||||
dense
|
|
||||||
:disable="!status"
|
|
||||||
class="full-width datepicker"
|
|
||||||
:model-value="
|
|
||||||
date_finish != null ? date2Thai(date_finish) : null
|
|
||||||
"
|
|
||||||
:label="`${'ถึงวันที่'}`"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่'}`]"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||||
name="event"
|
|
||||||
class="cursor-pointer"
|
|
||||||
style="color: var(--q-primary)"
|
|
||||||
>
|
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -334,78 +271,35 @@ const selectRuslt = () => {
|
||||||
<div class="col-12 row q-mt-xs">
|
<div class="col-12 row q-mt-xs">
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<q-select
|
<q-select :rules="[
|
||||||
:rules="[
|
(val) =>
|
||||||
(val) =>
|
!!val ||
|
||||||
!!val ||
|
'กรุณาเลือกการพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ',
|
||||||
'กรุณาเลือกการพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ',
|
]" hide-bottom-space :options="options" class="col-xs-12 col-sm-6" dense borderless :disable="!status"
|
||||||
]"
|
emit-value map-options option-label="label" option-value="value" outlined v-model="develop"
|
||||||
hide-bottom-space
|
label="การพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ" />
|
||||||
:options="options"
|
|
||||||
class="col-xs-12 col-sm-6"
|
|
||||||
dense
|
|
||||||
borderless
|
|
||||||
:disable="!status"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="label"
|
|
||||||
option-value="value"
|
|
||||||
outlined
|
|
||||||
v-model="develop"
|
|
||||||
label="การพัฒนาในระหว่างทดลองปฏิบัติหน้าที่ราชการ"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-select
|
<q-select class="col-sm-12" :rules="[
|
||||||
class="col-sm-12"
|
(val) =>
|
||||||
:rules="[
|
!!val ||
|
||||||
(val) =>
|
'กรุณาเลือกผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ',
|
||||||
!!val ||
|
]" hide-bottom-space :options="optionsResult" :disable="!status" dense borderless emit-value
|
||||||
'กรุณาเลือกผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ',
|
map-options option-label="label" option-value="value" outlined v-model="result"
|
||||||
]"
|
label="ผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ" @update:model-value="selectRuslt" />
|
||||||
hide-bottom-space
|
|
||||||
:options="optionsResult"
|
|
||||||
:disable="!status"
|
|
||||||
dense
|
|
||||||
borderless
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="label"
|
|
||||||
option-value="value"
|
|
||||||
outlined
|
|
||||||
v-model="result"
|
|
||||||
label="ผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ"
|
|
||||||
@update:model-value="selectRuslt"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-mt-xs" v-if="result === 3">
|
<div class="row q-mt-xs" v-if="result === 3">
|
||||||
<q-input
|
<q-input outlined dense v-model="expand_month" label="จำนวนเดือน"
|
||||||
outlined
|
:rules="[(val) => !!val || 'กรุณากรอกจำนวนเดือน']" type="number" />
|
||||||
dense
|
|
||||||
v-model="expand_month"
|
|
||||||
label="จำนวนเดือน"
|
|
||||||
:rules="[(val) => !!val || 'กรุณากรอกจำนวนเดือน']"
|
|
||||||
type="number"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-mt-lg">
|
<div class="col-12 row q-mt-lg">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input hide-bottom-space dense borderless outlined :disable="!status" class="bg-white" type="textarea"
|
||||||
hide-bottom-space
|
v-model="reson" label="เหตุผล" :rules="[(val) => !!val || 'กรุณาระบุเหตุผล']" />
|
||||||
dense
|
|
||||||
borderless
|
|
||||||
outlined
|
|
||||||
:disable="!status"
|
|
||||||
class="bg-white"
|
|
||||||
type="textarea"
|
|
||||||
v-model="reson"
|
|
||||||
label="เหตุผล"
|
|
||||||
:rules="[(val) => !!val || 'กรุณาระบุเหตุผล']"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -419,27 +313,11 @@ const selectRuslt = () => {
|
||||||
ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ
|
ประธานคณะกรรมการประเมินผลการปฏิบัติหน้าที่ราชการ
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<q-select
|
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id" outlined :options="commander"
|
||||||
class="col-xs-12 col-sm-8"
|
label="ชื่อ-นามสกุล" option-label="name" disable />
|
||||||
dense
|
|
||||||
v-model="director_id"
|
|
||||||
outlined
|
|
||||||
:options="commander"
|
|
||||||
label="ชื่อ-นามสกุล"
|
|
||||||
option-label="name"
|
|
||||||
disable
|
|
||||||
/>
|
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<datepicker
|
<datepicker menu-class-name="modalfix" v-model="chairman_dated" :locale="'th'" :readonly="!status" autoApply
|
||||||
menu-class-name="modalfix"
|
borderless :enableTimePicker="false" week-start="0">
|
||||||
v-model="chairman_dated"
|
|
||||||
:locale="'th'"
|
|
||||||
:readonly="!status"
|
|
||||||
autoApply
|
|
||||||
borderless
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -447,23 +325,10 @@ const selectRuslt = () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="chairman_dated != null ? date2Thai(chairman_dated) : null
|
||||||
outlined
|
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
||||||
dense
|
|
||||||
:disable="!status"
|
|
||||||
class="full-width datepicker col-3"
|
|
||||||
:model-value="
|
|
||||||
chairman_dated != null ? date2Thai(chairman_dated) : null
|
|
||||||
"
|
|
||||||
:label="`${'ลงวันที่'}`"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||||
name="event"
|
|
||||||
class="cursor-pointer"
|
|
||||||
style="color: var(--q-primary)"
|
|
||||||
>
|
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -479,27 +344,11 @@ const selectRuslt = () => {
|
||||||
<!-- ความเห็นของผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
<!-- ความเห็นของผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<q-select
|
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id2" outlined label="ชื่อ-นามสกุล"
|
||||||
class="col-xs-12 col-sm-8"
|
disable :options="optionDirector" option-label="name" />
|
||||||
dense
|
|
||||||
v-model="director_id2"
|
|
||||||
outlined
|
|
||||||
label="ชื่อ-นามสกุล"
|
|
||||||
:disable="!status"
|
|
||||||
:options="optionDirector"
|
|
||||||
option-label="name"
|
|
||||||
/>
|
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<datepicker
|
<datepicker menu-class-name="modalfix" v-model="director1_dated" :locale="'th'" autoApply borderless
|
||||||
menu-class-name="modalfix"
|
:readonly="!status" :enableTimePicker="false" week-start="0">
|
||||||
v-model="director1_dated"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
borderless
|
|
||||||
:readonly="!status"
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -507,25 +356,12 @@ const selectRuslt = () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="director1_dated != null
|
||||||
outlined
|
? date2Thai(director1_dated)
|
||||||
dense
|
: null
|
||||||
:disable="!status"
|
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
||||||
class="full-width datepicker col-3"
|
|
||||||
:model-value="
|
|
||||||
director1_dated != null
|
|
||||||
? date2Thai(director1_dated)
|
|
||||||
: null
|
|
||||||
"
|
|
||||||
:label="`${'ลงวันที่'}`"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||||
name="event"
|
|
||||||
class="cursor-pointer"
|
|
||||||
style="color: var(--q-primary)"
|
|
||||||
>
|
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -541,27 +377,11 @@ const selectRuslt = () => {
|
||||||
<!-- ผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
<!-- ผู้มีอำนาจสั่งบรรจุตามมาตรา 52 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<div class="col-12 row q-col-gutter-md">
|
||||||
<q-select
|
<q-select class="col-xs-12 col-sm-8" dense v-model="director_id3" outlined label="ชื่อ-นามสกุล"
|
||||||
class="col-xs-12 col-sm-8"
|
:options="optionDirector" disable option-label="name" />
|
||||||
dense
|
|
||||||
v-model="director_id3"
|
|
||||||
outlined
|
|
||||||
label="ชื่อ-นามสกุล"
|
|
||||||
:options="optionDirector"
|
|
||||||
:disable="!status"
|
|
||||||
option-label="name"
|
|
||||||
/>
|
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<datepicker
|
<datepicker menu-class-name="modalfix" v-model="director2_dated" :locale="'th'" autoApply
|
||||||
menu-class-name="modalfix"
|
:readonly="!status" borderless :enableTimePicker="false" week-start="0">
|
||||||
v-model="director2_dated"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
:readonly="!status"
|
|
||||||
borderless
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -569,25 +389,12 @@ const selectRuslt = () => {
|
||||||
{{ parseInt(value + 543) }}
|
{{ parseInt(value + 543) }}
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input outlined dense :disable="!status" class="full-width datepicker col-3" :model-value="director2_dated != null
|
||||||
outlined
|
? date2Thai(director2_dated)
|
||||||
dense
|
: null
|
||||||
:disable="!status"
|
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
||||||
class="full-width datepicker col-3"
|
|
||||||
:model-value="
|
|
||||||
director2_dated != null
|
|
||||||
? date2Thai(director2_dated)
|
|
||||||
: null
|
|
||||||
"
|
|
||||||
:label="`${'ลงวันที่'}`"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||||
name="event"
|
|
||||||
class="cursor-pointer"
|
|
||||||
style="color: var(--q-primary)"
|
|
||||||
>
|
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ const fecthAssign = async (id: string) => {
|
||||||
.get(config.API.formevaluate(id))
|
.get(config.API.formevaluate(id))
|
||||||
.then(async (res: any) => {
|
.then(async (res: any) => {
|
||||||
await fecthdataAssign(res.data.data);
|
await fecthdataAssign(res.data.data);
|
||||||
fullname.value = res.data.data.person.name;
|
fullname.value = res.data.data.experimentee ? res.data.data.experimentee.name : "";
|
||||||
dataArrayNumber.value = 1;
|
dataArrayNumber.value = 1;
|
||||||
})
|
})
|
||||||
.catch((e: any) => {
|
.catch((e: any) => {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ const fecthAssign = async (id: string) => {
|
||||||
await fecthdataAssign(res.data.data);
|
await fecthdataAssign(res.data.data);
|
||||||
evaluate.value = assignStore.evaluate;
|
evaluate.value = assignStore.evaluate;
|
||||||
tabs.value = evaluate.value;
|
tabs.value = evaluate.value;
|
||||||
fullname.value = res.data.data.person.name;
|
fullname.value = res.data.data.experimentee ? res.data.data.experimentee.name : "";
|
||||||
dataArrayNumber.value = 1;
|
dataArrayNumber.value = 1;
|
||||||
})
|
})
|
||||||
.catch((e: any) => {
|
.catch((e: any) => {
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ const fecthAssign = async (id: string) => {
|
||||||
.then(async (res: any) => {
|
.then(async (res: any) => {
|
||||||
await fecthdataAssign(res.data.data);
|
await fecthdataAssign(res.data.data);
|
||||||
evaluate.value = assignStore.evaluate;
|
evaluate.value = assignStore.evaluate;
|
||||||
fullname.value = res.data.data.person.name;
|
fullname.value = res.data.data.experimentee ? res.data.data.experimentee.name : "";
|
||||||
tabs.value = evaluate.value;
|
tabs.value = evaluate.value;
|
||||||
dataArrayNumber.value = 1;
|
dataArrayNumber.value = 1;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "probation_status",
|
name: "probation_status",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สถานะทดลองงาน",
|
label: "สถานะการทดลองงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "probation_status",
|
field: "probation_status",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -251,7 +251,7 @@ const findlist = async (id: string) => {
|
||||||
position: e.position,
|
position: e.position,
|
||||||
level: e.positionEmployeeLevel,
|
level: e.positionEmployeeLevel,
|
||||||
organizationOrganization: e.oc,
|
organizationOrganization: e.oc,
|
||||||
status: statusProbation(e.probation),
|
status: e.probation,
|
||||||
}));
|
}));
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
};
|
};
|
||||||
|
|
@ -306,14 +306,6 @@ const statusProbationMain = (val: number) => {
|
||||||
return " ";
|
return " ";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const statusProbation = (val: boolean) => {
|
|
||||||
switch (val) {
|
|
||||||
case true:
|
|
||||||
return "ทดลองงาน";
|
|
||||||
default:
|
|
||||||
return " ";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// ค้นหาในตาราง
|
// ค้นหาในตาราง
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
|
|
@ -482,6 +474,9 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.name == 'status'">
|
||||||
|
<q-icon v-if="col.value === true" name="mdi-check" color="positive" />
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -333,7 +333,7 @@ const downloadAttachment = async (type: string, id: string) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
console.log(data);
|
console.log(data);
|
||||||
let list: any[] = [];
|
let list: any[] = [];
|
||||||
downloadFile(res, `${id}.${type}`);
|
downloadFile(res, `${"รายชื่อผู้เกษียณอายุราชการ"}.${type}`);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -352,7 +352,6 @@ const downloadFile = (response: any, filename: string) => {
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// const fetchReportCover = async (type: string, orderId: string) => {
|
// const fetchReportCover = async (type: string, orderId: string) => {
|
||||||
// showLoader();
|
// showLoader();
|
||||||
// await http
|
// await http
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch, reactive } from "vue";
|
import { onMounted, ref, computed, reactive } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -12,7 +12,14 @@ import DialogPopupReason from "@/components/Dialogs/PopupReason.vue";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, showLoader, hideLoader, messageError, success } = mixin;
|
const {
|
||||||
|
dialogConfirm,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
messageError,
|
||||||
|
success,
|
||||||
|
dialogMessageNotify,
|
||||||
|
} = mixin;
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const DataStore = useInsigniaDataStore();
|
const DataStore = useInsigniaDataStore();
|
||||||
|
|
||||||
|
|
@ -29,6 +36,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"citizenId",
|
"citizenId",
|
||||||
"name",
|
"name",
|
||||||
|
"employeeType",
|
||||||
"position",
|
"position",
|
||||||
"level",
|
"level",
|
||||||
"salary",
|
"salary",
|
||||||
|
|
@ -51,7 +59,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "citizenId",
|
name: "citizenId",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขบัตรประชาชน",
|
label: "เลขประจำตัวประชาชน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "citizenId",
|
field: "citizenId",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -66,6 +74,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "employeeType",
|
||||||
|
align: "left",
|
||||||
|
label: "สถานภาพ",
|
||||||
|
sortable: true,
|
||||||
|
field: "employeeType",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -211,6 +228,14 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const checkStatus = computed(() => {
|
||||||
|
if (
|
||||||
|
DataStore.roleUser === "insignia1" &&
|
||||||
|
(DataStore.requestStatus == "st1" || DataStore.requestStatus == "st4")
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
} else return false;
|
||||||
|
});
|
||||||
const changtypeOc = () => {
|
const changtypeOc = () => {
|
||||||
if (props.fecthInsigniaByOc) {
|
if (props.fecthInsigniaByOc) {
|
||||||
props.fecthInsigniaByOc(
|
props.fecthInsigniaByOc(
|
||||||
|
|
@ -225,6 +250,8 @@ const changtypeOc = () => {
|
||||||
const clickmodalAdd = () => {
|
const clickmodalAdd = () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
fecthlistRetire();
|
fecthlistRetire();
|
||||||
|
fecthInsignia();
|
||||||
|
insigniaType.value = "";
|
||||||
};
|
};
|
||||||
// fecth profile
|
// fecth profile
|
||||||
const fecthlistRetire = async () => {
|
const fecthlistRetire = async () => {
|
||||||
|
|
@ -257,14 +284,16 @@ const fecthlistperson = async (id: string) => {
|
||||||
criterias: data,
|
criterias: data,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rows2.value = res.data.result.map((e: any) => ({
|
let data = res.data.result.map((e: any) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
fullname: e.fullname == null ? "-" : e.fullname,
|
fullname: e.fullname == null ? "-" : e.fullname,
|
||||||
position: e.position == null ? "-" : e.position,
|
position: e.position == null ? "-" : e.position,
|
||||||
level: e.positionEmployeeLevel == null ? "-" : e.positionEmployeeLevel,
|
level: e.positionEmployeeLevel == null ? "-" : e.positionEmployeeLevel,
|
||||||
organizationOrganization: e.oc == null ? "-" : e.oc,
|
organizationOrganization: e.oc == null ? "-" : e.oc,
|
||||||
|
ocId: DataStore.convertOcid(e.oc),
|
||||||
}));
|
}));
|
||||||
modalAdd.value = true;
|
modalAdd.value = true;
|
||||||
|
rows2.value = data.filter((e: any) => e.ocId === DataStore.typeOc);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -274,20 +303,23 @@ const fecthlistperson = async (id: string) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const clickAdd = async (id: string) => {
|
const clickAdd = async (id: string) => {
|
||||||
dialogConfirm(
|
if (insigniaType.value !== "") {
|
||||||
$q,
|
dialogConfirm(
|
||||||
async () => {
|
$q,
|
||||||
await addlistperson(id);
|
async () => {
|
||||||
},
|
await addlistperson(id);
|
||||||
"ยืนยันการเพิ่มรายชื่อขอพระราชทานเครื่องราชฯ",
|
},
|
||||||
"ต้องการยืนยันการเพิ่มรายชื่อขอพระราชทานเครื่องราชฯ นี้หรือไม่ ?"
|
"ยืนยันการเพิ่มรายชื่อขอพระราชทานเครื่องราชฯ",
|
||||||
);
|
"ต้องการยืนยันการเพิ่มรายชื่อขอพระราชทานเครื่องราชฯ นี้หรือไม่ ?"
|
||||||
|
);
|
||||||
|
} else dialogMessageNotify($q, "กรุณาเลือกรายชื่อขอพระราชทานเครื่องราชฯ");
|
||||||
};
|
};
|
||||||
|
|
||||||
const addlistperson = async (id: string) => {
|
const addlistperson = async (id: string) => {
|
||||||
showLoader();
|
showLoader();
|
||||||
let data = {
|
let data = {
|
||||||
profileId: id,
|
profileId: id,
|
||||||
|
insigniaId: insigniaType.value,
|
||||||
insigniaPeriodId: props.roundId,
|
insigniaPeriodId: props.roundId,
|
||||||
};
|
};
|
||||||
await http
|
await http
|
||||||
|
|
@ -328,26 +360,47 @@ const downloadFile = (response: any, filename: string) => {
|
||||||
link.click();
|
link.click();
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
};
|
};
|
||||||
|
const downloadFileexcel = async () => {
|
||||||
const downloadReport = async (type: string = "pdf") => {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.reportInsignia("45", type, props.roundId!), {
|
.get(config.API.insigniaDowanload(DataStore.requestId), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
downloadFile(
|
await downloadFile(
|
||||||
res,
|
res,
|
||||||
`บัญชีแสดงรายชื่อผู้ขอพระราชทานเหรียญจักรพรรดิมาลา ${props.roundName}.${type}`
|
`รายชื่อข้าราชการสามัญฯ ${props.roundName}.xlsx`
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((err) => {
|
||||||
messageError($q, e);
|
console.log(err);
|
||||||
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// const downloadReport = async (type: string = "pdf") => {
|
||||||
|
// showLoader();
|
||||||
|
// await http
|
||||||
|
// .get(config.API.reportInsignia("45", type, props.roundId!), {
|
||||||
|
// responseType: "blob",
|
||||||
|
// })
|
||||||
|
// .then(async (res) => {
|
||||||
|
// console.log(res);
|
||||||
|
|
||||||
|
// downloadFile(
|
||||||
|
// res,
|
||||||
|
// `บัญชีแสดงรายชื่อผู้ขอพระราชทานเหรียญจักรพรรดิมาลา ${props.roundName}.${type}`
|
||||||
|
// );
|
||||||
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
const clickSave = () => {
|
const clickSave = () => {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
|
|
@ -479,7 +532,6 @@ const fecthInsignia = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const nextPage = (id: string) => {
|
const nextPage = (id: string) => {
|
||||||
router.push(`/registry/${id}`);
|
router.push(`/registry/${id}`);
|
||||||
};
|
};
|
||||||
|
|
@ -493,13 +545,13 @@ const resetFilter = () => {
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
};
|
};
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: "desc",
|
sortBy: "name",
|
||||||
descending: false,
|
descending: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
const pagination2 = ref({
|
const pagination2 = ref({
|
||||||
sortBy: "desc",
|
sortBy: "name",
|
||||||
descending: false,
|
descending: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
|
|
@ -558,10 +610,38 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
||||||
@update:model-value="DataStore.searchFilterTable"
|
@update:model-value="DataStore.searchFilterTable"
|
||||||
/>
|
/>
|
||||||
<div>
|
<div>
|
||||||
<q-btn size="md" icon="mdi-download" flat round color="primary">
|
<q-select
|
||||||
|
v-model="DataStore.employeeClass"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'สถานภาพ'}`"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
:options="DataStore.employeeClassOps"
|
||||||
|
option-value="id"
|
||||||
|
:readonly="false"
|
||||||
|
:borderless="false"
|
||||||
|
style="min-width: 150px"
|
||||||
|
@update:model-value="
|
||||||
|
DataStore.selectEmployeeClass(DataStore.employeeClass)
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<q-btn
|
||||||
|
size="md"
|
||||||
|
icon="mdi-download"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
@click="downloadFileexcel"
|
||||||
|
>
|
||||||
<!-- @click="downloadReport('pdf')" -->
|
<!-- @click="downloadReport('pdf')" -->
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
<q-menu>
|
<!-- <q-menu>
|
||||||
<q-list style="min-width: 150px">
|
<q-list style="min-width: 150px">
|
||||||
<q-item clickable v-close-popup @click="downloadReport('pdf')">
|
<q-item clickable v-close-popup @click="downloadReport('pdf')">
|
||||||
<q-item-section avatar
|
<q-item-section avatar
|
||||||
|
|
@ -582,7 +662,7 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
||||||
<q-item-section>ไฟล์ .xlsx</q-item-section>
|
<q-item-section>ไฟล์ .xlsx</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-menu>
|
</q-menu> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
size="12px"
|
size="12px"
|
||||||
|
|
@ -591,6 +671,12 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
||||||
color="add"
|
color="add"
|
||||||
icon="mdi-plus"
|
icon="mdi-plus"
|
||||||
@click="clickmodalAdd"
|
@click="clickmodalAdd"
|
||||||
|
v-if="
|
||||||
|
(DataStore.isLock == false &&
|
||||||
|
DataStore.requestStatus == 'st5' &&
|
||||||
|
DataStore.roleUser == 'admin') ||
|
||||||
|
checkStatus == true
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-tooltip>เพิ่ม</q-tooltip>
|
<q-tooltip>เพิ่ม</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
@ -655,7 +741,14 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th
|
||||||
|
auto-width
|
||||||
|
v-if="
|
||||||
|
(DataStore.isLock == false &&
|
||||||
|
DataStore.requestStatus == 'st5') ||
|
||||||
|
checkStatus == true
|
||||||
|
"
|
||||||
|
/>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
|
|
@ -673,6 +766,9 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
||||||
<q-td key="name" :props="props">
|
<q-td key="name" :props="props">
|
||||||
{{ props.row.name }}
|
{{ props.row.name }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
<q-td key="employeeType" :props="props">
|
||||||
|
{{ props.row.employeeType }}
|
||||||
|
</q-td>
|
||||||
<q-td key="position" :props="props">
|
<q-td key="position" :props="props">
|
||||||
{{ props.row.position }}
|
{{ props.row.position }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -694,7 +790,15 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
||||||
<q-td key="dateSend" :props="props">
|
<q-td key="dateSend" :props="props">
|
||||||
{{ props.row.dateSend }}
|
{{ props.row.dateSend }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td
|
||||||
|
auto-width
|
||||||
|
v-if="
|
||||||
|
(DataStore.isLock == false &&
|
||||||
|
DataStore.requestStatus == 'st5' &&
|
||||||
|
DataStore.roleUser == 'admin') ||
|
||||||
|
checkStatus == true
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
roleUser == 'admin' ||
|
roleUser == 'admin' ||
|
||||||
|
|
@ -790,6 +894,7 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
||||||
<q-card style="width: 850px; max-width: 80vw" class="q-pb-md">
|
<q-card style="width: 850px; max-width: 80vw" class="q-pb-md">
|
||||||
<q-toolbar class="q-py-md">
|
<q-toolbar class="q-py-md">
|
||||||
<q-toolbar-title class="text-h6">เพิ่มรายชื่อ </q-toolbar-title>
|
<q-toolbar-title class="text-h6">เพิ่มรายชื่อ </q-toolbar-title>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="close"
|
icon="close"
|
||||||
unelevated
|
unelevated
|
||||||
|
|
@ -802,15 +907,33 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
<q-toolbar style="padding: 0">
|
<q-toolbar style="padding: 0">
|
||||||
|
<q-select
|
||||||
|
v-model="insigniaType"
|
||||||
|
label="ปรเภทเครื่องราชฯ"
|
||||||
|
dense
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="insigniaOptions"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
:readonly="false"
|
||||||
|
:borderless="false"
|
||||||
|
:outlined="true"
|
||||||
|
:hide-dropdown-icon="false"
|
||||||
|
style="min-width: 250px"
|
||||||
|
/>
|
||||||
|
<q-space />
|
||||||
<q-input
|
<q-input
|
||||||
borderless
|
borderless
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="width: 850px; max-width: auto"
|
|
||||||
v-model="filterKeyword2"
|
v-model="filterKeyword2"
|
||||||
>
|
>
|
||||||
|
<!-- style="width: 850px; max-width: auto"? -->
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"citizenId",
|
"citizenId",
|
||||||
"name",
|
"name",
|
||||||
|
"employeeType",
|
||||||
"position",
|
"position",
|
||||||
"level",
|
"level",
|
||||||
"salary",
|
"salary",
|
||||||
|
|
@ -52,7 +53,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "citizenId",
|
name: "citizenId",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขบัตรประชาชน",
|
label: "เลขประจำตัวประชาชน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "citizenId",
|
field: "citizenId",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -67,6 +68,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "employeeType",
|
||||||
|
align: "left",
|
||||||
|
label: "สถานภาพ",
|
||||||
|
sortable: true,
|
||||||
|
field: "employeeType",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -76,6 +86,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "level",
|
name: "level",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -172,7 +183,7 @@ const resetFilter = () => {
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
};
|
};
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: "desc",
|
sortBy: "name",
|
||||||
descending: false,
|
descending: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
|
|
@ -237,6 +248,27 @@ const closeReson = () => {
|
||||||
style="min-width: 150px"
|
style="min-width: 150px"
|
||||||
@update:model-value="DataStore.searchFilterTable"
|
@update:model-value="DataStore.searchFilterTable"
|
||||||
/>
|
/>
|
||||||
|
<div>
|
||||||
|
<q-select
|
||||||
|
v-model="DataStore.employeeClass"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'สถานภาพ'}`"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
:options="DataStore.employeeClassOps"
|
||||||
|
option-value="id"
|
||||||
|
:readonly="false"
|
||||||
|
:borderless="false"
|
||||||
|
style="min-width: 150px"
|
||||||
|
@update:model-value="
|
||||||
|
DataStore.selectEmployeeClass(DataStore.employeeClass)
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -315,6 +347,9 @@ const closeReson = () => {
|
||||||
<q-td key="name" :props="props">
|
<q-td key="name" :props="props">
|
||||||
{{ props.row.name }}
|
{{ props.row.name }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
<q-td key="employeeType" :props="props">
|
||||||
|
{{ props.row.employeeType }}
|
||||||
|
</q-td>
|
||||||
<q-td key="position" :props="props">
|
<q-td key="position" :props="props">
|
||||||
{{ props.row.position }}
|
{{ props.row.position }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -324,7 +359,6 @@ const closeReson = () => {
|
||||||
<q-td key="salary" :props="props">
|
<q-td key="salary" :props="props">
|
||||||
{{ Number(props.row.salary).toLocaleString() }}
|
{{ Number(props.row.salary).toLocaleString() }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
||||||
<q-td key="insigniaType" :props="props">
|
<q-td key="insigniaType" :props="props">
|
||||||
{{ props.row.insigniaType }}
|
{{ props.row.insigniaType }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"citizenId",
|
"citizenId",
|
||||||
"name",
|
"name",
|
||||||
|
"employeeType",
|
||||||
"position",
|
"position",
|
||||||
"level",
|
"level",
|
||||||
"salary",
|
"salary",
|
||||||
|
|
@ -53,7 +54,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "citizenId",
|
name: "citizenId",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขบัตรประชาชน",
|
label: "เลขประจำตัวประชาชน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "citizenId",
|
field: "citizenId",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -68,6 +69,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "employeeType",
|
||||||
|
align: "left",
|
||||||
|
label: "สถานภาพ",
|
||||||
|
sortable: true,
|
||||||
|
field: "employeeType",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -171,7 +181,7 @@ const resetFilter = () => {
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
};
|
};
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: "desc",
|
sortBy: "name",
|
||||||
descending: false,
|
descending: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
|
|
@ -235,6 +245,27 @@ const closeReson = () => {
|
||||||
style="min-width: 150px"
|
style="min-width: 150px"
|
||||||
@update:model-value="DataStore.searchFilterTable"
|
@update:model-value="DataStore.searchFilterTable"
|
||||||
/>
|
/>
|
||||||
|
<div>
|
||||||
|
<q-select
|
||||||
|
v-model="DataStore.employeeClass"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'สถานภาพ'}`"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
:options="DataStore.employeeClassOps"
|
||||||
|
option-value="id"
|
||||||
|
:readonly="false"
|
||||||
|
:borderless="false"
|
||||||
|
style="min-width: 150px"
|
||||||
|
@update:model-value="
|
||||||
|
DataStore.selectEmployeeClass(DataStore.employeeClass)
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -313,6 +344,9 @@ const closeReson = () => {
|
||||||
<q-td key="name" :props="props">
|
<q-td key="name" :props="props">
|
||||||
{{ props.row.name }}
|
{{ props.row.name }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
<q-td key="employeeType" :props="props">
|
||||||
|
{{ props.row.employeeType }}
|
||||||
|
</q-td>
|
||||||
<q-td key="position" :props="props">
|
<q-td key="position" :props="props">
|
||||||
{{ props.row.position }}
|
{{ props.row.position }}
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ const fecthOrg = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: "desc",
|
sortBy: "name",
|
||||||
descending: false,
|
descending: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ const checkRole = async () => {
|
||||||
} else {
|
} else {
|
||||||
roleUser.value = "admin";
|
roleUser.value = "admin";
|
||||||
}
|
}
|
||||||
|
DataStore.roleUser = roleUser.value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -138,8 +139,9 @@ const changround = async () => {
|
||||||
const roundFilter = await optionRound.value.find(
|
const roundFilter = await optionRound.value.find(
|
||||||
(x: any) => round.value === x.id
|
(x: any) => round.value === x.id
|
||||||
);
|
);
|
||||||
roundName.value = `รอบการเสนอขอพระราชทานเครื่องราชปี ${roundFilter.year + 543
|
roundName.value = `รอบการเสนอขอพระราชทานเครื่องราชปี ${
|
||||||
}`;
|
roundFilter.year + 543
|
||||||
|
}`;
|
||||||
};
|
};
|
||||||
const requestNote = ref<string>("");
|
const requestNote = ref<string>("");
|
||||||
const requestStatus = ref<string>("");
|
const requestStatus = ref<string>("");
|
||||||
|
|
@ -155,8 +157,10 @@ const fecthInsigniaByOc = async (
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
requestNote.value = res.data.result.requestNote;
|
requestNote.value = res.data.result.requestNote;
|
||||||
requestStatus.value = res.data.result.requestStatus;
|
requestStatus.value = res.data.result.requestStatus;
|
||||||
|
|
||||||
await DataStore.fetchData(res.data.result.items);
|
await DataStore.fetchData(res.data.result.items);
|
||||||
|
await DataStore.fetchDataInsignia(res.data.result);
|
||||||
|
// DataStore.isLock = await res.data.result.isLock;
|
||||||
|
// DataStore.requestId = await res.data.result.requestId;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -293,76 +297,173 @@ const requestSendNote = async () => {
|
||||||
<q-card bordered class="row col-12 q-mt-sm">
|
<q-card bordered class="row col-12 q-mt-sm">
|
||||||
<div class="row col-12 items-center bg-grey-1">
|
<div class="row col-12 items-center bg-grey-1">
|
||||||
<div class="q-pl-md q-pr-sm text-weight-medium text-grey-7">รอบ</div>
|
<div class="q-pl-md q-pr-sm text-weight-medium text-grey-7">รอบ</div>
|
||||||
<q-select borderless dense v-model="round" :options="optionRound" map-options emit-value option-value="id"
|
<q-select
|
||||||
option-label="name" @update:model-value="changround" />
|
borderless
|
||||||
|
dense
|
||||||
|
v-model="round"
|
||||||
|
:options="optionRound"
|
||||||
|
map-options
|
||||||
|
emit-value
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
@update:model-value="changround"
|
||||||
|
/>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<!-- สกจ. Freez ข้อมูล -->
|
<!-- สกจ. Freez ข้อมูล -->
|
||||||
<q-btn v-if="roleUser == 'admin'" dense unelevated label="ล็อกข้อมูล" color="public" class="q-px-md q-ml-md"
|
<q-btn
|
||||||
@click="requestSendNote">
|
v-if="roleUser == 'admin' && DataStore.isLock !== true"
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
label="ล็อกข้อมูล"
|
||||||
|
color="public"
|
||||||
|
class="q-px-md q-ml-md"
|
||||||
|
@click="requestSendNote"
|
||||||
|
>
|
||||||
<q-tooltip>ล็อกข้อมูล</q-tooltip>
|
<q-tooltip>ล็อกข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div v-if="roleUser == 'admin'" class="col-12 row bg-white">
|
<div v-if="roleUser == 'admin'" class="col-12 row bg-white">
|
||||||
<div class="fit q-px-md q-py-sm">
|
<div class="fit q-px-md q-py-sm">
|
||||||
<div class="row col-12 q-col-gutter-sm fit">
|
<div class="row col-12 q-col-gutter-sm fit">
|
||||||
<cardTop :amount="stat.orgAllCount" label="หน่วยงานทั้งหมด" color="#016987" />
|
<cardTop
|
||||||
<cardTop :amount="stat.orgSendCount" label="หน่วยงานที่ส่งรายชื่อเเล้ว" color="#02A998" />
|
:amount="stat.orgAllCount"
|
||||||
<cardTop :amount="stat.orgNoSendCount" label="หน่วยงานที่ยังไม่ได้ส่งรายชื่อ" color="#2EA0FF" />
|
label="หน่วยงานทั้งหมด"
|
||||||
<cardTop :amount="stat.allUserUser" label="จำนวนคนที่ยื่นขอ" color="#4154B3" />
|
color="#016987"
|
||||||
|
/>
|
||||||
|
<cardTop
|
||||||
|
:amount="stat.orgSendCount"
|
||||||
|
label="หน่วยงานที่ส่งรายชื่อเเล้ว"
|
||||||
|
color="#02A998"
|
||||||
|
/>
|
||||||
|
<cardTop
|
||||||
|
:amount="stat.orgNoSendCount"
|
||||||
|
label="หน่วยงานที่ยังไม่ได้ส่งรายชื่อ"
|
||||||
|
color="#2EA0FF"
|
||||||
|
/>
|
||||||
|
<cardTop
|
||||||
|
:amount="stat.allUserUser"
|
||||||
|
label="จำนวนคนที่ยื่นขอ"
|
||||||
|
color="#4154B3"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<q-card flat bordered class="col-12 q-mt-sm" v-if="loading">
|
<q-card flat bordered class="col-12 q-mt-sm" v-if="loading">
|
||||||
<div v-if="roleUser == 'insignia1' && requestStatus == 'st4'" class="q-pa-md q-gutter-sm">
|
<div
|
||||||
<q-banner inline-actions bordered class="bg-orange-1 text-orange border-orange">
|
v-if="roleUser == 'insignia1' && requestStatus == 'st4'"
|
||||||
|
class="q-pa-md q-gutter-sm"
|
||||||
|
>
|
||||||
|
<q-banner
|
||||||
|
inline-actions
|
||||||
|
bordered
|
||||||
|
class="bg-orange-1 text-orange border-orange"
|
||||||
|
>
|
||||||
<q-icon name="mdi-information-outline" size="20px" /> หมายเหตุ ตีกลับ
|
<q-icon name="mdi-information-outline" size="20px" /> หมายเหตุ ตีกลับ
|
||||||
{{ requestNote }}
|
{{ requestNote }}
|
||||||
</q-banner>
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<q-tabs v-model="tab" dense class="text-grey" active-color="primary" active-class="bg-teal-1"
|
<q-tabs
|
||||||
indicator-color="primary" align="left">
|
v-model="tab"
|
||||||
|
dense
|
||||||
|
class="text-grey"
|
||||||
|
active-color="primary"
|
||||||
|
active-class="bg-teal-1"
|
||||||
|
indicator-color="primary"
|
||||||
|
align="left"
|
||||||
|
>
|
||||||
<q-tab name="pending" label="คนที่ยื่นขอ" />
|
<q-tab name="pending" label="คนที่ยื่นขอ" />
|
||||||
<q-tab name="reject" label="คนที่ไม่ยื่นขอ" />
|
<q-tab name="reject" label="คนที่ไม่ยื่นขอ" />
|
||||||
<q-tab name="delete" label="คนที่ถูกลบออก" />
|
<q-tab name="delete" label="คนที่ถูกลบออก" />
|
||||||
<q-tab v-if="roleUser == 'admin'" name="organization" label="หน่วยงานที่ยังไม่ได้ส่งรายชื่อ" />
|
<q-tab
|
||||||
|
v-if="roleUser == 'admin'"
|
||||||
|
name="organization"
|
||||||
|
label="หน่วยงานที่ยังไม่ได้ส่งรายชื่อ"
|
||||||
|
/>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-tab-panels v-model="tab" animated>
|
<q-tab-panels v-model="tab" animated>
|
||||||
<q-tab-panel name="pending" class="q-pa-none">
|
<q-tab-panel name="pending" class="q-pa-none">
|
||||||
<tab1 :tab="tab" :roundId="round" :roundName="roundName" :fecthInsigniaByOc="fecthInsigniaByOc"
|
<tab1
|
||||||
:role-user="roleUser" :request-status="requestStatus" />
|
:tab="tab"
|
||||||
|
:roundId="round"
|
||||||
|
:roundName="roundName"
|
||||||
|
:fecthInsigniaByOc="fecthInsigniaByOc"
|
||||||
|
:role-user="roleUser"
|
||||||
|
:request-status="requestStatus"
|
||||||
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="reject" class="q-pa-none">
|
<q-tab-panel name="reject" class="q-pa-none">
|
||||||
<tab2 :tab="tab" :roundId="round" :fecthInsigniaByOc="fecthInsigniaByOc" :role-user="roleUser" />
|
<tab2
|
||||||
|
:tab="tab"
|
||||||
|
:roundId="round"
|
||||||
|
:fecthInsigniaByOc="fecthInsigniaByOc"
|
||||||
|
:role-user="roleUser"
|
||||||
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="delete" class="q-pa-none">
|
<q-tab-panel name="delete" class="q-pa-none">
|
||||||
<tab3 :tab="tab" :roundId="round" :fecthInsigniaByOc="fecthInsigniaByOc" :role-user="roleUser" />
|
<tab3
|
||||||
|
:tab="tab"
|
||||||
|
:roundId="round"
|
||||||
|
:fecthInsigniaByOc="fecthInsigniaByOc"
|
||||||
|
:role-user="roleUser"
|
||||||
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel v-if="roleUser == 'admin'" name="organization" class="q-pa-none">
|
<q-tab-panel
|
||||||
|
v-if="roleUser == 'admin'"
|
||||||
|
name="organization"
|
||||||
|
class="q-pa-none"
|
||||||
|
>
|
||||||
<tab4 :tab="tab" :roundId="round" :role-user="roleUser" />
|
<tab4 :tab="tab" :roundId="round" :role-user="roleUser" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
|
|
||||||
<q-toolbar class="q-py-md text-right">
|
<q-toolbar class="q-py-md text-right">
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn v-if="roleUser == 'insignia1' &&
|
<q-btn
|
||||||
(requestStatus == 'st1' || requestStatus == 'st4')
|
v-if="
|
||||||
" dense unelevated label="บันทึกข้อมูล" color="public" class="q-px-md" @click="sendToDirector" />
|
roleUser == 'insignia1' &&
|
||||||
<q-btn v-if="roleUser == 'insignia2' && requestStatus == 'st3'" dense unelevated label="ตีกลับ" color="orange"
|
(requestStatus == 'st1' || requestStatus == 'st4')
|
||||||
class="q-px-md" @click="popupBackToEdit" />
|
"
|
||||||
<q-btn v-if="roleUser == 'insignia2' && requestStatus == 'st3'" dense unelevated label="อนุมัติ" color="positive"
|
dense
|
||||||
class="q-px-md q-ml-md" @click="directorApproved" />
|
unelevated
|
||||||
|
label="บันทึกข้อมูล"
|
||||||
|
color="public"
|
||||||
|
class="q-px-md"
|
||||||
|
@click="sendToDirector"
|
||||||
|
/>
|
||||||
|
<q-btn
|
||||||
|
v-if="roleUser == 'insignia2' && requestStatus == 'st3'"
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
label="ตีกลับ"
|
||||||
|
color="orange"
|
||||||
|
class="q-px-md"
|
||||||
|
@click="popupBackToEdit"
|
||||||
|
/>
|
||||||
|
<q-btn
|
||||||
|
v-if="roleUser == 'insignia2' && requestStatus == 'st3'"
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
label="อนุมัติ"
|
||||||
|
color="positive"
|
||||||
|
class="q-px-md q-ml-md"
|
||||||
|
@click="directorApproved"
|
||||||
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
||||||
<DialogPopupReason :modal="modalPopupBackToEdit" title="หมายเหตุการตีกลับ" label="หมายเหตุ"
|
<DialogPopupReason
|
||||||
:click-close="closeModalPopupBackToEdit" :savaForm="backToEdit" />
|
:modal="modalPopupBackToEdit"
|
||||||
|
title="หมายเหตุการตีกลับ"
|
||||||
|
label="หมายเหตุ"
|
||||||
|
:click-close="closeModalPopupBackToEdit"
|
||||||
|
:savaForm="backToEdit"
|
||||||
|
/>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "citizenId",
|
name: "citizenId",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขบัตรประชาชน",
|
label: "เลขประจำตัวประชาชน",
|
||||||
field: "citizenId",
|
field: "citizenId",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -350,6 +350,17 @@ const resetFilter = () => {
|
||||||
filter.value = "";
|
filter.value = "";
|
||||||
filterRef.value!.focus();
|
filterRef.value!.focus();
|
||||||
};
|
};
|
||||||
|
const pagination = ref({
|
||||||
|
sortBy: "name",
|
||||||
|
descending: false,
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
});
|
||||||
|
const paging = ref<boolean>(true);
|
||||||
|
const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
|
else return start + "-" + end + " ใน " + total;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -498,6 +509,8 @@ const resetFilter = () => {
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
row-key="name"
|
row-key="name"
|
||||||
|
:pagination-label="paginationLabel"
|
||||||
|
v-model:pagination="pagination"
|
||||||
>
|
>
|
||||||
<template v-slot:body-cell="props">
|
<template v-slot:body-cell="props">
|
||||||
<q-td :props="props">
|
<q-td :props="props">
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@ const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
|
|
||||||
export const useInsigniaDataStore = defineStore("insignia", () => {
|
export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
|
const isLock = ref<boolean>(false)
|
||||||
|
const roleUser = ref<string>("")
|
||||||
|
const requestId = ref<string>("")
|
||||||
|
const requestStatus = ref<string>("")
|
||||||
let optionsTypeOc = ref<any>([]);
|
let optionsTypeOc = ref<any>([]);
|
||||||
let typeOc = ref<string>("");
|
let typeOc = ref<string>("");
|
||||||
const agency = ref<string>("");
|
const agency = ref<string>("");
|
||||||
|
|
@ -13,6 +17,8 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
const listinsignia = ref<any>([]);
|
const listinsignia = ref<any>([]);
|
||||||
const typeinsignia = ref<number | string>("all");
|
const typeinsignia = ref<number | string>("all");
|
||||||
let typeinsigniaOptions = ref<any>([{ id: "all", name: "ทั้งหมด" }]);
|
let typeinsigniaOptions = ref<any>([{ id: "all", name: "ทั้งหมด" }]);
|
||||||
|
const employeeClass = ref<string>("all");
|
||||||
|
const employeeClassOps = ref<any>([{ name: "ทั้งหมด", id: "all" }, { name: "ข้าราชการ กทม.สามัญ", id: "officer" }, { name: "ลูกจ้างประจำ", id: "perm" }])
|
||||||
|
|
||||||
const typeReport = ref<string>("");
|
const typeReport = ref<string>("");
|
||||||
const titleReport = ref<string>("");
|
const titleReport = ref<string>("");
|
||||||
|
|
@ -24,7 +30,7 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
|
|
||||||
const fetchData = async (data: any) => {
|
const fetchData = async (data: any) => {
|
||||||
if (data !== null) {
|
if (data !== null) {
|
||||||
rows.value = await data.map((e: any) => ({
|
let datalist = await data.map((e: any) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
citizenId: e.citizenId,
|
citizenId: e.citizenId,
|
||||||
profileId: e.profileId,
|
profileId: e.profileId,
|
||||||
|
|
@ -38,11 +44,18 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
insigniaLevel: e.level,
|
insigniaLevel: e.level,
|
||||||
dateSend: date2Thai(e.requestDate),
|
dateSend: date2Thai(e.requestDate),
|
||||||
requestNote: e.requestNote,
|
requestNote: e.requestNote,
|
||||||
|
employeeType: profileType(e.profileType),
|
||||||
}));
|
}));
|
||||||
listinsignia.value = await rows.value;
|
rows.value = await datalist
|
||||||
|
listinsignia.value = await datalist;
|
||||||
filtertypeInsignia();
|
filtertypeInsignia();
|
||||||
} else rows.value = [];
|
} else rows.value = [];
|
||||||
};
|
};
|
||||||
|
const fetchDataInsignia = async (data: any) => {
|
||||||
|
isLock.value = data.isLock;
|
||||||
|
requestId.value = data.requestId;
|
||||||
|
requestStatus.value = data.requestStatus;
|
||||||
|
}
|
||||||
const fetchOption = (op: any) => {
|
const fetchOption = (op: any) => {
|
||||||
if (agency.value !== null) {
|
if (agency.value !== null) {
|
||||||
typeOc.value = agency.value;
|
typeOc.value = agency.value;
|
||||||
|
|
@ -81,6 +94,29 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const selectEmployeeClass = (employeeClass: string) => {
|
||||||
|
if (employeeClass == "officer") {
|
||||||
|
let list = listinsignia.value.filter((e: any) => e.employeeType === "ข้าราชการ กทม.สามัญ")
|
||||||
|
rows.value = list
|
||||||
|
} else if (employeeClass === "perm") {
|
||||||
|
let list = listinsignia.value.filter((e: any) => e.employeeType === "ลูกจ้างประจำ")
|
||||||
|
rows.value = list
|
||||||
|
} else rows.value = listinsignia.value
|
||||||
|
}
|
||||||
|
const convertOcid = (oc: string) => {
|
||||||
|
let ocdata = optionsTypeOc.value.find((e: any) => e.name === oc)
|
||||||
|
if (ocdata) {
|
||||||
|
return ocdata.id
|
||||||
|
} else return ""
|
||||||
|
}
|
||||||
|
const profileType = (val: string) => {
|
||||||
|
switch (val) {
|
||||||
|
case "officer":
|
||||||
|
return "ข้าราชการ กทม.สามัญ";
|
||||||
|
case "employee":
|
||||||
|
return "ลูกจ้างประจำ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
optionsTypeOc,
|
optionsTypeOc,
|
||||||
|
|
@ -93,7 +129,16 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
fetchOption,
|
fetchOption,
|
||||||
searchFilterTable,
|
searchFilterTable,
|
||||||
setTypeandTitle,
|
setTypeandTitle,
|
||||||
|
convertOcid,
|
||||||
typeReport,
|
typeReport,
|
||||||
titleReport,
|
titleReport,
|
||||||
|
selectEmployeeClass,
|
||||||
|
employeeClass,
|
||||||
|
employeeClassOps,
|
||||||
|
fetchDataInsignia,
|
||||||
|
isLock,
|
||||||
|
requestId,
|
||||||
|
roleUser,
|
||||||
|
requestStatus,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "citizenId",
|
name: "citizenId",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขบัตรประชาชน",
|
label: "เลขประจำตัวประชาชน",
|
||||||
field: "citizenId",
|
field: "citizenId",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -358,6 +358,17 @@ const resetFilter = () => {
|
||||||
filter.value = "";
|
filter.value = "";
|
||||||
filterRef.value!.focus();
|
filterRef.value!.focus();
|
||||||
};
|
};
|
||||||
|
const pagination = ref({
|
||||||
|
sortBy: "name",
|
||||||
|
descending: false,
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
});
|
||||||
|
const paging = ref<boolean>(true);
|
||||||
|
const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
|
else return start + "-" + end + " ใน " + total;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -598,6 +609,8 @@ const resetFilter = () => {
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
row-key="name"
|
row-key="name"
|
||||||
|
:pagination-label="paginationLabel"
|
||||||
|
v-model:pagination="pagination"
|
||||||
>
|
>
|
||||||
<template v-slot:body-cell="props">
|
<template v-slot:body-cell="props">
|
||||||
<q-td :props="props">
|
<q-td :props="props">
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -416,8 +416,8 @@ const fecthExamRoundOption = async (commandCode: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
console.log(nameCommand.value);
|
// console.log(nameCommand.value);
|
||||||
console.log(CommandOption.value);
|
// console.log(CommandOption.value);
|
||||||
|
|
||||||
let signBy = null;
|
let signBy = null;
|
||||||
if (!nameCommand.value.length) {
|
if (!nameCommand.value.length) {
|
||||||
|
|
|
||||||
|
|
@ -172,9 +172,9 @@ const statuscode = computed(() => {
|
||||||
orderTypeCode.value === "c-pm-14" ||
|
orderTypeCode.value === "c-pm-14" ||
|
||||||
orderTypeCode.value === "c-pm-21"
|
orderTypeCode.value === "c-pm-21"
|
||||||
) {
|
) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return true;
|
||||||
});
|
});
|
||||||
const dialogDeleteData = async (id: string) => {
|
const dialogDeleteData = async (id: string) => {
|
||||||
dialogRemove($q, () => deleteData(id));
|
dialogRemove($q, () => deleteData(id));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue