feat: refs #6243 show all cmrs & filter by warehouse
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
b93b630c6a
commit
1bc99cbd22
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- (Item) => Se añade la opción de añadir un comentario del motivo de hacer una foto
|
- (Item) => Se añade la opción de añadir un comentario del motivo de hacer una foto
|
||||||
|
- (Route) => Ahora se muestran todos los cmrs
|
||||||
|
|
||||||
## [2418.01]
|
## [2418.01]
|
||||||
|
|
||||||
|
|
|
@ -956,7 +956,7 @@ roadmap:
|
||||||
route:
|
route:
|
||||||
pageTitles:
|
pageTitles:
|
||||||
routes: Routes
|
routes: Routes
|
||||||
cmrsList: External CMRs list
|
cmrsList: CMRs list
|
||||||
RouteList: List
|
RouteList: List
|
||||||
routeCreate: New route
|
routeCreate: New route
|
||||||
basicData: Basic Data
|
basicData: Basic Data
|
||||||
|
|
|
@ -944,7 +944,7 @@ roadmap:
|
||||||
route:
|
route:
|
||||||
pageTitles:
|
pageTitles:
|
||||||
routes: Rutas
|
routes: Rutas
|
||||||
cmrsList: Listado de CMRs externos
|
cmrsList: Listado de CMRs
|
||||||
RouteList: Listado
|
RouteList: Listado
|
||||||
routeCreate: Nueva ruta
|
routeCreate: Nueva ruta
|
||||||
basicData: Datos básicos
|
basicData: Datos básicos
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -16,10 +16,11 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const countries = ref();
|
const countries = ref();
|
||||||
|
const warehouses = ref();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData url="Countries" @on-fetch="(data) => (countries = data)" auto-load />
|
<FetchData url="Countries" @on-fetch="(data) => (countries = data)" auto-load />
|
||||||
|
<FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
|
||||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
|
@ -93,13 +94,13 @@ const countries = ref();
|
||||||
<QItemSection v-if="!countries">
|
<QItemSection v-if="!countries">
|
||||||
<QSkeleton type="QInput" class="full-width" />
|
<QSkeleton type="QInput" class="full-width" />
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
<QItemSection v-if="countries" class="q-mb-sm">
|
<QItemSection v-if="countries">
|
||||||
<QSelect
|
<VnSelect
|
||||||
:label="t('route.cmr.list.country')"
|
:label="t('route.cmr.list.country')"
|
||||||
v-model="params.country"
|
v-model="params.country"
|
||||||
:options="countries"
|
:options="countries"
|
||||||
option-value="country"
|
option-label="name"
|
||||||
option-label="country"
|
option-value="id"
|
||||||
transition-show="jump-down"
|
transition-show="jump-down"
|
||||||
transition-hide="jump-up"
|
transition-hide="jump-up"
|
||||||
emit-value
|
emit-value
|
||||||
|
@ -111,9 +112,23 @@ const countries = ref();
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<QIcon name="flag" size="sm"></QIcon>
|
<QIcon name="flag" size="sm"></QIcon>
|
||||||
</template>
|
</template>
|
||||||
</QSelect>
|
</VnSelect>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<VnSelect
|
||||||
|
:label="t('globals.warehouse')"
|
||||||
|
:options="warehouses"
|
||||||
|
hide-selected
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
v-model="params.warehouseFk"
|
||||||
|
rounded
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
>
|
||||||
|
</VnSelect>
|
||||||
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
|
@ -126,7 +141,6 @@ const countries = ref();
|
||||||
</template>
|
</template>
|
||||||
</VnFilterPanel>
|
</VnFilterPanel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
params:
|
params:
|
||||||
|
|
|
@ -9,12 +9,14 @@ import { toDate } from 'filters/index';
|
||||||
import CmrFilter from './CmrFilter.vue';
|
import CmrFilter from './CmrFilter.vue';
|
||||||
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { getTokenMultimedia } = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = getTokenMultimedia();
|
const token = getTokenMultimedia();
|
||||||
const selected = ref([]);
|
const selected = ref([]);
|
||||||
|
const warehouses = ref([]);
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
|
@ -64,6 +66,13 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
headerStyle: 'padding-left: 33px',
|
headerStyle: 'padding-left: 33px',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'warehouseFk',
|
||||||
|
label: t('globals.warehouse'),
|
||||||
|
field: ({ warehouseFk }) => warehouseFk,
|
||||||
|
align: 'center',
|
||||||
|
sortable: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'icons',
|
name: 'icons',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -108,6 +117,7 @@ function downloadPdfs() {
|
||||||
</div>
|
</div>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
</template>
|
</template>
|
||||||
|
<FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
|
||||||
<div class="column items-center">
|
<div class="column items-center">
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
|
@ -160,6 +170,11 @@ function downloadPdfs() {
|
||||||
<CustomerDescriptorProxy :id="value" />
|
<CustomerDescriptorProxy :id="value" />
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
<template #body-cell-warehouseFk="{ value }">
|
||||||
|
<QTd align="center">
|
||||||
|
{{ warehouses.find(({ id }) => id === value)?.name }}
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
<template #body-cell-icons="{ value }">
|
<template #body-cell-icons="{ value }">
|
||||||
<QTd align="center">
|
<QTd align="center">
|
||||||
<a :href="getCmrUrl(value)" target="_blank">
|
<a :href="getCmrUrl(value)" target="_blank">
|
||||||
|
@ -181,13 +196,13 @@ function downloadPdfs() {
|
||||||
</div>
|
</div>
|
||||||
<QPageSticky :offset="[20, 20]">
|
<QPageSticky :offset="[20, 20]">
|
||||||
<QBtn @click="downloadPdfs" fab icon="cloud_download" color="primary" />
|
<QBtn @click="downloadPdfs" fab icon="cloud_download" color="primary" />
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('route.cmr.list.downloadCmrs') }}
|
||||||
|
</QTooltip>
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
|
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
|
||||||
<QScrollArea class="fit text-grey-8">
|
<QScrollArea class="fit text-grey-8">
|
||||||
<CmrFilter data-key="CmrList" />
|
<CmrFilter data-key="CmrList" />
|
||||||
<QTooltip>
|
|
||||||
{{ t('route.cmr.list.downloadCmrs') }}
|
|
||||||
</QTooltip>
|
|
||||||
</QScrollArea>
|
</QScrollArea>
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue