เปลี่ยน id เป็น id card

This commit is contained in:
setthawutttty 2025-02-18 11:38:13 +07:00
parent 19bf90fee5
commit 64f60eead9
4 changed files with 19 additions and 8 deletions

View file

@ -280,7 +280,7 @@ onMounted(() => {
<q-select <q-select
:readonly="checkRoute" :readonly="checkRoute"
dense dense
:model-value="form.position" v-model="form.position"
label="ตำแหน่งในสายงาน" label="ตำแหน่งในสายงาน"
outlined outlined
emit-value emit-value
@ -295,7 +295,6 @@ onMounted(() => {
class="inputgreen" class="inputgreen"
:options="positionOp" :options="positionOp"
use-input use-input
@input-value="setModel"
@filter="(inputValue:any,doneFn:Function) => filterOption(inputValue, doneFn) " @filter="(inputValue:any,doneFn:Function) => filterOption(inputValue, doneFn) "
> >
<template v-slot:no-option> <template v-slot:no-option>

View file

@ -8,10 +8,11 @@ import { useRoute } from "vue-router";
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 { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
import type { ArrayFileList } from "@/modules/04_registryPerson/interface/index/document"; import type { ArrayFileList } from "@/modules/04_registryPerson/interface/index/document";
const $q = useQuasar(); const $q = useQuasar();
const storeRegistry = useRegistryNewDataStore();
const route = useRoute(); const route = useRoute();
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { const {
@ -43,10 +44,18 @@ async function getData() {
showLoader(); showLoader();
await http await http
.get( .get(
config.API.file("ระบบทะเบียนประวัติ", "เอกสารหลักฐานเพิ่มเติม", profileId.value) config.API.file(
"ระบบทะเบียนประวัติ",
"เอกสารหลักฐานเพิ่มเติม",
storeRegistry.citizenId
)
) )
.then((res) => { .then((res) => {
console.log("ระบบทะเบียนประวัติ", "เอกสารหลักฐานเพิ่มเติม", profileId.value) console.log(
"ระบบทะเบียนประวัติ",
"เอกสารหลักฐานเพิ่มเติม",
storeRegistry.citizenId
);
fileList.value = res.data; fileList.value = res.data;
}) })
.catch((e) => { .catch((e) => {
@ -74,7 +83,7 @@ function clickUpload(file: any) {
config.API.file( config.API.file(
"ระบบทะเบียนประวัติ", "ระบบทะเบียนประวัติ",
"เอกสารหลักฐานเพิ่มเติม", "เอกสารหลักฐานเพิ่มเติม",
profileId.value storeRegistry.citizenId
), ),
{ {
replace: false, replace: false,
@ -136,7 +145,7 @@ function downloadFile(fileName: string) {
config.API.fileByFile( config.API.fileByFile(
"ระบบทะเบียนประวัติ", "ระบบทะเบียนประวัติ",
"เอกสารหลักฐานเพิ่มเติม", "เอกสารหลักฐานเพิ่มเติม",
profileId.value, storeRegistry.citizenId,
fileName fileName
) )
) )
@ -164,7 +173,7 @@ function deleteFile(fileName: string) {
config.API.fileByFile( config.API.fileByFile(
"ระบบทะเบียนประวัติ", "ระบบทะเบียนประวัติ",
"เอกสารหลักฐานเพิ่มเติม", "เอกสารหลักฐานเพิ่มเติม",
profileId.value, storeRegistry.citizenId,
fileName fileName
) )
) )

View file

@ -20,6 +20,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
{ id: "perm", name: "ลูกจ้างประจำ" }, { id: "perm", name: "ลูกจ้างประจำ" },
// { id: "temp", name: "ลูกจ้างชั่วคราว" }, // { id: "temp", name: "ลูกจ้างชั่วคราว" },
]); ]);
const citizenId = ref<string>('')
const posTypeOps = ref<DataOption[]>([]); const posTypeOps = ref<DataOption[]>([]);
const posTypeMain = ref<DataType[]>([]); const posTypeMain = ref<DataType[]>([]);
const posLevelOps = ref<DataOption[]>([]); const posLevelOps = ref<DataOption[]>([]);
@ -147,5 +148,6 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
convertTypeRetired, convertTypeRetired,
retireTypeOps, retireTypeOps,
retireTypeEmpOps, retireTypeEmpOps,
citizenId
}; };
}); });

View file

@ -364,6 +364,7 @@ async function fetchDataPersonal() {
.get(config.API.registryNewByProfileId(profileId.value, empType.value)) .get(config.API.registryNewByProfileId(profileId.value, empType.value))
.then(async (res) => { .then(async (res) => {
formDetail.value = await res.data.result; formDetail.value = await res.data.result;
storeRegistry.citizenId = res.data.result.citizenId;
storeRegistry.isLeave = res.data.result.isLeave; storeRegistry.isLeave = res.data.result.isLeave;
if (res.data.result.leaveReason) { if (res.data.result.leaveReason) {