0
0
Fork 0
This commit is contained in:
Alex Moreno 2024-09-24 07:48:58 +02:00
commit 98a3b03be7
10 changed files with 96 additions and 86 deletions

View File

@ -420,7 +420,7 @@ function handleOnDataSaved(_) {
<QBtn <QBtn
v-if="$props.rightSearch" v-if="$props.rightSearch"
icon="filter_alt" icon="filter_alt"
class="bg-vn-section-color q-ml-md" class="bg-vn-section-color q-ml-sm"
dense dense
@click="stateStore.toggleRightDrawer()" @click="stateStore.toggleRightDrawer()"
/> />
@ -507,8 +507,12 @@ function handleOnDataSaved(_) {
:key="index" :key="index"
:title="btn.title" :title="btn.title"
:icon="btn.icon" :icon="btn.icon"
class="q-px-sm text-primary-light" class="q-pa-xs"
flat flat
dense
:class="
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
"
:style="`visibility: ${ :style="`visibility: ${
(btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden' (btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden'
}`" }`"
@ -767,10 +771,16 @@ es:
} }
} }
.q-table th { .q-table {
padding: 0; th {
} padding: 0;
}
&__top {
padding: 12px 0px;
top: 0;
}
}
.vnTable { .vnTable {
thead tr th { thead tr th {
position: sticky; position: sticky;
@ -779,11 +789,11 @@ es:
thead tr:first-child th { thead tr:first-child th {
top: 0; top: 0;
} }
.q-table__top { <<<<<<< HEAD .q-table__top {
top: 0; top: 0;
padding: 12px 0; padding: 12px 0;
} }
tbody { =======>>>>>>>d13cab0a240a3a10db97a793022ba0f5ded48965 tbody {
.q-checkbox { .q-checkbox {
display: flex; display: flex;
margin-bottom: 9px; margin-bottom: 9px;

View File

@ -135,7 +135,7 @@ onMounted(async () => {
}); });
</script> </script>
<template> <template>
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-md q-px-sm" dense> <QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-sm q-px-sm" dense>
<QPopupProxy ref="popupProxyRef"> <QPopupProxy ref="popupProxyRef">
<QCard class="column q-pa-md"> <QCard class="column q-pa-md">
<QIcon name="info" size="sm" class="info-icon"> <QIcon name="info" size="sm" class="info-icon">

View File

@ -901,6 +901,7 @@ supplier:
account: Account account: Account
payMethod: Pay Method payMethod: Pay Method
payDay: Pay Day payDay: Pay Day
country: Country
summary: summary:
responsible: Responsible responsible: Responsible
notes: Notes notes: Notes

View File

@ -885,6 +885,7 @@ supplier:
account: Cuenta account: Cuenta
payMethod: Método de pago payMethod: Método de pago
payDay: Dia de pago payDay: Dia de pago
country: País
summary: summary:
responsible: Responsable responsible: Responsable
notes: Notas notes: Notas

View File

@ -139,7 +139,11 @@ const columns = computed(() => [
</VnTable> </VnTable>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.full-width .vn-row > * { .full-width .vn-row {
flex: 0.4; margin-bottom: 0;
flex-direction: row;
> * {
max-width: 125px;
}
} }
</style> </style>

View File

@ -132,7 +132,6 @@ const openTab = (id) =>
:table="{ :table="{
'row-key': 'id', 'row-key': 'id',
selection: 'multiple', selection: 'multiple',
'hide-bottom': true,
}" }"
default-mode="table" default-mode="table"
:row-click="({ id }) => openTab(id)" :row-click="({ id }) => openTab(id)"

View File

@ -54,7 +54,6 @@ const columns = computed(() => [
label: t('salesTicketsTable.problems'), label: t('salesTicketsTable.problems'),
name: 'totalProblems', name: 'totalProblems',
align: 'left', align: 'left',
columnFilter: false, columnFilter: false,
attrs: { attrs: {
dense: true, dense: true,
@ -65,7 +64,6 @@ const columns = computed(() => [
name: 'id', name: 'id',
field: 'id', field: 'id',
align: 'left', align: 'left',
columnFilter: { columnFilter: {
component: 'number', component: 'number',
name: 'id', name: 'id',
@ -108,9 +106,7 @@ const columns = computed(() => [
{ {
label: t('salesTicketsTable.date'), label: t('salesTicketsTable.date'),
name: 'shippedDate', name: 'shippedDate',
style: { 'max-width': '100px' },
align: 'left', align: 'left',
columnFilter: { columnFilter: {
component: 'date', component: 'date',
name: 'shippedDate', name: 'shippedDate',
@ -164,7 +160,6 @@ const columns = computed(() => [
label: t('salesTicketsTable.state'), label: t('salesTicketsTable.state'),
name: 'state', name: 'state',
align: 'left', align: 'left',
style: { 'max-width': '100px' },
columnFilter: { columnFilter: {
component: 'select', component: 'select',
name: 'stateFk', name: 'stateFk',
@ -193,7 +188,6 @@ const columns = computed(() => [
label: t('salesTicketsTable.zone'), label: t('salesTicketsTable.zone'),
name: 'zoneFk', name: 'zoneFk',
align: 'left', align: 'left',
columnFilter: { columnFilter: {
component: 'select', component: 'select',
name: 'zoneFk', name: 'zoneFk',
@ -210,8 +204,6 @@ const columns = computed(() => [
name: 'totalWithVat', name: 'totalWithVat',
field: 'totalWithVat', field: 'totalWithVat',
align: 'left', align: 'left',
style: { 'max-width': '75px' },
columnFilter: { columnFilter: {
component: 'number', component: 'number',
name: 'totalWithVat', name: 'totalWithVat',
@ -370,7 +362,7 @@ const openTab = (id) =>
</QCheckbox> </QCheckbox>
</template> </template>
<template #column-totalProblems="{ row }"> <template #column-totalProblems="{ row }">
<QTd class="no-padding" style="max-width: 60px"> <span>
<QIcon <QIcon
v-if="row.isTaxDataChecked === 0" v-if="row.isTaxDataChecked === 0"
name="vn:no036" name="vn:no036"
@ -424,46 +416,40 @@ const openTab = (id) =>
> >
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip> <QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
</QIcon> </QIcon>
</QTd> </span>
</template> </template>
<template #column-id="{ row }"> <template #column-id="{ row }">
<QTd class="no-padding"> <span class="link" @click.stop.prevent>
<span class="link" @click.stop.prevent> {{ row.id }}
{{ row.id }} <TicketDescriptorProxy :id="row.id" />
<TicketDescriptorProxy :id="row.id" /> </span>
</span>
</QTd>
</template> </template>
<template #column-clientFk="{ row }"> <template #column-clientFk="{ row }">
<QTd class="no-padding" @click.stop :title="row.nickname"> <div @click.stop :title="row.nickname">
<span class="link">{{ row.nickname }}</span> <span class="link" v-text="row.nickname" />
<CustomerDescriptorProxy :id="row.clientFk" /> <CustomerDescriptorProxy :id="row.clientFk" />
</QTd> </div>
</template> </template>
<template #column-salesPersonFk="{ row }"> <template #column-salesPersonFk="{ row }">
<QTd class="no-padding" @click.stop :title="row.userName"> <div @click.stop :title="row.userName">
<span class="link" v-text="dashIfEmpty(row.userName)" /> <span class="link" v-text="dashIfEmpty(row.userName)" />
<WorkerDescriptorProxy :id="row.salesPersonFk" /> <WorkerDescriptorProxy :id="row.salesPersonFk" />
</QTd> </div>
</template> </template>
<template #column-shippedDate="{ row }"> <template #column-shippedDate="{ row }">
<QTd class="no-padding"> <QBadge
<QBadge v-bind="getBadgeAttrs(row.shippedDate)"
v-bind="getBadgeAttrs(row.shippedDate)" class="q-pa-sm"
class="q-pa-sm" style="font-size: 14px"
style="font-size: 14px" >
> {{ formatShippedDate(row.shippedDate) }}
{{ formatShippedDate(row.shippedDate) }} </QBadge>
</QBadge>
</QTd>
</template> </template>
<template #column-provinceFk="{ row }"> <template #column-provinceFk="{ row }">
<QTd class="no-padding"> <span :title="row.province" v-text="row.province" />
<span :title="row.province" v-text="row.province" />
</QTd>
</template> </template>
<template #column-state="{ row }"> <template #column-state="{ row }">
<QTd class="no-padding" @click.stop.prevent> <div @click.stop.prevent>
<div v-if="row.refFk"> <div v-if="row.refFk">
<span class="link">{{ row.refFk }}</span> <span class="link">{{ row.refFk }}</span>
<InvoiceOutDescriptorProxy :id="row.invoiceOutId" /> <InvoiceOutDescriptorProxy :id="row.invoiceOutId" />
@ -477,32 +463,33 @@ const openTab = (id) =>
> >
{{ row.state }} {{ row.state }}
</QBadge> </QBadge>
</QTd> </div>
</template> </template>
<template #column-isFragile="{ row }"> <template #column-isFragile="{ row }">
<QTd class="no-padding"> <QIcon v-if="row.isFragile" name="local_bar" color="primary" size="sm">
<QIcon v-if="row.isFragile" name="local_bar" color="primary" size="sm"> <QTooltip>{{ $t('salesTicketsTable.isFragile') }}</QTooltip>
<QTooltip>{{ $t('salesTicketsTable.isFragile') }}</QTooltip> </QIcon>
</QIcon>
</QTd>
</template> </template>
<template #column-zoneFk="{ row }"> <template #column-zoneFk="{ row }">
<QTd class="no-padding" @click.stop.prevent :title="row.zoneName"> <div @click.stop.prevent :title="row.zoneName">
<span class="link">{{ row.zoneName }}</span> <span class="link">{{ row.zoneName }}</span>
<ZoneDescriptorProxy :id="row.zoneFk" /> <ZoneDescriptorProxy :id="row.zoneFk" />
</QTd> </div>
</template> </template>
<template #column-totalWithVat="{ row }"> <template #column-totalWithVat="{ row }">
<QTd class="no-padding"> <QBadge
<QBadge :color="totalPriceColor(row) || 'transparent'"
:color="totalPriceColor(row) || 'transparent'" :text-color="totalPriceColor(row) ? 'black' : 'white'"
:text-color="totalPriceColor(row) ? 'black' : 'white'" class="q-pa-sm"
class="q-pa-sm" style="font-size: 14px"
style="font-size: 14px" >
> {{ toCurrency(row.totalWithVat) }}
{{ toCurrency(row.totalWithVat) }} </QBadge>
</QBadge>
</QTd>
</template> </template>
</VnTable> </VnTable>
</template> </template>
<style lang="scss" scoped>
td .q-icon {
margin: 0 2px;
}
</style>

View File

@ -75,6 +75,19 @@ const columns = computed(() => [
}, },
visible: false, visible: false,
}, },
{
align: 'left',
label: t('supplier.list.tableVisibleColumns.country'),
name: 'country',
columnFilter: {
component: 'select',
name: 'countryFk',
attrs: {
url: 'countries',
fields: ['id', 'name'],
},
},
},
]); ]);
</script> </script>

View File

@ -28,18 +28,8 @@ const route = useRoute();
const router = useRouter(); const router = useRouter();
const state = useState(); const state = useState();
const { notify } = useNotify(); const { notify } = useNotify();
const thermographFilter = {
fields: ['thermographFk'],
where: {
travelFk: null,
},
order: 'thermographFk ASC',
};
const fetchTravelThermographsRef = ref(null);
const allowedContentTypes = ref(''); const allowedContentTypes = ref('');
const user = state.getUser(); const user = state.getUser();
const thermographsOptions = ref([]);
const dmsTypesOptions = ref([]); const dmsTypesOptions = ref([]);
const companiesOptions = ref([]); const companiesOptions = ref([]);
const warehousesOptions = ref([]); const warehousesOptions = ref([]);
@ -168,24 +158,15 @@ const updateThermograph = async () => {
}; };
const onThermographCreated = async (data) => { const onThermographCreated = async (data) => {
await fetchTravelThermographsRef.value.fetch(); thermographForm.thermographId = data.id;
thermographForm.thermographId = data.thermographId;
}; };
</script> </script>
<template> <template>
<FetchData <FetchData
url="DmsContainers/allowedContentTypes" url="DmsContainers/allowedContentTypes"
@on-fetch="(data) => (allowedContentTypes = data.join(', '))" @on-fetch="(data) => (allowedContentTypes = data.join(', '))"
auto-load auto-load
/> />
<FetchData
ref="fetchTravelThermographsRef"
url="TravelThermographs"
@on-fetch="(data) => (thermographsOptions = data)"
:filter="thermographFilter"
auto-load
/>
<FetchData <FetchData
url="DmsTypes" url="DmsTypes"
:filter="{ order: 'name' }" :filter="{ order: 'name' }"
@ -239,15 +220,20 @@ const onThermographCreated = async (data) => {
<VnSelectDialog <VnSelectDialog
:label="t('travel.thermographs.thermograph')" :label="t('travel.thermographs.thermograph')"
v-model="thermographForm.thermographId" v-model="thermographForm.thermographId"
:options="thermographsOptions" url="TravelThermographs"
option-value="thermographFk" option-value="thermographFk"
option-label="thermographFk" option-label="thermographFk"
:fields="['thermographFk']"
:where="{ travelFk: null }"
sort-by="thermographFk ASC"
:disable="viewAction === 'edit'" :disable="viewAction === 'edit'"
:tooltip="t('New thermograph')" :tooltip="t('New thermograph')"
> >
<template #form> <template #form>
<CreateThermographForm <CreateThermographForm
@on-data-saved="onThermographCreated($event, data)" @on-data-saved="
(data) => (thermographForm.thermographId = data.id)
"
/> />
</template> </template>
</VnSelectDialog> </VnSelectDialog>
@ -323,7 +309,6 @@ const onThermographCreated = async (data) => {
</QForm> </QForm>
</QPage> </QPage>
</template> </template>
<i18n> <i18n>
es: es:
Select files: Selecciona ficheros Select files: Selecciona ficheros

View File

@ -64,6 +64,15 @@ const agencyOptions = ref([]);
type="number" type="number"
min="0" min="0"
/> />
<VnInput
class="mw-10"
v-model="data.itemMaxLength"
:label="t('Max length m³')"
clearable
type="number"
min="0"
/>
</VnRow> </VnRow>
<VnRow> <VnRow>
@ -128,4 +137,5 @@ es:
Bonus: Bonificación Bonus: Bonificación
Inflation: Inflación Inflation: Inflación
Volumetric: Volumétrico Volumetric: Volumétrico
Max length : Medida máxima tumbado
</i18n> </i18n>