diff --git a/src/modules/05_placement/components/probation/MainProbation.vue b/src/modules/05_placement/components/probation/MainProbation.vue
index 8e456569f..0f872bbd6 100644
--- a/src/modules/05_placement/components/probation/MainProbation.vue
+++ b/src/modules/05_placement/components/probation/MainProbation.vue
@@ -1,7 +1,7 @@
@@ -557,7 +530,6 @@ onMounted(async () => {
standout
dense
v-model="filterKeyword"
- ref="filterRef"
outlined
placeholder="ค้นหา"
@keydown.enter.prevent="getSearchMain()"
@@ -675,7 +647,7 @@ onMounted(async () => {
boundary-links
direction-links
:max-pages="5"
- @update:model-value="getpersonalList"
+ @update:model-value="fetchProbationPersonalList"
>
@@ -688,7 +660,7 @@ onMounted(async () => {
@@ -697,7 +669,6 @@ onMounted(async () => {
standout
dense
v-model="formProbation.keyword"
- ref="filterRef2"
outlined
placeholder="ค้นหา"
@keydown.enter.prevent="filterKeyword2Fn(formProbation.page)"
@@ -708,7 +679,6 @@ onMounted(async () => {
v-if="filterKeyword2 !== ''"
name="clear"
class="cursor-pointer"
- @click="resetFilter2"
/>
@@ -723,7 +693,6 @@ onMounted(async () => {
:paging="true"
dense
class="custom-header-table"
- v-bind="attrs"
:pagination-label="paginationLabel2"
v-model:pagination="pagination2"
@update:pagination="updatePagination"
@@ -750,7 +719,7 @@ onMounted(async () => {
outline
color="primary"
label="เพิ่ม"
- @click="clickAdd(props.row)"
+ @click="addPersonalData(props.row)"
>
diff --git a/src/modules/05_placement/components/probation/MainSurvey.vue b/src/modules/05_placement/components/probation/MainSurvey.vue
index 900148b20..d87412ebf 100644
--- a/src/modules/05_placement/components/probation/MainSurvey.vue
+++ b/src/modules/05_placement/components/probation/MainSurvey.vue
@@ -5,8 +5,8 @@ import { useQuasar, type QTableProps } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
-import { checkPermission } from "@/utils/permissions";
+import type { Pagination } from "@/modules/05_placement/interface/index/Main";
import type { MainData } from "@/modules/05_placement/interface/index/Survey";
const $q = useQuasar();
@@ -19,22 +19,6 @@ const rows = ref([]);
const filterKeyword = ref("");
const total = ref(0);
const totalList = ref(1);
-const pagination = ref({
- sortBy: "createdAt",
- descending: true,
- page: 10,
- rowsPerPage: 10,
-});
-
-const visibleColumns = ref([
- "no",
- "fullname",
- "position",
- "answer1",
- "answer2",
- "answer3",
- "createdAt",
-]);
/** หัวตาราง */
const columns = ref([
{
@@ -104,35 +88,50 @@ const columns = ref([
},
},
]);
+const visibleColumns = ref([
+ "no",
+ "fullname",
+ "position",
+ "answer1",
+ "answer2",
+ "answer3",
+ "createdAt",
+]);
+const pagination = ref({
+ sortBy: "createdAt",
+ descending: true,
+ page: 10,
+ rowsPerPage: 10,
+});
async function getData() {
showLoader();
- let query = {
- year: year.value,
- keyword: filterKeyword.value,
- page: pagination.value.page,
- pageSize: pagination.value.rowsPerPage,
- };
await http
- .get(config.API.probationSurvey, { params: query })
+ .get(config.API.probationSurvey, {
+ params: {
+ year: year.value,
+ keyword: filterKeyword.value,
+ page: pagination.value.page,
+ pageSize: pagination.value.rowsPerPage,
+ },
+ })
.then(async (res) => {
const data = await res.data.result.data;
totalList.value = Math.ceil(
res.data.result.total / pagination.value.rowsPerPage
);
total.value = res.data.result.total;
-
rows.value = data;
- hideLoader();
})
.catch((e) => {
messageError($q, e);
- hideLoader();
})
- .finally(() => {});
+ .finally(() => {
+ hideLoader();
+ });
}
-function updatePagination(newPagination: any) {
+function updatePagination(newPagination: Pagination) {
pagination.value.page = 1;
pagination.value.rowsPerPage = newPagination.rowsPerPage;
}
@@ -153,8 +152,9 @@ onMounted(async () => {
await getData();
});
+
-
+
diff --git a/src/modules/05_placement/components/probation/MainTabs.vue b/src/modules/05_placement/components/probation/MainTabs.vue
index b516fbd59..fed244ac4 100644
--- a/src/modules/05_placement/components/probation/MainTabs.vue
+++ b/src/modules/05_placement/components/probation/MainTabs.vue
@@ -39,16 +39,16 @@ const tabsManu = ref
([
-
+
-
+
-
+
diff --git a/src/modules/05_placement/interface/response/Probation.ts b/src/modules/05_placement/interface/response/Probation.ts
new file mode 100644
index 000000000..2fe4c39c3
--- /dev/null
+++ b/src/modules/05_placement/interface/response/Probation.ts
@@ -0,0 +1,48 @@
+interface ResListProbation {
+ firstName: string;
+ idcard: string;
+ lastName: string;
+ name: string;
+ order_number: string;
+ ordering: number;
+ organization: string;
+ personal_id: string;
+ position_level: string;
+ position_line: string;
+ position_type: string;
+ prefixName: string;
+ probation_no: number;
+ probation_status: number;
+}
+
+interface ResProfileProbation {
+ firstName: string;
+ id: string;
+ idcard: string;
+ isProbation: boolean;
+ lastName: string;
+ orgChild1: string;
+ orgChild1Name: string;
+ orgChild2: string;
+ orgChild2Name: string;
+ orgChild3: string;
+ orgChild3Name: string;
+ orgChild4: string;
+ orgChild4Name: string;
+ orgRootName: string;
+ posExecutiveName: string;
+ posLevelName: string;
+ posNo: string;
+ posTypeName: string;
+ position: string;
+ positionArea: string;
+ positionExecutiveField: string;
+ positionField: string;
+ prefix: string;
+ rank: string;
+ refCommandNo: string;
+ root: string;
+ rootDna: string;
+}
+
+export type { ResListProbation, ResProfileProbation };
diff --git a/src/modules/05_placement/views/01_Main.vue b/src/modules/05_placement/views/01_Main.vue
index 1280597fc..b1ae062d8 100644
--- a/src/modules/05_placement/views/01_Main.vue
+++ b/src/modules/05_placement/views/01_Main.vue
@@ -268,6 +268,7 @@ function examTypeFilter() {
/** ฟังก์ชันค้นหาข้อมูล ายการสอบแข่งขัน / คัดเลือก*/
async function searchFilterTable() {
rows.value = [];
+ rowsData.value = [];
if (examType.value !== undefined && examType.value !== null) {
await DataStore.DataUpdateMain(
examTime.value == "ทั้งหมด" ? "all" : examTime.value,
@@ -289,7 +290,9 @@ async function searchFilterTable() {
numberOfCandidates: e.numberOfCandidates,
});
});
- rows.value = dataArr;
+ // rows.value = dataArr;
+ rowsData.value = dataArr;
+ onSearch();
}
}
@@ -370,8 +373,8 @@ function onSearch() {
}
/** เรียกใช้ฟังชั่น เมื่อเริ่มหน้านี้*/
-onMounted(async () => {
- await fetchYearOptions();
+onMounted(() => {
+ fetchYearOptions();
});
diff --git a/src/modules/05_placement/views/09_reportMain.vue b/src/modules/05_placement/views/09_reportMain.vue
index 4004a450c..fc59f587f 100644
--- a/src/modules/05_placement/views/09_reportMain.vue
+++ b/src/modules/05_placement/views/09_reportMain.vue
@@ -72,6 +72,7 @@ const pdfSrc = ref();
/** tree*/
const filterTree = ref("");
const nodeId = ref("");
+const orgTreeDnaId = ref("");
const nodeLevel = ref(0);
const node = ref([]);
const expanded = ref([]);
@@ -87,9 +88,10 @@ function onUpdateYear(val: number) {
reportType.value && fetchDataReport();
}
-function onSelectedNode(id: string, level: number) {
+function onSelectedNode(id: string, level: number, orgDnaId: string) {
nodeId.value = id;
nodeLevel.value = level;
+ orgTreeDnaId.value = orgDnaId;
reportType.value && fetchDataReport();
}
@@ -98,8 +100,12 @@ function fetchDataReport() {
return false;
}
isLoadPDF.value = true;
+ pdfSrc.value = undefined;
const queryParams = {
- nodeId: nodeId.value,
+ nodeId:
+ reportType.value.type === "probation" && reportType.value.id === "2"
+ ? orgTreeDnaId.value
+ : nodeId.value,
node: nodeLevel.value,
startDate: dateToISO(dateStart.value),
endDate: dateToISO(dateEnd.value),
@@ -348,7 +354,11 @@ onMounted(() => {
();
@@ -632,6 +633,7 @@ const updateIsShowRetire = async () => {
v-model:formFilter="formFilter"
:fetchDataTable="fetchDataPeriodNew"
:total="total"
+ :snap-shot="props?.snapShot"
/>
{
:fetchDataTable="fetchDataPeriodNew"
:total="total"
:type="item.type"
+ :snap-shot="props?.snapShot"
/>
diff --git a/src/modules/13_salary/components/04_salaryLists/TableTypeOther.vue b/src/modules/13_salary/components/04_salaryLists/TableTypeOther.vue
index 234588ae6..9b6d9d27f 100644
--- a/src/modules/13_salary/components/04_salaryLists/TableTypeOther.vue
+++ b/src/modules/13_salary/components/04_salaryLists/TableTypeOther.vue
@@ -29,6 +29,8 @@ const { dialogRemove, messageError, showLoader, hideLoader, success } =
/** props*/
const formFilter = defineModel("formFilter", { required: true });
const maxPage = defineModel("maxPage", { required: true });
+const snapShot = defineModel("snapShot");
+
const props = defineProps({
rows: { type: Array },
fetchDataTable: {
@@ -295,7 +297,11 @@ watch(
@@ -375,6 +379,7 @@ watch(
("formFilter", { required: true });
const maxPage = defineModel("maxPage", { required: true });
+const snapShot = defineModel("snapShot");
const props = defineProps({
rows: { type: Array },
fetchDataTable: {
@@ -321,7 +322,11 @@ function onClickViewInfo(type: string, id: string) {
(13);
@@ -509,6 +510,7 @@ onMounted(() => {
:fetch-data-table="fetchDataPeriodNew"
:rows="rows"
:total="total"
+ :snap-shot="props?.snapShot"
/>
{
:fetch-data-table="fetchDataPeriodNew"
:total="total"
:type="item.type"
+ :snap-shot="props?.snapShot"
/>
diff --git a/src/modules/13_salary/components/05_salaryListsEmployee/TableTypeOther.vue b/src/modules/13_salary/components/05_salaryListsEmployee/TableTypeOther.vue
index 3fc89fbeb..dab17b705 100644
--- a/src/modules/13_salary/components/05_salaryListsEmployee/TableTypeOther.vue
+++ b/src/modules/13_salary/components/05_salaryListsEmployee/TableTypeOther.vue
@@ -28,6 +28,7 @@ const { dialogRemove, messageError, showLoader, hideLoader, success } =
/** props*/
const formFilter = defineModel("formFilter", { required: true });
const maxPage = defineModel("maxPage", { required: true });
+const snapShot = defineModel("snapShot");
const props = defineProps({
rows: { type: Array },
fetchDataTable: {
@@ -307,7 +308,11 @@ watch(
("formFilter", { required: true });
const maxPage = defineModel("maxPage", { required: true });
+const snapShot = defineModel("snapShot");
+
const props = defineProps({
rows: { type: Array },
fetchDataTable: {
@@ -335,7 +337,11 @@ watch(
{
:period-id="roundFilter.id"
:root-id="agencyFilter"
:round-filter="roundFilter"
+ :snap-shot="snapFilter"
/>
diff --git a/src/modules/13_salary/views/05_salaryListsEmployee.vue b/src/modules/13_salary/views/05_salaryListsEmployee.vue
index 18e375dc4..c50a33271 100644
--- a/src/modules/13_salary/views/05_salaryListsEmployee.vue
+++ b/src/modules/13_salary/views/05_salaryListsEmployee.vue
@@ -530,6 +530,7 @@ onMounted(async () => {
:period-id="roundFilter.id"
:root-id="agencyFilter"
:round-filter="roundFilter"
+ :snap-shot="snapFilter"
/>