|
|
|
|
|
|
|
|
submitFormUpdate: function(event) { |
|
|
submitFormUpdate: function(event) { |
|
|
var app = this ; |
|
|
var app = this ; |
|
|
if(this.checkForm()) { |
|
|
if(this.checkForm()) { |
|
|
|
|
|
|
|
|
var productsArray = {}; |
|
|
|
|
|
for(key in this.order.productOrder) { |
|
|
|
|
|
if(this.order.productOrder[key].quantity > 0) { |
|
|
|
|
|
productsArray[key] = this.order.productOrder[key] ; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var processCredit = event.currentTarget.getAttribute('data-process-credit') ; |
|
|
var processCredit = event.currentTarget.getAttribute('data-process-credit') ; |
|
|
axios.get(UrlManager.getBaseUrlAbsolute()+"order/ajax-update",{params: { |
|
|
axios.get(UrlManager.getBaseUrlAbsolute()+"order/ajax-update",{params: { |
|
|
date: this.date.getFullYear() + '-' |
|
|
date: this.date.getFullYear() + '-' |
|
|
|
|
|
|
|
|
meanPayment: this.order.mean_payment, |
|
|
meanPayment: this.order.mean_payment, |
|
|
idUser: this.order.id_user, |
|
|
idUser: this.order.id_user, |
|
|
username: ''+this.order.username, |
|
|
username: ''+this.order.username, |
|
|
products: JSON.stringify(productsArray), |
|
|
|
|
|
//products: JSON.stringify(this.order.productOrder), |
|
|
|
|
|
|
|
|
products: JSON.stringify(this.order.productOrder), |
|
|
comment: this.order.comment, |
|
|
comment: this.order.comment, |
|
|
processCredit: processCredit |
|
|
processCredit: processCredit |
|
|
}}) |
|
|
}}) |