Merge branch 'develop' into warunee-dev
This commit is contained in:
commit
38c4999a92
3 changed files with 250 additions and 71 deletions
|
|
@ -60,7 +60,7 @@ export default {
|
|||
|
||||
|
||||
|
||||
|
||||
summarySurveyDetail:(id:string) => `${evaluate}/survey?assign_id=${id}`
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,9 @@ 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 answer1 = ref<string>("");
|
||||
const answer2 = ref<string>("");
|
||||
const answer3 = ref<number>(0);
|
||||
|
||||
const result = ref<any>();
|
||||
const result_option = ref<any>([
|
||||
|
|
@ -55,68 +56,47 @@ const cancel = () => {
|
|||
status.value = false;
|
||||
};
|
||||
|
||||
const getSurveyData = async () => {
|
||||
await http
|
||||
.get(config.API.summarySurveyDetail(assignId.value))
|
||||
.then((res: any) => {
|
||||
const data = res.data.data;
|
||||
answer1.value = data.answer1,
|
||||
answer2.value = data.answer2,
|
||||
answer3.value = data.answer3
|
||||
status.value = false
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
};
|
||||
const save = () => {
|
||||
const data = {
|
||||
answer1: answer1.value,
|
||||
answer2: answer2.value,
|
||||
answer3: answer3.value,
|
||||
};
|
||||
dialogConfirm($q, async () => {
|
||||
await http
|
||||
.post(config.API.summarySurveyDetail(assignId.value), data)
|
||||
.then((res: any) => {
|
||||
// console.log(res);
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
});
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
// fecthResult(assignId.value);
|
||||
getSurveyData();
|
||||
});
|
||||
|
||||
// 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);
|
||||
// });
|
||||
// };
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row col-12 q-ma-xs">
|
||||
<div class="toptitle text-dark col-12 row items-center q-gutter-md">
|
||||
<div>แบบสํารวจความคิดเห็นการทดลองปฏิบัติหน้าที่ราชการ</div>
|
||||
<!-- <q-space /> -->
|
||||
<!-- <div v-if="action == 'edit'">
|
||||
<div v-if="status == false">
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click="edit()"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-btn dense flat @click="cancel()" round color="red" icon="mdi-undo">
|
||||
<q-tooltip>ยกเลิก</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
class="q-ml-sm"
|
||||
color="public"
|
||||
@click="saveEdit(assignId)"
|
||||
icon="mdi-content-save-outline"
|
||||
>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="col-12 row">
|
||||
<div class="col-12 text-top0 items-center">
|
||||
|
|
@ -125,12 +105,13 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:disable="!status"
|
||||
label="ความคิดเห็น"
|
||||
class="bg-white"
|
||||
dense
|
||||
borderless
|
||||
outlined
|
||||
v-model="comment_1"
|
||||
v-model="answer1"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -142,12 +123,13 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:disable="!status"
|
||||
label="ความคิดเห็น"
|
||||
class="bg-white"
|
||||
dense
|
||||
borderless
|
||||
outlined
|
||||
v-model="comment_2"
|
||||
v-model="answer2"
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -161,7 +143,7 @@ onMounted(() => {
|
|||
<q-space />
|
||||
<q-rating
|
||||
:disable="!status"
|
||||
v-model="knowledge_level"
|
||||
v-model="answer3"
|
||||
max="5"
|
||||
size="sm"
|
||||
color="grey"
|
||||
|
|
@ -185,6 +167,14 @@ onMounted(() => {
|
|||
</template>
|
||||
</q-rating>
|
||||
</div>
|
||||
<div class="col-12 q-my-md">
|
||||
<q-separator size="3px" color="grey-2" />
|
||||
</div>
|
||||
<!-- <Footer /> -->
|
||||
<div class="row col-12">
|
||||
<q-space />
|
||||
<q-btn label="บันทึก" color="secondary" @click="save" v-if="status" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -191,11 +191,20 @@ const receiveOcOption = ref<DataOption1[]>([
|
|||
id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
||||
},
|
||||
]);
|
||||
// C-PM-14
|
||||
const transferOrganizationName = ref<string>("");
|
||||
|
||||
// C-PM-16
|
||||
const orderNumber = ref<string>();
|
||||
const orderNumberDate = ref<Date>(new Date());
|
||||
|
||||
// C-PM-18-20
|
||||
const fault = ref<string>("");
|
||||
const guiltyBasis = ref<string>("");
|
||||
const conclusionFireNo = ref<string>("");
|
||||
const conclusionFireDate = ref<Date>(new Date());
|
||||
const conclusionFireResolution = ref<string>("");
|
||||
|
||||
onMounted(async () => {
|
||||
if (orderId) {
|
||||
fecthTypeOption("hasData");
|
||||
|
|
@ -251,9 +260,8 @@ const fetchdetailOrder = async () => {
|
|||
await http
|
||||
.get(config.API.detailOrder(orderIdString))
|
||||
.then((res: any) => {
|
||||
// console.log(typeOrderOption.value);
|
||||
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
typeOrder.value = typeOrderOption.value.find(
|
||||
(e) => e.id === data.orderTypeValue
|
||||
);
|
||||
|
|
@ -271,6 +279,57 @@ const fetchdetailOrder = async () => {
|
|||
conclusionRegisterDate.value = data.conclusionRegisterDate;
|
||||
conclusionResultNo.value = data.conclusionResultNo;
|
||||
conclusionResultDate.value = data.conclusionResultDate;
|
||||
// 05 -06
|
||||
meeting.value = data.conclusionMeetingNo;
|
||||
dateMeeting.value = data.conclusionMeetingDate;
|
||||
|
||||
// 08
|
||||
conclusionReceive.value = data.conclusionReturnNo;
|
||||
conclusionReceiveDate.value = data.conclusionReturnDate;
|
||||
|
||||
//09
|
||||
organizations.value = data.sourceOrganizationName;
|
||||
order.value = data.conclusionReturnNo;
|
||||
orderDate.value = data.conclusionReturnDate;
|
||||
book.value = data.militaryCommandNo;
|
||||
bookDate.value = data.militaryCommandDate;
|
||||
|
||||
//10
|
||||
organizationsOld.value = data.placementCommandIssuer;
|
||||
orderOld.value = data.placementCommandNo;
|
||||
orderOldDate.value = data.placementCommandDate;
|
||||
locationname.value = data.placementPositionName;
|
||||
experimentOc.value = data.placementOrganizationName;
|
||||
experimentformDate.value = data.probationStartDate;
|
||||
experimenttoDate.value = data.probationEndDate;
|
||||
chairman.value = data.chairManFullName;
|
||||
director.value = data.member1FullName;
|
||||
director2.value = data.member2FullName;
|
||||
|
||||
//11-12
|
||||
committeeOc.value = data.placementCommandIssuer;
|
||||
committeeOrder.value = data.placementCommandNo;
|
||||
committeeDate.value = data.placementCommandDate;
|
||||
|
||||
//13
|
||||
receiveOc.value = data.receiveOrganizationName;
|
||||
|
||||
//14
|
||||
transferOrganizationName.value = data.transferOrganizationName;
|
||||
conclusionReceive.value = data.conclusionReceiveNo;
|
||||
conclusionReceiveDate.value = data.conclusionReceiveDate;
|
||||
|
||||
//16
|
||||
orderNumber.value = data.govAidCommandNo;
|
||||
orderNumberDate.value = data.govAidCommandDate;
|
||||
|
||||
//18-20
|
||||
fault.value = data.fault;
|
||||
guiltyBasis.value = data.guiltyBasis;
|
||||
conclusionFireNo.value = data.conclusionFireNo;
|
||||
conclusionFireDate.value = data.conclusionFireDate;
|
||||
conclusionFireResolution.value = data.conclusionFireResolution;
|
||||
|
||||
fecthExamRoundOption(data.orderTypeCode);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -285,7 +344,6 @@ const fecthCommand = async () => {
|
|||
await http
|
||||
.get(config.API.organizationsOrder())
|
||||
.then((res: any) => {
|
||||
console.log(res);
|
||||
byOrderOption.value = res.data.result;
|
||||
})
|
||||
.catch((e: any) => {
|
||||
|
|
@ -397,7 +455,7 @@ const submit = async () => {
|
|||
});
|
||||
} else if (typeOrder.value.commandCode == "C-PM-14") {
|
||||
Object.assign(formdata, {
|
||||
transferOrganizationName: "",
|
||||
transferOrganizationName: transferOrganizationName.value,
|
||||
conclusionReceiveNo: conclusionReceive.value,
|
||||
conclusionReceiveDate: conclusionReceiveDate.value,
|
||||
});
|
||||
|
|
@ -412,11 +470,11 @@ const submit = async () => {
|
|||
typeOrder.value.commandCode == "C-PM-20"
|
||||
) {
|
||||
Object.assign(formdata, {
|
||||
fault: "",
|
||||
guiltyBasis: "",
|
||||
conclusionFireNo: "",
|
||||
conclusionFireDate: new Date(),
|
||||
conclusionFireResolution: "",
|
||||
fault: fault.value,
|
||||
guiltyBasis: guiltyBasis.value,
|
||||
conclusionFireNo: conclusionFireNo.value,
|
||||
conclusionFireDate: conclusionFireDate.value,
|
||||
conclusionFireResolution: conclusionFireResolution.value,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1874,7 +1932,24 @@ const getClass = (val: boolean) => {
|
|||
class="row col-12 q-col-gutter-x-lg q-col-gutter-y-md"
|
||||
v-if="typeOrder.commandCode === 'C-PM-14'"
|
||||
>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="transferOrganizationName"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกส่วนราชการที่ให้โอน'}`]"
|
||||
:label="`${'ส่วนราชการที่ให้โอน'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
|
||||
<!-- <selector :class="getClass(true)" outlined dense lazy-rules v-model="conclusionReceive"
|
||||
:rules="[(val: string) => !!val || `${'มติ กก. ครั้งที่ '}`]" hide-bottom-space
|
||||
:label="`${'มติ กก. ครั้งที่ '}`" emit-value map-options option-label="name" :options="ReceiveOption"
|
||||
option-value="id" use-input input-debounce="0" /> -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
|
|
@ -1891,7 +1966,7 @@ const getClass = (val: boolean) => {
|
|||
:label="`${'มติ กก. ครั้งที่ '}`" emit-value map-options option-label="name" :options="ReceiveOption"
|
||||
option-value="id" use-input input-debounce="0" /> -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="conclusionReceiveDate"
|
||||
|
|
@ -1993,6 +2068,120 @@ const getClass = (val: boolean) => {
|
|||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- C-PM-18-20 -->
|
||||
<div
|
||||
class="row col-12 q-col-gutter-x-lg q-col-gutter-y-md"
|
||||
v-if="
|
||||
typeOrder.commandCode === 'C-PM-18' ||
|
||||
typeOrder.commandCode === 'C-PM-19' ||
|
||||
typeOrder.commandCode === 'C-PM-20'
|
||||
"
|
||||
>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="fault"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณากรอกรายละเอียดการกระทำความผิด'}`,
|
||||
]"
|
||||
:label="`${'ละเอียดการกระทำความผิด'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="guiltyBasis"
|
||||
: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="conclusionFireNo"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณากรอกครั่งที่ (เรื่องการดำเนินการทางวินัย)'}`,
|
||||
]"
|
||||
:label="`${'ครั่งที่ (เรื่องการดำเนินการทางวินัย)'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="conclusionFireDate"
|
||||
: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="
|
||||
conclusionFireDate != null
|
||||
? date2Thai(conclusionFireDate)
|
||||
: 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-xs-12 col-md-4">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="conclusionFireResolution"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val ||
|
||||
`${'กรุณากรอก มติที่ประชุม(เรื่องการดำเนินการทางวินัย)'}`,
|
||||
]"
|
||||
:label="`${'มติที่ประชุม(เรื่องการดำเนินการทางวินัย)'}`"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue