WIP
This commit is contained in:
parent
f59c2409f1
commit
5312a4e43a
|
@ -67,6 +67,14 @@ body.body--dark {
|
||||||
max-width: 60em;
|
max-width: 60em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-vn-primary-row {
|
||||||
|
background-color: var(--vn-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-vn-secondary-row {
|
||||||
|
background-color: var(--vn-light-gray);
|
||||||
|
}
|
||||||
|
|
||||||
/* Estilo para el asterisco en campos requeridos */
|
/* Estilo para el asterisco en campos requeridos */
|
||||||
.q-field.required .q-field__label:after {
|
.q-field.required .q-field__label:after {
|
||||||
content: ' *';
|
content: ' *';
|
||||||
|
|
|
@ -51,57 +51,55 @@ const rows = computed(() => arrayData.store.data || []);
|
||||||
const tableColumnComponents = {
|
const tableColumnComponents = {
|
||||||
id: {
|
id: {
|
||||||
component: QBtn,
|
component: QBtn,
|
||||||
attrs: () => ({ flat: true, color: 'blue', class: 'col-content' }),
|
attrs: { flat: true, color: 'primary' },
|
||||||
},
|
},
|
||||||
cargoSupplierNickname: {
|
cargoSupplierNickname: {
|
||||||
component: QBtn,
|
component: QBtn,
|
||||||
attrs: () => ({ flat: true, color: 'blue', class: 'col-content' }),
|
attrs: { flat: true, color: 'primary', dense: true },
|
||||||
},
|
},
|
||||||
agencyModeName: {
|
agencyModeName: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
attrs: () => ({ class: 'col-content' }),
|
attrs: {},
|
||||||
},
|
},
|
||||||
invoiceAmount: {
|
invoiceAmount: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
attrs: () => ({
|
attrs: {},
|
||||||
class: 'col-content',
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
ref: {
|
ref: {
|
||||||
component: QField,
|
component: QField,
|
||||||
attrs: () => ({ readonly: true, dense: true }),
|
attrs: { readonly: true, dense: true, class: 'cursor-pointer' },
|
||||||
},
|
},
|
||||||
stickers: {
|
stickers: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
attrs: () => ({ class: 'col-content' }),
|
attrs: {},
|
||||||
},
|
},
|
||||||
kg: {
|
kg: {
|
||||||
component: 'span',
|
component: QField,
|
||||||
attrs: () => ({ class: 'col-content' }),
|
attrs: { readonly: true, dense: true, class: 'cursor-pointer' },
|
||||||
},
|
},
|
||||||
loadedKg: {
|
loadedKg: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
attrs: () => ({ class: 'col-content' }),
|
attrs: {},
|
||||||
},
|
},
|
||||||
volumeKg: {
|
volumeKg: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
attrs: () => ({ class: 'col-content' }),
|
attrs: {},
|
||||||
},
|
},
|
||||||
warehouseOutName: {
|
warehouseOutName: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
attrs: () => ({ class: 'col-content' }),
|
attrs: {},
|
||||||
},
|
},
|
||||||
shipped: {
|
shipped: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
attrs: () => ({ class: 'col-content' }),
|
attrs: {},
|
||||||
},
|
},
|
||||||
warehouseInName: {
|
warehouseInName: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
attrs: () => ({ class: 'col-content' }),
|
attrs: {},
|
||||||
},
|
},
|
||||||
landed: {
|
landed: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
attrs: () => ({ class: 'col-content' }),
|
attrs: {},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -110,7 +108,7 @@ const columns = computed(() => [
|
||||||
label: 'id',
|
label: 'id',
|
||||||
field: 'id',
|
field: 'id',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
align: 'left',
|
align: 'center',
|
||||||
showValue: true,
|
showValue: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -161,7 +159,7 @@ const columns = computed(() => [
|
||||||
field: 'kg',
|
field: 'kg',
|
||||||
name: 'kg',
|
name: 'kg',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
showValue: true,
|
showValue: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('physicKg'),
|
label: t('physicKg'),
|
||||||
|
@ -237,7 +235,7 @@ const navigateToTravelId = (id) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const stopEventPropagation = (event, col) => {
|
const stopEventPropagation = (event, col) => {
|
||||||
if (!['ref', 'id', 'cargoSupplierNickname'].includes(col.name)) return;
|
if (!['ref', 'id', 'cargoSupplierNickname', 'kg'].includes(col.name)) return;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
};
|
};
|
||||||
|
@ -290,13 +288,13 @@ onMounted(async () => {
|
||||||
hide-bottom
|
hide-bottom
|
||||||
row-key="clientId"
|
row-key="clientId"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
:pagination="{ rowsPerPage: 0 }"
|
||||||
class="full-width q-mt-md"
|
class="full-width"
|
||||||
>
|
>
|
||||||
<template #body="props">
|
<template #body="props">
|
||||||
<QTr
|
<QTr
|
||||||
:props="props"
|
:props="props"
|
||||||
@click="navigateToTravelId(props.row.id)"
|
@click="navigateToTravelId(props.row.id)"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer bg-vn-primary-row"
|
||||||
>
|
>
|
||||||
<QTd
|
<QTd
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
@ -306,8 +304,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<component
|
<component
|
||||||
:is="tableColumnComponents[col.name].component"
|
:is="tableColumnComponents[col.name].component"
|
||||||
class="col-content"
|
v-bind="tableColumnComponents[col.name].attrs"
|
||||||
v-bind="tableColumnComponents[col.name].attrs(props)"
|
|
||||||
>
|
>
|
||||||
<!-- Editable 'ref' and 'kg' QField slot -->
|
<!-- Editable 'ref' and 'kg' QField slot -->
|
||||||
<template
|
<template
|
||||||
|
@ -361,36 +358,32 @@ onMounted(async () => {
|
||||||
v-for="entry in props.row.entries"
|
v-for="entry in props.row.entries"
|
||||||
:key="entry.id"
|
:key="entry.id"
|
||||||
:props="props"
|
:props="props"
|
||||||
class="secondary-row"
|
class="bg-vn-secondary-row"
|
||||||
>
|
>
|
||||||
<QTd>
|
<QTd class="row justify-center">
|
||||||
<QBtn flat color="blue" class="col-content">{{ entry.id }} </QBtn>
|
<QBtn flat color="primary">{{ entry.id }} </QBtn>
|
||||||
<EntryDescriptorProxy :id="entry.id" />
|
<EntryDescriptorProxy :id="entry.id" />
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd
|
<QTd>
|
||||||
><QBtn flat color="blue" class="col-content">{{
|
<QBtn flat color="primary" dense>{{ entry.supplierName }}</QBtn>
|
||||||
entry.supplierName
|
|
||||||
}}</QBtn>
|
|
||||||
<SupplierDescriptorProxy :id="entry.supplierFk" />
|
<SupplierDescriptorProxy :id="entry.supplierFk" />
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd></QTd>
|
<QTd></QTd>
|
||||||
<QTd
|
<QTd
|
||||||
><span class="col-content">{{
|
><span>{{ toCurrency(entry.invoiceAmount) }}</span></QTd
|
||||||
toCurrency(entry.invoiceAmount)
|
|
||||||
}}</span></QTd
|
|
||||||
>
|
>
|
||||||
<QTd
|
<QTd
|
||||||
><span class="col-content">{{ entry.reference }}</span></QTd
|
><span>{{ entry.reference }}</span></QTd
|
||||||
>
|
>
|
||||||
<QTd
|
<QTd
|
||||||
><span class="col-content">{{ entry.stickers }}</span></QTd
|
><span>{{ entry.stickers }}</span></QTd
|
||||||
>
|
>
|
||||||
<QTd></QTd>
|
<QTd></QTd>
|
||||||
<QTd
|
<QTd
|
||||||
><span class="col-content">{{ entry.loadedkg }}</span></QTd
|
><span>{{ entry.loadedkg }}</span></QTd
|
||||||
>
|
>
|
||||||
<QTd
|
<QTd
|
||||||
><span class="col-content">{{ entry.volumeKg }}</span></QTd
|
><span>{{ entry.volumeKg }}</span></QTd
|
||||||
>
|
>
|
||||||
<QTd></QTd>
|
<QTd></QTd>
|
||||||
<QTd></QTd>
|
<QTd></QTd>
|
||||||
|
@ -402,17 +395,6 @@ onMounted(async () => {
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.col-content {
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.secondary-row {
|
|
||||||
background-color: var(--vn-gray);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
searchExtraCommunity: Search for extra community shipping
|
searchExtraCommunity: Search for extra community shipping
|
||||||
|
|
Loading…
Reference in New Issue