retouche get tarifs
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<h4>ARTICLES</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/tarifs"><span class="glyphicon glyphicon-list-alt logo-primary"></span></a>
|
||||
<a href="${request.application_url}/tarifs/AXA"><span class="glyphicon glyphicon-list-alt logo-primary"></span></a>
|
||||
<h4>TARIFS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
|
||||
@@ -12,125 +12,44 @@
|
||||
<div id="tarif" class="tab-pane fade in active">
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="REF">Référence</label>
|
||||
<label class="control-label col-xs-2" for="access">Groupe</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static">${item.groupe}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="ref">Référence</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="REF" name="REF" value="${item.REF}"
|
||||
placeholder="10 caractères maximum"
|
||||
<input class="form-control" type="text" id="ref" name="ref" value="${item.ref}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La référence est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message="10 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2">Famille</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="FAM" name="FAM">
|
||||
<tal:block tal:repeat="famille familles">
|
||||
<option value="${famille}" tal:attributes="selected famille[0]==item.FAM and 'selected' or None">${famille}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBART">Libellé</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBART" name="LIBART" value="${item.LIBART}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libellé est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL1">Libellé compl. 1</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL1" name="LIBCOMPL1" value="${item.LIBCOMPL1}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL2">Libellé compl. 2</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL2" name="LIBCOMPL2" value="${item.LIBCOMPL2}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL3">Libellé compl. 3</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL3" name="LIBCOMPL3" value="${item.LIBCOMPL3}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL4">Libellé compl. 4</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL4" name="LIBCOMPL4" value="${item.LIBCOMPL4}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Prix HT 1</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="PRIXHT1" name="PRIXHT1" value="${item.PRIXHT1}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Prix HT 2</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="PRIXHT2" name="PRIXHT2" value="${item.PRIXHT2}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="ref_cli1">Réf. client 1</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="ref_cli1" name="ref_cli1" value="${item.ref_cli1}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="ref_cli2">Réf. client 2</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="ref_cli2" name="ref_cli2" value="${item.ref_cli2}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
<label class="control-label col-xs-2" for="libelle">Libellé</label>
|
||||
<div class="col-xs-8">
|
||||
<textarea class="form-control" rows="6" cols="40" id="libelle" name="libelle">${item.libelle}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Prix HT</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="prixht" name="prixht" value="${item.prixht}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Dernière modif.</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="item.REF != '0'">${item.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
<p class="form-control-static" tal:condition="item.ref != '0'">${item.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@@ -138,12 +57,12 @@
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/articles">
|
||||
<a class="btn btn-default" href="${request.application_url}/tarifs/${item.groupe}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted"
|
||||
tal:condition="item.REF != '0'">
|
||||
tal:condition="item.ref != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-1">Famille : </label>
|
||||
<label class="control-label col-md-1">groupe : </label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="famille" name="famille" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item familles">
|
||||
<option value="${item}" tal:attributes="selected famille==item and 'selected' or None">${item}</option>
|
||||
<select class="form-control" id="groupe" name="groupe" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item groupes">
|
||||
<option value="${item}" tal:attributes="selected groupe==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
@@ -16,7 +16,7 @@
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/article_edit/0" class="btn btn-success" role="button">
|
||||
<a href="${request.application_url}/tarif_edit/${groupe}/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvel tarif</a>
|
||||
<a href="${request.application_url}/tarifs_import" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-import"></span> Import tarifs</a>
|
||||
@@ -27,11 +27,9 @@
|
||||
<tr>
|
||||
<th>Référence</th>
|
||||
<th>Libellé</th>
|
||||
<th>Libellé 2</th>
|
||||
<th>Unité</th>
|
||||
<th class="text-right">Prix HT 1</th>
|
||||
<th class="text-right">Prix HT 2</th>
|
||||
<th>Réf. client 1</th>
|
||||
<th>Réf. client 2</th>
|
||||
<th>Modif le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -41,23 +39,24 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
var groupe = '${groupe}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#articles_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
searching: false,
|
||||
searching: true,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-right", "targets": [3,4] },
|
||||
{ className: "text-right", "targets": [3] },
|
||||
{ targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/article_edit/' + data + '">' + data + '</a>';
|
||||
return '<a href="/tarif_edit/' + groupe + '/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user