Merge branch 'develop'
This commit is contained in:
commit
4e014ac299
19 changed files with 1062 additions and 450 deletions
|
|
@ -9,6 +9,9 @@ interface ProfileData {
|
||||||
posLevelName: string;
|
posLevelName: string;
|
||||||
posNo: string;
|
posNo: string;
|
||||||
profileId: string;
|
profileId: string;
|
||||||
|
citizenId?: string;
|
||||||
|
salary?: number|null;
|
||||||
|
birthDate?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface InformationData {
|
interface InformationData {
|
||||||
|
|
|
||||||
|
|
@ -790,6 +790,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
|
downloadFileRef &&
|
||||||
store.step >= store.currentStep &&
|
store.step >= store.currentStep &&
|
||||||
store.step == 6 &&
|
store.step == 6 &&
|
||||||
store.statusUpload
|
store.statusUpload
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,13 @@ import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useDataStore } from "@/stores/data";
|
||||||
|
|
||||||
import type { FormCommandSe } from "@/modules/06_evaluate/interface/evalute";
|
import type { FormCommandSe } from "@/modules/06_evaluate/interface/evalute";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const dataPerson = useDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, messageError, showLoader, hideLoader } = mixin;
|
const { dialogConfirm, messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
|
|
@ -28,9 +30,19 @@ const formData = reactive<FormCommandSe>({
|
||||||
*/
|
*/
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
|
const body = {
|
||||||
|
...formData,
|
||||||
|
citizenId: dataPerson.formData.citizenId,
|
||||||
|
prefix: dataPerson.formData.prefix,
|
||||||
|
fullName: `${dataPerson.formData.prefix}${dataPerson.formData.firstName} ${dataPerson.formData.lastName}`,
|
||||||
|
position: dataPerson.formData.position,
|
||||||
|
salary: dataPerson.formData.salary?.toString(),
|
||||||
|
posNo: dataPerson.formData.posNo,
|
||||||
|
birthDate: dataPerson.formData.birthDate,
|
||||||
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(config.API.evaluationExpertise, formData)
|
.post(config.API.evaluationExpertise, body)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
router.push(`/evaluate/detail/expertise/${res.data.result.id}`);
|
router.push(`/evaluate/detail/expertise/${res.data.result.id}`);
|
||||||
})
|
})
|
||||||
|
|
@ -89,7 +101,6 @@ onMounted(() => {
|
||||||
<div>ประเมินเชี่ยวชาญ</div>
|
<div>ประเมินเชี่ยวชาญ</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-12 col-md-11 row q-col-gutter-md">
|
<div class="col-xs-12 col-sm-12 col-md-11 row q-col-gutter-md">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-card bordered>
|
<q-card bordered>
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"other",
|
"other",
|
||||||
"fundName",
|
"fundName",
|
||||||
"isEducation",
|
"isEducation",
|
||||||
|
"isHigh",
|
||||||
"endDate",
|
"endDate",
|
||||||
"startDate",
|
"startDate",
|
||||||
"finishDate",
|
"finishDate",
|
||||||
|
|
@ -120,6 +121,20 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "isHigh",
|
||||||
|
align: "left",
|
||||||
|
label: "วุฒิการศึกษาสูงสุด",
|
||||||
|
sortable: true,
|
||||||
|
field: "isHigh",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => (v === true ? "ใช่" : v === false ? "ไม่ใช่" : "-"),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "degree",
|
name: "degree",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -320,6 +335,20 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "isHigh",
|
||||||
|
align: "left",
|
||||||
|
label: "วุฒิการศึกษาสูงสุด",
|
||||||
|
sortable: true,
|
||||||
|
field: "isHigh",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => (v === true ? "ใช่" : v === false ? "ไม่ใช่" : "-"),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "degree",
|
name: "degree",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -455,6 +484,7 @@ const visibleColumnsHistory = ref<string[]>([
|
||||||
"other",
|
"other",
|
||||||
"fundName",
|
"fundName",
|
||||||
"isEducation",
|
"isEducation",
|
||||||
|
"isHigh",
|
||||||
"endDate",
|
"endDate",
|
||||||
"startDate",
|
"startDate",
|
||||||
"finishDate",
|
"finishDate",
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,34 @@ function onSearch() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังก์ชันโหลไฟลเอกสารหลักฐาน
|
||||||
|
* @param id รายการที่ต้องการโหลด
|
||||||
|
*/
|
||||||
|
async function onDownloadFile(id: string, profileId: string) {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(
|
||||||
|
config.API.subFileByFileName(
|
||||||
|
"ทะเบียนประวัติ",
|
||||||
|
"เอกสารความสามารถพิเศษ",
|
||||||
|
profileId,
|
||||||
|
id,
|
||||||
|
"เอกสารหลักฐาน"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.then(async (res) => {
|
||||||
|
const data = res.data;
|
||||||
|
window.open(data.downloadUrl, "_blank");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
link.value = await dataStore.getProFileType();
|
link.value = await dataStore.getProFileType();
|
||||||
await getData();
|
await getData();
|
||||||
|
|
@ -300,6 +328,7 @@ onMounted(async () => {
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -316,6 +345,20 @@ onMounted(async () => {
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
v-if="props.row.isUpload == true"
|
||||||
|
color="green"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
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-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="info"
|
color="info"
|
||||||
|
|
@ -336,18 +379,31 @@ onMounted(async () => {
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
<q-card bordered flat>
|
<q-card bordered flat>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<div class="row absolute_button">
|
||||||
icon="mdi-history"
|
<q-btn
|
||||||
color="info"
|
v-if="props.row.isUpload == true"
|
||||||
flat
|
color="green"
|
||||||
dense
|
flat
|
||||||
round
|
dense
|
||||||
size="14px"
|
round
|
||||||
class="absolute_button"
|
size="14px"
|
||||||
@click="onHistory(props.row.id)"
|
icon="mdi-file-document-outline"
|
||||||
>
|
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
||||||
<q-tooltip>ประวัติแก้ไขความสามารถพิเศษ</q-tooltip>
|
>
|
||||||
</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 v-for="col in props.cols" :key="col.name">
|
||||||
<q-item-section class="fix_top">
|
<q-item-section class="fix_top">
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
|
|
@ -385,5 +441,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
.fix_top {
|
.fix_top {
|
||||||
justify-content: start !important;
|
justify-content: start !important;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,10 @@ import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||||
const link = ref<string>("");
|
const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataPerson = useDataStore()
|
const dataPerson = useDataStore();
|
||||||
const checkType = ref<boolean>(dataPerson.officerType == 'OFFICER' ? true:false)
|
const checkType = ref<boolean>(
|
||||||
|
dataPerson.officerType == "OFFICER" ? true : false
|
||||||
|
);
|
||||||
const store = useRegistryInFormationStore();
|
const store = useRegistryInFormationStore();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai, dateToISO } = mixin;
|
const { showLoader, hideLoader, messageError, date2Thai, dateToISO } = mixin;
|
||||||
|
|
||||||
|
|
@ -383,7 +385,7 @@ function getData() {
|
||||||
/** get history */
|
/** get history */
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
const url =
|
const url =
|
||||||
dataPerson.officerType == 'OFFICER'
|
dataPerson.officerType == "OFFICER"
|
||||||
? config.API.dataUserGovernmentHistory("")
|
? config.API.dataUserGovernmentHistory("")
|
||||||
: config.API.dataUserGovernmentHistory("-employee");
|
: config.API.dataUserGovernmentHistory("-employee");
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -402,7 +404,7 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async() => {
|
onMounted(async () => {
|
||||||
link.value = await dataPerson.getProFileType();
|
link.value = await dataPerson.getProFileType();
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
|
|
@ -433,31 +435,25 @@ onMounted(async() => {
|
||||||
{{ formData.org ? formData.org : "-" }}
|
{{ formData.org ? formData.org : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-5 text-grey-6 text-weight-medium">
|
<div class="col-5 text-grey-6 text-weight-medium">
|
||||||
{{ checkType ? 'ตำแหน่งในสายงาน':'ตำแหน่ง' }}
|
{{ checkType ? "ตำแหน่งในสายงาน" : "ตำแหน่ง" }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7">
|
<div class="col-7">
|
||||||
{{ formData.position ? formData.position : "-" }}
|
{{ formData.position ? formData.position : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-5 text-grey-6 text-weight-medium">
|
<div class="col-5 text-grey-6 text-weight-medium">
|
||||||
ตำแหน่งเลขที่
|
{{ checkType ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่" }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7">
|
<div class="col-7">
|
||||||
{{ formData.posMasterNo ? formData.posMasterNo : "-" }}
|
{{ formData.posMasterNo ? formData.posMasterNo : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div v-if="checkType" class="col-5 text-grey-6 text-weight-medium">
|
||||||
v-if="checkType"
|
|
||||||
class="col-5 text-grey-6 text-weight-medium"
|
|
||||||
>
|
|
||||||
ตำแหน่งทางการบริหาร
|
ตำแหน่งทางการบริหาร
|
||||||
</div>
|
</div>
|
||||||
<div v-if="checkType" class="col-7">
|
<div v-if="checkType" class="col-7">
|
||||||
{{ formData.posExecutive ? formData.posExecutive : "-" }}
|
{{ formData.posExecutive ? formData.posExecutive : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div v-if="checkType" class="col-5 text-grey-6 text-weight-medium">
|
||||||
v-if="checkType"
|
|
||||||
class="col-5 text-grey-6 text-weight-medium"
|
|
||||||
>
|
|
||||||
ด้านทางการบริหาร
|
ด้านทางการบริหาร
|
||||||
</div>
|
</div>
|
||||||
<div v-if="checkType" class="col-7">
|
<div v-if="checkType" class="col-7">
|
||||||
|
|
@ -472,19 +468,14 @@ onMounted(async() => {
|
||||||
|
|
||||||
<div class="col-12 col-sm-12 col-md-6">
|
<div class="col-12 col-sm-12 col-md-6">
|
||||||
<div class="row q-col-gutter-y-sm">
|
<div class="row q-col-gutter-y-sm">
|
||||||
<div
|
<div v-if="checkType" class="col-5 text-grey-6 text-weight-medium">
|
||||||
v-if="checkType"
|
|
||||||
class="col-5 text-grey-6 text-weight-medium"
|
|
||||||
>
|
|
||||||
สายงาน
|
สายงาน
|
||||||
</div>
|
</div>
|
||||||
<div v-if="checkType" class="col-7">
|
<div v-if="checkType" class="col-7">
|
||||||
{{ formData.positionField ? formData.positionField : "-" }}
|
{{ formData.positionField ? formData.positionField : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-5 text-grey-6 text-weight-medium">
|
<div class="col-5 text-grey-6 text-weight-medium">
|
||||||
{{
|
{{ checkType ? "ตำแหน่งประเภท" : "กลุ่มงาน" }}
|
||||||
checkType ? "ตำแหน่งประเภท" : "กลุ่มงาน"
|
|
||||||
}}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7">
|
<div class="col-7">
|
||||||
{{ formData.posType ? formData.posType : "-" }}
|
{{ formData.posType ? formData.posType : "-" }}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { ref, onMounted } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
|
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
|
||||||
|
|
||||||
import type { DisciplineDetail } from "@/modules/10_registry/interface/index/Main";
|
import type { DisciplineDetail } from "@/modules/10_registry/interface/index/Main";
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const dataStore = useDataStore();
|
const dataStore = useDataStore();
|
||||||
|
const { getPathUploadFlie } = useRegistryDataStore();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
||||||
mixin;
|
mixin;
|
||||||
|
|
||||||
|
|
@ -26,6 +28,8 @@ const rowsHistory = ref<DisciplineDetail[]>([]);
|
||||||
const rowsHistoryData = ref<DisciplineDetail[]>([]);
|
const rowsHistoryData = ref<DisciplineDetail[]>([]);
|
||||||
const mode = ref<boolean>($q.screen.gt.xs);
|
const mode = ref<boolean>($q.screen.gt.xs);
|
||||||
|
|
||||||
|
const fileGroup = ref<string>("เอกสารวินัย");
|
||||||
|
|
||||||
const modalHistory = ref<boolean>(false);
|
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() {
|
function onSearch() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filter.value,
|
filter.value,
|
||||||
|
|
@ -247,6 +256,7 @@ onMounted(async () => {
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -263,6 +273,20 @@ onMounted(async () => {
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</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-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="info"
|
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">
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
<q-card bordered flat>
|
<q-card bordered flat>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<div class="row absolute_button">
|
||||||
icon="mdi-history"
|
<q-btn
|
||||||
color="info"
|
v-if="props.row.isUpload"
|
||||||
flat
|
color="green"
|
||||||
dense
|
flat
|
||||||
round
|
dense
|
||||||
size="14px"
|
round
|
||||||
class="absolute_button"
|
size="14px"
|
||||||
@click="onHistory(props.row.id)"
|
icon="mdi-file-document-outline"
|
||||||
>
|
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
||||||
<q-tooltip>ประวัติแก้ไขวินัย</q-tooltip>
|
>
|
||||||
</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 v-for="col in props.cols" :key="col.name">
|
||||||
<q-item-section class="fix_top">
|
<q-item-section class="fix_top">
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
|
|
@ -331,5 +368,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
.fix_top {
|
.fix_top {
|
||||||
justify-content: start !important;
|
justify-content: start !important;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { ref, reactive, onMounted } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
|
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
|
||||||
|
|
||||||
import type { DutyFormType } from "@/modules/10_registry/interface/index/Main";
|
import type { DutyFormType } from "@/modules/10_registry/interface/index/Main";
|
||||||
//history dialog
|
//history dialog
|
||||||
|
|
@ -22,6 +23,7 @@ const rowsHistoryData = ref<DutyFormType[]>([]);
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mode = ref<any>($q.screen.gt.xs);
|
const mode = ref<any>($q.screen.gt.xs);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
const { getPathUploadFlie } = useRegistryDataStore();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
||||||
mixin;
|
mixin;
|
||||||
|
|
||||||
|
|
@ -241,6 +243,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const fileGroup = ref<string>("เอกสารปฏิบัติราชการพิเศษ");
|
||||||
|
|
||||||
function onHistory(id: string) {
|
function onHistory(id: string) {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
idByRow.value = id;
|
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() {
|
function onSearch() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filter.value,
|
filter.value,
|
||||||
|
|
@ -352,6 +361,7 @@ onMounted(async () => {
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -368,6 +378,21 @@ onMounted(async () => {
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</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-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="info"
|
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">
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
<q-card bordered flat>
|
<q-card bordered flat>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<div class="row absolute_button">
|
||||||
icon="mdi-history"
|
<q-btn
|
||||||
color="info"
|
v-if="props.row.isUpload"
|
||||||
flat
|
color="green"
|
||||||
dense
|
flat
|
||||||
round
|
dense
|
||||||
size="14px"
|
round
|
||||||
class="absolute_button"
|
size="14px"
|
||||||
@click="onHistory(props.row.id)"
|
icon="mdi-file-document-outline"
|
||||||
>
|
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
||||||
<q-tooltip>ประวัติแก้ไขปฏิบัติราชการพิเศษ</q-tooltip>
|
>
|
||||||
</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 v-for="col in props.cols" :key="col.name">
|
||||||
<q-item-section class="fix_top">
|
<q-item-section class="fix_top">
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
|
|
@ -417,6 +455,7 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
:title="'ประวัติแก้ไขปฏิบัติราชการพิเศษ'"
|
:title="'ประวัติแก้ไขปฏิบัติราชการพิเศษ'"
|
||||||
|
|
@ -436,5 +475,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
.fix_top {
|
.fix_top {
|
||||||
justify-content: start !important;
|
justify-content: start !important;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
||||||
mixin;
|
mixin;
|
||||||
|
|
||||||
const modalHistory = ref<boolean>(false);
|
const modalHistory = ref<boolean>(false);
|
||||||
|
const checkType = ref<boolean>(
|
||||||
|
dataStore.officerType == "OFFICER" ? true : false
|
||||||
|
);
|
||||||
/** ตัวแปรข้อมูล */
|
/** ตัวแปรข้อมูล */
|
||||||
|
|
||||||
const visibleColumns = ref<String[]>([
|
const visibleColumns = ref<String[]>([
|
||||||
|
|
@ -60,7 +63,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posNo",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งเลขที่",
|
label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posNo",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -138,7 +141,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "posNo",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งเลขที่",
|
label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posNo",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
|
||||||
|
|
@ -220,6 +220,34 @@ function getHistory() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังก์ชันโหลไฟลเอกสารหลักฐาน
|
||||||
|
* @param id รายการที่ต้องการโหลด
|
||||||
|
*/
|
||||||
|
async function onDownloadFile(id: string, profileId: string) {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(
|
||||||
|
config.API.subFileByFileName(
|
||||||
|
"ทะเบียนประวัติ",
|
||||||
|
"ช่วยราชการ",
|
||||||
|
profileId,
|
||||||
|
id,
|
||||||
|
"เอกสารหลักฐาน"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.then(async (res) => {
|
||||||
|
const data = res.data;
|
||||||
|
window.open(data.downloadUrl, "_blank");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function onSearch() {
|
function onSearch() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filter.value,
|
filter.value,
|
||||||
|
|
@ -302,6 +330,18 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
color="green"
|
||||||
|
size="14px"
|
||||||
|
icon="mdi-file-document-outline"
|
||||||
|
v-if="props.row.isUpload"
|
||||||
|
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="info"
|
color="info"
|
||||||
flat
|
flat
|
||||||
|
|
@ -320,18 +360,31 @@ onMounted(async () => {
|
||||||
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
<q-card bordered flat>
|
<q-card bordered flat>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<div class="row absolute_button">
|
||||||
icon="mdi-history"
|
<q-btn
|
||||||
color="info"
|
flat
|
||||||
flat
|
dense
|
||||||
dense
|
round
|
||||||
round
|
size="14px"
|
||||||
size="14px"
|
color="green"
|
||||||
class="absolute_button"
|
icon="mdi-file-document-outline"
|
||||||
@click="onHistory(props.row.id)"
|
v-if="props.row.isUpload"
|
||||||
>
|
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
||||||
<q-tooltip>ประวัติแก้ไขรายการช่วยราชการ</q-tooltip>
|
>
|
||||||
</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 v-for="col in props.cols" :key="col.name">
|
||||||
<q-item-section class="fix_top">
|
<q-item-section class="fix_top">
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
|
|
@ -369,5 +422,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
.fix_top {
|
.fix_top {
|
||||||
justify-content: start !important;
|
justify-content: start !important;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -73,10 +73,24 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
.toString()
|
.toString()
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "commandDateSign",
|
||||||
|
align: "left",
|
||||||
|
label: "วันที่ลงนาม",
|
||||||
|
sortable: true,
|
||||||
|
field: "commandDateSign",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => date2Thai(v),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "posNo",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งเลขที่",
|
label: link.value === "-employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posNo",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -109,7 +123,7 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
{
|
{
|
||||||
name: "positionType",
|
name: "positionType",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: link.value === "-employee" ? "กลุ่มงาน" : "ประเภทตำแหน่ง",
|
label: link.value === "-employee" ? "กลุ่มงาน" : "ตำแหน่งประเภท",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionType",
|
field: "positionType",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -150,28 +164,6 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "amount",
|
|
||||||
align: "left",
|
|
||||||
label: link.value === "-employee" ? "ค่าตอบแทนรายเดือน" : "เงินเดือน",
|
|
||||||
sortable: true,
|
|
||||||
field: "amount",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(v, row) {
|
|
||||||
return row.amount
|
|
||||||
? `${row.amount.toLocaleString()}${
|
|
||||||
row.amountSpecial !== 0 && row.amountSpecial
|
|
||||||
? ` (${row.amountSpecial.toLocaleString()})`
|
|
||||||
: ""
|
|
||||||
}`
|
|
||||||
: "-";
|
|
||||||
},
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a
|
|
||||||
.toString()
|
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "commandNo",
|
name: "commandNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -180,7 +172,7 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
field: "commandNo",
|
field: "commandNo",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.commandNo && row.commandYear
|
return row.commandNo && row.commandYear
|
||||||
? `${row.commandNo}/${row.commandYear}`
|
? `${row.commandNo}/${Number(row.commandYear) + 543}`
|
||||||
: "";
|
: "";
|
||||||
},
|
},
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -196,26 +188,9 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
field: "commandCode",
|
field: "commandCode",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
|
||||||
return store.convertCommandCodeName(val);
|
|
||||||
},
|
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "commandDateSign",
|
|
||||||
align: "left",
|
|
||||||
label: "วันที่ลงนาม",
|
|
||||||
sortable: true,
|
|
||||||
field: "commandDateSign",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format: (v) => date2Thai(v),
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a
|
|
||||||
.toString()
|
|
||||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "organization",
|
name: "organization",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -236,6 +211,28 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "amount",
|
||||||
|
align: "left",
|
||||||
|
label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน",
|
||||||
|
sortable: true,
|
||||||
|
field: "amount",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format(v, row) {
|
||||||
|
return row.amount
|
||||||
|
? `${row.amount.toLocaleString()}${
|
||||||
|
row.amountSpecial !== 0 && row.amountSpecial
|
||||||
|
? ` (${row.amountSpecial.toLocaleString()})`
|
||||||
|
: ""
|
||||||
|
}`
|
||||||
|
: "-";
|
||||||
|
},
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "remark",
|
name: "remark",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -245,7 +242,9 @@ const baseColumns = ref<QTableColumn[]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdateFullName",
|
name: "lastUpdateFullName",
|
||||||
|
|
@ -292,18 +291,37 @@ const baseVisibleColumns = ref<string[]>([
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const columns = ref<QTableColumn[]>(
|
const columns = computed<QTableColumn[]>(() => {
|
||||||
baseColumns.value.filter(
|
if (!checkType.value) {
|
||||||
|
if (baseColumns.value) {
|
||||||
|
return baseColumns.value.filter(
|
||||||
|
(column) =>
|
||||||
|
column.name !== "positionExecutive" &&
|
||||||
|
column.name !== "lastUpdateFullName" &&
|
||||||
|
column.name !== "lastUpdatedAt"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return baseColumns.value.filter(
|
||||||
(e: QTableColumn) =>
|
(e: QTableColumn) =>
|
||||||
e.name !== "lastUpdateFullName" && e.name !== "lastUpdatedAt"
|
e.name !== "lastUpdateFullName" && e.name !== "lastUpdatedAt"
|
||||||
)
|
);
|
||||||
);
|
});
|
||||||
const visibleColumns = ref<String[]>(
|
const visibleColumns = ref<String[]>(
|
||||||
baseVisibleColumns.value.filter(
|
baseVisibleColumns.value.filter(
|
||||||
(e: string) => e !== "lastUpdateFullName" && e !== "lastUpdatedAt"
|
(e: string) => e !== "lastUpdateFullName" && e !== "lastUpdatedAt"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
const columnsHistory = ref<QTableColumn[]>(baseColumns.value);
|
const columnsHistory = computed<QTableColumn[]>(() => {
|
||||||
|
if (!checkType.value) {
|
||||||
|
if (baseColumns.value) {
|
||||||
|
return baseColumns.value.filter(
|
||||||
|
(column) => column.name !== "positionExecutive"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return baseColumns.value;
|
||||||
|
});
|
||||||
const visibleColumnsHistory = ref<string[]>(baseVisibleColumns.value);
|
const visibleColumnsHistory = ref<string[]>(baseVisibleColumns.value);
|
||||||
|
|
||||||
/** เปิด dialog ประวัติ*/
|
/** เปิด dialog ประวัติ*/
|
||||||
|
|
@ -523,6 +541,12 @@ onMounted(async () => {
|
||||||
<div v-else-if="col.name == 'status'">
|
<div v-else-if="col.name == 'status'">
|
||||||
{{ props.row.status ? props.row.status : "-" }}
|
{{ props.row.status ? props.row.status : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
v-else-if="col.name == 'organization'"
|
||||||
|
class="table_ellipsis"
|
||||||
|
>
|
||||||
|
{{ col.value ? col.value : "-" }}
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useQuasar, type QTableProps } from "quasar";
|
import { useQuasar, type QTableColumn } from "quasar";
|
||||||
import { ref, onMounted, computed } from "vue";
|
import { ref, onMounted, computed } from "vue";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -16,8 +16,14 @@ const link = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataPerson = useDataStore();
|
const dataPerson = useDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
const {
|
||||||
mixin;
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
messageError,
|
||||||
|
date2Thai,
|
||||||
|
onSearchDataTable,
|
||||||
|
findOrgName,
|
||||||
|
} = mixin;
|
||||||
|
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
const rows = ref<SalaryFormType[]>([]);
|
const rows = ref<SalaryFormType[]>([]);
|
||||||
|
|
@ -32,24 +38,272 @@ const checkType = ref<boolean>(
|
||||||
const modalHistory = ref<boolean>(false);
|
const modalHistory = ref<boolean>(false);
|
||||||
/** ตัวแปรข้อมูล */
|
/** ตัวแปรข้อมูล */
|
||||||
|
|
||||||
|
const baseColumns = ref<QTableColumn[]>([
|
||||||
|
{
|
||||||
|
name: "commandDateAffect",
|
||||||
|
align: "left",
|
||||||
|
label: "วันที่คำสั่งมีผล",
|
||||||
|
sortable: true,
|
||||||
|
field: "commandDateAffect",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => date2Thai(v),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "commandDateSign",
|
||||||
|
align: "left",
|
||||||
|
label: "วันที่ลงนาม",
|
||||||
|
sortable: true,
|
||||||
|
field: "commandDateSign",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => date2Thai(v),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "posNo",
|
||||||
|
align: "left",
|
||||||
|
label: link.value === "-employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "posNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return row.posNoAbb && row.posNo
|
||||||
|
? `${row.posNoAbb}${row.posNo}`
|
||||||
|
: row.posNo
|
||||||
|
? row.posNo
|
||||||
|
: "-";
|
||||||
|
},
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionName",
|
||||||
|
align: "left",
|
||||||
|
label: link.value === "-employee" ? "ตำแหน่ง" : "ตำแหน่งในสายงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionName",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionType",
|
||||||
|
align: "left",
|
||||||
|
label: link.value === "-employee" ? "กลุ่มงาน" : "ตำแหน่งประเภท",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionType",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionLevel",
|
||||||
|
align: "left",
|
||||||
|
label: link.value === "-employee" ? "ระดับชั้นงาน" : "ระดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionLevel",
|
||||||
|
format(val, row) {
|
||||||
|
return `${
|
||||||
|
row.positionLevel
|
||||||
|
? row.positionLevel
|
||||||
|
: row.positionCee
|
||||||
|
? row.positionCee
|
||||||
|
: "-"
|
||||||
|
}`;
|
||||||
|
},
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionExecutive",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งทางการบริหาร",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionExecutive",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "commandNo",
|
||||||
|
align: "left",
|
||||||
|
label: "เลขที่คำสั่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "commandNo",
|
||||||
|
format(val, row) {
|
||||||
|
return row.commandNo && row.commandYear
|
||||||
|
? `${row.commandNo}/${Number(row.commandYear) + 543}`
|
||||||
|
: "";
|
||||||
|
},
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "commandCode",
|
||||||
|
align: "left",
|
||||||
|
label: "ประเภทคำสั่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "commandCode",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "organization",
|
||||||
|
align: "left",
|
||||||
|
label: "สังกัด",
|
||||||
|
sortable: true,
|
||||||
|
field: "organization",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return findOrgName({
|
||||||
|
root: row.orgRoot,
|
||||||
|
child1: row.orgChild1,
|
||||||
|
child2: row.orgChild2,
|
||||||
|
child3: row.orgChild3,
|
||||||
|
child4: row.orgChild4,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "amount",
|
||||||
|
align: "left",
|
||||||
|
label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน",
|
||||||
|
sortable: true,
|
||||||
|
field: "amount",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format(v, row) {
|
||||||
|
return row.amount
|
||||||
|
? `${row.amount.toLocaleString()}${
|
||||||
|
row.amountSpecial !== 0 && row.amountSpecial
|
||||||
|
? ` (${row.amountSpecial.toLocaleString()})`
|
||||||
|
: ""
|
||||||
|
}`
|
||||||
|
: "-";
|
||||||
|
},
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "mouthSalaryAmount",
|
||||||
|
align: "left",
|
||||||
|
label: "เงินค่าตอบแทนรายเดือน",
|
||||||
|
sortable: true,
|
||||||
|
field: "mouthSalaryAmount",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => Number(v).toLocaleString(),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionSalaryAmount",
|
||||||
|
align: "left",
|
||||||
|
label: "เงินประจำตำแหน่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionSalaryAmount",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => Number(v).toLocaleString(),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "remark",
|
||||||
|
align: "left",
|
||||||
|
label: "หมายเหตุ",
|
||||||
|
sortable: true,
|
||||||
|
field: "remark",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lastUpdateFullName",
|
||||||
|
align: "left",
|
||||||
|
label: "ผู้ดำเนินการ",
|
||||||
|
sortable: true,
|
||||||
|
field: "lastUpdateFullName",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lastUpdatedAt",
|
||||||
|
align: "left",
|
||||||
|
label: "วันที่แก้ไข",
|
||||||
|
sortable: true,
|
||||||
|
field: "lastUpdatedAt",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => date2Thai(v, false, true),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
]);
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"commandDateAffect",
|
"commandDateAffect",
|
||||||
"amount",
|
|
||||||
"positionSalaryAmount",
|
|
||||||
"mouthSalaryAmount",
|
|
||||||
"posNo",
|
"posNo",
|
||||||
"positionName",
|
"positionName",
|
||||||
"positionType",
|
"positionType",
|
||||||
"positionLevel",
|
"positionLevel",
|
||||||
"commandName",
|
"positionExecutive",
|
||||||
"refCommandNo",
|
"amount",
|
||||||
|
"positionSalaryAmount",
|
||||||
|
"mouthSalaryAmount",
|
||||||
|
"commandNo",
|
||||||
|
"commandCode",
|
||||||
|
"commandDateSign",
|
||||||
|
"organization",
|
||||||
"remark",
|
"remark",
|
||||||
"lastUpdateFullName",
|
"lastUpdateFullName",
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const columns = computed(() => {
|
const columns = computed(() => {
|
||||||
if (checkType.value == false) {
|
if (link.value === "-employee") {
|
||||||
if (baseColumns.value) {
|
if (baseColumns.value) {
|
||||||
return baseColumns.value.filter(
|
return baseColumns.value.filter(
|
||||||
(column) =>
|
(column) =>
|
||||||
|
|
@ -61,51 +315,71 @@ const columns = computed(() => {
|
||||||
return baseColumns.value;
|
return baseColumns.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
const baseColumns = ref<QTableProps["columns"]>([
|
const visibleColumnsHistory = ref<string[]>([
|
||||||
|
"commandDateAffect",
|
||||||
|
"posNo",
|
||||||
|
"positionName",
|
||||||
|
"positionType",
|
||||||
|
"positionLevel",
|
||||||
|
"positionExecutive",
|
||||||
|
"amount",
|
||||||
|
"positionSalaryAmount",
|
||||||
|
"mouthSalaryAmount",
|
||||||
|
"commandNo",
|
||||||
|
"commandCode",
|
||||||
|
"commandDateSign",
|
||||||
|
"organization",
|
||||||
|
"remark",
|
||||||
|
"lastUpdateFullName",
|
||||||
|
"lastUpdatedAt",
|
||||||
|
]);
|
||||||
|
|
||||||
|
const columnsHistory = computed(() => {
|
||||||
|
if (link.value === "-employee") {
|
||||||
|
if (baseColumnsHistory.value) {
|
||||||
|
return baseColumnsHistory.value.filter(
|
||||||
|
(column: QTableColumn) =>
|
||||||
|
column.name !== "positionSalaryAmount" &&
|
||||||
|
column.name !== "mouthSalaryAmount"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return baseColumns.value;
|
||||||
|
});
|
||||||
|
|
||||||
|
const baseColumnsHistory = ref<QTableColumn[]>([
|
||||||
{
|
{
|
||||||
name: "commandDateAffect",
|
name: "commandDateAffect",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วัน เดือน ปี",
|
label: "วันที่คำสั่งมีผล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "commandDateAffect",
|
field: "commandDateAffect",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (v) => date2Thai(v),
|
format: (v) => date2Thai(v),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "amount",
|
name: "commandDateSign",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: checkType.value ? "เงินเดือน" : "ค่าตอบแทนรายเดือน",
|
label: "วันที่ลงนาม",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "amount",
|
field: "commandDateSign",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (v) => Number(v).toLocaleString(),
|
format: (v) => date2Thai(v),
|
||||||
},
|
sort: (a: string, b: string) =>
|
||||||
{
|
a
|
||||||
name: "positionSalaryAmount",
|
.toString()
|
||||||
align: "left",
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
label: "เงินประจำตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionSalaryAmount",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format: (v) => Number(v).toLocaleString(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "mouthSalaryAmount",
|
|
||||||
align: "left",
|
|
||||||
label: "เงินค่าตอบแทนรายเดือน",
|
|
||||||
sortable: true,
|
|
||||||
field: "mouthSalaryAmount",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format: (v) => Number(v).toLocaleString(),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "posNo",
|
name: "posNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งเลขที่",
|
label: link.value === "-employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "posNo",
|
field: "posNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -117,33 +391,43 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
? row.posNo
|
? row.posNo
|
||||||
: "-";
|
: "-";
|
||||||
},
|
},
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionName",
|
name: "positionName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่ง",
|
label: link.value === "-employee" ? "ตำแหน่ง" : "ตำแหน่งในสายงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionName",
|
field: "positionName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionType",
|
name: "positionType",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทตำแหน่ง",
|
label: link.value === "-employee" ? "กลุ่มงาน" : "ตำแหน่งประเภท",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionType",
|
field: "positionType",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionLevel",
|
name: "positionLevel",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับ",
|
label: link.value === "-employee" ? "ระดับชั้นงาน" : "ระดับ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "positionLevel",
|
field: "positionLevel",
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return `${
|
return `${
|
||||||
row.positionLevel
|
row.positionLevel
|
||||||
|
|
@ -153,207 +437,10 @@ const baseColumns = ref<QTableProps["columns"]>([
|
||||||
: "-"
|
: "-"
|
||||||
}`;
|
}`;
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name: "commandName",
|
|
||||||
align: "left",
|
|
||||||
label: "เอกสารอ้างอิง",
|
|
||||||
sortable: true,
|
|
||||||
field: "commandName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "refCommandNo",
|
|
||||||
align: "left",
|
|
||||||
label: "เลขที่คำสั่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "refCommandNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(val, row) {
|
|
||||||
return row.commandNo && row.commandYear
|
|
||||||
? `${row.commandNo}/${row.commandYear}`
|
|
||||||
: "";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "remark",
|
|
||||||
align: "left",
|
|
||||||
label: "หมายเหตุ",
|
|
||||||
sortable: true,
|
|
||||||
field: "remark",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "lastUpdateFullName",
|
|
||||||
align: "left",
|
|
||||||
label: "ผู้ดำเนินการ",
|
|
||||||
sortable: true,
|
|
||||||
field: "lastUpdateFullName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "lastUpdatedAt",
|
|
||||||
align: "left",
|
|
||||||
label: "วันที่แก้ไข",
|
|
||||||
sortable: true,
|
|
||||||
field: "lastUpdatedAt",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format: (v) => date2Thai(v, false, true),
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const visibleColumnsHistory = ref<string[]>([
|
|
||||||
"commandDateAffect",
|
|
||||||
"amount",
|
|
||||||
"positionSalaryAmount",
|
|
||||||
"mouthSalaryAmount",
|
|
||||||
"oc",
|
|
||||||
"positionName",
|
|
||||||
"posNo",
|
|
||||||
"positionLine",
|
|
||||||
"positionPathSide",
|
|
||||||
"positionType",
|
|
||||||
"positionLevel",
|
|
||||||
"positionExecutive",
|
|
||||||
"positionExecutiveSide",
|
|
||||||
"salaryClass",
|
|
||||||
"commandName",
|
|
||||||
"refCommandNo",
|
|
||||||
"remark",
|
|
||||||
"lastUpdateFullName",
|
|
||||||
"lastUpdatedAt",
|
|
||||||
]);
|
|
||||||
|
|
||||||
const columnsHistory = computed(() => {
|
|
||||||
if (checkType.value == false) {
|
|
||||||
if (baseColumnsHistory.value) {
|
|
||||||
return baseColumnsHistory.value.filter(
|
|
||||||
(column) =>
|
|
||||||
column.name !== "positionSalaryAmount" &&
|
|
||||||
column.name !== "mouthSalaryAmount"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return baseColumns.value;
|
|
||||||
});
|
|
||||||
|
|
||||||
const baseColumnsHistory = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "commandDateAffect",
|
|
||||||
align: "left",
|
|
||||||
label: "วัน เดือน ปี",
|
|
||||||
sortable: true,
|
|
||||||
field: "commandDateAffect",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format: (v) => date2Thai(v),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "amount",
|
|
||||||
align: "left",
|
|
||||||
label: checkType.value ? "เงินเดือน" : "ค่าตอบแทนรายเดือน",
|
|
||||||
sortable: true,
|
|
||||||
field: "amount",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format: (v) => Number(v).toLocaleString(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionSalaryAmount",
|
|
||||||
align: "left",
|
|
||||||
label: "เงินประจำตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionSalaryAmount",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
format: (v) => Number(v).toLocaleString(),
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "mouthSalaryAmount",
|
|
||||||
align: "left",
|
|
||||||
label: "เงินค่าตอบแทนรายเดือน",
|
|
||||||
sortable: true,
|
|
||||||
field: "mouthSalaryAmount",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
format: (v) => Number(v).toLocaleString(),
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "oc",
|
|
||||||
align: "left",
|
|
||||||
label: "สังกัด",
|
|
||||||
sortable: true,
|
|
||||||
field: "oc",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name: "posNo",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งเลขที่",
|
|
||||||
sortable: true,
|
|
||||||
field: "posNo",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format(val, row) {
|
|
||||||
return row.posNoAbb && row.posNo
|
|
||||||
? `${row.posNoAbb}${row.posNo}`
|
|
||||||
: row.posNo
|
|
||||||
? row.posNo
|
|
||||||
: "-";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionName",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionLine",
|
|
||||||
align: "left",
|
|
||||||
label: "สายงาน",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionLine",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionPathSide",
|
|
||||||
align: "left",
|
|
||||||
label: "ด้าน/สาขา",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionPathSide",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionType",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่งประเภท",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionType",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "positionLevel",
|
|
||||||
align: "left",
|
|
||||||
label: "ระดับ",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionLevel",
|
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionExecutive",
|
name: "positionExecutive",
|
||||||
|
|
@ -363,48 +450,107 @@ const baseColumnsHistory = ref<QTableProps["columns"]>([
|
||||||
field: "positionExecutive",
|
field: "positionExecutive",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "positionExecutiveSide",
|
name: "commandNo",
|
||||||
align: "left",
|
|
||||||
label: "ด้านทางการบริหาร",
|
|
||||||
sortable: true,
|
|
||||||
field: "positionExecutiveSide",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "salaryClass",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่ง (รายละเอียด)",
|
|
||||||
sortable: true,
|
|
||||||
field: "salaryClass",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "commandName",
|
|
||||||
align: "left",
|
|
||||||
label: "เอกสารอ้างอิง",
|
|
||||||
sortable: true,
|
|
||||||
field: "commandName",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "refCommandNo",
|
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขที่คำสั่ง",
|
label: "เลขที่คำสั่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "refCommandNo",
|
field: "commandNo",
|
||||||
|
format(val, row) {
|
||||||
|
return row.commandNo && row.commandYear
|
||||||
|
? `${row.commandNo}/${Number(row.commandYear) + 543}`
|
||||||
|
: "";
|
||||||
|
},
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "commandCode",
|
||||||
|
align: "left",
|
||||||
|
label: "ประเภทคำสั่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "commandCode",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "organization",
|
||||||
|
align: "left",
|
||||||
|
label: "สังกัด",
|
||||||
|
sortable: true,
|
||||||
|
field: "organization",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val, row) {
|
format(val, row) {
|
||||||
return row.commandNo && row.commandYear
|
return findOrgName({
|
||||||
? `${row.commandNo}/${row.commandYear}`
|
root: row.orgRoot,
|
||||||
: "";
|
child1: row.orgChild1,
|
||||||
|
child2: row.orgChild2,
|
||||||
|
child3: row.orgChild3,
|
||||||
|
child4: row.orgChild4,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "amount",
|
||||||
|
align: "left",
|
||||||
|
label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน",
|
||||||
|
sortable: true,
|
||||||
|
field: "amount",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format(v, row) {
|
||||||
|
return row.amount
|
||||||
|
? `${row.amount.toLocaleString()}${
|
||||||
|
row.amountSpecial !== 0 && row.amountSpecial
|
||||||
|
? ` (${row.amountSpecial.toLocaleString()})`
|
||||||
|
: ""
|
||||||
|
}`
|
||||||
|
: "-";
|
||||||
|
},
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "mouthSalaryAmount",
|
||||||
|
align: "left",
|
||||||
|
label: "เงินค่าตอบแทนรายเดือน",
|
||||||
|
sortable: true,
|
||||||
|
field: "mouthSalaryAmount",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => Number(v).toLocaleString(),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionSalaryAmount",
|
||||||
|
align: "left",
|
||||||
|
label: "เงินประจำตำแหน่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionSalaryAmount",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => Number(v).toLocaleString(),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "remark",
|
name: "remark",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -413,6 +559,10 @@ const baseColumnsHistory = ref<QTableProps["columns"]>([
|
||||||
field: "remark",
|
field: "remark",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdateFullName",
|
name: "lastUpdateFullName",
|
||||||
|
|
@ -422,6 +572,10 @@ const baseColumnsHistory = ref<QTableProps["columns"]>([
|
||||||
field: "lastUpdateFullName",
|
field: "lastUpdateFullName",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdatedAt",
|
name: "lastUpdatedAt",
|
||||||
|
|
@ -432,6 +586,10 @@ const baseColumnsHistory = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format: (v) => date2Thai(v, false, true),
|
format: (v) => date2Thai(v, false, true),
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a
|
||||||
|
.toString()
|
||||||
|
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -562,6 +720,9 @@ onMounted(async () => {
|
||||||
<div v-else-if="col.name == 'status'">
|
<div v-else-if="col.name == 'status'">
|
||||||
{{ props.row.status ? props.row.status : "-" }}
|
{{ props.row.status ? props.row.status : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.name == 'organization'" class="table_ellipsis">
|
||||||
|
{{ col.value ? col.value : "-" }}
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { ref, onMounted } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
|
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
|
||||||
|
|
||||||
import type { NopaidFormType } from "@/modules/10_registry/interface/index/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 mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
||||||
mixin;
|
mixin;
|
||||||
|
const { getPathUploadFlie } = useRegistryDataStore();
|
||||||
|
|
||||||
const modalHistory = ref<boolean>(false);
|
const modalHistory = ref<boolean>(false);
|
||||||
/** ตัวแปรข้อมูล */
|
/** ตัวแปรข้อมูล */
|
||||||
|
|
@ -218,6 +220,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const fileGroup = ref<string>("เอกสารบันทึกวันที่ไม่ได้รับเงินเดือน");
|
||||||
|
|
||||||
function onHistory(id: string) {
|
function onHistory(id: string) {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
idByRow.value = id;
|
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() {
|
function onSearch() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filter.value,
|
filter.value,
|
||||||
|
|
@ -331,6 +340,7 @@ onMounted(async () => {
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -347,6 +357,20 @@ onMounted(async () => {
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</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-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="info"
|
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">
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
<q-card bordered flat>
|
<q-card bordered flat>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<div class="row absolute_button">
|
||||||
icon="mdi-history"
|
<q-btn
|
||||||
color="info"
|
v-if="props.row.isUpload"
|
||||||
flat
|
color="green"
|
||||||
dense
|
flat
|
||||||
round
|
dense
|
||||||
size="14px"
|
round
|
||||||
class="absolute_button"
|
size="14px"
|
||||||
@click="onHistory(props.row.id)"
|
icon="mdi-file-document-outline"
|
||||||
>
|
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
||||||
<q-tooltip
|
|
||||||
>ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ</q-tooltip
|
|
||||||
>
|
>
|
||||||
</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 v-for="col in props.cols" :key="col.name">
|
||||||
<q-item-section class="fix_top">
|
<q-item-section class="fix_top">
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
|
|
@ -398,6 +435,7 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
:title="'ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ'"
|
:title="'ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ'"
|
||||||
|
|
@ -417,5 +455,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
.fix_top {
|
.fix_top {
|
||||||
justify-content: start !important;
|
justify-content: start !important;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { ref, reactive, onMounted } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
|
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
|
||||||
|
|
||||||
import type { CertificateDetail } from "@/modules/10_registry/interface/index/Main";
|
import type { CertificateDetail } from "@/modules/10_registry/interface/index/Main";
|
||||||
|
|
||||||
|
|
@ -18,6 +19,7 @@ const dataPerson = useDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
||||||
mixin;
|
mixin;
|
||||||
|
const { getPathUploadFlie } = useRegistryDataStore();
|
||||||
|
|
||||||
const idByRow = ref<string>("");
|
const idByRow = ref<string>("");
|
||||||
const rows = ref<CertificateDetail[]>([]);
|
const rows = ref<CertificateDetail[]>([]);
|
||||||
|
|
@ -216,6 +218,9 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const fileGroup = ref<string>("เอกสารใบอนุญาตประกอบวิชาชีพ");
|
||||||
|
|
||||||
function onHistory(id: string) {
|
function onHistory(id: string) {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
idByRow.value = id;
|
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() {
|
function onSearch() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filter.value,
|
filter.value,
|
||||||
|
|
@ -333,6 +343,7 @@ onMounted(async () => {
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -349,6 +360,20 @@ onMounted(async () => {
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</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-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="info"
|
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">
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
<q-card bordered flat>
|
<q-card bordered flat>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<div class="row absolute_button">
|
||||||
icon="mdi-history"
|
<q-btn
|
||||||
color="info"
|
v-if="props.row.isUpload"
|
||||||
flat
|
color="green"
|
||||||
dense
|
flat
|
||||||
round
|
dense
|
||||||
size="14px"
|
round
|
||||||
class="absolute_button"
|
size="14px"
|
||||||
@click="onHistory(props.row.id)"
|
icon="mdi-file-document-outline"
|
||||||
>
|
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
||||||
<q-tooltip>ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ</q-tooltip>
|
>
|
||||||
</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 v-for="col in props.cols" :key="col.name">
|
||||||
<q-item-section class="fix_top">
|
<q-item-section class="fix_top">
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
|
|
@ -398,6 +436,7 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
:title="'ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ'"
|
:title="'ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ'"
|
||||||
|
|
@ -417,5 +456,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
.fix_top {
|
.fix_top {
|
||||||
justify-content: start !important;
|
justify-content: start !important;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
|
import { useRegistryDataStore } from "@/modules/10_registry/store/Main";
|
||||||
|
|
||||||
import type { InsigniaFormType } from "@/modules/10_registry/interface/index/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 mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
||||||
mixin;
|
mixin;
|
||||||
|
const { getPathUploadFlie } = useRegistryDataStore();
|
||||||
|
|
||||||
const modalHistory = ref<boolean>(false);
|
const modalHistory = ref<boolean>(false);
|
||||||
/** ตัวแปรข้อมูล */
|
/** ตัวแปรข้อมูล */
|
||||||
|
|
@ -432,6 +434,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const fileGroup = ref<string>("เครื่องราชฯ");
|
||||||
|
|
||||||
function onHistory(id: string) {
|
function onHistory(id: string) {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
idByRow.value = id;
|
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() {
|
function onSearch() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filter.value,
|
filter.value,
|
||||||
|
|
@ -549,6 +558,7 @@ onMounted(async () => {
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -567,6 +577,20 @@ onMounted(async () => {
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</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-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="info"
|
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">
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
<q-card bordered flat>
|
<q-card bordered flat>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<div class="row absolute_button">
|
||||||
icon="mdi-history"
|
<q-btn
|
||||||
color="info"
|
v-if="props.row.isUpload"
|
||||||
flat
|
color="green"
|
||||||
dense
|
flat
|
||||||
round
|
dense
|
||||||
size="14px"
|
round
|
||||||
class="absolute_button"
|
size="14px"
|
||||||
@click="onHistory(props.row.id)"
|
icon="mdi-file-document-outline"
|
||||||
>
|
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
||||||
<q-tooltip>ประวัติแก้ไขเครื่องราชอิสริยาภรณ์</q-tooltip>
|
>
|
||||||
</q-btn>
|
<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 v-for="col in props.cols" :key="col.name">
|
||||||
<q-item-section class="fix_top">
|
<q-item-section class="fix_top">
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
|
|
@ -647,5 +685,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
.fix_top {
|
.fix_top {
|
||||||
justify-content: start !important;
|
justify-content: start !important;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry";
|
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";
|
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 mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } =
|
||||||
mixin;
|
mixin;
|
||||||
|
const { getPathUploadFlie } = useRegistryDataStore();
|
||||||
|
|
||||||
const modalHistory = ref<boolean>(false);
|
const modalHistory = ref<boolean>(false);
|
||||||
/** ตัวแปรข้อมูล */
|
/** ตัวแปรข้อมูล */
|
||||||
|
|
@ -218,6 +220,8 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const fileGroup = ref<string>("ประกาศเกียรติคุณ");
|
||||||
|
|
||||||
function onHistory(id: string) {
|
function onHistory(id: string) {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
idByRow.value = id;
|
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() {
|
function onSearch() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filter.value,
|
filter.value,
|
||||||
|
|
@ -333,6 +342,7 @@ onMounted(async () => {
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
|
<q-th auto-width />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -349,6 +359,20 @@ onMounted(async () => {
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</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-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="info"
|
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">
|
<div class="q-mb-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
||||||
<q-card bordered flat>
|
<q-card bordered flat>
|
||||||
<q-list dense class="q-mt-lg relative-position">
|
<q-list dense class="q-mt-lg relative-position">
|
||||||
<q-btn
|
<div class="row absolute_button">
|
||||||
icon="mdi-history"
|
<q-btn
|
||||||
color="info"
|
v-if="props.row.isUpload"
|
||||||
flat
|
color="green"
|
||||||
dense
|
flat
|
||||||
round
|
dense
|
||||||
size="14px"
|
round
|
||||||
class="absolute_button"
|
size="14px"
|
||||||
@click="onHistory(props.row.id)"
|
icon="mdi-file-document-outline"
|
||||||
>
|
@click="onDownloadFile(props.row.id, props.row.profileId)"
|
||||||
<q-tooltip>ประวัติแก้ไขประกาศเกียรติคุณ</q-tooltip>
|
>
|
||||||
</q-btn>
|
<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 v-for="col in props.cols" :key="col.name">
|
||||||
<q-item-section class="fix_top">
|
<q-item-section class="fix_top">
|
||||||
<q-item-label class="text-grey-6 text-weight-medium">{{
|
<q-item-label class="text-grey-6 text-weight-medium">{{
|
||||||
|
|
@ -398,6 +436,7 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
v-model:modal="modalHistory"
|
v-model:modal="modalHistory"
|
||||||
:title="'ประวัติแก้ไขประกาศเกียรติคุณ'"
|
:title="'ประวัติแก้ไขประกาศเกียรติคุณ'"
|
||||||
|
|
@ -417,5 +456,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
.fix_top {
|
.fix_top {
|
||||||
justify-content: start !important;
|
justify-content: start !important;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
38
src/modules/10_registry/store/Main.ts
Normal file
38
src/modules/10_registry/store/Main.ts
Normal 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,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import avatar from "@/assets/avatar_user.jpg";
|
import { ref } from "vue";
|
||||||
import { ref, reactive, onMounted } from "vue";
|
|
||||||
import axios from "axios";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
import { useDataStore } from "@/stores/data";
|
||||||
import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry";
|
import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry";
|
||||||
|
|
@ -24,7 +22,7 @@ const store = useRegistryInFormationStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
const dataStore = useDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, dialogConfirm, showLoader, hideLoader } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const tab = ref<string>("information");
|
const tab = ref<string>("information");
|
||||||
|
|
||||||
|
|
@ -56,13 +54,13 @@ async function onClickDownloadKp7(type: string) {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
await genReport(data, fileName, "pdf");
|
await genReport(data, fileName, "pdf");
|
||||||
hideLoader();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
hideLoader();
|
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ export const useDataStore = defineStore("dataMain", () => {
|
||||||
posExecutiveName: "",
|
posExecutiveName: "",
|
||||||
posTypeName: "",
|
posTypeName: "",
|
||||||
posLevelName: "",
|
posLevelName: "",
|
||||||
|
salary: null,
|
||||||
|
birthDate: '',
|
||||||
posNo: "",
|
posNo: "",
|
||||||
});
|
});
|
||||||
const count = ref<number>(0);
|
const count = ref<number>(0);
|
||||||
|
|
@ -102,6 +104,9 @@ export const useDataStore = defineStore("dataMain", () => {
|
||||||
formData.firstName = data.firstName;
|
formData.firstName = data.firstName;
|
||||||
formData.lastName = data.lastName;
|
formData.lastName = data.lastName;
|
||||||
formData.position = data.position;
|
formData.position = data.position;
|
||||||
|
formData.salary = data.salary;
|
||||||
|
formData.citizenId = data.citizenId;
|
||||||
|
formData.birthDate = data.birthDate;
|
||||||
formData.posTypeName = data.posTypeName;
|
formData.posTypeName = data.posTypeName;
|
||||||
formData.posExecutiveName = data.posExecutiveName;
|
formData.posExecutiveName = data.posExecutiveName;
|
||||||
formData.posLevelName = data.posLevelName;
|
formData.posLevelName = data.posLevelName;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue