buscador de clientes
This commit is contained in:
parent
bb72b4c251
commit
8705324085
|
@ -17,7 +17,7 @@ function config($stateProvider, $urlRouterProvider) {
|
||||||
|
|
||||||
core.splitingRegister.registerGraph(deps);
|
core.splitingRegister.registerGraph(deps);
|
||||||
|
|
||||||
$urlRouterProvider.otherwise('/client');
|
$urlRouterProvider.otherwise('/clients');
|
||||||
|
|
||||||
for (var file in routes)
|
for (var file in routes)
|
||||||
routes[file].forEach(function (route) {
|
routes[file].forEach(function (route) {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<form action="#">
|
<form action="#">
|
||||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
|
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
|
||||||
<label class="mdl-button mdl-js-button mdl-button--icon" for="sample6">
|
<label class="mdl-button mdl-js-button mdl-button--icon" for="text-search">
|
||||||
<i class="material-icons">search</i>
|
<i class="material-icons">search</i>
|
||||||
</label>
|
</label>
|
||||||
<div class="mdl-textfield__expandable-holder">
|
<div class="mdl-textfield__expandable-holder">
|
||||||
<input class="mdl-textfield__input" type="text" id="sample6">
|
<input class="mdl-textfield__input" type="text" style="color:black;" id="text-search" bg-panel>
|
||||||
<label class="mdl-textfield__label" for="sample-expandable">*[text]*</label>
|
<label class="mdl-textfield__label" for="sample-expandable">*[text]*</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,41 +1,41 @@
|
||||||
<form ng-submit="$ctrl.submit()">
|
<form ng-submit="$ctrl.submit()">
|
||||||
<vn-vertical full-height pad-large style="box-sizing: border-box;">
|
<vn-vertical full-height pad-large style="box-sizing: border-box;">
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<h3 style="margin-top: 0;">Datos básicos</h3>
|
<h3 style="margin-top: 0;">Datos básicos</h3>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<vn-textfield label="Alias" name"alias" model="$ctrl.model.alias"></vn-textfield>
|
<vn-textfield label="Alias" name"alias" model="$ctrl.model.alias"></vn-textfield>
|
||||||
<vn-textfield label="NIF/CIF" name="fi" model="$ctrl.model.fi"></vn-textfield>
|
<vn-textfield label="NIF/CIF" name="fi" model="$ctrl.model.fi"></vn-textfield>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<vn-textfield label="Razón social" name"socialName" model="$ctrl.model.name"></vn-textfield>
|
<vn-textfield label="Razón social" name"socialName" model="$ctrl.model.name"></vn-textfield>
|
||||||
<vn-date-picker label="Fecha alta" name"dischargeDate" model="$ctrl.model.dischargeDate"></vn-date-picker>
|
<vn-date-picker label="Fecha alta" name"dischargeDate" model="$ctrl.model.dischargeDate"></vn-date-picker>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<vn-textfield label="Contacto" name="contact" model="$ctrl.model.contact"></vn-textfield>
|
<vn-textfield label="Contacto" name="contact" model="$ctrl.model.contact"></vn-textfield>
|
||||||
<vn-textfield label="Teléfono" name="telefono" model="$ctrl.model.phone"></vn-textfield>
|
<vn-textfield label="Teléfono" name="telefono" model="$ctrl.model.phone"></vn-textfield>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<vn-textfield label="Calidad" name="quality" model="$ctrl.model.quality"></vn-textfield>
|
<vn-textfield label="Calidad" name="quality" model="$ctrl.model.quality"></vn-textfield>
|
||||||
<vn-combo label="Comercial" name="salesPerson" model="$ctrl.model.salesPerson">
|
<vn-combo label="Comercial" name="salesPerson" model="$ctrl.model.salesPerson">
|
||||||
<option value="1">Comercial 1</option>
|
<option value="1">Comercial 1</option>
|
||||||
<option value="2">Comercial 2</option>
|
<option value="2">Comercial 2</option>
|
||||||
</vn-combo>
|
</vn-combo>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<vn-submit class="colored" text="Guardar"></vn-submit>
|
<vn-submit class="colored" text="Guardar"></vn-submit>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
</form>
|
</form>
|
|
@ -1,6 +1,8 @@
|
||||||
export {NAME as CLIENT_INDEX,
|
export {NAME as CLIENT_CLIENT,
|
||||||
COMPONENT as CLIENT_INDEX_COMPONENT} from './index/index';
|
COMPONENT as CLIENT_CLIENT_COMPONENT} from './client/client';
|
||||||
export {NAME as CLIENT_BASIC_DATA_INDEX,
|
export {NAME as CLIENT_BASIC_DATA_INDEX,
|
||||||
COMPONENT as CLIENT_BASIC_DATA_INDEX_COMPONENT} from './basic-data/index';
|
COMPONENT as CLIENT_BASIC_DATA_INDEX_COMPONENT} from './basic-data/index';
|
||||||
export {NAME as CLIENT_ADDRESSES,
|
export {NAME as CLIENT_ADDRESSES,
|
||||||
COMPONENT as CLIENT_ADDRESSES_COMPONENT} from './addresses/index';
|
COMPONENT as CLIENT_ADDRESSES_COMPONENT} from './addresses/index';
|
||||||
|
export {NAME as CLIENTS,
|
||||||
|
COMPONENT as CLIENTS_COMPONENT} from './index/index';
|
|
@ -0,0 +1,11 @@
|
||||||
|
<vn-vertical class="full-height">
|
||||||
|
<vn-topbar></vn-topbar>
|
||||||
|
<vn-horizontal class="full-height">
|
||||||
|
<vn-empty class="bg-content" style="width: 18em">
|
||||||
|
<vn-left-menu items="$ctrl.items" descriptor="$ctrl.descriptor"></vn-left-menu>
|
||||||
|
</vn-empty>
|
||||||
|
<vn-auto>
|
||||||
|
<vn-vertical ui-view></vn-vertical>
|
||||||
|
</vn-auto>
|
||||||
|
</vn-horizontal>
|
||||||
|
</vn-vertical>
|
|
@ -0,0 +1,24 @@
|
||||||
|
import template from './client.html';
|
||||||
|
import {module} from '../../module';
|
||||||
|
|
||||||
|
const _NAME = 'clientClient';
|
||||||
|
// export const NAME = module.getName(_NAME);
|
||||||
|
export const NAME = "vnClientClient";
|
||||||
|
export const COMPONENT = {
|
||||||
|
template: template,
|
||||||
|
controller: function() {
|
||||||
|
this.items = [
|
||||||
|
{text: "Datos básicos", image: "person", href: "#/client/basic-data"},
|
||||||
|
{text: "Datos facturación", image: "assignment", href: "#/client/invoicing-data"},
|
||||||
|
{text: "Acceso web", image: "language", href: "#/client/web-access"},
|
||||||
|
{text: "Consignatarios", image: "local_shipping", href: "#/client/addresses"},
|
||||||
|
{text: "Notas", image: "insert_drive_file", href: "#/client/notes"}
|
||||||
|
];
|
||||||
|
this.descriptor = [
|
||||||
|
{text: "Cliente 1231"},
|
||||||
|
{text: "Floristeria Lola"},
|
||||||
|
{text: "987 654 321"}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
module.component(NAME, COMPONENT);
|
|
@ -1,11 +1,42 @@
|
||||||
|
<form ng-submit="$ctrl.submit()">
|
||||||
<vn-vertical class="full-height">
|
<vn-vertical class="full-height">
|
||||||
<vn-topbar></vn-topbar>
|
<vn-topbar></vn-topbar>
|
||||||
<vn-horizontal class="full-height">
|
<vn-horizontal>
|
||||||
<vn-empty class="bg-content" style="width: 18em">
|
<vn-four></vn-four>
|
||||||
<vn-left-menu items="$ctrl.items" descriptor="$ctrl.descriptor"></vn-left-menu>
|
<vn-eight>
|
||||||
</vn-empty>
|
<vn-vertical>
|
||||||
<vn-auto>
|
<vn-horizontal>
|
||||||
<vn-vertical ui-view></vn-vertical>
|
<vn-one>
|
||||||
</vn-auto>
|
<vn-textfield label="Id Cliente" alias="id" model="$ctrl.model.id"></vn-textfield>
|
||||||
|
<vn-textfield label="NIF/CIF" alis="nif" model="$ctrl.model.fi"></vn-textfield>
|
||||||
|
</vn-one>
|
||||||
|
</vn-horizontal>
|
||||||
|
<vn-horizontal>
|
||||||
|
<vn-one>
|
||||||
|
<vn-textfield label="Alias" alias="alias" model="$ctrl.model.alias"></vn-textfield>
|
||||||
|
</vn-one>
|
||||||
|
</vn-horizontal>
|
||||||
|
<vn-horizontal>
|
||||||
|
<vn-one>
|
||||||
|
<vn-textfield label="Razon Social" alias="razon" model="$ctrl.model.name"></vn-textfield>
|
||||||
|
</vn-one>
|
||||||
|
</vn-horizontal>
|
||||||
|
<vn-horizontal>
|
||||||
|
<vn-one>
|
||||||
|
<vn-textfield label="Población" alias="poblacion" model="$ctrl.model.city"></vn-textfield>
|
||||||
|
<vn-textfield label="Código Postal" alias="cp" model="$ctrl.model.cp"></vn-textfield>
|
||||||
|
</vn-one>
|
||||||
|
</vn-horizontal>
|
||||||
|
<vn-horizontal>
|
||||||
|
<vn-one>
|
||||||
|
<vn-textfield label="Email" alias="mail" model="$ctrl.model.email"></vn-textfield>
|
||||||
|
<vn-textfield label="Teléfono" alias="phone" model="$ctrl.model.phone"></vn-textfield>
|
||||||
|
</vn-one>
|
||||||
|
</vn-horizontal>
|
||||||
|
<vn-submit text="Buscar"></vn-submit>
|
||||||
|
</vn-vertical>
|
||||||
|
</vn-eight>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
|
</form>
|
|
@ -2,23 +2,23 @@ import template from './index.html';
|
||||||
import {module} from '../../module';
|
import {module} from '../../module';
|
||||||
|
|
||||||
const _NAME = 'clientIndex';
|
const _NAME = 'clientIndex';
|
||||||
// export const NAME = module.getName(_NAME);
|
//export const NAME = module.core.util.getName(_NAME);
|
||||||
export const NAME = "vnClientIndex";
|
export const NAME = "vnClientIndex";
|
||||||
export const COMPONENT = {
|
export const COMPONENT = {
|
||||||
template: template,
|
template: template,
|
||||||
controller: function() {
|
controller: function($http){
|
||||||
this.items = [
|
this.submit = function () {
|
||||||
{text: "Datos básicos", image: "person", href: "#/client/basic-data"},
|
var query = {"where": this.model, "fields": {"id": true}};
|
||||||
{text: "Datos facturación", image: "assignment", href: "#/client/invoicing-data"},
|
console.log(query);
|
||||||
{text: "Acceso web", image: "language", href: "#/client/web-access"},
|
$http.get(`/client/api/Clients/findOne?filter=${JSON.stringify(query)}`).then (
|
||||||
{text: "Consignatarios", image: "local_shipping", href: "#/client/addresses"},
|
function(response){
|
||||||
{text: "Notas", image: "insert_drive_file", href: "#/client/notes"}
|
console.log(response);
|
||||||
];
|
},
|
||||||
this.descriptor = [
|
function(response){
|
||||||
{text: "Cliente 1231"},
|
console.log(response);
|
||||||
{text: "Floristeria Lola"},
|
}
|
||||||
{text: "987 654 321"}
|
);
|
||||||
];
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
module.component(NAME, COMPONENT);
|
module.component(NAME, COMPONENT);
|
||||||
|
|
|
@ -1,20 +1,30 @@
|
||||||
[{
|
[
|
||||||
url: '/client',
|
{
|
||||||
state: 'client',
|
url: '/clients',
|
||||||
template: '<vn-client-index full-height></vn-client-index>',
|
state: 'clients',
|
||||||
module: 'crud',
|
template: '<vn-client-index full-height></vn-client-index>',
|
||||||
description: '',
|
module: 'crud',
|
||||||
image: '',
|
description: '',
|
||||||
},{
|
image: '',
|
||||||
url: '/basic-data',
|
}
|
||||||
state: 'client.basicdata',
|
,{
|
||||||
template: '<vn-client-basic-data full-height></vn-client-basic-data>',
|
url: '/client',
|
||||||
module: 'crud'
|
state: 'client',
|
||||||
},{
|
template: '<vn-client-client full-height></vn-client-client>',
|
||||||
url: '/addresses',
|
module: 'crud',
|
||||||
state: 'client.addresses',
|
description: '',
|
||||||
template: '<vn-client-addresses full-height></vn-client-addresses>',
|
image: '',
|
||||||
module: 'crud'
|
},{
|
||||||
}]
|
url: '/basic-data',
|
||||||
|
state: 'client.basicdata',
|
||||||
|
template: '<vn-client-basic-data full-height></vn-client-basic-data>',
|
||||||
|
module: 'crud'
|
||||||
|
},{
|
||||||
|
url: '/addresses',
|
||||||
|
state: 'client.addresses',
|
||||||
|
template: '<vn-client-addresses full-height></vn-client-addresses>',
|
||||||
|
module: 'crud'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue