Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into me
This commit is contained in:
commit
33681a0b37
37 changed files with 1740 additions and 806 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -7709,7 +7709,7 @@
|
|||
},
|
||||
"node_modules/vue": {
|
||||
"version": "3.2.47",
|
||||
"resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz",
|
||||
// "resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz",
|
||||
"integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.2.47",
|
||||
|
|
@ -13775,7 +13775,7 @@
|
|||
},
|
||||
"vue": {
|
||||
"version": "3.2.47",
|
||||
"resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz",
|
||||
// "resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz",
|
||||
"integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==",
|
||||
"requires": {
|
||||
"@vue/compiler-dom": "3.2.47",
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ export default {
|
|||
calculateDate: () => `${calculate}/assign-finish`,
|
||||
saveFinish: (personalId: string) =>
|
||||
`${finish}/probation-assign?personal_id=${personalId}`,
|
||||
saveEditAssign: (personalId: string) =>
|
||||
`${finish}/probation-assign?id=${personalId}`,
|
||||
personalAdd: () => `${personal}/add`,
|
||||
probationGetAssignList: (personalId:string) =>
|
||||
`${finish}/probation-assign-list?personal_id=${personalId}`,
|
||||
|
|
@ -36,7 +38,7 @@ export default {
|
|||
formevaluate: (id: string) => `${evaluate}/evaluate-record?assign_id=${id}`,
|
||||
formevaluateround: (id: string, no: string) => `${evaluate}/evaluate-record?assign_id=${id}&evaluate_no=${no}`,
|
||||
formevaluateRecord: (id: string) => `${evaluate}/evaluate-record/create?assign_id=${id}`,
|
||||
createformevaluate: (id: string) => `${evaluate}/evaluate-record?id=${id}`,
|
||||
createformevaluate: (id: string) => `${evaluate}/evaluate-record?assign_id=${id}`,
|
||||
|
||||
//แบบประเมินผล (ผู้บังคับบัญชา)
|
||||
evaluateCreate: (id: string) => `${evaluate}/evaluate/create?assign_id=${id}`,
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@ export default {
|
|||
|
||||
// manage
|
||||
insigniaManage: (type: string) => `${insignia}/manage/${type}`,
|
||||
insigniaList: (insigniaPeriodId: any, ocId: string, role: string, status: any) => `${insignia}/request/${insigniaPeriodId}/${ocId}/${role}/${status}`
|
||||
insigniaCreate: () => `${insignia}/request`,
|
||||
insigniaList: (insigniaPeriodId: any, ocId: string, role: string, status: any) => `${insignia}/request/${insigniaPeriodId}/${ocId}/${role}/${status}`,
|
||||
insigniaReject: (profileId: string) => `${insignia}/status/reject/${profileId}`,
|
||||
insigniaDelete: (profileId: string) => `${insignia}/status/delete/${profileId}`,
|
||||
insigniaEdit: (profileId: string) => `${insignia}/request/${profileId}`,
|
||||
insigniaAgency: () => `${insignia}/request/agency`,
|
||||
insigniaDashboard: (insigniaPeriodId: string) => `${insignia}/request/dashboard/${insigniaPeriodId}`,
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ const config = ref<any>({
|
|||
// API_PROBATION_URI: "https://ehr.joolsoft.com/v1",
|
||||
API_PROBATION_URI: "https://bmaehr.joolsoft.com/nodeapi/v1",
|
||||
// API_PROBATION_URI: "http://192.168.1.151:7776/v1",
|
||||
API_REPORT2_URI: "https://bma-ehr.frappet.synology.me/api/v2",
|
||||
},
|
||||
test: {
|
||||
API_URI: "http://localhost:5010/api/v1",
|
||||
|
|
@ -50,6 +51,7 @@ const config = ref<any>({
|
|||
MEET_URI: "meet.frappet.com",
|
||||
API_RETIREMENT_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
|
||||
API_PROBATION_URI: "https://bmaehr.joolsoft.com/nodeapi/v1",
|
||||
API_REPORT2_URI: `${window.location.protocol}//${window.location.host}/api/v2`,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -78,6 +80,9 @@ const API_URI_ORG_TREE = ref<string>(config.value[env.value].API_URI_ORG_TREE);
|
|||
const API_PROBATION_URI = ref<string>(
|
||||
config.value[env.value].API_PROBATION_URI
|
||||
);
|
||||
const API_REPORT2_URI = ref<string>(
|
||||
config.value[env.value].API_REPORT2_URI
|
||||
);
|
||||
|
||||
export default {
|
||||
env: env.value,
|
||||
|
|
@ -93,4 +98,5 @@ export default {
|
|||
MEET_URI: MEET_URI.value,
|
||||
API_RETIREMENT_URI: API_RETIREMENT_URI.value,
|
||||
API_PROBATION_URI: API_PROBATION_URI.value,
|
||||
API_REPORT2_URI: API_REPORT2_URI.value,
|
||||
};
|
||||
|
|
|
|||
10
src/api/reports/api.report.ts
Normal file
10
src/api/reports/api.report.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* api รายงานทั้งหมด
|
||||
*/
|
||||
import env from "../index";
|
||||
const reportOrder = `${env.API_REPORT2_URI}/report/order`;
|
||||
|
||||
export default {
|
||||
reportOrderCover: (fileType: string, id: string) => `${reportOrder}/cover/${fileType}/${id}`,
|
||||
reportOrderAttachment: (fileType: string, id: string) => `${reportOrder}/attachment/${fileType}/${id}`,
|
||||
};
|
||||
|
|
@ -40,6 +40,9 @@ import insignia from "./api/07_insignia/api.insignia";
|
|||
/** API dashboard */
|
||||
import message from "./api/00_dashboard/api.message";
|
||||
|
||||
/** API reports */
|
||||
import reports from "./api/reports/api.report";
|
||||
|
||||
// environment variables
|
||||
export const compettitivePanel = import.meta.env.VITE_COMPETITIVE_EXAM_PANEL;
|
||||
export const qualifyDisableExamPanel = import.meta.env
|
||||
|
|
@ -80,6 +83,9 @@ const API = {
|
|||
|
||||
//dashboard
|
||||
...message,
|
||||
|
||||
//reports
|
||||
...reports,
|
||||
};
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ const salary = ref<string>("");
|
|||
const educationOld = ref<string>("");
|
||||
const reason = ref<string>("");
|
||||
const date = ref<Date | null>(null);
|
||||
|
||||
const status = ref<string>("");
|
||||
onMounted(async () => {
|
||||
await fecthappointmentByid();
|
||||
});
|
||||
|
|
@ -61,7 +61,8 @@ const fecthappointmentByid = async () => {
|
|||
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
||||
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
||||
title.value.positionTypeOld = data.positionTypeOld ?? "-";
|
||||
|
||||
status.value = data.status,
|
||||
console.log("🚀 ~ file: Detail.vue:65 ~ .then ~ status:", status.value)
|
||||
educationOld.value = data.educationOld;
|
||||
organizationPositionOld.value = data.organizationPositionOld;
|
||||
positionTypeOld.value = data.positionTypeOld;
|
||||
|
|
@ -71,6 +72,7 @@ const fecthappointmentByid = async () => {
|
|||
// organization.value = data.organization; //ไม่มี
|
||||
reason.value = data.reason;
|
||||
date.value = data.positionDate;
|
||||
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -189,7 +191,8 @@ const getClass = (val: boolean) => {
|
|||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<div v-if="status !== 'DONE' && status !== 'REPORT'" >
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn outline color="primary" dense icon-right="mdi-file-edit-outline" class="q-px-sm" label="แก้ไข"
|
||||
style="width: 80px" @click="edit = !edit" />
|
||||
</div>
|
||||
|
|
@ -198,6 +201,10 @@ const getClass = (val: boolean) => {
|
|||
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px" @click="edit = !edit" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-form ref="myForm">
|
||||
<div class="row col-12 q-pa-md">
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import DialogOrgTree from "@/modules/05_placement/components/AppointMent/Appoint
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { WeekNumberContainer } from "@fullcalendar/core/internal";
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const {
|
||||
showLoader,
|
||||
|
|
@ -53,6 +54,7 @@ const visibleColumns = ref<string[]>([
|
|||
"fullname",
|
||||
"organizationName",
|
||||
"birthday",
|
||||
"createdAt",
|
||||
"status",
|
||||
]);
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
@ -105,6 +107,8 @@ const fecthlistappointment = async () => {
|
|||
positionNumber: e.positionNumber,
|
||||
positionPath: e.positionPath,
|
||||
status: status(e.status),
|
||||
createdAt:date2Thai(e.createdAt),
|
||||
|
||||
birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth),
|
||||
}));
|
||||
// console.log(rows.value);
|
||||
|
|
@ -169,8 +173,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "organizationName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
|
||||
},
|
||||
{
|
||||
name: "birthday",
|
||||
|
|
@ -181,6 +184,17 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่ดำเนินการ",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a, b) => (b.createdAt) - (a.createdAt)
|
||||
|
||||
},
|
||||
{
|
||||
name: "status",
|
||||
align: "left",
|
||||
|
|
@ -191,6 +205,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
const columns2 = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -239,6 +254,7 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
]);
|
||||
|
||||
const openModalTree = (id: string) => {
|
||||
|
|
@ -390,7 +406,7 @@ const status = (val: string) => {
|
|||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword"
|
||||
row-key="fullname"
|
||||
row-key="citizenId"
|
||||
:visible-columns="visibleColumns"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
|
|
@ -469,11 +485,19 @@ const status = (val: string) => {
|
|||
>
|
||||
{{ props.row.birthday }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="createdAt"
|
||||
:props="props"
|
||||
@click="nextPage(props.row)"
|
||||
>
|
||||
{{ props.row.createdAt }}
|
||||
</q-td>
|
||||
<q-td key="status" :props="props" @click="nextPage(props.row)">
|
||||
{{ props.row.status }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="props.row.status !== 'ส่งรายชื่อไปออกคำสั่ง' && props.row.status !== 'ออกคำสั่งแล้ว'"
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
|
|
|
|||
|
|
@ -5,9 +5,7 @@ import { useRoute, useRouter } from "vue-router";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
|
||||
import type {
|
||||
ResponseDataDetail,
|
||||
} from "@/modules/05_placement/interface/response/Transfer";
|
||||
import type { ResponseDataDetail } from "@/modules/05_placement/interface/response/Transfer";
|
||||
import type { QTableProps, QForm } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -237,37 +235,43 @@ const getClass = (val: boolean) => {
|
|||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
dense
|
||||
icon-right="mdi-file-edit-outline"
|
||||
class="q-px-sm"
|
||||
label="แก้ไข"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-else>
|
||||
<q-btn
|
||||
outline
|
||||
color="public"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="บันทึก"
|
||||
style="width: 80px"
|
||||
@click="clickEdit"
|
||||
/>
|
||||
<q-btn
|
||||
outline
|
||||
color="red"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="(edit = !edit), fecthOther()"
|
||||
/>
|
||||
<div
|
||||
v-if="
|
||||
responseData.status !== 'DONE' && responseData.status !== 'REPORT'
|
||||
"
|
||||
>
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
dense
|
||||
icon-right="mdi-file-edit-outline"
|
||||
class="q-px-sm"
|
||||
label="แก้ไข"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-else>
|
||||
<q-btn
|
||||
outline
|
||||
color="public"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="บันทึก"
|
||||
style="width: 80px"
|
||||
@click="clickEdit"
|
||||
/>
|
||||
<q-btn
|
||||
outline
|
||||
color="red"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="(edit = !edit), fecthOther()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ const visibleColumns = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
|
||||
"createdAt",
|
||||
"statustext",
|
||||
]);
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ const fecthlistOthet = async () => {
|
|||
// listRecevice.value = response;
|
||||
console.log(response);
|
||||
rows.value = response.map((r: any) => ({
|
||||
createdAt: new Date(),
|
||||
createdAt: date2Thai(r.createdAt),
|
||||
date: new Date(),
|
||||
firstName: r.firstname ?? "",
|
||||
personalId: r.id ?? "",
|
||||
|
|
@ -214,6 +214,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่ดำเนินการ",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -380,7 +389,7 @@ const status = (val: string) => {
|
|||
color="add"
|
||||
icon="mdi-account-arrow-right"
|
||||
>
|
||||
<q-tooltip>ส่งไปออกคำสั่งรายการอื่นๆ</q-tooltip>
|
||||
<q-tooltip>ประเภทคำสั่งรายการอื่นๆ</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-space />
|
||||
|
|
@ -472,11 +481,19 @@ const status = (val: string) => {
|
|||
</q-tooltip> -->
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="createdAt" :props="props">
|
||||
{{ props.row.createdAt }}
|
||||
</q-td>
|
||||
<q-td key="statustext" :props="props">
|
||||
{{ props.row.statustext }}
|
||||
</q-td>
|
||||
<q-td key="statustext" :props="props">
|
||||
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="
|
||||
props.row.status !== 'DONE' &&
|
||||
props.row.status !== 'REPORT'
|
||||
"
|
||||
flat
|
||||
round
|
||||
class="text-red-14"
|
||||
|
|
@ -496,7 +513,7 @@ const status = (val: string) => {
|
|||
|
||||
<q-dialog v-model="modal">
|
||||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
<DialogHeader title="ส่งไปออกคำสั่งอื่นๆ" :close="clickClose" />
|
||||
<DialogHeader title="ประเภทคำสั่งอื่นๆ" :close="clickClose" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-pt-none">
|
||||
<div class="row justify-between">
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ const visibleColumns = ref<string[]>([
|
|||
"fullname",
|
||||
"organizationName",
|
||||
"dateOfBirth",
|
||||
"createdAt",
|
||||
"statusText",
|
||||
"btn",
|
||||
]);
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
@ -113,6 +115,25 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่ดำเนินการ",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
{
|
||||
name: "statusText",
|
||||
align: "left",
|
||||
label: "สถานะ",
|
||||
sortable: true,
|
||||
field: "statusText",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "btn",
|
||||
align: "left",
|
||||
|
|
@ -238,7 +259,7 @@ const getData = async () => {
|
|||
positionLevelOld: item.positionLevelOld,
|
||||
positionNumberOld: item.positionNumberOld,
|
||||
organizationPositionOld: item.organizationPositionOld,
|
||||
createdAt: item.createdAt,
|
||||
createdAt:date2Thai(item.createdAt),
|
||||
}));
|
||||
console.log(rows.value);
|
||||
})
|
||||
|
|
@ -449,6 +470,13 @@ onMounted(async () => {
|
|||
props.row.dateOfBirth !== null ? props.row.dateOfBirth : "-"
|
||||
}}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="createdAt"
|
||||
:props="props"
|
||||
@click="openDetail(props.row.id)"
|
||||
>
|
||||
{{ props.row.createdAt }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="organizationPositionOld"
|
||||
:props="props"
|
||||
|
|
@ -486,6 +514,7 @@ onMounted(async () => {
|
|||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="props.row.status !== 'DONE' && props.row.status !== 'REPORT'"
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ onMounted(async () => {
|
|||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<div v-if="status !== 'REPORT' && status !== 'DONE'"> <div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
|
|
@ -325,7 +325,8 @@ onMounted(async () => {
|
|||
style="width: 80px"
|
||||
@click="cancelBtn"
|
||||
/>
|
||||
</div>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-form ref="myForm">
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||
<div class="q-pl-sm text-weight-bold text-dark">
|
||||
แก้ไขข้อมูลเพื่อลงบัญชี
|
||||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
|
|
|
|||
|
|
@ -13,10 +13,38 @@
|
|||
@click="router.go(-1)"
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
/>
|
||||
<div v-if="routeName !== 'probationWorkAdd'">
|
||||
<div v-if="routeName == 'probationWorkAdd'">
|
||||
เพิ่มแบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ
|
||||
</div>
|
||||
<div v-else>แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ</div>
|
||||
<div v-else class="col-12 row">
|
||||
<div>แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ</div>
|
||||
<q-space />
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click="edit()"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-btn flat round color="red" @click="cancel()" icon="mdi-undo">
|
||||
<q-tooltip>ยกเลิก</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="public"
|
||||
@click="saveEdit(assignId)"
|
||||
icon="mdi-content-save-outline"
|
||||
>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<q-card
|
||||
:bordered="routeName == 'probationWorkAdd'"
|
||||
|
|
@ -34,10 +62,10 @@
|
|||
<q-input
|
||||
:rules="[(val) => !!val || 'กรุณากรอกชื่อ']"
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="fullname"
|
||||
label="ชื่อ-สกุล"
|
||||
/>
|
||||
|
|
@ -46,10 +74,10 @@
|
|||
<q-input
|
||||
:rules="[(val) => !!val || 'กรุณากรอกตำเเหน่ง']"
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="position"
|
||||
label="ตำแหน่ง"
|
||||
/>
|
||||
|
|
@ -63,12 +91,12 @@
|
|||
hide-bottom-space
|
||||
:options="monthOp"
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
option-label="label"
|
||||
option-value="value"
|
||||
:outlined="routeName === 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="monthSelect"
|
||||
:label="`ระยะเวลากี่เดือน`"
|
||||
/>
|
||||
|
|
@ -82,7 +110,7 @@
|
|||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -94,8 +122,8 @@
|
|||
<q-input
|
||||
dense
|
||||
borderless
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
:outlined="status == true"
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
hide-bottom-space
|
||||
class="full-width datepicker q-mb-md"
|
||||
|
|
@ -117,9 +145,7 @@
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="
|
||||
isDatePicker2Readonly || routeName !== 'probationWorkAdd'
|
||||
"
|
||||
:readonly="isDatePicker2Readonly || status != true"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -133,7 +159,7 @@
|
|||
<q-input
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
readonly
|
||||
class="full-width datepicker q-mb-md"
|
||||
:model-value="
|
||||
|
|
@ -166,26 +192,26 @@
|
|||
option-value="id"
|
||||
:options="filtermantor(OPcaretaker, [caretaker2])"
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
hide-bottom-space
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker1"
|
||||
:label="`ผู้ดูแลคนที่ 1`"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
/>
|
||||
<q-select
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกผู้ดูเเล']"
|
||||
:options="filtermantor(OPcaretaker, [caretaker1])"
|
||||
option-value="id"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
hide-bottom-space
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker2"
|
||||
:label="`ผู้ดูแลคนที่ 2`"
|
||||
/>
|
||||
|
|
@ -196,11 +222,11 @@
|
|||
option-value="id"
|
||||
:options="filtermantor(OPcaretaker, [caretaker2])"
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
hide-bottom-space
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker1"
|
||||
:label="`ผู้ดูแลคนที่ 1`"
|
||||
option-label="name"
|
||||
|
|
@ -212,10 +238,10 @@
|
|||
option-label="name"
|
||||
hide-bottom-space
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker2"
|
||||
:label="`ผู้ดูแลคนที่ 2`"
|
||||
/>
|
||||
|
|
@ -234,7 +260,7 @@
|
|||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
3.1 ชื่องาน / ภารกิจงานที่มอบหมาย (ควรมีมากกว่า 1 ภารกิจงาน)
|
||||
<q-btn
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
round
|
||||
color="primary"
|
||||
dense
|
||||
|
|
@ -259,10 +285,10 @@
|
|||
index < 2 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
|
||||
"
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="bg-white"
|
||||
type="textarea"
|
||||
v-model="activity_desc[index]"
|
||||
|
|
@ -275,10 +301,10 @@
|
|||
index < 2 ? [(val) => !!val || 'กรุณากรอกข้อมูล'] : []
|
||||
"
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="bg-white"
|
||||
type="textarea"
|
||||
v-model="goal_desc[index]"
|
||||
|
|
@ -296,7 +322,7 @@
|
|||
color="red"
|
||||
icon="mdi-trash-can-outline"
|
||||
@click="deleteactivity(index)"
|
||||
v-if="routeName === 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -315,7 +341,7 @@
|
|||
<div class="col-12 text-top2 row items-center">
|
||||
ความรู้ความสามารถในการปฏิบัติงาน
|
||||
<q-btn
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
round
|
||||
color="primary"
|
||||
dense
|
||||
|
|
@ -345,10 +371,10 @@
|
|||
hide-bottom-space
|
||||
:options="OPknowledge"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="knowledge[index]"
|
||||
:label="`ความรู้ความสามารถในการปฏิบัติงาน ${
|
||||
index + 1
|
||||
|
|
@ -360,7 +386,7 @@
|
|||
class="col-xs-12 col-sm-1 flex justify-center items-center"
|
||||
>
|
||||
<q-btn
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
flat
|
||||
round
|
||||
color="red"
|
||||
|
|
@ -375,7 +401,7 @@
|
|||
<div class="col-12 text-top2 row items-center">
|
||||
ความรู้เรื่องกฎหมายและกฎระเบียบ (ไม่เกิน 20 หัวข้อ)
|
||||
<!-- <q-btn
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
round
|
||||
color="primary"
|
||||
dense
|
||||
|
|
@ -404,7 +430,7 @@
|
|||
v-if="item.status_select === 1"
|
||||
v-model="item.checked"
|
||||
dense
|
||||
:disable="routeName != 'probationWorkAdd'"
|
||||
:disable="status != true"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="index === 0" class="col-11">
|
||||
|
|
@ -443,7 +469,7 @@
|
|||
:false-value="0"
|
||||
v-model="item.checked"
|
||||
dense
|
||||
:disable="routeName != 'probationWorkAdd'"
|
||||
:disable="status != true"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-9 q-pl-xl">
|
||||
|
|
@ -471,7 +497,7 @@
|
|||
:false-value="0"
|
||||
v-model="item.checked"
|
||||
dense
|
||||
:disable="routeName != 'probationWorkAdd'"
|
||||
:disable="status != true"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-9 q-pl-xl">
|
||||
|
|
@ -499,7 +525,7 @@
|
|||
:false-value="0"
|
||||
v-model="item.checked"
|
||||
dense
|
||||
:disable="routeName != 'probationWorkAdd'"
|
||||
:disable="status != true"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-9 q-pl-xl">
|
||||
|
|
@ -527,7 +553,7 @@
|
|||
:false-value="0"
|
||||
v-model="item.checked"
|
||||
dense
|
||||
:disable="routeName != 'probationWorkAdd'"
|
||||
:disable="status != true"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-9 q-pl-xl">
|
||||
|
|
@ -566,10 +592,10 @@
|
|||
<div class="col-12">
|
||||
<q-input
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="OtherLaw"
|
||||
type="textarea"
|
||||
/>
|
||||
|
|
@ -592,11 +618,11 @@
|
|||
]"
|
||||
:options="OPcomputer"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="skill"
|
||||
label="ด้านที่ 1"
|
||||
>
|
||||
|
|
@ -623,10 +649,10 @@
|
|||
]"
|
||||
:options="OPenglish"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="skill2"
|
||||
label="ด้านที่ 2"
|
||||
>
|
||||
|
|
@ -651,11 +677,11 @@
|
|||
]"
|
||||
:options="OPinfomation"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
map-options
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="skill3"
|
||||
label="ด้านที่ 3"
|
||||
>
|
||||
|
|
@ -680,11 +706,11 @@
|
|||
]"
|
||||
:options="OPresourse"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
map-options
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="skill4"
|
||||
label="ด้านที่ 4"
|
||||
>
|
||||
|
|
@ -724,11 +750,11 @@
|
|||
filterMain(OPmain, [main2, main3, main4, main5])
|
||||
"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="main"
|
||||
label="ตัวที่ 1"
|
||||
>
|
||||
|
|
@ -752,11 +778,11 @@
|
|||
filterMain(OPmain, [main, main3, main4, main5])
|
||||
"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="main2"
|
||||
label="ตัวที่ 2"
|
||||
>
|
||||
|
|
@ -780,11 +806,11 @@
|
|||
filterMain(OPmain, [main, main2, main4, main5])
|
||||
"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
map-options
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="main3"
|
||||
label="ตัวที่ 3"
|
||||
>
|
||||
|
|
@ -808,11 +834,11 @@
|
|||
filterMain(OPmain, [main, main2, main3, main5])
|
||||
"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="main4"
|
||||
label="ตัวที่ 4"
|
||||
>
|
||||
|
|
@ -837,11 +863,11 @@
|
|||
"
|
||||
option-value="id"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
map-options
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="main5"
|
||||
label="ตัวที่ 5"
|
||||
>
|
||||
|
|
@ -870,11 +896,11 @@
|
|||
]"
|
||||
:options="filterData(OPgroup, [group2, group3])"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="group"
|
||||
label="ตัวที่ 1"
|
||||
>
|
||||
|
|
@ -898,11 +924,11 @@
|
|||
]"
|
||||
:options="filterData(OPgroup, [group, group3])"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="group2"
|
||||
label="ตัวที่ 2"
|
||||
>
|
||||
|
|
@ -927,10 +953,10 @@
|
|||
]"
|
||||
:options="filterData(OPgroup, [group, group2])"
|
||||
class="bg-white"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="group3"
|
||||
label="ตัวที่ 3"
|
||||
>
|
||||
|
|
@ -1031,10 +1057,10 @@
|
|||
<div class="col-12 row q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="Other"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -1045,7 +1071,7 @@
|
|||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
3.6 ผลผลิตของงานที่คาดหวังและตัวชี้วัดความสําเร็จของงาน
|
||||
<q-btn
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
round
|
||||
color="primary"
|
||||
dense
|
||||
|
|
@ -1072,10 +1098,10 @@
|
|||
"
|
||||
class="bg-white"
|
||||
type="textarea"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="output_desc[index]"
|
||||
label="ผลผลิตของงานที่คาดหวัง (ไม่เกิน 10 บรรทัด)"
|
||||
/>
|
||||
|
|
@ -1088,10 +1114,10 @@
|
|||
hide-bottom-space
|
||||
class="bg-white"
|
||||
type="textarea"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="indicator_desc[index]"
|
||||
label="ตัวชี้วัดความสําเร็จของงาน (ไม่เกิน 10 บรรทัด)"
|
||||
/>
|
||||
|
|
@ -1102,7 +1128,7 @@
|
|||
>
|
||||
<q-btn
|
||||
flat
|
||||
v-if="routeName == 'probationWorkAdd'"
|
||||
v-if="status == true"
|
||||
round
|
||||
color="red"
|
||||
icon="mdi-trash-can-outline"
|
||||
|
|
@ -1177,10 +1203,10 @@
|
|||
<li>
|
||||
อื่นๆ (ถ้ามี)
|
||||
<q-input
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="Other5"
|
||||
label="กรอกอื่นๆ"
|
||||
/>
|
||||
|
|
@ -1267,20 +1293,20 @@
|
|||
<div class="col-12 row q-col-gutter-md">
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-input
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="fullname"
|
||||
label="ชื่อ-สกุล"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<q-input
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="position"
|
||||
label="ตำแหน่ง"
|
||||
/>
|
||||
|
|
@ -1291,7 +1317,7 @@
|
|||
v-model="date1"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
@ -1306,10 +1332,10 @@
|
|||
<q-input
|
||||
hide-bottom-space
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="full-width datepicker"
|
||||
:model-value="date1 != null ? date2Thai(date1) : null"
|
||||
label="ลงวันที่"
|
||||
|
|
@ -1338,12 +1364,12 @@
|
|||
v-if="status == true"
|
||||
:options="filtermantor(OPcaretaker, [caretaker2])"
|
||||
option-value="id"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker1"
|
||||
label="ผู้ดูแลคนที่ 1"
|
||||
/>
|
||||
|
|
@ -1353,10 +1379,10 @@
|
|||
option-value="id"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker1"
|
||||
label="ผู้ดูแลคนที่ 1"
|
||||
/>
|
||||
|
|
@ -1368,7 +1394,7 @@
|
|||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
|
|
@ -1381,10 +1407,10 @@
|
|||
<q-input
|
||||
hide-bottom-space
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="full-width datepicker"
|
||||
:model-value="date2 != null ? date2Thai(date2) : null"
|
||||
label="ลงวันที่"
|
||||
|
|
@ -1405,12 +1431,12 @@
|
|||
v-if="status == true"
|
||||
:options="filtermantor(OPcaretaker, [caretaker1])"
|
||||
option-value="id"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker2"
|
||||
label="ผู้ดูแลคนที่ 2"
|
||||
/>
|
||||
|
|
@ -1420,10 +1446,10 @@
|
|||
option-value="id"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="caretaker2"
|
||||
label="ผู้ดูแลคนที่ 2"
|
||||
/>
|
||||
|
|
@ -1436,7 +1462,7 @@
|
|||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -1448,11 +1474,11 @@
|
|||
<q-input
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
hide-bottom-space
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
s
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="full-width datepicker"
|
||||
:model-value="date3 != null ? date2Thai(date3) : null"
|
||||
label="ลงวันที่"
|
||||
|
|
@ -1481,12 +1507,12 @@
|
|||
v-if="status == true"
|
||||
:options="OPcommander"
|
||||
option-value="id"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="commander"
|
||||
label="ผู้บังคับบัญชา"
|
||||
/>
|
||||
|
|
@ -1496,10 +1522,10 @@
|
|||
option-value="id"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="commander"
|
||||
label="ผู้บังคับบัญชา"
|
||||
/>
|
||||
|
|
@ -1510,7 +1536,7 @@
|
|||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:readonly="routeName !== 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
|
|
@ -1524,10 +1550,10 @@
|
|||
<q-input
|
||||
hide-bottom-space
|
||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
class="full-width datepicker"
|
||||
:model-value="date4 != null ? date2Thai(date4) : null"
|
||||
label="ลงวันที่"
|
||||
|
|
@ -1556,12 +1582,12 @@
|
|||
v-if="status == true"
|
||||
:options="OPchairman"
|
||||
option-value="id"
|
||||
option-label="fullName"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="chairman"
|
||||
label="ประธานกรรมการ"
|
||||
/>
|
||||
|
|
@ -1571,10 +1597,10 @@
|
|||
option-value="id"
|
||||
option-label="name"
|
||||
class="col-xs-12 col-sm-8"
|
||||
:readonly="routeName != 'probationWorkAdd'"
|
||||
:readonly="status != true"
|
||||
dense
|
||||
borderless
|
||||
:outlined="routeName == 'probationWorkAdd'"
|
||||
:outlined="status == true"
|
||||
v-model="chairman"
|
||||
label="ประธานกรรมการ"
|
||||
/>
|
||||
|
|
@ -1615,6 +1641,34 @@ const val1 = ref([
|
|||
},
|
||||
]);
|
||||
const status = ref<boolean>(true);
|
||||
|
||||
const dataEdit = async (id:string) => {
|
||||
const data = putDataEdit(id);
|
||||
await http
|
||||
.put(config.API.saveEditAssign(id),data)
|
||||
.then((res) =>{
|
||||
console.log("success put==>",res)
|
||||
console.log("save")
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(async () => {
|
||||
status.value = false
|
||||
getAssign()
|
||||
hideLoader();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
const saveEdit = (id:string) => {
|
||||
dialogConfirm($q,() => dataEdit(id))
|
||||
}
|
||||
const edit = () => {
|
||||
status.value = true;
|
||||
console.log(status.value);
|
||||
};
|
||||
const cancel = () => {
|
||||
status.value = false;
|
||||
};
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
|
|
@ -1723,7 +1777,7 @@ const OPcaretaker = ref<
|
|||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
name: string;
|
||||
citizenId: number;
|
||||
isDirector: boolean;
|
||||
}>[]
|
||||
|
|
@ -1735,7 +1789,7 @@ const OPcommander = ref<
|
|||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
name: string;
|
||||
citizenId: number;
|
||||
isDirector: boolean;
|
||||
}>[]
|
||||
|
|
@ -1746,7 +1800,7 @@ const OPchairman = ref<
|
|||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
name: string;
|
||||
citizenId: number;
|
||||
isDirector: boolean;
|
||||
}>[]
|
||||
|
|
@ -1845,7 +1899,7 @@ const getUser = async () => {
|
|||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
fullName: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
name: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
citizenId: item.citizenId,
|
||||
isDirector: item.isDirector,
|
||||
}));
|
||||
|
|
@ -1854,7 +1908,7 @@ const getUser = async () => {
|
|||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
fullName: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
name: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
citizenId: item.citizenId,
|
||||
isDirector: item.isDirector,
|
||||
}));
|
||||
|
|
@ -1863,7 +1917,7 @@ const getUser = async () => {
|
|||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
fullName: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
name: item.prefix + "" + item.firstName + " " + item.lastName,
|
||||
citizenId: item.citizenId,
|
||||
isDirector: item.isDirector,
|
||||
}));
|
||||
|
|
@ -1945,9 +1999,122 @@ const postDateTime = async () => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
const putDataEdit = (id: string) => {
|
||||
const GUID = personalId;
|
||||
const assign_job = activityArray.value.map((item, index) => {
|
||||
const activityDesc = activity_desc.value[index]?.trim();
|
||||
const goalDesc = goal_desc.value[index]?.trim();
|
||||
|
||||
if (activityDesc !== "" && goalDesc !== "") {
|
||||
return {
|
||||
activity_desc: activityDesc,
|
||||
goal_desc: goalDesc,
|
||||
};
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
const know_ledge = knowledge.value.map((item) => ({
|
||||
level: item ? item.level : null,
|
||||
}));
|
||||
|
||||
const Productivity_assign = ProductivityArray.value.map((item, index) => {
|
||||
const outputDesc = output_desc.value[index]?.trim();
|
||||
const indicatorDesc = indicator_desc.value[index]?.trim();
|
||||
|
||||
if (outputDesc !== "" && indicatorDesc !== "") {
|
||||
return {
|
||||
output_desc: outputDesc,
|
||||
indicator_desc: indicatorDesc,
|
||||
};
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
const allGroup = [];
|
||||
if (group.value) allGroup.push({ level: group.value.level });
|
||||
if (group2.value) allGroup.push({ level: group2.value.level });
|
||||
if (group3.value) allGroup.push({ level: group3.value.level });
|
||||
|
||||
const allSkills = [];
|
||||
if (skill.value) allSkills.push({ level: skill.value.level });
|
||||
if (skill2.value) allSkills.push({ level: skill2.value.level });
|
||||
if (skill3.value) allSkills.push({ level: skill3.value.level });
|
||||
if (skill4.value) allSkills.push({ level: skill4.value.level });
|
||||
|
||||
const allCompetency = [];
|
||||
if (main.value) allCompetency.push({ level: main.value.level });
|
||||
if (main2.value) allCompetency.push({ level: main2.value.level });
|
||||
if (main3.value) allCompetency.push({ level: main3.value.level });
|
||||
if (main4.value) allCompetency.push({ level: main4.value.level });
|
||||
if (main5.value) allCompetency.push({ level: main5.value.level });
|
||||
|
||||
const assign_director = [
|
||||
{
|
||||
personal_id: caretaker1.value.personal_id,
|
||||
role: "mentor",
|
||||
dated: date2.value instanceof Date ? dateToISO(date2.value) : dateToISO(new Date(date2.value)),
|
||||
},
|
||||
{
|
||||
personal_id: caretaker2.value.personal_id,
|
||||
role: "mentor",
|
||||
dated: date3.value instanceof Date ? dateToISO(date3.value) : dateToISO(new Date(date3.value)),
|
||||
},
|
||||
{
|
||||
personal_id: commander.value.personal_id,
|
||||
role: "commander",
|
||||
dated: date4.value instanceof Date ? dateToISO(date4.value) : dateToISO(new Date(date4.value)),
|
||||
},
|
||||
{
|
||||
personal_id: chairman.value.personal_id,
|
||||
role: "chairman",
|
||||
},
|
||||
];
|
||||
const data = {
|
||||
personal_id: GUID,
|
||||
fullname: fullname.value,
|
||||
position: position.value,
|
||||
monthSelect:
|
||||
monthSelect.value !== null ? parseInt(monthSelect.value) : null,
|
||||
date_start:
|
||||
date_start.value instanceof Date
|
||||
? dateToISO(date_start.value)
|
||||
: new Date(),
|
||||
date_finish:
|
||||
date_finish.value instanceof Date
|
||||
? dateToISO(date_finish.value)
|
||||
: dateToISO(new Date(date_finish.value)),
|
||||
// caretaker_1: caretaker1.value,
|
||||
// caretaker_2: caretaker2.value,
|
||||
assign_knowledges: know_ledge,
|
||||
assign_jobs: assign_job.filter((item) => item !== null),
|
||||
other_desc: OtherLaw.value,
|
||||
assign_skill: allSkills,
|
||||
assign_competency: allCompetency,
|
||||
assign_competency_group: allGroup,
|
||||
other4_desc: Other.value,
|
||||
other5_no1_desc: Other5.value,
|
||||
assign_outputs: Productivity_assign.filter((item) => item !== null),
|
||||
// commander: commander.value,
|
||||
assign_director: assign_director,
|
||||
experimenter_dated:date1.value instanceof Date ? dateToISO(date1.value) : new Date(),
|
||||
// date_2: date2.value instanceof Date ? dateToISO(date2.value) : new Date(),
|
||||
// date_3: date3.value instanceof Date ? dateToISO(date3.value) : new Date(),
|
||||
// date_4: date4.value instanceof Date ? dateToISO(date4.value) : new Date(),
|
||||
// caretaker_foot: caretakerFoot.value,
|
||||
// caretaker_foot2: caretakerFoot2.value,
|
||||
assign_law: checkRule.value
|
||||
.filter((item) => item.checked === 1)
|
||||
.map((item) => ({
|
||||
id: item.id,
|
||||
checked: item.checked,
|
||||
})),
|
||||
};
|
||||
return data;
|
||||
};
|
||||
const putData = (id: string) => {
|
||||
const GUID = id;
|
||||
const GUID = personalId;
|
||||
const assign_job = activityArray.value.map((item, index) => {
|
||||
const activityDesc = activity_desc.value[index]?.trim();
|
||||
const goalDesc = goal_desc.value[index]?.trim();
|
||||
|
|
@ -2001,24 +2168,23 @@ const putData = (id: string) => {
|
|||
{
|
||||
personal_id: caretaker1.value.id,
|
||||
role: "mentor",
|
||||
dated: date2.value instanceof Date ? dateToISO(date2.value) : null,
|
||||
dated: date2.value instanceof Date ? dateToISO(date2.value) : dateToISO(new Date(date2.value)),
|
||||
},
|
||||
{
|
||||
personal_id: caretaker2.value.id,
|
||||
role: "mentor",
|
||||
dated: date3.value instanceof Date ? dateToISO(date3.value) : null,
|
||||
dated: date3.value instanceof Date ? dateToISO(date3.value) : dateToISO(new Date(date3.value)),
|
||||
},
|
||||
{
|
||||
personal_id: commander.value.id,
|
||||
role: "commander",
|
||||
dated: date4.value instanceof Date ? dateToISO(date4.value) : null,
|
||||
dated: date4.value instanceof Date ? dateToISO(date4.value) : dateToISO(new Date(date4.value)),
|
||||
},
|
||||
{
|
||||
personal_id: chairman.value.id,
|
||||
role: "chairman",
|
||||
},
|
||||
];
|
||||
|
||||
const data = {
|
||||
personalId: GUID,
|
||||
fullname: fullname.value,
|
||||
|
|
@ -2064,7 +2230,7 @@ const putData = (id: string) => {
|
|||
};
|
||||
|
||||
const saveData = (id: string) => {
|
||||
dialogConfirm($q, () => DataSave(id));
|
||||
dialogConfirm($q, async () => await DataSave(id));
|
||||
};
|
||||
const DataSave = async (id: string) => {
|
||||
await myForm.value.validate().then((result: boolean) => {
|
||||
|
|
@ -2142,8 +2308,8 @@ const getAssign = async () => {
|
|||
activityCount.value = data.jobs.length;
|
||||
caretaker1.value = data.mentors[0];
|
||||
caretaker2.value = data.mentors[1];
|
||||
chairman.value = data.chairman.name;
|
||||
commander.value = data.commander.name;
|
||||
chairman.value = data.chairman;
|
||||
commander.value = data.commander;
|
||||
knowledge.value = data.knowledges.map((id: any) => id.id);
|
||||
knowledgeCount.value = data.knowledges.length;
|
||||
other_desc.value = data.assign.other_desc;
|
||||
|
|
@ -2174,7 +2340,7 @@ const getAssign = async () => {
|
|||
productivityCount.value = data.outputs.length;
|
||||
|
||||
checkRule.value = data.laws.map((law: any) => ({
|
||||
id: law.law_id,
|
||||
id: law.id,
|
||||
checked: law.selected,
|
||||
description: law.description,
|
||||
status_select: law.status_select,
|
||||
|
|
|
|||
|
|
@ -110,10 +110,6 @@ const onSubmit = () => {
|
|||
message: "ส่งแบบประเมินเเล้ว",
|
||||
});
|
||||
};
|
||||
|
||||
const onReset = () => {
|
||||
router.push({ name: "probation" });
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -162,11 +162,7 @@ const list1_1 = ref<any>([]);
|
|||
// { id: "5", label: "ผลผลิตของงานที่คาดหวัง 5" },
|
||||
|
||||
const list1_2 = [
|
||||
{ id: "1", label: "ผลผลิตของงานที่เกิดขึ้น 1" },
|
||||
{ id: "2", label: "ผลผลิตของงานที่เกิดขึ้น 2" },
|
||||
{ id: "3", label: "ผลผลิตของงานที่เกิดขึ้น 3" },
|
||||
{ id: "4", label: "ผลผลิตของงานที่เกิดขึ้น 4" },
|
||||
{ id: "5", label: "ผลผลิตของงานที่เกิดขึ้น 5" },
|
||||
{ id: "", label: "" },
|
||||
];
|
||||
const list2_1 = [
|
||||
{ id: "1", label: "ให้บริการประชาชนหรือผู้รับบริการด้วยอัธยาศัยดี" },
|
||||
|
|
@ -437,7 +433,7 @@ const saveformdata = async (data: any) => {
|
|||
1.1 ความสำเร็จของงานที่ได้รับมอบหมาย
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-11 col-md-10 offset-md-1 text-top2">
|
||||
1.ผลผลิตของงานที่คาดหวัง
|
||||
ผลผลิตของงานที่คาดหวัง
|
||||
</div>
|
||||
<q-card
|
||||
flat
|
||||
|
|
@ -488,7 +484,7 @@ const saveformdata = async (data: any) => {
|
|||
1.2 ความสำเร็จของงานที่ได้รับมอบหมาย
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-11 col-md-10 offset-md-1 text-top2">
|
||||
1.ผลผลิตของงานที่เกิดขึ้น
|
||||
ผลผลิตของงานที่เกิดขึ้นจริง
|
||||
</div>
|
||||
<q-card
|
||||
flat
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ const {
|
|||
} = mixin;
|
||||
const { ratingColors } = probationStore;
|
||||
const assignId = ref<string>(route.params.form.toString());
|
||||
const personalId = ref<string>(route.params.id.toString());
|
||||
|
||||
const person = ref<any>([]);
|
||||
const assign = ref<any>([]);
|
||||
|
|
@ -77,10 +78,10 @@ const list1_1 = ref<any>([
|
|||
]);
|
||||
const list1_2 = [
|
||||
{ id: "1", label: "ผลผลิตของงานที่เกิดขึ้น 1" },
|
||||
{ id: "2", label: "ผลผลิตของงานที่เกิดขึ้น 2" },
|
||||
{ id: "3", label: "ผลผลิตของงานที่เกิดขึ้น 3" },
|
||||
{ id: "4", label: "ผลผลิตของงานที่เกิดขึ้น 4" },
|
||||
{ id: "5", label: "ผลผลิตของงานที่เกิดขึ้น 5" },
|
||||
// { id: "2", label: "ผลผลิตของงานที่เกิดขึ้น 2" },
|
||||
// { id: "3", label: "ผลผลิตของงานที่เกิดขึ้น 3" },
|
||||
// { id: "4", label: "ผลผลิตของงานที่เกิดขึ้น 4" },
|
||||
// { id: "5", label: "ผลผลิตของงานที่เกิดขึ้น 5" },
|
||||
];
|
||||
const list2_1 = [
|
||||
{ id: "1", label: "ให้บริการประชาชนหรือผู้รับบริการด้วยอัธยาศัยดี" },
|
||||
|
|
@ -248,12 +249,16 @@ const savaForm = () => {
|
|||
behavio_orther.value.level == 0))
|
||||
) {
|
||||
hasError = true;
|
||||
} else putformData();
|
||||
}
|
||||
|
||||
if (hasError === true) {
|
||||
notifyError($q, "กรุณากรอกข้อมูลให้ครบ");
|
||||
} else {
|
||||
putformData()
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const putformData = () => {
|
||||
const data = {
|
||||
evaluate_no: evaluate_no.value,
|
||||
|
|
@ -302,8 +307,11 @@ const saveformdata = async (data: any) => {
|
|||
await http
|
||||
.post(config.API.createformevaluate(assignId.value), data)
|
||||
.then((res: any) => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
router.push(
|
||||
`/probation/detail/${personalId.value}/${assignId.value}`
|
||||
);
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -316,19 +324,9 @@ const saveformdata = async (data: any) => {
|
|||
<q-item>
|
||||
<q-item-section>
|
||||
<q-toolbar>
|
||||
<div
|
||||
class="text-h6 text-weight-medium text-dark col-12 row items-center q-py-md"
|
||||
>
|
||||
<q-btn
|
||||
icon="mdi-arrow-left"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
flat
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
@click="router.go(-1)"
|
||||
/>
|
||||
<div class="text-h6 text-weight-medium text-dark col-12 row items-center q-py-md">
|
||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm"
|
||||
@click="router.go(-1)" />
|
||||
การทดลองปฏิบัติหน้าที่ราชการของ {{ person.name }}
|
||||
</div>
|
||||
</q-toolbar>
|
||||
|
|
@ -381,28 +379,17 @@ const saveformdata = async (data: any) => {
|
|||
1.1 ความสำเร็จของงานที่ได้รับมอบหมาย
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-11 col-md-10 offset-md-1 text-top2">
|
||||
1.ผลผลิตของงานที่คาดหวัง
|
||||
ผลผลิตของงานที่คาดหวัง
|
||||
</div>
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
|
||||
>
|
||||
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
|
||||
<q-list dense v-for="(list, i) in list1_1" :key="i">
|
||||
<q-item dense tag="label" v-ripple>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ list.output_desc }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="evaluate_expenct_level[i].level"
|
||||
:val="list.id"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="evaluate_expenct_level[i].level" :val="list.id" max="5" size="sm" color="grey"
|
||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -431,40 +418,20 @@ const saveformdata = async (data: any) => {
|
|||
1.2 ความสำเร็จของงานที่ได้รับมอบหมาย
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-11 col-md-10 offset-md-1 text-top2">
|
||||
1.ผลผลิตของงานที่เกิดขึ้น
|
||||
ผลผลิตของงานที่เกิดขึ้นจริง
|
||||
</div>
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
|
||||
>
|
||||
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
|
||||
<q-list dense v-for="(list, i) in list1_2" :key="i">
|
||||
<q-item dense tag="label" v-ripple v-if="i < checkArray">
|
||||
<q-item-section>
|
||||
<!-- <q-item-label>{{ list.label }}</q-item-label> -->
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
v-model="evaluate_ouptut[i].text"
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||
lazy-rules
|
||||
type="textarea"
|
||||
label="ผลผลิตของงานที่เกิดขึ้นจริง"
|
||||
hide-bottom-space
|
||||
:row="1"
|
||||
:rules="evaluate_ouptutRules"
|
||||
/>
|
||||
<q-input outlined dense v-model="evaluate_ouptut[i].text"
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1" lazy-rules type="textarea"
|
||||
label="ผลผลิตของงานที่เกิดขึ้นจริง" hide-bottom-space :row="1" :rules="evaluate_ouptutRules" />
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="evaluate_ouptut[i].level"
|
||||
:val="list.id"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="evaluate_ouptut[i].level" :val="list.id" max="5" size="sm" color="grey"
|
||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -495,18 +462,11 @@ const saveformdata = async (data: any) => {
|
|||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
1.2. ความรู้ความสามารถ</q-item-label
|
||||
>
|
||||
1.2. ความรู้ความสามารถ</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="knowledge_level"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="knowledge_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -534,18 +494,11 @@ const saveformdata = async (data: any) => {
|
|||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
1.3. ทักษะ</q-item-label
|
||||
>
|
||||
1.3. ทักษะ</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="skill_level"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="skill_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -573,18 +526,11 @@ const saveformdata = async (data: any) => {
|
|||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
1.4. สมมรถนะ</q-item-label
|
||||
>
|
||||
1.4. สมมรถนะ</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="competency_level"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="competency_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -612,18 +558,11 @@ const saveformdata = async (data: any) => {
|
|||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
1.5. ความสามารถในการเรียนรู้งาน</q-item-label
|
||||
>
|
||||
1.5. ความสามารถในการเรียนรู้งาน</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="learn_level"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="learn_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -652,18 +591,11 @@ const saveformdata = async (data: any) => {
|
|||
<q-item-label>
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
1.6.
|
||||
ความสามารถในการปรับใช้ความรู้กับงานในหน้าที่</q-item-label
|
||||
>
|
||||
ความสามารถในการปรับใช้ความรู้กับงานในหน้าที่</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="apply_level"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="apply_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -691,18 +623,11 @@ const saveformdata = async (data: any) => {
|
|||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
1.7. ความสำเร็จของงานที่ได้รับมอบหมาย</q-item-label
|
||||
>
|
||||
1.7. ความสำเร็จของงานที่ได้รับมอบหมาย</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="success_level"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="success_level" max="5" size="sm" color="grey" :color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -731,15 +656,10 @@ const saveformdata = async (data: any) => {
|
|||
<q-item-label>
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
1.8 อื่นๆ
|
||||
<q-checkbox
|
||||
class="q-ml-sm"
|
||||
dense
|
||||
v-model="etc"
|
||||
@click="
|
||||
(achievement_other.text = ''),
|
||||
(achievement_other.level = 0)
|
||||
"
|
||||
/></q-item-label>
|
||||
<q-checkbox class="q-ml-sm" dense v-model="etc" @click="
|
||||
(achievement_other.text = ''),
|
||||
(achievement_other.level = 0)
|
||||
" /></q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
|
@ -750,31 +670,16 @@ const saveformdata = async (data: any) => {
|
|||
<q-item dense tag="label" v-ripple>
|
||||
<q-item-section class="q-ml-md">
|
||||
<q-item-label>
|
||||
<q-input
|
||||
v-model="achievement_other.text"
|
||||
label="กรอกอื่นๆ"
|
||||
dense
|
||||
lazy-rules
|
||||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
:rules="[
|
||||
<q-input v-model="achievement_other.text" label="กรอกอื่นๆ" dense lazy-rules autogrow
|
||||
hide-bottom-space outlined class="bg-white" :rules="[
|
||||
(val) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
/>
|
||||
]" />
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="achievement_other.level"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="achievement_other.level" max="5" size="sm" color="grey"
|
||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -803,38 +708,18 @@ const saveformdata = async (data: any) => {
|
|||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
จุดเด่น (ไม่เกิน 5 บรรทัด)
|
||||
</div>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
v-model="achievement_strength_desc"
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||
lazy-rules
|
||||
type="textarea"
|
||||
label="กรอกจุดเด่น"
|
||||
hide-bottom-space
|
||||
:row="5"
|
||||
:rules="achievement_strengthRules"
|
||||
ref="achievement_strengthRef"
|
||||
/>
|
||||
<q-input outlined dense v-model="achievement_strength_desc"
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1" lazy-rules type="textarea" label="กรอกจุดเด่น"
|
||||
hide-bottom-space :row="5" :rules="achievement_strengthRules" ref="achievement_strengthRef" />
|
||||
</div>
|
||||
<div class="col-12 row">
|
||||
<div class="col-12 text-top0 row items-center q-pl-lg">
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
สิ่งที่ควรปรับปรุง (ไม่เกิน 5 บรรทัด)
|
||||
</div>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
v-model="achievement_improve_desc"
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||
lazy-rules
|
||||
type="textarea"
|
||||
hide-bottom-space
|
||||
label="กรอกสิ่งที่ควรปรับปรุง"
|
||||
:row="5"
|
||||
:rules="achievement_inproveRules"
|
||||
ref="achievement_inproveRef"
|
||||
/>
|
||||
<q-input outlined dense v-model="achievement_improve_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||
lazy-rules type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :row="5"
|
||||
:rules="achievement_inproveRules" ref="achievement_inproveRef" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -850,26 +735,15 @@ const saveformdata = async (data: any) => {
|
|||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
2.1 ความประพฤติ
|
||||
</div>
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
|
||||
>
|
||||
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
|
||||
<q-list dense v-for="(list, i) in list2_1" :key="i">
|
||||
<q-item dense tag="label" v-ripple>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ list.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="conduct_level[i]"
|
||||
:val="list.id"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="conduct_level[i]" :val="list.id" max="5" size="sm" color="grey"
|
||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -897,26 +771,15 @@ const saveformdata = async (data: any) => {
|
|||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
2.2 ความมีคุณธรรมจริยธรรม
|
||||
</div>
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
|
||||
>
|
||||
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
|
||||
<q-list dense v-for="(list, i) in list2_2" :key="i">
|
||||
<q-item dense tag="label" v-ripple>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ list.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="moral_level[i]"
|
||||
:val="list.id"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="moral_level[i]" :val="list.id" max="5" size="sm" color="grey"
|
||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -944,26 +807,15 @@ const saveformdata = async (data: any) => {
|
|||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
2.3 การรักษาวินัย
|
||||
</div>
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
|
||||
>
|
||||
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
|
||||
<q-list dense v-for="(list, i) in list2_3" :key="i">
|
||||
<q-item dense tag="label" v-ripple>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ list.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="discipline_level[i]"
|
||||
:val="list.id"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="discipline_level[i]" :val="list.id" max="5" size="sm" color="grey"
|
||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -990,50 +842,25 @@ const saveformdata = async (data: any) => {
|
|||
<div class="col-12 text-top0 row items-center q-pl-lg">
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
2.4 อื่นๆ
|
||||
<q-checkbox
|
||||
class="q-ml-sm"
|
||||
dense
|
||||
v-model="etc2"
|
||||
@click="
|
||||
(behavio_orther.text = ''), (behavio_orther.level = 0)
|
||||
"
|
||||
/>
|
||||
<q-checkbox class="q-ml-sm" dense v-model="etc2" @click="
|
||||
(behavio_orther.text = ''), (behavio_orther.level = 0)
|
||||
" />
|
||||
</div>
|
||||
<q-card
|
||||
v-if="etc2"
|
||||
flat
|
||||
bordered
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1"
|
||||
>
|
||||
<q-card v-if="etc2" flat bordered class="col-xs-12 col-sm-11 col-md-10 offset-md-1 q-pa-sm bg-grey-1">
|
||||
<q-list dense>
|
||||
<q-item dense tag="label" v-ripple>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-input
|
||||
v-model="behavio_orther.text"
|
||||
label="กรอกอื่นๆ"
|
||||
dense
|
||||
lazy-rules
|
||||
autogrow
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="bg-white"
|
||||
:rules="[
|
||||
<q-input v-model="behavio_orther.text" label="กรอกอื่นๆ" dense lazy-rules autogrow
|
||||
hide-bottom-space outlined class="bg-white" :rules="[
|
||||
(val) =>
|
||||
(val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
/>
|
||||
]" />
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
v-model="behavio_orther.level"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<q-rating v-model="behavio_orther.level" max="5" size="sm" color="grey"
|
||||
:color-selected="ratingColors" label="ระดับการประเมินพฤติกรรม">
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
</template>
|
||||
|
|
@ -1062,38 +889,18 @@ const saveformdata = async (data: any) => {
|
|||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
จุดเด่น (ไม่เกิน 5 บรรทัด)
|
||||
</div>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
v-model="behavior_strength_desc"
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||
lazy-rules
|
||||
type="textarea"
|
||||
label="กรอกจุดเด่น"
|
||||
hide-bottom-space
|
||||
:row="5"
|
||||
:rules="behavio_strengthRules"
|
||||
ref="behavio_strengthRef"
|
||||
/>
|
||||
<q-input outlined dense v-model="behavior_strength_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||
lazy-rules type="textarea" label="กรอกจุดเด่น" hide-bottom-space :row="5" :rules="behavio_strengthRules"
|
||||
ref="behavio_strengthRef" />
|
||||
</div>
|
||||
<div class="col-12 row">
|
||||
<div class="col-12 text-top0 row items-center q-pl-lg">
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
สิ่งที่ควรปรับปรุง (ไม่เกิน 5 บรรทัด)
|
||||
</div>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
v-model="behavior_improve_desc"
|
||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||
lazy-rules
|
||||
type="textarea"
|
||||
hide-bottom-space
|
||||
label="กรอกสิ่งที่ควรปรับปรุง"
|
||||
:row="5"
|
||||
:rules="behavio_inproveRules"
|
||||
ref="behavio_inproveRef"
|
||||
/>
|
||||
<q-input outlined dense v-model="behavior_improve_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||
lazy-rules type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :row="5"
|
||||
:rules="behavio_inproveRules" ref="behavio_inproveRef" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1106,11 +913,7 @@ const saveformdata = async (data: any) => {
|
|||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">3</q-avatar>
|
||||
การพัฒนาผู้ทดลองปฏิบัติบัติหน้าที่ราชการ
|
||||
</div>
|
||||
<q-card
|
||||
flat
|
||||
bordered
|
||||
class="col-xs-12 col-sm-11 col-md-11 q-pa-sm bg-grey-1"
|
||||
>
|
||||
<q-card flat bordered class="col-xs-12 col-sm-11 col-md-11 q-pa-sm bg-grey-1">
|
||||
<q-list dense>
|
||||
<q-item dense tag="label" v-ripple>
|
||||
<q-item-section>
|
||||
|
|
@ -1118,20 +921,10 @@ const saveformdata = async (data: any) => {
|
|||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<div class="row">
|
||||
<q-radio
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
v-model="orientation"
|
||||
val="1"
|
||||
label="ดำเนินการเเล้ว"
|
||||
/>
|
||||
<q-radio
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
v-model="orientation"
|
||||
val="0"
|
||||
label=" ยังไม่ได้ดำเนินการ"
|
||||
/>
|
||||
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="orientation" val="1"
|
||||
label="ดำเนินการเเล้ว" />
|
||||
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="orientation" val="0"
|
||||
label=" ยังไม่ได้ดำเนินการ" />
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
|
@ -1142,20 +935,10 @@ const saveformdata = async (data: any) => {
|
|||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<div class="row">
|
||||
<q-radio
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
v-model="self_learning"
|
||||
val="1"
|
||||
label="ดำเนินการเเล้ว"
|
||||
/>
|
||||
<q-radio
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
v-model="self_learning"
|
||||
val="0"
|
||||
label=" ยังไม่ได้ดำเนินการ"
|
||||
/>
|
||||
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="self_learning"
|
||||
val="1" label="ดำเนินการเเล้ว" />
|
||||
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="self_learning"
|
||||
val="0" label=" ยังไม่ได้ดำเนินการ" />
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
|
@ -1166,47 +949,25 @@ const saveformdata = async (data: any) => {
|
|||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<div class="row">
|
||||
<q-radio
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
v-model="training_seminar"
|
||||
val="1"
|
||||
label="ดำเนินการเเล้ว"
|
||||
/>
|
||||
<q-radio
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
v-model="training_seminar"
|
||||
val="0"
|
||||
label=" ยังไม่ได้ดำเนินการ"
|
||||
/>
|
||||
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="training_seminar"
|
||||
val="1" label="ดำเนินการเเล้ว" />
|
||||
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="training_seminar"
|
||||
val="0" label=" ยังไม่ได้ดำเนินการ" />
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-separator class="q-my-xs" />
|
||||
<q-item dense tag="label" v-ripple>
|
||||
<q-item-section>
|
||||
<q-item-label
|
||||
>4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด
|
||||
(ถ้ามี)</q-item-label
|
||||
>
|
||||
<q-item-label>4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด
|
||||
(ถ้ามี)</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<div class="row">
|
||||
<q-radio
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
v-model="other_training"
|
||||
val="1"
|
||||
label="ดำเนินการเเล้ว"
|
||||
/>
|
||||
<q-radio
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
v-model="other_training"
|
||||
val="0"
|
||||
label=" ยังไม่ได้ดำเนินการ"
|
||||
/>
|
||||
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="other_training"
|
||||
val="1" label="ดำเนินการเเล้ว" />
|
||||
<q-radio checked-icon="task_alt" unchecked-icon="panorama_fish_eye" v-model="other_training"
|
||||
val="0" label=" ยังไม่ได้ดำเนินการ" />
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
|
@ -1223,26 +984,11 @@ const saveformdata = async (data: any) => {
|
|||
ผู้บังคับบัญชา/ผู้มอบหมายงาน
|
||||
</div>
|
||||
<div class="col-12 row q-col-gutter-md">
|
||||
<q-select
|
||||
class="col-xs-12 col-sm-8"
|
||||
dense
|
||||
v-model="Autherise"
|
||||
outlined
|
||||
:options="option"
|
||||
label="ผู้บังคับบัญชา"
|
||||
option-label="name"
|
||||
disable
|
||||
/>
|
||||
<q-select class="col-xs-12 col-sm-8" dense v-model="Autherise" outlined :options="option"
|
||||
label="ผู้บังคับบัญชา" option-label="name" disable />
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateAutherise"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<datepicker menu-class-name="modalfix" v-model="dateAutherise" :locale="'th'" autoApply borderless
|
||||
:enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
|
|
@ -1250,24 +996,12 @@ const saveformdata = async (data: any) => {
|
|||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
class="full-width datepicker col-3"
|
||||
:model-value="
|
||||
dateAutherise != null
|
||||
? date2Thai(dateAutherise)
|
||||
: null
|
||||
"
|
||||
:label="`${'ลงวันที่'}`"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||
>
|
||||
<q-input outlined dense class="full-width datepicker col-3" :model-value="dateAutherise != null
|
||||
? date2Thai(dateAutherise)
|
||||
: null
|
||||
" :label="`${'ลงวันที่'}`" :rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]">
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
flat
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
@click="router.go(-1)"
|
||||
@click="router.push(`/probation/`)"
|
||||
/>
|
||||
รายละเอียดงานที่ได้รับมอบหมายของ {{ name }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ const visibleColumns = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"createdAt",
|
||||
"statustext",
|
||||
]);
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
@ -114,6 +115,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่ดำเนินการ",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -206,7 +216,7 @@ const getData = async () => {
|
|||
let list: ResponseData[] = [];
|
||||
data.map((r: ResponseData) => {
|
||||
list.push({
|
||||
createdAt: new Date(),
|
||||
createdAt:date2Thai(r.createdAt),
|
||||
date: new Date(),
|
||||
firstName: r.firstName ?? "",
|
||||
id: r.id ?? "",
|
||||
|
|
@ -420,11 +430,19 @@ const saveOrder = async () => {
|
|||
</q-tooltip> -->
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td
|
||||
key="createdAt"
|
||||
:props="props"
|
||||
@click="nextPage(props.row)"
|
||||
>
|
||||
{{ props.row.createdAt }}
|
||||
</q-td>
|
||||
<q-td key="statustext" :props="props">
|
||||
{{ props.row.statustext }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="props.row.status !=='DONE' && props.row.status !=='REPORT'"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
|
|
|
|||
|
|
@ -72,7 +72,8 @@
|
|||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<div v-if="responseData.status !=='DONE' && responseData.status !=='REPORT'">
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
|
|
@ -103,7 +104,8 @@
|
|||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-form ref="myForm">
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ const visibleColumns = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"createdAt",
|
||||
"statustext",
|
||||
]);
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
@ -114,6 +115,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่ดำเนินการ",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -206,7 +216,7 @@ const getData = async () => {
|
|||
let list: ResponseData[] = [];
|
||||
data.map((r: ResponseData) => {
|
||||
list.push({
|
||||
createdAt: new Date(),
|
||||
createdAt:date2Thai(r.createdAt),
|
||||
date: new Date(),
|
||||
firstName: r.firstName ?? "",
|
||||
id: r.id ?? "",
|
||||
|
|
@ -420,11 +430,19 @@ const saveOrder = async () => {
|
|||
</q-tooltip> -->
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td
|
||||
key="createdAt"
|
||||
:props="props"
|
||||
|
||||
>
|
||||
{{ props.row.createdAt }}
|
||||
</q-td>
|
||||
<q-td key="statustext" :props="props">
|
||||
{{ props.row.statustext }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="props.row.status !== 'DONE' && props.row.status !== 'REPORT'"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
|
|
|
|||
|
|
@ -72,37 +72,43 @@
|
|||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
dense
|
||||
icon-right="mdi-file-edit-outline"
|
||||
class="q-px-sm"
|
||||
label="แก้ไข"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-else>
|
||||
<q-btn
|
||||
outline
|
||||
color="public"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="บันทึก"
|
||||
style="width: 80px"
|
||||
@click="conditionSave"
|
||||
/>
|
||||
<q-btn
|
||||
outline
|
||||
color="red"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
<div
|
||||
v-if="
|
||||
responseData.status !== 'DONE' && responseData.status !== 'REPORT'
|
||||
"
|
||||
>
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
dense
|
||||
icon-right="mdi-file-edit-outline"
|
||||
class="q-px-sm"
|
||||
label="แก้ไข"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-else>
|
||||
<q-btn
|
||||
outline
|
||||
color="public"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="บันทึก"
|
||||
style="width: 80px"
|
||||
@click="conditionSave"
|
||||
/>
|
||||
<q-btn
|
||||
outline
|
||||
color="red"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
|
@ -234,6 +240,7 @@
|
|||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:model-value="date !== null ? date2Thai(date) : null"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
||||
|
|
@ -383,7 +390,7 @@ const getData = async () => {
|
|||
.get(config.API.outByid(dataId))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
|
||||
|
||||
responseData.value.personId = data.profileId;
|
||||
responseData.value.createdAt = data.createdAt;
|
||||
responseData.value.date =
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ const visibleColumns = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"createdAt",
|
||||
"statustext",
|
||||
]);
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
|
|
@ -114,6 +115,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่ดำเนินการ",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -206,7 +216,7 @@ const getData = async () => {
|
|||
let list: ResponseData[] = [];
|
||||
data.map((r: ResponseData) => {
|
||||
list.push({
|
||||
createdAt: new Date(),
|
||||
createdAt:date2Thai(r.createdAt),
|
||||
date: new Date(),
|
||||
firstName: r.firstName ?? "",
|
||||
id: r.id ?? "",
|
||||
|
|
@ -421,12 +431,20 @@ const saveOrder = async () => {
|
|||
</q-tooltip> -->
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td
|
||||
key="createdAt"
|
||||
:props="props"
|
||||
|
||||
>
|
||||
{{ props.row.createdAt }}
|
||||
</q-td>
|
||||
<q-td key="statustext" :props="props">
|
||||
{{ props.row.statustext }}
|
||||
</q-td>
|
||||
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="props.row.status !== 'DONE' && props.row.status !=='REPORT'"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
|
|
|
|||
|
|
@ -72,37 +72,43 @@
|
|||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
dense
|
||||
icon-right="mdi-file-edit-outline"
|
||||
class="q-px-sm"
|
||||
label="แก้ไข"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-else>
|
||||
<q-btn
|
||||
outline
|
||||
color="public"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="บันทึก"
|
||||
style="width: 80px"
|
||||
@click="conditionSave"
|
||||
/>
|
||||
<q-btn
|
||||
outline
|
||||
color="red"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
<div
|
||||
v-if="
|
||||
responseData.status !== 'DONE' && responseData.status !== 'REPORT'
|
||||
"
|
||||
>
|
||||
<div class="q-gutter-sm" v-if="!edit">
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
dense
|
||||
icon-right="mdi-file-edit-outline"
|
||||
class="q-px-sm"
|
||||
label="แก้ไข"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-else>
|
||||
<q-btn
|
||||
outline
|
||||
color="public"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="บันทึก"
|
||||
style="width: 80px"
|
||||
@click="conditionSave"
|
||||
/>
|
||||
<q-btn
|
||||
outline
|
||||
color="red"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import config from "@/app.config";
|
|||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError, success } = mixin;
|
||||
const { showLoader, hideLoader, messageError, success ,date2Thai} = mixin;
|
||||
|
||||
const rows = ref<any>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -76,6 +76,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่ดำเนินการ",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"prefix",
|
||||
|
|
@ -85,6 +94,7 @@ const visibleColumns = ref<string[]>([
|
|||
"positionLevel",
|
||||
"positionExecutive",
|
||||
"oc",
|
||||
"createdAt",
|
||||
]);
|
||||
onMounted(() => {
|
||||
fectListDecased();
|
||||
|
|
@ -104,6 +114,7 @@ const fectListDecased = async () => {
|
|||
positionLevel: e.positionLevel,
|
||||
positionExecutive: e.positionExecutive,
|
||||
oc: e.organization,
|
||||
createdAt:date2Thai(e.createdAt),
|
||||
}));
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -237,6 +248,13 @@ const nextPage = (id: string) => {
|
|||
<q-td key="oc" :props="props">
|
||||
{{ props.row.oc }}
|
||||
</q-td>
|
||||
<q-td
|
||||
key="createdAt"
|
||||
:props="props"
|
||||
@click="nextPage(props.row)"
|
||||
>
|
||||
{{ props.row.createdAt }}
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
interface ResponseData {
|
||||
createdAt: Date;
|
||||
createdAt: any;
|
||||
date: Date;
|
||||
firstName: string;
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
interface ResponseData {
|
||||
createdAt: Date;
|
||||
createdAt: any;
|
||||
date: Date;
|
||||
firstName: string;
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { onMounted, ref, watch, reactive } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
|
@ -8,13 +8,22 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogRemove, dialogConfirm } = mixin;
|
||||
const {
|
||||
dialogRemove,
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
} = mixin;
|
||||
const $q = useQuasar();
|
||||
const DataStore = useInsigniaDataStore();
|
||||
|
||||
const modalNote = ref<boolean>(false);
|
||||
const organization = ref<number>(1);
|
||||
const organizationOptions = ref<any>([{ id: 1, name: "ทั้งหมด" }]);
|
||||
const modalAdd = ref<boolean>(false);
|
||||
const modalEdit = ref<boolean>(false);
|
||||
const organization = ref<string>("");
|
||||
const organizationOptions = ref<any>([{ id: "1", name: "ทั้งหมด" }]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"citizenId",
|
||||
|
|
@ -186,6 +195,46 @@ const rows = ref<any[]>([
|
|||
},
|
||||
]);
|
||||
|
||||
const columns2 = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "index",
|
||||
required: true,
|
||||
label: "ลำดับ",
|
||||
field: "index",
|
||||
align: "left",
|
||||
},
|
||||
{
|
||||
name: "fullname",
|
||||
required: true,
|
||||
label: "ชื่อ-สกุล",
|
||||
field: "fullname",
|
||||
align: "left",
|
||||
},
|
||||
{
|
||||
name: "position",
|
||||
required: true,
|
||||
label: "ตำแหน่งในสายงาน",
|
||||
field: "position",
|
||||
align: "left",
|
||||
},
|
||||
{
|
||||
name: "level",
|
||||
required: true,
|
||||
label: "ระดับ",
|
||||
field: "level",
|
||||
align: "left",
|
||||
},
|
||||
{
|
||||
name: "organizationOrganization",
|
||||
required: true,
|
||||
label: "สังกัด",
|
||||
field: "organizationOrganization",
|
||||
align: "left",
|
||||
},
|
||||
]);
|
||||
// ข้อมูลตาราง (จำลอง)
|
||||
const rows2 = ref<any[]>([]);
|
||||
|
||||
const Note = ref<string>("");
|
||||
const titleModal = ref<string>("");
|
||||
const actionModal = ref<string>("");
|
||||
|
|
@ -198,52 +247,268 @@ const props = defineProps({
|
|||
roundId: {
|
||||
type: String,
|
||||
},
|
||||
fecthInsigniaAll: {
|
||||
type: Function,
|
||||
},
|
||||
fecthInsigniaByOc: {
|
||||
type: Function,
|
||||
},
|
||||
});
|
||||
const typeinsignia = ref<number | string>("all");
|
||||
const typeinsigniaOptions = reactive<any>([{ id: "all", name: "ทั้งหมด" }]);
|
||||
const typeinsigniaValues: Set<number> = new Set();
|
||||
onMounted(async () => {
|
||||
console.log(props);
|
||||
|
||||
organizationOptions.value = DataStore.optionsTypeOc;
|
||||
console.log(organizationOptions.value);
|
||||
await fecthInsignia();
|
||||
organization.value = organizationOptions.value[0].id;
|
||||
// if (props.fecthInsigniaAll) {
|
||||
// await props.fecthInsigniaAll(props.roundId, props.tab);
|
||||
// }
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
);
|
||||
filtertypeInsignia();
|
||||
}
|
||||
}
|
||||
});
|
||||
const changtypeOc = () => {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
);
|
||||
}
|
||||
};
|
||||
const clickmodalAdd = () => {
|
||||
showLoader();
|
||||
fecthlistRetire();
|
||||
};
|
||||
// fecth profile
|
||||
const fecthlistRetire = async () => {
|
||||
await http
|
||||
.get(config.API.profileOrganizRoot)
|
||||
.then((res) => {
|
||||
const id = res.data.result[0].id;
|
||||
if (id !== "") {
|
||||
fecthlistperson(id);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
});
|
||||
};
|
||||
const fecthlistperson = async (id: string) => {
|
||||
let data = [{}];
|
||||
data = [
|
||||
{
|
||||
criteriaType: "is_retire",
|
||||
criteriaValue: "false",
|
||||
},
|
||||
{
|
||||
criteriaType: "is_probation",
|
||||
criteriaValue: "false",
|
||||
},
|
||||
];
|
||||
await http
|
||||
.post(config.API.profileSearchNewOcIdType(id, "officer"), {
|
||||
criterias: data,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
|
||||
rows2.value = res.data.result.map((e: any) => ({
|
||||
id: e.id,
|
||||
fullname: e.fullname == null ? "-" : e.fullname,
|
||||
position: e.position == null ? "-" : e.position,
|
||||
level: e.positionEmployeeLevel == null ? "-" : e.positionEmployeeLevel,
|
||||
organizationOrganization: e.oc == null ? "-" : e.oc,
|
||||
}));
|
||||
modalAdd.value = true;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const clickAdd = async (id: string) => {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
addlistperson(id);
|
||||
},
|
||||
"ยืนยันการเพิ่มรายชื่อขอพระราชทานเครื่องราชฯ",
|
||||
"ต้องการยืนยันการเพิ่มรายชื่อขอพระราชทานเครื่องราชฯ นี้หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
const addlistperson = async (id: string) => {
|
||||
showLoader();
|
||||
let data = {
|
||||
profileId: id,
|
||||
// insigniaId: organization.value,
|
||||
insigniaPeriodId: props.roundId,
|
||||
};
|
||||
console.log(data);
|
||||
await http
|
||||
.post(config.API.insigniaCreate(), data)
|
||||
.then(() => {
|
||||
success($q, "เพิ่มรายชื่อสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
modalAdd.value = false;
|
||||
if (props.fecthInsigniaByOc) {
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
);
|
||||
}
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
// const clickAction = (props: any, action: string) => {
|
||||
// Note.value = "";
|
||||
// person.value = props;
|
||||
// titleModal.value = props.name;
|
||||
// actionModal.value = action;
|
||||
// modalNote.value = true;
|
||||
// };
|
||||
const clickmodalEdit = () => {
|
||||
modalEdit.value = true;
|
||||
fecthInsignia();
|
||||
fecthInsigniaType();
|
||||
};
|
||||
const clickSave = () => {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await listEdit();
|
||||
},
|
||||
"ยืนยันการแก้ไขเครื่องราชฯ ที่ยื่นขอ",
|
||||
"ต้องการยืนยันการแก้ไขเครื่องราชฯ ที่ยื่นขอนี้หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
const listEdit = async () => {
|
||||
let data = { insigniaId: organization.value };
|
||||
console.log(data);
|
||||
await http
|
||||
.get(config.API.insigniaEdit(), data)
|
||||
.then(() => {
|
||||
success($q, "แก้ไขเครื่องราชฯ ที่ยื่นขอสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
};
|
||||
const clickReject = () => {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await listreject();
|
||||
},
|
||||
"ยืนยันการย้ายข้อมูล",
|
||||
"ต้องการยืนยันการย้ายข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
const listreject = async () => {
|
||||
await http
|
||||
.get(config.API.insigniaReject())
|
||||
.then(() => {
|
||||
success($q, "ย้ายข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
};
|
||||
const clickDelete = () => {
|
||||
dialogRemove(
|
||||
$q,
|
||||
async () => {
|
||||
await listdelete();
|
||||
},
|
||||
"ยืนยันการลบออกข้ออมูล",
|
||||
"ต้องการยืนยันการลบข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
const listdelete = async () => {
|
||||
await http
|
||||
.get(config.API.insigniaDelete())
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
};
|
||||
const insignia = ref<string>("");
|
||||
const insigniaOptions = ref<any>([]);
|
||||
const insigniaType = ref<string>("");
|
||||
const insigniaTypeOptions = ref<any>([]);
|
||||
|
||||
const fecthInsignia = async () => {
|
||||
for (const item of DataStore.optionsTypeOc) {
|
||||
console.log(item.index);
|
||||
await http
|
||||
.get(config.API.insignia)
|
||||
.then((res) => {
|
||||
insigniaOptions.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {});
|
||||
};
|
||||
const fecthInsigniaType = async () => {
|
||||
await http(config.API.insigniaType)
|
||||
.then((res) => {
|
||||
insigniaTypeOptions.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {});
|
||||
};
|
||||
|
||||
// await http
|
||||
// .get(
|
||||
// config.API.insigniaList(props.roundId, item["id"], "officer", props.tab)
|
||||
// )
|
||||
// .then((res) => {
|
||||
// console.log(res);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
const listinsignia = ref<any>([]);
|
||||
const filtertypeInsignia = async () => {
|
||||
listinsignia.value = rows.value;
|
||||
for (const data of listinsignia.value) {
|
||||
const Type = data.insigniaType;
|
||||
if (Type !== null && !typeinsigniaValues.has(Type)) {
|
||||
typeinsigniaOptions.push({
|
||||
id: Type.toString(),
|
||||
name: Type.toString(),
|
||||
});
|
||||
typeinsigniaValues.add(Type);
|
||||
}
|
||||
}
|
||||
};
|
||||
const searchFilterTable = async () => {
|
||||
if (typeinsignia.value !== undefined && typeinsignia.value !== null) {
|
||||
if (typeinsignia.value === "all") {
|
||||
rows.value = listinsignia.value;
|
||||
} else {
|
||||
rows.value = listinsignia.value.filter(
|
||||
(e) => e.insigniaType === typeinsignia.value
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const clickAction = (props: any, action: string) => {
|
||||
Note.value = "";
|
||||
person.value = props;
|
||||
titleModal.value = props.name;
|
||||
actionModal.value = action;
|
||||
modalNote.value = true;
|
||||
};
|
||||
const clickDelete = () => {
|
||||
dialogRemove($q);
|
||||
console.log(person.value, Note.value);
|
||||
};
|
||||
const clickSavenote = () => {
|
||||
dialogConfirm($q);
|
||||
console.log(person.value);
|
||||
};
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterKeyword2 = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
const resetFilter = () => {
|
||||
filterKeyword.value = "";
|
||||
filterKeyword2.value = "";
|
||||
filterRef.value.focus();
|
||||
};
|
||||
const pagination = ref({
|
||||
|
|
@ -252,11 +517,22 @@ const pagination = ref({
|
|||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
const pagination2 = ref({
|
||||
sortBy: "desc",
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
const paging = ref<boolean>(true);
|
||||
const paging2 = ref<boolean>(true);
|
||||
const paginationLabel = (start: string, end: string, total: string) => {
|
||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||
else return start + "-" + end + " ใน " + total;
|
||||
};
|
||||
const paginationLabel2 = (start: string, end: string, total: string) => {
|
||||
if (paging2.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||
else return start + "-" + end + " ใน " + total;
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-12 row q-pa-md">
|
||||
|
|
@ -278,12 +554,38 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="changtypeOc"
|
||||
/>
|
||||
<q-select
|
||||
v-model="typeinsignia"
|
||||
label="ปรเภทเครื่องราชฯ"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="typeinsigniaOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="searchFilterTable"
|
||||
/>
|
||||
<div>
|
||||
<q-btn size="md" icon="mdi-download" flat round color="primary">
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn size="12px" flat round color="add" icon="mdi-plus">
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="add"
|
||||
icon="mdi-plus"
|
||||
@click="clickmodalAdd"
|
||||
>
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
@ -395,11 +697,28 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
dense
|
||||
>
|
||||
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
||||
<q-list dense style="min-width: 120px">
|
||||
<q-list dense style="min-width: 250px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickAction(props.row, 'note')"
|
||||
@click="clickmodalEdit(props.row)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-tooltip>แก้ไขเครื่องราชฯ ที่ยื่นขอ</q-tooltip>
|
||||
<q-icon color="primary" size="xs" name="mdi-pencil" />
|
||||
</q-item-section>
|
||||
<q-item-section
|
||||
>แก้ไขเครื่องราชฯ ที่ยื่นขอ</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickReject(props.row)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
|
|
@ -418,7 +737,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickAction(props.row, 'delete')"
|
||||
@click="clickDelete(props.row)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
|
|
@ -453,11 +772,180 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- add -->
|
||||
<q-dialog v-model="modalAdd">
|
||||
<q-card style="width: 850px; max-width: 80vw" class="q-pb-md">
|
||||
<q-toolbar class="q-py-md">
|
||||
<q-toolbar-title class="text-h6">เพิ่มรายชื่อ </q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="modalAdd = false"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-separator />
|
||||
<div class="q-pa-md">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 850px; max-width: auto"
|
||||
v-model="filterKeyword2"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
</q-toolbar>
|
||||
<q-table
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
:rows="rows2"
|
||||
:columns="columns2"
|
||||
:filter="filterKeyword2"
|
||||
row-key="name"
|
||||
class="custom-header-table"
|
||||
:pagination-label="paginationLabel2"
|
||||
v-model:pagination="pagination2"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
<q-th auto-width />
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>{{ props.rowIndex + 1 }}</q-td>
|
||||
<!-- <q-td key="order" :props="props">
|
||||
{{ props.row.order }}
|
||||
</q-td> -->
|
||||
<q-td key="fullname" :props="props">
|
||||
{{ props.row.fullname }}
|
||||
</q-td>
|
||||
<q-td key="position" :props="props">
|
||||
{{ props.row.position }}
|
||||
</q-td>
|
||||
<q-td key="level" :props="props">{{ props.row.level }}</q-td>
|
||||
<q-td key="organizationOrganization" :props="props">
|
||||
{{ props.row.organizationOrganization }}
|
||||
</q-td>
|
||||
<q-td>
|
||||
<q-btn
|
||||
outline
|
||||
:props="props"
|
||||
label="เพิ่ม"
|
||||
class="text-teal-5"
|
||||
@click="clickAdd(props.row.id)"
|
||||
/>
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="pagination2.page"
|
||||
color="primary"
|
||||
:max="scope.pagesNumber"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<!-- Edit -->
|
||||
<q-dialog v-model="modalEdit" persistent>
|
||||
<q-card style="width: 450px; max-width: 80vw" class="q-pb-md">
|
||||
<q-toolbar class="q-py-md">
|
||||
<q-toolbar-title class="text-h6"
|
||||
>แก้ไขเครื่องราชฯ ที่ยื่นขอ
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="modalEdit = false"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-separator />
|
||||
|
||||
<div class="q-pa-md">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col">
|
||||
<q-select
|
||||
v-model="insigniaType"
|
||||
label="ประเภทเครื่องราชฯ"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="insigniaTypeOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="changtypeOc"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<q-select
|
||||
v-model="insignia"
|
||||
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: 150px"
|
||||
@update:model-value="changtypeOc"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="q-pa-md">
|
||||
<div class="row justify-end">
|
||||
<q-btn label="บันทึก" @click="clickSave" color="public" />
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<!-- note -->
|
||||
<q-dialog v-model="modalNote" persistent>
|
||||
<q-card style="min-width: 350px">
|
||||
<q-toolbar>
|
||||
<q-toolbar-title class="text-subtitle2 text-bold">
|
||||
<div v-if="actionModal == 'note'">หมายเหตุ {{ titleModal }}</div>
|
||||
<div v-if="actionModal == 'note'">
|
||||
เป็นเหตุผลที่ไม่ยื่นขอ {{ titleModal }}
|
||||
</div>
|
||||
<div v-if="actionModal == 'delete'">ลบออก {{ titleModal }}</div>
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
|
|
@ -475,10 +963,10 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
dense
|
||||
outlined
|
||||
type="textarea"
|
||||
label="กรอกหมายเหตุ"
|
||||
label="เหตุผลที่ไม่ยื่นขอ"
|
||||
v-model="Note"
|
||||
@keyup.enter="modalNote = false"
|
||||
:rules="[(val) => !!val || 'กรอกหมายเหตุ']"
|
||||
:rules="[(val) => !!val || 'เหตุผลที่ไม่ยื่นขอ']"
|
||||
/>
|
||||
</q-card-section>
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
|
|
|
|||
|
|
@ -1,9 +1,29 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { onMounted, ref, watch, reactive } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const organization = ref<number>(1);
|
||||
const organizationOptions = ref<any>([{ id: 1, name: "ทั้งหมด" }]);
|
||||
const DataStore = useInsigniaDataStore();
|
||||
|
||||
const props = defineProps({
|
||||
tab: {
|
||||
type: String,
|
||||
},
|
||||
roundId: {
|
||||
type: String,
|
||||
},
|
||||
fecthInsigniaAll: {
|
||||
type: Function,
|
||||
},
|
||||
fecthInsigniaByOc: {
|
||||
type: Function,
|
||||
},
|
||||
});
|
||||
|
||||
const organization = ref<string>("1");
|
||||
const organizationOptions = ref<any>([{ id: "1", name: "ทั้งหมด" }]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"citizenId",
|
||||
|
|
@ -173,6 +193,63 @@ const rows = ref<any[]>([
|
|||
dateSend: "31 ม.ค. 2566",
|
||||
},
|
||||
]);
|
||||
onMounted(async () => {
|
||||
organizationOptions.value = DataStore.optionsTypeOc;
|
||||
organization.value = organizationOptions.value[0].id;
|
||||
// if (props.fecthInsigniaAll) {
|
||||
// await props.fecthInsigniaAll(props.roundId, props.tab);
|
||||
// }
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
);
|
||||
filtertypeInsignia();
|
||||
}
|
||||
}
|
||||
});
|
||||
const changtypeOc = () => {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const typeinsignia = ref<number | string>("all");
|
||||
const typeinsigniaOptions = reactive<any>([{ id: "all", name: "ทั้งหมด" }]);
|
||||
const typeinsigniaValues: Set<number> = new Set();
|
||||
const listinsignia = ref<any>([]);
|
||||
const filtertypeInsignia = async () => {
|
||||
listinsignia.value = rows.value;
|
||||
for (const data of listinsignia.value) {
|
||||
const Type = data.insigniaType;
|
||||
if (Type !== null && !typeinsigniaValues.has(Type)) {
|
||||
typeinsigniaOptions.push({
|
||||
id: Type.toString(),
|
||||
name: Type.toString(),
|
||||
});
|
||||
typeinsigniaValues.add(Type);
|
||||
}
|
||||
}
|
||||
};
|
||||
const searchFilterTable = async () => {
|
||||
if (typeinsignia.value !== undefined && typeinsignia.value !== null) {
|
||||
if (typeinsignia.value === "all") {
|
||||
rows.value = listinsignia.value;
|
||||
} else {
|
||||
rows.value = listinsignia.value.filter(
|
||||
(e) => e.insigniaType === typeinsignia.value
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
|
|
@ -212,15 +289,26 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="changtypeOc"
|
||||
/>
|
||||
<q-select
|
||||
v-model="typeinsignia"
|
||||
label="ปรเภทเครื่องราชฯ"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="typeinsigniaOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="searchFilterTable"
|
||||
/>
|
||||
<!-- <div>
|
||||
<q-btn size="md" icon="mdi-download" flat round color="primary">
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn size="12px" flat round color="add" icon="mdi-plus">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</div> -->
|
||||
<q-space />
|
||||
|
||||
<q-input
|
||||
|
|
|
|||
|
|
@ -1,8 +1,28 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { onMounted, ref, watch, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
|
||||
const organization = ref<string>(1);
|
||||
const organizationOptions = ref<any>([{ id: 1, name: "ทั้งหมด" }]);
|
||||
const DataStore = useInsigniaDataStore();
|
||||
|
||||
const props = defineProps({
|
||||
tab: {
|
||||
type: String,
|
||||
},
|
||||
roundId: {
|
||||
type: String,
|
||||
},
|
||||
fecthInsigniaAll: {
|
||||
type: Function,
|
||||
},
|
||||
fecthInsigniaByOc: {
|
||||
type: Function,
|
||||
},
|
||||
});
|
||||
|
||||
const organization = ref<string>("1");
|
||||
const organizationOptions = ref<any>([{ id: "1", name: "ทั้งหมด" }]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"citizenId",
|
||||
|
|
@ -172,6 +192,63 @@ const rows = ref<any[]>([
|
|||
dateSend: "31 ม.ค. 2566",
|
||||
},
|
||||
]);
|
||||
onMounted(async () => {
|
||||
organizationOptions.value = DataStore.optionsTypeOc;
|
||||
organization.value = organizationOptions.value[0].id;
|
||||
// if (props.fecthInsigniaAll) {
|
||||
// await props.fecthInsigniaAll(props.roundId, props.tab);
|
||||
// }
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
);
|
||||
filtertypeInsignia();
|
||||
}
|
||||
}
|
||||
});
|
||||
const changtypeOc = () => {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
props.fecthInsigniaByOc(
|
||||
props.roundId,
|
||||
organization.value,
|
||||
"officer",
|
||||
props.tab
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const typeinsignia = ref<number | string>("all");
|
||||
const typeinsigniaOptions = reactive<any>([{ id: "all", name: "ทั้งหมด" }]);
|
||||
const typeinsigniaValues: Set<number> = new Set();
|
||||
const listinsignia = ref<any>([]);
|
||||
const filtertypeInsignia = async () => {
|
||||
listinsignia.value = rows.value;
|
||||
for (const data of listinsignia.value) {
|
||||
const Type = data.insigniaType;
|
||||
if (Type !== null && !typeinsigniaValues.has(Type)) {
|
||||
typeinsigniaOptions.push({
|
||||
id: Type.toString(),
|
||||
name: Type.toString(),
|
||||
});
|
||||
typeinsigniaValues.add(Type);
|
||||
}
|
||||
}
|
||||
};
|
||||
const searchFilterTable = async () => {
|
||||
if (typeinsignia.value !== undefined && typeinsignia.value !== null) {
|
||||
if (typeinsignia.value === "all") {
|
||||
rows.value = listinsignia.value;
|
||||
} else {
|
||||
rows.value = listinsignia.value.filter(
|
||||
(e) => e.insigniaType === typeinsignia.value
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
|
|
@ -211,15 +288,26 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="changtypeOc"
|
||||
/>
|
||||
<q-select
|
||||
v-model="typeinsignia"
|
||||
label="ปรเภทเครื่องราชฯ"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="typeinsigniaOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="searchFilterTable"
|
||||
/>
|
||||
<!-- <div>
|
||||
<q-btn size="md" icon="mdi-download" flat round color="primary">
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn size="12px" flat round color="add" icon="mdi-plus">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</div> -->
|
||||
<q-space />
|
||||
|
||||
<q-input
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
|
||||
const organization = ref<string>(1);
|
||||
const organizationOptions = ref<any>([{ id: 1, name: "ทั้งหมด" }]);
|
||||
|
|
@ -176,6 +184,25 @@ const rows = ref<any[]>([
|
|||
},
|
||||
]);
|
||||
|
||||
onMounted(async () => {
|
||||
await fecthAgency();
|
||||
});
|
||||
|
||||
const fecthAgency = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.insigniaAgency())
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, eer);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
const resetFilter = () => {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ const stat = ref<any>({
|
|||
});
|
||||
onMounted(async () => {
|
||||
console.log(DataStore.optionsTypeOc);
|
||||
|
||||
await fecthlistRound();
|
||||
await fecthType();
|
||||
});
|
||||
|
|
@ -54,32 +53,81 @@ const fecthlistRound = async () => {
|
|||
// const lastIndex = optionRound.value.length;
|
||||
const lastValue = optionRound.value[0];
|
||||
round.value = lastValue.id.toString();
|
||||
fecthStat(round.value);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
// messageError($q, err);
|
||||
messageError($q, err);
|
||||
});
|
||||
};
|
||||
const fecthType = async () => {
|
||||
await http
|
||||
.get(config.API.typeOc())
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
optiontypeOc.value = res.data.result.map((e: any) => ({
|
||||
id: e.organizationId,
|
||||
name: e.organizationName,
|
||||
}));
|
||||
console.log(typeof optiontypeOc.value);
|
||||
DataStore.optionsTypeOc = optiontypeOc.value;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
// messageError($q, err);
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = true;
|
||||
});
|
||||
};
|
||||
const fecthStat = async (id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.insigniaDashboard(id))
|
||||
.then((res) => {
|
||||
stat.value = res.data.result;
|
||||
// console.log(res);
|
||||
console.log(stat.value);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
const changround = () => {
|
||||
fecthStat(round.value);
|
||||
};
|
||||
const fecthInsigniaAll = async (periodId: string, tab: string) => {
|
||||
// let data: any = [];
|
||||
// for (const item of DataStore.optionsTypeOc) {
|
||||
// await http
|
||||
// .get(config.API.insigniaList(periodId, item["id"], "officer", tab))
|
||||
// .then((res) => {
|
||||
// // console.log(res);
|
||||
// data.push(res.data.result);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
// }
|
||||
// console.log(data);
|
||||
};
|
||||
const fecthInsigniaByOc = async (
|
||||
roundId: string,
|
||||
ocId: string,
|
||||
role: string,
|
||||
status: string
|
||||
) => {
|
||||
console.log(status);
|
||||
await http
|
||||
.get(config.API.insigniaList(roundId, ocId, role, status))
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -97,28 +145,29 @@ const fecthType = async () => {
|
|||
map-options
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
@update:model-value="changround"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 row bg-white">
|
||||
<div class="fit q-px-md q-py-sm">
|
||||
<div class="row col-12 q-col-gutter-md fit">
|
||||
<cardTop
|
||||
:amount="stat.total"
|
||||
:amount="stat.orgAllCount"
|
||||
label="หน่วยงานทั้งหมด"
|
||||
color="#016987"
|
||||
/>
|
||||
<cardTop
|
||||
:amount="stat.sendName"
|
||||
:amount="stat.orgSendCount"
|
||||
label="หน่วยงานที่ส่งรายชื่อเเล้ว"
|
||||
color="#02A998"
|
||||
/>
|
||||
<cardTop
|
||||
:amount="stat.nonSend"
|
||||
:amount="stat.orgNoSendCount"
|
||||
label="หน่วยงานที่ยังไม่ได้ส่งรายชื่อ"
|
||||
color="#2EA0FF"
|
||||
/>
|
||||
<cardTop
|
||||
:amount="stat.personSend"
|
||||
:amount="stat.allUserUser"
|
||||
label="จำนวนคนที่ยื่นขอ"
|
||||
color="#4154B3"
|
||||
/>
|
||||
|
|
@ -147,16 +196,31 @@ const fecthType = async () => {
|
|||
<q-separator />
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="pending">
|
||||
<tab1 :tab="tab" :roundId="round" />
|
||||
<tab1
|
||||
:tab="tab"
|
||||
:roundId="round"
|
||||
:fecthInsigniaAll="fecthInsigniaAll"
|
||||
:fecthInsigniaByOc="fecthInsigniaByOc"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="reject">
|
||||
<tab2 :tab="tab" />
|
||||
<tab2
|
||||
:tab="tab"
|
||||
:roundId="round"
|
||||
:fecthInsigniaAll="fecthInsigniaAll"
|
||||
:fecthInsigniaByOc="fecthInsigniaByOc"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="delete">
|
||||
<tab3 :tab="tab" />
|
||||
<tab3
|
||||
:tab="tab"
|
||||
:roundId="round"
|
||||
:fecthInsigniaAll="fecthInsigniaAll"
|
||||
:fecthInsigniaByOc="fecthInsigniaByOc"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="organization">
|
||||
<tab4 :tab="tab" />
|
||||
<tab4 :tab="tab" :roundId="round" />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm" @click="router.go(-1), destroyLocalStorage()" />
|
||||
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm"
|
||||
@click="router.go(-1), destroyLocalStorage()" />
|
||||
ออกคำสั่ง
|
||||
</div>
|
||||
<q-card flat bordered class="col-12 q-my-sm q-mt-sm">
|
||||
|
|
@ -60,7 +61,7 @@ onUnmounted(() => {
|
|||
|
||||
const nextStep = async () => {
|
||||
stepper.value!.next();
|
||||
localStorage.setItem("currentStep", step.value.toString());
|
||||
localStorage.setItem("currentStep", (step.value + 1).toString());
|
||||
if (orderId.value) {
|
||||
await http
|
||||
.put(config.API.nextStep(orderId.value))
|
||||
|
|
@ -74,7 +75,7 @@ const nextStep = async () => {
|
|||
};
|
||||
const previousStep = async () => {
|
||||
stepper.value!.previous();
|
||||
localStorage.setItem("currentStep", step.value.toString());
|
||||
localStorage.setItem("currentStep", (step.value - 1).toString());
|
||||
if (orderId.value) {
|
||||
await http
|
||||
.put(config.API.prevStep(orderId.value))
|
||||
|
|
|
|||
|
|
@ -203,20 +203,22 @@ onMounted(async () => {
|
|||
fecthTypeOption("noData");
|
||||
}
|
||||
});
|
||||
|
||||
watch(byOrder, async () => {
|
||||
await http
|
||||
.get(config.API.approverOC(byOrder.value))
|
||||
.then((res: any) => {
|
||||
CommandOption.value = res.data.result;
|
||||
console.log(CommandOption.value);
|
||||
// console.log(CommandOption.value);
|
||||
})
|
||||
.catch((e: any) => {
|
||||
console.log(e);
|
||||
});
|
||||
});
|
||||
|
||||
watch(nameCommand, async () => {
|
||||
console.log(nameCommand.value);
|
||||
console.log(positionCommand.value);
|
||||
// console.log(nameCommand.value);
|
||||
// console.log(positionCommand.value);
|
||||
|
||||
if (positionCommand.value === "" || positionCommand.value === undefined) {
|
||||
positionCommand.value = nameCommand.value.positionName;
|
||||
|
|
@ -250,12 +252,13 @@ const fecthTypeOption = async (actions: string) => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchdetailOrder = async () => {
|
||||
let orderIdString = orderId.toString();
|
||||
await http
|
||||
.get(config.API.detailOrder(orderIdString))
|
||||
.then((res: any) => {
|
||||
console.log(typeOrderOption.value);
|
||||
// console.log(typeOrderOption.value);
|
||||
|
||||
const data = res.data.result;
|
||||
typeOrder.value = typeOrderOption.value.find(
|
||||
|
|
@ -268,7 +271,7 @@ const fetchdetailOrder = async () => {
|
|||
byOrder.value = data.orderBy;
|
||||
nameCommand.value = data.signatoryBy;
|
||||
positionCommand.value = data.signatoryPosition;
|
||||
console.log(nameCommand.value);
|
||||
// console.log("nameCommand===>",nameCommand.value);
|
||||
|
||||
examRound.value = data.examRound;
|
||||
conclusionRegisterNo.value = data.conclusionRegisterNo;
|
||||
|
|
@ -307,6 +310,19 @@ const fecthExamRoundOption = async () => {
|
|||
};
|
||||
|
||||
const submit = async () => {
|
||||
console.log("nameCommand ===>", nameCommand.value);
|
||||
|
||||
let signBy = null;
|
||||
if (!nameCommand.value.length) {
|
||||
signBy = await nameCommand.value.name;
|
||||
} else {
|
||||
const name2 = await CommandOption.value.find((x: any) => x.id == nameCommand.value.id);
|
||||
signBy = await name2?.name;
|
||||
console.log("signBy", signBy);
|
||||
}
|
||||
|
||||
const orderByOrganizationName = await byOrderOption.value.find((x:any)=>x.id == byOrder.value)?.name;
|
||||
|
||||
const formdata = {
|
||||
orderTypeValue: typeOrder.value.id,
|
||||
orderTitle: nameOrder.value,
|
||||
|
|
@ -315,13 +331,30 @@ const submit = async () => {
|
|||
orderYear: dateYear.value,
|
||||
orderDate: dateCommand.value,
|
||||
orderBy: byOrder.value,
|
||||
orderByOrganizationName: orderByOrganizationName,
|
||||
registerPosition: "",
|
||||
signatoryBy:
|
||||
nameCommand.value.id === undefined
|
||||
? nameCommand.value
|
||||
: nameCommand.value.id,
|
||||
signatoryBy: signBy,
|
||||
signatoryPosition: positionCommand.value,
|
||||
};
|
||||
|
||||
// {
|
||||
// "orderTypeValue": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
||||
// "orderTitle": "string",
|
||||
// "orderNo": "string",
|
||||
// "orderYear": 0,
|
||||
// "orderDate": "2023-08-21T09:46:54.354Z",
|
||||
// "orderBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
||||
// "orderByOrganizationName": "string",
|
||||
// "signatoryBy": "string",
|
||||
// "signatoryPosition": "string",
|
||||
// "examRound": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
||||
// "registerPosition": "string",
|
||||
// "conclusionRegisterNo": "string",
|
||||
// "conclusionRegisterDate": "2023-08-21T09:46:54.354Z",
|
||||
// "conclusionResultNo": "string",
|
||||
// "conclusionResultDate": "2023-08-21T09:46:54.354Z"
|
||||
// }
|
||||
|
||||
if (
|
||||
typeOrder.value.commandCode == "C-PM-01" ||
|
||||
typeOrder.value.commandCode == "C-PM-02" ||
|
||||
|
|
@ -448,7 +481,7 @@ const updateOrder = async (formData: Object, orderId: string) => {
|
|||
.then((res) => {
|
||||
console.log(res);
|
||||
next();
|
||||
success($q, "แก้ไขข้อมูลสำเร็จ");
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -486,7 +519,8 @@ const getClass = (val: boolean) => {
|
|||
</div>
|
||||
<div class="row col-xs-7 col-md-3 q-col-gutter-x-xs">
|
||||
<div class="col-6">
|
||||
<q-input :class="getClass(true)" outlined dense lazy-rules v-model="command" hide-bottom-space :label="`${'คำสั่งเลขที่'}`"/>
|
||||
<q-input :class="getClass(true)" outlined dense lazy-rules v-model="command" hide-bottom-space
|
||||
:label="`${'คำสั่งเลขที่'}`" />
|
||||
</div>
|
||||
<label class="col-1 flex justify-center items-center text-bold">/</label>
|
||||
<div class="col-5">
|
||||
|
|
@ -527,7 +561,7 @@ const getClass = (val: boolean) => {
|
|||
<selector :class="getClass(true)" outlined dense lazy-rules v-model="byOrder"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกคำสั่งโดย'}`]" emit-value hide-bottom-space
|
||||
:label="`${'คำสั่งโดย'}`" map-options option-label="name" :options="byOrderOption" option-value="id" use-input
|
||||
input-debounce="0" @update:model-value="(nameCommand = ''), (positionCommand = '')" />
|
||||
input-debounce="0" @update:model-value="(nameCommand = ''), (positionCommand = ''), (console.log(byOrder))" />
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<selector :class="getClass(true)" outlined dense lazy-rules v-model="nameCommand"
|
||||
|
|
@ -1009,7 +1043,7 @@ const getClass = (val: boolean) => {
|
|||
:rules="[(val) => !!val || `${'กรุณากรอกให้ดำรงตำแหน่ง ณ'}`]" :label="`${'ให้ดำรงตำแหน่ง ณ'}`"
|
||||
hide-bottom-space />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<q-input :class="getClass(true)" outlined dense lazy-rules v-model="experimentOc" :rules="[
|
||||
(val) =>
|
||||
|
|
@ -1019,58 +1053,58 @@ const getClass = (val: boolean) => {
|
|||
</div>
|
||||
<div class="col-md-4"></div>
|
||||
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<datepicker menu-class-name="modalfix" v-model="experimentformDate" :locale="'th'" autoApply borderless
|
||||
:enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input outlined dense class="full-width datepicker" :model-value="experimentformDate != null
|
||||
? date2Thai(experimentformDate)
|
||||
: null
|
||||
" :label="`${'ทดลองปฏิบัติหน้าที่ราชการตั้งแต่วันที่ '}`" :rules="[
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<datepicker menu-class-name="modalfix" v-model="experimentformDate" :locale="'th'" autoApply borderless
|
||||
:enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input outlined dense class="full-width datepicker" :model-value="experimentformDate != null
|
||||
? date2Thai(experimentformDate)
|
||||
: null
|
||||
" :label="`${'ทดลองปฏิบัติหน้าที่ราชการตั้งแต่วันที่ '}`" :rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณาเลือกลงวันที่ทดลองปฏิบัติหน้าที่ราชการตั้งแต่วันที่ '}`,
|
||||
]">
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<datepicker menu-class-name="modalfix" v-model="experimenttoDate" :locale="'th'" autoApply borderless
|
||||
:enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input outlined dense class="full-width datepicker" :model-value="experimenttoDate != null ? date2Thai(experimenttoDate) : null
|
||||
" :label="`${'ทดลองปฏิบัติหน้าที่ราชการถึงวันที่ '}`" :rules="[
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<datepicker menu-class-name="modalfix" v-model="experimenttoDate" :locale="'th'" autoApply borderless
|
||||
:enableTimePicker="false" week-start="0">
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input outlined dense class="full-width datepicker" :model-value="experimenttoDate != null ? date2Thai(experimenttoDate) : null
|
||||
" :label="`${'ทดลองปฏิบัติหน้าที่ราชการถึงวันที่ '}`" :rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณาเลือกลงวันที่ทดลองปฏิบัติหน้าที่ราชการถึงวันที่ '}`,
|
||||
]">
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col-md-4"></div>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<div class="col-md-4"></div>
|
||||
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<selector :class="getClass(true)" outlined dense lazy-rules v-model="chairman"
|
||||
|
|
@ -1097,7 +1131,9 @@ const getClass = (val: boolean) => {
|
|||
typeOrder.commandCode === 'C-PM-12'
|
||||
">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<q-input :class="getClass(true)" outlined dense lazy-rules v-model="committeeOc" :rules="[(val) => !!val || `${'กรุณาเลือกชื่อหน่วยงาน (อนุสนธิคำสั่ง)'}`]" :label="`${'ชื่อหน่วยงาน (อนุสนธิคำสั่ง)'}`" hide-bottom-space />
|
||||
<q-input :class="getClass(true)" outlined dense lazy-rules v-model="committeeOc"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกชื่อหน่วยงาน (อนุสนธิคำสั่ง)'}`]"
|
||||
:label="`${'ชื่อหน่วยงาน (อนุสนธิคำสั่ง)'}`" hide-bottom-space />
|
||||
|
||||
<!-- <selector :class="getClass(true)" outlined dense lazy-rules v-model="committeeOc"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกหน่วยงาน (อนุสนธิคำสั่ง)'}`]" hide-bottom-space
|
||||
|
|
@ -1105,7 +1141,9 @@ const getClass = (val: boolean) => {
|
|||
:options="committeeOcOption" option-value="id" use-input input-debounce="0" /> -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<q-input :class="getClass(true)" outlined dense lazy-rules v-model="committeeOrder" :rules="[(val) => !!val || `${'กรุณาเลือกอนุสนธิคำสั่งที่'}`]" :label="`${'อนุสนธิคำสั่งที่'}`" hide-bottom-space />
|
||||
<q-input :class="getClass(true)" outlined dense lazy-rules v-model="committeeOrder"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกอนุสนธิคำสั่งที่'}`]" :label="`${'อนุสนธิคำสั่งที่'}`"
|
||||
hide-bottom-space />
|
||||
|
||||
<!-- <selector :class="getClass(true)" outlined dense lazy-rules v-model="committeeOrder"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกอนุสนธิคำสั่งที่'}`]" hide-bottom-space
|
||||
|
|
@ -1137,7 +1175,8 @@ const getClass = (val: boolean) => {
|
|||
<!-- C-PM-13 -->
|
||||
<div class="row col-6 q-col-gutter-x-lg q-col-gutter-y-md" v-if="typeOrder.commandCode === 'C-PM-13'">
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<q-input :class="getClass(true)" outlined dense lazy-rules v-model="receiveOc" :rules="[(val) => !!val || `${'กรุณาเลือกชื่อหน่วยงาน'}`]" :label="`${'ชื่อหน่วยงาน'}`" hide-bottom-space />
|
||||
<q-input :class="getClass(true)" outlined dense lazy-rules v-model="receiveOc"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกชื่อหน่วยงาน'}`]" :label="`${'ชื่อหน่วยงาน'}`" hide-bottom-space />
|
||||
|
||||
<!-- <selector :class="getClass(true)" outlined dense lazy-rules v-model="receiveOc"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกหน่วยงาน'}`]" hide-bottom-space
|
||||
|
|
@ -1222,6 +1261,8 @@ const getClass = (val: boolean) => {
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<style>.q-field--with-bottom {
|
||||
<style>
|
||||
.q-field--with-bottom {
|
||||
padding-bottom: 0px;
|
||||
}</style>
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ const getData = async (id: string) => {
|
|||
.get(config.API.personsselectedOrder(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
let list: ResponseData[] = [];
|
||||
data.map((r: ResponseData) => {
|
||||
list.push({
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ const saveData = async () => {
|
|||
.post(config.API.copyOrderPersonsId(id), selectedModal.value)
|
||||
.then((res) => {
|
||||
// const data = res.data.result;
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, messageError, showLoader, hideLoader, dialogConfirm } = mixin;
|
||||
const { date2Thai, messageError, showLoader, hideLoader, dialogConfirm, success } = mixin;
|
||||
const route = useRoute();
|
||||
const $q = useQuasar();
|
||||
|
||||
|
|
@ -26,40 +26,82 @@ const date = ref<Date>(new Date());
|
|||
const fileOrder = ref<any>(null);
|
||||
const fileTailer = ref<any>(null);
|
||||
|
||||
const OrderPDF = ref<string>("");
|
||||
const TailerPDF = ref<string>("");
|
||||
const OrderPDFUpload = ref<string>("");
|
||||
const TailerPDFUpload = ref<string>("");
|
||||
|
||||
const orderCoverPdf = ref<string>("");
|
||||
const orderCoverDocs = ref<string>("");
|
||||
const orderAttachmentPdf = ref<string>("");
|
||||
const orderAttachmentXlsx = ref<string>("");
|
||||
|
||||
const statusOrder = ref<string>();
|
||||
|
||||
const orderId = ref<string>(orderId_params.toString());
|
||||
onMounted(async () => {
|
||||
if (orderId.value) {
|
||||
fetchReportCover('pdf', orderId.value);
|
||||
fetchReportCover('docx', orderId.value);
|
||||
fetchReportAttachment('pdf', orderId.value);
|
||||
fetchReportAttachment('xlsx', orderId.value);
|
||||
fetchAttachment(orderId.value);
|
||||
fecthstatusOrder(orderId.value);
|
||||
}
|
||||
});
|
||||
|
||||
const fetchReportCover = async (type: string, orderId: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.reportOrderCover(type, orderId))
|
||||
.then(async (res) => {
|
||||
if (type == 'pdf') {
|
||||
orderCoverPdf.value = res.data.result;
|
||||
viewPDF(orderCoverPdf.value);
|
||||
} else {
|
||||
orderCoverDocs.value = res.data.result;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
// messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchReportAttachment = async (type: string, orderId: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.reportOrderAttachment(type, orderId))
|
||||
.then(async (res) => {
|
||||
if (type == 'pdf') {
|
||||
orderAttachmentPdf.value = res.data.result;
|
||||
} else {
|
||||
orderAttachmentXlsx.value = res.data.result;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
// messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchAttachment = async (orderId: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.attachmentOrder(orderId))
|
||||
.then(async (res) => {
|
||||
let response = res.data.result;
|
||||
// console.log(response);
|
||||
order.value = response.orderNo;
|
||||
years.value = Number(response.orderYear);
|
||||
if (response.date !== undefined) {
|
||||
date.value = response.date;
|
||||
}
|
||||
if (response.orderFileUrl !== null) {
|
||||
// OrderPDF.value = response.orderFileUrl;
|
||||
OrderPDFUpload.value = response.orderFileUrl;
|
||||
|
||||
viewPDF(OrderPDF.value);
|
||||
}
|
||||
if (response.attachmentFileUrl !== null) {
|
||||
// TailerPDF.value = response.attachmentFileUrl;
|
||||
TailerPDFUpload.value = response.attachmentFileUrl;
|
||||
}
|
||||
})
|
||||
|
|
@ -70,6 +112,7 @@ const fetchAttachment = async (orderId: string) => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fecthstatusOrder = async (orderId: string) => {
|
||||
await http
|
||||
.get(config.API.orderReady(orderId))
|
||||
|
|
@ -78,7 +121,7 @@ const fecthstatusOrder = async (orderId: string) => {
|
|||
statusOrder.value = status.result;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
});
|
||||
};
|
||||
const viewPDF = async (pdf: string) => {
|
||||
|
|
@ -104,10 +147,10 @@ const viewPDFUpload = async (pdf: string) => {
|
|||
watch(tab, () => {
|
||||
// console.log(tab.value);
|
||||
if (tab.value === "main") {
|
||||
viewPDF(OrderPDF.value);
|
||||
viewPDF(orderCoverPdf.value);
|
||||
}
|
||||
if (tab.value === "second") {
|
||||
viewPDF(TailerPDF.value);
|
||||
viewPDF(orderAttachmentPdf.value);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -159,6 +202,7 @@ const save = () => {
|
|||
});
|
||||
}
|
||||
};
|
||||
|
||||
const putOrderData = async () => {
|
||||
const orderData = {
|
||||
orderNo: order.value,
|
||||
|
|
@ -168,10 +212,10 @@ const putOrderData = async () => {
|
|||
await http
|
||||
.put(config.API.attachmentOrder(orderId.value), orderData)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
messageError($q, e);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -246,11 +290,11 @@ const viewFileUpload = async (url: string) => {
|
|||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item clickable v-close-popup type="a" :href="orderCoverPdf" target="_blank">
|
||||
<q-item-section avatar><q-icon color="red" name="mdi-file-pdf" /></q-item-section>
|
||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item clickable v-close-popup type="a" :href="orderCoverDocs" target="_blank">
|
||||
<q-item-section avatar><q-icon color="blue" name="mdi-file-word" /></q-item-section>
|
||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||
</q-item>
|
||||
|
|
@ -265,11 +309,11 @@ const viewFileUpload = async (url: string) => {
|
|||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item clickable v-close-popup type="a" :href="orderAttachmentPdf" target="_blank">
|
||||
<q-item-section avatar><q-icon color="red" name="mdi-file-pdf" /></q-item-section>
|
||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item clickable v-close-popup type="a" :href="orderAttachmentXlsx" target="_blank">
|
||||
<q-item-section avatar><q-icon color="green-7" name="mdi-file-excel" /></q-item-section>
|
||||
<q-item-section>ไฟล์ .xls</q-item-section>
|
||||
</q-item>
|
||||
|
|
@ -332,7 +376,8 @@ const viewFileUpload = async (url: string) => {
|
|||
@click="viewFileUpload(OrderPDFUpload)">
|
||||
<q-tooltip>ดูไฟล์คำสั่ง</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn type="a" :href="OrderPDFUpload" size="12px" flat dense color="red" icon="mdi-download" target="_blank">
|
||||
<q-btn type="a" :href="OrderPDFUpload" size="12px" flat dense color="red" icon="mdi-download"
|
||||
target="_blank">
|
||||
<q-tooltip>ดาวน์โหลดเอกสารแนบท้าย</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
@ -350,7 +395,8 @@ const viewFileUpload = async (url: string) => {
|
|||
@click="viewFileUpload(TailerPDFUpload)">
|
||||
<q-tooltip>ดูไฟล์คำสั่ง</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn type="a" :href="TailerPDFUpload" size="12px" flat dense color="red" icon="mdi-download" target="_blank">
|
||||
<q-btn type="a" :href="TailerPDFUpload" size="12px" flat dense color="red" icon="mdi-download"
|
||||
target="_blank">
|
||||
<q-tooltip>ดาวน์โหลดเอกสารแนบท้าย</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue