แก้วินัย
This commit is contained in:
parent
015d2d9857
commit
3c2a010ab4
24 changed files with 286 additions and 93 deletions
|
|
@ -240,32 +240,29 @@ async function calEndDate(val: string) {
|
|||
* หากยกเลิกจะกลับไปหน้าฟอร์ม
|
||||
*/
|
||||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
if (
|
||||
formData.disciplinaryDateStart !== null &&
|
||||
formData.disciplinaryDateEnd !== null
|
||||
) {
|
||||
const disciplinaryDateStart = new Date(formData.disciplinaryDateStart);
|
||||
const disciplinaryDateEnd = new Date(formData.disciplinaryDateEnd);
|
||||
dialogConfirm($q, async () => {
|
||||
if (
|
||||
formData.disciplinaryDateStart !== null &&
|
||||
formData.disciplinaryDateEnd !== null
|
||||
) {
|
||||
const disciplinaryDateStart = new Date(formData.disciplinaryDateStart);
|
||||
const disciplinaryDateEnd = new Date(formData.disciplinaryDateEnd);
|
||||
|
||||
formData.disciplinaryDateStart = moment(disciplinaryDateStart).format(
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
formData.disciplinaryDateEnd =
|
||||
moment(disciplinaryDateEnd).format("YYYY-MM-DD");
|
||||
}
|
||||
|
||||
if (mainStore.rowsAdd) {
|
||||
formData.persons = mainStore.rowsAdd;
|
||||
}
|
||||
|
||||
emit("submit:disciplinary", formData);
|
||||
isSave.value = false;
|
||||
extendStatus.value = false;
|
||||
formData.disciplinaryDateStart = moment(disciplinaryDateStart).format(
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
formData.disciplinaryDateEnd =
|
||||
moment(disciplinaryDateEnd).format("YYYY-MM-DD");
|
||||
}
|
||||
);
|
||||
|
||||
if (mainStore.rowsAdd) {
|
||||
formData.persons = mainStore.rowsAdd;
|
||||
}
|
||||
|
||||
emit("submit:disciplinary", formData);
|
||||
isSave.value = false;
|
||||
extendStatus.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** ฟังชั่นลบข้อมูลกรรมการ */
|
||||
|
|
@ -321,14 +318,48 @@ async function fetchDatadetail() {
|
|||
disciplineDisciplinary_DocRelevants.value =
|
||||
props.data.disciplineDisciplinary_DocRelevants;
|
||||
|
||||
investigateDis.rowSent = formData.persons;
|
||||
investigateDis.rowSent = formData.persons.map((person: any) => ({
|
||||
id: person.id,
|
||||
idcard: person.idcard,
|
||||
name: person.name,
|
||||
prefix: person.prefix,
|
||||
firstName: person.firstName,
|
||||
lastName: person.lastName,
|
||||
position: person.position === null ? '-':person.position,
|
||||
positionLevel: person.positionLevel === null ? '-':person.positionLevel,
|
||||
salary: person.salary === null ? '-':person.salary,
|
||||
personId: person.personId,
|
||||
posNo: person.posNo === null ? '-':person.posNo,
|
||||
organization: person.organization,
|
||||
isSend: person.isSend,
|
||||
isSuspend: person.isSuspend,
|
||||
status: person.status,
|
||||
statusDiscard: person.statusDiscard,
|
||||
}));
|
||||
|
||||
formData.disciplinaryStatusResult = props.data.disciplinaryStatusResult;
|
||||
formData.disciplinaryCauseText = props.data.disciplinaryCauseText;
|
||||
formData.disciplinaryResult = props.data.disciplinaryResult;
|
||||
formData.disciplinaryExtendHistory = props.data.disciplinaryExtendHistory;
|
||||
|
||||
mainStore.rowsAdd = props.data.persons;
|
||||
mainStore.rowsAdd = props.data.persons.map((person: any) => ({
|
||||
id: person.id,
|
||||
idcard: person.idcard,
|
||||
name: person.name,
|
||||
prefix: person.prefix,
|
||||
firstName: person.firstName,
|
||||
lastName: person.lastName,
|
||||
position: person.position === null ? '-':person.position,
|
||||
positionLevel: person.positionLevel === null ? '-':person.positionLevel,
|
||||
salary: person.salary === null ? '-':person.salary,
|
||||
personId: person.personId,
|
||||
posNo: person.posNo === null ? '-':person.posNo,
|
||||
organization: person.organization,
|
||||
isSend: person.isSend,
|
||||
isSuspend: person.isSuspend,
|
||||
status: person.status,
|
||||
statusDiscard: person.statusDiscard,
|
||||
}));
|
||||
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
||||
(item: any) => item.isSuspend === "NEW" && item.isSend === "NEW"
|
||||
);
|
||||
|
|
@ -372,12 +403,10 @@ async function fetchDatadetail() {
|
|||
|
||||
function returnCount(num: number) {
|
||||
countNum.value = num;
|
||||
console.log(countNum.value);
|
||||
}
|
||||
|
||||
async function addPerson(data: any) {
|
||||
await mainStore.fetchData(data);
|
||||
toggleModal();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -566,7 +595,6 @@ function emitPerson(data: PersonsArray[]) {
|
|||
}
|
||||
|
||||
function openEditDirector(data: any) {
|
||||
console.log(data);
|
||||
editDirectorId.value = data.idRaw;
|
||||
modalEditDirector.value = true;
|
||||
dutyVal.value = data.duty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue