style(transfer):responsive
This commit is contained in:
parent
4bf8daf8dc
commit
f258a9fcfe
1 changed files with 147 additions and 132 deletions
|
|
@ -205,145 +205,160 @@ onMounted(async () => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">รายการขอโอน</div>
|
<div class="toptitle text-dark col-12 row items-center">รายการขอโอน</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm">
|
<q-card flat bordered class="col-12">
|
||||||
<div class="row q-pa-md">
|
<div class="row q-pa-md q-col-gutter-sm">
|
||||||
<div class="col-12 q-col-gutter-sm">
|
<div class="col-12">
|
||||||
<div class="row">
|
<div class="row q-col-gutter-xs items-end">
|
||||||
<div class="col-2">
|
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3">
|
||||||
<q-select
|
<div class="row q-col-gutter-sm">
|
||||||
:model-value="status ? status : 'ทั้งหมด'"
|
<div class="col-xs-11 col-sm-7 col-md-7 col-lg-7">
|
||||||
outlined
|
<q-select
|
||||||
dense
|
:model-value="status ? status : 'ทั้งหมด'"
|
||||||
label="สถานะ"
|
outlined
|
||||||
:options="store.statusOp.filter((item:any)=> item.id !== 'PENDING')"
|
dense
|
||||||
emit-value
|
label="สถานะ"
|
||||||
map-options
|
:options="store.statusOp.filter((item:any)=> item.id !== 'PENDING')"
|
||||||
option-label="name"
|
emit-value
|
||||||
option-value="id"
|
map-options
|
||||||
fill-input
|
option-label="name"
|
||||||
use-input
|
option-value="id"
|
||||||
hide-selected
|
fill-input
|
||||||
bg-color="white"
|
use-input
|
||||||
@filter="(inputValue:any,doneFn:Function) => filterOption(inputValue, doneFn) "
|
hide-selected
|
||||||
@update:model-value="(value:string)=>{(status = value),fetchData()}"
|
bg-color="white"
|
||||||
>
|
@filter="(inputValue:any,doneFn:Function) => filterOption(inputValue, doneFn) "
|
||||||
<template v-slot:no-option>
|
@update:model-value="(value:string)=>{(status = value),fetchData()}"
|
||||||
<q-item>
|
>
|
||||||
<q-item-section class="text-grey">
|
<template v-slot:no-option>
|
||||||
ไม่มีข้อมูล
|
<q-item>
|
||||||
</q-item-section>
|
<q-item-section class="text-grey">
|
||||||
</q-item>
|
ไม่มีข้อมูล
|
||||||
</template>
|
</q-item-section>
|
||||||
<template v-if="status" v-slot:append>
|
</q-item>
|
||||||
<q-icon
|
</template>
|
||||||
name="cancel"
|
<template v-if="status" v-slot:append>
|
||||||
@click.stop.prevent="(status = ''), fetchData()"
|
<q-icon
|
||||||
class="cursor-pointer"
|
name="cancel"
|
||||||
style="opacity: 0.6"
|
@click.stop.prevent="(status = ''), fetchData()"
|
||||||
/>
|
class="cursor-pointer"
|
||||||
</template>
|
style="opacity: 0.6"
|
||||||
</q-select>
|
/>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xs-1 col-sm-5 col-md-5 col-lg-5">
|
||||||
|
<q-btn
|
||||||
|
v-if="
|
||||||
|
checkPermission($route)?.attrIsUpdate &&
|
||||||
|
checkPermissionList(['COMMAND']) &&
|
||||||
|
checkPermissionCreate('COMMAND')
|
||||||
|
"
|
||||||
|
@click="openModalOrder"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
icon="mdi-account-arrow-right"
|
||||||
|
>
|
||||||
|
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
|
||||||
v-if="
|
|
||||||
checkPermission($route)?.attrIsUpdate &&
|
|
||||||
checkPermissionList(['COMMAND']) &&
|
|
||||||
checkPermissionCreate('COMMAND')
|
|
||||||
"
|
|
||||||
@click="openModalOrder"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
color="primary"
|
|
||||||
icon="mdi-account-arrow-right"
|
|
||||||
>
|
|
||||||
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
|
|
||||||
<q-space />
|
<div class="col-xs-0 col-sm-1 col-md-3 col-lg-5"></div>
|
||||||
<q-input
|
|
||||||
standout
|
|
||||||
dense
|
|
||||||
v-model="filter"
|
|
||||||
ref="filterRef"
|
|
||||||
outlined
|
|
||||||
placeholder="ค้นหา"
|
|
||||||
@keyup.enter="onSearch"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon name="search" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
|
|
||||||
<q-select
|
<div class="col-xs-12 col-sm-5 col-md-3 col-lg-4">
|
||||||
class="q-ml-sm"
|
<div class="row q-col-gutter-sm">
|
||||||
v-model="visibleColumns"
|
<!-- Search Input -->
|
||||||
multiple
|
<div class="col-xs-12 col-sm-7 col-md-7 col-lg-7">
|
||||||
outlined
|
<q-input
|
||||||
dense
|
standout
|
||||||
options-dense
|
dense
|
||||||
:display-value="$q.lang.table.columns"
|
v-model="filter"
|
||||||
emit-value
|
ref="filterRef"
|
||||||
map-options
|
outlined
|
||||||
:options="columns"
|
placeholder="ค้นหา"
|
||||||
option-value="name"
|
@keyup.enter="onSearch"
|
||||||
style="min-width: 140px"
|
>
|
||||||
/>
|
<template v-slot:append>
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-5">
|
||||||
|
<q-select
|
||||||
|
v-model="visibleColumns"
|
||||||
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="columns"
|
||||||
|
option-value="name"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkPermission($route)?.attrIsGet"
|
v-if="checkPermission($route)?.attrIsGet"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
color="info"
|
color="info"
|
||||||
icon="mdi-eye"
|
icon="mdi-eye"
|
||||||
@click.stop.prevent="
|
@click.stop.prevent="
|
||||||
router.push(`/placement/transfer/${props.row.id}`)
|
router.push(`/placement/transfer/${props.row.id}`)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-tooltip>รายละเอียด</q-tooltip>
|
<q-tooltip>รายละเอียด</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name === 'no'">
|
<div v-if="col.name === 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else-if="col.name === 'organizationPositionOld'"
|
v-else-if="col.name === 'organizationPositionOld'"
|
||||||
class="text-html"
|
class="text-html"
|
||||||
>
|
>
|
||||||
{{ props.row.organizationPositionOld ?? "-" }}
|
{{ props.row.organizationPositionOld ?? "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{
|
{{
|
||||||
col.value == null ? "" : col.value == "" ? "-" : col.value
|
col.value == null ? "" : col.value == "" ? "-" : col.value
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue