แก้ไข อัพโหลดเอกสารรับโอน
This commit is contained in:
parent
e312462f80
commit
fadd6a4df7
4 changed files with 378 additions and 151 deletions
|
|
@ -72,7 +72,8 @@ export default {
|
||||||
prevStep: (orderId: string) => `${order}/order/prev/${orderId}`,
|
prevStep: (orderId: string) => `${order}/order/prev/${orderId}`,
|
||||||
executeOrder: (orderId: string) => `${order}/order/execute/${orderId}`,
|
executeOrder: (orderId: string) => `${order}/order/execute/${orderId}`,
|
||||||
createOrder: () => `${order}/order/detail`,
|
createOrder: () => `${order}/order/detail`,
|
||||||
examroundOrder: (commandCode: string) => `${order}/order/detail/exam-round/${commandCode}`,
|
examroundOrder: (commandCode: string) =>
|
||||||
|
`${order}/order/detail/exam-round/${commandCode}`,
|
||||||
personsOrder: (orderId: string) => `${order}/order/persons/${orderId}`, //ข้อมูลเลือกรายชื่อออกคำสั่ง, ลบรายชื่อ
|
personsOrder: (orderId: string) => `${order}/order/persons/${orderId}`, //ข้อมูลเลือกรายชื่อออกคำสั่ง, ลบรายชื่อ
|
||||||
personsselectedOrder: (orderId: string) =>
|
personsselectedOrder: (orderId: string) =>
|
||||||
`${order}/order/persons-selected/${orderId}`,
|
`${order}/order/persons-selected/${orderId}`,
|
||||||
|
|
@ -99,6 +100,7 @@ export default {
|
||||||
receiveDataId: (id: string) => `${receive}/${id}`,
|
receiveDataId: (id: string) => `${receive}/${id}`,
|
||||||
receivePosition: (id: string) => `${receive}/position/${id}`,
|
receivePosition: (id: string) => `${receive}/position/${id}`,
|
||||||
receiveDataPosition: () => `${receive}/use`,
|
receiveDataPosition: () => `${receive}/use`,
|
||||||
|
receiveFile: (id: string) => `${receive}/upload/${id}`,
|
||||||
|
|
||||||
//tranfer ระบบคำขอโอน
|
//tranfer ระบบคำขอโอน
|
||||||
transfer,
|
transfer,
|
||||||
|
|
@ -108,13 +110,13 @@ export default {
|
||||||
transferUserId: (id: string) => `${transfer}/user/${id}`,
|
transferUserId: (id: string) => `${transfer}/user/${id}`,
|
||||||
transferConfirmId: (id: string) => `${transfer}/confirm/${id}`,
|
transferConfirmId: (id: string) => `${transfer}/confirm/${id}`,
|
||||||
|
|
||||||
|
|
||||||
// แต่งตั้ง-เลื่อน
|
// แต่งตั้ง-เลื่อน
|
||||||
placemenAppointment,
|
placemenAppointment,
|
||||||
appointmentMain: () => `${placement}/appointment`,
|
appointmentMain: () => `${placement}/appointment`,
|
||||||
appointmentByid: (id: string) => `${placement}/appointment/${id}`,
|
appointmentByid: (id: string) => `${placement}/appointment/${id}`,
|
||||||
appointmentDelete: (id: string) => `${placement}/appointment/${id}`,
|
appointmentDelete: (id: string) => `${placement}/appointment/${id}`,
|
||||||
appointmentPosition: (id: string) => `${placement}/appointment/position/${id}`,
|
appointmentPosition: (id: string) =>
|
||||||
|
`${placement}/appointment/position/${id}`,
|
||||||
apppointmentReport: (id: string) => `${placement}/appointment/report/${id}`,
|
apppointmentReport: (id: string) => `${placement}/appointment/report/${id}`,
|
||||||
apppointmentPosition: () => `${placement}/appointment/use`,
|
apppointmentPosition: () => `${placement}/appointment/use`,
|
||||||
|
|
||||||
|
|
@ -152,10 +154,8 @@ export default {
|
||||||
|
|
||||||
userPlacement: (id: string) => `${placement}/user/${id}`,
|
userPlacement: (id: string) => `${placement}/user/${id}`,
|
||||||
|
|
||||||
// orderForm
|
// orderForm
|
||||||
orderCPM: (type: string) => `${order}/order/${type}/detail`,
|
orderCPM: (type: string) => `${order}/order/${type}/detail`,
|
||||||
orderCPMUpdate: (type: string, id: string) => `${order}/order/${type}/detail/${id}`,
|
orderCPMUpdate: (type: string, id: string) =>
|
||||||
|
`${order}/order/${type}/detail/${id}`,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ export default {
|
||||||
`${profile}search/new-employee/oc/${id}`,
|
`${profile}search/new-employee/oc/${id}`,
|
||||||
profileSearchNewEmOcLeaveId: (id: string) =>
|
profileSearchNewEmOcLeaveId: (id: string) =>
|
||||||
`${profile}search/new-employee/oc/leave/${id}`,
|
`${profile}search/new-employee/oc/leave/${id}`,
|
||||||
profileEmployeeTempId: (id: string) => `${profile}/employee/temp/${id}`,
|
profileEmployeeTempId: (id: string) => `${profile}employee/temp/${id}`,
|
||||||
|
|
||||||
profileCoupleId: (profileId: string) => `${profile}couple/${profileId}`,
|
profileCoupleId: (profileId: string) => `${profile}couple/${profileId}`,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import type {
|
||||||
ResponseRow,
|
ResponseRow,
|
||||||
} from "@/modules/05_placement/interface/response/Receive";
|
} from "@/modules/05_placement/interface/response/Receive";
|
||||||
|
|
||||||
|
const id = ref<string>("");
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
|
|
@ -39,7 +40,10 @@ const modal = ref<boolean>(false);
|
||||||
const popup = () => {
|
const popup = () => {
|
||||||
const row = filters.value.filter(
|
const row = filters.value.filter(
|
||||||
(r: ResponseRow) =>
|
(r: ResponseRow) =>
|
||||||
(r.status == "WAITTING" || r.status == "PENDING" || r.status == "APPROVE") && r.positionNumber != null
|
(r.status == "WAITTING" ||
|
||||||
|
r.status == "PENDING" ||
|
||||||
|
r.status == "APPROVE") &&
|
||||||
|
r.positionNumber != null
|
||||||
);
|
);
|
||||||
rows2.value = row;
|
rows2.value = row;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
|
|
@ -73,6 +77,8 @@ const filterKeyword = ref<string>("");
|
||||||
const filterKeyword2 = ref<string>("");
|
const filterKeyword2 = ref<string>("");
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
const files = ref<any>();
|
const files = ref<any>();
|
||||||
|
const nameFile = ref<string>("");
|
||||||
|
const fileUpload = ref<any>([]);
|
||||||
const fileDocDataUpload = ref<File[]>([]);
|
const fileDocDataUpload = ref<File[]>([]);
|
||||||
const listRecevice = ref<any[]>([]);
|
const listRecevice = ref<any[]>([]);
|
||||||
const filters = ref<ResponseRow[]>([]);
|
const filters = ref<ResponseRow[]>([]);
|
||||||
|
|
@ -267,6 +273,11 @@ onMounted(() => {
|
||||||
fecthlistRecevice();
|
fecthlistRecevice();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const SaveData = async () => {
|
||||||
|
await addUpload();
|
||||||
|
await clickCloseUpload();
|
||||||
|
};
|
||||||
|
|
||||||
const fecthlistRecevice = async () => {
|
const fecthlistRecevice = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -312,30 +323,32 @@ const fecthlistRecevice = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fileUploadDoc = async (files: any) => {
|
const fileUploadDoc = async (val: any) => {
|
||||||
files.forEach((file: any) => {
|
nameFile.value = val[0].name;
|
||||||
fileDocDataUpload.value.push(file);
|
fileUpload.value = val;
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const addUpload = async () => {
|
const addUpload = async () => {
|
||||||
// showLoader();
|
if (fileUpload.value.length > 0) {
|
||||||
// await http
|
const blob = fileUpload.value.slice(0, fileUpload.value[0].size);
|
||||||
// .post(config.API.listRoundInsignia())
|
const newFile = new File(blob, nameFile.value, {
|
||||||
// .then(() => {
|
type: fileUpload.value[0].type,
|
||||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
});
|
||||||
// })
|
const formData = new FormData();
|
||||||
// .catch((e) => {
|
formData.append("", newFile);
|
||||||
// messageError($q, e);
|
showLoader();
|
||||||
// })
|
await http
|
||||||
// .finally(async () => {
|
.put(config.API.receiveFile(personalId.value), formData)
|
||||||
// hideLoader();
|
.then(() => {
|
||||||
// });
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
};
|
})
|
||||||
|
.catch((e) => {
|
||||||
const SaveData = async () => {
|
messageError($q, e);
|
||||||
await addUpload();
|
})
|
||||||
await clickCloseUpload();
|
.finally(async () => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetFilter = () => {
|
const resetFilter = () => {
|
||||||
|
|
@ -372,6 +385,7 @@ const openModalTree = (id: string) => {
|
||||||
const openUpload = (id: string) => {
|
const openUpload = (id: string) => {
|
||||||
personalId.value = id;
|
personalId.value = id;
|
||||||
modalupload.value = true;
|
modalupload.value = true;
|
||||||
|
console.log(personalId.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const openDelete = (id: string) => {
|
const openDelete = (id: string) => {
|
||||||
|
|
@ -440,27 +454,64 @@ const saveOrder = async () => {
|
||||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn @click="popup()" size="14px" flat round color="add" icon="mdi-account-arrow-right">
|
<q-btn
|
||||||
|
@click="popup()"
|
||||||
|
size="14px"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="add"
|
||||||
|
icon="mdi-account-arrow-right"
|
||||||
|
>
|
||||||
<q-tooltip>ส่งไปออกคำสั่งรับโอน</q-tooltip>
|
<q-tooltip>ส่งไปออกคำสั่งรับโอน</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input class="col-xs-12 col-sm-3 col-md-2" standout dense v-model="filterKeyword" ref="filterRef" outlined
|
<q-input
|
||||||
debounce="300" placeholder="ค้นหา">
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
standout
|
||||||
|
dense
|
||||||
|
v-model="filterKeyword"
|
||||||
|
ref="filterRef"
|
||||||
|
outlined
|
||||||
|
debounce="300"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
<q-icon v-if="filterKeyword !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
<q-icon
|
||||||
|
v-if="filterKeyword !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
<q-select v-model="visibleColumns" multiple outlined dense options-dense :display-value="$q.lang.table.columns"
|
<q-select
|
||||||
emit-value map-options :options="columns" option-value="name" options-cover style="min-width: 150px"
|
v-model="visibleColumns"
|
||||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm" />
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="columns"
|
||||||
|
option-value="name"
|
||||||
|
options-cover
|
||||||
|
style="min-width: 150px"
|
||||||
|
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 q-pt-sm">
|
<div class="col-12 q-pt-sm">
|
||||||
<d-table :columns="columns" :rows="rows" :filter="filterKeyword" row-key="fullname"
|
<d-table
|
||||||
:visible-columns="visibleColumns">
|
:columns="columns"
|
||||||
|
:rows="rows"
|
||||||
|
:filter="filterKeyword"
|
||||||
|
row-key="fullname"
|
||||||
|
:visible-columns="visibleColumns"
|
||||||
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
|
@ -474,16 +525,31 @@ const saveOrder = async () => {
|
||||||
<q-td key="no" :props="props" @click="nextPage(props.row)">
|
<q-td key="no" :props="props" @click="nextPage(props.row)">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="citizenId" :props="props" @click="nextPage(props.row)">
|
<q-td
|
||||||
|
key="citizenId"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row)"
|
||||||
|
>
|
||||||
{{ props.row.citizenId }}
|
{{ props.row.citizenId }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="fullname" :props="props" @click="nextPage(props.row)">
|
<q-td
|
||||||
|
key="fullname"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row)"
|
||||||
|
>
|
||||||
{{ props.row.fullname }}
|
{{ props.row.fullname }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="organizationName" :props="props" @click="nextPage(props.row)">
|
<q-td
|
||||||
<div v-if="props.row.orgName !== null ||
|
key="organizationName"
|
||||||
props.row.positionPath !== null
|
:props="props"
|
||||||
">
|
@click="nextPage(props.row)"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
props.row.orgName !== null ||
|
||||||
|
props.row.positionPath !== null
|
||||||
|
"
|
||||||
|
>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<div class="text-weight-medium">
|
<div class="text-weight-medium">
|
||||||
{{
|
{{
|
||||||
|
|
@ -491,20 +557,20 @@ const saveOrder = async () => {
|
||||||
}}
|
}}
|
||||||
{{
|
{{
|
||||||
props.row.organizationShortName !== null
|
props.row.organizationShortName !== null
|
||||||
? `(${props.row.organizationShortName})`
|
? `(${props.row.organizationShortName})`
|
||||||
: ""
|
: ""
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-weight-light">
|
<div class="text-weight-light">
|
||||||
{{
|
{{
|
||||||
props.row.positionPath !== null
|
props.row.positionPath !== null
|
||||||
? props.row.positionPath
|
? props.row.positionPath
|
||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
{{
|
{{
|
||||||
props.row.positionNumber !== null
|
props.row.positionNumber !== null
|
||||||
? `(${props.row.positionNumber})`
|
? `(${props.row.positionNumber})`
|
||||||
: ""
|
: ""
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -515,53 +581,122 @@ const saveOrder = async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="birthday" :props="props" @click="nextPage(props.row)">
|
<q-td
|
||||||
|
key="birthday"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row)"
|
||||||
|
>
|
||||||
{{ props.row.birthday }}
|
{{ props.row.birthday }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="dateText" :props="props" @click="nextPage(props.row)">
|
<q-td
|
||||||
|
key="dateText"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row)"
|
||||||
|
>
|
||||||
{{ props.row.dateText }}
|
{{ props.row.dateText }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="statusText" :props="props" @click="nextPage(props.row)">
|
<q-td
|
||||||
|
key="statusText"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row)"
|
||||||
|
>
|
||||||
{{ props.row.statusText }}
|
{{ props.row.statusText }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn icon="mdi-dots-vertical" size="12px" color="grey-7" flat round dense>
|
<q-btn
|
||||||
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
icon="mdi-dots-vertical"
|
||||||
|
size="12px"
|
||||||
|
color="grey-7"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
>
|
||||||
|
<q-menu
|
||||||
|
transition-show="jump-down"
|
||||||
|
transition-hide="jump-up"
|
||||||
|
>
|
||||||
<q-list dense style="min-width: 100px">
|
<q-list dense style="min-width: 100px">
|
||||||
<q-item clickable v-close-popup @click="openModalTree(props.row.personalId)" :disable="props.row.status == 'REPORT' ||
|
<q-item
|
||||||
props.row.status == 'DONE'
|
clickable
|
||||||
">
|
v-close-popup
|
||||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
@click="openModalTree(props.row.personalId)"
|
||||||
<q-icon :color="props.row.status == 'REPORT' ||
|
:disable="
|
||||||
|
props.row.status == 'REPORT' ||
|
||||||
|
props.row.status == 'DONE'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-item-section
|
||||||
|
style="min-width: 0px"
|
||||||
|
avatar
|
||||||
|
class="q-py-sm"
|
||||||
|
>
|
||||||
|
<q-icon
|
||||||
|
:color="
|
||||||
|
props.row.status == 'REPORT' ||
|
||||||
props.row.status == 'DONE'
|
props.row.status == 'DONE'
|
||||||
? 'grey'
|
? 'grey'
|
||||||
: 'primary'
|
: 'primary'
|
||||||
" size="xs" name="mdi-bookmark-outline" />
|
"
|
||||||
|
size="xs"
|
||||||
|
name="mdi-bookmark-outline"
|
||||||
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>เลือกหน่วยงานที่รับโอน</q-item-section>
|
<q-item-section
|
||||||
|
>เลือกหน่วยงานที่รับโอน</q-item-section
|
||||||
|
>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable v-close-popup @click="openUpload(props.row.personalId)" :disable="props.row.status == 'REPORT' ||
|
<q-item
|
||||||
props.row.status == 'DONE'
|
clickable
|
||||||
">
|
v-close-popup
|
||||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
@click="openUpload(props.row.personalId)"
|
||||||
<q-icon :color="props.row.status == 'REPORT' ||
|
:disable="
|
||||||
|
props.row.status == 'REPORT' ||
|
||||||
|
props.row.status == 'DONE'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-item-section
|
||||||
|
style="min-width: 0px"
|
||||||
|
avatar
|
||||||
|
class="q-py-sm"
|
||||||
|
>
|
||||||
|
<q-icon
|
||||||
|
:color="
|
||||||
|
props.row.status == 'REPORT' ||
|
||||||
props.row.status == 'DONE'
|
props.row.status == 'DONE'
|
||||||
? 'grey'
|
? 'grey'
|
||||||
: 'blue'
|
: 'blue'
|
||||||
" size="xs" name="attach_file" />
|
"
|
||||||
|
size="xs"
|
||||||
|
name="attach_file"
|
||||||
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>อัพโหลดเอกสาร</q-item-section>
|
<q-item-section>อัพโหลดเอกสาร</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable v-close-popup @click="openDelete(props.row.personalId)" :disable="props.row.status == 'REPORT' ||
|
<q-item
|
||||||
props.row.status == 'DONE'
|
clickable
|
||||||
">
|
v-close-popup
|
||||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
@click="openDelete(props.row.personalId)"
|
||||||
|
:disable="
|
||||||
|
props.row.status == 'REPORT' ||
|
||||||
|
props.row.status == 'DONE'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-item-section
|
||||||
|
style="min-width: 0px"
|
||||||
|
avatar
|
||||||
|
class="q-py-sm"
|
||||||
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
<q-icon :color="props.row.status == 'REPORT' ||
|
<q-icon
|
||||||
|
:color="
|
||||||
|
props.row.status == 'REPORT' ||
|
||||||
props.row.status == 'DONE'
|
props.row.status == 'DONE'
|
||||||
? 'grey'
|
? 'grey'
|
||||||
: 'red'
|
: 'red'
|
||||||
" size="xs" name="mdi-delete" />
|
"
|
||||||
|
size="xs"
|
||||||
|
name="mdi-delete"
|
||||||
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>ลบ</q-item-section>
|
<q-item-section>ลบ</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
@ -585,24 +720,61 @@ const saveOrder = async () => {
|
||||||
<div class="row justify-end">
|
<div class="row justify-end">
|
||||||
<div class="col-5">
|
<div class="col-5">
|
||||||
<q-toolbar style="padding: 0">
|
<q-toolbar style="padding: 0">
|
||||||
<q-input borderless outlined dense debounce="300" v-model="filterKeyword2" placeholder="ค้นหา"
|
<q-input
|
||||||
style="width: 850px; max-width: auto">
|
borderless
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
debounce="300"
|
||||||
|
v-model="filterKeyword2"
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
style="width: 850px; max-width: auto"
|
||||||
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
||||||
<q-icon v-if="filterKeyword2 !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
<q-icon
|
||||||
|
v-if="filterKeyword2 !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-select v-model="visibleColumns2" multiple outlined dense options-dense
|
<q-select
|
||||||
:display-value="$q.lang.table.columns" emit-value map-options :options="columns2" option-value="name"
|
v-model="visibleColumns2"
|
||||||
options-cover style="min-width: 150px" class="gt-xs q-ml-sm" />
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="columns2"
|
||||||
|
option-value="name"
|
||||||
|
options-cover
|
||||||
|
style="min-width: 150px"
|
||||||
|
class="gt-xs q-ml-sm"
|
||||||
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<d-table :columns="columns2" :rows="rows2" :filter="filterKeyword2" row-key="personalId" flat
|
<d-table
|
||||||
:visible-columns="visibleColumns2" selection="multiple" v-model:selected="selected">
|
:columns="columns2"
|
||||||
|
:rows="rows2"
|
||||||
|
:filter="filterKeyword2"
|
||||||
|
row-key="personalId"
|
||||||
|
flat
|
||||||
|
:visible-columns="visibleColumns2"
|
||||||
|
selection="multiple"
|
||||||
|
v-model:selected="selected"
|
||||||
|
>
|
||||||
<template v-slot:header-selection="scope">
|
<template v-slot:header-selection="scope">
|
||||||
<q-checkbox keep-color color="primary" dense v-model="scope.selected" />
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
v-model="scope.selected"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template v-slot:body-selection="scope">
|
<!-- <template v-slot:body-selection="scope">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
|
|
@ -615,7 +787,12 @@ const saveOrder = async () => {
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-checkbox keep-color color="primary" dense v-model="props.selected" />
|
<q-checkbox
|
||||||
|
keep-color
|
||||||
|
color="primary"
|
||||||
|
dense
|
||||||
|
v-model="props.selected"
|
||||||
|
/>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="no" :props="props">
|
<q-td key="no" :props="props">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
|
|
@ -626,29 +803,36 @@ const saveOrder = async () => {
|
||||||
<q-td key="fullname" :props="props" @click="nextPage(props.row)">
|
<q-td key="fullname" :props="props" @click="nextPage(props.row)">
|
||||||
{{ props.row.fullname }}
|
{{ props.row.fullname }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="organizationName" :props="props" @click="nextPage(props.row)">
|
<q-td
|
||||||
<div v-if="props.row.orgName !== null ||
|
key="organizationName"
|
||||||
props.row.positionPath !== null
|
:props="props"
|
||||||
">
|
@click="nextPage(props.row)"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
props.row.orgName !== null ||
|
||||||
|
props.row.positionPath !== null
|
||||||
|
"
|
||||||
|
>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<div class="text-weight-medium">
|
<div class="text-weight-medium">
|
||||||
{{ props.row.orgName !== null ? props.row.orgName : "-" }}
|
{{ props.row.orgName !== null ? props.row.orgName : "-" }}
|
||||||
{{
|
{{
|
||||||
props.row.organizationShortName !== null
|
props.row.organizationShortName !== null
|
||||||
? `(${props.row.organizationShortName})`
|
? `(${props.row.organizationShortName})`
|
||||||
: ""
|
: ""
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-weight-light">
|
<div class="text-weight-light">
|
||||||
{{
|
{{
|
||||||
props.row.positionPath !== null
|
props.row.positionPath !== null
|
||||||
? props.row.positionPath
|
? props.row.positionPath
|
||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
{{
|
{{
|
||||||
props.row.positionNumber !== null
|
props.row.positionNumber !== null
|
||||||
? `(${props.row.positionNumber})`
|
? `(${props.row.positionNumber})`
|
||||||
: ""
|
: ""
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -665,7 +849,11 @@ const saveOrder = async () => {
|
||||||
<q-td key="dateText" :props="props" @click="nextPage(props.row)">
|
<q-td key="dateText" :props="props" @click="nextPage(props.row)">
|
||||||
{{ props.row.dateText }}
|
{{ props.row.dateText }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="statusText" :props="props" @click="nextPage(props.row)">
|
<q-td
|
||||||
|
key="statusText"
|
||||||
|
:props="props"
|
||||||
|
@click="nextPage(props.row)"
|
||||||
|
>
|
||||||
{{ props.row.statusText }}
|
{{ props.row.statusText }}
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -674,7 +862,12 @@ const saveOrder = async () => {
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
<q-btn label="ส่งไปออกคำสั่ง" @click="saveOrder" :disable="checkSelected" color="public" />
|
<q-btn
|
||||||
|
label="ส่งไปออกคำสั่ง"
|
||||||
|
@click="saveOrder"
|
||||||
|
:disable="checkSelected"
|
||||||
|
color="public"
|
||||||
|
/>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
@ -682,12 +875,17 @@ const saveOrder = async () => {
|
||||||
<q-dialog v-model="modalupload">
|
<q-dialog v-model="modalupload">
|
||||||
<q-card style="width: 600px">
|
<q-card style="width: 600px">
|
||||||
<DialogHeader title="อัพโหลดเอกสาร" :close="clickCloseUpload" />
|
<DialogHeader title="อัพโหลดเอกสาร" :close="clickCloseUpload" />
|
||||||
<q-separator />
|
|
||||||
<q-separator />
|
|
||||||
<q-card-section class="q-pt-none">
|
<q-card-section class="q-pt-none">
|
||||||
<div class="col-12 row items-center q-col-gutter-sm">
|
<div class="col-12 row items-center q-col-gutter-sm">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-file outlined dense v-model="files" @added="fileUploadDoc" label="อัพโหลดเอกสาร" lazy-rules>
|
<q-file
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
v-model="files"
|
||||||
|
@added="fileUploadDoc"
|
||||||
|
label="อัพโหลดเอกสาร"
|
||||||
|
lazy-rules
|
||||||
|
>
|
||||||
<!-- :rules="[
|
<!-- :rules="[
|
||||||
(val) => val || 'กรุณาเลือกไฟล์หนังสือถึงหน่วยงานที่รับโอน',
|
(val) => val || 'กรุณาเลือกไฟล์หนังสือถึงหน่วยงานที่รับโอน',
|
||||||
]" -->
|
]" -->
|
||||||
|
|
@ -700,14 +898,25 @@ const saveOrder = async () => {
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-actions class="text-primary q-py-sm">
|
<q-card-actions class="text-primary q-py-sm">
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn flat round color="public" @click="SaveData" icon="mdi-content-save-outline">
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="public"
|
||||||
|
@click="SaveData()"
|
||||||
|
icon="mdi-content-save-outline"
|
||||||
|
>
|
||||||
<q-tooltip>บันทึก</q-tooltip>
|
<q-tooltip>บันทึก</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<DialogOrgTree v-model:modal="modalTree" :close="closeModalTree" :personal="personal" :personalId="personalId" />
|
<DialogOrgTree
|
||||||
|
v-model:modal="modalTree"
|
||||||
|
:close="closeModalTree"
|
||||||
|
:personal="personal"
|
||||||
|
:personalId="personalId"
|
||||||
|
/>
|
||||||
<!-- :personalId="personalId" -->
|
<!-- :personalId="personalId" -->
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<HeaderTop
|
<HeaderTop
|
||||||
v-model:edit="edit"
|
v-model:edit="edit"
|
||||||
header="ข้อมูลลูกจ้างชั่วคราว"
|
header="ข้อมูลลูกจ้างชั่วคราว"
|
||||||
icon="mdi-map-marker"
|
icon="mdi-account"
|
||||||
:save="saveData"
|
:save="saveData"
|
||||||
:history="!statusAdd()"
|
:history="!statusAdd()"
|
||||||
:changeBtn="changeBtn"
|
:changeBtn="changeBtn"
|
||||||
|
|
@ -13,8 +13,7 @@
|
||||||
:addEmployee="statusAdd()"
|
:addEmployee="statusAdd()"
|
||||||
/>
|
/>
|
||||||
<q-form ref="myform">
|
<q-form ref="myform">
|
||||||
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-sm">
|
||||||
|
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
<selector
|
<selector
|
||||||
:class="getClass(edit)"
|
:class="getClass(edit)"
|
||||||
|
|
@ -95,7 +94,7 @@
|
||||||
:label="`${'สังกัด'}`"
|
:label="`${'สังกัด'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
<q-input
|
<q-input
|
||||||
:class="getClass(edit)"
|
:class="getClass(edit)"
|
||||||
|
|
@ -120,7 +119,6 @@
|
||||||
:label="`${'ค่าจ้าง'}`"
|
:label="`${'ค่าจ้าง'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 q-pt-lg"><q-separator /></div>
|
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
<CurrencyInput
|
<CurrencyInput
|
||||||
v-model="employeeMoneyIncrease"
|
v-model="employeeMoneyIncrease"
|
||||||
|
|
@ -162,7 +160,6 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
<HistoryTable
|
<HistoryTable
|
||||||
|
|
@ -244,7 +241,7 @@
|
||||||
const positionEmployeeLineOptions = ref<DataOption[]>([]);
|
const positionEmployeeLineOptions = ref<DataOption[]>([]);
|
||||||
const positionEmployeePositionId = ref<string>("");
|
const positionEmployeePositionId = ref<string>("");
|
||||||
const positionEmployeePositionOptions = ref<DataOption[]>([]);
|
const positionEmployeePositionOptions = ref<DataOption[]>([]);
|
||||||
const employeeWage = ref<string>("");
|
const employeeWage = ref<number>(0);
|
||||||
const employeeTypeIndividual = ref<string>("");
|
const employeeTypeIndividual = ref<string>("");
|
||||||
const employeeMoneyIncrease = ref<number>(0);
|
const employeeMoneyIncrease = ref<number>(0);
|
||||||
const employeeMoneyAllowance = ref<number>(0);
|
const employeeMoneyAllowance = ref<number>(0);
|
||||||
|
|
@ -404,7 +401,7 @@
|
||||||
]);
|
]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// await fetchData();
|
await fetchData();
|
||||||
await fetchDataSelector();
|
await fetchDataSelector();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -420,6 +417,7 @@
|
||||||
showLoader();
|
showLoader();
|
||||||
await fetchEmployeeGroup();
|
await fetchEmployeeGroup();
|
||||||
await fetchpositionEmployeeLine();
|
await fetchpositionEmployeeLine();
|
||||||
|
await fetchPositionEmployeePosition();
|
||||||
hideLoader();
|
hideLoader();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -469,41 +467,41 @@
|
||||||
// await fetchData();
|
// await fetchData();
|
||||||
};
|
};
|
||||||
|
|
||||||
// const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
// if (route.params.id) {
|
if (route.params.id) {
|
||||||
// showLoader();
|
showLoader();
|
||||||
// await http
|
await http
|
||||||
// .get(config.API.profileEmployeeTempId(route.params.id.toString()))
|
.get(config.API.profileEmployeeTempId(route.params.id.toString()))
|
||||||
// .then((res) => {
|
.then((res) => {
|
||||||
// const data: any = res.data.result;
|
const data: any = res.data.result;
|
||||||
// rows.value = [];
|
rows.value = [];
|
||||||
// data.map((e: any) => {
|
data.map((e: any) => {
|
||||||
// rows.value.push({
|
rows.value.push({
|
||||||
// id: e.id,
|
id: e.id,
|
||||||
// employeeMoneyIncrease: e.employeeMoneyIncrease,
|
employeeMoneyIncrease: e.employeeMoneyIncrease,
|
||||||
// employeeMoneyAllowance: e.employeeMoneyAllowance,
|
employeeMoneyAllowance: e.employeeMoneyAllowance,
|
||||||
// employeeMoneyEmployee: e.employeeMoneyEmployee,
|
employeeMoneyEmployee: e.employeeMoneyEmployee,
|
||||||
// employeeMoneyEmployer: e.employeeMoneyEmployer,
|
employeeMoneyEmployer: e.employeeMoneyEmployer,
|
||||||
// positionEmployeeGroupId: e.positionEmployeeGroupId,
|
positionEmployeeGroupId: e.positionEmployeeGroupId,
|
||||||
// positionEmployeePositionId: e.positionEmployeePositionId,
|
positionEmployeePositionId: e.positionEmployeePositionId,
|
||||||
// positionEmployeeLineId: e.positionEmployeeLineId,
|
positionEmployeeLineId: e.positionEmployeeLineId,
|
||||||
// employeeTypeIndividual: e.employeeTypeIndividual,
|
employeeTypeIndividual: e.employeeTypeIndividual,
|
||||||
// employeeOc: e.employeeOc,
|
employeeOc: e.employeeOc,
|
||||||
// employeeWage: e.employeeWage,
|
employeeWage: e.employeeWage,
|
||||||
// createdFullName: e.createdFullName,
|
createdFullName: e.createdFullName,
|
||||||
// createdAt: new Date(e.createdAt),
|
createdAt: new Date(e.createdAt),
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
|
|
||||||
// })
|
})
|
||||||
// .catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
// })
|
})
|
||||||
// .finally(() => {
|
.finally(() => {
|
||||||
// hideLoader();
|
hideLoader();
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
|
|
||||||
// กลุ่มงาน
|
// กลุ่มงาน
|
||||||
const fetchEmployeeGroup = async () => {
|
const fetchEmployeeGroup = async () => {
|
||||||
|
|
@ -539,6 +537,26 @@ const fetchpositionEmployeeLine = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//ชื่อตำแหน่ง
|
||||||
|
|
||||||
|
const fetchPositionEmployeePosition = async () => {
|
||||||
|
await http
|
||||||
|
.get(config.API.positionEmployeePosition)
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
let option: DataOption[] = [];
|
||||||
|
data.map((r: DataOption) => {
|
||||||
|
option.push({ id: r.id.toString(), name: r.name.toString() });
|
||||||
|
});
|
||||||
|
|
||||||
|
positionEmployeePositionOptions.value = option;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// const editData = async () => {
|
// const editData = async () => {
|
||||||
// const body: any = {
|
// const body: any = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue