This commit is contained in:
parent
024cb1e3f4
commit
391dba6d2c
|
@ -21,7 +21,7 @@
|
||||||
<vn-table model="model">
|
<vn-table model="model">
|
||||||
<vn-thead>
|
<vn-thead>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-th field="isChecked" center>Is checked</vn-th>
|
<vn-th field="isChecked" center expand>Is checked</vn-th>
|
||||||
<vn-th field="itemFk" number>Item</vn-th>
|
<vn-th field="itemFk" number>Item</vn-th>
|
||||||
<vn-th field="concept">Description</vn-th>
|
<vn-th field="concept">Description</vn-th>
|
||||||
<vn-th field="quantity" number>Quantity</vn-th>
|
<vn-th field="quantity" number>Quantity</vn-th>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
</vn-thead>
|
</vn-thead>
|
||||||
<vn-tbody>
|
<vn-tbody>
|
||||||
<vn-tr ng-repeat="sale in $ctrl.sales">
|
<vn-tr ng-repeat="sale in $ctrl.sales">
|
||||||
<vn-td center>
|
<vn-td center expand>
|
||||||
<vn-chip
|
<vn-chip
|
||||||
ng-class="{
|
ng-class="{
|
||||||
'pink': sale.hasSaleGroupDetail,
|
'pink': sale.hasSaleGroupDetail,
|
||||||
|
|
|
@ -118,12 +118,12 @@ class Controller extends Section {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateShelving(itemShelvingSale) {
|
async updateShelving(itemShelvingSale) {
|
||||||
const params = {
|
const params = {
|
||||||
shelvingFk: itemShelvingSale.shelvingFk
|
shelvingFk: itemShelvingSale.shelvingFk
|
||||||
};
|
};
|
||||||
this.$http.patch(`ItemShelvings/${itemShelvingSale.itemShelvingFk}`, params)
|
const res = await this.$http.patch(`ItemShelvings/${itemShelvingSale.itemShelvingFk}`, params);
|
||||||
.then(res => {
|
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['parkingFk'],
|
fields: ['parkingFk'],
|
||||||
where: {
|
where: {
|
||||||
|
@ -133,29 +133,24 @@ class Controller extends Section {
|
||||||
this.$http.get(`Shelvings/findOne`, {filter})
|
this.$http.get(`Shelvings/findOne`, {filter})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
itemShelvingSale.parkingFk = res.data.parkingFk;
|
itemShelvingSale.parkingFk = res.data.parkingFk;
|
||||||
});
|
|
||||||
|
|
||||||
this.vnApp.showSuccess(this.$t('Data saved!'));
|
this.vnApp.showSuccess(this.$t('Data saved!'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateParking(itemShelvingSale) {
|
async updateParking(itemShelvingSale) {
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['id'],
|
fields: ['id'],
|
||||||
where: {
|
where: {
|
||||||
code: itemShelvingSale.shelvingFk
|
code: itemShelvingSale.shelvingFk
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.$http.get(`Shelvings/findOne`, {filter})
|
const res = await this.$http.get(`Shelvings/findOne`, {filter});
|
||||||
.then(res => {
|
|
||||||
const params = {
|
const params = {
|
||||||
parkingFk: itemShelvingSale.parkingFk
|
parkingFk: itemShelvingSale.parkingFk
|
||||||
};
|
};
|
||||||
this.$http.patch(`Shelvings/${res.data.id}`, params)
|
this.$http.patch(`Shelvings/${res.data.id}`, params)
|
||||||
.then(() => {
|
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
|
||||||
this.vnApp.showSuccess(this.$t('Data saved!'));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue