Explorar el Código

[Backend] Distributions > ajout commande : changement point de vente lors de la sélection d'un utilisateur #457

refactoring
Guillaume Bourgeois hace 2 años
padre
commit
e729642fb5
Se han modificado 2 ficheros con 7 adiciones y 4 borrados
  1. +2
    -1
      backend/views/distribution/index.php
  2. +5
    -3
      backend/web/js/vuejs/distribution-index.js

+ 2
- 1
backend/views/distribution/index.php Ver fichero

@@ -239,6 +239,7 @@ $this->setPageTitle('Distributions') ;
:date="date"
:order="orderCreate"
:points-sale="pointsSale"
:id-active-point-sale="idActivePointSale"
:means-payment="meansPayment"
:users="users"
:products="products"
@@ -417,8 +418,8 @@ $this->setPageTitle('Distributions') ;
v-if="showModalFormOrderUpdate && idOrderUpdate == order.id"
:date="date"
:date-format="dateFormat"
:id-point-sale="idActivePointSale"
:points-sale="pointsSale"
:id-active-point-sale="idActivePointSale"
:means-payment="meansPayment"
:users="users"
:products="products"

+ 5
- 3
backend/web/js/vuejs/distribution-index.js Ver fichero

@@ -681,12 +681,12 @@ Vue.component('modal', {
})

Vue.component('order-form',{
props: ['date', 'dateFormat', 'pointsSale','meansPayment', 'users', 'products', 'order', 'producer', 'loadingUpdateProductOrder'],
props: ['date', 'dateFormat', 'pointsSale', 'idActivePointSale', 'meansPayment', 'users', 'products', 'order', 'producer', 'loadingUpdateProductOrder'],
emits: ['updateProductPrice'],
data: function() {
return {
errors: [],
idPointSale: 0,
idPointSale: 0,
idUser: 0,
username : '',
comment: '',
@@ -813,7 +813,9 @@ Vue.component('order-form',{
idUser: app.order.id_user,
}})
.then(function(response) {
app.order.id_point_sale = response.data.id_favorite_point_sale ;
if(app.idActivePointSale == 0) {
app.order.id_point_sale = response.data.id_favorite_point_sale ;
}
app.updateProductOrderPrices(true) ;
}) ;
},

Cargando…
Cancelar
Guardar