จัดสรร
This commit is contained in:
parent
8aa5770c4c
commit
3bf9833e01
6 changed files with 1055 additions and 557 deletions
|
|
@ -32,9 +32,8 @@ const score2 = ref<number>(0);
|
|||
const score3 = ref<number>(0);
|
||||
const Allscore = ref<number>(0);
|
||||
|
||||
const comment_1 = ref<string>("")
|
||||
const comment_2 = ref<string>("")
|
||||
|
||||
const comment_1 = ref<string>("");
|
||||
const comment_2 = ref<string>("");
|
||||
|
||||
const result = ref<any>();
|
||||
const result_option = ref<any>([
|
||||
|
|
@ -61,28 +60,26 @@ onMounted(() => {
|
|||
});
|
||||
|
||||
// const fecthResult = async (id: string) => {
|
||||
// await http
|
||||
// .get(config.API.createformReport(id))
|
||||
// .then((res: any) => {
|
||||
// let data = res.data.data.evaluate;
|
||||
// console.log(data);
|
||||
// date_start.value = data.date_start;
|
||||
// date_finish.value = data.date_finish;
|
||||
// develop.value = Number(data.develop_complete);
|
||||
// result.value = Number(data.pass_result);
|
||||
// reson.value = data.reson;
|
||||
// chairman_dated.value = data.chairman_dated;
|
||||
// director1_dated.value = data.director1_dated;
|
||||
// director2_dated.value = data.director2_dated;
|
||||
// status.value = false;
|
||||
// action.value = 'edit';
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// console.log(e);
|
||||
// });
|
||||
// await http
|
||||
// .get(config.API.createformReport(id))
|
||||
// .then((res: any) => {
|
||||
// let data = res.data.data.evaluate;
|
||||
// console.log(data);
|
||||
// date_start.value = data.date_start;
|
||||
// date_finish.value = data.date_finish;
|
||||
// develop.value = Number(data.develop_complete);
|
||||
// result.value = Number(data.pass_result);
|
||||
// reson.value = data.reson;
|
||||
// chairman_dated.value = data.chairman_dated;
|
||||
// director1_dated.value = data.director1_dated;
|
||||
// director2_dated.value = data.director2_dated;
|
||||
// status.value = false;
|
||||
// action.value = 'edit';
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// console.log(e);
|
||||
// });
|
||||
// };
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -122,181 +119,71 @@ onMounted(() => {
|
|||
</div> -->
|
||||
</div>
|
||||
<div class="col-12 row">
|
||||
<div class="col-12 text-top0 items-center">
|
||||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">1</q-avatar>
|
||||
ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
label="ความคิดเห็น"
|
||||
class="bg-white"
|
||||
dense
|
||||
borderless
|
||||
outlined
|
||||
v-model="comment_1"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 row q-mt-md">
|
||||
<div class="col-12 text-top0 items-center">
|
||||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">2</q-avatar>
|
||||
ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
label="ความคิดเห็น"
|
||||
class="bg-white"
|
||||
dense
|
||||
borderless
|
||||
outlined
|
||||
v-model="comment_2"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-12 row q-mt-md">
|
||||
<div class="col-12 text-top0 items-center">
|
||||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">3</q-avatar>
|
||||
ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 row no-margin">
|
||||
<q-card class="text-top0 col-xs-12 col-sm-11 q-pa-xs q-pl-lg">
|
||||
<q-list dense>
|
||||
<q-item dense tag="label" v-ripple>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
1.1. ความรู้ความสามารถ</q-item-label
|
||||
>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-rating
|
||||
:disable="!status"
|
||||
v-model="knowledge_level"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ไม่พึงพอใจ</q-tooltip>
|
||||
</template>
|
||||
<template v-slot:tip-2>
|
||||
<q-tooltip>ค่อนข้างพึงพอใจ</q-tooltip>
|
||||
</template>
|
||||
<template v-slot:tip-3>
|
||||
<q-tooltip>พึงพอใจ</q-tooltip>
|
||||
</template>
|
||||
<template v-slot:tip-4>
|
||||
<q-tooltip>พึงพอใจมาก</q-tooltip>
|
||||
</template>
|
||||
<template v-slot:tip-5>
|
||||
<q-tooltip>พึงพอใจมากที่สุด</q-tooltip>
|
||||
</template>
|
||||
</q-rating>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row col-12 q-gutter-lg">
|
||||
|
||||
<div class=" col-xs-12 col-sm-11 ">
|
||||
<div class="col-12 text-top0 row items-center">
|
||||
เหตุผลอื่น ๆ ในการพิจารณา
|
||||
</div>
|
||||
<div class="col-12 text-top0 items-center">
|
||||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">1</q-avatar>
|
||||
ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
outlined
|
||||
label="ความคิดเห็น"
|
||||
class="bg-white"
|
||||
dense
|
||||
class="col-12"
|
||||
v-model="note"
|
||||
lazy-rules
|
||||
autogrow
|
||||
hide-bottom-space
|
||||
label="กรอกเหตุผลอื่น ๆ ในการพิจารณา"
|
||||
:row="5"
|
||||
:disable="!status"
|
||||
borderless
|
||||
outlined
|
||||
v-model="comment_1"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class=" col-xs-12 col-sm-11">
|
||||
<div class="col-12 row q-col-gutter-md">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="col-12 text-top0 items-center">
|
||||
สรุปผลการทดลองปฏิบัติหน้าที่ราชการ
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-select
|
||||
class="col-12"
|
||||
dense
|
||||
v-model="result"
|
||||
outlined
|
||||
:options="result_option"
|
||||
option-label="name"
|
||||
option-value="value"
|
||||
label="เลือกสรุปผลการทดลองปฏิบัติหน้าที่ราชการ"
|
||||
map-options
|
||||
emit-value
|
||||
:disable="!status"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="col-12 text-top0 items-center">
|
||||
วัน เดือน ปี ที่ประเมิน
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="date"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
:readonly="!status"
|
||||
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
|
||||
:disable="!status"
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
date != null ? date2Thai(date) : 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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 row q-mt-md">
|
||||
<div class="col-12 text-top0 items-center">
|
||||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">2</q-avatar>
|
||||
ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
label="ความคิดเห็น"
|
||||
class="bg-white"
|
||||
dense
|
||||
borderless
|
||||
outlined
|
||||
v-model="comment_2"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 row q-mt-md">
|
||||
<div class="text-top0 items-center">
|
||||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">3</q-avatar>
|
||||
ผลสัมฤทธิ์ของการทดลองปฏิบัติบัติหน้าที่ราชการ
|
||||
</div>
|
||||
<q-space />
|
||||
<q-rating
|
||||
:disable="!status"
|
||||
v-model="knowledge_level"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ไม่พึงพอใจ</q-tooltip>
|
||||
</template>
|
||||
<template v-slot:tip-2>
|
||||
<q-tooltip>ค่อนข้างพึงพอใจ</q-tooltip>
|
||||
</template>
|
||||
<template v-slot:tip-3>
|
||||
<q-tooltip>พึงพอใจ</q-tooltip>
|
||||
</template>
|
||||
<template v-slot:tip-4>
|
||||
<q-tooltip>พึงพอใจมาก</q-tooltip>
|
||||
</template>
|
||||
<template v-slot:tip-5>
|
||||
<q-tooltip>พึงพอใจมากที่สุด</q-tooltip>
|
||||
</template>
|
||||
</q-rating>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
171
src/modules/07_insignia/components/4_Allocate/DialogForm.vue
Normal file
171
src/modules/07_insignia/components/4_Allocate/DialogForm.vue
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { QForm, useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useResultDataStore } from "@/modules/07_insignia/storeResult";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import type { DataOption } from "@/modules/04_registry/components/profileType";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
const DataStore = useResultDataStore();
|
||||
const $q = useQuasar();
|
||||
const myForm = ref<QForm>();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
date2Thai,
|
||||
dialogConfirm,
|
||||
success,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
notifyError,
|
||||
} = mixin;
|
||||
const router = useRouter();
|
||||
const routeName = router.currentRoute.value.name;
|
||||
const amount = ref<number | null>();
|
||||
const Org = ref<string | null>("");
|
||||
const grandCross = ref<string | null>("");
|
||||
const grandCrossOp = ref<DataOption[]>([
|
||||
{ id: "xxx1", name: "เครื่อง ราช" },
|
||||
{ id: "xxx2", name: "เครื่อง ราชฯ" },
|
||||
]);
|
||||
const OrgOp = ref<DataOption[]>([
|
||||
{ id: "xxx1", name: "หน่วยงาน กทม" },
|
||||
{ id: "xxx2", name: "หน่วยงาน กทมฯ" },
|
||||
]);
|
||||
|
||||
const closeModal = () => {
|
||||
props.close();
|
||||
grandCross.value = null;
|
||||
amount.value = null;
|
||||
};
|
||||
const props = defineProps({
|
||||
modal: Boolean,
|
||||
save: {
|
||||
type: Function,
|
||||
default: () => console.log("not function"),
|
||||
},
|
||||
close: {
|
||||
type: Function,
|
||||
default: () => console.log("not function"),
|
||||
},
|
||||
roundId: {
|
||||
type: String,
|
||||
},
|
||||
action: {
|
||||
type: String,
|
||||
},
|
||||
personId: {
|
||||
type: String,
|
||||
},
|
||||
profileType: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
|
||||
const clickSave = async () => {
|
||||
dialogConfirm($q, () => dataSave());
|
||||
};
|
||||
const dataSave = async () => {
|
||||
if (routeName == "insigniaAllocate") {
|
||||
const data = {
|
||||
id: grandCross.value,
|
||||
amount: amount.value,
|
||||
};
|
||||
console.log("saveMainPopup", data);
|
||||
props.close();
|
||||
grandCross.value = null;
|
||||
amount.value = null;
|
||||
}
|
||||
else if(routeName == 'allocateDetail'){
|
||||
const data = {
|
||||
id: Org.value,
|
||||
amount: amount.value,
|
||||
};
|
||||
console.log("saveDetailPopup", data);
|
||||
props.close();
|
||||
Org.value = null;
|
||||
amount.value = null;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-card style="width: 800px">
|
||||
<q-toolbar class="q-py-sm">
|
||||
<q-toolbar-title class="text-h6">บันทึกผล </q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="closeModal"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-separator />
|
||||
|
||||
<q-form ref="myForm">
|
||||
<div class="q-pa-md">
|
||||
<div
|
||||
class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs"
|
||||
>
|
||||
<div class="col-6">
|
||||
<q-select
|
||||
v-if="routeName == 'insigniaAllocate'"
|
||||
hide-bottom-space
|
||||
:options="DataStore.insigniaOp2"
|
||||
dense
|
||||
borderless
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
outlined
|
||||
options-cover
|
||||
v-model="grandCross"
|
||||
:label="`เครื่องราชฯ`"
|
||||
/>
|
||||
<q-select
|
||||
v-else-if="routeName == 'allocateDetail'"
|
||||
hide-bottom-space
|
||||
:options="OrgOp"
|
||||
dense
|
||||
borderless
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
outlined
|
||||
v-model="Org"
|
||||
:label="`เครื่องราชฯ`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<q-input
|
||||
hide-bottom-space
|
||||
outlined
|
||||
class="inputgreen"
|
||||
v-model="amount"
|
||||
dense
|
||||
lazy-rules
|
||||
type="number"
|
||||
label="จำนวน"
|
||||
/>
|
||||
<!-- :rules="[(val:any) =>val.length != 13 ||`${'กรุณากรอกเลขบัตรประจำตัวประชาชนให้ครบ'}`,]" -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
|
||||
<q-separator />
|
||||
<div class="row justify-end q-py-sm">
|
||||
<div class="q-px-md">
|
||||
<q-btn label="บันทึก" @click="clickSave" color="public" />
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
|
@ -1,5 +1,15 @@
|
|||
<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="backHistory"
|
||||
/>
|
||||
หน่วยงานจัดสรรเครื่องราชอิสริยาภรณ์ {{ name }}
|
||||
</div>
|
||||
<q-card bordered class="q-py-sm row col-12">
|
||||
|
|
@ -142,6 +152,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
<DialogForm
|
||||
:modal="modal"
|
||||
:close="close"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
|
@ -150,8 +164,7 @@ import type { QTableProps } from "quasar";
|
|||
import router from "@/router";
|
||||
import { useQuasar } from "quasar";
|
||||
import cardTop from "@/modules/07_insignia/components/2_Manage/StatCard.vue";
|
||||
import type { FormProprsalsRound } from " @/modules/07_insignia/interface/request/Main.ts";
|
||||
|
||||
import DialogForm from "@/modules/07_insignia/components/4_Allocate/DialogForm.vue";
|
||||
const name = ref<string>("");
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -166,7 +179,12 @@ const stat = ref<any>({
|
|||
sendInsig: 9,
|
||||
remainInsig: 1,
|
||||
});
|
||||
|
||||
const backHistory = () => {
|
||||
router.push(`/insignia/allocate/list-allocate`)
|
||||
}
|
||||
const close = () => {
|
||||
modal.value = false;
|
||||
};
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"organization",
|
||||
|
|
@ -256,24 +274,9 @@ const rows = ref<any[]>([
|
|||
},
|
||||
]);
|
||||
|
||||
// หัวตาราง2
|
||||
const clickDelete = (id: string) => {
|
||||
$q.dialog({
|
||||
title: "ยืนยันการลบข้อมูล",
|
||||
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
|
||||
cancel: {
|
||||
flat: true,
|
||||
color: "negative",
|
||||
},
|
||||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {})
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
};
|
||||
|
||||
const clickAdd = () => {
|
||||
router.push({ name: "allocateDetailAdd" });
|
||||
modal.value = true
|
||||
};
|
||||
|
||||
// const redirectToPage = (id?: string) => {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,9 +1,8 @@
|
|||
interface FormProprsalsRound {
|
||||
id: number;
|
||||
name: string;
|
||||
year: number;
|
||||
startDate: number;
|
||||
endDate: number;
|
||||
status: string;
|
||||
id: string;
|
||||
insignia: string;
|
||||
total: number;
|
||||
done: number;
|
||||
remain: number;
|
||||
}
|
||||
export type { FormProprsalsRound };
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ export default [
|
|||
},
|
||||
},
|
||||
{
|
||||
path: "/insignia/allocate/detail",
|
||||
path: "/insignia/allocate/detail/:id",
|
||||
name: "allocateDetail",
|
||||
component: allocateDetail,
|
||||
meta: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue