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