|
|
|
|
|
|
|
|
Ajouter un produit |
|
|
Ajouter un produit |
|
|
</div> |
|
|
</div> |
|
|
<div class="panel-body"> |
|
|
<div class="panel-body"> |
|
|
<div class="col-md-5"> |
|
|
|
|
|
|
|
|
<div class="col-md-3"> |
|
|
|
|
|
<strong>Produit</strong> |
|
|
<select class="form-control" v-model="productAddId" |
|
|
<select class="form-control" v-model="productAddId" |
|
|
@change="changeProductAdd"> |
|
|
@change="changeProductAdd"> |
|
|
<option value="0" selected="selected">--</option> |
|
|
<option value="0" selected="selected">--</option> |
|
|
|
|
|
|
|
|
</select> |
|
|
</select> |
|
|
</div> |
|
|
</div> |
|
|
<template v-if="productAddId > 0"> |
|
|
<template v-if="productAddId > 0"> |
|
|
<div class="col-md-2"> |
|
|
|
|
|
|
|
|
<div class="col-md-3"> |
|
|
|
|
|
<strong>Prix unitaire</strong> |
|
|
<div class="input-group"> |
|
|
<div class="input-group"> |
|
|
<input type="text" class="form-control input-price" |
|
|
<input type="text" class="form-control input-price" |
|
|
v-model="productAddPrice"/> |
|
|
|
|
|
|
|
|
v-model="productAddPrice" @change="formatProductAddPrice"/> |
|
|
<span class="input-group-addon"><span |
|
|
<span class="input-group-addon"><span |
|
|
class="glyphicon glyphicon-euro"></span></span> |
|
|
|
|
|
|
|
|
class="glyphicon glyphicon-euro"></span> TTC</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="col-md-3"> |
|
|
<div class="col-md-3"> |
|
|
|
|
|
<strong>Quantité</strong> |
|
|
<div class="input-group input-group-quantity"> |
|
|
<div class="input-group input-group-quantity"> |
|
|
<span class="input-group-btn"> |
|
|
<span class="input-group-btn"> |
|
|
<button class="btn btn-default" type="button" |
|
|
<button class="btn btn-default" type="button" |
|
|
@click="changeQuantityProductAdd(-1)">-</button> |
|
|
@click="changeQuantityProductAdd(-1)">-</button> |
|
|
</span> |
|
|
</span> |
|
|
<input type="text" class="form-control input-quantity" |
|
|
<input type="text" class="form-control input-quantity" |
|
|
v-model="productAddQuantity"/> |
|
|
|
|
|
|
|
|
v-model="productAddQuantity" @change="formatProductAddQuantity"/> |
|
|
<span class="input-group-addon">{{ productsArray[productAddId].wording_unit }}</span> |
|
|
<span class="input-group-addon">{{ productsArray[productAddId].wording_unit }}</span> |
|
|
<span class="input-group-btn"> |
|
|
<span class="input-group-btn"> |
|
|
<button class="btn btn-default" |
|
|
<button class="btn btn-default" |
|
|
|
|
|
|
|
|
</span> |
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="col-md-2"> |
|
|
|
|
|
|
|
|
<div class="col-md-3 total"> |
|
|
|
|
|
<strong>Total</strong> |
|
|
|
|
|
<div class="input-group"> |
|
|
|
|
|
<input type="text" class="form-control input-price" readonly |
|
|
|
|
|
:value="formatPrice(productAddPrice * productAddQuantity)"/> |
|
|
|
|
|
<span class="input-group-addon"><span |
|
|
|
|
|
class="glyphicon glyphicon-euro"></span> TTC</span> |
|
|
|
|
|
</div> |
|
|
<button class="btn btn-primary" value="Ajouter" |
|
|
<button class="btn btn-primary" value="Ajouter" |
|
|
@click="submitProductAdd">Ajouter |
|
|
@click="submitProductAdd">Ajouter |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
<div class="clr"></div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<div class="clr"></div> |
|
|
<div class="clr"></div> |
|
|
|
|
|
|
|
|
<table class="table table-bordered" v-if="total > 0"> |
|
|
<table class="table table-bordered" v-if="total > 0"> |
|
|
<thead> |
|
|
<thead> |
|
|
<tr> |
|
|
<tr> |
|
|
<td>Nom</td> |
|
|
|
|
|
<td>Prix (unité)</td> |
|
|
|
|
|
<td>Quantité</td> |
|
|
|
|
|
<td>Total</td> |
|
|
|
|
|
<td>Supprimer</td> |
|
|
|
|
|
|
|
|
<th>Nom</th> |
|
|
|
|
|
<th>Prix (unité)</th> |
|
|
|
|
|
<th>Quantité</th> |
|
|
|
|
|
<th>Total</th> |
|
|
|
|
|
<th>Supprimer</th> |
|
|
</tr> |
|
|
</tr> |
|
|
</thead> |
|
|
</thead> |
|
|
<tbody> |
|
|
<tbody> |
|
|
<template v-for="order in ordersArray"> |
|
|
<template v-for="order in ordersArray"> |
|
|
<tr v-for="productOrder in order.productOrder"> |
|
|
<tr v-for="productOrder in order.productOrder"> |
|
|
<td>{{ |
|
|
|
|
|
|
|
|
<td class="col-md-4">{{ |
|
|
productsArray[productOrder.id_product].name |
|
|
productsArray[productOrder.id_product].name |
|
|
}} |
|
|
}} |
|
|
</td> |
|
|
</td> |
|
|
<td>{{ formatPrice(productOrder.price) }}</td> |
|
|
|
|
|
<td>{{ productOrder.quantity }}</td> |
|
|
|
|
|
<td>{{ formatPrice(productOrder.quantity * |
|
|
|
|
|
|
|
|
<td class="col-md-2">{{ formatPrice(productOrder.price) }}</td> |
|
|
|
|
|
<td class="col-md-2">{{ productOrder.quantity }}</td> |
|
|
|
|
|
<td class="col-md-2">{{ formatPrice(productOrder.quantity * |
|
|
productOrder.price) }} |
|
|
productOrder.price) }} |
|
|
</td> |
|
|
</td> |
|
|
<td> |
|
|
|
|
|
|
|
|
<td class="col-md-2"> |
|
|
<a class="btn btn-default" @click="deleteProductOrder(productOrder.id)"> |
|
|
<a class="btn btn-default" @click="deleteProductOrder(productOrder.id)"> |
|
|
<span class="glyphicon glyphicon-trash"></span> |
|
|
<span class="glyphicon glyphicon-trash"></span> |
|
|
</a> |
|
|
</a> |