Merge branch 'nice_dev' into develop
This commit is contained in:
commit
508fb3b02b
4 changed files with 50 additions and 39 deletions
|
|
@ -80,7 +80,7 @@ const fecthOther = async () => {
|
|||
Otherdata.value = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
title.value.fullname = `${data.firstName ?? "-"} ${data.lastName ?? "-"}`;
|
||||
title.value.fullname = `${data.firstname ?? "-"} ${data.lastname ?? "-"}`;
|
||||
title.value.organizationPositionOld = data.organizationPositionOld ?? "-";
|
||||
title.value.positionLevelOld = data.positionLevelOld ?? "-";
|
||||
title.value.positionTypeOld = data.positionTypeOld ?? "-";
|
||||
|
|
@ -99,7 +99,7 @@ const fecthOther = async () => {
|
|||
responseData.value.salary = data.salary !== null ? data.salary : 0;
|
||||
responseData.value.status = data.status ?? "";
|
||||
responseData.value.avataPath = data.avataPath ?? "";
|
||||
responseData.value.fullname = `${data.firstName ?? "-"} ${
|
||||
responseData.value.fullname = `${data.firstname ?? "-"} ${
|
||||
data.lastName ?? "-"
|
||||
}`;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ const visibleColumns = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"organization",
|
||||
|
||||
"statustext",
|
||||
]);
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ const visibleColumns2 = ref<string[]>([
|
|||
"position",
|
||||
"positionLevel",
|
||||
"organizationPositionOld",
|
||||
"organization",
|
||||
|
||||
"statustext",
|
||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const filterKeyword = ref<string>("");
|
||||
|
|
@ -94,10 +94,10 @@ const fecthlistOthet = async () => {
|
|||
rows.value = response.map((r: any) => ({
|
||||
createdAt: new Date(),
|
||||
date: new Date(),
|
||||
firstName: r.firstName ?? "",
|
||||
firstName: r.firstname ?? "",
|
||||
personalId: r.id ?? "",
|
||||
isActive: r.isActive ? r.isActive : false,
|
||||
lastName: r.lastName ?? "",
|
||||
lastName: r.lastname ?? "",
|
||||
organization: r.organization ?? "",
|
||||
organizationPositionOld: r.organizationPositionOld ?? "",
|
||||
posNo: r.posNo ?? "",
|
||||
|
|
@ -111,7 +111,7 @@ const fecthlistOthet = async () => {
|
|||
salary: r.salary ? r.salary : 0,
|
||||
status: r.status ?? "",
|
||||
statustext: status(r.status ?? ""),
|
||||
fullname: `${r.prefix ?? ""} ${r.firstName ?? ""} ${r.lastName ?? ""}`,
|
||||
fullname: `${r.prefix ?? ""} ${r.firstname ?? ""} ${r.lastname ?? ""}`,
|
||||
}));
|
||||
console.log(rows.value);
|
||||
rows2.value = rows.value.filter((e: any) => e.orgName !== null);
|
||||
|
|
@ -214,15 +214,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "organization",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่ขอโอนไป",
|
||||
sortable: true,
|
||||
field: "organization",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
@ -279,15 +270,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "organization",
|
||||
align: "left",
|
||||
label: "หน่วยงานที่ขอโอนไป",
|
||||
sortable: true,
|
||||
field: "organization",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "statustext",
|
||||
align: "left",
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
sortable: true,
|
||||
field: "fullName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
style: "font-size: 14px,",
|
||||
},
|
||||
{
|
||||
name: "examNumber",
|
||||
|
|
@ -604,7 +604,10 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
v-else-if="col.name === 'fullName'"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
<div class="row col-12 text-no-wrap items-center">
|
||||
<div
|
||||
class="row col-12 text-no-wrap items-center"
|
||||
style="width: 270px"
|
||||
>
|
||||
<img
|
||||
v-if="props.row.avatar == null"
|
||||
src="@/assets/avatar_user.jpg"
|
||||
|
|
@ -706,7 +709,8 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
<q-item
|
||||
v-if="
|
||||
(roleAdmin && props.row.statusId === 'UN-CONTAIN') ||
|
||||
props.row.draft === 'รอส่งตัว' && props.row.statusId !== 'DISCLAIM'
|
||||
(props.row.draft === 'รอส่งตัว' &&
|
||||
props.row.statusId !== 'DISCLAIM')
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@
|
|||
import { onMounted, ref, watch } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogRemove, dialogConfirm } = mixin;
|
||||
const $q = useQuasar();
|
||||
|
||||
const modalNote = ref<boolean>(false);
|
||||
const organization = ref<string>(1);
|
||||
const organization = ref<number>(1);
|
||||
const organizationOptions = ref<any>([{ id: 1, name: "ทั้งหมด" }]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
|
|
@ -182,15 +183,24 @@ const rows = ref<any[]>([
|
|||
]);
|
||||
|
||||
const Note = ref<string>("");
|
||||
const titleModal = ref<string>("");
|
||||
const actionModal = ref<string>("");
|
||||
const person = ref<any>([]);
|
||||
|
||||
const clickNote = (props: any) => {
|
||||
const clickAction = (props: any, action: string) => {
|
||||
Note.value = "";
|
||||
person.value = props;
|
||||
titleModal.value = props.name;
|
||||
actionModal.value = action;
|
||||
modalNote.value = true;
|
||||
};
|
||||
const clickDelete = () => {
|
||||
dialogRemove($q);
|
||||
console.log(person.value, Note.value);
|
||||
};
|
||||
const clickSavenote = () => {
|
||||
dialogConfirm($q);
|
||||
console.log(person.value);
|
||||
};
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
|
|
@ -348,40 +358,40 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
dense
|
||||
>
|
||||
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
||||
<q-list dense style="min-width: 100px">
|
||||
<q-list dense style="min-width: 120px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickNote(props.row)"
|
||||
@click="clickAction(props.row, 'note')"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-tooltip>หมายเหตุ</q-tooltip>
|
||||
<q-tooltip>ไม่ยื่นขอ</q-tooltip>
|
||||
<q-icon
|
||||
color="blue"
|
||||
size="xs"
|
||||
name="mdi-alert-circle-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>หมายเหตุ</q-item-section>
|
||||
<q-item-section>ไม่ยื่นขอ</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickDelete(props.row)"
|
||||
@click="clickAction(props.row, 'delete')"
|
||||
>
|
||||
<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-item-section>
|
||||
<q-item-section>ลบ</q-item-section>
|
||||
<q-item-section>ลบออก</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
|
|
@ -410,7 +420,8 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
<q-card style="min-width: 350px">
|
||||
<q-toolbar>
|
||||
<q-toolbar-title class="text-subtitle2 text-bold">
|
||||
หมายเหตุ
|
||||
<div v-if="actionModal == 'note'">หมายเหตุ {{ titleModal }}</div>
|
||||
<div v-if="actionModal == 'delete'">ลบออก {{ titleModal }}</div>
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
|
|
@ -430,10 +441,24 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
label="กรอกหมายเหตุ"
|
||||
v-model="Note"
|
||||
@keyup.enter="modalNote = false"
|
||||
:rules="[(val) => !!val || 'กรอกหมายเหตุ']"
|
||||
/>
|
||||
</q-card-section>
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
<q-btn label="บันทึก" @click="clickSavenote" color="public" />
|
||||
<q-btn
|
||||
v-if="actionModal == 'note'"
|
||||
label="บันทึก"
|
||||
@click="clickSavenote"
|
||||
color="public"
|
||||
:disable="Note === ''"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="actionModal == 'delete'"
|
||||
label="บันทึก"
|
||||
@click="clickDelete"
|
||||
color="public"
|
||||
:disable="Note === ''"
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue