refs #6118 importSalixVariables #93
|
@ -122,11 +122,24 @@ watch(formUrl, async () => {
|
||||||
<QIcon name="warning" size="md" class="q-mr-md" />
|
<QIcon name="warning" size="md" class="q-mr-md" />
|
||||||
<span>{{ t('globals.changesToSave') }}</span>
|
<span>{{ t('globals.changesToSave') }}</span>
|
||||||
</QBanner>
|
</QBanner>
|
||||||
<QForm v-if="formData" @submit="save" @reset="reset" class="q-pa-md" id="formModel">
|
<div class="column items-center">
|
||||||
<QCard>
|
<QForm
|
||||||
<slot name="form" :data="formData" :validate="validate" :filter="filter" />
|
v-if="formData"
|
||||||
</QCard>
|
@submit="save"
|
||||||
</QForm>
|
@reset="reset"
|
||||||
|
class="q-pa-md"
|
||||||
|
id="formModel"
|
||||||
|
>
|
||||||
|
<QCard>
|
||||||
|
<slot
|
||||||
|
name="form"
|
||||||
|
:data="formData"
|
||||||
|
:validate="validate"
|
||||||
|
:filter="filter"
|
||||||
|
/>
|
||||||
|
</QCard>
|
||||||
|
</QForm>
|
||||||
pablone marked this conversation as resolved
Outdated
|
|||||||
|
</div>
|
||||||
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown()">
|
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown()">
|
||||||
<div v-if="$props.defaultActions">
|
<div v-if="$props.defaultActions">
|
||||||
<QBtnGroup push class="q-gutter-x-sm">
|
<QBtnGroup push class="q-gutter-x-sm">
|
||||||
|
|
|
@ -91,126 +91,119 @@ const statesFilter = {
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData url="ClaimStates" @on-fetch="setClaimStates" auto-load />
|
<FetchData url="ClaimStates" @on-fetch="setClaimStates" auto-load />
|
||||||
|
<FormModel
|
||||||
<div class="column items-center">
|
:url="`Claims/${route.params.id}`"
|
||||||
<FormModel
|
:url-update="`Claims/updateClaim/${route.params.id}`"
|
||||||
:url="`Claims/${route.params.id}`"
|
:filter="claimFilter"
|
||||||
:url-update="`Claims/updateClaim/${route.params.id}`"
|
model="claim"
|
||||||
:filter="claimFilter"
|
>
|
||||||
model="claim"
|
<template #form="{ data, validate, filter }">
|
||||||
>
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<template #form="{ data, validate, filter }">
|
<div class="col">
|
||||||
pablone marked this conversation as resolved
Outdated
alexm
commented
Si el fiques en KebabCase com esta quasar funciona?? Si el fiques en KebabCase com esta quasar funciona??
|
|||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<QInput
|
||||||
<div class="col">
|
v-model="data.client.name"
|
||||||
<QInput
|
:label="t('claim.basicData.customer')"
|
||||||
v-model="data.client.name"
|
disable
|
||||||
:label="t('claim.basicData.customer')"
|
/>
|
||||||
disable
|
</div>
|
||||||
/>
|
<div class="col">
|
||||||
</div>
|
<QInput
|
||||||
<div class="col">
|
v-model="data.created"
|
||||||
<QInput
|
mask="####-##-##"
|
||||||
v-model="data.created"
|
fill-mask="_"
|
||||||
mask="####-##-##"
|
autofocus
|
||||||
fill-mask="_"
|
>
|
||||||
autofocus
|
<template #append>
|
||||||
>
|
<QIcon name="event" class="cursor-pointer">
|
||||||
<template #append>
|
<QPopupProxy
|
||||||
<QIcon name="event" class="cursor-pointer">
|
cover
|
||||||
<QPopupProxy
|
transition-show="scale"
|
||||||
cover
|
transition-hide="scale"
|
||||||
transition-show="scale"
|
>
|
||||||
transition-hide="scale"
|
<QDate v-model="data.created" mask="YYYY-MM-DD">
|
||||||
>
|
<div class="row items-center justify-end">
|
||||||
<QDate v-model="data.created" mask="YYYY-MM-DD">
|
<QBtn
|
||||||
<div class="row items-center justify-end">
|
v-close-popup
|
||||||
<QBtn
|
label="Close"
|
||||||
v-close-popup
|
color="primary"
|
||||||
label="Close"
|
flat
|
||||||
color="primary"
|
/>
|
||||||
flat
|
</div>
|
||||||
/>
|
</QDate>
|
||||||
</div>
|
</QPopupProxy>
|
||||||
</QDate>
|
</QIcon>
|
||||||
</QPopupProxy>
|
</template>
|
||||||
</QIcon>
|
</QInput>
|
||||||
</template>
|
</div>
|
||||||
</QInput>
|
</VnRow>
|
||||||
</div>
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
</VnRow>
|
<div class="col">
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<QSelect
|
||||||
<div class="col">
|
v-model="data.workerFk"
|
||||||
<QSelect
|
:options="workers"
|
||||||
v-model="data.workerFk"
|
option-value="id"
|
||||||
:options="workers"
|
option-label="name"
|
||||||
option-value="id"
|
emit-value
|
||||||
option-label="name"
|
:label="t('claim.basicData.assignedTo')"
|
||||||
emit-value
|
map-options
|
||||||
:label="t('claim.basicData.assignedTo')"
|
use-input
|
||||||
map-options
|
@filter="(value, update) => filter(value, update, workerFilter)"
|
||||||
use-input
|
:rules="validate('claim.claimStateFk')"
|
||||||
@filter="
|
:input-debounce="0"
|
||||||
(value, update) => filter(value, update, workerFilter)
|
>
|
||||||
"
|
<template #before>
|
||||||
:rules="validate('claim.claimStateFk')"
|
<QAvatar color="orange">
|
||||||
:input-debounce="0"
|
<QImg
|
||||||
>
|
v-if="data.workerFk"
|
||||||
<template #before>
|
:src="`/api/Images/user/160x160/${data.workerFk}/download?access_token=${token}`"
|
||||||
<QAvatar color="orange">
|
spinner-color="white"
|
||||||
<QImg
|
/>
|
||||||
v-if="data.workerFk"
|
</QAvatar>
|
||||||
:src="`/api/Images/user/160x160/${data.workerFk}/download?access_token=${token}`"
|
</template>
|
||||||
spinner-color="white"
|
</QSelect>
|
||||||
/>
|
</div>
|
||||||
</QAvatar>
|
<div class="col">
|
||||||
</template>
|
<QSelect
|
||||||
</QSelect>
|
v-model="data.claimStateFk"
|
||||||
</div>
|
:options="claimStates"
|
||||||
<div class="col">
|
option-value="id"
|
||||||
<QSelect
|
option-label="description"
|
||||||
v-model="data.claimStateFk"
|
emit-value
|
||||||
:options="claimStates"
|
:label="t('claim.basicData.state')"
|
||||||
option-value="id"
|
map-options
|
||||||
option-label="description"
|
use-input
|
||||||
emit-value
|
@filter="(value, update) => filter(value, update, statesFilter)"
|
||||||
:label="t('claim.basicData.state')"
|
:rules="validate('claim.claimStateFk')"
|
||||||
map-options
|
:input-debounce="0"
|
||||||
use-input
|
>
|
||||||
@filter="
|
</QSelect>
|
||||||
(value, update) => filter(value, update, statesFilter)
|
</div>
|
||||||
"
|
</VnRow>
|
||||||
:rules="validate('claim.claimStateFk')"
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
:input-debounce="0"
|
<div class="col">
|
||||||
>
|
<QInput
|
||||||
</QSelect>
|
v-model.number="data.packages"
|
||||||
</div>
|
:label="t('claim.basicData.packages')"
|
||||||
</VnRow>
|
:rules="validate('claim.packages')"
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
type="number"
|
||||||
<div class="col">
|
/>
|
||||||
<QInput
|
</div>
|
||||||
v-model.number="data.packages"
|
<div class="col">
|
||||||
:label="t('claim.basicData.packages')"
|
<QInput
|
||||||
:rules="validate('claim.packages')"
|
v-model="data.rma"
|
||||||
type="number"
|
:label="t('claim.basicData.returnOfMaterial')"
|
||||||
/>
|
:rules="validate('claim.rma')"
|
||||||
</div>
|
/>
|
||||||
<div class="col">
|
</div>
|
||||||
<QInput
|
</VnRow>
|
||||||
v-model="data.rma"
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
:label="t('claim.basicData.returnOfMaterial')"
|
<div class="col">
|
||||||
:rules="validate('claim.rma')"
|
<QCheckbox
|
||||||
/>
|
v-model="data.hasToPickUp"
|
||||||
</div>
|
:label="t('claim.basicData.picked')"
|
||||||
</VnRow>
|
/>
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
</div>
|
||||||
<div class="col">
|
</VnRow>
|
||||||
<QCheckbox
|
</template>
|
||||||
v-model="data.hasToPickUp"
|
</FormModel>
|
||||||
:label="t('claim.basicData.picked')"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</VnRow>
|
|
||||||
</template>
|
|
||||||
</FormModel>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -59,112 +59,109 @@ const filterOptions = {
|
||||||
@on-fetch="(data) => (businessTypes = data)"
|
@on-fetch="(data) => (businessTypes = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<div class="column items-center">
|
|
||||||
<FormModel :url="`Clients/${route.params.id}`" model="customer">
|
<FormModel :url="`Clients/${route.params.id}`" model="customer">
|
||||||
<template #form="{ data, validate, filter }">
|
<template #form="{ data, validate, filter }">
|
||||||
<vnRow class="row q-gutter-md q-mb-md">
|
<vnRow class="row q-gutter-md q-mb-md">
|
||||||
pablone marked this conversation as resolved
Outdated
alexm
commented
Aci Aci
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<QInput
|
<QInput
|
||||||
v-model="data.socialName"
|
v-model="data.socialName"
|
||||||
:label="t('customer.basicData.socialName')"
|
:label="t('customer.basicData.socialName')"
|
||||||
:rules="validate('client.socialName')"
|
:rules="validate('client.socialName')"
|
||||||
autofocus
|
autofocus
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QSelect
|
<QSelect
|
||||||
v-model="data.businessTypeFk"
|
v-model="data.businessTypeFk"
|
||||||
:options="businessTypes"
|
:options="businessTypes"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
option-label="description"
|
option-label="description"
|
||||||
emit-value
|
emit-value
|
||||||
:label="t('customer.basicData.businessType')"
|
:label="t('customer.basicData.businessType')"
|
||||||
map-options
|
map-options
|
||||||
:rules="validate('client.businessTypeFk')"
|
:rules="validate('client.businessTypeFk')"
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</vnRow>
|
</vnRow>
|
||||||
pablone marked this conversation as resolved
Outdated
alexm
commented
Aci Aci
|
|||||||
<vnRow class="row q-gutter-md q-mb-md">
|
<vnRow class="row q-gutter-md q-mb-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QInput
|
<QInput
|
||||||
v-model="data.contact"
|
v-model="data.contact"
|
||||||
:label="t('customer.basicData.contact')"
|
:label="t('customer.basicData.contact')"
|
||||||
:rules="validate('client.contact')"
|
:rules="validate('client.contact')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QInput
|
<QInput
|
||||||
v-model="data.email"
|
v-model="data.email"
|
||||||
type="email"
|
type="email"
|
||||||
:label="t('customer.basicData.email')"
|
:label="t('customer.basicData.email')"
|
||||||
:rules="validate('client.email')"
|
:rules="validate('client.email')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</vnRow>
|
</vnRow>
|
||||||
<vnRow class="row q-gutter-md q-mb-md">
|
<vnRow class="row q-gutter-md q-mb-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QInput
|
<QInput
|
||||||
v-model="data.phone"
|
v-model="data.phone"
|
||||||
:label="t('customer.basicData.phone')"
|
:label="t('customer.basicData.phone')"
|
||||||
:rules="validate('client.phone')"
|
:rules="validate('client.phone')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QInput
|
<QInput
|
||||||
v-model="data.mobile"
|
v-model="data.mobile"
|
||||||
:label="t('customer.basicData.mobile')"
|
:label="t('customer.basicData.mobile')"
|
||||||
:rules="validate('client.mobile')"
|
:rules="validate('client.mobile')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</vnRow>
|
</vnRow>
|
||||||
<vnRow class="row q-gutter-md q-mb-md">
|
<vnRow class="row q-gutter-md q-mb-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QSelect
|
<QSelect
|
||||||
v-model="data.salesPersonFk"
|
v-model="data.salesPersonFk"
|
||||||
:options="workers"
|
:options="workers"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
emit-value
|
emit-value
|
||||||
:label="t('customer.basicData.salesPerson')"
|
:label="t('customer.basicData.salesPerson')"
|
||||||
map-options
|
map-options
|
||||||
use-input
|
use-input
|
||||||
@filter="
|
@filter="(value, update) => filter(value, update, filterOptions)"
|
||||||
(value, update) => filter(value, update, filterOptions)
|
:rules="validate('client.salesPersonFk')"
|
||||||
"
|
:input-debounce="0"
|
||||||
:rules="validate('client.salesPersonFk')"
|
>
|
||||||
:input-debounce="0"
|
<template #prepend>
|
||||||
>
|
<QAvatar color="orange">
|
||||||
<template #prepend>
|
<QImg
|
||||||
<QAvatar color="orange">
|
v-if="data.salesPersonFk"
|
||||||
<QImg
|
:src="`/api/Images/user/160x160/${data.salesPersonFk}/download?access_token=${token}`"
|
||||||
v-if="data.salesPersonFk"
|
spinner-color="white"
|
||||||
:src="`/api/Images/user/160x160/${data.salesPersonFk}/download?access_token=${token}`"
|
/>
|
||||||
spinner-color="white"
|
</QAvatar>
|
||||||
/>
|
</template>
|
||||||
</QAvatar>
|
</QSelect>
|
||||||
</template>
|
</div>
|
||||||
</QSelect>
|
<div class="col">
|
||||||
</div>
|
<QSelect
|
||||||
<div class="col">
|
v-model="data.contactChannelFk"
|
||||||
<QSelect
|
:options="contactChannels"
|
||||||
v-model="data.contactChannelFk"
|
option-value="id"
|
||||||
:options="contactChannels"
|
option-label="name"
|
||||||
option-value="id"
|
emit-value
|
||||||
option-label="name"
|
:label="t('customer.basicData.contactChannel')"
|
||||||
emit-value
|
map-options
|
||||||
:label="t('customer.basicData.contactChannel')"
|
:rules="validate('client.contactChannelFk')"
|
||||||
map-options
|
:input-debounce="0"
|
||||||
:rules="validate('client.contactChannelFk')"
|
/>
|
||||||
:input-debounce="0"
|
</div>
|
||||||
/>
|
</vnRow>
|
||||||
</div>
|
</template>
|
||||||
</vnRow>
|
</FormModel>
|
||||||
</template>
|
|
||||||
</FormModel>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue
Declarar como scoped y usar un id