fix: refs #6389 ipt #846

Open
carlossa wants to merge 12 commits from 6389-changesMonitor into dev
6 changed files with 105 additions and 7 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
changePass: Change password changePass: Change password

View File

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

View File

@ -146,6 +146,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

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,10 @@ 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 'packing':
return { packing: value };
case 'totalWithVat': case 'totalWithVat':
return { [`t.${param}`]: value }; return { [`t.${param}`]: value };
} }
@ -137,6 +144,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 +198,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 +215,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 +234,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 +363,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>

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