- แก้ไขรายการลงเวลาปฏิบัติงาน tab 2
- แก้ลำดับเมนู
This commit is contained in:
parent
e114fd84f3
commit
7dee686fa1
5 changed files with 101 additions and 16 deletions
|
|
@ -384,14 +384,14 @@ const menuList = readonly<any[]>([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 9.2,
|
key: 9.2,
|
||||||
label: "แก้ไขรอบการปฎิบัติงานผู้ใช้งาน",
|
label: "รายการลงเวลาปฏิบัติงาน",
|
||||||
path: "/change-round",
|
path: "/work-list",
|
||||||
role: "leave",
|
role: "leave",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 9.3,
|
key: 9.3,
|
||||||
label: "รายการลงเวลาปฏิบัติงาน",
|
label: "แก้ไขรอบการปฎิบัติงานผู้ใช้งาน",
|
||||||
path: "/work-list",
|
path: "/change-round",
|
||||||
role: "leave",
|
role: "leave",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -70,15 +70,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "status",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ",
|
|
||||||
sortable: true,
|
|
||||||
field: "status",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
|
|
@ -87,7 +78,6 @@ const visibleColumns = ref<string[]>([
|
||||||
"coordinatesIn",
|
"coordinatesIn",
|
||||||
"timeOut",
|
"timeOut",
|
||||||
"coordinatesOut",
|
"coordinatesOut",
|
||||||
"status",
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ const { filterFn, searchDataFn } = workStore;
|
||||||
|
|
||||||
function calculateMaxDate() {
|
function calculateMaxDate() {
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
today.setDate(today.getDate() - 1);
|
today.setDate(today.getDate());
|
||||||
return today;
|
return today;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
94
src/modules/09_leave/components/1_Work/ToolBarDate.vue
Normal file
94
src/modules/09_leave/components/1_Work/ToolBarDate.vue
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
//import Stores
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||||
|
|
||||||
|
const workStore = useWorklistDataStore();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
|
const { date2Thai } = mixin;
|
||||||
|
const { filterFn, searchDataFn } = workStore;
|
||||||
|
|
||||||
|
function calculateMaxDate() {
|
||||||
|
const today = new Date();
|
||||||
|
today.setDate(today.getDate());
|
||||||
|
return today;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
||||||
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||||
|
<datepicker
|
||||||
|
menu-class-name="modalfix"
|
||||||
|
v-model="workStore.selectDate"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
:enableTimePicker="false"
|
||||||
|
week-start="0"
|
||||||
|
:max-date="calculateMaxDate()"
|
||||||
|
@update:model-value="
|
||||||
|
searchDataFn(workStore.selectDate, workStore.selectStatus)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
|
<template #year-overlay-value="{ value }">{{
|
||||||
|
parseInt(value + 543)
|
||||||
|
}}</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input
|
||||||
|
for="selectDate"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
lazy-rules
|
||||||
|
:model-value="
|
||||||
|
workStore.selectDate !== null
|
||||||
|
? date2Thai(workStore.selectDate)
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'วันที่'}`"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="event" class="cursor-pointer text-primary">
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
<q-space />
|
||||||
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||||
|
<q-input
|
||||||
|
for="filterTable"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="workStore.filterTable"
|
||||||
|
label="ค้นหา"
|
||||||
|
debounce="300"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||||
|
<q-select
|
||||||
|
for="visibleColumns"
|
||||||
|
v-model="workStore.visibleColumns"
|
||||||
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="workStore.columns"
|
||||||
|
option-value="name"
|
||||||
|
options-cover
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
|
|
@ -11,6 +11,7 @@ import type {
|
||||||
TableRows,
|
TableRows,
|
||||||
DataRes,
|
DataRes,
|
||||||
} from "@/modules/09_leave/interface/response/work";
|
} from "@/modules/09_leave/interface/response/work";
|
||||||
|
import ToolBarDate from "../components/1_Work/ToolBarDate.vue";
|
||||||
// use Store
|
// use Store
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const workStore = useWorklistDataStore();
|
const workStore = useWorklistDataStore();
|
||||||
|
|
@ -112,7 +113,7 @@ function fecthWorkList() {
|
||||||
|
|
||||||
<q-tab-panel name="2">
|
<q-tab-panel name="2">
|
||||||
<!-- <TabList2Vue /> -->
|
<!-- <TabList2Vue /> -->
|
||||||
<ToolBar />
|
<ToolBarDate />
|
||||||
<TableList />
|
<TableList />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue