|
|
|
|
|
|
|
|
var app = this ; |
|
|
var app = this ; |
|
|
if(this.checkForm()) { |
|
|
if(this.checkForm()) { |
|
|
var processCredit = event.currentTarget.getAttribute('data-process-credit') ; |
|
|
var processCredit = event.currentTarget.getAttribute('data-process-credit') ; |
|
|
axios.get(UrlManager.getBaseUrlAbsolute()+"order/ajax-update",{params: { |
|
|
|
|
|
date: this.date.getFullYear() + '-' |
|
|
|
|
|
+ ('0' + (this.date.getMonth() +1)).slice(-2) + '-' |
|
|
|
|
|
+ ('0' + this.date.getDate()).slice(-2), |
|
|
|
|
|
idOrder: this.order.id, |
|
|
|
|
|
idPointSale: this.order.id_point_sale, |
|
|
|
|
|
meanPayment: this.order.mean_payment, |
|
|
|
|
|
idUser: this.order.id_user, |
|
|
|
|
|
username: ''+this.order.username, |
|
|
|
|
|
products: JSON.stringify(this.order.productOrder), |
|
|
|
|
|
comment: this.order.comment, |
|
|
|
|
|
processCredit: processCredit |
|
|
|
|
|
}}) |
|
|
|
|
|
.then(function(response) { |
|
|
|
|
|
app.$emit('ordercreatedupdated') ; |
|
|
|
|
|
}) ; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var data = new FormData(); |
|
|
|
|
|
data.append('date', this.date.getFullYear() + '-' |
|
|
|
|
|
+ ('0' + (this.date.getMonth() +1)).slice(-2) + '-' |
|
|
|
|
|
+ ('0' + this.date.getDate()).slice(-2)); |
|
|
|
|
|
data.append('idOrder', this.order.id) ; |
|
|
|
|
|
data.append('idPointSale', this.order.id_point_sale) ; |
|
|
|
|
|
data.append('meanPayment', this.order.mean_payment) ; |
|
|
|
|
|
data.append('idUser', this.order.id_user) ; |
|
|
|
|
|
data.append('username', ''+this.order.username) ; |
|
|
|
|
|
data.append('products', JSON.stringify(this.order.productOrder)) ; |
|
|
|
|
|
data.append('comment', this.order.comment) ; |
|
|
|
|
|
data.append('processCredit', processCredit) ; |
|
|
|
|
|
|
|
|
|
|
|
axios.post(UrlManager.getBaseUrlAbsolute()+"order/ajax-update",data) |
|
|
|
|
|
.then(function(response) { |
|
|
|
|
|
app.$emit('ordercreatedupdated') ; |
|
|
|
|
|
}) ; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
productQuantityClick: function(id_product, quantity) { |
|
|
productQuantityClick: function(id_product, quantity) { |