Преглед на файлове

[backend] Impossible de modifier le point de vente d'une commande lorsqu'un point de vente est sélectionné

Pour corriger cela, on passe un clone de la commande au formulaire de modification.
dev
Guillaume Bourgeois преди 5 години
родител
ревизия
2d1144ebdf
променени са 2 файла, в които са добавени 15 реда и са изтрити 2 реда
  1. +1
    -1
      backend/views/distribution/index.php
  2. +14
    -1
      backend/web/js/vuejs/distribution-index.js

+ 1
- 1
backend/views/distribution/index.php Целия файл

@@ -302,7 +302,7 @@ $this->setPageTitle('Distributions') ;
:points-sale="pointsSale"
:users="users"
:products="products"
:order="order"
:order="order.clone"
@close="showModalFormOrderUpdate = false"
@ordercreatedupdated="orderCreatedUpdated"
></order-form>

+ 14
- 1
backend/web/js/vuejs/distribution-index.js Целия файл

@@ -123,6 +123,9 @@ var app = new Vue({
app.orders = response.data.orders ;
for(i=0 ; i < app.orders.length ; i++) {
app.orders[i].clone = app.cloneOrder(app.orders[i]) ;
if(!app.orders[i].date_delete) {
app.countOrders ++ ;
}
@@ -346,6 +349,16 @@ var app = new Vue({
closeModalProducts: function() {
this.showModalProducts = false ;
this.init(this.idActivePointSale) ;
},
cloneOrder: function(order) {
var clone = Object.assign({}, order) ;
clone.productOrder = {} ;
for(var key in order.productOrder) {
clone.productOrder[key] = order.productOrder[key] ;
}
return clone ;
}
},
});
@@ -437,7 +450,7 @@ Vue.component('order-form',{
idUser: this.order.id_user,
username: ''+this.order.username,
products: JSON.stringify(this.order.productOrder),
comment: this.comment,
comment: this.order.comment,
processCredit: processCredit
}})
.then(function(response) {

Loading…
Отказ
Запис