API รับโอน
This commit is contained in:
parent
97bb5a279c
commit
e103b9faef
3 changed files with 266 additions and 122 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed, onMounted } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
@ -7,16 +7,11 @@ import DialogFooter from "@/modules/05_placement/components/Receive/DialogFooter
|
||||||
import DialogHeader from "@/modules/05_placement/components/Receive/DialogHeader.vue";
|
import DialogHeader from "@/modules/05_placement/components/Receive/DialogHeader.vue";
|
||||||
import DialogOrgTree from "@/modules/05_placement/components/Receive/receiveModal.vue";
|
import DialogOrgTree from "@/modules/05_placement/components/Receive/receiveModal.vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { config } from "@fullcalendar/core/internal";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const {
|
const { showLoader, hideLoader, dateText, success, messageError, date2Thai } =
|
||||||
showLoader,
|
mixin;
|
||||||
hideLoader,
|
|
||||||
dateText,
|
|
||||||
success,
|
|
||||||
messageError
|
|
||||||
} = mixin;
|
|
||||||
|
|
||||||
const selected = ref([]);
|
const selected = ref([]);
|
||||||
const checkSelected = computed(() => {
|
const checkSelected = computed(() => {
|
||||||
|
|
@ -48,7 +43,7 @@ const visibleColumns = ref<string[]>([
|
||||||
"citizenId",
|
"citizenId",
|
||||||
"fullname",
|
"fullname",
|
||||||
"organizationName",
|
"organizationName",
|
||||||
"birthday"
|
"birthday",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const visibleColumns2 = ref<string[]>([
|
const visibleColumns2 = ref<string[]>([
|
||||||
|
|
@ -56,7 +51,7 @@ const visibleColumns2 = ref<string[]>([
|
||||||
"citizenId",
|
"citizenId",
|
||||||
"fullname",
|
"fullname",
|
||||||
"organizationName",
|
"organizationName",
|
||||||
"birthday"
|
"birthday",
|
||||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const filterKeyword2 = ref<string>("");
|
const filterKeyword2 = ref<string>("");
|
||||||
|
|
@ -66,57 +61,48 @@ const resetFilter = () => {
|
||||||
filterKeyword2.value = "";
|
filterKeyword2.value = "";
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
};
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
fecthlistRecevice();
|
||||||
|
});
|
||||||
|
const fecthlistRecevice = async () => {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.receiveData())
|
||||||
|
.then((res) => {
|
||||||
|
let response = res.data.result;
|
||||||
|
console.log(response);
|
||||||
|
rows.value = response.map((e: any) => ({
|
||||||
|
personalId: e.id,
|
||||||
|
citizenId: e.citizenId,
|
||||||
|
fullname: e.firstname + " " + e.lastname,
|
||||||
|
positionNumber: e.positionNumber,
|
||||||
|
positionPath: e.positionPath,
|
||||||
|
birthday: date2Thai(e.dateOfBirth),
|
||||||
|
}));
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log(typeof e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// const nextPage = (id:string) => {
|
// const nextPage = (id:string) => {
|
||||||
// router.push("/retirement/resign/"+id);
|
// router.push("/retirement/resign/"+id);
|
||||||
// };
|
// };
|
||||||
const rows = ref<any>([
|
const rows = ref<any>([
|
||||||
{
|
// {
|
||||||
personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1",
|
// personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1",
|
||||||
citizenId: "1234444332222",
|
// citizenId: "1234444332222",
|
||||||
fullname: "นางสาวอย พชช",
|
// fullname: "นางสาวอย พชช",
|
||||||
organizationName: "นักจัดการงานทั่วไป",
|
// organizationName: "นักจัดการงานทั่วไป",
|
||||||
orgName: "กลุ่มงานช่วยนักบริหาร",
|
// orgName: "กลุ่มงานช่วยนักบริหาร",
|
||||||
organizationShortName: "สกจ.",
|
// organizationShortName: "สกจ.",
|
||||||
positionNumber: "กก. 1",
|
// positionNumber: "กก. 1",
|
||||||
positionPath: "นักจัดการงานทั่วไป",
|
// positionPath: "นักจัดการงานทั่วไป",
|
||||||
birthday: dateText(new Date("1989-09-03"))
|
// birthday: dateText(new Date("1989-09-03")),
|
||||||
},
|
// },
|
||||||
{
|
|
||||||
personalId: "08db721d-adf2-4842-8056-1abb1539356e",
|
|
||||||
citizenId: "0000222333333",
|
|
||||||
fullname: "นางสาววญ สพ",
|
|
||||||
organizationName: "นักจัดการงานทั่วไป",
|
|
||||||
orgName: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
organizationShortName: "สกจ.",
|
|
||||||
positionNumber: "กก. 1",
|
|
||||||
positionPath: "นักจัดการงานทั่วไป",
|
|
||||||
birthday: dateText(new Date("1990-09-03")),
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const rows2 = ref<any>([
|
|
||||||
{
|
|
||||||
personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1",
|
|
||||||
citizenId: "1234444332222",
|
|
||||||
fullname: "นางสาวอย พชช",
|
|
||||||
organizationName: "นักจัดการงานทั่วไป",
|
|
||||||
orgName: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
organizationShortName: "สกจ.",
|
|
||||||
positionNumber: "กก. 1",
|
|
||||||
positionPath: "นักจัดการงานทั่วไป",
|
|
||||||
birthday: dateText(new Date("1989-09-03")),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
personalId: "08db721d-adf2-4842-8056-1abb1539356e",
|
|
||||||
citizenId: "0000222333333",
|
|
||||||
fullname: "นางสาววญ สพ",
|
|
||||||
organizationName: "นักจัดการงานทั่วไป",
|
|
||||||
orgName: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
organizationShortName: "สกจ.",
|
|
||||||
positionNumber: "กก. 1",
|
|
||||||
positionPath: "นักจัดการงานทั่วไป",
|
|
||||||
birthday: dateText(new Date("1990-09-03")),
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -219,11 +205,15 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
|
|
||||||
const openModalTree = (id: string) => {
|
const openModalTree = (id: string) => {
|
||||||
personalId.value = id;
|
personalId.value = id;
|
||||||
|
console.log(personalId.value);
|
||||||
|
|
||||||
personal.value = [];
|
personal.value = [];
|
||||||
modalTree.value = true;
|
modalTree.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const openDelete = (id: string) => {
|
const openDelete = (id: string) => {
|
||||||
|
console.log(id);
|
||||||
|
|
||||||
$q.dialog({
|
$q.dialog({
|
||||||
title: `ลบข้อมูล`,
|
title: `ลบข้อมูล`,
|
||||||
message: `ต้องการทำการลบข้อมูลนี้ใช่หรือไม่?`,
|
message: `ต้องการทำการลบข้อมูลนี้ใช่หรือไม่?`,
|
||||||
|
|
@ -234,7 +224,7 @@ const openDelete = (id: string) => {
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.receiveData(id))
|
.delete(config.API.receiveDataId(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
|
|
@ -242,12 +232,11 @@ const openDelete = (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
fecthlistRecevice();
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.onCancel(() => {
|
.onCancel(() => {});
|
||||||
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeModalTree = async () => {
|
const closeModalTree = async () => {
|
||||||
|
|
@ -272,27 +261,64 @@ const nextPage = (row: any) => {
|
||||||
<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">
|
||||||
|
|
@ -306,34 +332,52 @@ const nextPage = (row: any) => {
|
||||||
<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 || props.row.positionPath !== null
|
key="organizationName"
|
||||||
">
|
: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>
|
||||||
|
|
@ -344,21 +388,57 @@ const nextPage = (row: any) => {
|
||||||
</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 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)">
|
<q-item
|
||||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
clickable
|
||||||
<q-icon color="primary" size="xs" name="mdi-bookmark-outline" />
|
v-close-popup
|
||||||
|
@click="openModalTree(props.row.personalId)"
|
||||||
|
>
|
||||||
|
<q-item-section
|
||||||
|
style="min-width: 0px"
|
||||||
|
avatar
|
||||||
|
class="q-py-sm"
|
||||||
|
>
|
||||||
|
<q-icon
|
||||||
|
color="primary"
|
||||||
|
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="openDelete(props.row.personalId)">
|
<q-item
|
||||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="openDelete(props.row.personalId)"
|
||||||
|
>
|
||||||
|
<q-item-section
|
||||||
|
style="min-width: 0px"
|
||||||
|
avatar
|
||||||
|
class="q-py-sm"
|
||||||
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
<q-icon color="red" size="xs" name="mdi-delete" />
|
<q-icon color="red" size="xs" name="mdi-delete" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
@ -384,24 +464,61 @@ const nextPage = (row: any) => {
|
||||||
<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
|
||||||
|
|
@ -414,7 +531,12 @@ const nextPage = (row: any) => {
|
||||||
<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 }}
|
||||||
|
|
@ -425,28 +547,36 @@ const nextPage = (row: any) => {
|
||||||
<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 || props.row.positionPath !== null
|
key="organizationName"
|
||||||
">
|
: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>
|
||||||
|
|
@ -466,11 +596,22 @@ const nextPage = (row: any) => {
|
||||||
</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="" :disable="checkSelected" color="public" />
|
<q-btn
|
||||||
|
label="บันทึก"
|
||||||
|
@click=""
|
||||||
|
:disable="checkSelected"
|
||||||
|
color="public"
|
||||||
|
/>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<DialogOrgTree v-model:modal="modalTree" :personalId="personalId" :close="closeModalTree" :personal="personal" />
|
<DialogOrgTree
|
||||||
|
v-model:modal="modalTree"
|
||||||
|
:close="closeModalTree"
|
||||||
|
:personal="personal"
|
||||||
|
:personalId="personalId"
|
||||||
|
/>
|
||||||
|
<!-- :personalId="personalId" -->
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -153,20 +153,23 @@ const validateData = async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const id = ref<string>("");
|
||||||
const saveAppoint = async () => {
|
const saveAppoint = async () => {
|
||||||
console.log("save", dataForm);
|
console.log("save", dataForm);
|
||||||
|
|
||||||
myFormPosition.value.validate().then(async (result: boolean) => {
|
myFormPosition.value.validate().then(async (result: boolean) => {
|
||||||
|
if (props.personalId !== undefined) {
|
||||||
|
id.value = props.personalId.toString();
|
||||||
|
}
|
||||||
if (result) {
|
if (result) {
|
||||||
const dataAppoint = await {
|
const dataAppoint = await {
|
||||||
personalId: props.personalId,
|
// personalId: props.personalId,
|
||||||
containDate: dataForm.containDate,
|
recruitDate: dataForm.containDate,
|
||||||
posNoId: dataForm.posNoId,
|
posNoId: dataForm.posNoId,
|
||||||
positionId: dataForm.positionId,
|
positionId: dataForm.positionId,
|
||||||
positionLevelId: dataForm.positionLevelId,
|
positionLevelId: dataForm.positionLevelId,
|
||||||
positionLineId: dataForm.positionLineId,
|
positionLineId: dataForm.positionLineId,
|
||||||
positionPathSideId: dataForm.positionPathSideId,
|
positionPathSideId: null,
|
||||||
positionTypeId: dataForm.positionTypeId,
|
positionTypeId: dataForm.positionTypeId,
|
||||||
// salaryAmount: dataForm.salaryAmount,
|
// salaryAmount: dataForm.salaryAmount,
|
||||||
// mouthSalaryAmount: dataForm.mouthSalaryAmount,
|
// mouthSalaryAmount: dataForm.mouthSalaryAmount,
|
||||||
|
|
@ -175,7 +178,7 @@ const saveAppoint = async () => {
|
||||||
console.log("save appoint===>", dataAppoint);
|
console.log("save appoint===>", dataAppoint);
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.placementPass(), dataAppoint)
|
.put(config.API.receivePosition(id.value), dataAppoint)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("respone=>", res);
|
console.log("respone=>", res);
|
||||||
success($q, "บันทึกสำเร็จ");
|
success($q, "บันทึกสำเร็จ");
|
||||||
|
|
|
||||||
|
|
@ -362,7 +362,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
:profile-id="profileId"
|
:profile-id="profileId"
|
||||||
:UpdateListId="UpdateListId"
|
:UpdateListId="UpdateListId"
|
||||||
v-if="
|
v-if="
|
||||||
statusReport !== true || typeReport == 'ADD' || typeReport == ''
|
statusReport !== true && typeReport == 'ADD' || typeReport == ''
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -459,11 +459,11 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
<q-th
|
<q-th
|
||||||
auto-width
|
auto-width
|
||||||
v-if="typeReport === 'EDIT' || statusReport !== true"
|
v-if="typeReport === 'EDIT' && statusReport !== true"
|
||||||
/>
|
/>
|
||||||
<q-th
|
<q-th
|
||||||
auto-width
|
auto-width
|
||||||
v-if="typeReport === 'REMOVE' || statusReport !== true"
|
v-if="typeReport === 'REMOVE' && statusReport !== true"
|
||||||
/>
|
/>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -535,7 +535,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
|
|
||||||
<q-td
|
<q-td
|
||||||
auto-width
|
auto-width
|
||||||
v-if="typeReport === 'EDIT' || statusReport !== true"
|
v-if="typeReport === 'EDIT' && statusReport !== true"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
|
|
@ -555,7 +555,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
auto-width
|
auto-width
|
||||||
v-if="typeReport === 'REMOVE' || statusReport !== true"
|
v-if="typeReport === 'REMOVE' && statusReport !== true"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue