perf: refs #7346 #7346 Imrpove interface dialog
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-11-14 11:51:06 +01:00
parent d284cec31a
commit aa05b4b0cb
1 changed files with 24 additions and 48 deletions

View File

@ -215,7 +215,7 @@ watchEffect(selectedRows);
}" }"
> >
<template #column-clientFk="{ row }"> <template #column-clientFk="{ row }">
<span class="link" @click.stop v-> <span class="link" @click.stop>
{{ row.clientSocialName }} {{ row.clientSocialName }}
<CustomerDescriptorProxy :id="row.clientFk" /> <CustomerDescriptorProxy :id="row.clientFk" />
</span> </span>
@ -231,54 +231,15 @@ watchEffect(selectedRows);
:label="t('globals.ticket')" :label="t('globals.ticket')"
class="q-my-none q-mr-md" class="q-my-none q-mr-md"
/> />
<VnInput <VnInput
:disable="selectedOption !== 'ticket'" v-if="selectedOption === 'ticket'"
v-model="data.ticketFk" v-model="data.ticketFk"
:label="t('globals.ticket')" :label="t('globals.ticket')"
style="flex: 1" style="flex: 1"
/> />
</VnRow>
<VnRow fixed> <div class="row q-col-gutter-xs q-ml-none" v-else>
<VnRadio
v-model="selectedOption"
val="cliente"
:label="t('globals.client')"
class="q-my-none q-mr-md"
/>
<VnSelect
:disable="selectedOption !== 'cliente'"
v-model="data.clientFk"
:label="t('globals.client')"
url="Clients"
:options="customerOptions"
option-label="name"
option-value="id"
@update:model-value="fetchClientAddress"
style="flex: 1"
>
<template #option="scope">
<QItem
v-bind="scope.itemProps"
@click="selectedClient(scope.opt)"
>
<QItemSection>
<QItemLabel>
#{{ scope.opt?.id }} -
{{ scope.opt?.name }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</VnRow>
<VnRow fixed>
<VnRadio
v-model="selectedOption"
val="consignatario"
:label="t('ticket.summary.consignee')"
class="q-my-none q-mr-md"
/>
<div class="row q-col-gutter-xs q-ml-none">
<div class="col"> <div class="col">
<VnSelect <VnSelect
v-model="data.clientFk" v-model="data.clientFk"
@ -288,7 +249,6 @@ watchEffect(selectedRows);
option-label="name" option-label="name"
option-value="id" option-value="id"
@update:model-value="fetchClientAddress" @update:model-value="fetchClientAddress"
:disable="selectedOption !== 'consignatario'"
> >
<template #option="scope"> <template #option="scope">
<QItem <QItem
@ -312,9 +272,9 @@ watchEffect(selectedRows);
:options="addressOptions" :options="addressOptions"
option-label="nickname" option-label="nickname"
option-value="id" option-value="id"
:disable=" v-if="
!data.clientFk || data.clientFk &&
selectedOption !== 'consignatario' selectedOption === 'consignatario'
" "
> >
<template #option="scope"> <template #option="scope">
@ -363,6 +323,22 @@ watchEffect(selectedRows);
</div> </div>
</div> </div>
</VnRow> </VnRow>
<VnRow fixed>
<VnRadio
v-model="selectedOption"
val="cliente"
:label="t('globals.client')"
class="q-my-none q-mr-md"
/>
</VnRow>
<VnRow fixed>
<VnRadio
v-model="selectedOption"
val="consignatario"
:label="t('ticket.summary.consignee')"
class="q-my-none q-mr-md"
/>
</VnRow>
</div> </div>
</div> </div>
<div class="full-width"> <div class="full-width">