#6321 - Negative ticket #158

Open
jsegarra wants to merge 156 commits from 6321_negative_tickets into dev
5 changed files with 421 additions and 1 deletions
Showing only changes of commit c95b738e0c - Show all commits

View File

@ -63,6 +63,7 @@ export default {
allRows: 'All { numberRows } row(s)',
markAll: 'Mark all',
noResults: 'No results',
results: 'Results',
system: 'System',
},
errors: {
@ -272,6 +273,7 @@ export default {
ticket: {
pageTitles: {
tickets: 'Tickets',
negative: 'Tickets negative',
list: 'List',
createTicket: 'Create ticket',
summary: 'Summary',
@ -349,6 +351,25 @@ export default {
weight: 'Weight',
goTo: 'Go to',
},
negative:{
hour: 'Hora',
id: 'Id_Articulo',
longName:'Articulo',
supplier: 'Productor',
colour:'Color',
size:'Medida',
origen:'Origen',
value:'Negativo',
itemFk: 'itemFk',
warehouseFk: 'warehouseFk',
producer: 'producer',
category: 'category',
warehouse: 'warehouse',
lack: 'Negativo',
inkFk: 'inkFk',
timed: 'timed',
minTimed: 'minTimed',
}
},
claim: {
pageTitles: {

View File

@ -64,6 +64,7 @@ export default {
markAll: 'Marcar todo',
noResults: 'Sin resultados',
system: 'Sistema',
results: 'resultados'
},
errors: {
statusUnauthorized: 'Acceso denegado',
@ -270,6 +271,7 @@ export default {
ticket: {
pageTitles: {
tickets: 'Tickets',
negative: 'Tickets negativos',
list: 'Listado',
createTicket: 'Crear ticket',
summary: 'Resumen',
@ -296,6 +298,25 @@ export default {
warehouse: 'Almacén',
customerCard: 'Ficha del cliente',
},
negative:{
hour: 'Hora',
id: 'Id_Articulo',
longName:'Articulo',
supplier: 'Productor',
colour:'Color',
size:'Medida',
origen:'Origen',
value:'Negativo',
itemFk: 'itemFk',
warehouseFk: 'warehouseFk',
producer: 'producer',
category: 'category',
warehouse: 'warehouse',
lack: 'Negativo',
inkFk: 'inkFk',
timed: 'timed',
minTimed: 'minTimed',
},
boxing: {
expedition: 'Expedición',
item: 'Artículo',

View File

@ -0,0 +1,179 @@
<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 VnInput from 'src/components/common/VnInput.vue';
// import toDateString from 'filters/toDateString';
// import VnInputDate from 'components/common/VnInputDate.vue';
const { t } = useI18n();
const props = defineProps({
dataKey: {
type: String,
required: true,
},
});
// const from = Date.vnNew();
const to = Date.vnNew();
to.setDate(to.getDate() + 1);
const defaultParams = {
// from: toDateString(from),
// to: toDateString(to),
};
const agencies = ref();
// const warehouses = ref();
</script>
<template>
<FetchData url="AgencyModes" @on-fetch="(data) => (agencies = data)" auto-load />
<!-- <FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load /> -->
<VnFilterPanel
:data-key="props.dataKey"
:params="defaultParams"
:search-button="true"
>
<template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs">
<strong>{{ t(`params.${tag.label}`) }}: </strong>
<span>{{ formatFn(tag.value) }}</span>
</div>
</template>
<template #body="{ params }">
<!-- <template #body="{ params, searchFn }"> -->
<QList dense class="q-gutter-y-sm q-mt-sm">
<QItem>
<QItemSection>
<VnInput
v-model="params.id"
:label="t('ticket.negative.id')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem><QItemSection>
<VnInput
v-model="params.producer"
:label="t('ticket.negative.producer')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnInput
v-model="params.color"
:label="t('ticket.negative.colour')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem> <QItemSection>
<VnInput
v-model="params.size"
:label="t('ticket.negative.size')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem> <QItemSection>
<VnInput
v-model="params.origen"
:label="t('ticket.negative.origen')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem> <QItemSection>
<VnInput
v-model="params.value"
:label="t('ticket.negative.value')"
is-outlined
/>
</QItemSection>
<!-- <QItemSection>
<VnInputDate v-model="params.to" :label="t('To')" is-outlined />
</QItemSection> -->
</QItem>
<!-- <QItem>
<QItemSection v-if="!warehouses">
<QSkeleton type="QInput" class="full-width" />
</QItemSection>
<QItemSection v-if="warehouses">
<QSelect
:label="t('Warehouse')"
v-model="params.warehouseFk"
@update:model-value="searchFn()"
:options="warehouses"
option-value="id"
option-label="name"
emit-value
map-options
dense
outlined
rounded
/>
</QItemSection>
</QItem> -->
</QList>
</template>
</VnFilterPanel>
</template>
<i18n>
en:
params:
search: Contains
clientFk: Customer
orderFk: Order
from: From
to: To
salesPersonFk: Salesperson
stateFk: State
refFk: Invoice Ref.
myTeam: My team
pending: Pending
hasInvoice: Invoiced
hasRoute: Routed
provinceFk: Province
agencyModeFk: Agency
warehouseFk: Warehouse
es:
params:
search: Contiene
clientFk: Cliente
orderFk: Pedido
from: Desde
to: Hasta
salesPersonFk: Comercial
stateFk: Estado
refFk: Ref. Factura
myTeam: Mi equipo
pending: Pendiente
hasInvoice: Facturado
hasRoute: Enrutado
Customer ID: ID Cliente
Order ID: ID Pedido
From: Desde
To: Hasta
Salesperson: Comercial
State: Estado
Invoice Ref.: Ref. Factura
My team: Mi equipo
Pending: Pendiente
With problems: Con problemas
Invoiced: Facturado
Routed: Enrutado
More options: Más opciones
Province: Provincia
Agency: Agencia
Warehouse: Almacén
Yes: Si
No: No
</i18n>

View File

@ -0,0 +1,190 @@
<script setup>
import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useStateStore } from 'stores/useStateStore';
import VnPaginate from 'components/ui/VnPaginate.vue';
import { useSession } from 'src/composables/useSession';
import TicketFilter from 'pages/Ticket/Negative/TicketFilter.vue';
// import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
// import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
const stateStore = useStateStore();
const { t } = useI18n();
const session = useSession();
const selected = ref([]);
const columns = computed(() => [
{
name: 'itemFk',
label: t('ticket.negative.id'),
field: ({itemFk}) => itemFk,
sortable: true,
},
{
name: 'longName',
label: t('ticket.negative.longName'),
field: ({longName}) => longName,
align: 'center',
sortable: true,
headerStyle: 'padding-left: 35px',
},
{
name: 'producer',
label: t('ticket.negative.supplier'),
field: ({producer}) => producer,
sortable: true,
},
{
name: 'inkFk',
label: t('ticket.negative.colour'),
field: ({inkFk}) => inkFk,
sortable: true,
},
{
name: 'size',
label: t('ticket.negative.size'),
field: ({size}) => size,
sortable: true,
},
{
name: 'category',
label: t('ticket.negative.origen'),
field: ({category}) => category,
align: 'left',
sortable: true,
},
{
name: 'lack',
label: t('ticket.negative.lack'),
field: ({lack}) => lack,
align: 'center',
sortable: true,
headerStyle: 'padding-left: 33px',
},
/*{
name: 'inkFk',
label: t('ticket.negative.inkFk'),
field: ({inkFk}) => inkFk,
align: 'center',
sortable: true,
headerStyle: 'padding-left: 33px',
},
{
name: 'timed',
label: t('ticket.negative.timed'),
field: ({timed}) => timed,
align: 'center',
sortable: true,
headerStyle: 'padding-left: 33px',
},
{
name: 'minTimed',
label: t('ticket.negative.minTimed'),
field: ({minTimed}) => minTimed,
align: 'center',
sortable: true,
headerStyle: 'padding-left: 33px',
},*/
{
align: 'right',
field: 'actions',
label: '',
name: 'actions',
}
]);
</script>
<template>
<div class="column items-center">
<div class="list">
<VnPaginate
data-key="NegativeList"
:url="`Tickets/itemLack`"
auto-load
>
<template #body="{ rows }">
<QTable
:columns="columns"
:rows="rows"
:dense="$q.screen.lt.md"
:pagination="{ rowsPerPage: null }"
hide-pagination
row-key="cmrFk"
selection="multiple"
v-model:selected="selected"
:grid="$q.screen.lt.md"
auto-load
>
<template #top>
<div style="width: 100%; display: table">
<div style="float: right; color: lightgray">
{{ `${rows.length} ${t('globals.results')}` }}
</div>
</div>
</template>
<template #body-cell-hasCmrDms="{ value }">
<QTd align="center">
<QBadge
:id="value ? 'true' : 'false'"
:label="
value
? t('ticket.negative.true')
: t('ticket.negative.false')
"
/>
</QTd>
</template>
<template #body-cell-ticketFk="{ value }">
<QTd align="right" class="text-primary">
<span class="text-primary link">{{ value }}</span>
<TicketDescriptorProxy :id="value" />
</QTd>
</template>
<template #body-cell-clientFk="{ value }">
<QTd align="right" class="text-primary">
<span class="text-primary link">{{ value }}</span>
<CustomerDescriptorProxy :id="value" />
</QTd>
</template>
<template #body-cell-icons="{ value }">
<QTd align="center">
<a :href="getCmrUrl(value)" target="_blank">
<QIcon
name="visibility"
color="primary"
size="md"
class="q-mr-sm q-ml-sm"
/>
<QTooltip>
{{ t('ticket.negative.viewCmr') }}
</QTooltip>
</a>
</QTd>
</template>
</QTable>
</template>
</VnPaginate>
</div>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
<QScrollArea class="fit text-grey-8">
<TicketFilter data-key="NegativeList" />
</QScrollArea>
</QDrawer>
</div>
</template>
<style lang="scss" scoped>
.list {
padding: 15px;
width: 100%;
}
.grid-style-transition {
transition: transform 0.28s, background-color 0.28s;
}
#true {
background-color: $positive;
}
#false {
background-color: $negative;
}
</style>

View File

@ -10,7 +10,7 @@ export default {
component: RouterView,
redirect: { name: 'TicketMain' },
menus: {
main: ['TicketList'],
main: ['TicketList', 'TicketNegative'],
card: ['TicketBoxing', 'TicketSms'],
},
children: [
@ -29,6 +29,15 @@ export default {
},
component: () => import('src/pages/Ticket/TicketList.vue'),
},
{
name: 'TicketNegative',
path: 'negative',
meta: {
title: 'negative',
icon: 'view_list',
},
component: () => import('src/pages/Ticket/Negative/TicketList.vue'),
},
{
name: 'TicketCreate',
path: 'create',