Browse Source

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

refactoring
Guillaume Bourgeois 2 years ago
parent
commit
e729642fb5
2 changed files with 7 additions and 4 deletions
  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 View File

:date="date" :date="date"
:order="orderCreate" :order="orderCreate"
:points-sale="pointsSale" :points-sale="pointsSale"
:id-active-point-sale="idActivePointSale"
:means-payment="meansPayment" :means-payment="meansPayment"
:users="users" :users="users"
:products="products" :products="products"
v-if="showModalFormOrderUpdate && idOrderUpdate == order.id" v-if="showModalFormOrderUpdate && idOrderUpdate == order.id"
:date="date" :date="date"
:date-format="dateFormat" :date-format="dateFormat"
:id-point-sale="idActivePointSale"
:points-sale="pointsSale" :points-sale="pointsSale"
:id-active-point-sale="idActivePointSale"
:means-payment="meansPayment" :means-payment="meansPayment"
:users="users" :users="users"
:products="products" :products="products"

+ 5
- 3
backend/web/js/vuejs/distribution-index.js View File

}) })


Vue.component('order-form',{ 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'], emits: ['updateProductPrice'],
data: function() { data: function() {
return { return {
errors: [], errors: [],
idPointSale: 0,
idPointSale: 0,
idUser: 0, idUser: 0,
username : '', username : '',
comment: '', comment: '',
idUser: app.order.id_user, idUser: app.order.id_user,
}}) }})
.then(function(response) { .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) ; app.updateProductOrderPrices(true) ;
}) ; }) ;
}, },

Loading…
Cancel
Save