stats
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
$('#dossiers_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 50,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
@@ -89,10 +89,13 @@
|
||||
if ( data[6] == "Humidité" ) {
|
||||
$('td', row).eq(6).css('background-color', 'Crimson').css('color', 'white');
|
||||
}
|
||||
if ( data[6] == "En-cours" ) {
|
||||
if ( data[6] == "Devis" || data[6] == "Commandé") {
|
||||
$('td', row).eq(6).css('background-color', 'Orange');
|
||||
}
|
||||
if ( data[6] == "Terminé" ) {
|
||||
if ( data[6] == "Facturé") {
|
||||
$('td', row).eq(6).css('background-color', 'LightBlue');
|
||||
}
|
||||
if ( data[6] == "Réglée" || data[6] == "Régl part.") {
|
||||
$('td', row).eq(6).css('background-color', 'LightGreen');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -238,9 +238,9 @@
|
||||
<span class="glyphicon glyphicon-picture" tal:condition="detail.nomfichier.lower()[-3:]=='jpg'"></span>
|
||||
</td>
|
||||
<td>
|
||||
<a href="${docs_url}${detail.nomrep}/${detail.societe}/${detail.nochantier}/${detail.nomfichier}"
|
||||
<a href="${docs_url}${detail.societe}/${detail.nochantier}/${detail.nomfichier}"
|
||||
target="popup"
|
||||
onclick="window.open('${docs_url}${detail.nomrep}/${detail.societe}/${detail.nochantier}/${detail.nomfichier},'popup','width=900,height=768'); return false;">
|
||||
onclick="window.open('${docs_url}${detail.societe}/${detail.nochantier}/${detail.nomfichier},'popup','width=900,height=768'); return false;">
|
||||
${detail.nomfichier}
|
||||
</a>
|
||||
</td>
|
||||
@@ -271,9 +271,9 @@
|
||||
<span class="glyphicon glyphicon-picture" tal:condition="detail.nomfichier.lower()[-3:]=='jpg'"></span>
|
||||
</td>
|
||||
<td>
|
||||
<a href="${docs_url}${detail.nomrep}/${detail.societe}/${detail.nochantier}/${detail.nomfichier}"
|
||||
<a href="${docs_url}${detail.societe}/${detail.nochantier}/${detail.nomfichier}"
|
||||
target="popup"
|
||||
onclick="window.open('${docs_url}${detail.nomrep}/${detail.societe}/${detail.nochantier}/${detail.nomfichier},'popup','width=900,height=768'); return false;">
|
||||
onclick="window.open('${docs_url}${detail.societe}/${detail.nochantier}/${detail.nomfichier},'popup','width=900,height=768'); return false;">
|
||||
${detail.nomfichier}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
<br />
|
||||
</div>
|
||||
<p class="new-page" align="center" tal:repeat="detail photos1">
|
||||
<img src="${docs_url}${detail.nomrep}/${detail.societe}/${nochantier}/${norapport}/${detail.nomfichier}"
|
||||
<img src="${docs_url}${detail.societe}/${nochantier}/${norapport}/${detail.nomfichier}"
|
||||
width="660" />
|
||||
</p>
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
<br />
|
||||
</div>
|
||||
<p class="new-page" align="center" tal:repeat="detail photos2">
|
||||
<img src="${docs_url}${detail.nomrep}/${detail.societe}/${nochantier}/${norapport}/${detail.nomfichier}"
|
||||
<img src="${docs_url}${detail.societe}/${nochantier}/${norapport}/${detail.nomfichier}"
|
||||
width="660" />
|
||||
</p>
|
||||
<br />
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
<li>
|
||||
<span class="glyphicon glyphicon-file" tal:condition="detail.nomfichier[-3:]=='pdf'"></span>
|
||||
<span class="glyphicon glyphicon-picture" tal:condition="detail.nomfichier[-3:]=='jpg'"></span>
|
||||
<a href="${docs_url}${detail.nomrep}/${detail.societe}/${detail.nochantier}/${detail.nomfichier}"
|
||||
<a href="${docs_url}${detail.societe}/${detail.nochantier}/${detail.nomfichier}"
|
||||
target="popup"
|
||||
onclick="window.open('${docs_url}${detail.nomrep}/${detail.societe}/${detail.nochantier}/${detail.nomfichier},'popup','width=900,height=768'); return false;">
|
||||
onclick="window.open('${docs_url}${detail.societe}/${detail.nochantier}/${detail.nomfichier},'popup','width=900,height=768'); return false;">
|
||||
${detail.nomfichier}
|
||||
</a>
|
||||
- crée le ${detail.cree_le.strftime('%d-%m-%Y')} par ${detail.usermaj}
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
<tr tal:repeat="detail photos">
|
||||
<td width="400" align="center">
|
||||
<img tal:condition="norapport=='0'" width="350"
|
||||
src="${docs_url}${detail.nomrep}/${detail.societe}/${nochantier}/${detail.nomfichier}" />
|
||||
src="${docs_url}${detail.societe}/${nochantier}/${detail.nomfichier}" />
|
||||
<img tal:condition="norapport!='0'" width="350"
|
||||
src="${docs_url}${detail.nomrep}/${detail.societe}/${nochantier}/${norapport}/${detail.nomfichier}" />
|
||||
src="${docs_url}${detail.societe}/${nochantier}/${norapport}/${detail.nomfichier}" />
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="societe">Societe</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="societe" name="societe" onChange="$('#frm').submit()">
|
||||
<div tal:repeat="item societes">
|
||||
<option value="${item}" tal:attributes="selected societe==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<!-- ENTETE -->
|
||||
<div class="row">
|
||||
<!-- CHANTIER -->
|
||||
<div class="col-md-6">
|
||||
<table class="table table-condensed ">
|
||||
<tr>
|
||||
<td><h4>CHANTIER</h4></td>
|
||||
<td>
|
||||
<h4>${devis.C_QUALITE} ${devis.C_NOM}</h4>
|
||||
${devis.C_ADR}<br />
|
||||
<span tal:condition="devis.C_ADR2">${devis.C_ADR2}<br /></span>
|
||||
${devis.C_CP} ${devis.C_VILLE}<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Police<br />
|
||||
Sinistre<br />
|
||||
</td>
|
||||
<td>
|
||||
${devis.NOPOL}<br />
|
||||
${devis.NOSIN}<br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<table class="table table-condensed ">
|
||||
<tr>
|
||||
<td>
|
||||
<h4>CLIENT</h4>
|
||||
NO DEVIS<br />
|
||||
DATE<br />
|
||||
</td>
|
||||
<td>
|
||||
<h4>${devis.NOMCLI}</h4>
|
||||
${devis.NO_ID}<br />
|
||||
${devis.DATE.strftime('%d-%m-%Y')}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- row -->
|
||||
|
||||
<form id="frm-nochantier" action="${url}" method="POST" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="societe">No chantier</label>
|
||||
<div class="col-sm-2">
|
||||
<select class="form-control" id="nochantier" name="nochantier">
|
||||
<div tal:repeat="item nochantiers">
|
||||
<option value="${item}" tal:attributes="selected nochantier == item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<button class="btn btn-primary" type="submit" name="form.nochantier">
|
||||
<span class="glyphicon glyphicon-pencil"></span> MAJ No chantier</button>
|
||||
(Veuillez cocher un ou plusieurs dossiers pour mettre à jour leur no de chantier)
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="row">
|
||||
<table id="dossiers_list" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Numéro</th>
|
||||
<th>Date</th>
|
||||
<th>Client</th>
|
||||
<th>Chantier</th>
|
||||
<th class="text-right">Montant</th>
|
||||
<th>Sinistre</th>
|
||||
<th class="text-center">Ch.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
var table = $('#dossiers_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 20,
|
||||
bLengthChange: false,
|
||||
searching: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-center", "targets": [0] },
|
||||
{ className: "text-right", "targets": [5] },
|
||||
{ 'targets': 0,
|
||||
'checkboxes': {
|
||||
'selectRow': true
|
||||
}
|
||||
},
|
||||
],
|
||||
select: {
|
||||
'style': 'multi'
|
||||
},
|
||||
order: [[2, 'asc']],
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if ( data[0].slice(0,2) == "DD" ) {
|
||||
$('td', row).eq(7).css('background-color', 'Orange');
|
||||
}
|
||||
},
|
||||
});
|
||||
// Handle form submission event
|
||||
$('#frm-nochantier').on('submit', function(e){
|
||||
var form = this;
|
||||
var rows_selected = table.column(0).checkboxes.selected();
|
||||
|
||||
// Iterate over all selected checkboxes
|
||||
$.each(rows_selected, function(index, rowId){
|
||||
// alert("row selected :"+ index + "rowId "+ rowId);
|
||||
|
||||
// Create a hidden element
|
||||
$(form).append(
|
||||
$('<input>')
|
||||
.attr('type', 'hidden')
|
||||
.attr('name', 'id' + index)
|
||||
.val(rowId)
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
@@ -41,10 +41,12 @@
|
||||
<a href="${request.application_url}/users_ua"><span class="glyphicon glyphicon-log-in logo-primary"></span></a>
|
||||
<h4>CONNEXIONS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3" tal:condition="logged_in=='CAO'">
|
||||
<a href="${request.application_url}/orphans_de/PE"><span class="glyphicon glyphicon-wrench logo-primary"></span></a>
|
||||
<h4>DEVIS ORPHELINS</h4>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/stats_dd/PE"><span class="glyphicon glyphicon-wrench logo-primary"></span></a>
|
||||
<h4>STATS GLOBALES</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/infrastructure"><span class="glyphicon glyphicon-cog logo-primary"></span></a>
|
||||
<h4>INFRASTRUCTURE</h4>
|
||||
|
||||
74
mondumas/templates/parametres/stats_dd.pt
Normal file
74
mondumas/templates/parametres/stats_dd.pt
Normal file
@@ -0,0 +1,74 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
<br />
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="societe">Societe</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="societe" name="societe" onChange="$('#frm').submit()">
|
||||
<div tal:repeat="item societes">
|
||||
<option value="${item}" tal:attributes="selected societe==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="row">
|
||||
<table id="dossiers_list" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Année</th>
|
||||
<th class="text-right">A traiter</th>
|
||||
<th class="text-right">Devis</th>
|
||||
<th class="text-right">Commandé</th>
|
||||
<th class="text-right">Facturé</th>
|
||||
<th class="text-right">Régl part.</th>
|
||||
<th class="text-right">Réglée</th>
|
||||
<th class="text-right">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
var table = $('#dossiers_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 20,
|
||||
bLengthChange: false,
|
||||
bFilter: false,
|
||||
ordering: false,
|
||||
bPaginate: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-center", "targets": [0] },
|
||||
{ className: "text-right", "targets": [1] },
|
||||
{ className: "text-right", "targets": [2] },
|
||||
{ className: "text-right", "targets": [3] },
|
||||
{ className: "text-right", "targets": [4] },
|
||||
{ className: "text-right", "targets": [5] },
|
||||
{ className: "text-right", "targets": [6] },
|
||||
{ className: "text-right", "targets": [7] },
|
||||
],
|
||||
order: [[0, 'asc']],
|
||||
rowCallback: function( row, data ) {
|
||||
$('td', row).eq(0).addClass('bg-success');
|
||||
$('td', row).eq(7).addClass('bg-warning');
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
Reference in New Issue
Block a user