refactor: refs #8316 used VnSection and VnCardBeta
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
93047ab179
commit
acdbc638e0
|
@ -550,6 +550,8 @@ shelving:
|
||||||
newShelving: New Shelving
|
newShelving: New Shelving
|
||||||
summary:
|
summary:
|
||||||
recyclable: Recyclable
|
recyclable: Recyclable
|
||||||
|
search: Search shelving
|
||||||
|
searchInfo: You can search by shelving reference
|
||||||
parking:
|
parking:
|
||||||
pickingOrder: Picking order
|
pickingOrder: Picking order
|
||||||
sector: Sector
|
sector: Sector
|
||||||
|
|
|
@ -575,6 +575,8 @@ shelving:
|
||||||
newShelving: Nuevo Carro
|
newShelving: Nuevo Carro
|
||||||
summary:
|
summary:
|
||||||
recyclable: Reciclable
|
recyclable: Reciclable
|
||||||
|
search: Buscar carro
|
||||||
|
searchInfo: Puedes buscar por referencia del carro
|
||||||
parking:
|
parking:
|
||||||
pickingOrder: Orden de recogida
|
pickingOrder: Orden de recogida
|
||||||
row: Fila
|
row: Fila
|
||||||
|
|
|
@ -1,19 +1,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||||
import ShelvingDescriptor from 'pages/Shelving/Card/ShelvingDescriptor.vue';
|
import ShelvingDescriptor from 'pages/Shelving/Card/ShelvingDescriptor.vue';
|
||||||
import ShelvingFilter from './ShelvingFilter.vue';
|
|
||||||
import ShelvingSearchbar from './ShelvingSearchbar.vue';
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnCard
|
<VnCardBeta
|
||||||
data-key="Shelving"
|
data-key="Shelving"
|
||||||
base-url="Shelvings"
|
base-url="Shelvings"
|
||||||
:descriptor="ShelvingDescriptor"
|
:descriptor="ShelvingDescriptor"
|
||||||
:filter-panel="ShelvingFilter"
|
/>
|
||||||
search-data-key="ShelvingList"
|
|
||||||
>
|
|
||||||
<template #searchbar>
|
|
||||||
<ShelvingSearchbar />
|
|
||||||
</template>
|
|
||||||
</VnCard>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -6,13 +6,14 @@ import VnLv from 'components/ui/VnLv.vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
|
import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
|
||||||
import ShelvingSummary from 'pages/Shelving/Card/ShelvingSummary.vue';
|
import ShelvingSummary from 'pages/Shelving/Card/ShelvingSummary.vue';
|
||||||
import ShelvingSearchbar from 'pages/Shelving/Card/ShelvingSearchbar.vue';
|
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
|
const dataKey = 'ShelvingList';
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
include: [{ relation: 'parking' }],
|
include: [{ relation: 'parking' }],
|
||||||
};
|
};
|
||||||
|
@ -34,58 +35,66 @@ function exprBuilder(param, value) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ShelvingSearchbar />
|
<VnSection
|
||||||
<RightMenu>
|
:data-key="dataKey"
|
||||||
<template #right-panel>
|
prefix="shelving"
|
||||||
|
:array-data-props="{
|
||||||
|
url: 'Shelvings',
|
||||||
|
order: ['code'],
|
||||||
|
exprBuilder,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template #rightMenu>
|
||||||
<ShelvingFilter data-key="ShelvingList" />
|
<ShelvingFilter data-key="ShelvingList" />
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
<template #body>
|
||||||
<QPage class="column items-center q-pa-md">
|
<QPage class="column items-center q-pa-md">
|
||||||
<div class="vn-card-list">
|
<div class="vn-card-list">
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
data-key="ShelvingList"
|
:data-key="dataKey"
|
||||||
url="Shelvings"
|
:filter="filter"
|
||||||
:filter="filter"
|
:expr-builder="exprBuilder"
|
||||||
:expr-builder="exprBuilder"
|
:limit="20"
|
||||||
:limit="20"
|
|
||||||
>
|
|
||||||
<template #body="{ rows }">
|
|
||||||
<CardList
|
|
||||||
v-for="row of rows"
|
|
||||||
:key="row.id"
|
|
||||||
:id="row.id"
|
|
||||||
:title="row.code"
|
|
||||||
@click="navigate(row.id)"
|
|
||||||
>
|
>
|
||||||
<template #list-items>
|
<template #body="{ rows }">
|
||||||
<VnLv
|
<CardList
|
||||||
:label="t('shelving.list.parking')"
|
v-for="row of rows"
|
||||||
:title-label="t('shelving.list.parking')"
|
:key="row.id"
|
||||||
:value="row.parking?.code"
|
:id="row.id"
|
||||||
/>
|
:title="row.code"
|
||||||
<VnLv
|
@click="navigate(row.id)"
|
||||||
:label="t('shelving.list.priority')"
|
>
|
||||||
:value="row?.priority"
|
<template #list-items>
|
||||||
/>
|
<VnLv
|
||||||
|
:label="t('shelving.list.parking')"
|
||||||
|
:title-label="t('shelving.list.parking')"
|
||||||
|
:value="row.parking?.code"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('shelving.list.priority')"
|
||||||
|
:value="row?.priority"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #actions>
|
||||||
|
<QBtn
|
||||||
|
:label="t('components.smartCard.openSummary')"
|
||||||
|
@click.stop="viewSummary(row.id, ShelvingSummary)"
|
||||||
|
color="primary"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</CardList>
|
||||||
</template>
|
</template>
|
||||||
<template #actions>
|
</VnPaginate>
|
||||||
<QBtn
|
</div>
|
||||||
:label="t('components.smartCard.openSummary')"
|
<QPageSticky :offset="[20, 20]">
|
||||||
@click.stop="viewSummary(row.id, ShelvingSummary)"
|
<RouterLink :to="{ name: 'ShelvingCreate' }">
|
||||||
color="primary"
|
<QBtn fab icon="add" color="primary" shortcut="+" />
|
||||||
/>
|
<QTooltip>
|
||||||
</template>
|
{{ t('shelving.list.newShelving') }}
|
||||||
</CardList>
|
</QTooltip>
|
||||||
</template>
|
</RouterLink>
|
||||||
</VnPaginate>
|
</QPageSticky>
|
||||||
</div>
|
</QPage>
|
||||||
<QPageSticky :offset="[20, 20]">
|
</template>
|
||||||
<RouterLink :to="{ name: 'ShelvingCreate' }">
|
</VnSection>
|
||||||
<QBtn fab icon="add" color="primary" shortcut="+" />
|
|
||||||
<QTooltip>
|
|
||||||
{{ t('shelving.list.newShelving') }}
|
|
||||||
</QTooltip>
|
|
||||||
</RouterLink>
|
|
||||||
</QPageSticky>
|
|
||||||
</QPage>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,34 +1,81 @@
|
||||||
import { RouterView } from 'vue-router';
|
import { RouterView } from 'vue-router';
|
||||||
|
|
||||||
|
const shelvingCard = {
|
||||||
|
name: 'ShelvingCard',
|
||||||
|
path: ':id',
|
||||||
|
component: () => import('src/pages/Shelving/Card/ShelvingCard.vue'),
|
||||||
|
redirect: { name: 'ShelvingSummary' },
|
||||||
|
meta: {
|
||||||
|
menu: [
|
||||||
|
'ShelvingBasicData',
|
||||||
|
'ShelvingLog',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'summary',
|
||||||
|
name: 'ShelvingSummary',
|
||||||
|
meta: {
|
||||||
|
title: 'summary',
|
||||||
|
icon: 'launch',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Shelving/Card/ShelvingSummary.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'basic-data',
|
||||||
|
name: 'ShelvingBasicData',
|
||||||
|
meta: {
|
||||||
|
title: 'basicData',
|
||||||
|
icon: 'vn:settings',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Shelving/Card/ShelvingForm.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'log',
|
||||||
|
name: 'ShelvingLog',
|
||||||
|
meta: {
|
||||||
|
title: 'log',
|
||||||
|
icon: 'history',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Shelving/Card/ShelvingLog.vue'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: '/shelving',
|
|
||||||
name: 'Shelving',
|
name: 'Shelving',
|
||||||
|
path: '/shelving',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'shelving',
|
title: 'shelving',
|
||||||
icon: 'vn:inventory',
|
icon: 'vn:inventory',
|
||||||
moduleName: 'Shelving',
|
moduleName: 'Shelving',
|
||||||
|
menu: ['ShelvingList', 'ParkingList'],
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'ShelvingMain' },
|
redirect: { name: 'ShelvingMain' },
|
||||||
menus: {
|
|
||||||
main: ['ShelvingList', 'ParkingList'],
|
|
||||||
card: ['ShelvingBasicData', 'ShelvingLog'],
|
|
||||||
},
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
|
||||||
name: 'ShelvingMain',
|
name: 'ShelvingMain',
|
||||||
|
path: '',
|
||||||
component: () => import('src/components/common/VnModule.vue'),
|
component: () => import('src/components/common/VnModule.vue'),
|
||||||
redirect: { name: 'ShelvingList' },
|
redirect: { name: 'ShelvingIndexMain' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'list',
|
path: '',
|
||||||
name: 'ShelvingList',
|
name: 'ShelvingIndexMain',
|
||||||
meta: {
|
redirect: { name: 'ShelvingList' },
|
||||||
title: 'list',
|
|
||||||
icon: 'view_list',
|
|
||||||
},
|
|
||||||
component: () => import('src/pages/Shelving/ShelvingList.vue'),
|
component: () => import('src/pages/Shelving/ShelvingList.vue'),
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'ShelvingList',
|
||||||
|
path: 'list',
|
||||||
|
meta: {
|
||||||
|
title: 'list',
|
||||||
|
icon: 'view_list',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
shelvingCard,
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'create',
|
path: 'create',
|
||||||
|
@ -56,39 +103,5 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'ShelvingLayout',
|
|
||||||
path: ':id',
|
|
||||||
component: () => import('pages/Shelving/Card/ShelvingCard.vue'),
|
|
||||||
redirect: { name: 'ShelvingSummary' },
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: 'ShelvingSummary',
|
|
||||||
path: 'summary',
|
|
||||||
meta: {
|
|
||||||
title: 'summary',
|
|
||||||
},
|
|
||||||
component: () => import('pages/Shelving/Card/ShelvingSummary.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ShelvingBasicData',
|
|
||||||
path: 'basic-data',
|
|
||||||
meta: {
|
|
||||||
title: 'basicData',
|
|
||||||
icon: 'vn:settings',
|
|
||||||
},
|
|
||||||
component: () => import('pages/Shelving/Card/ShelvingForm.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ShelvingLog',
|
|
||||||
path: 'log',
|
|
||||||
meta: {
|
|
||||||
title: 'log',
|
|
||||||
icon: 'history',
|
|
||||||
},
|
|
||||||
component: () => import('src/pages/Shelving/Card/ShelvingLog.vue'),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue