ยืม-คืนเครื่องราชฯ
This commit is contained in:
parent
a6df50d483
commit
b7ed1e659f
2 changed files with 51 additions and 25 deletions
|
|
@ -69,31 +69,31 @@ export const useBrrowDataStore = defineStore("insigniaBrrow", () => {
|
|||
rows.value = [];
|
||||
let list = await data.map((e: any) => ({
|
||||
id: e.id,
|
||||
citizenId: e.citizenId,
|
||||
prefix: e.prefix,
|
||||
position: e.position,
|
||||
status: status(e.status),
|
||||
name: e.fullName,
|
||||
citizenId: e.citizenId ? e.citizenId : "-",
|
||||
prefix: e.prefix ? e.prefix : "",
|
||||
position: e.position ? e.position : "-",
|
||||
status: e.status ? status(e.status) : "-",
|
||||
name: e.fullName ? e.fullName : "-",
|
||||
type: `${e.requestInsignia} (${
|
||||
type.value.find((item) => item.name === e.requestInsignia)?.shortName ||
|
||||
""
|
||||
"-"
|
||||
})`,
|
||||
requestInsigniaId: e.requestInsigniaId,
|
||||
employeeType: profileType(e.profileType),
|
||||
profileType: e.profileType,
|
||||
dateReceive: date2Thai(e.dateReceive),
|
||||
date: date2Thai(e.date),
|
||||
volumeNo: e.volumeNo,
|
||||
section: e.section,
|
||||
page: e.page,
|
||||
number: e.no,
|
||||
vatnumber: e.number,
|
||||
datepay: date2Thai(e.datePayment),
|
||||
typepay: e.typePayment,
|
||||
address: e.address,
|
||||
borrowOrganization: e.borrowOrganization,
|
||||
requestInsigniaId: e.requestInsigniaId ? e.requestInsigniaId : "-",
|
||||
employeeType: e.profileType ? profileType(e.profileType) : "-",
|
||||
profileType: e.profileType ? e.profileType : "-",
|
||||
dateReceive: e.dateReceive ? date2Thai(e.dateReceive) : "-",
|
||||
date: e.date ? date2Thai(e.date) : "-",
|
||||
volumeNo: e.volumeNo ? e.volumeNo : "-",
|
||||
section: e.section ? e.section : "-",
|
||||
page: e.page ? e.page : "-",
|
||||
number: e.no ? e.no : "-",
|
||||
vatnumber: e.number ? e.number : "-",
|
||||
datepay: e.datePayment ? date2Thai(e.datePayment) : "-",
|
||||
typepay: e.typePayment ? e.typePayment : "-",
|
||||
address: e.address ? e.address : "-",
|
||||
borrowOrganization: e.borrowOrganization ? e.borrowOrganization : "-",
|
||||
borrowDate: e.borrowDate !== null ? date2Thai(e.borrowDate) : "-",
|
||||
returnOrganization: e.returnOrganization,
|
||||
returnOrganization: e.returnOrganization ? e.returnOrganization : "-",
|
||||
returnDate: e.returnDate !== null ? date2Thai(e.returnDate) : "-",
|
||||
returnReason: e.returnReason !== null ? e.returnReason : "-",
|
||||
}));
|
||||
|
|
@ -148,11 +148,14 @@ export const useBrrowDataStore = defineStore("insigniaBrrow", () => {
|
|||
* @param val สถานภาพ
|
||||
*/
|
||||
function profileType(val: string) {
|
||||
switch (val) {
|
||||
const newVal = val.toLocaleLowerCase();
|
||||
switch (newVal) {
|
||||
case "officer":
|
||||
return "ข้าราชการ กทม.สามัญ";
|
||||
case "employee":
|
||||
return "ลูกจ้างประจำ";
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue