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