แก้ ui
This commit is contained in:
parent
5c28d14047
commit
66124a819d
9 changed files with 246 additions and 189 deletions
|
|
@ -297,6 +297,7 @@ function confirmCancelInvestigate() {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
success($q, "ยกเลิกยุติเรื่องสำเร็จ");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -624,6 +624,7 @@ onMounted(() => {
|
|||
ref="dateReceivedRef"
|
||||
outlined
|
||||
dense
|
||||
:input-style="isReadonly ? { color: 'teal' }:{color:'black'}"
|
||||
:readonly="isReadonly"
|
||||
hide-bottom-space
|
||||
class="full-width datepicker"
|
||||
|
|
@ -700,6 +701,7 @@ onMounted(() => {
|
|||
for="inputDateconsideration"
|
||||
ref="dateConsiderationRef"
|
||||
outlined
|
||||
:input-style="isReadonly ? { color: 'teal' }:{color:'black'}"
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
:model-value="
|
||||
|
|
@ -708,11 +710,10 @@ onMounted(() => {
|
|||
: null
|
||||
"
|
||||
:readonly="isReadonly"
|
||||
label="วันที่กำหนดวันพิจารณา"
|
||||
label="วันที่กำหนดพิจารณา"
|
||||
hide-bottom-space
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val || `${'กรุณาเลือกวันที่กำหนดวันพิจารณา'}`,
|
||||
(val) => !!val || `${'กรุณาเลือกวันที่กำหนดพิจารณา'}`,
|
||||
]"
|
||||
lazy-rules
|
||||
>
|
||||
|
|
@ -773,6 +774,7 @@ onMounted(() => {
|
|||
for="inputDatewarn"
|
||||
ref="dateNotificationRef"
|
||||
outlined
|
||||
:input-style="isReadonly ? { color: 'teal' }:{color:'black'}"
|
||||
dense
|
||||
:readonly="isReadonly"
|
||||
hide-bottom-space
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import { onMounted, reactive, ref, watch } from "vue";
|
||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||
import { useRoute } from "vue-router";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
|
@ -25,6 +25,7 @@ const mixin = useCounterMixin();
|
|||
const store = useInvestigateFactStore();
|
||||
const { dialogConfirm, showLoader, success, hideLoader, messageError } = mixin;
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
||||
/** ข้อมูล v-model ของฟอร์มสืบสวน */
|
||||
|
|
@ -138,9 +139,11 @@ function getData() {
|
|||
.get(config.API.investigateById(id.value))
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
console.log(dataList)
|
||||
data.id = dataList.id;
|
||||
data.idComplaint = dataList.idComplaint;
|
||||
data.respondentType = dataList.respondentType;
|
||||
data.organizationId = dataList.organizationId;
|
||||
data.persons = dataList.persons;
|
||||
data.investigationDetail = dataList.investigationDetail;
|
||||
data.investigationDetailOther = dataList.investigationDetailOther;
|
||||
|
|
@ -157,6 +160,7 @@ function getData() {
|
|||
data.investigationStatusResult = dataList.investigationStatusResult;
|
||||
data.investigationExtendStatus = dataList.investigationExtendStatus;
|
||||
data.investigationDaysExtend = dataList.investigationDaysExtend;
|
||||
console.log(dataList)
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -193,13 +197,33 @@ async function onSubmit(data: any) {
|
|||
const modalPopup = ref<boolean>(false);
|
||||
/** ยืนยัน ส่งไปสอบสวน */
|
||||
function sentInvestigate() {
|
||||
if (mainStore.rowsAdd.length > 0) {
|
||||
modalPopup.value = true;
|
||||
// dialogConfirm(
|
||||
// $q,
|
||||
// () => confirmSentInvestigate(),
|
||||
// "ยืนยันส่งไปสอบสวน",
|
||||
// "ต้องการยืนยันส่งไปสอบสวนใช่หรือไม่?"
|
||||
// );
|
||||
} else {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => sentConfirmNoPerson(),
|
||||
"ยืนยันส่งไปสอบสวน",
|
||||
"ต้องการยืนยันส่งไปสอบสวนใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function sentConfirmNoPerson() {
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.investigateApprove(id.value), {
|
||||
persons: [],
|
||||
})
|
||||
.then((res) => {})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
getData();
|
||||
router.push(`/discipline/investigatefacts`)
|
||||
});
|
||||
}
|
||||
|
||||
function closePopup() {
|
||||
|
|
@ -237,12 +261,13 @@ function confirmEndInvestigate() {
|
|||
http
|
||||
.get(config.API.investigateReject(id.value))
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
success($q, "ยุติเรื่องสำเร็จ");
|
||||
await getData();
|
||||
});
|
||||
}
|
||||
|
|
@ -260,6 +285,7 @@ function confirmCancelInvestigate() {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
success($q, "ยกเลิกยุติเรื่องสำเร็จ");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@ watch(props.data, async () => {
|
|||
isUpdate.value = true;
|
||||
formData.id = props.data.id;
|
||||
formData.complaint = props.data.complaint;
|
||||
formData.organizationId = props.data.organizationId;
|
||||
formData.respondentType = props.data.respondentType;
|
||||
formData.complaintdetail = props.data.complaintdetail;
|
||||
formData.investigationDescription = props.data.investigationDescription;
|
||||
|
|
@ -764,6 +765,7 @@ onMounted(async () => {
|
|||
for="#date"
|
||||
class="full-width cursor-pointer"
|
||||
ref="dateRef"
|
||||
:input-style="isReadonly ? { color: 'teal' }:{color:'black'}"
|
||||
:readonly="isReadonly"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -850,6 +852,7 @@ onMounted(async () => {
|
|||
<template #trigger>
|
||||
<q-input
|
||||
for="#dateEnd"
|
||||
:input-style="isReadonly ? { color: 'teal' }:{color:'black'}"
|
||||
ref="dateEndRef"
|
||||
class="full-width cursor-pointer"
|
||||
:readonly="isReadonly"
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ function confirmSentIssueGate() {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
router.push(`/discipline/disciplinary`)
|
||||
fetchDetailDisciplinary();
|
||||
});
|
||||
}
|
||||
|
|
@ -232,6 +233,7 @@ function confirmEndInvestigate() {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
success($q, "ยุติเรื่องสำเร็จ");
|
||||
fetchDetailDisciplinary();
|
||||
});
|
||||
}
|
||||
|
|
@ -247,6 +249,7 @@ function confirmCancelInvestigate() {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
success($q, "ยกเลิกยุติเรื่องสำเร็จ");
|
||||
fetchDetailDisciplinary();
|
||||
});
|
||||
}
|
||||
|
|
@ -316,6 +319,7 @@ function emitPerson(data: PersonsArray[]) {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
success($q, "ส่งไปพักราชการสำเร็จ");
|
||||
hideLoader();
|
||||
fetchDetailDisciplinary();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -457,6 +457,7 @@ onMounted(async () => {
|
|||
<q-card bordered>
|
||||
<div class="col-12 row q-pa-md">
|
||||
<div class="col-12 row q-col-gutter-md">
|
||||
<div class="row col-12 q-col-gutter-x-md">
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<q-select
|
||||
:readonly="isReadonly"
|
||||
|
|
@ -547,11 +548,8 @@ onMounted(async () => {
|
|||
</template>
|
||||
</q-select> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="formData.respondentType !== 'ORGANIZATION'"
|
||||
class="col-6"
|
||||
></div>
|
||||
<div
|
||||
class="row col-12"
|
||||
v-if="formData.respondentType === 'PERSON'"
|
||||
|
|
@ -665,6 +663,8 @@ onMounted(async () => {
|
|||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
<div class="row col-12 q-col-gutter-x-md">
|
||||
<datepicker
|
||||
:readonly="isReadonly"
|
||||
menu-class-name="modalfix"
|
||||
|
|
@ -689,6 +689,9 @@ onMounted(async () => {
|
|||
:readonly="isReadonly"
|
||||
outlined
|
||||
dense
|
||||
:input-style="
|
||||
isReadonly ? { color: 'teal' } : { color: 'black' }
|
||||
"
|
||||
class="col-xs-12 col-sm-4"
|
||||
hide-bottom-space
|
||||
:model-value="
|
||||
|
|
@ -738,6 +741,9 @@ onMounted(async () => {
|
|||
:readonly="isReadonly"
|
||||
ref="disciplinaryDateAllegationRef"
|
||||
outlined
|
||||
:input-style="
|
||||
isReadonly ? { color: 'teal' } : { color: 'black' }
|
||||
"
|
||||
dense
|
||||
class="col-xs-12 col-sm-4"
|
||||
hide-bottom-space
|
||||
|
|
@ -764,7 +770,7 @@ onMounted(async () => {
|
|||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row col-12">
|
||||
<q-card
|
||||
|
|
@ -822,6 +828,11 @@ onMounted(async () => {
|
|||
ref="dateRef"
|
||||
:readonly="isReadonly"
|
||||
outlined
|
||||
:input-style="
|
||||
isReadonly
|
||||
? { color: 'teal' }
|
||||
: { color: 'black' }
|
||||
"
|
||||
dense
|
||||
lazy-rules
|
||||
borderless
|
||||
|
|
@ -911,6 +922,11 @@ onMounted(async () => {
|
|||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
:input-style="
|
||||
isReadonly
|
||||
? { color: 'teal' }
|
||||
: { color: 'black' }
|
||||
"
|
||||
hide-bottom-space
|
||||
borderless
|
||||
:model-value="
|
||||
|
|
@ -942,7 +958,6 @@ onMounted(async () => {
|
|||
</q-card>
|
||||
</div>
|
||||
|
||||
|
||||
<datepicker
|
||||
:readonly="isReadonly"
|
||||
menu-class-name="modalfix"
|
||||
|
|
@ -968,8 +983,11 @@ onMounted(async () => {
|
|||
ref="disciplinaryDateEvidentRef"
|
||||
outlined
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
hide-bottom-space
|
||||
:input-style="
|
||||
isReadonly ? { color: 'teal' } : { color: 'black' }
|
||||
"
|
||||
:model-value="
|
||||
formData.disciplinaryDateEvident != null
|
||||
? date2Thai(formData.disciplinaryDateEvident)
|
||||
|
|
@ -986,7 +1004,7 @@ onMounted(async () => {
|
|||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
color="primary"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
|
|
@ -997,7 +1015,7 @@ onMounted(async () => {
|
|||
<datepicker
|
||||
:readonly="isReadonly"
|
||||
menu-class-name="modalfix"
|
||||
for="#dateEvident"
|
||||
for="#dateResult"
|
||||
v-model="formData.disciplinaryDateResult"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
|
|
@ -1013,13 +1031,17 @@ onMounted(async () => {
|
|||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:readonly="isReadonly"
|
||||
ref="disciplinaryDateResultRef"
|
||||
outlined
|
||||
:input-style="
|
||||
isReadonly ? { color: 'teal' } : { color: 'black' }
|
||||
"
|
||||
dense
|
||||
class="full-width datepicker"
|
||||
class="full-width"
|
||||
hide-bottom-space
|
||||
:model-value="
|
||||
formData.disciplinaryDateResult != null
|
||||
|
|
@ -1037,14 +1059,13 @@ onMounted(async () => {
|
|||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
color="primary"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
||||
<div class="row col-12">
|
||||
<q-card
|
||||
bordered
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ function onclickSend() {
|
|||
emit("returnPerson", selected.value);
|
||||
props.close?.();
|
||||
},
|
||||
`ยืนยันการส่ง${props.title}`,
|
||||
`ต้องการยืนยันการส่ง${props.title}หรือไม่`
|
||||
`ยืนยันการ${props.title}`,
|
||||
`ต้องการยืนยันการ${props.title}หรือไม่`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ export const useInvestigateDisStore = defineStore(
|
|||
{
|
||||
name: "title",
|
||||
align: "left",
|
||||
label: "เรื่อง",
|
||||
label: "เรื่องร้องเรียน",
|
||||
sortable: true,
|
||||
field: "title",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -160,7 +160,7 @@ export const useInvestigateDisStore = defineStore(
|
|||
{
|
||||
name: "respondentType",
|
||||
align: "left",
|
||||
label: "ผู้ถูกสืบสวน",
|
||||
label: "ผู้ถูกสอบสวน",
|
||||
sortable: true,
|
||||
field: "respondentType",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ export const useInvestigateFactStore = defineStore(
|
|||
{
|
||||
name: "respondentType",
|
||||
align: "left",
|
||||
label: "ผู้ถูกสอบสวน",
|
||||
label: "ผู้ถูกสืบสวน",
|
||||
sortable: true,
|
||||
field: "respondentType",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue