Merge branch 'develop' into devTee
This commit is contained in:
commit
0c4b8072a1
74 changed files with 5842 additions and 2116 deletions
|
|
@ -195,6 +195,7 @@ async function onClickSelectPos(id: string) {
|
|||
(e) => e.id === seletcId.value
|
||||
);
|
||||
}
|
||||
console.log(selected.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -208,7 +209,7 @@ onMounted(async () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="column q-col-gutter-sm" style="height: 70vh">
|
||||
<div class="column q-col-gutter-sm">
|
||||
<!-- เลือกเลขที่ตำแหน่ง -->
|
||||
<div class="col-7">
|
||||
<q-card bordered style="height: 100%; border: 1px solid #d6dee1">
|
||||
|
|
|
|||
|
|
@ -198,8 +198,7 @@ async function fetchPosFind(level: number, id: string) {
|
|||
.post(config.API.orgPosFind, body)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
|
||||
expanded.value = data;
|
||||
nodeId.value = id;
|
||||
positionId.value = props?.dataRow?.posmasterId;
|
||||
|
|
@ -280,9 +279,8 @@ watch(
|
|||
if (modal.value) {
|
||||
await fetchOrganizationActive();
|
||||
console.log(props?.dataRow);
|
||||
|
||||
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
|
||||
|
||||
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
|
||||
await fetchPosFind(props?.dataRow?.node, props?.dataRow?.nodeId);
|
||||
} else {
|
||||
expanded.value = [];
|
||||
|
|
@ -348,7 +346,7 @@ watch(
|
|||
<q-card
|
||||
bordered
|
||||
class="col-12 col-sm-3 scroll q-pa-sm"
|
||||
style="height: 75vh"
|
||||
style="height: 80vh"
|
||||
>
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-toolbar-title class="text-subtitle2 text-bold"
|
||||
|
|
@ -410,7 +408,11 @@ watch(
|
|||
</q-tree>
|
||||
</q-card>
|
||||
|
||||
<q-card bordered class="col-12 col-sm-9 q-pa-sm">
|
||||
<q-card
|
||||
bordered
|
||||
class="col-12 col-sm-9 q-pa-sm scroll"
|
||||
style="height: 80vh"
|
||||
>
|
||||
<q-tab-panels
|
||||
v-model="nodeId"
|
||||
animated
|
||||
|
|
|
|||
|
|
@ -165,20 +165,20 @@ interface CheckboxItem {
|
|||
async function dataEdit(id: string) {
|
||||
// await myForm.value.validate().then((result: boolean) => {
|
||||
// if (result) {
|
||||
showLoader();
|
||||
const data = putDataEdit(id);
|
||||
http
|
||||
.put(config.API.saveEditAssign(id), data)
|
||||
.then(() => {})
|
||||
.catch(() => {})
|
||||
.finally(async () => {
|
||||
isEdit.value = false;
|
||||
getAssign();
|
||||
hideLoader();
|
||||
});
|
||||
// } else {
|
||||
// dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
|
||||
// }
|
||||
showLoader();
|
||||
const data = putDataEdit(id);
|
||||
http
|
||||
.put(config.API.saveEditAssign(id), data)
|
||||
.then(() => {})
|
||||
.catch(() => {})
|
||||
.finally(async () => {
|
||||
isEdit.value = false;
|
||||
getAssign();
|
||||
hideLoader();
|
||||
});
|
||||
// } else {
|
||||
// dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
|
@ -308,16 +308,22 @@ async function getUser() {
|
|||
|
||||
OPcaretaker.value = data.caregiver.map((item: any) => ({
|
||||
id: item.id,
|
||||
name: item.prefix + item.firstName + " " + item.lastName,
|
||||
name:
|
||||
(item.prefix == null ? "" : item.prefix) +
|
||||
item.firstName +
|
||||
" " +
|
||||
item.lastName,
|
||||
label: item.position
|
||||
? `${item.prefix} ${item.firstName} ${item.lastName} (${
|
||||
item.position
|
||||
}${
|
||||
? `${item.prefix == null ? "" : item.prefix} ${item.firstName} ${
|
||||
item.lastName
|
||||
} (${item.position}${
|
||||
item.posLevel && item.posType
|
||||
? ", " + item.posType + ": " + item.posLevel
|
||||
: ""
|
||||
})`
|
||||
: `${item.prefix} ${item.firstName} ${item.lastName}`,
|
||||
: `${item.prefix == null ? "" : item.prefix} ${item.firstName} ${
|
||||
item.lastName
|
||||
}`,
|
||||
citizenId: item.citizenId,
|
||||
isDirector: item.isDirector,
|
||||
posLevel: item.posLevel,
|
||||
|
|
@ -327,16 +333,22 @@ async function getUser() {
|
|||
|
||||
OPcommander.value = data.commander.map((item: any) => ({
|
||||
id: item.id,
|
||||
name: item.prefix + item.firstName + " " + item.lastName,
|
||||
name:
|
||||
(item.prefix == null ? "" : item.prefix) +
|
||||
item.firstName +
|
||||
" " +
|
||||
item.lastName,
|
||||
label: item.position
|
||||
? `${item.prefix} ${item.firstName} ${item.lastName} (${
|
||||
item.position
|
||||
}${
|
||||
? `${item.prefix == null ? "" : item.prefix} ${item.firstName} ${
|
||||
item.lastName
|
||||
} (${item.position}${
|
||||
item.posLevel && item.posType
|
||||
? ", " + item.posType + ": " + item.posLevel
|
||||
: ""
|
||||
})`
|
||||
: `${item.prefix} ${item.firstName} ${item.lastName}`,
|
||||
: `${item.prefix == null ? "" : item.prefix} ${item.firstName} ${
|
||||
item.lastName
|
||||
}`,
|
||||
citizenId: item.citizenId,
|
||||
posLevel: item.posLevel,
|
||||
posType: item.posType,
|
||||
|
|
@ -345,16 +357,22 @@ async function getUser() {
|
|||
|
||||
OPchairman.value = data.chairman.map((item: any) => ({
|
||||
id: item.id,
|
||||
name: item.prefix + item.firstName + " " + item.lastName,
|
||||
name:
|
||||
(item.prefix == null ? "-" : item.prefix) +
|
||||
item.firstName +
|
||||
" " +
|
||||
item.lastName,
|
||||
label: item.position
|
||||
? `${item.prefix} ${item.firstName} ${item.lastName} (${
|
||||
item.position
|
||||
}${
|
||||
? `${item.prefix == null ? "-" : item.prefix} ${item.firstName} ${
|
||||
item.lastName
|
||||
} (${item.position}${
|
||||
item.posLevel && item.posType
|
||||
? ", " + item.posType + ": " + item.posLevel
|
||||
: ""
|
||||
})`
|
||||
: `${item.prefix} ${item.firstName} ${item.lastName}`,
|
||||
: `${item.prefix == null ? "-" : item.prefix} ${item.firstName} ${
|
||||
item.lastName
|
||||
}`,
|
||||
citizenId: item.citizenId,
|
||||
posLevel: item.posLevel,
|
||||
posType: item.posType,
|
||||
|
|
@ -378,7 +396,7 @@ async function getAssignNew(id: string) {
|
|||
monthOp.push(monthOption);
|
||||
monthSelect.value = `${data.assign_month} เดือน`;
|
||||
fullname.value =
|
||||
data.person.prefixName +
|
||||
(data.person.prefixName == null ? "" : data.person.prefixName) +
|
||||
data.person.firstName +
|
||||
" " +
|
||||
data.person.lastName;
|
||||
|
|
@ -1059,7 +1077,9 @@ onMounted(async () => {
|
|||
<q-form
|
||||
greedy
|
||||
@submit.prevent
|
||||
@validation-success="assignId !== undefined ? saveEdit(assignId) : saveData(personalId)"
|
||||
@validation-success="
|
||||
assignId !== undefined ? saveEdit(assignId) : saveData(personalId)
|
||||
"
|
||||
>
|
||||
<div class="q-pa-sm">
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
|
|
|
|||
|
|
@ -110,7 +110,8 @@ const columns = ref<QTableProps["columns"]>([
|
|||
sortable: true,
|
||||
field: "organization",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
style: "font-size: 14px ",
|
||||
classes: "table_ellipsis",
|
||||
},
|
||||
{
|
||||
name: "probation_no",
|
||||
|
|
@ -179,7 +180,10 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return row.posTypeName + " (" + row.posLevelName + ")";
|
||||
return (
|
||||
(row.posTypeName ? row.posTypeName : "") +
|
||||
(row.posLevelName !== null ? " (" + row.posLevelName + ")" : "")
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -250,7 +254,7 @@ async function getpersonalList() {
|
|||
position_line_id: item.position_line_id,
|
||||
position_level: item.position_level,
|
||||
position_level_id: item.position_level_id,
|
||||
organization: item.organization,
|
||||
organization: item.organization !== "" ? item.organization : "-",
|
||||
probation_no: item.probation_no,
|
||||
order_number: item.order_number != "xx/2566" ? item.order_number : "-",
|
||||
probation_status: statusProbationMain(Number(item.probation_status)),
|
||||
|
|
@ -382,9 +386,7 @@ function clickAdd(data: any) {
|
|||
$q,
|
||||
async () => {
|
||||
showLoader();
|
||||
// const postData = {
|
||||
// personal_id: id,
|
||||
// };
|
||||
|
||||
await http
|
||||
.post(config.API.personalAdd(), data)
|
||||
.then(() => {
|
||||
|
|
@ -582,7 +584,7 @@ onMounted(async () => {
|
|||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
{{ col.value ?? "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
|
|
@ -680,7 +682,7 @@ onMounted(async () => {
|
|||
|
||||
<div v-else-if="col.name == 'fullname'">
|
||||
{{
|
||||
props.row.prefix +
|
||||
(props.row.prefix ? props.row.prefix : "") +
|
||||
props.row.firstName +
|
||||
" " +
|
||||
props.row.lastName
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue