diff --git a/src/app.config.ts b/src/app.config.ts index b5852275b..b169f9a9a 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -137,7 +137,7 @@ const API = { ...file, }; -const path = "http://localhost:3008"; +const path = "http://chamomind.ddns.net:20006"; const generatePopupPath = (routeName: any) => { if (routeName.includes("metadata")) { @@ -218,7 +218,7 @@ const manualConfig = { KPIIndicatorByRole: `${path}/manual/chapter-3-admin-evaluate`, KPICompetencyAdd: `${path}/manual/chapter-3-admin-evaluate`, KPICompetencyByid: `${path}/manual/chapter-3-admin-evaluate`, - organizationNew: `${path}/manual/chapter-4-admin-organization`, + organizationalNew: `${path}/manual/chapter-4-admin-organization`, organization: `${path}/manual/chapter-7-admin-registry`, registry: `${path}/manual/chapter-7-admin-registry`, registryDetail: `${path}/manual/chapter-7-admin-registry`, diff --git a/src/modules/03_recruiting/views/02_qualify/manageDetail.vue b/src/modules/03_recruiting/views/02_qualify/manageDetail.vue index c97f9ce9c..b120d1a79 100644 --- a/src/modules/03_recruiting/views/02_qualify/manageDetail.vue +++ b/src/modules/03_recruiting/views/02_qualify/manageDetail.vue @@ -493,31 +493,33 @@ const fetchData = async (loading: boolean = true) => { ) .then(async (res) => { const data = res.data.result; - total.value = data.total; - maxPage.value = await Math.ceil(data.total / pageSize.value); - maxPage.value = maxPage.value < 1 ? 1 : maxPage.value; + if (data.data) { + total.value = data.total; + maxPage.value = await Math.ceil(data.total / pageSize.value); + maxPage.value = maxPage.value < 1 ? 1 : maxPage.value; - rows.value = []; - data.data.map((r: any) => { - rows.value.push({ - id: r.id, - fullname: `${r.prefixName}${r.firstName} ${r.lastName}`, - avatar: r.profileImg != null ? r.profileImg.detail : "", - citizenId: r.citizenId, - number: r.number, - registerDate: date2Thai(r.registerDate, false, true), - examIdenNumber: r.examIdenNumber, - seatNumber: r.seatNumber, - resultC: r.resultC, - resultB: r.resultB, - pass: r.pass, - email: r.email, - status: r.status, - position: `${r.positionName}${r.positionLevelName}`, - positionLevel: r.positionLevelName, - check: false, + rows.value = []; + data.data.map((r: any) => { + rows.value.push({ + id: r.id, + fullname: `${r.prefixName}${r.firstName} ${r.lastName}`, + avatar: r.profileImg != null ? r.profileImg.detail : "", + citizenId: r.citizenId, + number: r.number, + registerDate: date2Thai(r.registerDate, false, true), + examIdenNumber: r.examIdenNumber, + seatNumber: r.seatNumber, + resultC: r.resultC, + resultB: r.resultB, + pass: r.pass, + email: r.email, + status: r.status, + position: `${r.positionName}${r.positionLevelName}`, + positionLevel: r.positionLevelName, + check: false, + }); }); - }); + } }) .catch((e) => { messageError($q, e); diff --git a/src/modules/04_registryNew/components/detail/PersonalInformation/04_FamilyNew.vue b/src/modules/04_registryNew/components/detail/PersonalInformation/04_FamilyNew.vue index b36510356..65139cc94 100644 --- a/src/modules/04_registryNew/components/detail/PersonalInformation/04_FamilyNew.vue +++ b/src/modules/04_registryNew/components/detail/PersonalInformation/04_FamilyNew.vue @@ -786,7 +786,6 @@ onMounted(() => { - {{ typeForm }} {{ isEdit }} (null); @@ -39,7 +41,7 @@ const reson52 = ref(""); const chairman_dated = ref(); const director1_dated = ref(""); const director2_dated = ref(""); -const fullname = ref(""); +// const fullname = ref(""); const director_id = ref(null); const director_id2 = ref(null); const director_id3 = ref(null); @@ -158,7 +160,10 @@ async function clickdownloadFile(type: string) { responseType: "blob", }) .then((res) => { - downloadFile(res, `แบบรายงานการประเมินฯ_${fullname.value}.${type}`); + downloadFile( + res, + `แบบรายงานการประเมินฯ_${probationStore.person.name}.${type}` + ); }) .catch(async (e) => { messageError($q, JSON.parse(await e.response.data.text())); diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue index 6f8d0988b..acfbe8b3d 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue @@ -29,7 +29,7 @@ const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError } = mixin; const assignId = ref(route.params.form.toString()); const personalId = ref(route.params.personalId.toString()); -const fullname = ref(""); +// const fullname = ref(""); const tab = ref("save1"); const dataArrayNumber = ref(); const dataRole = ref("mentor"); @@ -43,9 +43,9 @@ async function fecthAssign(id: string) { .get(config.API.formevaluate(id)) .then(async (res: any) => { await fecthdataAssign(res.data.data); - fullname.value = res.data.data.experimentee - ? res.data.data.experimentee.name - : ""; + // fullname.value = res.data.data.experimentee + // ? res.data.data.experimentee.name + // : ""; dataArrayNumber.value = 1; }) .catch((e: any) => { @@ -91,7 +91,7 @@ async function FileDownload(type: string) { .then(async (res) => { downloadFile( res, - `แบบบันทึกผล(ผู้ดูเเล)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบบันทึกผล(ผู้ดูเเล)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { @@ -110,7 +110,7 @@ async function FileDownload(type: string) { .then(async (res) => { downloadFile( res, - `แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue index 41ee396bc..5a37fbae6 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue @@ -29,7 +29,7 @@ const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError } = mixin; const assignId = ref(route.params.form.toString()); const personalId = ref(route.params.personalId.toString()); -const fullname = ref(""); +// const fullname = ref(""); const tab = ref("save1"); const dataArrayNumber = ref(); const dataRole = ref("mentor"); @@ -48,9 +48,7 @@ async function fecthAssign(id: string) { .get(config.API.formevaluateCommander(id)) .then(async (res: any) => { await fecthdataAssign(res.data.data); - fullname.value = res.data.data.experimentee - ? res.data.data.experimentee.name - : ""; + // fullname.value = res.data.person ? res.data.person.name : ""; dataArrayNumber.value = 1; }) .catch((e: any) => { @@ -99,7 +97,7 @@ async function FileDownload(type: string) { .then(async (res) => { downloadFile( res, - `แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { @@ -118,7 +116,7 @@ async function FileDownload(type: string) { .then(async (res) => { downloadFile( res, - `แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue index ba36db23a..124e59ddc 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue @@ -29,7 +29,7 @@ const probationStore = useProbationDataStore(); const { fecthdataAssign } = probationStore; const assignId = ref(route.params.form.toString()); const personalId = ref(route.params.personalId.toString()); -const fullname = ref(""); +// const fullname = ref(""); const tab = ref("save1"); const tabs = ref([]); const dataArrayNumber = ref(1); @@ -60,9 +60,7 @@ async function fecthAssign(id: string) { await fecthdataAssign(res.data.data); evaluate.value = probationStore.evaluate; tabs.value = evaluate.value; - fullname.value = res.data.data.experimentee - ? res.data.data.experimentee.name - : ""; + // fullname.value = res.data.data.person ? res.data.data.person.name : ""; dataArrayNumber.value = 1; }) .catch((e: any) => { @@ -98,7 +96,7 @@ async function FileDownload(type: string) { .then(async (res) => { downloadFile( res, - `แบบประเมินผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบประเมินผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue index 989e24a4e..8deccf166 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue @@ -30,7 +30,7 @@ const { showLoader, hideLoader, messageError, success } = mixin; const assignId = ref(route.params.form.toString()); const personalId = ref(route.params.personalId.toString()); -const fullname = ref(""); +// const fullname = ref(""); const tab = ref("save1"); const tabs = ref([]); const dataArrayNumber = ref(1); @@ -47,9 +47,7 @@ const fecthAssign = async (id: string) => { .then(async (res: any) => { await fecthdataAssign(res.data.data); evaluate.value = probationStore.evaluate; - fullname.value = res.data.data.experimentee - ? res.data.data.experimentee.name - : ""; + // fullname.value = res.data.data.person ? res.data.data.person.name : ""; tabs.value = evaluate.value; dataArrayNumber.value = 1; }) @@ -80,7 +78,7 @@ const FileDownload = async (type: string) => { .then(async (res) => { downloadFile( res, - `แบบประเมินผล(คณะกรรมการ)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบประเมินผล(คณะกรรมการ)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { diff --git a/src/modules/13_salary/views/salaryRate.vue b/src/modules/13_salary/views/salaryRate.vue index f83272217..af6a9f1f9 100644 --- a/src/modules/13_salary/views/salaryRate.vue +++ b/src/modules/13_salary/views/salaryRate.vue @@ -34,6 +34,8 @@ const { } = useCounterMixin(); const isActive = ref(false); +const posType = ref(""); + const salaryId = ref(route.params.id.toString()); /** modalDialog*/ @@ -209,9 +211,11 @@ function fetchList() { .get(config.API.salaryChartByid(salaryId.value)) .then((res) => { isActive.value = res.data.result.isActive; + posType.value = `${res.data.result.posTypeName}(${res.data.result.posLevelName})`; }) - .catch((e) => {}) - .finally(() => {}); + .catch((e) => { + messageError($q, e); + }); } onMounted(async () => { await fetchList(); @@ -236,7 +240,7 @@ watch([() => formQuery.page, () => formQuery.pageSize], async () => { class="q-mr-sm" @click="router.go(-1)" /> - อัตราเงินเดือน + อัตราเงินเดือน ของ{{ posType }} diff --git a/src/modules/14_KPI/components/Tab/Topic/02_Competency.vue b/src/modules/14_KPI/components/Tab/Topic/02_Competency.vue index 1dcad6a59..6e1e753d8 100644 --- a/src/modules/14_KPI/components/Tab/Topic/02_Competency.vue +++ b/src/modules/14_KPI/components/Tab/Topic/02_Competency.vue @@ -136,7 +136,7 @@ function getData(type: any) { .then(async (res) => { const data = res.data.result.data; rows.value[type] = data; - lists.value = await lists.value.filter((x: any) => x.type != type); + lists.value = lists.value.filter((x: any) => x.type != type); lists.value.push({ type: type, data }); }) .catch((e) => { @@ -349,7 +349,7 @@ onMounted(() => { { return "ผ่านการประเมิน"; case "NOTPASSED": return "ไม่ผ่านการประเมิน"; - case "EXCELLENT": - return "ดีเด่น"; - case "VERY_GOOD": - return "ดีเด่น"; - case "GOOD": - return "ดี"; - case "FAIR": - return "พอใช้"; - case "IMPROVEMENT": - return "ต้องปรับปรุง"; default: break; } diff --git a/src/modules/15_development/components/ProjectDetail.vue b/src/modules/15_development/components/ProjectDetail.vue index 3049f8b1e..837b8ceca 100644 --- a/src/modules/15_development/components/ProjectDetail.vue +++ b/src/modules/15_development/components/ProjectDetail.vue @@ -156,7 +156,30 @@ async function onSubmit() { dialogConfirm($q, async () => { showLoader(); await http - .put(config.API.developmentMainTab("tab3", projectId.value), formData) + .put(config.API.developmentMainTab("tab3", projectId.value), { + developmentProjectTypes: formData.developmentProjectTypes, + projectModal: formData.projectModal, + isBackPlanned: formData.isBackPlanned, + isHoldPlanned: formData.isHoldPlanned, + projectDayBackPlanned: formData.isBackPlanned ? formData.projectDayBackPlanned:null, + projectDayHoldPlanned: formData.projectDayHoldPlanned, + projectNigthHoldPlanned: formData.projectNigthHoldPlanned, + developmentProjectTechniquePlanneds: + formData.developmentProjectTechniquePlanneds, + isBackActual: formData.isBackActual, + isHoldActual: formData.isHoldActual, + projectDayBackActual: formData.projectDayBackActual, + projectDayHoldActual: formData.projectDayHoldActual, + projectNigthHoldActual: formData.projectNigthHoldActual, + developmentProjectTechniqueActuals: + formData.developmentProjectTechniqueActuals, + projectModalActual: formData.projectModalActual, + projectModalPlanned: formData.projectModalPlanned, + strategyChildPlannedId: formData.strategyChildPlannedId, + strategyChildPlannedNode: formData.strategyChildPlannedNode, + strategyChildActualId: formData.strategyChildActualId, + strategyChildActualNode: formData.strategyChildActualNode, + }) .then(() => { success($q, "บันทึกข้อมูลสำเร็จ"); fetchData(); @@ -210,322 +233,322 @@ onMounted(() => { - -
- ความสอดคล้องหรือเชื่อมโยงกับยุทธศาสตร์/แผน -
- + +
+ ความสอดคล้องหรือเชื่อมโยงกับยุทธศาสตร์/แผน +
+ - -
-
- -
- ยุทธศาสตร์/แผน -
- + +
+
+ +
+ ยุทธศาสตร์/แผน +
+ - - - - - - + + +
+
+
+ +
+ ยุทธศาสตร์/แผน +
+ - - - - - - + + +
+
+
+
+ + +
+ รูปแบบโครงการ
- -
+ - -
- รูปแบบโครงการ -
- + +
+
+
รูปแบบโครงการตามแผน
- -
-
-
รูปแบบโครงการตามแผน
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
-
-
- + เทคนิควิธีการที่ใช้ในการพัฒนา + -
-
-
-
-
-
- + -
-
-
-
- +
+ +
+
รูปแบบโครงการตามจริง
+ +
+
+ +
+
+ +
-
- -
- เทคนิควิธีการที่ใช้ในการพัฒนา - -
- -
- -
-
- -
-
รูปแบบโครงการตามจริง
- -
-
- +
+ +
+
+ +
+
+ +
+
+
+ เทคนิควิธีการที่ใช้ในการพัฒนา + + v-model="formData.developmentProjectTechniqueActuals" + :options="projectTechniquesOp" + type="checkbox" + />
-
+
-
-
- -
-
- -
-
- -
-
-
- เทคนิควิธีการที่ใช้ในการพัฒนา - -
-
- -
-
- - -
+ + +
(route.params.id.toLocaleString()); const $q = useQuasar(); const mixin = useCounterMixin(); -const { dialogRemove, showLoader, hideLoader, messageError, success } = mixin; +const { + dialogRemove, + showLoader, + hideLoader, + messageError, + success, + dialogConfirm, +} = mixin; const groupTargetData: any = reactive({ targetData: [{}], }); @@ -269,123 +276,127 @@ function onClickOpenDialog(type: string, target: string) { } /** เพิ่ม/แก้ไขกลุ่มเป้าหมาย */ -async function onSubmitGroup() { - if (isTarget.value === "planned") { - await http - .put( - config.API.developmentMainTab( - isEdit.value ? "tab2_1_edit" : "tab2_1_add", - isEdit.value ? editId.value : projectId.value - ), - { - groupTarget: formGroupTarget.groupTarget, - groupTargetSub: formGroupTarget.groupTargetSub, - positions: - formGroupTarget.groupTarget !== "OUTSIDERS" - ? formGroupTarget.positions.map((v) => ({ - position: v.position ? v.position : "", - posTypePlannedId: v.posTypeId ? v.posTypeId : "", - posLevelPlannedId: v.posLevelId ? v.posLevelId : "", - })) - : [], - type: - formGroupTarget.groupTarget === "OUTSIDERS" - ? formGroupTarget.type - : "", - amount: formGroupTarget.amount, - } - ) - .then(() => { - success($q, "บันทึกข้อมูลสำเร็จ"); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - hideLoader(); - }); - } else { - await http - .put( - config.API.developmentMainTab( - isEdit.value ? "tab2_3_edit" : "tab2_3_add", - isEdit.value ? editId.value : projectId.value - ), - { - groupTarget: formGroupTarget.groupTarget, - groupTargetSub: formGroupTarget.groupTargetSub, - position: formGroupTarget.position, - posTypeActualId: formGroupTarget.posType, - posLevelActualId: formGroupTarget.posLevel, - type: formGroupTarget.type, - amount: formGroupTarget.amount, - } - ) - .then(() => { - success($q, "บันทึกข้อมูลสำเร็จ"); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - hideLoader(); - }); - } - setTimeout(() => { - fetchData(projectId.value); - onClickCloseDialog(); - }, 100); +function onSubmitGroup() { + dialogConfirm($q, async () => { + if (isTarget.value === "planned") { + await http + .put( + config.API.developmentMainTab( + isEdit.value ? "tab2_1_edit" : "tab2_1_add", + isEdit.value ? editId.value : projectId.value + ), + { + groupTarget: formGroupTarget.groupTarget, + groupTargetSub: formGroupTarget.groupTargetSub, + positions: + formGroupTarget.groupTarget !== "OUTSIDERS" + ? formGroupTarget.positions.map((v) => ({ + position: v.position ? v.position : "", + posTypePlannedId: v.posTypeId ? v.posTypeId : "", + posLevelPlannedId: v.posLevelId ? v.posLevelId : "", + })) + : [], + type: + formGroupTarget.groupTarget === "OUTSIDERS" + ? formGroupTarget.type + : "", + amount: formGroupTarget.amount, + } + ) + .then(() => { + success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + } else { + await http + .put( + config.API.developmentMainTab( + isEdit.value ? "tab2_3_edit" : "tab2_3_add", + isEdit.value ? editId.value : projectId.value + ), + { + groupTarget: formGroupTarget.groupTarget, + groupTargetSub: formGroupTarget.groupTargetSub, + position: formGroupTarget.position, + posTypeActualId: formGroupTarget.posType, + posLevelActualId: formGroupTarget.posLevel, + type: formGroupTarget.type, + amount: formGroupTarget.amount, + } + ) + .then(() => { + success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + } + setTimeout(() => { + fetchData(projectId.value); + onClickCloseDialog(); + }, 100); + }); } /** เพิ่มผู้เกี่ยวข้อง */ -async function onSubmitRelate() { - if (isTarget.value === "planned") { - await http - .put( - config.API.developmentMainTab( - isEdit.value ? "tab2_2_edit" : "tab2_2_add", - isEdit.value ? editId.value : projectId.value - ), - { - groupTarget: formGroupRelate.relate, - amount: formGroupRelate.amount, - } - ) - .then(() => { - success($q, "บันทึกข้อมูลสำเร็จ"); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - hideLoader(); - }); - } else { - await http - .put( - config.API.developmentMainTab( - isEdit.value ? "tab2_4_edit" : "tab2_4_add", - isEdit.value ? editId.value : projectId.value - ), - { - groupTarget: formGroupRelate.relate, - amount: formGroupRelate.amount, - } - ) - .then(() => { - success($q, "บันทึกข้อมูลสำเร็จ"); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - hideLoader(); - }); - } - setTimeout(() => { - fetchData(projectId.value); - onClickCloseDialog(); - }, 100); +function onSubmitRelate() { + dialogConfirm($q, async () => { + if (isTarget.value === "planned") { + await http + .put( + config.API.developmentMainTab( + isEdit.value ? "tab2_2_edit" : "tab2_2_add", + isEdit.value ? editId.value : projectId.value + ), + { + groupTarget: formGroupRelate.relate, + amount: formGroupRelate.amount, + } + ) + .then(() => { + success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + } else { + await http + .put( + config.API.developmentMainTab( + isEdit.value ? "tab2_4_edit" : "tab2_4_add", + isEdit.value ? editId.value : projectId.value + ), + { + groupTarget: formGroupRelate.relate, + amount: formGroupRelate.amount, + } + ) + .then(() => { + success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + } + setTimeout(() => { + fetchData(projectId.value); + onClickCloseDialog(); + }, 100); + }); } /** clear form */ @@ -409,6 +420,8 @@ function onClickCloseDialog() { groupTargetData.targetData = [{}]; modalRelate.value = false; cleanFormData(); + fetchType(); + fetchData(projectId.value); } /** @@ -533,7 +546,7 @@ onMounted(() => {