Merge branch 'NiceDev' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-03-18 15:24:23 +07:00
commit 7933047d04
8 changed files with 352 additions and 75 deletions

View file

@ -248,7 +248,7 @@ async function onDownloadFile(id: string, profileId: string) {
.get(
config.API.subFileByFileName(
"ทะเบียนประวัติ",
"ประกาศเกียรติคุณ",
"เอกสารความสามารถพิเศษ",
profileId,
id,
"เอกสารหลักฐาน"
@ -328,6 +328,7 @@ onMounted(async () => {
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width />
</q-tr>
</template>
@ -344,7 +345,6 @@ onMounted(async () => {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td auto-width>
<q-btn
v-if="props.row.isUpload == true"
@ -357,6 +357,9 @@ onMounted(async () => {
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
</q-td>
<q-td auto-width>
<q-btn
color="info"
flat

View file

@ -6,6 +6,7 @@ import { ref, onMounted } from "vue";
import http from "@/plugins/http";
import config from "@/app.config";
import { useDataStore } from "@/stores/data";
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
import type { DisciplineDetail } from "@/modules/10_registry/interface/index/Main";
@ -15,6 +16,7 @@ const link = ref<string>("");
const $q = useQuasar();
const mixin = useCounterMixin();
const dataStore = useDataStore();
const { getPathUploadFlie } = useRegistryDataStore();
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
mixin;
@ -26,6 +28,8 @@ const rowsHistory = ref<DisciplineDetail[]>([]);
const rowsHistoryData = ref<DisciplineDetail[]>([]);
const mode = ref<boolean>($q.screen.gt.xs);
const fileGroup = ref<string>("เอกสารวินัย");
const modalHistory = ref<boolean>(false);
/** ตัวแปรข้อมูล */
@ -179,6 +183,11 @@ function getHistory() {
});
}
async function onDownloadFile(id: string, profileId: string) {
const data = await getPathUploadFlie(fileGroup.value, profileId, id);
window.open(data.downloadUrl, "_blank");
}
function onSearch() {
rows.value = onSearchDataTable(
filter.value,
@ -247,6 +256,7 @@ onMounted(async () => {
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width />
</q-tr>
</template>
@ -263,6 +273,20 @@ onMounted(async () => {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td auto-width>
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
</q-td>
<q-td auto-width>
<q-btn
color="info"
@ -282,18 +306,31 @@ onMounted(async () => {
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
<q-card bordered flat>
<q-list dense class="q-mt-lg relative-position">
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
class="absolute_button"
@click="onHistory(props.row.id)"
>
<q-tooltip>ประวแกไขว</q-tooltip>
</q-btn>
<div class="row absolute_button">
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
@click="onHistory(props.row.id)"
>
<q-tooltip>ประวแกไขว</q-tooltip>
</q-btn>
</div>
<q-item v-for="col in props.cols" :key="col.name">
<q-item-section class="fix_top">
<q-item-label class="text-grey-6 text-weight-medium">{{
@ -331,5 +368,6 @@ onMounted(async () => {
.fix_top {
justify-content: start !important;
margin-top: 10px;
}
</style>

View file

@ -6,6 +6,7 @@ import { ref, reactive, onMounted } from "vue";
import http from "@/plugins/http";
import config from "@/app.config";
import { useDataStore } from "@/stores/data";
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
import type { DutyFormType } from "@/modules/10_registry/interface/index/Main";
//history dialog
@ -22,6 +23,7 @@ const rowsHistoryData = ref<DutyFormType[]>([]);
const $q = useQuasar();
const mode = ref<any>($q.screen.gt.xs);
const mixin = useCounterMixin();
const { getPathUploadFlie } = useRegistryDataStore();
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
mixin;
@ -241,6 +243,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
},
]);
const fileGroup = ref<string>("เอกสารปฏิบัติราชการพิเศษ");
function onHistory(id: string) {
modalHistory.value = true;
idByRow.value = id;
@ -282,6 +286,11 @@ function getHistory() {
});
}
async function onDownloadFile(id: string, profileId: string) {
const data = await getPathUploadFlie(fileGroup.value, profileId, id);
window.open(data.downloadUrl, "_blank");
}
function onSearch() {
rows.value = onSearchDataTable(
filter.value,
@ -352,6 +361,7 @@ onMounted(async () => {
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width />
</q-tr>
</template>
@ -368,6 +378,21 @@ onMounted(async () => {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td auto-width>
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
</q-td>
<q-td auto-width>
<q-btn
color="info"
@ -387,18 +412,31 @@ onMounted(async () => {
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
<q-card bordered flat>
<q-list dense class="q-mt-lg relative-position">
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
class="absolute_button"
@click="onHistory(props.row.id)"
>
<q-tooltip>ประวแกไขปฏราชการพเศษ</q-tooltip>
</q-btn>
<div class="row absolute_button">
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
@click="onHistory(props.row.id)"
>
<q-tooltip>ประวแกไขปฏราชการพเศษ</q-tooltip>
</q-btn>
</div>
<q-item v-for="col in props.cols" :key="col.name">
<q-item-section class="fix_top">
<q-item-label class="text-grey-6 text-weight-medium">{{
@ -417,6 +455,7 @@ onMounted(async () => {
</template>
</d-table>
</div>
<DialogHistory
v-model:modal="modalHistory"
:title="'ประวัติแก้ไขปฏิบัติราชการพิเศษ'"
@ -436,5 +475,6 @@ onMounted(async () => {
.fix_top {
justify-content: start !important;
margin-top: 10px;
}
</style>

View file

@ -6,6 +6,7 @@ import { ref, onMounted } from "vue";
import http from "@/plugins/http";
import config from "@/app.config";
import { useDataStore } from "@/stores/data";
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
import type { NopaidFormType } from "@/modules/10_registry/interface/index/Main";
@ -24,6 +25,7 @@ const mode = ref<boolean>($q.screen.gt.xs);
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
mixin;
const { getPathUploadFlie } = useRegistryDataStore();
const modalHistory = ref<boolean>(false);
/** ตัวแปรข้อมูล */
@ -218,6 +220,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
},
]);
const fileGroup = ref<string>("เอกสารบันทึกวันที่ไม่ได้รับเงินเดือน");
function onHistory(id: string) {
modalHistory.value = true;
idByRow.value = id;
@ -261,6 +265,11 @@ function getHistory() {
});
}
async function onDownloadFile(id: string, profileId: string) {
const data = await getPathUploadFlie(fileGroup.value, profileId, id);
window.open(data.downloadUrl, "_blank");
}
function onSearch() {
rows.value = onSearchDataTable(
filter.value,
@ -331,6 +340,7 @@ onMounted(async () => {
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width />
</q-tr>
</template>
@ -347,6 +357,20 @@ onMounted(async () => {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td auto-width>
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
</q-td>
<q-td auto-width>
<q-btn
color="info"
@ -366,20 +390,33 @@ onMounted(async () => {
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
<q-card bordered flat>
<q-list dense class="q-mt-lg relative-position">
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
class="absolute_button"
@click="onHistory(props.row.id)"
>
<q-tooltip
>ประวแกไขบนทกวนทไมไดบเงนเดอนฯ</q-tooltip
<div class="row absolute_button">
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
</q-btn>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
@click="onHistory(props.row.id)"
>
<q-tooltip
>ประวแกไขบนทกวนทไมไดบเงนเดอนฯ</q-tooltip
>
</q-btn>
</div>
<q-item v-for="col in props.cols" :key="col.name">
<q-item-section class="fix_top">
<q-item-label class="text-grey-6 text-weight-medium">{{
@ -398,6 +435,7 @@ onMounted(async () => {
</template>
</d-table>
</div>
<DialogHistory
v-model:modal="modalHistory"
:title="'ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ'"
@ -417,5 +455,6 @@ onMounted(async () => {
.fix_top {
justify-content: start !important;
margin-top: 10px;
}
</style>

View file

@ -6,6 +6,7 @@ import { ref, reactive, onMounted } from "vue";
import http from "@/plugins/http";
import config from "@/app.config";
import { useDataStore } from "@/stores/data";
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
import type { CertificateDetail } from "@/modules/10_registry/interface/index/Main";
@ -18,6 +19,7 @@ const dataPerson = useDataStore();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
mixin;
const { getPathUploadFlie } = useRegistryDataStore();
const idByRow = ref<string>("");
const rows = ref<CertificateDetail[]>([]);
@ -216,6 +218,9 @@ const columnsHistory = ref<QTableProps["columns"]>([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const fileGroup = ref<string>("เอกสารใบอนุญาตประกอบวิชาชีพ");
function onHistory(id: string) {
modalHistory.value = true;
idByRow.value = id;
@ -263,6 +268,11 @@ function getHistory() {
});
}
async function onDownloadFile(id: string, profileId: string) {
const data = await getPathUploadFlie(fileGroup.value, profileId, id);
window.open(data.downloadUrl, "_blank");
}
function onSearch() {
rows.value = onSearchDataTable(
filter.value,
@ -333,6 +343,7 @@ onMounted(async () => {
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width />
</q-tr>
</template>
@ -349,6 +360,20 @@ onMounted(async () => {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td auto-width>
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
</q-td>
<q-td auto-width>
<q-btn
color="info"
@ -368,18 +393,31 @@ onMounted(async () => {
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
<q-card bordered flat>
<q-list dense class="q-mt-lg relative-position">
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
class="absolute_button"
@click="onHistory(props.row.id)"
>
<q-tooltip>ประวแกไขใบอนญาตประกอบวชาช</q-tooltip>
</q-btn>
<div class="row absolute_button">
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
@click="onHistory(props.row.id)"
>
<q-tooltip>ประวแกไขใบอนญาตประกอบวชาช</q-tooltip>
</q-btn>
</div>
<q-item v-for="col in props.cols" :key="col.name">
<q-item-section class="fix_top">
<q-item-label class="text-grey-6 text-weight-medium">{{
@ -398,6 +436,7 @@ onMounted(async () => {
</template>
</d-table>
</div>
<DialogHistory
v-model:modal="modalHistory"
:title="'ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ'"
@ -417,5 +456,6 @@ onMounted(async () => {
.fix_top {
justify-content: start !important;
margin-top: 10px;
}
</style>

View file

@ -6,6 +6,7 @@ import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useDataStore } from "@/stores/data";
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
import type { InsigniaFormType } from "@/modules/10_registry/interface/index/Main";
@ -25,6 +26,7 @@ const mode = ref<boolean>($q.screen.gt.xs);
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
mixin;
const { getPathUploadFlie } = useRegistryDataStore();
const modalHistory = ref<boolean>(false);
/** ตัวแปรข้อมูล */
@ -432,6 +434,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
},
]);
const fileGroup = ref<string>("เครื่องราชฯ");
function onHistory(id: string) {
modalHistory.value = true;
idByRow.value = id;
@ -479,6 +483,11 @@ function getHistory() {
});
}
async function onDownloadFile(id: string, profileId: string) {
const data = await getPathUploadFlie(fileGroup.value, profileId, id);
window.open(data.downloadUrl, "_blank");
}
function onSearch() {
rows.value = onSearchDataTable(
filter.value,
@ -549,6 +558,7 @@ onMounted(async () => {
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width />
</q-tr>
</template>
@ -567,6 +577,20 @@ onMounted(async () => {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td auto-width>
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
</q-td>
<q-td auto-width>
<q-btn
color="info"
@ -586,18 +610,32 @@ onMounted(async () => {
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
<q-card bordered flat>
<q-list dense class="q-mt-lg relative-position">
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
class="absolute_button"
@click="onHistory(props.row.id)"
>
<q-tooltip>ประวแกไขเครองราชอสรยาภรณ</q-tooltip>
</q-btn>
<div class="row absolute_button">
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
class="absolute_button"
@click="onHistory(props.row.id)"
>
<q-tooltip>ประวแกไขเครองราชอสรยาภรณ</q-tooltip>
</q-btn>
</div>
<q-item v-for="col in props.cols" :key="col.name">
<q-item-section class="fix_top">
<q-item-label class="text-grey-6 text-weight-medium">{{
@ -647,5 +685,6 @@ onMounted(async () => {
.fix_top {
justify-content: start !important;
margin-top: 10px;
}
</style>

View file

@ -7,6 +7,7 @@ import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useDataStore } from "@/stores/data";
import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry";
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
import type { HonorFormData } from "@/modules/10_registry/interface/index/Main";
@ -27,6 +28,7 @@ const mode = ref<boolean>($q.screen.gt.xs);
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
mixin;
const { getPathUploadFlie } = useRegistryDataStore();
const modalHistory = ref<boolean>(false);
/** ตัวแปรข้อมูล */
@ -218,6 +220,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
},
]);
const fileGroup = ref<string>("ประกาศเกียรติคุณ");
function onHistory(id: string) {
modalHistory.value = true;
idByRow.value = id;
@ -263,6 +267,11 @@ function getHistory() {
});
}
async function onDownloadFile(id: string, profileId: string) {
const data = await getPathUploadFlie(fileGroup.value, profileId, id);
window.open(data.downloadUrl, "_blank");
}
function onSearch() {
rows.value = onSearchDataTable(
filter.value,
@ -333,6 +342,7 @@ onMounted(async () => {
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width />
</q-tr>
</template>
@ -349,6 +359,20 @@ onMounted(async () => {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td auto-width>
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
</q-td>
<q-td auto-width>
<q-btn
color="info"
@ -368,18 +392,32 @@ onMounted(async () => {
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
<q-card bordered flat>
<q-list dense class="q-mt-lg relative-position">
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
class="absolute_button"
@click="onHistory(props.row.id)"
>
<q-tooltip>ประวแกไขประกาศเกยรต</q-tooltip>
</q-btn>
<div class="row absolute_button">
<q-btn
v-if="props.row.isUpload"
color="green"
flat
dense
round
size="14px"
icon="mdi-file-document-outline"
@click="onDownloadFile(props.row.id, props.row.profileId)"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
<q-btn
icon="mdi-history"
color="info"
flat
dense
round
size="14px"
class="absolute_button"
@click="onHistory(props.row.id)"
>
<q-tooltip>ประวแกไขประกาศเกยรต</q-tooltip>
</q-btn>
</div>
<q-item v-for="col in props.cols" :key="col.name">
<q-item-section class="fix_top">
<q-item-label class="text-grey-6 text-weight-medium">{{
@ -398,6 +436,7 @@ onMounted(async () => {
</template>
</d-table>
</div>
<DialogHistory
v-model:modal="modalHistory"
:title="'ประวัติแก้ไขประกาศเกียรติคุณ'"
@ -417,5 +456,6 @@ onMounted(async () => {
.fix_top {
justify-content: start !important;
margin-top: 10px;
}
</style>

View file

@ -0,0 +1,38 @@
import { defineStore } from "pinia";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
const $q = useQuasar();
const mixin = useCounterMixin();
const { messageError } = mixin;
export const useRegistryDataStore = defineStore("RegistryDataStoreMain", () => {
async function getPathUploadFlie(
group: string,
profileId: string,
id: string
) {
try {
const res = await http.get(
config.API.subFileByFileName(
"ทะเบียนประวัติ",
group,
profileId,
id,
"เอกสารหลักฐาน"
)
);
return res.data;
} catch (err) {
messageError($q, err);
}
}
return {
// Function
getPathUploadFlie,
};
});