fix: refs #6389 ipt #846

Open
carlossa wants to merge 18 commits from 6389-changesMonitor into dev
6 changed files with 104 additions and 8 deletions

View File

@ -329,6 +329,7 @@ globals:
email: Email email: Email
SSN: SSN SSN: SSN
fi: FI fi: FI
packing: ITP
myTeam: My team myTeam: My team
departmentFk: Department departmentFk: Department
countryFk: Country countryFk: Country

View File

@ -335,6 +335,7 @@ globals:
SSN: NSS SSN: NSS
fi: NIF fi: NIF
myTeam: Mi equipo myTeam: Mi equipo
packing: ITP
countryFk: País countryFk: País
changePass: Cambiar contraseña changePass: Cambiar contraseña
deleteConfirmTitle: Eliminar los elementos seleccionados deleteConfirmTitle: Eliminar los elementos seleccionados

View File

@ -134,6 +134,7 @@ const getLocale = (label) => {
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem> <QItem>
<QItemSection> <QItemSection>
<VnSelect <VnSelect
@ -209,6 +210,32 @@ const getLocale = (label) => {
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem>
<QItemSection>
<VnSelect
outlined
dense
rounded
:label="t('globals.params.departmentFk')"
v-model="params.department"
url="Departments"
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelect
outlined
dense
rounded
:label="t('globals.params.packing')"
v-model="params.packing"
url="ItemPackingTypes"
option-label="code"
option-value="code"
/>
</QItemSection>
</QItem>
<QItem> <QItem>
<QItemSection> <QItemSection>
<QCheckbox <QCheckbox
@ -258,7 +285,7 @@ en:
ON_PREVIOUS: On previous ON_PREVIOUS: On previous
PACKED: Packed PACKED: Packed
No one: No one No one: No one
es: es:
params: params:
orderFk: Id cesta orderFk: Id cesta

View File

@ -24,6 +24,9 @@ const tableRef = ref(null);
const provinceOpts = ref([]); const provinceOpts = ref([]);
const stateOpts = ref([]); const stateOpts = ref([]);
const zoneOpts = ref([]); const zoneOpts = ref([]);
const DepartmentOpts = ref([]);
const ItemPackingTypeOpts = ref([]);
const visibleColumns = ref([]);
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
const [from, to] = dateRange(Date.vnNew()); const [from, to] = dateRange(Date.vnNew());
@ -51,6 +54,8 @@ function exprBuilder(param, value) {
case 'nickname': case 'nickname':
return { [`t.nickname`]: { like: `%${value}%` } }; return { [`t.nickname`]: { like: `%${value}%` } };
case 'zoneFk': case 'zoneFk':
case 'department':
return { 'd.name': value };
case 'totalWithVat': case 'totalWithVat':
return { [`t.${param}`]: value }; return { [`t.${param}`]: value };
} }
@ -137,6 +142,7 @@ const columns = computed(() => [
align: 'left', align: 'left',
format: (row) => row.practicalHour, format: (row) => row.practicalHour,
columnFilter: false, columnFilter: false,
dense: true,
}, },
{ {
label: t('salesTicketsTable.preparation'), label: t('salesTicketsTable.preparation'),
@ -190,6 +196,7 @@ const columns = computed(() => [
'false-value': 0, 'false-value': 0,
'true-value': 1, 'true-value': 1,
}, },
component: false,
}, },
{ {
label: t('salesTicketsTable.zone'), label: t('salesTicketsTable.zone'),
@ -206,6 +213,12 @@ const columns = computed(() => [
}, },
}, },
}, },
{
label: t('salesTicketsTable.payMethod'),
name: 'payMethod',
align: 'left',
columnFilter: false,
},
{ {
label: t('salesTicketsTable.total'), label: t('salesTicketsTable.total'),
name: 'totalWithVat', name: 'totalWithVat',
@ -219,6 +232,36 @@ const columns = computed(() => [
}, },
}, },
}, },
{
label: t('salesTicketsTable.department'),
name: 'department',
align: 'left',
columnFilter: {
component: 'select',
url: 'Departments',
attrs: {
options: DepartmentOpts.value,
optionValue: 'name',
optionLabel: 'name',
dense: true,
},
},
},
{
label: t('salesTicketsTable.packing'),
name: 'packing',
align: 'left',
columnFilter: {
component: 'select',
url: 'ItemPackingTypes',
attrs: {
options: ItemPackingTypeOpts.value,
'option-value': 'code',
'option-label': 'code',
dense: true,
},
},
},
{ {
align: 'right', align: 'right',
name: 'tableActions', name: 'tableActions',
@ -318,6 +361,24 @@ const openTab = (id) =>
auto-load auto-load
@on-fetch="(data) => (zoneOpts = data)" @on-fetch="(data) => (zoneOpts = data)"
/> />
<FetchData
url="ItemPackingTypes"
:filter="{
fields: ['code'],
order: 'code ASC',
}"
auto-load
@on-fetch="(data) => (ItemPackingTypeOpts = data)"
/>
<FetchData
url="Departments"
:filter="{
fields: ['id', 'name'],
order: 'id ASC',
}"
auto-load
@on-fetch="(data) => (DepartmentOpts = data)"
/>
<MonitorTicketSearchbar /> <MonitorTicketSearchbar />
<RightMenu> <RightMenu>
<template #right-panel> <template #right-panel>
@ -337,7 +398,7 @@ const openTab = (id) =>
auto-load auto-load
:row-click="({ id }) => openTab(id)" :row-click="({ id }) => openTab(id)"
:disable-option="{ card: true }" :disable-option="{ card: true }"
:user-params="{ from, to, scopeDays: 0 }" :user-params="{ from, to, scopeDays: 0, packing }"
> >
<template #top-left> <template #top-left>
<QBtn <QBtn

View File

@ -26,8 +26,8 @@ salesTicketsTable:
componentLack: Component lack componentLack: Component lack
tooLittle: Ticket too little tooLittle: Ticket too little
identifier: Identifier identifier: Identifier
theoretical: Theoretical theoretical: H.Theor
practical: Practical practical: H.Prac
province: Province province: Province
state: State state: State
isFragile: Is fragile isFragile: Is fragile
@ -35,7 +35,10 @@ salesTicketsTable:
goToLines: Go to lines goToLines: Go to lines
preview: Preview preview: Preview
total: Total total: Total
preparation: Preparation preparation: H.Prep
payMethod: Pay method
department: Department
packing: ITP
searchBar: searchBar:
label: Search tickets label: Search tickets
info: Search tickets by id or alias info: Search tickets by id or alias

View File

@ -26,8 +26,8 @@ salesTicketsTable:
componentLack: Faltan componentes componentLack: Faltan componentes
tooLittle: Ticket demasiado pequeño tooLittle: Ticket demasiado pequeño
identifier: Identificador identifier: Identificador
theoretical: Teórica theoretical: H.Teór
practical: Práctica practical: H.Prác
province: Provincia province: Provincia
state: Estado state: Estado
isFragile: Es frágil isFragile: Es frágil
@ -35,7 +35,10 @@ salesTicketsTable:
goToLines: Ir a líneas goToLines: Ir a líneas
preview: Vista previa preview: Vista previa
total: Total total: Total
preparation: Preparación preparation: H.Prep
payMethod: Método de pago
department: Departamento
packing: ITP
searchBar: searchBar:
label: Buscar tickets label: Buscar tickets
info: Buscar tickets por identificador o alias info: Buscar tickets por identificador o alias