CRUD item basic data finish

This commit is contained in:
Daniel Herrero 2018-01-30 08:59:43 +01:00
parent 7c36daf496
commit 7eab262175
3 changed files with 25 additions and 1 deletions

View File

@ -14,7 +14,9 @@ class ItemCard {
{relation: "origin"},
{relation: "ink"},
{relation: "producer"},
{relation: "intrastat"}
{relation: "intrastat"},
{relation: "expence"},
{relation: "taxClass"}
]
};
this.$http.get(`/item/api/Items/${this.$state.params.id}?filter=${JSON.stringify(filter)}`).then(

View File

@ -23,6 +23,7 @@
show-field="name"
value-field="id"
field="$ctrl.item.typeFk"
initial-data="$ctrl.item.itemType"
>
</vn-autocomplete>
</vn-horizontal>
@ -35,6 +36,7 @@
field="$ctrl.item.intrastatFk"
order="description ASC"
filter-search="{where: {description: {regexp: 'search'}} }"
initial-data="$ctrl.item.intrastat"
>
<tpl-item>{{$parent.$parent.item.description}}</tpl-item>
</vn-autocomplete>
@ -49,13 +51,28 @@
show-field="name"
value-field="id"
field="$ctrl.item.originFk"
initial-data="$ctrl.item.origin"
></vn-autocomplete>
<vn-autocomplete vn-one
url="/item/api/Expences"
label="Expence"
field="$ctrl.item.expenceFk"
initial-data="$ctrl.item.expence"
></vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete vn-one
url="/item/api/TaxClasses"
label="TaxClass"
show-field="description"
value-field="id"
order="description ASC"
filter-search="{where: {description: {regexp: 'search'}} }"
field="$ctrl.item.taxClassFk"
initial-data="$ctrl.item.taxClass"
><tpl-item>{{$parent.$parent.item.description}}</tpl-item></vn-autocomplete>
<vn-one></vn-one>
</vn-horizontal>
</vn-vertical>
</vn-card>
<vn-button-bar>

View File

@ -75,6 +75,11 @@
"type": "belongsTo",
"model": "Expence",
"foreignKey": "expenceFk"
},
"taxClass": {
"type": "belongsTo",
"model": "TaxClass",
"foreignKey": "taxClassFk"
}
}
}