Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop
* 'develop' of github.com:Frappet/bma-ehr-frontend: เครื่องราช
This commit is contained in:
commit
a8e237655c
7 changed files with 53 additions and 48 deletions
|
|
@ -909,7 +909,7 @@ onMounted(async () => {
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
style="min-width: 180px"
|
style="min-width: 320px"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
DataStore.searchDataTable(
|
DataStore.searchDataTable(
|
||||||
DataStore.typeinsignia,
|
DataStore.typeinsignia,
|
||||||
|
|
|
||||||
|
|
@ -352,7 +352,7 @@ onMounted(async () => {
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
style="min-width: 180px"
|
style="min-width: 320px"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
DataStore.searchDataTable(
|
DataStore.searchDataTable(
|
||||||
DataStore.typeinsignia,
|
DataStore.typeinsignia,
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@ onMounted(async () => {
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
style="min-width: 180px"
|
style="min-width: 320px"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
DataStore.searchDataTable(
|
DataStore.searchDataTable(
|
||||||
DataStore.typeinsignia,
|
DataStore.typeinsignia,
|
||||||
|
|
|
||||||
|
|
@ -177,13 +177,27 @@ const formFilter = reactive({
|
||||||
* function เรียกรายชื่อลูกจ้างตาม id หน่วยงาน
|
* function เรียกรายชื่อลูกจ้างตาม id หน่วยงาน
|
||||||
* @param id id หน่วยงาน
|
* @param id id หน่วยงาน
|
||||||
*/
|
*/
|
||||||
async function findlist(id: string) {
|
async function findlist(id: string = "", idCard: string) {
|
||||||
showLoader();
|
formFilter.searchKeyword = idCard;
|
||||||
|
|
||||||
http
|
http
|
||||||
.get(config.API.registryNew(""), { params: formFilter })
|
.get(
|
||||||
|
config.API.registryNew(
|
||||||
|
employeeClass.value === "officer" ? "" : "-employee"
|
||||||
|
),
|
||||||
|
{
|
||||||
|
params: formFilter,
|
||||||
|
}
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log();
|
const data = res.data.result.data[0];
|
||||||
|
if (data) {
|
||||||
|
fullName.value = `${data.prefix}${data.firstName} ${data.lastName}`; // ชื่อ;
|
||||||
|
position.value = data.position; // ตำแหน่ง
|
||||||
|
} else {
|
||||||
|
notifyError($q, "ไม่พบข้อมูลเลขประจำตัวประชาชนนี้");
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(res);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -224,7 +238,8 @@ async function findlist(id: string) {
|
||||||
async function fectDataByid(id: string) {
|
async function fectDataByid(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
if (props.profileType !== undefined) {
|
if (props.profileType !== undefined) {
|
||||||
employeeClass.value = props.profileType.toString();
|
// employeeClass.value = props.profileType.toString();
|
||||||
|
employeeClass.value = "officer";
|
||||||
}
|
}
|
||||||
await http
|
await http
|
||||||
.get(config.API.noteByid(id))
|
.get(config.API.noteByid(id))
|
||||||
|
|
@ -298,11 +313,7 @@ async function onSubmit() {
|
||||||
/** function หาเลขประจำตัวประชาชน*/
|
/** function หาเลขประจำตัวประชาชน*/
|
||||||
function searchcardid() {
|
function searchcardid() {
|
||||||
if (cardid.value.length === 13) {
|
if (cardid.value.length === 13) {
|
||||||
let data = listPerson.value.find((e: any) => e.citizenId === cardid.value);
|
findlist("", cardid.value);
|
||||||
if (data) {
|
|
||||||
fullName.value = data.fullname; // ชื่อ
|
|
||||||
position.value = data.positionEmployeePosition; // ตำแหน่ง
|
|
||||||
} else notifyError($q, "ไม่พบข้อมูลเลขประจำตัวประชาชนนี้");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
div
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { QForm, useQuasar } from "quasar";
|
import { QForm, useQuasar } from "quasar";
|
||||||
|
|
@ -112,39 +111,36 @@ async function onSubmit(type: string, id: string) {
|
||||||
|
|
||||||
/** function เรียกหน่วยงาน*/
|
/** function เรียกหน่วยงาน*/
|
||||||
async function fetchOrgList() {
|
async function fetchOrgList() {
|
||||||
// showLoader();
|
showLoader();
|
||||||
// await http
|
await http
|
||||||
// .get(config.API.typeOc())
|
.get(config.API.insigniaOrg)
|
||||||
// .then(async (response: any) => {
|
.then(async (response: any) => {
|
||||||
// const orgArr = response.data.result.map((e: any) => ({
|
const orgArr = response.data.result.map((e: any) => ({
|
||||||
// id: e.organizationId,
|
id: e.id,
|
||||||
// name: e.organizationName,
|
name: e.name + `(${e.shortName})`,
|
||||||
// }));
|
}));
|
||||||
// OrgList.value = orgArr;
|
OrgList.value = orgArr;
|
||||||
// OrgList2.value = [
|
OrgList2.value = orgArr;
|
||||||
// {
|
// [
|
||||||
// id: "00000000-0000-0000-0000-000000000000",
|
// {
|
||||||
// name: "สำนักนายกรัฐมนตรี",
|
// id: "00000000-0000-0000-0000-000000000000",
|
||||||
// },
|
// name: "สำนักนายกรัฐมนตรี",
|
||||||
// ...orgArr,
|
// },
|
||||||
// ];
|
// ...orgArr,
|
||||||
// })
|
// ];
|
||||||
// .catch((err) => {
|
})
|
||||||
// messageError($q, err);
|
.catch((err) => {
|
||||||
// })
|
messageError($q, err);
|
||||||
// .finally(() => {
|
})
|
||||||
// hideLoader();
|
.finally(() => {
|
||||||
// });
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** hook*/
|
|
||||||
onMounted(() => {
|
|
||||||
fetchOrgList();
|
|
||||||
});
|
|
||||||
|
|
||||||
/** callback function จำทำงานเมื่อ props มีการเปลี่ยนแปลง*/
|
/** callback function จำทำงานเมื่อ props มีการเปลี่ยนแปลง*/
|
||||||
watch(props, () => {
|
watch(props, () => {
|
||||||
if (props.dataModal) {
|
if (props.dataModal) {
|
||||||
|
fetchOrgList();
|
||||||
Datereceive.value = props.dataModal.dateReceiveInsignia;
|
Datereceive.value = props.dataModal.dateReceiveInsignia;
|
||||||
Datereturn.value = props.dataModal.dateReturnInsignia;
|
Datereturn.value = props.dataModal.dateReturnInsignia;
|
||||||
OrganazationId.value = props.dataModal.orgReceiveInsignia;
|
OrganazationId.value = props.dataModal.orgReceiveInsignia;
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ async function fecthRound() {
|
||||||
DataStore.roundId = selectRound.value;
|
DataStore.roundId = selectRound.value;
|
||||||
}
|
}
|
||||||
if (roundYear.value) {
|
if (roundYear.value) {
|
||||||
|
await fecthInsignia();
|
||||||
await fecthInsigniaType();
|
await fecthInsigniaType();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -159,7 +160,6 @@ const fecthInsigniaType = async () => {
|
||||||
tab.value = DataStore.mainTab;
|
tab.value = DataStore.mainTab;
|
||||||
} else tab.value = DataStore.insigniaType[0].name;
|
} else tab.value = DataStore.insigniaType[0].name;
|
||||||
loadView.value = true;
|
loadView.value = true;
|
||||||
fecthInsignia();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
|
|
@ -245,8 +245,6 @@ async function fecthRound() {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -436,12 +434,12 @@ async function perviewfile(event: any, actionType: string) {
|
||||||
typepay: e.typePayment,
|
typepay: e.typePayment,
|
||||||
address: e.address,
|
address: e.address,
|
||||||
}));
|
}));
|
||||||
|
modelPerview.value = true;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
modelPerview.value = true;
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -661,7 +659,7 @@ onMounted(async () => {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
style="width: 280px"
|
style="width: 300px"
|
||||||
@update:model-value="selectorInsignia"
|
@update:model-value="selectorInsignia"
|
||||||
@filter="(inputValue:any,
|
@filter="(inputValue:any,
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'insigniaTypeFilter'
|
doneFn:Function) => filterSelector(inputValue, doneFn,'insigniaTypeFilter'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue