Browse Source

Merge tag 'hotfix_613' into dev

hotfix_613
refactoring
Guillaume Bourgeois 2 years ago
parent
commit
e9f01d58aa
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      backend/web/js/vuejs/distribution-index.js

+ 13
- 2
backend/web/js/vuejs/distribution-index.js View File

this.errors.push('Veuillez sélectionner au moins un produit') ; this.errors.push('Veuillez sélectionner au moins un produit') ;
} }
}, },
getProductOrderArrayRequest: function() {
var productOrderArrayRequest = {};
for(var key in this.order.productOrder) {
productOrderArrayRequest[key] = {
quantity: this.order.productOrder[key].quantity,
unit: this.order.productOrder[key].unit,
price: this.order.productOrder[key].price
};
}
return JSON.stringify(productOrderArrayRequest);
},
submitFormCreate: function(event) { submitFormCreate: function(event) {
var app = this ; var app = this ;
if(this.checkForm()) { if(this.checkForm()) {
idUser: this.order.id_user, idUser: this.order.id_user,
username: this.order.username, username: this.order.username,
meanPayment: this.order.mean_payment, meanPayment: this.order.mean_payment,
products: JSON.stringify(this.order.productOrder),
products: app.getProductOrderArrayRequest(),
comment: this.order.comment, comment: this.order.comment,
processCredit: processCredit processCredit: processCredit
}}) }})
data.append('meanPayment', this.order.mean_payment) ; data.append('meanPayment', this.order.mean_payment) ;
data.append('idUser', this.order.id_user) ; data.append('idUser', this.order.id_user) ;
data.append('username', ''+this.order.username) ; data.append('username', ''+this.order.username) ;
data.append('products', JSON.stringify(this.order.productOrder)) ;
data.append('products', app.getProductOrderArrayRequest()) ;
data.append('comment', this.order.comment && this.order.comment.length ? this.order.comment : '') ; data.append('comment', this.order.comment && this.order.comment.length ? this.order.comment : '') ;
data.append('processCredit', processCredit) ; data.append('processCredit', processCredit) ;



Loading…
Cancel
Save