fixing ระบบวินัย
This commit is contained in:
parent
e9ee7e7f40
commit
ba728ea000
16 changed files with 391 additions and 442 deletions
|
|
@ -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>
|
||||
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue