ajout changement de client d'un rdf
This commit is contained in:
@@ -249,7 +249,7 @@
|
||||
<th>Date interv.</th>
|
||||
<th>Date rapport</th>
|
||||
<th>Chantier</th>
|
||||
<th>No sinistre</th>
|
||||
<th>Client</th>
|
||||
<th>Modif le</th>
|
||||
</tr>
|
||||
<tr tal:repeat="rapport rapports">
|
||||
@@ -260,7 +260,7 @@
|
||||
<td tal:condition="rapport.date_rapport">${rapport.date_rapport.strftime('%d-%m-%Y')}</td>
|
||||
<td tal:condition="not rapport.date_rapport"></td>
|
||||
<td>${rapport.C_QUALITE} ${rapport.C_NOM}</td>
|
||||
<td>${rapport.NOSIN}</td>
|
||||
<td>${rapport.NOMCLI}</td>
|
||||
<td>${rapport.modif_le.strftime('%d-%m-%Y')} - ${rapport.auteur_code}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
91
mondumas/templates/dossier/rdf_client.pt
Normal file
91
mondumas/templates/dossier/rdf_client.pt
Normal file
@@ -0,0 +1,91 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<form id="rdf_client-form" class="form-horizontal" action="${url}" method="post"
|
||||
data-fv-framework="bootstrap"
|
||||
data-fv-icon-valid="glyphicon glyphicon-ok"
|
||||
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">N° rapport</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static">${rapport.no_id}</p>
|
||||
</div>
|
||||
<label class="control-label col-sm-3">Date d'intervention</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static">${rapport.date_inter.strftime('%d-%m-%Y')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">Nom chantier</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static text-danger">${rapport.C_QUALITE} ${rapport.C_NOM}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">Nom du client actuel</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static">${rapport.NOMCLI}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">Nom du nouveau client</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="4 caractères minimum" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<a class="btn btn-default" href="${request.route_url('rdf_view', no_id=norapport)}">
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div>
|
||||
<div metal:fill-slot="additional_scripts">
|
||||
<!-- autocomplete plugin -->
|
||||
<link href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet">
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#rdf_client-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
excluded: ':disabled',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
});
|
||||
$('#name').autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
url:'/ajax_client',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
recherche: 'PL' + request.term,
|
||||
},
|
||||
success: function (data) {
|
||||
response( data );
|
||||
},
|
||||
});
|
||||
},
|
||||
minLength: 4,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
@@ -18,41 +18,35 @@
|
||||
<label class="control-label">N° dossier</label> : ${nodossier}<br />
|
||||
<label class="control-label">N° rapport</label> : ${norapport}<br />
|
||||
<label class="control-label">Date d'intervention</label> : ${rapport.date_inter.strftime('%d-%m-%Y')}<br />
|
||||
<label class="control-label" for="rapport">Compte-rendu : </label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="rapport" value="Définitif" disabled="disabled"
|
||||
tal:attributes="checked rapport.rapport=='Définitif'">Définitif
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="rapport" value="Provisoire" disabled="disabled"
|
||||
tal:attributes="checked rapport.rapport=='Provisoire'">Provisoire
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<h4 class="text-center text-primary">ADRESSE d'INTERVENTION</h4>
|
||||
<table class="table table-condensed ">
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<h4>${rapport.C_QUALITE} ${rapport.C_NOM}</h4>
|
||||
${rapport.C_ADR}<br />
|
||||
<span tal:condition="rapport.C_ADR2">${rapport.C_ADR2}<br /></span>
|
||||
${rapport.C_CP} ${rapport.C_VILLE}<br />
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Assureur : <b>${rapport.NOMCLI}</b><br />
|
||||
No Sinistre : ${rapport.NOSIN}
|
||||
<br />
|
||||
Téléphone : ${rapport.C_TEL1}<br />
|
||||
Mobile: ${rapport.C_TELP}<br />
|
||||
</p>
|
||||
<p tal:condition="pt_name != 'rdf_rapport'">
|
||||
<a href="${request.route_url('rdf_client', no_id=norapport)}"
|
||||
tal:condition="access > 0">[ Changer le client ]</a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table class="table table-condensed ">
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<h4>${rapport.C_QUALITE} ${rapport.C_NOM}</h4>
|
||||
${rapport.C_ADR}<br />
|
||||
<span tal:condition="rapport.C_ADR2">${rapport.C_ADR2}<br /></span>
|
||||
${rapport.C_CP} ${rapport.C_VILLE}<br />
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Assureur : <b>${rapport.NOMCLI}</b><br />
|
||||
No Sinistre : ${rapport.NOSIN}
|
||||
<br />
|
||||
Téléphone : ${rapport.C_TEL1}<br />
|
||||
Mobile: ${rapport.C_TELP}<br />
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<form id="rdf_view-form" action="${url}" method="post"
|
||||
data-fv-framework="bootstrap"
|
||||
@@ -60,7 +54,7 @@
|
||||
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="rapport">Compte-rendu : </label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="rapport" value="Définitif" disabled="disabled"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">Dern. modif le</label>
|
||||
<div class="col-sm-9">
|
||||
${suivi.DATEMAJ.strftime('%d-%m-%Y %H:%M')} par ${suivi.USERMAJ}
|
||||
<p class="form-control-static">${suivi.DATEMAJ.strftime('%d-%m-%Y %H:%M')} par ${suivi.USERMAJ}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
Reference in New Issue
Block a user