소스 검색

[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
부모
커밋
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…
취소
저장