ปรับทะเบียนประวัติ
This commit is contained in:
parent
31296b343c
commit
e26b83f0bb
5 changed files with 76 additions and 46 deletions
|
|
@ -25,11 +25,12 @@
|
|||
@click="selectData(props)"
|
||||
class="cursor-pointer"
|
||||
>
|
||||
<div
|
||||
v-if="col.name == 'issueDate' || col.name == 'refCommandDate'"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
||||
<div v-if="col.name == 'issueDate'" class="table_ellipsis">
|
||||
{{
|
||||
props.row.isDate == "true"
|
||||
? date2Thai(props.row.issueDate2)
|
||||
: col.value + 543
|
||||
}}
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
|
|
@ -89,7 +90,6 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
|
||||
<datepicker
|
||||
v-if="isDate === 'false'"
|
||||
menu-class-name="modalfix"
|
||||
|
|
@ -573,6 +573,7 @@ const fetchData = async () => {
|
|||
id: e.id,
|
||||
issuer: e.issuer,
|
||||
detail: e.detail,
|
||||
isDate: e.isDate == null ? null : e.isDate.toString(),
|
||||
issueDate: new Date(e.issueDate).getFullYear(),
|
||||
issueDate2: new Date(e.issueDate),
|
||||
refCommandNo: e.refCommandNo == "" ? "-" : e.refCommandNo,
|
||||
|
|
@ -619,6 +620,7 @@ const getData = () => {
|
|||
const row = rows.value[rowIndex.value];
|
||||
issuer.value = row.issuer;
|
||||
detail.value = row.detail;
|
||||
isDate.value = row.isDate;
|
||||
issueDate.value = row.issueDate;
|
||||
issueDate2.value = row.issueDate2;
|
||||
refCommandNo.value = row.refCommandNo;
|
||||
|
|
@ -684,6 +686,7 @@ const saveData = async () => {
|
|||
id: id.value,
|
||||
issuer: issuer.value,
|
||||
detail: detail.value,
|
||||
isDate: isDate.value == "true" ? true : false,
|
||||
issueDate:
|
||||
isDate.value == "true"
|
||||
? dateToISO(issueDate2.value)
|
||||
|
|
@ -717,6 +720,7 @@ const editData = async () => {
|
|||
id: id.value,
|
||||
issuer: issuer.value,
|
||||
detail: detail.value,
|
||||
isDate: isDate.value == "true" ? true : false,
|
||||
issueDate:
|
||||
isDate.value == "true"
|
||||
? dateToISO(issueDate2.value)
|
||||
|
|
@ -806,8 +810,11 @@ const selectData = async (props: DataProps) => {
|
|||
issuer.value = props.row.issuer;
|
||||
detail.value = props.row.detail;
|
||||
issueDate.value = props.row.issueDate;
|
||||
isDate.value = props.row.isDate;
|
||||
issueDate2.value = props.row.issueDate2;
|
||||
refCommandNo.value = props.row.refCommandNo;
|
||||
refCommandDate.value = props.row.refCommandDate == '-' ? null:props.row.refCommandDate;
|
||||
refCommandDate.value =
|
||||
props.row.refCommandDate == "-" ? null : props.row.refCommandDate;
|
||||
id.value = props.row.id;
|
||||
await checkRowPage();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1141,16 +1141,16 @@ const fetchData = async () => {
|
|||
id: e.id,
|
||||
level: e.educationLevel,
|
||||
levelId: e.educationLevelId,
|
||||
positionPath: e.positionPath ? e.positionPath : "-",
|
||||
positionPath: e.positionPath,
|
||||
isEducation: e.isEducation,
|
||||
institute: e.institute ? e.institute : "-",
|
||||
degree: e.degree ? e.degree : "-",
|
||||
field: e.field ? e.field : "-",
|
||||
gpa: e.gpa ? e.gpa : "-",
|
||||
country: e.country ? e.country : "-",
|
||||
duration: e.duration ? e.duration : "-",
|
||||
institute: e.institute,
|
||||
degree: e.degree,
|
||||
field: e.field,
|
||||
gpa: e.gpa,
|
||||
country: e.country,
|
||||
duration: e.duration,
|
||||
durationYear: e.durationYear,
|
||||
other: e.other ? e.other : "-",
|
||||
other: e.other,
|
||||
fundName: e.fundName,
|
||||
isDate: e.isDate == null ? null : e.isDate.toString(),
|
||||
finishDate: e.finishDate ? new Date(e.finishDate) : null,
|
||||
|
|
|
|||
|
|
@ -526,9 +526,9 @@ const volume = ref<string>();
|
|||
const section = ref<string>();
|
||||
const page = ref<string>();
|
||||
const receiveDate = ref<Date>(new Date());
|
||||
const dateAnnounce = ref<Date | null|string>(null);
|
||||
const dateAnnounce = ref<Date | null | string>(null);
|
||||
const refCommandNo = ref<string>();
|
||||
const refCommandDate = ref<Date | null|string>(new Date());
|
||||
const refCommandDate = ref<Date | null | string>(new Date());
|
||||
const myForm = ref<any>(); //form data input
|
||||
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
||||
const modal = ref<boolean>(false); //modal add detail
|
||||
|
|
@ -969,17 +969,17 @@ const fetchData = async () => {
|
|||
insignia: e.insignia == null ? null : e.insignia.name,
|
||||
insigniaId: e.insignia == null ? null : e.insignia.id,
|
||||
insigniaType: e.insigniaType,
|
||||
year: e.year ? e.year : "-",
|
||||
no: e.no ? e.no : "-",
|
||||
issue: e.issue ? e.issue : "-",
|
||||
volumeNo: e.volumeNo ? e.volumeNo : "-",
|
||||
volume: e.volume ? e.volume : "-",
|
||||
section: e.section ? e.section : "-",
|
||||
page: e.page ? e.page : "-",
|
||||
year: e.year,
|
||||
no: e.no,
|
||||
issue: e.issue,
|
||||
volumeNo: e.volumeNo,
|
||||
volume: e.volume,
|
||||
section: e.section,
|
||||
page: e.page,
|
||||
receiveDate: new Date(e.receiveDate),
|
||||
dateAnnounce: e.dateAnnounce ? new Date(e.dateAnnounce) : "-",
|
||||
refCommandNo: e.refCommandNo ? e.refCommandNo : "-",
|
||||
refCommandDate: e.refCommandDate ? new Date(e.refCommandDate) : "-",
|
||||
dateAnnounce: e.dateAnnounce,
|
||||
refCommandNo: e.refCommandNo,
|
||||
refCommandDate: e.refCommandDate,
|
||||
createdFullName: e.createdFullName,
|
||||
createdAt: new Date(e.createdAt),
|
||||
});
|
||||
|
|
@ -1102,10 +1102,14 @@ const saveData = async () => {
|
|||
section: section.value,
|
||||
page: page.value,
|
||||
receiveDate: dateToISO(receiveDate.value),
|
||||
dateAnnounce: dateAnnounce.value ? dateToISO(dateAnnounce.value as Date) : null,
|
||||
dateAnnounce: dateAnnounce.value
|
||||
? dateToISO(dateAnnounce.value as Date)
|
||||
: null,
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
||||
refCommandDate.value == null
|
||||
? null
|
||||
: dateToISO(refCommandDate.value as Date),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -1138,10 +1142,14 @@ const editData = async () => {
|
|||
section: section.value,
|
||||
page: page.value,
|
||||
receiveDate: dateToISO(receiveDate.value),
|
||||
dateAnnounce: dateAnnounce.value ? dateToISO(dateAnnounce.value as Date) : null,
|
||||
dateAnnounce: dateAnnounce.value
|
||||
? dateToISO(dateAnnounce.value as Date)
|
||||
: null,
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
||||
refCommandDate.value == null
|
||||
? null
|
||||
: dateToISO(refCommandDate.value as Date),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -1229,9 +1237,11 @@ const selectData = async (props: DataProps) => {
|
|||
section.value = props.row.section;
|
||||
page.value = props.row.page;
|
||||
receiveDate.value = props.row.receiveDate;
|
||||
dateAnnounce.value = props.row.dateAnnounce == '-' ? null:props.row.dateAnnounce;
|
||||
dateAnnounce.value =
|
||||
props.row.dateAnnounce == "-" ? null : props.row.dateAnnounce;
|
||||
refCommandNo.value = props.row.refCommandNo;
|
||||
refCommandDate.value = props.row.refCommandDate == '-'? null:props.row.refCommandDate;
|
||||
refCommandDate.value =
|
||||
props.row.refCommandDate == "-" ? null : props.row.refCommandDate;
|
||||
id.value = props.row.id;
|
||||
await checkRowPage();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1157,13 +1157,13 @@ const clickSave = async () => {
|
|||
myFormAdd.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
if (modalEdit.value) {
|
||||
await dialogConfirm($q, () => {
|
||||
// await dialogConfirm($q, () => {
|
||||
editData();
|
||||
});
|
||||
// });
|
||||
} else {
|
||||
await dialogConfirm($q, () => {
|
||||
// await dialogConfirm($q, () => {
|
||||
saveData();
|
||||
});
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -23,18 +23,26 @@
|
|||
@click="selectData(props)"
|
||||
class="cursor-pointer"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
col.name == 'startDate' ||
|
||||
col.name == 'endDate' ||
|
||||
col.name == 'dateOrder'
|
||||
"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
<div v-if="col.name == 'startDate'" class="table_ellipsis">
|
||||
{{
|
||||
props.row.isDate == "true"
|
||||
? date2Thai(props.row.startDate2)
|
||||
: col.value + 543
|
||||
}}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'endDate'" class="table_ellipsis">
|
||||
{{
|
||||
props.row.isDate == "true"
|
||||
? date2Thai(props.row.endDate2)
|
||||
: col.value + 543
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'dateOrder'" class="table_ellipsis">
|
||||
{{ date2Thai(col.value) }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'yearly'" class="table_ellipsis">
|
||||
{{ col.value + 543 }}
|
||||
{{ col.value ? col.value + 543 : "" }}
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value }}
|
||||
|
|
@ -958,6 +966,7 @@ const getData = () => {
|
|||
department.value = row.department;
|
||||
numberOrder.value = row.numberOrder;
|
||||
dateOrder.value = row.dateOrder;
|
||||
isDate.value = row.isDate;
|
||||
startDate.value = row.startDate;
|
||||
endDate.value = row.endDate;
|
||||
startDate2.value = row.startDate2;
|
||||
|
|
@ -1029,6 +1038,7 @@ const saveData = async () => {
|
|||
department: department.value,
|
||||
numberOrder: numberOrder.value,
|
||||
dateOrder: dateOrder.value,
|
||||
isDate: isDate.value == "true" ? true : false,
|
||||
startDate:
|
||||
isDate.value == "true"
|
||||
? dateToISO(startDate2.value)
|
||||
|
|
@ -1161,8 +1171,11 @@ const selectData = async (props: DataProps) => {
|
|||
department.value = props.row.department;
|
||||
numberOrder.value = props.row.numberOrder;
|
||||
dateOrder.value = props.row.dateOrder;
|
||||
isDate.value = props.row.isDate;
|
||||
startDate.value = props.row.startDate;
|
||||
endDate.value = props.row.endDate;
|
||||
startDate2.value = props.row.startDate2;
|
||||
endDate2.value = props.row.endDate2;
|
||||
id.value = props.row.id;
|
||||
await checkRowPage();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue