no message
This commit is contained in:
parent
dc05b4740c
commit
cf343f7b8f
19 changed files with 2595 additions and 2416 deletions
|
|
@ -939,41 +939,43 @@ const fetchInsignia = async () => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.profileInsignId(profileId.value))
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
rows.value = [];
|
||||
data.map((e: ResponseObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
insignia: e.insignia,
|
||||
insigniaId: e.insigniaId,
|
||||
insigniaType: e.insigniaType,
|
||||
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: new Date(e.dateAnnounce),
|
||||
refCommandNo: e.refCommandNo,
|
||||
refCommandDate:
|
||||
e.refCommandDate == null ? null : new Date(e.refCommandDate),
|
||||
createdFullName: e.createdFullName,
|
||||
createdAt: new Date(e.createdAt),
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.profileInsignId(profileId.value))
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
rows.value = [];
|
||||
data.map((e: ResponseObject) => {
|
||||
rows.value.push({
|
||||
id: e.id,
|
||||
insignia: e.insignia,
|
||||
insigniaId: e.insigniaId,
|
||||
insigniaType: e.insigniaType,
|
||||
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: new Date(e.dateAnnounce),
|
||||
refCommandNo: e.refCommandNo,
|
||||
refCommandDate:
|
||||
e.refCommandDate == null ? null : new Date(e.refCommandDate),
|
||||
createdFullName: e.createdFullName,
|
||||
createdAt: new Date(e.createdAt),
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1068,35 +1070,37 @@ const clickSave = async () => {
|
|||
* บันทึกเพิ่มข้อมูล
|
||||
*/
|
||||
const saveData = async () => {
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.profileInsignId(profileId.value), {
|
||||
id: id.value,
|
||||
insigniaId: insigniaId.value,
|
||||
insigniaType: insigniaType.value,
|
||||
year: year.value,
|
||||
no: no.value,
|
||||
issue: issue.value,
|
||||
volumeNo: volumeNo.value,
|
||||
volume: volume.value,
|
||||
section: section.value,
|
||||
page: page.value,
|
||||
receiveDate: dateToISO(receiveDate.value),
|
||||
dateAnnounce: dateToISO(dateAnnounce.value),
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
modal.value = false;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
});
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.profileInsignId(profileId.value), {
|
||||
id: id.value,
|
||||
insigniaId: insigniaId.value,
|
||||
insigniaType: insigniaType.value,
|
||||
year: year.value,
|
||||
no: no.value,
|
||||
issue: issue.value,
|
||||
volumeNo: volumeNo.value,
|
||||
volume: volume.value,
|
||||
section: section.value,
|
||||
page: page.value,
|
||||
receiveDate: dateToISO(receiveDate.value),
|
||||
dateAnnounce: dateToISO(dateAnnounce.value),
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
modal.value = false;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue