diff --git a/src/components/Dialogs/DialogOrgSelect.vue b/src/components/Dialogs/DialogOrgSelect.vue new file mode 100644 index 000000000..c4a861324 --- /dev/null +++ b/src/components/Dialogs/DialogOrgSelect.vue @@ -0,0 +1,828 @@ + + + + + + + + + + + + เลือกหน่วยงาน/ส่วนราชการ + + + + + + + + + + + + + {{ prop.node.orgTreeName }} + + + {{ + prop.node.orgCode == null ? null : prop.node.orgCode + }} + {{ + prop.node.orgTreeShortName == null + ? null + : prop.node.orgTreeShortName + }} + + + + + + + + + + + + + + + เลือกเลขที่ตำแหน่ง + + + + + + + แสดงเฉพาะตำแหน่งว่าง + + + + + + + แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก + + + + + + + + + + + + + + + + + + {{ + col.label + }} + + + + + + + + {{ props.rowIndex + 1 }} + + + {{ + props.row.isSit + ? col.value + " " + "(ทับที่)" + : col.value + }} + + + + + ตรงตามตำแหน่ง + + + + + + {{ col.value ? col.value : "-" }} + + + + + + + + + + + + + + เลือกตำแหน่ง + + + + + + + + + {{ year + 543 }} + + + {{ parseInt(value + 543) }} + + + + + + + + + + + + + + + + + + + + {{ + col.label + }} + + + + + + + + + + + {{ props.rowIndex + 1 }} + + + {{ + props.row.isSit + ? col.value + " " + "(ทับที่)" + : col.value + }} + + + + {{ col.value ? col.value : "-" }} + + + + + + + + + + + + + + + + + + + + บันทึกข้อมูล + + + + + + diff --git a/src/interface/request/orgSelect/org.ts b/src/interface/request/orgSelect/org.ts new file mode 100644 index 000000000..7a1a609e1 --- /dev/null +++ b/src/interface/request/orgSelect/org.ts @@ -0,0 +1,163 @@ +interface OrgTree { + orgTreeId: string; + orgRootId: string; + orgLevel: number; + orgTreeName: string; + orgTreeShortName: string; + orgTreeCode: string; + orgCode: string; + orgTreeRank: string; + orgTreeOrder: number | null; + orgRootCode: string; + orgTreePhoneEx: string; + orgTreePhoneIn: string; + orgTreeFax: string; + orgRevisionId: string; + children: OrgTree[]; +} + +interface DataTree { + orgTreeId: string; + orgRootId?: string; + orgLevel: number; + orgName: string; + orgTreeName: string; + orgTreeShortName: string; + orgTreeCode: string; + orgCode: string; + orgTreeRank: string; + orgTreeOrder: number; + orgRootCode?: string; + orgTreePhoneEx: string; + orgTreePhoneIn: string; + orgTreeFax: string; + orgRevisionId: string; + orgRootName: string; + totalPosition: number; + totalPositionCurrentUse: number; + totalPositionCurrentVacant: number; + totalPositionNextUse: number; + totalPositionNextVacant: number; + totalRootPosition: number; + totalRootPositionCurrentUse: number; + totalRootPositionCurrentVacant: number; + totalRootPositionNextUse: number; + totalRootPositionNextVacant: number; + + children?: DataTree[]; +} + +interface PositionMain { + fullNameCurrentHolder: string | null; + fullNameNextHolder: string | null; + id: string; + isPosition: boolean; + isSit: boolean; + orgRootId: string; + orgShortname: string; + posMasterNo: number; + posMasterNoPrefix: string; + posMasterNoSuffix: string; + posExecutiveId: string; + posExecutiveName: string; + posLevelId: string; + posLevelName: string; + posTypeId: string; + posTypeName: string; + positionArea: string; + positionExecutiveField: string; + positionField: string; + positionIsSelected: boolean; + positionName: string; + positions: Positions[]; + node: number; + nodeId: string; +} + +interface PositionNo { + fullNameCurrentHolder: string | null; + fullNameNextHolder: string | null; + id: string; + isPosition: boolean; + isSit: boolean; + orgRootId: string; + orgShortname: string; + posMasterNo: number; + posMasterNoPrefix: string; + posMasterNoSuffix: string; + positions: Positions[]; +} + +interface Positions { + id: string; + posExecutiveId: string; + posExecutiveName: string; + posLevelId: string; + posLevelName: string; + posTypeId: string; + posTypeName: string; + positionArea: string; + positionExecutiveField: string; + positionField: string; + positionIsSelected: boolean; + positionName: string; +} + +interface DataPositionNo { + id: string; + isPosition: boolean; + posMasterNo: string; + positionName: string; + posTypeName: string; + posLevelName: string; + positionIsSelected: string | null; + isSit: boolean; + positions: Positions[]; +} + +interface FormActive { + activeId: string; + activeName: string; + draftId: string; + draftName: string; + orgPublishDate: Date | null; + isPublic: boolean; +} + +interface TreeMain { + children: TreeMain[]; // ปรับเป็นชนิดข้อมูลที่ถูกต้องตามโครงสร้างของ children ถ้าเป็นไปได้ + orgCode: string; + orgLevel: number; + orgName: string; + orgRevisionId: string; + orgRootName: string; + orgTreeCode: string; + orgTreeFax: string; + orgTreeId: string; + orgTreeName: string; + orgTreeOrder: number; + orgTreePhoneEx: string; + orgTreePhoneIn: string; + orgTreeRank: string; + orgTreeShortName: string; + totalPosition: number; + totalPositionCurrentUse: number; + totalPositionCurrentVacant: number; + totalPositionNextUse: number; + totalPositionNextVacant: number; + totalRootPosition: number; + totalRootPositionCurrentUse: number; + totalRootPositionCurrentVacant: number; + totalRootPositionNextUse: number; + totalRootPositionNextVacant: number; + } +export type { + OrgTree, + DataTree, + PositionMain, + PositionNo, + Positions, + DataPositionNo, + FormActive, + TreeMain, +};