fix: cuando haces F5 en cualquier sección que no sea Diary, te coge el warehouse por defecto
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
ceab11cc41
commit
eda70b009b
|
@ -5,6 +5,25 @@ class Controller extends ModuleCard {
|
||||||
reload() {
|
reload() {
|
||||||
this.$http.get(`Items/${this.$params.id}/getCard`)
|
this.$http.get(`Items/${this.$params.id}/getCard`)
|
||||||
.then(res => this.item = res.data);
|
.then(res => this.item = res.data);
|
||||||
|
|
||||||
|
this.$http.get('ItemConfigs/findOne')
|
||||||
|
.then(res => {
|
||||||
|
if (this.$state.getCurrentPath()[4].state.name === 'item.card.diary') return;
|
||||||
|
this.warehouseFk = res.data.warehouseFk;
|
||||||
|
this.getWarehouseName(res.data.warehouseFk);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getWarehouseName(warehouseFk) {
|
||||||
|
const filter = {
|
||||||
|
where: {id: warehouseFk}
|
||||||
|
};
|
||||||
|
this.$http.get('Warehouses/findOne', {filter})
|
||||||
|
.then(res => {
|
||||||
|
this.warehouseText = this.$t('WarehouseFk', {
|
||||||
|
warehouseName: res.data.name
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,10 @@ class Controller extends Section {
|
||||||
|
|
||||||
this.$[descriptor].show(event.target, sale.origin);
|
this.$[descriptor].show(event.target, sale.origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$onDestroy() {
|
||||||
|
this.card.reload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.$inject = ['$element', '$scope', '$anchorScroll', '$location'];
|
Controller.$inject = ['$element', '$scope', '$anchorScroll', '$location'];
|
||||||
|
|
Loading…
Reference in New Issue