0
0
Fork 0

fix: refs #6389 fix front, filters, itp

This commit is contained in:
Carlos Satorres 2024-10-23 14:58:03 +02:00
parent daf57c9b2b
commit e8fd3c0a8f
6 changed files with 57 additions and 7 deletions

View File

@ -308,6 +308,7 @@ globals:
email: Email email: Email
SSN: SSN SSN: SSN
fi: FI fi: FI
packing: ITP
changePass: Change password changePass: Change password
deleteConfirmTitle: Delete selected elements deleteConfirmTitle: Delete selected elements
errors: errors:

View File

@ -312,6 +312,7 @@ globals:
email: Correo email: Correo
SSN: NSS SSN: NSS
fi: NIF fi: NIF
packing: ITP
changePass: Cambiar contraseña changePass: Cambiar contraseña
deleteConfirmTitle: Eliminar los elementos seleccionados deleteConfirmTitle: Eliminar los elementos seleccionados
errors: errors:

View File

@ -222,6 +222,18 @@ const getLocale = (label) => {
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem>
<QItemSection>
<VnSelect
outlined
dense
rounded
:label="t('globals.params.packing')"
v-model="params.packing"
url="ItemPackingTypes"
/>
</QItemSection>
</QItem>
<QItem> <QItem>
<QItemSection> <QItemSection>
<QCheckbox <QCheckbox

View File

@ -23,6 +23,8 @@ 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 visibleColumns = ref([]);
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
const from = Date.vnNew(); const from = Date.vnNew();
@ -48,7 +50,10 @@ function exprBuilder(param, value) {
case 'nickname': case 'nickname':
return { [`t.nickname`]: { like: `%${value}%` } }; return { [`t.nickname`]: { like: `%${value}%` } };
case 'zoneFk': case 'zoneFk':
case 'departmentId': case 'department':
return { 'd.name': value };
case 'packing':
return { ItemPackingTypeFk: value };
case 'totalWithVat': case 'totalWithVat':
return { [`t.${param}`]: value }; return { [`t.${param}`]: value };
} }
@ -135,6 +140,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'),
@ -227,22 +233,32 @@ const columns = computed(() => [
label: t('salesTicketsTable.department'), label: t('salesTicketsTable.department'),
name: 'department', name: 'department',
align: 'left', align: 'left',
component: 'select',
attrs: {
url: 'Departments',
optionValue: 'name',
optionLabel: 'name',
},
columnFilter: { columnFilter: {
component: 'select', component: 'select',
url: 'Departments', url: 'Departments',
attrs: { attrs: {
options: DepartmentOpts.value,
optionValue: 'name', optionValue: 'name',
optionLabel: 'name', optionLabel: 'name',
dense: true, 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',
@ -349,6 +365,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

@ -44,6 +44,7 @@ salesTicketsTable:
preparation: Preparation preparation: Preparation
payMethod: Pay method payMethod: Pay method
department: Department 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

@ -44,6 +44,7 @@ salesTicketsTable:
preparation: Preparación preparation: Preparación
payMethod: Método de pago payMethod: Método de pago
department: Departamento 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