- {{
- (pagination.page - 1) * pagination.rowsPerPage +
- props.rowIndex +
- 1
- }}
+ {{ props.rowIndex + 1 }}
{{ props.row.title }}
@@ -222,21 +202,7 @@ onMounted(() => {
-
- ทั้งหมด {{ total }} รายการ
-
-
-
+
diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue
index 7f4027ef5..088b511ca 100644
--- a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue
+++ b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue
@@ -9,39 +9,30 @@ import { useCounterMixin } from "@/stores/mixin";
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
import { checkPermission } from "@/utils/permissions";
+import { usePagination } from "@/composables/usePagination";
import DialogSearchAdvanced from "@/modules/11_discipline/components/DialogSearchAdvanced.vue";
+import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
+
const $q = useQuasar(); //ใช้ noti quasar
const store = useDisciplineMainStore();
const mixin = useCounterMixin();
const dataInvestigate = useInvestigateFactStore();
const { messageError, showLoader, hideLoader, convertDateToAPI } = mixin;
+const { pagination, params, onRequest } = usePagination("", getList);
-const option = ref
(dataInvestigate.statusOptions);
+const attrs = ref(useAttrs());
+const option = ref(dataInvestigate.statusOptions);
/** ค้นหาข้อมูลในตาราง */
const filterKeyword = ref("");
-const filterRef = ref(null);
const statusFilter = ref("NEW");
-const toptitle = ref(0);
-
-const total = ref(0);
-const totalList = ref(1);
-const pagination = ref({
- sortBy: "createdAt",
- descending: true,
- page: 1,
- rowsPerPage: 10,
-});
-
-const attrs = ref(useAttrs());
/** ดึงข้อมูลบสวน */
-async function getList(page?: number) {
+async function getList() {
const body = {
- page: page ? page : pagination.value.page,
- pageSize: pagination.value.rowsPerPage,
+ ...params.value,
keyword: filterKeyword.value.trim(),
status: statusFilter.value,
...(store.formInvestigateFacts.respondentType && {
@@ -82,14 +73,9 @@ async function getList(page?: number) {
await http
.post(config.API.investigateMain(), body)
.then(async (res) => {
- totalList.value = Math.ceil(
- res.data.result.total / pagination.value.rowsPerPage
- );
- total.value = res.data.result.total;
- toptitle.value = res.data.result.total;
-
- const data = res.data.result.data;
- await dataInvestigate.fecthList(data);
+ const result = res.data.result;
+ pagination.value.rowsNumber = result.total;
+ await dataInvestigate.fecthList(result.data);
})
.catch((e) => {
messageError($q, e);
@@ -104,7 +90,7 @@ async function getList(page?: number) {
* @param id ไอดีเฉพาะ รายบุคคล
*/
async function editPage(id: string) {
- dataInvestigate.tabMenu = await "investigatefacts";
+ dataInvestigate.tabMenu = "investigatefacts";
router.push(`/discipline/investigatefacts/${id}`);
}
/**
@@ -112,7 +98,7 @@ async function editPage(id: string) {
* @param id ไอดีเฉพาะ รายบุคคล
*/
async function detailPage(id: string) {
- dataInvestigate.tabMenu = await "investigatefacts";
+ dataInvestigate.tabMenu = "investigatefacts";
router.push(`/discipline-detail/investigatefacts/${id}`);
}
@@ -129,27 +115,12 @@ function filterOptionFn(val: string, update: Function) {
});
}
-function updatePagination(newPagination: any) {
- pagination.value.page = 1;
- pagination.value.rowsPerPage = newPagination.rowsPerPage;
-}
-
-function getSerach() {
+function getSearch() {
pagination.value.page = 1;
getList();
}
-watch(
- () => pagination.value.rowsPerPage,
- async () => {
- getSerach();
- }
-);
-
-/**เมื่อเริ่มโหลดหน้า
- * ส่งข้อมูลจำลองไปยัง store
- */
-onMounted(async () => {
+onMounted(() => {
getList();
});
@@ -158,173 +129,175 @@ onMounted(async () => {
รายการสืบสวนข้อเท็จจริง
-
-
-
-
-
- ไม่มีข้อมูล
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/modules/11_discipline/components/6_BasicInformation/Director/MainPage.vue b/src/modules/11_discipline/components/6_BasicInformation/Director/MainPage.vue
index 143567a8d..bb8773bd9 100644
--- a/src/modules/11_discipline/components/6_BasicInformation/Director/MainPage.vue
+++ b/src/modules/11_discipline/components/6_BasicInformation/Director/MainPage.vue
@@ -1,5 +1,5 @@
รายการชื่อกรรมการ
-
-
-
-
- เพิ่มรายชื่อกรรมการ
-
+
+
+
+
+
+
+
+ เพิ่มรายชื่อกรรมการ
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- ทั้งหมด {{ total }} รายการ
-
-
-
-
-
-
- {{ col.label }}
-
-
-
-
-
-
-
- รายละเอียด
-
-
- แก้ไขข้อมูล
-
-
- ลบข้อมูล
-
-
-
-
- {{
- (pagination.page - 1) * pagination.rowsPerPage +
- props.rowIndex +
- 1
- }}
-
-
- {{ props.row.totalInvestigate }}
-
-
- {{ props.row.totalDisciplinary }}
-
-
- {{ col.value ?? "-" }}
-
-
-
-
-
+
+
+
+
+
+
+ {{ col.label }}
+
+
+
+
+
+
+
+ รายละเอียด
+
+
+ แก้ไขข้อมูล
+
+
+ ลบข้อมูล
+
+
+
+
+ {{ props.rowIndex + 1 }}
+
+
+ {{ props.row.totalInvestigate }}
+
+
+ {{ props.row.totalDisciplinary }}
+
+
+ {{ col.value ?? "-" }}
+
+
+
+
+
+
diff --git a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue
index bb391a6a0..bb73d2036 100644
--- a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue
+++ b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue
@@ -1,5 +1,5 @@
-
-
- ค้นหาขั้นสูง
-
-
+
+ ค้นหาขั้นสูง
+
+
diff --git a/src/modules/11_discipline/store/AppealComplainStore.ts b/src/modules/11_discipline/store/AppealComplainStore.ts
index 33602437c..d4a346349 100644
--- a/src/modules/11_discipline/store/AppealComplainStore.ts
+++ b/src/modules/11_discipline/store/AppealComplainStore.ts
@@ -63,7 +63,7 @@ export const useAppealComplainStore = defineStore("AppealComplainStore", () => {
* จัดเรียงข้อมูล
* @param data ข้อมูลที่รับมาจาก API
*/
- function fetchAppealComplain(data: MainList[]) {
+ async function fetchAppealComplain(data: MainList[]) {
let dataList: RowList[] = data.map((e: MainList) => ({
id: e.id,
profileId: e.profileId,
diff --git a/src/modules/11_discipline/store/DirectorStore.ts b/src/modules/11_discipline/store/DirectorStore.ts
index 446b251cf..2fe690146 100644
--- a/src/modules/11_discipline/store/DirectorStore.ts
+++ b/src/modules/11_discipline/store/DirectorStore.ts
@@ -14,7 +14,7 @@ export const useDisciplineDirectorDataStore = defineStore(
const rows = ref([]);
const visibleColumns = ref([
"no",
- "fullName",
+ "firstName",
"position",
"email",
"phone",
@@ -34,7 +34,7 @@ export const useDisciplineDirectorDataStore = defineStore(
style: "font-size: 14px",
},
{
- name: "fullName",
+ name: "firstName",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
diff --git a/src/modules/11_discipline/store/InvestigateDisStore.ts b/src/modules/11_discipline/store/InvestigateDisStore.ts
index b775fc394..d93cdce23 100644
--- a/src/modules/11_discipline/store/InvestigateDisStore.ts
+++ b/src/modules/11_discipline/store/InvestigateDisStore.ts
@@ -4,7 +4,7 @@ import type { QTableProps } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
-import type { Persons } from "@/modules/11_discipline/interface/request/Disciplinary";
+import type { Persons } from "@/modules/11_discipline/interface/request/disciplinary";
import type {
investigateDisDataRowType,
DataOption,
@@ -81,7 +81,7 @@ export const useInvestigateDisStore = defineStore(
"offenseDetails",
"disciplinaryFaultLevel",
"disciplinaryCaseFault",
- "disciplinaryDate",
+ "disciplinaryDateStart",
"dateReceived",
"status",
]);
@@ -113,8 +113,6 @@ export const useInvestigateDisStore = defineStore(
field: "respondentType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "offenseDetails",
@@ -124,8 +122,6 @@ export const useInvestigateDisStore = defineStore(
field: "offenseDetails",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "disciplinaryFaultLevel",
@@ -135,8 +131,6 @@ export const useInvestigateDisStore = defineStore(
field: "disciplinaryFaultLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "disciplinaryCaseFault",
@@ -146,11 +140,9 @@ export const useInvestigateDisStore = defineStore(
field: "disciplinaryCaseFault",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
- name: "disciplinaryDate",
+ name: "disciplinaryDateStart",
align: "left",
label: "วันที่สอบสวน",
sortable: true,
@@ -171,7 +163,7 @@ export const useInvestigateDisStore = defineStore(
name: "status",
align: "left",
label: "สถานะ",
- sortable: true,
+ sortable: false,
field: "status",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
diff --git a/src/modules/11_discipline/store/InvestigateFactStore.ts b/src/modules/11_discipline/store/InvestigateFactStore.ts
index 8c0240907..54d3c0f75 100644
--- a/src/modules/11_discipline/store/InvestigateFactStore.ts
+++ b/src/modules/11_discipline/store/InvestigateFactStore.ts
@@ -67,7 +67,7 @@ export const useInvestigateFactStore = defineStore(
"respondentType",
"offenseDetails",
"investigationDetail",
- "dateInvestigate",
+ "investigationDateStart",
"investigationStatusResult",
"dateReceived",
"status",
@@ -101,8 +101,6 @@ export const useInvestigateFactStore = defineStore(
field: "respondentType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "offenseDetails",
@@ -112,8 +110,6 @@ export const useInvestigateFactStore = defineStore(
field: "offenseDetails",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "investigationDetail",
@@ -123,19 +119,15 @@ export const useInvestigateFactStore = defineStore(
field: "investigationDetail",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
- name: "dateInvestigate",
+ name: "investigationDateStart",
align: "left",
label: "วันที่สืบสวน",
sortable: true,
field: "dateInvestigate",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "investigationStatusResult",
@@ -145,8 +137,6 @@ export const useInvestigateFactStore = defineStore(
field: "investigationStatusResult",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "dateReceived",
@@ -156,8 +146,6 @@ export const useInvestigateFactStore = defineStore(
field: "dateReceived",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "status",
diff --git a/src/modules/11_discipline/store/ResultStore.ts b/src/modules/11_discipline/store/ResultStore.ts
index 54406a2fc..b7b4020c6 100644
--- a/src/modules/11_discipline/store/ResultStore.ts
+++ b/src/modules/11_discipline/store/ResultStore.ts
@@ -42,7 +42,7 @@ export const useDisciplineResultStore = defineStore(
"offenseDetails",
"disciplinaryFaultLevel",
"disciplinaryCaseFault",
- "disciplinaryDate",
+ "disciplinaryDateStart",
"resultDisciplineType",
"resultTitleType",
"resultOc",
@@ -77,8 +77,6 @@ export const useDisciplineResultStore = defineStore(
field: "respondentType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "offenseDetails",
@@ -88,8 +86,6 @@ export const useDisciplineResultStore = defineStore(
field: "offenseDetails",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "disciplinaryFaultLevel",
@@ -99,8 +95,6 @@ export const useDisciplineResultStore = defineStore(
field: "disciplinaryFaultLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "disciplinaryCaseFault",
@@ -110,11 +104,9 @@ export const useDisciplineResultStore = defineStore(
field: "disciplinaryCaseFault",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
- sort: (a: string, b: string) =>
- a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
- name: "disciplinaryDate",
+ name: "disciplinaryDateStart",
align: "left",
label: "วันที่สอบสวน",
sortable: true,
@@ -162,7 +154,7 @@ export const useDisciplineResultStore = defineStore(
name: "status",
align: "left",
label: "สถานะ",
- sortable: true,
+ sortable: false,
field: "status",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
diff --git a/src/modules/15_development/components/Record.vue b/src/modules/15_development/components/Record.vue
index 79052b211..de565e046 100644
--- a/src/modules/15_development/components/Record.vue
+++ b/src/modules/15_development/components/Record.vue
@@ -340,7 +340,11 @@ onMounted(() => {
-
+
{{ col.value ? col.value : "-" }}
diff --git a/src/modules/18_command/components/DialogCreateCommand.vue b/src/modules/18_command/components/DialogCreateCommand.vue
index 0c8d17e03..d29ce53f6 100644
--- a/src/modules/18_command/components/DialogCreateCommand.vue
+++ b/src/modules/18_command/components/DialogCreateCommand.vue
@@ -438,8 +438,8 @@ watch(
:model-value="
commandYear == null ? null : commandYear + 543
"
- :label="`${'พ.ศ.'}`"
- :rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
+ label="ปี พ.ศ."
+ :rules="[(val:string) => !!val || 'กรุณากรอกปี พ.ศ.']"
>
{
:model-value="
commandYear == null ? null : commandYear + 543
"
- :label="`${'พ.ศ.'}`"
- :rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
+ label="ปี พ.ศ."
+ :rules="[(val:string) => !!val || 'กรุณากรอกปี พ.ศ.']"
>
{
:model-value="
commandYear == null ? null : commandYear + 543
"
- :label="`${'พ.ศ.'}`"
- :rules="[(val:string) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
+ label="ปี พ.ศ."
+ :rules="[(val:string) => !!val || 'กรุณากรอกปี พ.ศ.']"
>
{
? null
: formData.commandYear + 543
"
- :label="`${'พ.ศ.'}`"
+ label="ปี พ.ศ."
>
([
]);
//ฟอร์มช้อมูลการค้นหา
const queryParams = reactive({
- year: calculateFiscalYear(new Date()), //ปีงบประมาณ
+ year: new Date().getFullYear(), //พ.ศ.
keyword: "", //คำค้นหา
commandTypeId: "",
});
@@ -126,7 +125,7 @@ onMounted(async () => {
:model-value="
queryParams.year == null ? null : queryParams.year + 543
"
- :label="`${'ปีงบประมาณ'}`"
+ label="ปี พ.ศ."
>