ย้ายไอคอน

This commit is contained in:
STW_TTTY\stwtt 2024-07-24 09:50:23 +07:00
parent 900d308f81
commit dfa66f3a98
28 changed files with 730 additions and 702 deletions

View file

@ -523,20 +523,18 @@ const pagination = ref({
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width />
<q-th auto-width />
<q-th auto-width v-if="statuscode !== true" />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td v-for="col in props.cols" :key="col.name" :props="props">{{
col.name == "no" ? props.rowIndex + 1 : col.value
}}</q-td>
<q-td auto-width>
<q-btn
dense
@ -605,6 +603,10 @@ const pagination = ref({
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">{{
col.name == "no" ? props.rowIndex + 1 : col.value
}}</q-td>
</q-tr>
</template>
</d-table>

View file

@ -435,14 +435,27 @@ const updateData = (row: DataCopyOrder) => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td auto-width>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="clickDelete(props.row.personalId)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
@ -490,19 +503,7 @@ const updateData = (row: DataCopyOrder) => {
</template>
</q-select>
</q-td>
<q-td auto-width>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="clickDelete(props.row.personalId)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -240,6 +240,7 @@ watch(
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th
v-for="col in props.cols"
:key="col.name"
@ -247,11 +248,18 @@ watch(
>
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
outline
color="primary"
label="เพิ่ม"
@click="onClickAddPerson(props.row)"
/>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -273,14 +281,6 @@ watch(
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
outline
color="primary"
label="เพิ่ม"
@click="onClickAddPerson(props.row)"
/>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -368,14 +368,63 @@ watch(
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve,
props.row.remark
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -451,55 +500,7 @@ watch(
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve,
props.row.remark
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -45,6 +45,33 @@ const props = defineProps({
/** ข้อมูล Table*/
const columns = ref<QTableProps["columns"]>([
{
name: "posSalary",
align: "center",
label: "ประวัติตำแหน่ง/ค่าจ้าง",
sortable: false,
field: "posSalary",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "discipline",
align: "center",
label: "วินัย",
sortable: false,
field: "discipline",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "leave",
align: "center",
label: "การลา",
sortable: false,
field: "leave",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "no",
align: "left",
@ -147,33 +174,7 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posSalary",
align: "center",
label: "ประวัติตำแหน่ง/ค่าจ้าง",
sortable: false,
field: "posSalary",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "discipline",
align: "center",
label: "วินัย",
sortable: false,
field: "discipline",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "leave",
align: "center",
label: "การลา",
sortable: false,
field: "leave",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
const visibleColumns = ref<string[]>([
"no",
@ -370,14 +371,65 @@ function onClickViewInfo(type: string, id: string) {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: item.type === 'properties'
? onProperties(props.row)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'no'">
{{
@ -449,56 +501,7 @@ function onClickViewInfo(type: string, id: string) {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: item.type === 'properties'
? onProperties(props.row)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -236,6 +236,7 @@ watch(
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th
v-for="col in props.cols"
:key="col.name"
@ -243,11 +244,19 @@ watch(
>
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
outline
color="primary"
label="เพิ่ม"
@click="onClickAddPerson(props.row)"
/>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -269,14 +278,7 @@ watch(
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
outline
color="primary"
label="เพิ่ม"
@click="onClickAddPerson(props.row)"
/>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -357,14 +357,63 @@ watch(
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.roundCode !== 'SPECIAL' ? store.itemMenu.filter((x:any)=>x.type !== 'properties') :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve,
props.row.remark
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -438,55 +487,7 @@ watch(
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.roundCode !== 'SPECIAL' ? store.itemMenu.filter((x:any)=>x.type !== 'properties') :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve,
props.row.remark
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -45,6 +45,33 @@ const props = defineProps({
/** ข้อมูล Table*/
const columns = ref<QTableProps["columns"]>([
{
name: "posSalary",
align: "center",
label: "ประวัติตำแหน่ง/เงินเดือน",
sortable: false,
field: "posSalary",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "discipline",
align: "center",
label: "วินัย",
sortable: false,
field: "discipline",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "leave",
align: "center",
label: "การลา",
sortable: false,
field: "leave",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "no",
align: "left",
@ -136,35 +163,12 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
{
name: "posSalary",
align: "center",
label: "ประวัติตำแหน่ง/เงินเดือน",
sortable: false,
field: "posSalary",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "discipline",
align: "center",
label: "วินัย",
sortable: false,
field: "discipline",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "leave",
align: "center",
label: "การลา",
sortable: false,
field: "leave",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
const visibleColumns = ref<string[]>([
"discipline",
"leave",
"isSuspension",
"no",
"fullName",
"posType",
@ -175,9 +179,7 @@ const visibleColumns = ref<string[]>([
"organization",
"result",
"posSalary",
"discipline",
"leave",
"isSuspension",
]);
/** modalDialog*/
@ -359,14 +361,64 @@ function onClickViewInfo(type: string, id: string) {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.roundCode !== 'SPECIAL'? store.itemMenu :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: item.type === 'properties'
? onProperties(props.row)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'no'">
{{
@ -435,56 +487,7 @@ function onClickViewInfo(type: string, id: string) {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.roundCode !== 'SPECIAL'? store.itemMenu :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: item.type === 'properties'
? onProperties(props.row)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -379,40 +379,15 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
<q-separator />
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'no'">
{{
(formFilter.page - 1) * Number(pagination.rowsPerPage) +
props.rowIndex +
1
}}
</div>
<div
v-else-if="
col.name == 'rateOldMin' ||
col.name == 'rateMaxOld' ||
col.name == 'rateHighMax'
"
>
{{ col.value ? col.value.toLocaleString() : "-" }}
</div>
<div v-else-if="col.name == 'groupOld'">
<span v-for="(item, index) in col.value">
{{ item }}{{ index + 1 == col.value.length ? "" : "," }}
</span>
</div>
<div v-else>{{ col.value != "" ? col.value : "-" }}</div>
</q-td>
<q-td>
<q-btn
flat
@ -448,6 +423,32 @@ onMounted(() => {
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'no'">
{{
(formFilter.page - 1) * Number(pagination.rowsPerPage) +
props.rowIndex +
1
}}
</div>
<div
v-else-if="
col.name == 'rateOldMin' ||
col.name == 'rateMaxOld' ||
col.name == 'rateHighMax'
"
>
{{ col.value ? col.value.toLocaleString() : "-" }}
</div>
<div v-else-if="col.name == 'groupOld'">
<span v-for="(item, index) in col.value">
{{ item }}{{ index + 1 == col.value.length ? "" : "," }}
</span>
</div>
<div v-else>{{ col.value != "" ? col.value : "-" }}</div>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -319,31 +319,15 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
<q-separator />
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'startDate'">
{{ col.value ? date2Thai(col.value) : "-" }}
</div>
<div v-else-if="col.name === 'group'">
{{ col.value ? `กลุ่มที่ ${col.value}` : "-" }}
</div>
<div v-else-if="col.name === 'isActive'">
<q-icon
:name="col.value ? 'done' : 'close'"
:color="col.value ? 'primary' : 'grey'"
size="24px"
></q-icon>
</div>
<div v-else>{{ col.value ? col.value : "-" }}</div>
</q-td>
<q-td>
<q-btn
flat
@ -390,6 +374,23 @@ onMounted(() => {
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'startDate'">
{{ col.value ? date2Thai(col.value) : "-" }}
</div>
<div v-else-if="col.name === 'group'">
{{ col.value ? `กลุ่มที่ ${col.value}` : "-" }}
</div>
<div v-else-if="col.name === 'isActive'">
<q-icon
:name="col.value ? 'done' : 'close'"
:color="col.value ? 'primary' : 'grey'"
size="24px"
></q-icon>
</div>
<div v-else>{{ col.value ? col.value : "-" }}</div>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">