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"

View file

@ -43,6 +43,7 @@ const visibleColumns = ref<string[]>([
"position",
"positionLevel",
"organizationPositionOld",
"createdAt",
"statustext",
]);
const visibleColumns2 = ref<string[]>([
@ -114,6 +115,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",
@ -206,7 +216,7 @@ const getData = async () => {
let list: ResponseData[] = [];
data.map((r: ResponseData) => {
list.push({
createdAt: new Date(),
createdAt:date2Thai(r.createdAt),
date: new Date(),
firstName: r.firstName ?? "",
id: r.id ?? "",
@ -420,11 +430,19 @@ const saveOrder = async () => {
</q-tooltip> -->
</div>
</q-td>
<q-td
key="createdAt"
:props="props"
@click="nextPage(props.row)"
>
{{ props.row.createdAt }}
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>
<q-td auto-width>
<q-btn
v-if="props.row.status !=='DONE' && props.row.status !=='REPORT'"
dense
size="12px"
flat

View file

@ -72,7 +72,8 @@
แกไขขอมลเพอลงบญชแนบทาย
</div>
<q-space />
<div class="q-gutter-sm" v-if="!edit">
<div v-if="responseData.status !=='DONE' && responseData.status !=='REPORT'">
<div class="q-gutter-sm" v-if="!edit">
<q-btn
outline
color="primary"
@ -103,7 +104,8 @@
style="width: 80px"
@click="edit = !edit"
/>
</div>
</div></div>
</div>
<div class="col-12"><q-separator /></div>
<q-form ref="myForm">

View file

@ -43,6 +43,7 @@ const visibleColumns = ref<string[]>([
"position",
"positionLevel",
"organizationPositionOld",
"createdAt",
"statustext",
]);
const visibleColumns2 = ref<string[]>([
@ -114,6 +115,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",
@ -206,7 +216,7 @@ const getData = async () => {
let list: ResponseData[] = [];
data.map((r: ResponseData) => {
list.push({
createdAt: new Date(),
createdAt:date2Thai(r.createdAt),
date: new Date(),
firstName: r.firstName ?? "",
id: r.id ?? "",
@ -420,11 +430,19 @@ const saveOrder = async () => {
</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 auto-width>
<q-btn
v-if="props.row.status !== 'DONE' && props.row.status !== 'REPORT'"
dense
size="12px"
flat

View file

@ -72,37 +72,43 @@
แกไขขอมลเพอลงบญชแนบทาย
</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="conditionSave"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="edit = !edit"
/>
<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="conditionSave"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="edit = !edit"
/>
</div>
</div>
</div>
<div class="col-12"><q-separator /></div>
@ -234,6 +240,7 @@
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
@ -383,7 +390,7 @@ const getData = async () => {
.get(config.API.outByid(dataId))
.then((res: any) => {
const data = res.data.result;
responseData.value.personId = data.profileId;
responseData.value.createdAt = data.createdAt;
responseData.value.date =

View file

@ -43,6 +43,7 @@ const visibleColumns = ref<string[]>([
"position",
"positionLevel",
"organizationPositionOld",
"createdAt",
"statustext",
]);
const visibleColumns2 = ref<string[]>([
@ -114,6 +115,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",
@ -206,7 +216,7 @@ const getData = async () => {
let list: ResponseData[] = [];
data.map((r: ResponseData) => {
list.push({
createdAt: new Date(),
createdAt:date2Thai(r.createdAt),
date: new Date(),
firstName: r.firstName ?? "",
id: r.id ?? "",
@ -421,12 +431,20 @@ const saveOrder = async () => {
</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 auto-width>
<q-btn
v-if="props.row.status !== 'DONE' && props.row.status !=='REPORT'"
dense
size="12px"
flat

View file

@ -72,37 +72,43 @@
แกไขขอมลเพอลงบญชแนบทาย
</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="conditionSave"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="edit = !edit"
/>
<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="conditionSave"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="edit = !edit"
/>
</div>
</div>
</div>
<div class="col-12"><q-separator /></div>

View file

@ -9,7 +9,7 @@ import config from "@/app.config";
const router = useRouter();
const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, success } = mixin;
const { showLoader, hideLoader, messageError, success ,date2Thai} = mixin;
const rows = ref<any>([]);
const columns = ref<QTableProps["columns"]>([
@ -76,6 +76,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",
},
]);
const visibleColumns = ref<string[]>([
"prefix",
@ -85,6 +94,7 @@ const visibleColumns = ref<string[]>([
"positionLevel",
"positionExecutive",
"oc",
"createdAt",
]);
onMounted(() => {
fectListDecased();
@ -104,6 +114,7 @@ const fectListDecased = async () => {
positionLevel: e.positionLevel,
positionExecutive: e.positionExecutive,
oc: e.organization,
createdAt:date2Thai(e.createdAt),
}));
})
.catch((e) => {
@ -237,6 +248,13 @@ const nextPage = (id: string) => {
<q-td key="oc" :props="props">
{{ props.row.oc }}
</q-td>
<q-td
key="createdAt"
:props="props"
@click="nextPage(props.row)"
>
{{ props.row.createdAt }}
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -1,5 +1,5 @@
interface ResponseData {
createdAt: Date;
createdAt: any;
date: Date;
firstName: string;
id: string;

View file

@ -1,5 +1,5 @@
interface ResponseData {
createdAt: Date;
createdAt: any;
date: Date;
firstName: string;
id: string;