ajout page demandes devis
This commit is contained in:
@@ -19,8 +19,8 @@ pyramid.includes =
|
|||||||
pyramid_tm
|
pyramid_tm
|
||||||
|
|
||||||
|
|
||||||
sqlalchemy.url = mysql://phuoc:phuoc!@localhost/bddevfac?charset=utf8
|
#sqlalchemy.url = mysql://phuoc:phuoc!@localhost/bddevfac?charset=utf8
|
||||||
#sqlalchemy.url = mysql://phuoc:phuoc!@192.168.1.17/bddevfac?charset=utf8
|
sqlalchemy.url = mysql://phuoc:phuoc!@192.168.1.17/bddevfac?charset=utf8
|
||||||
# sqlalchemy.url = mysql://phuoc:phuoc!@192.168.0.31/bddevfac?charset=utf8
|
# sqlalchemy.url = mysql://phuoc:phuoc!@192.168.0.31/bddevfac?charset=utf8
|
||||||
|
|
||||||
mondumas.admin_email = cao.thien-phuoc@orange.fr
|
mondumas.admin_email = cao.thien-phuoc@orange.fr
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ def get_dossier_by_sinistre(request,societe, nosin):
|
|||||||
return results
|
return results
|
||||||
|
|
||||||
def get_dossiers_traites(request):
|
def get_dossiers_traites(request):
|
||||||
query = "SELECT * FROM dem_devis WHERE usermaj='EMAIL' ORDER BY DATEMAJ";
|
query = "SELECT d.*, s.libelle FROM dem_devis d JOIN p_statuts s ON d.STATUS = s.CODE WHERE d.usermaj='EMAIL' ORDER BY d.DATEMAJ";
|
||||||
results = request.dbsession.execute(query).fetchall()
|
results = request.dbsession.execute(query).fetchall()
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ def includeme(config):
|
|||||||
config.add_route('upload_doc', '/upload_doc/{nodossier}/{origine}')
|
config.add_route('upload_doc', '/upload_doc/{nodossier}/{origine}')
|
||||||
config.add_route('upload_img', '/upload_img/{norapport}/{origine}')
|
config.add_route('upload_img', '/upload_img/{norapport}/{origine}')
|
||||||
config.add_route('upload_om', '/upload_om')
|
config.add_route('upload_om', '/upload_om')
|
||||||
|
config.add_route('dem_devis','/dem_devis')
|
||||||
# parametres
|
# parametres
|
||||||
config.add_route('parametres', '/parametres')
|
config.add_route('parametres', '/parametres')
|
||||||
config.add_route('article_edit', '/article_edit/{ref}')
|
config.add_route('article_edit', '/article_edit/{ref}')
|
||||||
|
|||||||
@@ -192,6 +192,36 @@ color: white;
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-0, .bg-1 {
|
||||||
|
background-color: khaki !important;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-2, .bg-3 {
|
||||||
|
background-color: orange !important;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-4, .bg-5 {
|
||||||
|
background-color: lightcoral !important;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-6, .bg-7 {
|
||||||
|
background-color: CornflowerBlue !important;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-8 {
|
||||||
|
background-color: LawnGreen !important;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-10, .bg-11, .bg-12 {
|
||||||
|
background-color: gray !important;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
.new-page {
|
.new-page {
|
||||||
page-break-before: always;
|
page-break-before: always;
|
||||||
}
|
}
|
||||||
|
|||||||
30
mondumas/templates/dossier/dem_devis.pt
Normal file
30
mondumas/templates/dossier/dem_devis.pt
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<metal:block use-macro="main_template">
|
||||||
|
<div metal:fill-slot="content">
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<tr tal:repeat="item dossiers_traites">
|
||||||
|
<td>${item.DATEMAJ.strftime('%d %b')}</td>
|
||||||
|
<td><a href="${request.application_url}/dossier_view/${item.societe}-${item.NO_ID}">${item.societe}-${item.NO_ID}</td>
|
||||||
|
<td>${item.NOMCLI}</td>
|
||||||
|
<td>${item.C_NOM}</td>
|
||||||
|
<td>${item.USERMAJ}</td>
|
||||||
|
<td><span class="badge bg-${item.STATUS}">${item.libelle}</span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('#generateButton').on('click', function(){
|
||||||
|
$('i.gly-spin').removeClass('gly-spin');
|
||||||
|
$('i').addClass('gly-spin');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</div><!-- content -->
|
||||||
|
</metal:block>
|
||||||
|
|
||||||
|
|
||||||
@@ -1,59 +1,47 @@
|
|||||||
<metal:block use-macro="main_template">
|
<metal:block use-macro="main_template">
|
||||||
<div metal:fill-slot="content">
|
<div metal:fill-slot="content">
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<p>
|
<p>
|
||||||
<a href="${request.application_url}/" class="btn btn-default btn" role="button">
|
<a href="${request.application_url}/" class="btn btn-default btn" role="button">
|
||||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||||
</p>
|
</p>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-center">Soc</th>
|
<th class="text-center">Soc</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>Expéditeur</th>
|
<th>Expéditeur</th>
|
||||||
<th>Objet</th>
|
<th>Objet</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr tal:repeat="item emails">
|
<tr tal:repeat="item emails">
|
||||||
<td tal:condition="item.email_societe=='PE'" class="bg-warning text-center">${item.email_societe}</td>
|
<td tal:condition="item.email_societe=='PE'" class="bg-warning text-center">${item.email_societe}</td>
|
||||||
<td tal:condition="item.email_societe=='ME'" class="bg-danger text-center">${item.email_societe}</td>
|
<td tal:condition="item.email_societe=='ME'" class="bg-danger text-center">${item.email_societe}</td>
|
||||||
<td tal:condition="item.email_societe=='PL'" class="bg-success text-center">${item.email_societe}</td>
|
<td tal:condition="item.email_societe=='PL'" class="bg-success text-center">${item.email_societe}</td>
|
||||||
<td tal:condition="item.email_societe=='PO'" class="bg-primary text-center">${item.email_societe}</td>
|
<td tal:condition="item.email_societe=='PO'" class="bg-primary text-center">${item.email_societe}</td>
|
||||||
<td>${item.email_date.strftime('%d %b, %H:%M')}</td>
|
<td>${item.email_date.strftime('%d %b, %H:%M')}</td>
|
||||||
<td>${item.email_from}</td>
|
<td>${item.email_from}</td>
|
||||||
<td>${item.email_subject}</td>
|
<td>${item.email_subject}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="${request.application_url}/demandes_dl/${item.email_societe}/${item.email_from}/${item.email_uid}"
|
<a href="${request.application_url}/demandes_dl/${item.email_societe}/${item.email_from}/${item.email_uid}"
|
||||||
class="btn btn-primary btn-sm"><i class="glyphicon glyphicon-arrow-down"></i></a>
|
class="btn btn-primary btn-sm"><i class="glyphicon glyphicon-arrow-down"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<h2>Dossiers générés à contrôler</h2>
|
<br />
|
||||||
<table class="table table-condensed">
|
|
||||||
<tr tal:repeat="item dossiers_traites">
|
<script type="text/javascript">
|
||||||
<td>${item.DATEMAJ.strftime('%d %b')}</td>
|
$('#generateButton').on('click', function(){
|
||||||
<td><a href="${request.application_url}/dossier_view/${item.societe}-${item.NO_ID}">${item.societe}-${item.NO_ID}</td>
|
$('i.gly-spin').removeClass('gly-spin');
|
||||||
<td>${item.NOMCLI}</td>
|
$('i').addClass('gly-spin');
|
||||||
<td>${item.C_NOM}</td>
|
});
|
||||||
<td>${item.USERMAJ}</td>
|
</script>
|
||||||
</tr>
|
|
||||||
</table>
|
</div><!-- content -->
|
||||||
|
</metal:block>
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$('#generateButton').on('click', function(){
|
|
||||||
$('i.gly-spin').removeClass('gly-spin');
|
|
||||||
$('i').addClass('gly-spin');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</div><!-- content -->
|
|
||||||
</metal:block>
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -90,16 +90,18 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<div class="info-box bg-gest">
|
<a href="${request.application_url}/dem_devis" tal:condition="access > 0">
|
||||||
<span class="info-box-icon"><i class="glyphicon glyphicon-folder-open"></i></span>
|
<div class="info-box bg-gest">
|
||||||
<div class="info-box-content">
|
<span class="info-box-icon"><i class="glyphicon glyphicon-folder-open"></i></span>
|
||||||
<span class="info-box-number">DEM. DEVIS</span>
|
<div class="info-box-content">
|
||||||
<span class="info-box-text">A traiter : </span>
|
<span class="info-box-number">DEM. DEVIS</span>
|
||||||
<span class="info-box-number"><span class="badge bg-PE">${nb_dd_restants.nb_PE}</span>
|
<span class="info-box-text">A traiter : </span>
|
||||||
<span class="badge bg-ME">${nb_dd_restants.nb_ME}</span>
|
<span class="info-box-number"><span class="badge bg-PE">${nb_dd_restants.nb_PE}</span>
|
||||||
<span class="badge bg-PL">${nb_dd_restants.nb_PL}</span></span>
|
<span class="badge bg-ME">${nb_dd_restants.nb_ME}</span>
|
||||||
|
<span class="badge bg-PL">${nb_dd_restants.nb_PL}</span></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<div class="info-box bg-gest">
|
<div class="info-box bg-gest">
|
||||||
|
|||||||
@@ -942,14 +942,11 @@ def demandes(request):
|
|||||||
|
|
||||||
# messages lus
|
# messages lus
|
||||||
msglus = bool(emails)
|
msglus = bool(emails)
|
||||||
|
|
||||||
dossiers_traites = get_dossiers_traites(request)
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'page_title': "Liste des emails de demandes d'intervention",
|
'page_title': "Liste des emails de demandes d'intervention",
|
||||||
'url': url,
|
'url': url,
|
||||||
'emails': emails,
|
'emails': emails,
|
||||||
'dossiers_traites': dossiers_traites,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@view_config(route_name='demandes_dl', permission='view')
|
@view_config(route_name='demandes_dl', permission='view')
|
||||||
@@ -1574,3 +1571,15 @@ def upload_om(request):
|
|||||||
'html_text': html_text,
|
'html_text': html_text,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@view_config(route_name='dem_devis', renderer='../templates/dossier/dem_devis.pt', permission='view')
|
||||||
|
def upload_om(request):
|
||||||
|
logged_in = request.authenticated_userid.upper()
|
||||||
|
url = request.route_url('dem_devis')
|
||||||
|
|
||||||
|
dossiers_traites = get_dossiers_traites(request)
|
||||||
|
|
||||||
|
return {
|
||||||
|
'page_title': 'Dossiers générés à traiter',
|
||||||
|
'url': url,
|
||||||
|
'dossiers_traites':dossiers_traites,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user