|
@@ -1,33 +1,34 @@
|
|
<template lang="pug">
|
|
<template lang="pug">
|
|
- .customer-form
|
|
|
|
|
|
+ .customer-form(:class="'customer-form-' + type")
|
|
.form-header(v-if='!!title')
|
|
.form-header(v-if='!!title')
|
|
h2 {{ title }}
|
|
h2 {{ title }}
|
|
hr
|
|
hr
|
|
- form.form-display(:style='{ width, height }')
|
|
|
|
|
|
+ form.form-display(:class="'form-display-' + type")
|
|
.form-separator
|
|
.form-separator
|
|
h3 Detalles Generales
|
|
h3 Detalles Generales
|
|
hr
|
|
hr
|
|
- .form-item
|
|
|
|
- label.form-label Nombre
|
|
|
|
- input.form-input(:value="customer.name || ''" readonly)
|
|
|
|
- .form-item
|
|
|
|
- label.form-label R.U.C/C.I.Nº
|
|
|
|
- input.form-input(:value="customer.ruc || ''" readonly)
|
|
|
|
- .form-item
|
|
|
|
- label.form-label Celular
|
|
|
|
- input.form-input(:value="customer.phone || ''" readonly)
|
|
|
|
- .form-item
|
|
|
|
- label.form-label Teléfono
|
|
|
|
- input.form-input(:value="customer.mobile || ''" readonly)
|
|
|
|
- .form-item
|
|
|
|
- label.form-label Email
|
|
|
|
- input.form-input(:value="customer.email || ''" readonly)
|
|
|
|
- .form-separator
|
|
|
|
- h3 Créditos
|
|
|
|
- hr
|
|
|
|
- .form-item
|
|
|
|
- label.form-label Créditos
|
|
|
|
- input.form-input(:value="customer.credit || 0" readonly)
|
|
|
|
|
|
+ .form-item(:class="'form-item-' + type")
|
|
|
|
+ label.form-label(:class="'form-label-' + type") Nombre
|
|
|
|
+ input.form-input(:class="'form-input-' + type" :value="customer.name || ''" readonly)
|
|
|
|
+ .form-item(:class="'form-item-' + type")
|
|
|
|
+ label.form-label(:class="'form-label-' + type") R.U.C/C.I.Nº
|
|
|
|
+ input.form-input(:class="'form-input-' + type" :value="customer.ruc || ''" readonly)
|
|
|
|
+ .form-item(:class="'form-item-' + type")
|
|
|
|
+ label.form-label(:class="'form-label-' + type") Celular
|
|
|
|
+ input.form-input(:class="'form-input-' + type" :value="customer.phone || ''" readonly)
|
|
|
|
+ div(v-if="mode === 'details'")
|
|
|
|
+ .form-item(:class="'form-item-' + type")
|
|
|
|
+ label.form-label(:class="'form-label-' + type") Teléfono
|
|
|
|
+ input.form-input(:class="'form-input-' + type" :value="customer.mobile || ''" readonly)
|
|
|
|
+ .form-item(:class="'form-item-' + type")
|
|
|
|
+ label.form-label(:class="'form-label-' + type") Email
|
|
|
|
+ input.form-input(:class="'form-input-' + type" :value="customer.email || ''" readonly)
|
|
|
|
+ .form-separator
|
|
|
|
+ h3 Créditos
|
|
|
|
+ hr
|
|
|
|
+ .form-item(:class="'form-item-' + type")
|
|
|
|
+ label.form-label(:class="'form-label-' + type") Créditos
|
|
|
|
+ input.form-input(:class="'form-input-' + type" :value="customer.credit || 0" readonly)
|
|
.form-actions(v-if="mode === 'form'")
|
|
.form-actions(v-if="mode === 'form'")
|
|
button.form-action(@click='onAccept') Aceptar
|
|
button.form-action(@click='onAccept') Aceptar
|
|
button.form-action(@click='onCancel') Cancelar
|
|
button.form-action(@click='onCancel') Cancelar
|
|
@@ -40,6 +41,10 @@
|
|
type: String,
|
|
type: String,
|
|
default: ''
|
|
default: ''
|
|
},
|
|
},
|
|
|
|
+ type: {
|
|
|
|
+ type: String,
|
|
|
|
+ default: 'medium'
|
|
|
|
+ },
|
|
customer: {
|
|
customer: {
|
|
type: Object,
|
|
type: Object,
|
|
default: {
|
|
default: {
|
|
@@ -78,6 +83,15 @@
|
|
<style lang="sass">
|
|
<style lang="sass">
|
|
@import '../../assets/variables'
|
|
@import '../../assets/variables'
|
|
.customer-form
|
|
.customer-form
|
|
|
|
+ &.customer-form-small
|
|
|
|
+ width: 320px
|
|
|
|
+ height: 100%
|
|
|
|
+ &.customer-form-medium
|
|
|
|
+ width: 600px
|
|
|
|
+ height: 100%
|
|
|
|
+ &.customer-form-big
|
|
|
|
+ width: 800px
|
|
|
|
+ height: 100%
|
|
.form-header
|
|
.form-header
|
|
h2
|
|
h2
|
|
font-size: 10pt
|
|
font-size: 10pt
|
|
@@ -87,6 +101,15 @@
|
|
margin: 0 15px
|
|
margin: 0 15px
|
|
.form-display
|
|
.form-display
|
|
padding: 15px
|
|
padding: 15px
|
|
|
|
+ &.form-display-small
|
|
|
|
+ width: 320px
|
|
|
|
+ height: 100%
|
|
|
|
+ &.form-display-medium
|
|
|
|
+ width: 600px
|
|
|
|
+ height: 100%
|
|
|
|
+ &.form-display-big
|
|
|
|
+ width: 800%
|
|
|
|
+ height: 100%
|
|
.form-separator
|
|
.form-separator
|
|
h3
|
|
h3
|
|
color: $app-separator-color
|
|
color: $app-separator-color
|
|
@@ -96,27 +119,35 @@
|
|
.form-item
|
|
.form-item
|
|
width: 100%
|
|
width: 100%
|
|
margin-bottom: 10px
|
|
margin-bottom: 10px
|
|
- @media (min-width='300px')
|
|
|
|
- height: 45px
|
|
|
|
- @media (max-width='300px')
|
|
|
|
|
|
+ &.form-item-small
|
|
height: 35px
|
|
height: 35px
|
|
|
|
+ &.form-item-medium
|
|
|
|
+ height: 45px
|
|
|
|
+ &.form-item-big
|
|
|
|
+ height: 55px
|
|
.form-label
|
|
.form-label
|
|
width: 30%
|
|
width: 30%
|
|
- @media (min-width='300px')
|
|
|
|
- height: 35px
|
|
|
|
- font-size: 14pt
|
|
|
|
- @media (max-width='300px')
|
|
|
|
|
|
+ &.form-label-small
|
|
height: 35px
|
|
height: 35px
|
|
font-size: 10pt
|
|
font-size: 10pt
|
|
|
|
+ &.form-label-medium
|
|
|
|
+ height: 45px
|
|
|
|
+ font-size: 18pt
|
|
|
|
+ &.form-label-big
|
|
|
|
+ height: 35px
|
|
|
|
+ font-size: 24pt
|
|
.form-input
|
|
.form-input
|
|
width: 70%
|
|
width: 70%
|
|
border-radius: 0
|
|
border-radius: 0
|
|
- @media (min-width='300px')
|
|
|
|
|
|
+ &.form-input-small
|
|
|
|
+ height: 35px
|
|
|
|
+ font-size: 10pt
|
|
|
|
+ &.form-input-medium
|
|
height: 45px
|
|
height: 45px
|
|
font-size: 18pt
|
|
font-size: 18pt
|
|
- @media (max-width='300px')
|
|
|
|
- height: 35px
|
|
|
|
- font-size: 12pt
|
|
|
|
|
|
+ &.form-input-big
|
|
|
|
+ height: 55px
|
|
|
|
+ font-size: 24pt
|
|
.form-actions
|
|
.form-actions
|
|
float: right
|
|
float: right
|
|
.form-action
|
|
.form-action
|