diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index a37a5b0ad..9b9501dbe 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -206,6 +206,7 @@ const menuList = readonly([ }, ], }, + { key: 7, icon: "mdi-account-cancel-outline", @@ -213,6 +214,44 @@ const menuList = readonly([ label: "พ้นจากราชการ", path: "retirement", role: "retirement", + children: [ + { + key: 7.1, + label: "ประกาศเกษียณ", + path: "retirement", + role: "retirement", + }, + { + key: 7.2, + label: "ลาออก", + path: "resign", + role: "retirement", + }, + { + key: 7.3, + label: "คำสั่งลาออก", + path: "resign-order", + role: "retirement", + }, + { + key: 7.4, + label: "Exit interviwe", + // path: "", + role: "retirement", + }, + { + key: 7.5, + label: "ถึงแก่กรรม", + path: "deceased", + role: "retirement", + }, + { + key: 7.6, + label: "คำสั่งให้ออก ปลดออก ไล่ออก", + path: "dismiss-order", + role: "retirement", + }, + ], }, { key: 8, diff --git a/src/modules/04_registry/components/Profile.vue b/src/modules/04_registry/components/Profile.vue index ade292c48..5fa28e74f 100644 --- a/src/modules/04_registry/components/Profile.vue +++ b/src/modules/04_registry/components/Profile.vue @@ -153,6 +153,42 @@ + + + {{ + reasonStatus ? "การกลับเข้ารับราชการ" : "การออกจากราชการ" + }} + + + + + + + ถึงแก่กรรม + + + + + + ให้ออกจากราชการ + + + + + + ปลดออกจากราชการ + + + + + + ไล่ออกจากราชการ + + + + + + + + + + +
แนบใบมรณบัตร
+ + + ปิดหน้านี้ + +
+ + + + + + +
+
@@ -559,9 +630,11 @@ const dialog = ref(false); const dialogShort = ref(false); const dialogLeave = ref(false); const dialogImage = ref(false); +const dialogPassaway = ref(false); const loader = ref(false); //รอโหลด const statusEdit = ref(false); const activeImage = ref(null); +const filePassaway = ref(null); const images = ref([]); const profileId = ref(route.params.id.toString()); const profileType = ref(""); @@ -806,6 +879,10 @@ const closeImage = () => { dialogImage.value = false; }; +const closePassaway = () => { + dialogPassaway.value = false; +}; + const closeLeave = () => { dialogLeave.value = false; }; @@ -818,6 +895,10 @@ const closeKp7Short = () => { dialogShort.value = false; }; +const clickaddOrder = () => { + router.push({ name: "addOrder" }); +}; + const downloadKP7 = () => {}; const downloadKP7Short = () => {}; @@ -896,6 +977,10 @@ const clickRetire = async () => { } }; +const clickPassaway = async () => { + dialogPassaway.value = true; +}; + const Retire = async () => { if (reasonStatus.value == true) { loaderPage(true); diff --git a/src/modules/04_registry/router.ts b/src/modules/04_registry/router.ts index 7f78516ff..18571351a 100644 --- a/src/modules/04_registry/router.ts +++ b/src/modules/04_registry/router.ts @@ -4,6 +4,10 @@ const Main = () => import("@/modules/04_registry/views/Main.vue"); const Detail = () => import("@/modules/04_registry/components/Profile.vue"); +const addOrder = () => + import( + "@/modules/05_placement/components/OrderPlacement/addOrderPlacement.vue" + ); export default [ { @@ -26,4 +30,14 @@ export default [ Role: "registry", }, }, + { + path: "/dismiss-order/add", + name: "addOrder", + component: addOrder, + meta: { + Auth: true, + Key: [7], + Role: "registry", + }, + }, ]; diff --git a/src/modules/05_placement/components/OrderPlacement/ResignOrder.vue b/src/modules/05_placement/components/OrderPlacement/ResignOrder.vue new file mode 100644 index 000000000..d4ac841a2 --- /dev/null +++ b/src/modules/05_placement/components/OrderPlacement/ResignOrder.vue @@ -0,0 +1,791 @@ + + + + + + \ No newline at end of file diff --git a/src/modules/05_placement/components/PersonalList/OrgTree.vue b/src/modules/05_placement/components/PersonalList/OrgTree.vue index 5d2f99365..5cca4ecb9 100644 --- a/src/modules/05_placement/components/PersonalList/OrgTree.vue +++ b/src/modules/05_placement/components/PersonalList/OrgTree.vue @@ -58,6 +58,7 @@ const fetchPublishFile = async () => { // โหลดข้อมูลโครงสร้างจาก json const treeData = ref>([]); const loadTreeData = async () => { + expanded.value = []; await http .get(`${config.s3ClusterUrl}${selectedFile.value}`) .then((res: any) => { @@ -126,20 +127,20 @@ const myFilterMethod = (node: any, filter: string) => { // ((node.name && node.name == null) || !node.name) && (node.name && node.name.indexOf(filt) > -1) || (node.organizationName && node.organizationName.indexOf(filt) > -1) || - (node.positionNum && node.positionNum.indexOf(filt) > -1) || - (node.positionName && node.positionName.indexOf(filt) > -1) || - (node.governmentCode && - node.governmentCode.toString().indexOf(filt) > -1) || - (node.agency && node.agency.indexOf(filt) > -1) || - (node.government && node.government.indexOf(filt) > -1) || - (node.department && node.department.indexOf(filt) > -1) || - (node.pile && node.pile.indexOf(filt) > -1) || - (node.organizationShortName && - node.organizationShortName.indexOf(filt) > -1) || - (node.positionSideName && node.positionSideName.indexOf(filt) > -1) || - (node.executivePosition && node.executivePosition.indexOf(filt) > -1) || - (node.executivePositionSide && - node.executivePositionSide.indexOf(filt) > -1) || + (node.positionNum && node.positionNum.indexOf(filt) > -1) || + (node.positionName && node.positionName.indexOf(filt) > -1) || + (node.governmentCode && + node.governmentCode.toString().indexOf(filt) > -1) || + (node.agency && node.agency.indexOf(filt) > -1) || + (node.government && node.government.indexOf(filt) > -1) || + (node.department && node.department.indexOf(filt) > -1) || + (node.pile && node.pile.indexOf(filt) > -1) || + (node.organizationShortName && + node.organizationShortName.indexOf(filt) > -1) || + (node.positionSideName && node.positionSideName.indexOf(filt) > -1) || + (node.executivePosition && node.executivePosition.indexOf(filt) > -1) || + (node.executivePositionSide && + node.executivePositionSide.indexOf(filt) > -1) || (node.positionLevel && node.positionLevel.indexOf(filt) > -1) ); }; @@ -361,8 +362,10 @@ const checkPosition = (val: string) => { return num; }; const personal = ref(); +const expanded = ref([]); watch(props, () => { + expanded.value = []; const dataPersonal = props.personal; if (dataPersonal) { dataPersonal.map((data: any) => { @@ -370,29 +373,39 @@ watch(props, () => { }); console.log("personal", personal.value); } - // console.log("draft===>", personal.value.draft); - - if (personal.value.draft === true) { + + if (personal.value && personal.value.draft === false) { // const findData = dataRespone.value.find(findByPerson); let findData: any = null; + console.log(dataRespone.value); + dataRespone.value.map((x: any) => { findData = findByPerson(x); if (findData != null) { console.log("findData===>", findData); - selectedPosition(findData) + selectedPosition(findData); + for (let i = 3; i <= findData.keyId.length; i += 2) { + expanded.value.push(findData.keyId.slice(0, i)); + } } - }) + }); // loadTreeData(); // selectedPosition(findData.children.children.children) } }); -function findByPerson(element: any) { +function findByPerson(element: any): any { // console.log("searchTree element===>", element) - if (element.positionNumId && element.positionLineId === personal.value.positionLineId && + if ( + element.positionNumId && + element.positionLineId === personal.value.positionLineId && element.positionTypeId === personal.value.positionTypeId && - element.positionNumId === personal.value.posNoId + element.positionNumId === personal.value.posNoId && + (element.positionLevelObj === null || + element.positionLevelObj[0].Id === personal.value.positionLevelId) && + (element.positionSideNameObj === null || + element.positionSideNameObj[0].Id === personal.value.positionPathSideId) ) { return element; } else if (element.children) { @@ -408,153 +421,156 @@ function findByPerson(element: any) { + + + + + +
diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index d85c9247e..c05d8a671 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -195,9 +195,9 @@ const convertContainStatus = (val: string) => { }; const convertDraft = (val: boolean) => { switch (val) { - case true: - return "รอส่งตัว"; case false: + return "รอส่งตัว"; + case true: return "ส่งตัวแล้ว"; default: return "-"; @@ -297,8 +297,8 @@ const saveDeferment = async () => { hideLoader(); }); }) - .onCancel(() => {}) - .onDismiss(() => {}); + .onCancel(() => { }) + .onDismiss(() => { }); } }); }; @@ -338,8 +338,8 @@ const saveDisclaim = async () => { hideLoader(); }); }) - .onCancel(() => {}) - .onDismiss(() => {}); + .onCancel(() => { }) + .onDismiss(() => { }); } }); }; @@ -441,6 +441,10 @@ const validateData = async () => { }); }; +const clickCloseSendModal = () => { + modaladdlist.value = false +} + const clickClose = async () => { userNote.value = ""; if (editRow.value == true) { @@ -537,436 +541,235 @@ const paginationLabel = (start: number, end: number, total: number) => {