no message

This commit is contained in:
setthawutttty 2023-08-22 14:02:35 +07:00
parent adcff8a09d
commit 7d0c2217d4
13 changed files with 262 additions and 114 deletions

View file

@ -8,6 +8,7 @@ import DialogOrgTree from "@/modules/05_placement/components/AppointMent/Appoint
import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
import { WeekNumberContainer } from "@fullcalendar/core/internal";
const mixin = useCounterMixin(); //
const {
showLoader,
@ -53,6 +54,7 @@ const visibleColumns = ref<string[]>([
"fullname",
"organizationName",
"birthday",
"createdAt",
"status",
]);
const visibleColumns2 = ref<string[]>([
@ -105,6 +107,7 @@ const fecthlistappointment = async () => {
positionNumber: e.positionNumber,
positionPath: e.positionPath,
status: status(e.status),
createdAt:date2Thai(e.createdAt),
birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth),
}));
@ -170,8 +173,7 @@ const columns = ref<QTableProps["columns"]>([
field: "organizationName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "birthday",
@ -182,6 +184,17 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "createdAt",
align: "left",
label: "วันที่ดำเนินการ",
sortable: true,
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a, b) => (b.createdAt) - (a.createdAt)
},
{
name: "status",
align: "left",
@ -192,6 +205,7 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
]);
const columns2 = ref<QTableProps["columns"]>([
{
name: "no",
@ -240,6 +254,7 @@ const columns2 = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
const openModalTree = (id: string) => {
@ -391,7 +406,7 @@ const status = (val: string) => {
:columns="columns"
:rows="rows"
:filter="filterKeyword"
row-key="fullname"
row-key="citizenId"
:visible-columns="visibleColumns"
>
<template v-slot:header="props">
@ -470,6 +485,13 @@ const status = (val: string) => {
>
{{ props.row.birthday }}
</q-td>
<q-td
key="createdAt"
:props="props"
@click="nextPage(props.row)"
>
{{ props.row.createdAt }}
</q-td>
<q-td key="status" :props="props" @click="nextPage(props.row)">
{{ props.row.status }}
</q-td>

View file

@ -5,9 +5,7 @@ import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
import type {
ResponseDataDetail,
} from "@/modules/05_placement/interface/response/Transfer";
import type { ResponseDataDetail } from "@/modules/05_placement/interface/response/Transfer";
import type { QTableProps, QForm } from "quasar";
import http from "@/plugins/http";
@ -237,37 +235,43 @@ const getClass = (val: boolean) => {
แกไขขอมลเพอลงบญชแนบทาย
</div>
<q-space />
<div class="q-gutter-sm" v-if="!edit">
<q-btn
outline
color="primary"
dense
icon-right="mdi-file-edit-outline"
class="q-px-sm"
label="แก้ไข"
style="width: 80px"
@click="edit = !edit"
/>
</div>
<div class="q-gutter-sm" v-else>
<q-btn
outline
color="public"
dense
class="q-px-sm"
label="บันทึก"
style="width: 80px"
@click="clickEdit"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="(edit = !edit), fecthOther()"
/>
<div
v-if="
responseData.status !== 'DONE' && responseData.status !== 'REPORT'
"
>
<div class="q-gutter-sm" v-if="!edit">
<q-btn
outline
color="primary"
dense
icon-right="mdi-file-edit-outline"
class="q-px-sm"
label="แก้ไข"
style="width: 80px"
@click="edit = !edit"
/>
</div>
<div class="q-gutter-sm" v-else>
<q-btn
outline
color="public"
dense
class="q-px-sm"
label="บันทึก"
style="width: 80px"
@click="clickEdit"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="(edit = !edit), fecthOther()"
/>
</div>
</div>
</div>
<div class="col-12"><q-separator /></div>

View file

@ -54,7 +54,7 @@ const visibleColumns = ref<string[]>([
"position",
"positionLevel",
"organizationPositionOld",
"createdAt",
"statustext",
]);
@ -92,7 +92,7 @@ const fecthlistOthet = async () => {
// listRecevice.value = response;
console.log(response);
rows.value = response.map((r: any) => ({
createdAt: new Date(),
createdAt: date2Thai(r.createdAt),
date: new Date(),
firstName: r.firstname ?? "",
personalId: r.id ?? "",
@ -214,6 +214,15 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "createdAt",
align: "left",
label: "วันที่ดำเนินการ",
sortable: true,
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "statustext",
align: "left",
@ -380,7 +389,7 @@ const status = (val: string) => {
color="add"
icon="mdi-account-arrow-right"
>
<q-tooltip>งไปออกคำสงรายการอนๆ</q-tooltip>
<q-tooltip>ประเภทคำสงรายการอนๆ</q-tooltip>
</q-btn>
<q-space />
@ -472,11 +481,19 @@ const status = (val: string) => {
</q-tooltip> -->
</div>
</q-td>
<q-td key="createdAt" :props="props">
{{ props.row.createdAt }}
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>
<q-td key="statustext" :props="props">
<q-td auto-width>
<q-btn
v-if="
props.row.status !== 'DONE' &&
props.row.status !== 'REPORT'
"
flat
round
class="text-red-14"
@ -496,7 +513,7 @@ const status = (val: string) => {
<q-dialog v-model="modal">
<q-card style="width: 1200px; max-width: 80vw">
<DialogHeader title="ส่งไปออกคำสั่งอื่นๆ" :close="clickClose" />
<DialogHeader title="ประเภทคำสั่งอื่นๆ" :close="clickClose" />
<q-separator />
<q-card-section class="q-pt-none">
<div class="row justify-between">

View file

@ -45,6 +45,7 @@ const visibleColumns = ref<string[]>([
"fullname",
"organizationName",
"dateOfBirth",
"createdAt",
"statusText",
"btn",
]);
@ -114,6 +115,16 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "createdAt",
align: "left",
label: "วันที่ดำเนินการ",
sortable: true,
field: "createdAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "statusText",
align: "left",
@ -248,7 +259,7 @@ const getData = async () => {
positionLevelOld: item.positionLevelOld,
positionNumberOld: item.positionNumberOld,
organizationPositionOld: item.organizationPositionOld,
createdAt: item.createdAt,
createdAt:date2Thai(item.createdAt),
}));
console.log(rows.value);
})
@ -459,6 +470,13 @@ onMounted(async () => {
props.row.dateOfBirth !== null ? props.row.dateOfBirth : "-"
}}
</q-td>
<q-td
key="createdAt"
:props="props"
@click="openDetail(props.row.id)"
>
{{ props.row.createdAt }}
</q-td>
<q-td
key="organizationPositionOld"
:props="props"