Files
dumas_gestion/mondumas/templates/dossier/dossier_view.pt

367 lines
14 KiB
XML

<metal:block use-macro="main_template">
<div metal:fill-slot="content">
<br />
<!-- ENTETE -->
<div class="row">
<!-- CHANTIER -->
<div class="col-md-6">
<table class="table table-condensed ">
<tr>
<td>
<h4>CHANTIER</h4>
<a href="${request.application_url}/dossier_edit/${nodossier}" class="btn btn-primary" role="button">
<span class="glyphicon glyphicon-pencil"></span>&nbsp;Modifier</a>
</td>
<td>
<h4>${dossier.C_QUALITE} ${dossier.C_NOM}</h4>
${dossier.C_ADR}<br />
<span tal:condition="dossier.C_ADR2">${dossier.C_ADR2}<br /></span>
${dossier.C_CP} ${dossier.C_VILLE}<br />
${dossier.C_EMAIL}
<span tal:condition="len(dossier.C_EMAIL)==0" class="text-danger"><b>!!! Email vide !!!</b><br /></span>
<span tal:condition="len(dossier.C_EMAIL2)">${dossier.C_EMAIL2}</span>
</td>
</tr>
<tr>
<td>
Etage - Code<br />
Ascenseur<br />
Téléphone 1 et 2<br />
Portable 1 et 2
</td>
<td>
${dossier.C_ETAGE} - ${dossier.C_CODE}<br />
<span tal:condition="dossier.c_ascenseur==0">NON<br /></span>
<span tal:condition="dossier.c_ascenseur!=0">OUI<br /></span>
${dossier.C_TEL1} - ${dossier.C_TEL2}<br />
${dossier.C_TELP} - ${dossier.C_FAX}
</td>
</tr>
<tr>
<td>
Cabinet<br />
Expert<br />
Référence expert<br />
</td>
<td>
${dossier.nom_cabinet}<br />
${dossier.nom_expert}<br />
${dossier.REF_EXPERT}<br />
</td>
</tr>
<tr>
<td>
Police<br />
Sinistre<br />
Votre référence<br />
Observation<br />
Travaux<br />
</td>
<td>
${dossier.NOPOL}<br />
${dossier.NOSIN}<br />
${dossier.VREF}<br />
${dossier.C_OBS}<br />
${dossier.TX_TRAV}<br />
</td>
</tr>
</table>
</div>
<!-- CLIENT -->
<div class="col-md-6 ${bg_color}">
<table class="table table-condensed ">
<tr>
<td><h4>CLIENT</h4>
${dossier.CD_CLI}
</td>
<td>
<h4>${dossier.cli_QUALITE} ${dossier.cli_NOM}</h4>
${dossier.cli_ADRESSE}<br />
<span tal:condition="dossier.cli_ADRESSE2">${dossier.cli_ADRESSE2}<br /></span>
${dossier.cli_CP} ${dossier.cli_VILLE}<br />
</td>
</tr>
<tr>
<td>
Responsable<br />
Tél. 1 - 2<br />
Tél. mobile - fax
</td>
<td>
${dossier.cli_NOMRESP}<br />
${dossier.cli_TEL1} - ${dossier.cli_TEL2}<br />
${dossier.cli_TELP} - ${dossier.cli_FAX}
</td>
</tr>
</table>
</div>
<div class="col-md-6">
<h4>Statut : ${dossier.libelle}</h4>
<p>Dernière modif. le <b>${dossier.DATEMAJ.strftime('%d/%m/%Y à %H:%M')}</b> par <b>${dossier.USERMAJ}</b></p>
<p>
<a class="btn btn-warning" role="button" href="#"
data-toggle="modal" data-target="#confirmCloture"><span class="glyphicon glyphicon-check"></span> Modif. statut dossier</a>
</p>
</div>
</div> <!-- row -->
<!-- PANEL DOSSIERS SIMILAIRES -->
<table class="table table-bordered table-condensed" tal:condition="similaires">
<tr>
<th>Dossier similaire</th>
<th>Date</th>
<th>Client</th>
<th class="text-right">Montant</th>
<th class="text-center">Statut</th>
</tr>
<tr tal:repeat="detail similaires">
<td>
<a href="/dossier_view/${detail.nodossier}">${detail.nodossier}</a> ${detail.suivi_par}
</td>
<td>${detail.DATE.strftime('%d-%m-%Y')}</td>
<td class="bg-${detail.nodossier[0:2]}">${detail.NOMCLI}</td>
<td class="text-right">${layout.to_euro(detail.MTTRAV)}</td>
<td class="text-center">${detail.STATUS}</td>
</tr>
</table>
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#tab_suivi"><b>SUIVI du DOSSIER</b></a></li>
<li>
<a data-toggle="tab" href="#tab_documents"><b>DEVIS - FACTURES</b></a></li>
<li tal:condition="access > 0">
<a data-toggle="tab" href="#tab_attaches"><b>DOCUMENTS ATTACHES</b></a></li>
<li tal:condition="nodossier.startswith('PL')">
<a data-toggle="tab" href="#tab_rdf"><b>RAPPORTS DE RDF</b></a></li>
</ul>
<!-- PANEL SUIVI -->
<div class="tab-content">
<div id="tab_suivi" class="tab-pane fade in active">
<h3>SUIVI du DOSSIER</h3>
<p>
<a class="btn btn-success" role="button" href="${request.route_url('suivi_edit', nodossier=nodossier, nolig='0')}">
<span class="glyphicon glyphicon-plus"></span> Nouvelle ligne</a>
<a class="btn btn-success" role="button" href="${request.route_url('rdv_edit', nodossier=nodossier, nolig='0')}">
<span class="glyphicon glyphicon-calendar"></span> Nouveau rendez-vous</a>
</p>
<table class="table table-bordered table-condensed">
<tr>
<th>Date</th>
<th>Rendez-vous</th>
<th>Avec</th>
<th>Action - commentaire</th>
<th class="text-right">Montant</th>
<th>Réf. lettre</th>
<th class="text-center">Par</th>
</tr>
<tr tal:repeat="detail details">
<td>
<a href="${request.route_url('suivi_edit', nodossier=nodossier, nolig=detail.NOLIG)}">
${detail.DATE.strftime('%d-%m-%Y')}</a>
</td>
<td>
<span tal:condition="detail.rdv_debut==None"></span>
<span tal:condition="detail.rdv_debut!=None">
<a href="${request.route_url('rdv_edit', nodossier=nodossier, nolig=detail.NOLIG)}">
${detail.rdv_debut.strftime('%d-%m-%Y %H:%M')}</a>
</span>
</td>
<td class="text-center">
<span tal:condition="detail.rdv_debut!=None">${detail.LISTE}</span>
</td>
<td tal:condition="detail.COMMENT.startswith('!!')" class="text-danger">
<b>${detail.COMMENT}</b>
</td>
<td tal:condition="not detail.COMMENT.startswith('!!')">
${detail.COMMENT}
</td>
<td class="text-right">${layout.to_euroz(detail.montant)}</td>
<td class="text-center">${detail.REF_LET}</td>
<td class="text-center">${detail.USERMAJ}</td>
</tr>
</table>
</div>
<!-- PANEL DOCUMENTS -->
<div id="tab_documents" class="tab-pane fade">
<h3>DEVIS - FACTURES</h3>
<p>
<a class="btn btn-success" role="button" href="${request.route_url('devis_create', nodossier=nodossier)}"
tal:condition="logged_in=='CAO'">
<span class="glyphicon glyphicon-plus"></span> Nouveau devis</a>
</p>
<table class="table table-bordered table-condensed">
<tr>
<th>Numéro</th>
<th>Date</th>
<th>Client</th>
<th class="text-right">Montant</th>
<th class="text-center">Statut</th>
</tr>
<tr tal:repeat="detail documents">
<td tal:condition="detail.web!='W'">
<a href="/devis_view/${detail.nodossier}">${detail.nodossier}</a>
</td>
<td tal:condition="detail.web=='W'">
<a href="/devis_web/${detail.nodossier}">${detail.nodossier}-${detail.web}</a>
</td>
<td>${detail.date.strftime('%d-%m-%Y')}</td>
<td>${detail.nomcli}</td>
<td class="text-right"><span tal:condition="access > 0">${layout.to_euro(detail.montant)}</span></td>
<td class="text-center">${detail.status}</td>
</tr>
</table>
</div>
<!-- PANEL DOCS ATTACHES -->
<div id="tab_attaches" class="tab-pane fade">
<h3 class="text-center">DOCUMENTS ATTACHES</h3>
<p>
<a href="${request.application_url}/upload_doc/${nodossier}/CLT" class="btn btn-success" role="button">
<span class="glyphicon glyphicon-plus"></span>&nbsp;Ajouter document</a>
<a href="${request.application_url}/upload_img/${nodossier}/CLT" class="btn btn-primary" role="button">
<span class="glyphicon glyphicon-picture"></span>&nbsp;Gérer photos dossiers</a>
</p>
<table class="table table-bordered table-condensed">
<tr>
<th></th>
<th>Nom du fichier</th>
<th class="text-right">Taille</th>
<th>Crée le</th>
<th class="text-center">par</th>
</tr>
<tr tal:repeat="detail docs_attaches">
<td class="text-center">
<span class="glyphicon glyphicon-file" tal:condition="detail.nomfichier[-3:]=='pdf'"></span>
<span class="glyphicon glyphicon-picture" tal:condition="detail.nomfichier.lower()[-3:]=='jpg'"></span>
</td>
<td>
<a href="${docs_url}${detail.societe}/${detail.nochantier}/${detail.nomfichier}"
target="popup"
onclick="window.open('${docs_url}${detail.societe}/${detail.nochantier}/${detail.nomfichier},'popup','width=900,height=768'); return false;">
${detail.nomfichier}
</a>
</td>
<td class="text-right">${detail.taillefichier}</td>
<td>${detail.cree_le.strftime('%d-%m-%Y')}</td>
<td class="text-center">${detail.usermaj}</td>
</tr>
</table>
<h3 class="text-center">DOCUMENTS TECHNIQUES</h3>
<p>
<a href="${request.application_url}/upload_doc/${nodossier}/FRN" class="btn btn-success" role="button">
<span class="glyphicon glyphicon-plus"></span>&nbsp;Document technique</a>
<a href="${request.application_url}/upload_img/${nodossier}/FRN" class="btn btn-primary" role="button">
<span class="glyphicon glyphicon-picture"></span>&nbsp;Gérer photos techniques</a>
</p>
<table class="table table-bordered table-condensed">
<tr>
<th></th>
<th>Nom du fichier</th>
<th class="text-right">Taille</th>
<th>Crée le</th>
<th class="text-center">par</th>
</tr>
<tr tal:repeat="detail docs_techniques">
<td class="text-center">
<span class="glyphicon glyphicon-file" tal:condition="detail.nomfichier[-3:]=='pdf'"></span>
<span class="glyphicon glyphicon-picture" tal:condition="detail.nomfichier.lower()[-3:]=='jpg'"></span>
</td>
<td>
<a href="${docs_url}${detail.societe}/${detail.nochantier}/${detail.nomfichier}"
target="popup"
onclick="window.open('${docs_url}${detail.societe}/${detail.nochantier}/${detail.nomfichier},'popup','width=900,height=768'); return false;">
${detail.nomfichier}
</a>
</td>
<td class="text-right">${detail.taillefichier}</td>
<td>${detail.cree_le.strftime('%d-%m-%Y')}</td>
<td class="text-center">${detail.usermaj}</td>
</tr>
</table>
</div>
<!-- PANEL RDF -->
<div id="tab_rdf" class="tab-pane fade">
<h3>RECHERCHE DE FUITE</h3>
<p>
<a class="btn btn-success" role="button" href="${request.route_url('rdf_edit', nodossier=nodossier, date_inter='new')}">
<span class="glyphicon glyphicon-plus"></span> Nouveau rapport</a>
</p>
<table class="table table-bordered table-condensed" tal:condition="rapports">
<tr>
<th>No rapport</th>
<th>Date interv.</th>
<th>Date rapport</th>
<th>Chantier</th>
<th>Client</th>
<th>Modif le</th>
</tr>
<tr tal:repeat="rapport rapports">
<td>
<a href="/rdf_view/${rapport.no_id}">${rapport.no_id}</a>
</td>
<td>${rapport.date_inter.strftime('%d-%m-%Y')}</td>
<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.NOMCLI}</td>
<td>${rapport.modif_le.strftime('%d-%m-%Y')} - ${rapport.auteur_code}</td>
</tr>
</table>
</div>
</div>
<!-- Modal : Confirmation CLOTURE -->
<div class="modal fade" id="confirmCloture" role="dialog" aria-labelledby="confirmClotureLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Clôturer le dossier</h4>
</div>
<div class="modal-body">
<!-- The form is placed inside the body of modal -->
<form id="add_justif-form" class="form-horizontal" action="${url}" method="post">
<div class="form-group">
<p class="text-center"><b>Voulez-vous clôturer le dossier ?</b></p>
</div>
<div class="row">
<label class="control-label col-xs-4" for="status">Sélectionner le statut :</label>
<div class="col-xs-8">
<select class="form-control" id="status" name="status">
<div tal:repeat="item status">
<option tal:attributes="selected dossier.STATUS==item.code and 'selected' or None">${item.code} | ${item.libelle}</option>
</div>
</select>
</div>
</div>
<br>
<div class="row">
<label class="control-label col-xs-4" for="motif">Motif :</label>
<div class="col-xs-8">
<select class="form-control" id="motif" name="motif">
<option selected> </option>
<div tal:repeat="item motif">
<option>${item.code} | ${item.libelle}</option>
</div>
</select>
</div>
</div>
<br>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
<button type="submit" class="btn btn-warning" name="form.close">Clôturer</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</metal:block>