8282-testToMaster #1057
|
@ -2,5 +2,12 @@
|
||||||
const model = defineModel({ type: Boolean, required: true });
|
const model = defineModel({ type: Boolean, required: true });
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QRadio v-model="model" v-bind="$attrs" dense :dark="true" class="q-mr-sm" />
|
<QRadio
|
||||||
|
v-model="model"
|
||||||
|
v-bind="$attrs"
|
||||||
|
dense
|
||||||
|
:dark="true"
|
||||||
|
class="q-mr-sm"
|
||||||
|
size="xs"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
<script setup>
|
|
||||||
defineProps({ wrap: { type: Boolean, default: false } });
|
|
||||||
</script>
|
|
||||||
<template>
|
<template>
|
||||||
<div class="vn-row q-gutter-md q-mb-md">
|
<div class="vn-row q-gutter-md">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -21,6 +18,9 @@ defineProps({ wrap: { type: Boolean, default: false } });
|
||||||
&:not(.wrap) {
|
&:not(.wrap) {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
&[fixed] {
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -15,6 +15,9 @@ import { QBtn } from 'quasar';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import InvoiceOutFilter from './InvoiceOutFilter.vue';
|
import InvoiceOutFilter from './InvoiceOutFilter.vue';
|
||||||
|
import VnRow from 'src/components/ui/VnRow.vue';
|
||||||
|
import VnRadio from 'src/components/common/VnRadio.vue';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -39,13 +42,9 @@ const columns = computed(() => [
|
||||||
align: 'center',
|
align: 'center',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
label: t('invoiceOutList.tableVisibleColumns.id'),
|
label: t('invoiceOutList.tableVisibleColumns.id'),
|
||||||
chip: {
|
chip: { condition: () => true },
|
||||||
condition: () => true,
|
|
||||||
},
|
|
||||||
isId: true,
|
isId: true,
|
||||||
columnFilter: {
|
columnFilter: { name: 'search' },
|
||||||
name: 'search',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -53,14 +52,8 @@ const columns = computed(() => [
|
||||||
label: t('invoiceOutList.tableVisibleColumns.ref'),
|
label: t('invoiceOutList.tableVisibleColumns.ref'),
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: { url: MODEL, optionLabel: 'ref', optionValue: 'id' },
|
||||||
url: MODEL,
|
columnField: { component: null },
|
||||||
optionLabel: 'ref',
|
|
||||||
optionValue: 'id',
|
|
||||||
},
|
|
||||||
columnField: {
|
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -68,9 +61,7 @@ const columns = computed(() => [
|
||||||
label: t('invoiceOutList.tableVisibleColumns.issued'),
|
label: t('invoiceOutList.tableVisibleColumns.issued'),
|
||||||
component: 'date',
|
component: 'date',
|
||||||
format: (row) => toDate(row.issued),
|
format: (row) => toDate(row.issued),
|
||||||
columnField: {
|
columnField: { component: null },
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -78,13 +69,8 @@ const columns = computed(() => [
|
||||||
label: t('invoiceOutModule.customer'),
|
label: t('invoiceOutModule.customer'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: { url: 'Clients', fields: ['id', 'name'] },
|
||||||
url: 'Clients',
|
columnField: { component: null },
|
||||||
fields: ['id', 'name'],
|
|
||||||
},
|
|
||||||
columnField: {
|
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -92,14 +78,8 @@ const columns = computed(() => [
|
||||||
label: t('invoiceOutModule.company'),
|
label: t('invoiceOutModule.company'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: { url: 'Companies', optionLabel: 'code', optionValue: 'id' },
|
||||||
url: 'Companies',
|
columnField: { component: null },
|
||||||
optionLabel: 'code',
|
|
||||||
optionValue: 'id',
|
|
||||||
},
|
|
||||||
columnField: {
|
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -113,9 +93,7 @@ const columns = computed(() => [
|
||||||
name: 'created',
|
name: 'created',
|
||||||
label: t('invoiceOutList.tableVisibleColumns.created'),
|
label: t('invoiceOutList.tableVisibleColumns.created'),
|
||||||
component: 'date',
|
component: 'date',
|
||||||
columnField: {
|
columnField: { component: null },
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
format: (row) => toDate(row.created),
|
format: (row) => toDate(row.created),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -123,9 +101,7 @@ const columns = computed(() => [
|
||||||
name: 'dued',
|
name: 'dued',
|
||||||
label: t('invoiceOutList.tableVisibleColumns.dueDate'),
|
label: t('invoiceOutList.tableVisibleColumns.dueDate'),
|
||||||
component: 'date',
|
component: 'date',
|
||||||
columnField: {
|
columnField: { component: null },
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
format: (row) => toDate(row.dued),
|
format: (row) => toDate(row.dued),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -216,9 +192,7 @@ watchEffect(selectedRows);
|
||||||
urlCreate: 'InvoiceOuts/createManualInvoice',
|
urlCreate: 'InvoiceOuts/createManualInvoice',
|
||||||
title: t('createManualInvoice'),
|
title: t('createManualInvoice'),
|
||||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||||
formInitialData: {
|
formInitialData: { active: true },
|
||||||
active: true,
|
|
||||||
},
|
|
||||||
}"
|
}"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
v-model:selected="selectedRows"
|
v-model:selected="selectedRows"
|
||||||
|
@ -232,92 +206,84 @@ watchEffect(selectedRows);
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<div class="row q-col-gutter-md">
|
<div class="row q-col-gutter-xs">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="q-gutter-sm q-col-gutter-xs">
|
<div class="q-col-gutter-xs">
|
||||||
<div class="row q-m-none">
|
<VnRow fixed>
|
||||||
<div class="col-auto">
|
<VnRadio
|
||||||
<QRadio
|
v-model="selectedOption"
|
||||||
v-model="selectedOption"
|
val="ticket"
|
||||||
val="ticket"
|
label="Ticket"
|
||||||
label="Ticket"
|
class="q-my-none q-mr-md"
|
||||||
class="q-my-none q-mr-md"
|
/>
|
||||||
/>
|
<VnInput
|
||||||
</div>
|
:disable="selectedOption !== 'ticket'"
|
||||||
<div class="col">
|
v-model="data.ticketFk"
|
||||||
<QInput
|
label="Ticket ID"
|
||||||
v-if="selectedOption === 'ticket'"
|
style="flex: 1"
|
||||||
v-model="data.ticketFk"
|
/>
|
||||||
label="Ticket ID"
|
</VnRow>
|
||||||
/>
|
<VnRow fixed>
|
||||||
</div>
|
<VnRadio
|
||||||
</div>
|
v-model="selectedOption"
|
||||||
|
val="cliente"
|
||||||
<div class="row m-xs">
|
label="Cliente"
|
||||||
<div class="col-auto">
|
class="q-my-none q-mr-md"
|
||||||
<QRadio
|
/>
|
||||||
v-model="selectedOption"
|
<VnSelect
|
||||||
val="cliente"
|
:disable="selectedOption !== 'cliente'"
|
||||||
label="Cliente"
|
v-model="data.clientFk"
|
||||||
class="q-my-none q-mr-md"
|
label="Cliente"
|
||||||
/>
|
url="Clients"
|
||||||
</div>
|
:options="customerOptions"
|
||||||
<div class="col">
|
option-label="name"
|
||||||
<VnSelect
|
option-value="id"
|
||||||
v-if="selectedOption === 'cliente'"
|
@update:model-value="fetchClientAddress"
|
||||||
v-model="data.clientFk"
|
style="flex: 1"
|
||||||
label="Cliente"
|
/>
|
||||||
url="Clients"
|
</VnRow>
|
||||||
:options="customerOptions"
|
<VnRow fixed>
|
||||||
option-label="name"
|
<VnRadio
|
||||||
option-value="id"
|
v-model="selectedOption"
|
||||||
@update:model-value="fetchClientAddress"
|
val="consignatario"
|
||||||
/>
|
label="Consignatario"
|
||||||
</div>
|
class="q-my-none q-mr-md"
|
||||||
</div>
|
/>
|
||||||
|
<div
|
||||||
<div class="row m-xs">
|
:disable="selectedOption !== 'consignatario'"
|
||||||
<div class="col-auto">
|
class="row q-col-gutter-xs q-ml-none"
|
||||||
<QRadio
|
>
|
||||||
v-model="selectedOption"
|
<div class="col">
|
||||||
val="consignatario"
|
<VnSelect
|
||||||
label="Consignatario"
|
v-model="data.clientFk"
|
||||||
class="q-my-none q-mr-md"
|
label="Cliente"
|
||||||
/>
|
url="Clients"
|
||||||
</div>
|
:options="customerOptions"
|
||||||
<div class="col">
|
option-label="name"
|
||||||
<div
|
option-value="id"
|
||||||
v-if="selectedOption === 'consignatario'"
|
@update:model-value="fetchClientAddress"
|
||||||
class="row q-col-gutter-md"
|
:disable="selectedOption !== 'consignatario'"
|
||||||
>
|
/>
|
||||||
<div class="col">
|
</div>
|
||||||
<VnSelect
|
<div class="col">
|
||||||
v-model="data.clientFk"
|
<VnSelect
|
||||||
label="Cliente"
|
v-model="data.addressFk"
|
||||||
url="Clients"
|
label="Consignatario"
|
||||||
:options="customerOptions"
|
:options="addressOptions"
|
||||||
option-label="name"
|
option-label="nickname"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
@update:model-value="fetchClientAddress"
|
:disable="
|
||||||
/>
|
!data.clientFk ||
|
||||||
</div>
|
selectedOption !== 'consignatario'
|
||||||
<div class="col">
|
"
|
||||||
<VnSelect
|
/>
|
||||||
v-model="data.addressFk"
|
|
||||||
label="Consignatario"
|
|
||||||
:options="addressOptions"
|
|
||||||
option-label="nickname"
|
|
||||||
option-value="id"
|
|
||||||
:disable="!data.clientFk"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</VnRow>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-gutter-md">
|
<div class="full-width">
|
||||||
<div class="row q-gutter-md">
|
<VnRow class="row q-col-gutter-xs">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="InvoiceOutSerials"
|
url="InvoiceOutSerials"
|
||||||
v-model="data.serial"
|
v-model="data.serial"
|
||||||
|
@ -332,8 +298,8 @@ watchEffect(selectedRows);
|
||||||
:label="t('invoiceOutList.tableVisibleColumns.dueDate')"
|
:label="t('invoiceOutList.tableVisibleColumns.dueDate')"
|
||||||
v-model="data.maxShipped"
|
v-model="data.maxShipped"
|
||||||
/>
|
/>
|
||||||
</div>
|
</VnRow>
|
||||||
<div class="row q-gutter-md">
|
<VnRow class="row q-col-gutter-xs">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="TaxAreas"
|
url="TaxAreas"
|
||||||
v-model="data.taxArea"
|
v-model="data.taxArea"
|
||||||
|
@ -342,31 +308,27 @@ watchEffect(selectedRows);
|
||||||
option-label="code"
|
option-label="code"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
/>
|
/>
|
||||||
<QInput
|
<VnInput
|
||||||
v-model="data.reference"
|
v-model="data.reference"
|
||||||
:label="t('invoiceOutList.tableVisibleColumns.ref')"
|
:label="t('invoiceOutList.tableVisibleColumns.ref')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</VnRow>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<style lang="scss" scoped>
|
||||||
en:
|
#formModel .vn-row {
|
||||||
searchInvoice: Search issued invoice
|
min-height: 45px;
|
||||||
fileDenied: Browser denied file download...
|
}
|
||||||
fileAllowed: Successful download of CSV file
|
#formModel .vn-row .q-radio {
|
||||||
youCanSearchByInvoiceReference: You can search by invoice reference
|
align-self: flex-end;
|
||||||
createInvoice: Make invoice
|
flex: 0.3;
|
||||||
createManualInvoice: Create manual invoice
|
}
|
||||||
|
#formModel .vn-row > .q-input,
|
||||||
es:
|
#formModel .vn-row > .q-select {
|
||||||
searchInvoice: Buscar factura emitida
|
flex: 0.75;
|
||||||
fileDenied: El navegador denegó la descarga de archivos...
|
}
|
||||||
fileAllowed: Descarga exitosa de archivo CSV
|
</style>
|
||||||
youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura
|
|
||||||
createInvoice: Crear factura
|
|
||||||
createManualInvoice: Crear factura manual
|
|
||||||
</i18n>
|
|
||||||
|
|
Loading…
Reference in New Issue