fixing ระบบวินัย
This commit is contained in:
parent
e9ee7e7f40
commit
ba728ea000
16 changed files with 391 additions and 442 deletions
|
|
@ -135,6 +135,26 @@ async function searchInput() {
|
|||
organization: e.organization ?? "-",
|
||||
phone: e.phone ?? "-",
|
||||
email: e.email ?? "-",
|
||||
root: e.root,
|
||||
rootId: e.rootId,
|
||||
rootShortName: e.rootShortName,
|
||||
child1: e.child1,
|
||||
child1Id: e.child1Id,
|
||||
child1ShortName: e.child1ShortName,
|
||||
child2: e.child2,
|
||||
child2Id: e.child2Id,
|
||||
child2ShortName: e.child2ShortName,
|
||||
child3: e.child3,
|
||||
child3Id: e.child3Id,
|
||||
child3ShortName: e.child3ShortName,
|
||||
child4: e.child4,
|
||||
child4Id: e.child4Id,
|
||||
child4ShortName: e.child4ShortName,
|
||||
posMasterNo: e.posMasterNo,
|
||||
posTypeId: e.posTypeId,
|
||||
posTypeName: e.posTypeName,
|
||||
posLevelId: e.posLevelId,
|
||||
posLevelName: e.posLevelName,
|
||||
}));
|
||||
|
||||
rows.value = list;
|
||||
|
|
|
|||
|
|
@ -255,6 +255,8 @@ interface DataProfile {
|
|||
rootOld?: string;
|
||||
rootShortNameOld?: string | null;
|
||||
status: string;
|
||||
positionType?: string;
|
||||
positionLevel?: string;
|
||||
}
|
||||
export type {
|
||||
DataOption,
|
||||
|
|
|
|||
|
|
@ -18,46 +18,7 @@ async function onSubmit(data: any) {
|
|||
/** post */
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.complaintAdd(), {
|
||||
id: data.id,
|
||||
respondentType: data.respondentType,
|
||||
organizationId: data.organizationId,
|
||||
consideredAgency: data.consideredAgency,
|
||||
title: data.title,
|
||||
description: data.description,
|
||||
dateReceived: data.dateReceived,
|
||||
dateConsideration: data.dateConsideration,
|
||||
offenseDetails: data.offenseDetails,
|
||||
levelConsideration: data.levelConsideration,
|
||||
dateNotification: data.dateNotification,
|
||||
complaintFrom: data.complaintFrom,
|
||||
appellant: data.appellant,
|
||||
documentFile: data.documentFile,
|
||||
status: data.status,
|
||||
result: data.result,
|
||||
persons: data.persons.map((item: any) => ({
|
||||
personId: item.personId,
|
||||
idcard: item.idcard,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
name: item.name,
|
||||
posNo: item.posNo === "-" ? null : item.posNo,
|
||||
position: item.position,
|
||||
positionLevel: item.positionLevel,
|
||||
salary: item.salary === "-" ? null : item.salary,
|
||||
organization: item.organization,
|
||||
phone: item.phone === "-" ? null : item.phone,
|
||||
email: item.email,
|
||||
})),
|
||||
disciplineComplaintDocs: data.disciplineComplaintDocs.map(
|
||||
(file: any) => ({
|
||||
id: file.id,
|
||||
fileName: file.fileName,
|
||||
pathName: file.pathName,
|
||||
})
|
||||
),
|
||||
})
|
||||
.post(config.API.complaintAdd(), data)
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
router.push(`/discipline/complaints/${res.data.result}`);
|
||||
|
|
@ -70,6 +31,7 @@ async function onSubmit(data: any) {
|
|||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
|
|
|
|||
|
|
@ -168,7 +168,9 @@ async function getData() {
|
|||
data.id = dataList.id;
|
||||
data.respondentType = dataList.respondentType;
|
||||
data.organizationId = dataList.organizationId;
|
||||
data.organization = dataList.organization;
|
||||
data.consideredAgency = dataList.consideredAgency;
|
||||
data.consideredAgencyId = dataList.consideredAgencyId;
|
||||
data.title = dataList.title;
|
||||
data.description = dataList.description;
|
||||
data.dateReceived = dataList.dateReceived;
|
||||
|
|
@ -182,6 +184,7 @@ async function getData() {
|
|||
data.persons = dataList.persons;
|
||||
data.result = dataList.result;
|
||||
data.disciplineComplaintDocs = dataList.disciplineComplaintDocs;
|
||||
data.activeId = dataList.activeId;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -197,47 +200,9 @@ async function getData() {
|
|||
*/
|
||||
async function onSubmit(data: any) {
|
||||
showLoader();
|
||||
|
||||
http
|
||||
.put(config.API.complaintbyId(id.value), {
|
||||
id: data.id,
|
||||
respondentType: data.respondentType,
|
||||
organizationId: data.organizationId,
|
||||
consideredAgency: data.consideredAgency,
|
||||
title: data.title,
|
||||
description: data.description,
|
||||
dateReceived: data.dateReceived,
|
||||
dateConsideration: data.dateConsideration,
|
||||
offenseDetails: data.offenseDetails,
|
||||
levelConsideration: data.levelConsideration,
|
||||
dateNotification: data.dateNotification,
|
||||
complaintFrom: data.complaintFrom,
|
||||
appellant: data.appellant,
|
||||
documentFile: data.documentFile,
|
||||
status: data.status,
|
||||
result: data.result,
|
||||
persons: data.persons.map((item: any) => ({
|
||||
personId: item.personId,
|
||||
idcard: item.idcard,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
name: item.name,
|
||||
posNo: item.posNo === "-" ? null : item.posNo,
|
||||
position: item.position,
|
||||
positionLevel: item.positionLevel,
|
||||
salary: item.salary === "-" ? null : item.salary,
|
||||
organization: item.organization,
|
||||
phone: item.phone === "-" ? null : item.phone,
|
||||
email: item.email,
|
||||
})),
|
||||
disciplineComplaintDocs: data.disciplineComplaintDocs.map(
|
||||
(file: any) => ({
|
||||
id: file.id,
|
||||
fileName: file.fileName,
|
||||
pathName: file.pathName,
|
||||
})
|
||||
),
|
||||
})
|
||||
.put(config.API.complaintbyId(id.value), data)
|
||||
.then((res) => {
|
||||
getData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -406,7 +371,9 @@ onMounted(() => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<q-card bordered><Form :on-submit="onSubmit" :data="data" :get-data="getData" /></q-card>
|
||||
<q-card bordered
|
||||
><Form :on-submit="onSubmit" :data="data" :get-data="getData"
|
||||
/></q-card>
|
||||
<PopupSendToNext
|
||||
:modal="modalPopup"
|
||||
:close="closePopup"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { useQuasar } from "quasar";
|
|||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||
import type {
|
||||
FormData,
|
||||
MyObjectComplaintsRef,
|
||||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
|
||||
|
|
@ -17,6 +16,7 @@ import http from "@/plugins/http";
|
|||
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||
|
||||
const $q = useQuasar();
|
||||
const fileDocDataUpload = ref<File[]>([]);
|
||||
|
|
@ -28,6 +28,8 @@ const mainStore = useDisciplineMainStore();
|
|||
const complainstStore = useComplainstDataStore();
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
const organization = ref<OptionData>();
|
||||
const consideredAgency = ref<OptionData>();
|
||||
|
||||
/**ชั่งฟังเพิ่มข้อมูล ลง ตาราง */
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -43,21 +45,6 @@ const {
|
|||
} = mixin;
|
||||
const { filterSelector } = complainstStore; // function จาก store complainstStore
|
||||
|
||||
/** validateForm */
|
||||
const respondentTypeRef = ref<Object | null>(null);
|
||||
const organizationIdRef = ref<Object | null>(null);
|
||||
const consideredAgencyRef = ref<Object | null>(null);
|
||||
const titleRef = ref<Object | null>(null);
|
||||
const descriptionRef = ref<Object | null>(null);
|
||||
const dateReceivedRef = ref<Object | null>();
|
||||
const dateConsiderationRef = ref<Object | null>(null);
|
||||
const offenseDetailsRef = ref<Object | null>(null);
|
||||
const levelConsiderationRef = ref<Object | null>(null);
|
||||
const dateNotificationRef = ref<Object | null>(null);
|
||||
const complaintFromRef = ref<Object | null>(null);
|
||||
const appellantRef = ref<Object | null>(null);
|
||||
const resultRef = ref<Object | null>(null);
|
||||
|
||||
const isSave = ref<boolean>(false); // มีการแก้ไขรอบันทึก
|
||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||
const fileList = ref<ArrayFileList[]>([]);
|
||||
|
|
@ -98,18 +85,11 @@ const formData = reactive<FormData>({
|
|||
result: "",
|
||||
persons: [],
|
||||
disciplineComplaintDocs: fileList.value ?? null,
|
||||
activeId: null,
|
||||
organization: "",
|
||||
consideredAgencyId: null,
|
||||
});
|
||||
|
||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||
const objectComplaintsRef: MyObjectComplaintsRef = {
|
||||
respondentType: respondentTypeRef,
|
||||
organizationId: organizationIdRef,
|
||||
consideredAgency: consideredAgencyRef,
|
||||
title: titleRef,
|
||||
dateReceived: dateReceivedRef,
|
||||
offenseDetails: offenseDetailsRef,
|
||||
};
|
||||
|
||||
/**
|
||||
* ฟังชั่นอัปโหลดไฟล์
|
||||
* @param documentFile ไฟล์ที่รับมา
|
||||
|
|
@ -143,31 +123,14 @@ function selectLevel(val: string) {
|
|||
}
|
||||
}
|
||||
|
||||
/** ฟังก์ชั่นตรวจสอบความถูกต้องของข้อมูลในฟอร์ม */
|
||||
function validateForm() {
|
||||
const hasError = [];
|
||||
for (const key in objectComplaintsRef) {
|
||||
if (Object.prototype.hasOwnProperty.call(objectComplaintsRef, key)) {
|
||||
const property = objectComplaintsRef[key];
|
||||
if (property.value && typeof property.value.validate === "function") {
|
||||
const isValid = property.value.validate();
|
||||
hasError.push(isValid);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hasError.every((result) => result === true)) {
|
||||
countNum.value = 1;
|
||||
onSubmit();
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
/** ฟังชั่น บันทึก */
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
if (mainStore.rowsAdd) {
|
||||
formData.persons = await mainStore.rowsAdd;
|
||||
}
|
||||
console.log("formData===>", formData);
|
||||
|
||||
await props.onSubmit(formData);
|
||||
isSave.value = false;
|
||||
});
|
||||
|
|
@ -224,7 +187,17 @@ watch(props.data, async () => {
|
|||
formData.id = props.data.id;
|
||||
formData.respondentType = props.data.respondentType;
|
||||
formData.organizationId = props.data.organizationId;
|
||||
formData.organization = props.data.organization;
|
||||
organization.value = {
|
||||
id: props.data.organizationId,
|
||||
name: props.data.organization,
|
||||
};
|
||||
formData.consideredAgency = props.data.consideredAgency;
|
||||
formData.consideredAgencyId = props.data.consideredAgencyId;
|
||||
consideredAgency.value = {
|
||||
id: props.data.consideredAgencyId,
|
||||
name: props.data.consideredAgency,
|
||||
};
|
||||
formData.title = props.data.title;
|
||||
formData.description = props.data.description;
|
||||
formData.dateReceived = props.data.dateReceived;
|
||||
|
|
@ -237,6 +210,7 @@ watch(props.data, async () => {
|
|||
formData.status = props.data.status;
|
||||
formData.result = props.data.result;
|
||||
formData.persons = mainStore.rowsAdd;
|
||||
formData.activeId = props.data.activeId ? props.data.activeId : null;
|
||||
} else if (countNum.value === 2) {
|
||||
fileList.value = props.data.disciplineComplaintDocs;
|
||||
}
|
||||
|
|
@ -285,12 +259,52 @@ async function addPerson(data: any) {
|
|||
await mainStore.fetchData(data);
|
||||
}
|
||||
|
||||
/** ดึงข้อมูล active */
|
||||
async function getActive() {
|
||||
if (!formData.activeId) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.activeOrganization)
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
formData.activeId = data.activeId;
|
||||
getOc(data.activeId);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
} else {
|
||||
getOc(formData.activeId);
|
||||
}
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลหน่วยงานจาก api */
|
||||
function getOc() {
|
||||
http.get(config.API.typeOc()).then((res) => {
|
||||
const data = res.data.result;
|
||||
complainstStore.ocListFn(data);
|
||||
});
|
||||
async function getOc(activeId: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.orgByid(activeId))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result.map((item: any) => ({
|
||||
organizationId: item.orgTreeId,
|
||||
organizationName: item.orgName,
|
||||
}));
|
||||
complainstStore.ocListFn(data);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
|
||||
// http.get(config.API.typeOc()).then((res) => {
|
||||
// const data = res.data.result;
|
||||
// complainstStore.ocListFn(data);
|
||||
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -317,6 +331,14 @@ function getListChannel() {
|
|||
/** ฟังก์ชั่นเช็คการแก้ไขฟอร์มแล้วไม่ได้กดบันทึก */
|
||||
function changeFormData() {
|
||||
isSave.value = props.data != null ?? true;
|
||||
if (organization.value) {
|
||||
formData.organizationId = organization.value.id;
|
||||
formData.organization = organization.value.name;
|
||||
}
|
||||
if (consideredAgency.value) {
|
||||
formData.consideredAgencyId = consideredAgency.value.id;
|
||||
formData.consideredAgency = consideredAgency.value.name;
|
||||
}
|
||||
}
|
||||
|
||||
/** เปลี่ยนสี เมื่อ readonly
|
||||
|
|
@ -350,7 +372,8 @@ function updatemodalPersonal(modal: boolean) {
|
|||
onMounted(() => {
|
||||
mainStore.rowsAdd = [];
|
||||
getListChannel();
|
||||
getOc();
|
||||
|
||||
getActive();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -369,7 +392,12 @@ onMounted(() => {
|
|||
<q-separator />
|
||||
</div>
|
||||
|
||||
<form @submit.prevent="validateForm" class="col-12 row">
|
||||
<q-form
|
||||
greedy
|
||||
@submit.prevent
|
||||
@validation-success="onSubmit"
|
||||
class="col-12 row"
|
||||
>
|
||||
<div class="col-12 row">
|
||||
<div class="col-sm-12 col-md-9 row no-wrap">
|
||||
<div class="col-12 row q-pl-md q-py-md">
|
||||
|
|
@ -423,12 +451,13 @@ onMounted(() => {
|
|||
outlined
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
v-model="formData.organizationId"
|
||||
v-model="organization"
|
||||
:options="complainstStore.organizationIdOp"
|
||||
label="เลือกสำนักงาน"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
|
||||
label="หน่วยงานที่ถูกร้องเรียน"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณาเลือกหน่วยงานที่ถูกร้องเรียน'}`,
|
||||
]"
|
||||
@update:model-value="changeFormData()"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -440,14 +469,13 @@ onMounted(() => {
|
|||
for="selectAgency"
|
||||
dense
|
||||
outlined
|
||||
v-model="formData.consideredAgency"
|
||||
v-model="consideredAgency"
|
||||
:options="complainstStore.consideredAgencytoptions"
|
||||
label="หน่วยงานที่พิจารณา"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
:readonly="isReadonly"
|
||||
hide-bottom-space
|
||||
emit-value
|
||||
map-options
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกหน่วยงาน'}`]"
|
||||
use-input
|
||||
|
|
@ -456,13 +484,6 @@ onMounted(() => {
|
|||
)"
|
||||
@update:model-value="changeFormData()"
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
|
||||
|
|
@ -1010,7 +1031,7 @@ onMounted(() => {
|
|||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</q-form>
|
||||
</div>
|
||||
|
||||
<!-- Popup ผู้ถูกร้องเรียน -->
|
||||
|
|
|
|||
|
|
@ -185,50 +185,7 @@ async function onSubmit(data: any) {
|
|||
// put
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.investigateById(id.value), {
|
||||
id: data.id,
|
||||
idComplaint: data.idComplaint,
|
||||
complaint: data.complaint,
|
||||
complaintdetail: data.complaintdetail,
|
||||
investigationDescription: data.investigationDescription,
|
||||
fault: data.fault,
|
||||
investigationDetailOther: data.investigationDetailOther,
|
||||
evidenceFiles: data.evidenceFiles,
|
||||
fileComplaint: data.fileComplaint,
|
||||
investigationExtendStatus: data.investigationExtendStatus,
|
||||
investigationDateStart: data.investigationDateStart,
|
||||
investigationDateEnd: data.investigationDateEnd,
|
||||
investigationDetail: data.investigationDetail,
|
||||
investigationDaysExtend: data.investigationDaysExtend,
|
||||
investigationStatusResult: data.investigationStatusResult,
|
||||
investigationCauseText: data.investigationCauseText,
|
||||
complaintStatus: data.complaintStatus,
|
||||
result: data.result,
|
||||
directors: data.directors,
|
||||
disciplineInvestigateDocs: data.disciplineInvestigateDocs,
|
||||
disciplineInvestigateRelevantDocs: data.disciplineInvestigateRelevantDocs,
|
||||
status: data.status,
|
||||
documentFile: data.documentFile,
|
||||
respondentType: data.respondentType,
|
||||
organizationId: data.organizationId,
|
||||
persons: data.persons.map((item: any) => ({
|
||||
personId: item.personId,
|
||||
idcard: item.idcard,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
name: item.name,
|
||||
posNo: item.posNo === "-" ? null : item.posNo,
|
||||
position: item.position,
|
||||
positionLevel: item.positionLevel,
|
||||
salary: item.salary === "-" ? null : item.salary,
|
||||
organization: item.organization,
|
||||
phone: item.phone === "-" ? null : item.phone,
|
||||
email: item.email,
|
||||
})),
|
||||
investigationExtendHistory: data.investigationExtendHistory,
|
||||
isDisciplinary: data.isDisciplinary,
|
||||
})
|
||||
.put(config.API.investigateById(id.value), data)
|
||||
.then((res) => {
|
||||
getData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
|
|||
|
|
@ -16,10 +16,7 @@ import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFact
|
|||
import DialogDuty from "@/modules/11_discipline/components/DialogDuty.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
import type {
|
||||
FormData,
|
||||
MyObjectInvestigateRef,
|
||||
} from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -68,21 +65,6 @@ const maxPage = ref<number>(1);
|
|||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
|
||||
/** ตัวแปร ref สำหรับแสดง validate */
|
||||
const complaintRef = ref<Object | null>(null);
|
||||
const complaintdetailRef = ref<Object | null>(null);
|
||||
const investigationDescriptionRef = ref<Object | null>(null);
|
||||
const faultRef = ref<Object | null>(null);
|
||||
const investigationDetailOtherRef = ref<Object | null>(null);
|
||||
const fileComplaintRef = ref<Object | null>(null);
|
||||
const extendStatusRef = ref<Object | null>(null);
|
||||
const dateRef = ref<Object | null>(null);
|
||||
const dateEndRef = ref<Object | null>(null);
|
||||
const investigationDetailRef = ref<Object | null>(null);
|
||||
const daysExtendRef = ref<Object | null>(null);
|
||||
const investigationStatusResultRef = ref<Object | null>(null);
|
||||
const investigationCauseTextRef = ref<Object | null>(null);
|
||||
const resultRef = ref<Object | null>(null);
|
||||
const investigationExtendStatus = ref<boolean>(false);
|
||||
|
||||
const isSave = ref<boolean>(false); // มีการแก้ไขรอบันทึก
|
||||
|
|
@ -161,18 +143,13 @@ const initialPagination = ref<any>({
|
|||
const calendarModal = ref<boolean>(false);
|
||||
const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
|
||||
|
||||
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
||||
function validateForm() {
|
||||
countNum.value = 1;
|
||||
onSubmit();
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นสำหรับบันทึกข้อมูล ระบบจะแสดง dialog ให้ยืนยันการบันทึก
|
||||
* หากยืนยันจะส่งข้อมูลไปบันทึกที่ api
|
||||
* หากยกเลิกจะกลับไปหน้าฟอร์ม
|
||||
*/
|
||||
function onSubmit() {
|
||||
countNum.value = 1;
|
||||
dialogConfirm($q, async () => {
|
||||
if (
|
||||
formData.investigationDateStart !== null &&
|
||||
|
|
@ -269,13 +246,33 @@ watch(props.data, async () => {
|
|||
lastName: person.lastName,
|
||||
position: person.position,
|
||||
positionLevel: person.positionLevel,
|
||||
salary: person.salary === null ? "-" : person.salary,
|
||||
salary: person.salary === null ? "" : person.salary,
|
||||
personId: person.personId,
|
||||
posNo: person.posNo === null ? "-" : person.posNo,
|
||||
organization: person.organization,
|
||||
isSend: person.isSend,
|
||||
isDisciplinary: person.isDisciplinary,
|
||||
isAncestorDNA: person.isAncestorDNA,
|
||||
root: person.root,
|
||||
rootId: person.rootId,
|
||||
rootShortName: person.rootShortName,
|
||||
child1: person.child1,
|
||||
child1Id: person.child1Id,
|
||||
child1ShortName: person.child1ShortName,
|
||||
child2: person.child2,
|
||||
child2Id: person.child2Id,
|
||||
child2ShortName: person.child2ShortName,
|
||||
child3: person.child3,
|
||||
child3Id: person.child3Id,
|
||||
child3ShortName: person.child3ShortName,
|
||||
child4: person.child4,
|
||||
child4Id: person.child4Id,
|
||||
child4ShortName: person.child4ShortName,
|
||||
posMasterNo: person.posMasterNo,
|
||||
posTypeId: person.posTypeId,
|
||||
posTypeName: person.posTypeName,
|
||||
posLevelId: person.posLevelId,
|
||||
posLevelName: person.posLevelName,
|
||||
}));
|
||||
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
||||
(item: any) => item.isDisciplinary === false && item.isSend === "NEW"
|
||||
|
|
@ -657,7 +654,12 @@ onMounted(async () => {
|
|||
</q-banner>
|
||||
<q-separator />
|
||||
</div>
|
||||
<form @submit.prevent="validateForm" class="col-12 row">
|
||||
<q-form
|
||||
greedy
|
||||
@submit.prevent
|
||||
@validation-success="onSubmit"
|
||||
class="col-12 row"
|
||||
>
|
||||
<div class="col-12 row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 row no-wrap">
|
||||
<div class="col-12 row q-pl-md q-py-md">
|
||||
|
|
@ -1595,7 +1597,7 @@ onMounted(async () => {
|
|||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</q-form>
|
||||
</div>
|
||||
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
|||
persons: [],
|
||||
investigationExtendHistory: [],
|
||||
isDisciplinary: false,
|
||||
isAncestorDNA:false
|
||||
isAncestorDNA: false,
|
||||
});
|
||||
|
||||
/** function fetchData สอบสวนความผิดทางวินัย*/
|
||||
|
|
@ -223,47 +223,7 @@ async function fetchDetailComplaints() {
|
|||
async function onSubmitDisciplinary(data: any) {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.disciplineDisciplinaryById(id.value), {
|
||||
respondentType:data.respondentType ,
|
||||
organizationId:data.organizationId ,
|
||||
disciplinaryDateAllegation:data.disciplinaryDateAllegation ,
|
||||
disciplinaryDateEvident:data.disciplinaryDateEvident ,
|
||||
disciplinaryCaseFault:data.disciplinaryCaseFault ,
|
||||
disciplinaryInvestigateAt:data.disciplinaryInvestigateAt ,
|
||||
disciplinaryFaultLevel:data.disciplinaryFaultLevel ,
|
||||
disciplinaryRefLaw:data.disciplinaryRefLaw ,
|
||||
disciplinarySummaryEvidence:data.disciplinarySummaryEvidence ,
|
||||
disciplinaryRecordAccuser:data.disciplinaryRecordAccuser ,
|
||||
disciplinaryWitnesses:data.disciplinaryWitnesses ,
|
||||
result:data.result ,
|
||||
directors: data.directors,
|
||||
persons: data.persons.map((item: any) => (
|
||||
{
|
||||
id:item.id ,
|
||||
idcard:item.idcard ,
|
||||
name:item.name ,
|
||||
prefix:item.prefix ,
|
||||
firstName:item.firstName ,
|
||||
lastName:item.lastName ,
|
||||
position:item.position === "-" ? null:item.position,
|
||||
positionLevel:item.positionLevel === "-" ? null:item.positionLevel,
|
||||
salary:item.salary === "-" ? null:item.salary,
|
||||
personId:item.personId ,
|
||||
posNo:item.posNo === "-" ? null:item.posNo,
|
||||
organization:item.organization ,
|
||||
})),
|
||||
extendStatus:data.extendStatus ,
|
||||
disciplinaryDateStart:data.disciplinaryDateStart ,
|
||||
disciplinaryDateEnd:data.disciplinaryDateEnd ,
|
||||
daysExtend:data.daysExtend ,
|
||||
disciplinaryDateInvestigation:data.disciplinaryDateInvestigation ,
|
||||
disciplinaryDateResult:data.disciplinaryDateResult ,
|
||||
disciplinaryStatusResult:data.disciplinaryStatusResult ,
|
||||
disciplinaryCauseText:data.disciplinaryCauseText ,
|
||||
disciplinaryResult:data.disciplinaryResult ,
|
||||
disciplinaryExtendHistory:data.disciplinaryExtendHistory ,
|
||||
disciplinaryFaultLevelOther:data.disciplinaryFaultLevelOther ,
|
||||
})
|
||||
.put(config.API.disciplineDisciplinaryById(id.value), data)
|
||||
.then(async () => {
|
||||
await fetchDetailDisciplinary();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
|
|||
|
|
@ -121,42 +121,6 @@ const disciplineDisciplinary_DocRecordAccusers = ref<FileLists[]>([]);
|
|||
const disciplineDisciplinary_DocWitnessess = ref<FileLists[]>([]);
|
||||
const disciplineDisciplinary_DocOthers = ref<FileLists[]>([]);
|
||||
|
||||
/** ตัวแปร ref สำหรับแสดง validate */
|
||||
const respondentTypeRef = ref<Object | null>(null);
|
||||
const organizationIdRef = ref<Object | null>(null);
|
||||
const consideredAgencyRef = ref<Object | null>(null);
|
||||
const disciplinaryDateAllegationRef = ref<Object | null>(null);
|
||||
const disciplinaryDateEvidentRef = ref<Object | null>(null);
|
||||
const disciplinaryCaseFaultRef = ref<Object | null>(null);
|
||||
const disciplinaryInvestigateAtRef = ref<Object | null>(null);
|
||||
const disciplinaryFaultLevelRef = ref<Object | null>(null);
|
||||
const disciplinaryRefLawRef = ref<Object | null>(null);
|
||||
const disciplinarySummaryEvidenceRef = ref<Object | null>(null);
|
||||
const disciplinaryRecordAccuserRef = ref<Object | null>(null);
|
||||
const disciplinaryWitnessesRef = ref<Object | null>(null);
|
||||
const resultRef = ref<Object | null>(null);
|
||||
const dateRef = ref<Object | null>(null);
|
||||
const dateEndRef = ref<Object | null>(null);
|
||||
const daysExtendRef = ref<Object | null>(null);
|
||||
const disciplinaryDateResultRef = ref<Object | null>(null);
|
||||
const disciplinaryStatusResultRef = ref<Object | null>(null);
|
||||
const disciplinaryCauseTextRef = ref<Object | null>(null);
|
||||
const disciplinaryResultRef = ref<Object | null>(null);
|
||||
|
||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||
const objectdisciplinary: DisciplinaryRef = {
|
||||
// respondentType: respondentTypeRef,
|
||||
// organizationId: organizationIdRef,
|
||||
// consideredAgency: consideredAgencyRef,
|
||||
// disciplinaryFaultLevel: disciplinaryFaultLevelRef,
|
||||
// date: dateRef,
|
||||
// dateEnd: dateEndRef,
|
||||
// daysExtend: daysExtendRef,
|
||||
// disciplinaryDateResult: disciplinaryDateResultRef,
|
||||
// disciplinaryStatusResult: disciplinaryStatusResultRef,
|
||||
// disciplinaryResult: disciplinaryResultRef,
|
||||
};
|
||||
|
||||
const initialPagination = ref<any>({
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
|
@ -206,24 +170,6 @@ function toggleModal() {
|
|||
modalPerson.value = !modalPerson.value;
|
||||
}
|
||||
|
||||
/** ฟังชั่นตรวจสอบความถูกต้องก่อน บันทึก */
|
||||
function validateForm() {
|
||||
const hasError = [];
|
||||
for (const key in objectdisciplinary) {
|
||||
if (Object.prototype.hasOwnProperty.call(objectdisciplinary, key)) {
|
||||
const property = objectdisciplinary[key];
|
||||
if (property.value && typeof property.value.validate === "function") {
|
||||
const isValid = property.value.validate();
|
||||
hasError.push(isValid);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hasError.every((result) => result === true)) {
|
||||
countNum.value = 1;
|
||||
onSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังชั้นคำนวณเวลาวันที่สิ้นสุดจาก วันที่สิ้นสุดการสอบสวน
|
||||
* @param val จำนวนวันที่ต้องการขยาย
|
||||
|
|
@ -338,6 +284,26 @@ async function fetchDatadetail() {
|
|||
isSuspend: person.isSuspend,
|
||||
status: person.status,
|
||||
statusDiscard: person.statusDiscard,
|
||||
root: person.root,
|
||||
rootId: person.rootId,
|
||||
rootShortName: person.rootShortName,
|
||||
child1: person.child1,
|
||||
child1Id: person.child1Id,
|
||||
child1ShortName: person.child1ShortName,
|
||||
child2: person.child2,
|
||||
child2Id: person.child2Id,
|
||||
child2ShortName: person.child2ShortName,
|
||||
child3: person.child3,
|
||||
child3Id: person.child3Id,
|
||||
child3ShortName: person.child3ShortName,
|
||||
child4: person.child4,
|
||||
child4Id: person.child4Id,
|
||||
child4ShortName: person.child4ShortName,
|
||||
posMasterNo: person.posMasterNo,
|
||||
posTypeId: person.posTypeId,
|
||||
posTypeName: person.posTypeName,
|
||||
posLevelId: person.posLevelId,
|
||||
posLevelName: person.posLevelName,
|
||||
}));
|
||||
|
||||
formData.disciplinaryStatusResult = props.data.disciplinaryStatusResult
|
||||
|
|
@ -357,7 +323,7 @@ async function fetchDatadetail() {
|
|||
position: person.position === null ? "-" : person.position,
|
||||
positionLevel:
|
||||
person.positionLevel === null ? "-" : person.positionLevel,
|
||||
salary: person.salary === null ? "-" : person.salary,
|
||||
salary: person.salary === null ? "" : person.salary,
|
||||
personId: person.personId,
|
||||
posNo: person.posNo === null ? "-" : person.posNo,
|
||||
organization: person.organization,
|
||||
|
|
@ -691,7 +657,12 @@ onMounted(async () => {
|
|||
</q-banner>
|
||||
</div>
|
||||
|
||||
<form @submit.prevent="validateForm" class="col-12 row">
|
||||
<q-form
|
||||
greedy
|
||||
@submit.prevent
|
||||
@validation-success="onSubmit"
|
||||
class="col-12 row"
|
||||
>
|
||||
<div class="row col-12">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 row no-wrap">
|
||||
<div class="col-12 row q-pl-md q-py-md">
|
||||
|
|
@ -1822,7 +1793,7 @@ onMounted(async () => {
|
|||
><q-tooltip>บับทึกข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
</form>
|
||||
</q-form>
|
||||
</div>
|
||||
|
||||
<DialogDuty
|
||||
|
|
|
|||
|
|
@ -397,7 +397,11 @@ function updatemodalPersonal(modal: boolean) {
|
|||
{{ props.row.organization }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'salary'">
|
||||
{{ props.row.salary.toLocaleString() }}
|
||||
{{
|
||||
props.row.salary
|
||||
? props.row.salary.toLocaleString()
|
||||
: ""
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { onMounted, ref, reactive } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
|
|
@ -55,6 +54,7 @@ const data = reactive<dataDetail>({
|
|||
organization: "",
|
||||
position: "",
|
||||
posNo: "",
|
||||
posTypeName: "",
|
||||
positionLevel: "",
|
||||
salary: 0,
|
||||
status: "",
|
||||
|
|
@ -65,6 +65,22 @@ const data = reactive<dataDetail>({
|
|||
offenseDetails: "",
|
||||
disciplinaryFaultLevel: "",
|
||||
disciplinaryCaseFault: "",
|
||||
child1: "",
|
||||
child1Id: null,
|
||||
child1ShortName: "",
|
||||
child2: "",
|
||||
child2Id: null,
|
||||
child2ShortName: "",
|
||||
child3: "",
|
||||
child3Id: null,
|
||||
child3ShortName: "",
|
||||
child4: "",
|
||||
child4Id: null,
|
||||
child4ShortName: "",
|
||||
root: "",
|
||||
rootId: null,
|
||||
rootShortName: "",
|
||||
positionType: "",
|
||||
});
|
||||
|
||||
/**นำข้อมูลจาก API มาแสดง */
|
||||
|
|
@ -87,6 +103,7 @@ async function getData() {
|
|||
data.position = dataGet.position;
|
||||
data.posNo = dataGet.posNo;
|
||||
data.positionLevel = dataGet.positionLevel;
|
||||
data.positionType = dataGet.positionType;
|
||||
data.salary = dataGet.salary;
|
||||
data.status = dataGet.status;
|
||||
data.descriptionSuspend = dataGet.descriptionSuspend
|
||||
|
|
@ -98,7 +115,22 @@ async function getData() {
|
|||
data.offenseDetails = dataGet.offenseDetails;
|
||||
data.disciplinaryFaultLevel = dataGet.disciplinaryFaultLevel;
|
||||
data.disciplinaryCaseFault = dataGet.disciplinaryCaseFault;
|
||||
getAvatar(dataGet.personId);
|
||||
data.child1 = dataGet.child1;
|
||||
data.child1Id = dataGet.child1Id;
|
||||
data.child1ShortName = dataGet.child1ShortName;
|
||||
data.child2 = dataGet.child2;
|
||||
data.child2Id = dataGet.child2Id;
|
||||
data.child2ShortName = dataGet.child2ShortName;
|
||||
data.child3 = dataGet.child3;
|
||||
data.child3Id = dataGet.child3Id;
|
||||
data.child3ShortName = dataGet.child3ShortName;
|
||||
data.child4 = dataGet.child4;
|
||||
data.child4Id = dataGet.child4Id;
|
||||
data.child4ShortName = dataGet.child4ShortName;
|
||||
data.root = dataGet.root;
|
||||
data.rootId = dataGet.rootId;
|
||||
data.rootShortName = dataGet.rootShortName;
|
||||
// getAvatar(dataGet.personId);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -136,24 +168,24 @@ async function clickCancel() {
|
|||
/**
|
||||
* ฟังก์ชั่น Save
|
||||
*/
|
||||
async function conditionSave() {
|
||||
if (myForm.value !== null) {
|
||||
myForm.value.validate().then((success) => {
|
||||
if (success) {
|
||||
dialogMessage(
|
||||
$q,
|
||||
"ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
|
||||
"mdi-help-circle-outline",
|
||||
"ตกลง",
|
||||
"public",
|
||||
async () => await saveData(),
|
||||
undefined
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// async function conditionSave() {
|
||||
// if (myForm.value !== null) {
|
||||
// myForm.value.validate().then((success) => {
|
||||
// if (success) {
|
||||
// dialogMessage(
|
||||
// $q,
|
||||
// "ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
// "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
|
||||
// "mdi-help-circle-outline",
|
||||
// "ตกลง",
|
||||
// "public",
|
||||
// async () => await saveData(),
|
||||
// undefined
|
||||
// );
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่น Saveจาก API
|
||||
|
|
@ -161,7 +193,7 @@ async function conditionSave() {
|
|||
async function saveData() {
|
||||
const body = {
|
||||
organization: data.organization,
|
||||
position: data.position,
|
||||
positionType: data.positionType,
|
||||
posNo: data.posNo,
|
||||
positionLevel: data.positionLevel,
|
||||
salary: data.salary,
|
||||
|
|
@ -295,48 +327,49 @@ onMounted(async () => {
|
|||
<CardProfile :data="dataProfile as DataProfile" />
|
||||
|
||||
<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 v-if="data.status !== 'DONE' && data.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"
|
||||
/>
|
||||
<q-form greedy @submit.prevent @validation-success="saveData">
|
||||
<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>
|
||||
<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="clickCancel"
|
||||
/>
|
||||
<q-space />
|
||||
<div v-if="data.status !== 'DONE' && data.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"
|
||||
type="submit"
|
||||
/>
|
||||
<q-btn
|
||||
outline
|
||||
color="red"
|
||||
dense
|
||||
class="q-px-sm"
|
||||
label="ยกเลิก"
|
||||
style="width: 80px"
|
||||
@click="clickCancel"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-form ref="myForm">
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
||||
<div class="row col-12 q-pa-md">
|
||||
<div class="col-12 row bg-white q-col-gutter-md">
|
||||
<div class="col-xs-6 col-sm-3 row">
|
||||
|
|
@ -348,7 +381,7 @@ onMounted(async () => {
|
|||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="data.position"
|
||||
v-model="data.positionType"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ประเภทตำแหน่ง'}`"
|
||||
|
|
@ -365,9 +398,9 @@ onMounted(async () => {
|
|||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="data.positionLevel"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ระดับ'}`"
|
||||
:label="`${'ระดับตำแหน่ง'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -389,13 +422,19 @@ onMounted(async () => {
|
|||
</div>
|
||||
<div class="col-xs-6 col-sm-3 row">
|
||||
<div class="col-12">
|
||||
<CurrencyInput
|
||||
<q-input
|
||||
v-model="data.salary"
|
||||
:edit="edit"
|
||||
:options="{
|
||||
currency: 'THB',
|
||||
}"
|
||||
:outlined="edit"
|
||||
dense
|
||||
:readonly="!edit"
|
||||
hide-bottom-space
|
||||
:borderless="!edit"
|
||||
:label="`${'เงินเดือน'}`"
|
||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
||||
lazy-rules
|
||||
mask="###,###,###,###"
|
||||
reverse-fill-mask
|
||||
class="inputgreen"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,68 +1,71 @@
|
|||
interface FormData {
|
||||
id:string
|
||||
respondentType: string
|
||||
consideredAgency: string
|
||||
title: string
|
||||
description: string
|
||||
dateReceived: Date | null
|
||||
dateConsideration: Date | null
|
||||
offenseDetails: string
|
||||
levelConsideration: string
|
||||
dateNotification: Date | null
|
||||
complaintFrom: string
|
||||
appellant: string
|
||||
documentFile: any | null
|
||||
status: string
|
||||
result: string
|
||||
persons: object|null
|
||||
organizationId:string|null
|
||||
disciplineComplaintDocs:object|null
|
||||
id: string;
|
||||
respondentType: string;
|
||||
consideredAgency: string;
|
||||
title: string;
|
||||
description: string;
|
||||
dateReceived: Date | null;
|
||||
dateConsideration: Date | null;
|
||||
offenseDetails: string;
|
||||
levelConsideration: string;
|
||||
dateNotification: Date | null;
|
||||
complaintFrom: string;
|
||||
appellant: string;
|
||||
documentFile: any | null;
|
||||
status: string;
|
||||
result: string;
|
||||
persons: object | null;
|
||||
organizationId: string | null;
|
||||
disciplineComplaintDocs: object | null;
|
||||
activeId?: string | null;
|
||||
organization?: string;
|
||||
consideredAgencyId?: string | null;
|
||||
}
|
||||
|
||||
interface ArrayPerson {
|
||||
id: string
|
||||
personId:string
|
||||
idcard:string
|
||||
name:string
|
||||
prefix:string
|
||||
firstName:string
|
||||
lastName:string
|
||||
posNo:string
|
||||
position:string
|
||||
positionLevel:string
|
||||
salary:number|null
|
||||
organization:string
|
||||
id: string;
|
||||
personId: string;
|
||||
idcard: string;
|
||||
name: string;
|
||||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
posNo: string;
|
||||
position: string;
|
||||
positionLevel: string;
|
||||
salary: number | null;
|
||||
organization: string;
|
||||
}
|
||||
|
||||
interface ArrayFileList {
|
||||
id:string
|
||||
pathName:string
|
||||
fileName:string
|
||||
id: string;
|
||||
pathName: string;
|
||||
fileName: string;
|
||||
}
|
||||
interface MyObjectComplaintsRef {
|
||||
respondentType: object | null;
|
||||
organizationId: object | null;
|
||||
consideredAgency: object | null;
|
||||
title: object | null;
|
||||
dateReceived: object | null;
|
||||
offenseDetails: object | null;
|
||||
[key: string]: any;
|
||||
respondentType: object | null;
|
||||
organizationId: object | null;
|
||||
consideredAgency: object | null;
|
||||
title: object | null;
|
||||
dateReceived: object | null;
|
||||
offenseDetails: object | null;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface DataAddRequest {
|
||||
id: string
|
||||
idcard: string
|
||||
name: string
|
||||
positionNo: string
|
||||
position: string
|
||||
positionLevel: string
|
||||
salary: string
|
||||
organization: string
|
||||
id: string;
|
||||
idcard: string;
|
||||
name: string;
|
||||
positionNo: string;
|
||||
position: string;
|
||||
positionLevel: string;
|
||||
salary: string;
|
||||
organization: string;
|
||||
}
|
||||
export type {
|
||||
FormData,
|
||||
MyObjectComplaintsRef,
|
||||
DataAddRequest,
|
||||
ArrayPerson,
|
||||
ArrayFileList
|
||||
}
|
||||
FormData,
|
||||
MyObjectComplaintsRef,
|
||||
DataAddRequest,
|
||||
ArrayPerson,
|
||||
ArrayFileList,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,6 +65,23 @@ interface dataDetail {
|
|||
offenseDetails: string;
|
||||
disciplinaryFaultLevel: string;
|
||||
disciplinaryCaseFault: string;
|
||||
posTypeName: string;
|
||||
child1: string;
|
||||
child1Id: string | null;
|
||||
child1ShortName: string;
|
||||
child2: string;
|
||||
child2Id: string | null;
|
||||
child2ShortName: string;
|
||||
child3: string;
|
||||
child3Id: string | null;
|
||||
child3ShortName: string;
|
||||
child4: string;
|
||||
child4Id: string | null;
|
||||
child4ShortName: string;
|
||||
root: string;
|
||||
rootId: string | null;
|
||||
rootShortName: string;
|
||||
positionType?: string;
|
||||
}
|
||||
|
||||
interface DataOption {
|
||||
|
|
|
|||
|
|
@ -302,10 +302,30 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
lastName: item.lastName,
|
||||
position: item.position,
|
||||
positionLevel: item.positionLevel,
|
||||
salary: item.salary === null ? "-" : item.salary,
|
||||
salary: item.salary === null ? "" : item.salary,
|
||||
personId: item.personId,
|
||||
posNo: item.posNo === null ? "-" : item.posNo,
|
||||
organization: item.organization,
|
||||
root: item.root,
|
||||
rootId: item.rootId,
|
||||
rootShortName: item.rootShortName,
|
||||
child1: item.child1,
|
||||
child1Id: item.child1Id,
|
||||
child1ShortName: item.child1ShortName,
|
||||
child2: item.child2,
|
||||
child2Id: item.child2Id,
|
||||
child2ShortName: item.child2ShortName,
|
||||
child3: item.child3,
|
||||
child3Id: item.child3Id,
|
||||
child3ShortName: item.child3ShortName,
|
||||
child4: item.child4,
|
||||
child4Id: item.child4Id,
|
||||
child4ShortName: item.child4ShortName,
|
||||
posMasterNo: item.posMasterNo,
|
||||
posTypeId: item.posTypeId,
|
||||
posTypeName: item.posTypeName,
|
||||
posLevelId: item.posLevelId,
|
||||
posLevelName: item.posLevelName,
|
||||
}));
|
||||
rowsAdd.value = dataList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
interface DataPersonReq {
|
||||
id: string;
|
||||
profileId?: string;
|
||||
type: string;
|
||||
amount: number;
|
||||
child1: string;
|
||||
|
|
@ -29,5 +30,7 @@ interface DataPersonReq {
|
|||
prefix: string;
|
||||
root: string;
|
||||
rootId: string;
|
||||
isSpecial?: boolean;
|
||||
rank?: string | null;
|
||||
}
|
||||
export type { DataPersonReq };
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ interface DataAgency {
|
|||
}
|
||||
|
||||
interface DataPerson {
|
||||
id?: string;
|
||||
amount: number;
|
||||
child1: string;
|
||||
child1Id: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue