file step 2
This commit is contained in:
parent
a3787f976a
commit
6d88cbb772
6 changed files with 122 additions and 24 deletions
|
|
@ -24,5 +24,5 @@ export default {
|
||||||
|
|
||||||
/**document */
|
/**document */
|
||||||
loadPathDocument: (val: string, id: string) =>
|
loadPathDocument: (val: string, id: string) =>
|
||||||
`${env.API_URI}/document/${val}/${id}`,
|
`${evaluation}/document/${val}/${id}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -68,12 +68,24 @@ const commanderFullnameRef = ref<object | null>(null);
|
||||||
const commanderPositionRef = ref<object | null>(null);
|
const commanderPositionRef = ref<object | null>(null);
|
||||||
const commanderAboveFullnameRef = ref<object | null>(null);
|
const commanderAboveFullnameRef = ref<object | null>(null);
|
||||||
const commanderAbovePositionRef = ref<object | null>(null);
|
const commanderAbovePositionRef = ref<object | null>(null);
|
||||||
|
const fileEvaluation1Ref = ref<object | null>(null);
|
||||||
|
const fileEvaluation2Ref = ref<object | null>(null);
|
||||||
|
const fileEvaluation3Ref = ref<object | null>(null);
|
||||||
|
const fileEvaluation4Ref = ref<object | null>(null);
|
||||||
|
const fileEvaluation5Ref = ref<object | null>(null);
|
||||||
|
const fileEvaluation6Ref = ref<object | null>(null);
|
||||||
|
|
||||||
const formCommandRef: FormCommandRef = {
|
const formCommandRef: FormCommandRef = {
|
||||||
commanderFullname: commanderFullnameRef,
|
commanderFullname: commanderFullnameRef,
|
||||||
commanderPosition: commanderPositionRef,
|
commanderPosition: commanderPositionRef,
|
||||||
commanderAboveFullname: commanderAboveFullnameRef,
|
commanderAboveFullname: commanderAboveFullnameRef,
|
||||||
commanderAbovePosition: commanderAbovePositionRef,
|
commanderAbovePosition: commanderAbovePositionRef,
|
||||||
|
fileEvaluation1: fileEvaluation1Ref,
|
||||||
|
fileEvaluation2: fileEvaluation2Ref,
|
||||||
|
fileEvaluation3: fileEvaluation3Ref,
|
||||||
|
fileEvaluation4: fileEvaluation4Ref,
|
||||||
|
fileEvaluation5: fileEvaluation5Ref,
|
||||||
|
fileEvaluation6: fileEvaluation6Ref,
|
||||||
};
|
};
|
||||||
|
|
||||||
async function onCilckNextStep() {
|
async function onCilckNextStep() {
|
||||||
|
|
@ -147,6 +159,8 @@ async function saveStep2() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateformCommand(val: any, ref: any) {
|
function updateformCommand(val: any, ref: any) {
|
||||||
|
console.log(ref);
|
||||||
|
|
||||||
formCommand.commanderFullname = val.commanderFullname;
|
formCommand.commanderFullname = val.commanderFullname;
|
||||||
formCommand.commanderPosition = val.commanderPosition;
|
formCommand.commanderPosition = val.commanderPosition;
|
||||||
formCommand.commanderAboveFullname = val.commanderAboveFullname;
|
formCommand.commanderAboveFullname = val.commanderAboveFullname;
|
||||||
|
|
@ -156,6 +170,12 @@ function updateformCommand(val: any, ref: any) {
|
||||||
commanderPositionRef.value = ref.commanderPositionRef;
|
commanderPositionRef.value = ref.commanderPositionRef;
|
||||||
commanderAboveFullnameRef.value = ref.commanderAboveFullnameRef;
|
commanderAboveFullnameRef.value = ref.commanderAboveFullnameRef;
|
||||||
commanderAbovePositionRef.value = ref.commanderAbovePositionRef;
|
commanderAbovePositionRef.value = ref.commanderAbovePositionRef;
|
||||||
|
fileEvaluation1Ref.value = ref.fileEvaluation1Ref;
|
||||||
|
fileEvaluation2Ref.value = ref.fileEvaluation2Ref;
|
||||||
|
fileEvaluation3Ref.value = ref.fileEvaluation3Ref;
|
||||||
|
fileEvaluation4Ref.value = ref.fileEvaluation4Ref;
|
||||||
|
fileEvaluation5Ref.value = ref.fileEvaluation5Ref;
|
||||||
|
fileEvaluation6Ref.value = ref.fileEvaluation6Ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function validateStep2() {
|
async function validateStep2() {
|
||||||
|
|
@ -217,8 +237,6 @@ function fetchMeeting() {
|
||||||
const modalHistory = ref<boolean>(false);
|
const modalHistory = ref<boolean>(false);
|
||||||
function onClickPopupHistory() {
|
function onClickPopupHistory() {
|
||||||
modalHistory.value = !modalHistory.value;
|
modalHistory.value = !modalHistory.value;
|
||||||
|
|
||||||
console.log(modalHistory.value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
@ -232,6 +250,7 @@ onMounted(async () => {
|
||||||
<div class="toptitle">
|
<div class="toptitle">
|
||||||
{{ props.title }}
|
{{ props.title }}
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="store.evaluateId"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
|
|
@ -360,7 +379,11 @@ onMounted(async () => {
|
||||||
:fetchMeeting="fetchMeeting"
|
:fetchMeeting="fetchMeeting"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<PopupHistory :modal="modalHistory" :close="onClickPopupHistory" />
|
<PopupHistory
|
||||||
|
:modal="modalHistory"
|
||||||
|
:close="onClickPopupHistory"
|
||||||
|
:id="store.evaluateId"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,12 @@ const commanderFullnameRef = ref<object | null>(null);
|
||||||
const commanderPositionRef = ref<object | null>(null);
|
const commanderPositionRef = ref<object | null>(null);
|
||||||
const commanderAboveFullnameRef = ref<object | null>(null);
|
const commanderAboveFullnameRef = ref<object | null>(null);
|
||||||
const commanderAbovePositionRef = ref<object | null>(null);
|
const commanderAbovePositionRef = ref<object | null>(null);
|
||||||
|
const fileEvaluation1Ref = ref<object | null>(null);
|
||||||
|
const fileEvaluation2Ref = ref<object | null>(null);
|
||||||
|
const fileEvaluation3Ref = ref<object | null>(null);
|
||||||
|
const fileEvaluation4Ref = ref<object | null>(null);
|
||||||
|
const fileEvaluation5Ref = ref<object | null>(null);
|
||||||
|
const fileEvaluation6Ref = ref<object | null>(null);
|
||||||
|
|
||||||
const updateInput = (value: any) => {
|
const updateInput = (value: any) => {
|
||||||
const ref = {
|
const ref = {
|
||||||
|
|
@ -47,6 +53,12 @@ const updateInput = (value: any) => {
|
||||||
commanderPositionRef: commanderPositionRef.value,
|
commanderPositionRef: commanderPositionRef.value,
|
||||||
commanderAboveFullnameRef: commanderAboveFullnameRef.value,
|
commanderAboveFullnameRef: commanderAboveFullnameRef.value,
|
||||||
commanderAbovePositionRef: commanderAbovePositionRef.value,
|
commanderAbovePositionRef: commanderAbovePositionRef.value,
|
||||||
|
fileEvaluation1Ref: fileEvaluation1Ref.value,
|
||||||
|
fileEvaluation2Ref: fileEvaluation2Ref.value,
|
||||||
|
fileEvaluation3Ref: fileEvaluation3Ref.value,
|
||||||
|
fileEvaluation4Ref: fileEvaluation4Ref.value,
|
||||||
|
fileEvaluation5Ref: fileEvaluation5Ref.value,
|
||||||
|
fileEvaluation6Ref: fileEvaluation6Ref.value,
|
||||||
};
|
};
|
||||||
emit("update:form", value, ref);
|
emit("update:form", value, ref);
|
||||||
};
|
};
|
||||||
|
|
@ -130,6 +142,12 @@ onMounted(async () => {
|
||||||
commanderPositionRef: commanderPositionRef.value,
|
commanderPositionRef: commanderPositionRef.value,
|
||||||
commanderAboveFullnameRef: commanderAboveFullnameRef.value,
|
commanderAboveFullnameRef: commanderAboveFullnameRef.value,
|
||||||
commanderAbovePositionRef: commanderAbovePositionRef.value,
|
commanderAbovePositionRef: commanderAbovePositionRef.value,
|
||||||
|
fileEvaluation1Ref: fileEvaluation1Ref.value,
|
||||||
|
fileEvaluation2Ref: fileEvaluation2Ref.value,
|
||||||
|
fileEvaluation3Ref: fileEvaluation3Ref.value,
|
||||||
|
fileEvaluation4Ref: fileEvaluation4Ref.value,
|
||||||
|
fileEvaluation5Ref: fileEvaluation5Ref.value,
|
||||||
|
fileEvaluation6Ref: fileEvaluation6Ref.value,
|
||||||
};
|
};
|
||||||
emit("update:form", formCommand, ref);
|
emit("update:form", formCommand, ref);
|
||||||
props.evaluateId && (await fetchPathUpload("เล่ม 1", props.evaluateId));
|
props.evaluateId && (await fetchPathUpload("เล่ม 1", props.evaluateId));
|
||||||
|
|
@ -181,6 +199,8 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
|
ref="fileEvaluation1Ref"
|
||||||
|
:rules="[(val) => !!val || 'เลือกไฟล']"
|
||||||
v-model="fileEvaluation1"
|
v-model="fileEvaluation1"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -247,6 +267,8 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
|
ref="fileEvaluation2Ref"
|
||||||
|
:rules="[(val) => !!val || 'เลือกไฟล']"
|
||||||
v-model="fileEvaluation2"
|
v-model="fileEvaluation2"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -314,6 +336,8 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
|
ref="fileEvaluation3Ref"
|
||||||
|
:rules="[(val) => !!val || 'เลือกไฟล']"
|
||||||
v-model="fileEvaluation3"
|
v-model="fileEvaluation3"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -380,6 +404,8 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
|
ref="fileEvaluation4Ref"
|
||||||
|
:rules="[(val) => !!val || 'เลือกไฟล']"
|
||||||
v-model="fileEvaluation4"
|
v-model="fileEvaluation4"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -445,6 +471,8 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
|
ref="fileEvaluation5Ref"
|
||||||
|
:rules="[(val) => !!val || 'เลือกไฟล']"
|
||||||
v-model="fileEvaluation5"
|
v-model="fileEvaluation5"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -511,6 +539,8 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
|
ref="fileEvaluation6Ref"
|
||||||
|
:rules="[(val) => !!val || 'เลือกไฟล']"
|
||||||
v-model="fileEvaluation6"
|
v-model="fileEvaluation6"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,26 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
|
||||||
import HeaderDialog from "@/components/DialogHeader.vue";
|
import HeaderDialog from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
const mixins = useCounterMixin();
|
||||||
|
const { showLoader, hideLoader, date2Thai } = mixins;
|
||||||
|
|
||||||
/** รับ props Tab 1 */
|
/** รับ props Tab 1 */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
modal: {
|
modal: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
require: true,
|
require: true,
|
||||||
},
|
},
|
||||||
// fetchDirector: {
|
|
||||||
// type: Function,
|
|
||||||
// require: true,
|
|
||||||
// default: () => "",
|
|
||||||
// },
|
|
||||||
// fetchMeeting: {
|
|
||||||
// type: Function,
|
|
||||||
// require: true,
|
|
||||||
// default: () => "",
|
|
||||||
// },
|
|
||||||
close: {
|
close: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => "",
|
default: () => "",
|
||||||
|
|
@ -37,33 +38,60 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "statusEdit",
|
name: "Step",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "การแก้ไข",
|
label: "การแก้ไข",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "statusEdit",
|
field: "Step",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "operator",
|
name: "LastUpdateFullName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ผู้ดำเนินการ",
|
label: "ผู้ดำเนินการ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "operator",
|
field: "LastUpdateFullName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateEdit",
|
name: "LastUpdatedAt",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันที่แก้ไข",
|
label: "วันที่แก้ไข",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "dateEdit",
|
field: "LastUpdatedAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
const row = ref<any>();
|
||||||
|
|
||||||
|
async function fetchListHistory(id: string) {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.evaluationHistory(id))
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
const list = data.map((e: any) => ({
|
||||||
|
Step: e.Step,
|
||||||
|
LastUpdateFullName: e.LastUpdateFullName,
|
||||||
|
LastUpdatedAt: date2Thai(e.LastUpdatedAt),
|
||||||
|
}));
|
||||||
|
row.value = list;
|
||||||
|
})
|
||||||
|
.catch((err) => {})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.modal,
|
||||||
|
() => {
|
||||||
|
props.modal && props.id && fetchListHistory(props.id);
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="props.modal">
|
<q-dialog v-model="props.modal">
|
||||||
|
|
@ -81,6 +109,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
bordered
|
bordered
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
:rows="row"
|
||||||
dense
|
dense
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,12 @@ interface FormCommandRef {
|
||||||
commanderPosition: object | null;
|
commanderPosition: object | null;
|
||||||
commanderAboveFullname: object | null;
|
commanderAboveFullname: object | null;
|
||||||
commanderAbovePosition: object | null;
|
commanderAbovePosition: object | null;
|
||||||
|
fileEvaluation1: object | null;
|
||||||
|
fileEvaluation2: object | null;
|
||||||
|
fileEvaluation3: object | null;
|
||||||
|
fileEvaluation4: object | null;
|
||||||
|
fileEvaluation5: object | null;
|
||||||
|
fileEvaluation6: object | null;
|
||||||
|
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,17 @@ async function fetchCheckStep(id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveEvaluation(body: any) {
|
async function saveEvaluation(body: any) {
|
||||||
console.log(body);
|
const data = {
|
||||||
|
IsEducationalQft: body.isEducationalQft,
|
||||||
|
IsGovermantServiceHtr: body.isGovermantServiceHtr,
|
||||||
|
IsOperatingExp: body.isOperatingExp,
|
||||||
|
IsMinPeriodOfTenure: body.isMinPeriodOfTenure,
|
||||||
|
IsHaveSpecificQft: body.isHaveSpecificQft,
|
||||||
|
IsHaveProLicense: body.isHaveProLicense,
|
||||||
|
IsHaveMinPeriodOrHoldPos: body.isHaveMinPeriodOrHoldPos,
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
// const form = {
|
// const form = {
|
||||||
// UserId: "08dbca3a-8b6a-4a4e-8b23-1f62e4f30ef6",
|
// UserId: "08dbca3a-8b6a-4a4e-8b23-1f62e4f30ef6",
|
||||||
// CitizenId: "1540200054020",
|
// CitizenId: "1540200054020",
|
||||||
|
|
@ -170,7 +180,7 @@ async function saveEvaluation(body: any) {
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.evaluationCheckspec(), body)
|
.post(config.API.evaluationCheckspec(), data)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue