แก้เครื่องราชฯ>>จัดการคำขอ (แสดงเลข 000)
This commit is contained in:
parent
48f10f992d
commit
206acc18c3
5 changed files with 142 additions and 136 deletions
|
|
@ -53,9 +53,21 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
|||
level: e.rank,
|
||||
salary: e.salary,
|
||||
salary2: Number(e.salary).toLocaleString(),
|
||||
insigniaType: e.lastInsignia ? `${e.lastInsignia} (${dataInsigniaType.value.find((item: any) => item.name === e.lastInsignia)?.shortName || ''})` : '',
|
||||
insigniaType: e.lastInsignia
|
||||
? `${e.lastInsignia} (${
|
||||
dataInsigniaType.value.find(
|
||||
(item: any) => item.name === e.lastInsignia
|
||||
)?.shortName || ""
|
||||
})`
|
||||
: "",
|
||||
insigniaCheck: e.requestInsignia,
|
||||
insigniaSend: e.requestInsignia ? `${e.requestInsignia} (${dataInsigniaType.value.find((item: any) => item.name === e.requestInsignia)?.shortName || ''})` : '',
|
||||
insigniaSend: e.requestInsignia
|
||||
? `${e.requestInsignia} (${
|
||||
dataInsigniaType.value.find(
|
||||
(item: any) => item.name === e.requestInsignia
|
||||
)?.shortName || ""
|
||||
})`
|
||||
: "",
|
||||
insigniaLevel: e.level,
|
||||
dateSend: date2Thai(e.requestDate),
|
||||
requestNote: e.requestNote,
|
||||
|
|
@ -67,15 +79,17 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
|||
isApprove: e.isApprove,
|
||||
statusMark:
|
||||
e.markDiscipline === true ||
|
||||
e.markLeave === true ||
|
||||
e.markRate === true
|
||||
e.markLeave === true ||
|
||||
e.markRate === true
|
||||
? true
|
||||
: false,
|
||||
}));
|
||||
const item = datalist
|
||||
const item = datalist;
|
||||
for (let j = 0; j < item.length; j++) {
|
||||
const data = item[j];
|
||||
const filteredData = dataInsigniaType.value.find((item: any) => item.name === data.insigniaType);
|
||||
const filteredData = dataInsigniaType.value.find(
|
||||
(item: any) => item.name === data.insigniaType
|
||||
);
|
||||
if (filteredData) {
|
||||
data.insigniaType = `${data.insigniaType} (${filteredData.shortName})`;
|
||||
} else {
|
||||
|
|
@ -97,10 +111,11 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
|||
};
|
||||
// เรียก Option หน่วยงานทั้งหมด
|
||||
const fetchOption = (op: any) => {
|
||||
if (agency.value !== null) {
|
||||
const aId = agency.value ?? "00000000-0000-0000-0000-000000000000";
|
||||
|
||||
if (aId !== "00000000-0000-0000-0000-000000000000") {
|
||||
typeOc.value = agency.value;
|
||||
optionsTypeOc.value = op;
|
||||
// .filter((e: any) => e.id == agency.value);
|
||||
} else {
|
||||
(optionsTypeOc.value = op), (typeOc.value = op[0].id);
|
||||
}
|
||||
|
|
@ -117,14 +132,14 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
|||
typeinsigniaOptions.value = [{ id: "all", name: "ทั้งหมด" }];
|
||||
for (let i = 1; i <= double_name.length; i++) {
|
||||
const type = double_name[i - 1];
|
||||
const filterShortName = dataInsigniaType.value.find((item: any) => item.name === type)
|
||||
const filterShortName = dataInsigniaType.value.find(
|
||||
(item: any) => item.name === type
|
||||
);
|
||||
const listtype = {
|
||||
id: type,
|
||||
name: `${type} (${filterShortName.shortName})`,
|
||||
|
||||
};
|
||||
typeinsigniaOptions.value.push(listtype);
|
||||
|
||||
}
|
||||
} else typeinsigniaOptions.value = [{ id: "all", name: "ทั้งหมด" }];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue