Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m55s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m55s
This commit is contained in:
commit
cbc477a2fe
10 changed files with 69 additions and 99 deletions
|
|
@ -5,6 +5,7 @@ import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { getColumnLabel } from "@/utils/function";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
|
|
@ -65,15 +66,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "actFullName",
|
|
||||||
align: "left",
|
|
||||||
label: "รักษาการแทน",
|
|
||||||
field: "actFullName",
|
|
||||||
sortable: true,
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const total = ref<number>(0);
|
const total = ref<number>(0);
|
||||||
|
|
@ -258,7 +250,9 @@ watch(modal, (val) => {
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">
|
||||||
|
{{ getColumnLabel(col, isAct) }}
|
||||||
|
</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const columnsMember = ref<QTableProps["columns"]>([
|
const baseColumnsMember = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -236,17 +236,20 @@ const columnsMember = ref<QTableProps["columns"]>([
|
||||||
}`;
|
}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "actFullName",
|
|
||||||
align: "left",
|
|
||||||
label: "รักษาการแทน",
|
|
||||||
sortable: true,
|
|
||||||
field: "actFullName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const columnsMember = computed(() => {
|
||||||
|
if (isAct.value) {
|
||||||
|
const actColumns = JSON.parse(JSON.stringify(baseColumnsMember.value));
|
||||||
|
const posNoCol = actColumns.find((col: any) => col.name === "posNo");
|
||||||
|
if (posNoCol) {
|
||||||
|
posNoCol.label = "เลขที่ตำแหน่ง (รักษาการแทน)";
|
||||||
|
}
|
||||||
|
return actColumns;
|
||||||
|
}
|
||||||
|
return baseColumnsMember.value;
|
||||||
|
});
|
||||||
|
|
||||||
/** เพิ่ม คณะกรรมการ */
|
/** เพิ่ม คณะกรรมการ */
|
||||||
function onAdd() {
|
function onAdd() {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
|
|
@ -315,11 +318,6 @@ async function getPerson() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result.data;
|
const data = await res.data.result.data;
|
||||||
const dataTotal = await res.data.result.total;
|
const dataTotal = await res.data.result.total;
|
||||||
|
|
||||||
// rowsDirector.value = data.filter(
|
|
||||||
// (item: MemBerType, index: number, self: any[]) =>
|
|
||||||
// index === self.findIndex((t: any) => t.id === item.id)
|
|
||||||
// );
|
|
||||||
rowsDirector.value = data.filter(
|
rowsDirector.value = data.filter(
|
||||||
(item: MemBerType) =>
|
(item: MemBerType) =>
|
||||||
!rows.value.some((i: PersonsAppointData) => i.profileId == item.id)
|
!rows.value.some((i: PersonsAppointData) => i.profileId == item.id)
|
||||||
|
|
@ -443,6 +441,7 @@ async function onDirector() {
|
||||||
await getPerson();
|
await getPerson();
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onAct() {
|
async function onAct() {
|
||||||
pagination.value.page = 1;
|
pagination.value.page = 1;
|
||||||
isDirector.value = false;
|
isDirector.value = false;
|
||||||
|
|
@ -725,22 +724,8 @@ onMounted(async () => {
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
@update:pagination="updatePagination"
|
@update:pagination="updatePagination"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
|
||||||
ทั้งหมด {{ total.toLocaleString() }} รายการ
|
|
||||||
<q-pagination
|
|
||||||
v-model="pagination.page"
|
|
||||||
active-color="primary"
|
|
||||||
color="dark"
|
|
||||||
:max="Number(totalList)"
|
|
||||||
size="sm"
|
|
||||||
boundary-links
|
|
||||||
direction-links
|
|
||||||
:max-pages="5"
|
|
||||||
@update:model-value="getPerson()"
|
|
||||||
></q-pagination>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-slot:header-selection="scope"> </template>
|
<template v-slot:header-selection="scope"> </template>
|
||||||
|
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
|
|
@ -780,6 +765,21 @@ onMounted(async () => {
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ total.toLocaleString() }} รายการ
|
||||||
|
<q-pagination
|
||||||
|
v-model="pagination.page"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="Number(totalList)"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
:max-pages="5"
|
||||||
|
@update:model-value="getPerson()"
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { getColumnLabel } from "@/utils/function";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
|
|
@ -83,16 +84,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
name: "actFullName",
|
|
||||||
align: "left",
|
|
||||||
label: "รักษาการแทน",
|
|
||||||
sortable: true,
|
|
||||||
field: "actFullName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function onCloseDialog() {
|
function onCloseDialog() {
|
||||||
|
|
@ -232,7 +223,9 @@ watch(modal, (val) => {
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">
|
||||||
|
{{ getColumnLabel(col, isAct) }}</span
|
||||||
|
>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { useQuasar, type QTableProps } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { getColumnLabel } from "@/utils/function";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
@ -78,15 +78,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "actFullName",
|
|
||||||
align: "left",
|
|
||||||
label: "รักษาการแทน",
|
|
||||||
field: "actFullName",
|
|
||||||
sortable: true,
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function onSearchData() {
|
function onSearchData() {
|
||||||
|
|
@ -315,7 +306,9 @@ watch(
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{
|
||||||
|
getColumnLabel(col, isAct)
|
||||||
|
}}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { useQuasar, type QTableProps } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { getColumnLabel } from "@/utils/function";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
@ -81,15 +81,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "actFullName",
|
|
||||||
align: "left",
|
|
||||||
label: "รักษาการแทน",
|
|
||||||
field: "actFullName",
|
|
||||||
sortable: true,
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function onSearchData() {
|
function onSearchData() {
|
||||||
|
|
@ -107,10 +98,6 @@ function getSearch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getData() {
|
async function getData() {
|
||||||
// const url =
|
|
||||||
// props.type == "COMMANDER"
|
|
||||||
// ? config.API.workflowCommanderOperate
|
|
||||||
// : config.API.workflowCommanderSign;
|
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.workflowCommanderOperate, {
|
.put(config.API.workflowCommanderOperate, {
|
||||||
|
|
@ -324,7 +311,9 @@ watch(
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{
|
||||||
|
getColumnLabel(col, isAct)
|
||||||
|
}}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -55,9 +55,10 @@ const modalDialogGov = ref<boolean>(false); // popup เลือกข้าร
|
||||||
|
|
||||||
const budgetSourceOp = ref<DataOption[]>([
|
const budgetSourceOp = ref<DataOption[]>([
|
||||||
{ id: "BKK", name: "งบประมาณ กทม." },
|
{ id: "BKK", name: "งบประมาณ กทม." },
|
||||||
{ id: "HOSPITAL", name: "เงินนอกงบประมาณ" },
|
{ id: "OFFFUND", name: "เงินนอกงบประมาณ" },
|
||||||
{ id: "FUND", name: "เงินกองทุน" },
|
{ id: "FUND", name: "เงินกองทุน" },
|
||||||
{ id: "SUBSIDY", name: "เงินอุดหนุน" },
|
{ id: "SUBSIDY", name: "เงินอุดหนุน" },
|
||||||
|
{ id: "HOSPITAL", name: "เงินบำรุงโรงพยาบาล" },
|
||||||
{ id: "OTHER", name: "เงินอื่น ๆ" },
|
{ id: "OTHER", name: "เงินอื่น ๆ" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,8 @@ function conventStatus(val: string) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "PENDING":
|
case "PENDING":
|
||||||
return "กำลังศึกษา";
|
return "กำลังศึกษา";
|
||||||
|
case "REPORTED":
|
||||||
|
return "รายงานตัวกลับเข้าปฏิบัติราชการแล้ว";
|
||||||
case "GRADUATE":
|
case "GRADUATE":
|
||||||
return "เรียนจบ";
|
return "เรียนจบ";
|
||||||
case "NOTGRADUATE":
|
case "NOTGRADUATE":
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { useQuasar, type QTableProps } from "quasar";
|
||||||
import { usePagination } from "@/composables/usePagination";
|
import { usePagination } from "@/composables/usePagination";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { getColumnLabel } from "@/utils/function";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -64,15 +65,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "actFullName",
|
|
||||||
align: "left",
|
|
||||||
label: "รักษาการแทน",
|
|
||||||
field: "actFullName",
|
|
||||||
sortable: true,
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const roleName = ref<string>("");
|
const roleName = ref<string>("");
|
||||||
|
|
@ -282,7 +274,7 @@ watch(modal, (newVal) => {
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ getColumnLabel(col, isAct) }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import { useRoute, useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useCommandDetail } from "@/modules/18_command/store/DetailStore";
|
import { useCommandDetail } from "@/modules/18_command/store/DetailStore";
|
||||||
import { usePagination } from "@/composables/usePagination";
|
import { usePagination } from "@/composables/usePagination";
|
||||||
|
import { getColumnLabel } from "@/utils/function";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -111,16 +112,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
name: "actFullName",
|
|
||||||
align: "left",
|
|
||||||
label: "รักษาการแทน",
|
|
||||||
sortable: true,
|
|
||||||
field: "actFullName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//รอผู้มีอำนาจลงนามอนุมัติ
|
//รอผู้มีอำนาจลงนามอนุมัติ
|
||||||
|
|
@ -776,7 +767,9 @@ onMounted(async () => {
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{
|
||||||
|
getColumnLabel(col, isAct)
|
||||||
|
}}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -60,3 +60,16 @@ export function calculateAge(birthDate: Date | null) {
|
||||||
|
|
||||||
return `${years} ปี ${months} เดือน ${days} วัน`;
|
return `${years} ปี ${months} เดือน ${days} วัน`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* คืนค่าชื่อคอลัมน์ตามเงื่อนไข
|
||||||
|
* @param col คอลัมน์
|
||||||
|
* @param isAct สถานะรักษาการแทน
|
||||||
|
* @returns ชื่อคอลัมน์
|
||||||
|
*/
|
||||||
|
export function getColumnLabel(col: any, isAct: boolean) {
|
||||||
|
if (col.name === "posNo" && isAct) {
|
||||||
|
return `${col.label} (รักษาการแทน)`;
|
||||||
|
}
|
||||||
|
return col.label;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue