feat: #6321 replace dialog into layout
This commit is contained in:
parent
46aefa67d1
commit
4049fa5c4a
|
@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||||
import TicketLackFilter from 'pages/Ticket/Negative/TicketLackFilter.vue';
|
import TicketLackFilter from 'pages/Ticket/Negative/TicketLackFilter.vue';
|
||||||
|
import TicketLackDetail from 'pages/Ticket/Negative/TicketLackDetail.vue';
|
||||||
// import TicketLackDialogProxy from 'src/pages/Ticket/Negative/TicketLackDialogProxy.vue';
|
// import TicketLackDialogProxy from 'src/pages/Ticket/Negative/TicketLackDialogProxy.vue';
|
||||||
import NegativeOriginDialog from 'pages/Ticket/Negative/NegativeOriginDialog.vue';
|
import NegativeOriginDialog from 'pages/Ticket/Negative/NegativeOriginDialog.vue';
|
||||||
import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOriginDialog.vue';
|
import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOriginDialog.vue';
|
||||||
|
@ -23,13 +24,8 @@ import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const viewSummary = ({ itemFk: id }) => {
|
const viewSummary = async (row) => {
|
||||||
router.push({
|
currentRow.value = row;
|
||||||
name: 'TicketLackCard',
|
|
||||||
params: {
|
|
||||||
id: '1',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
const originDialogRef = ref();
|
const originDialogRef = ref();
|
||||||
const totalNegativeDialogRef = ref();
|
const totalNegativeDialogRef = ref();
|
||||||
|
@ -117,7 +113,18 @@ const columns = computed(() => [
|
||||||
<VnSubToolbar class="bg-vn-dark justify-end">
|
<VnSubToolbar class="bg-vn-dark justify-end">
|
||||||
<template #st-actions>
|
<template #st-actions>
|
||||||
<!-- <div class="flex items-center q-ml-lg" style="column-gap: 1px"> -->
|
<!-- <div class="flex items-center q-ml-lg" style="column-gap: 1px"> -->
|
||||||
<QBtnGroup push style="column-gap: 1px">
|
<QBtnGroup v-if="currentRow" push style="column-gap: 1px"
|
||||||
|
><QBtn
|
||||||
|
:label="t('globals.cancel')"
|
||||||
|
@click="currentRow = null"
|
||||||
|
color="primary"
|
||||||
|
flat
|
||||||
|
icon="close"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('negative.totalNegative') }}</QTooltip>
|
||||||
|
</QBtn></QBtnGroup
|
||||||
|
>
|
||||||
|
<QBtnGroup push style="column-gap: 1px" v-if="!currentRow">
|
||||||
<QBtn
|
<QBtn
|
||||||
color="primary"
|
color="primary"
|
||||||
:disable="!selectedRows?.length"
|
:disable="!selectedRows?.length"
|
||||||
|
@ -137,7 +144,7 @@ const columns = computed(() => [
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<div class="list">
|
<div v-show="!currentRow" class="list">
|
||||||
<VnPaginate data-key="NegativeList" :url="`Tickets/itemLack`" auto-load>
|
<VnPaginate data-key="NegativeList" :url="`Tickets/itemLack`" auto-load>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<QTable
|
<QTable
|
||||||
|
@ -206,6 +213,9 @@ const columns = computed(() => [
|
||||||
</template>
|
</template>
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="currentRow" class="list">
|
||||||
|
<TicketLackDetail :id="currentRow?.itemFk"></TicketLackDetail>
|
||||||
|
</div>
|
||||||
<!--
|
<!--
|
||||||
<TicketLackDialogProxy
|
<TicketLackDialogProxy
|
||||||
ref="dialogRef"
|
ref="dialogRef"
|
||||||
|
|
|
@ -39,14 +39,6 @@ export default {
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () =>
|
||||||
import('src/pages/Ticket/Negative/TicketLackList.vue'),
|
import('src/pages/Ticket/Negative/TicketLackList.vue'),
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: 'TicketLackCard',
|
|
||||||
path: ':id/edit',
|
|
||||||
component: () =>
|
|
||||||
import('src/pages/Ticket/Negative/TicketLackDetail.vue'),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'TicketCreate',
|
name: 'TicketCreate',
|
||||||
|
|
Loading…
Reference in New Issue