This commit is contained in:
KONE SOREL 2026-04-16 11:04:35 +00:00
parent ab4eab07a7
commit 9268d8e692
6 changed files with 128 additions and 16 deletions

View File

@ -41,5 +41,20 @@ class ControleurAjaxmouvementassurevalider extends Controleur {
{
$this->mouvementassure->valider_mouvements_rh();
}
public function selectionrejet()
{
$idMvtTemp = $this->requete->getParametreFormulaire("idMvtTemp");
$rejet = $this->requete->getParametreFormulaire("rejet");
$this->mouvementassure->selectionner_rejet_rh($idMvtTemp, $rejet);
}
public function majobservation()
{
$idMvtTemp = $this->requete->getParametreFormulaire("idMvtTemp");
$this->genererVueAjax(array('idMvtTemp' => $idMvtTemp));
}
}

View File

@ -45386,4 +45386,49 @@ function retirer_un_menu_vue_profil(codeMenu)
afficher_menu_vue_profil();
}
});
}
function selectionner_rejet_rh(idMvtTemp, rejet)
{
donnees = 'idMvtTemp='+idMvtTemp+'&rejet='+rejet;
v_url = $("#racineWeb").val()+"Ajaxmouvementassurevalider/selectionrejet/";
$.ajax({
url: v_url,
type: 'POST',
data: donnees,
success: function(data) {
// alert(data);
// $('#div_test_gabarit').html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function maj_observation_rejet_rh(idMvtTemp)
{
donnees = 'idMvtTemp='+idMvtTemp;
$("#div_patienter").html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxmouvementassurevalider/majobservation/",
type : 'post',
data: donnees,
error: function(errorData){
alert("Erreur : "+errorData);
},
success: function(data) {
//alert("Success : "+data);
$("#div_patienter").html('');
$('#div_observation_rh').html(data);
$('#div_observation_rh').modal("show");
},
complete: function() {
}
});
}

View File

@ -97,7 +97,6 @@ class Mouvementassure extends Modele {
$sql = 'call sp_r_selectionner_mouvements_rh(?, ?)';
$this->executerRequete($sql, array($idMvtTemp, $choix));
}
public function valider_mouvements_rh()
{
@ -109,4 +108,10 @@ class Mouvementassure extends Modele {
$this->executerRequete($sql, array($idPolice, $user));
}
public function selectionner_rejet_rh($idMvtTemp, $rejet)
{
$sql = 'call sp_r_rejet_mouvements_rh(?, ?)';
$this->executerRequete($sql, array($idMvtTemp, $rejet));
}
}

View File

@ -11,24 +11,27 @@
<th class="text-center" style="border-bottom: 0;"><?= _("Consulter") ?></th>
<th class="text-center" style="border-bottom: 0;"><?= _("Saisie / Par") ?></th>
<th class="text-center" style="border-bottom: 0;"><?= _("Prime Ttc") ?></th>
<th colspan="2" class="text-center" style="border-bottom: 0;"><?= _("Choix") ?></th>
<th colspan="4" class="text-center" style="border-bottom: 0;"><?= _("Traiter") ?></th>
</tr>
<tr style="background-color: #eee;">
<th colspan="8" style="text-align:center; padding: 5px;">
<input class="btn btn-primary btn-sm btn-block" type="button" value="<?= _("Valider la sélection") ?>" onClick="valider_mouvement_rh();">
</th>
<th style="text-align:center; padding: 5px;">
<input class="btn btn-info btn-sm" type="button" value="V" onClick="selectionner_mouvement_rh_tout('1');" style="width: 30px;">
<input class="btn btn-info btn-sm" type="button" value="V" onClick="selectionner_mouvement_rh_tout('1');" style="width: 30px;" title="<?= _('Tout cocher');?>">
</th>
<th style="text-align:center; padding: 5px;">
<input class="btn btn-danger btn-sm" type="button" value="X" onClick="selectionner_mouvement_rh_tout('0');" style="width: 30px;">
<input class="btn btn-danger btn-sm" type="button" value="X" onClick="selectionner_mouvement_rh_tout('0');" style="width: 30px;" title="<?= _('Tout décocher');?>">
</th>
<th style="text-align:center; padding: 5px;"><?= _('Rej');?></th>
<th style="text-align:center; padding: 5px;"><?= _('Obs');?></th>
</tr>
</thead>
<tbody>
<?php foreach ($mouvementassures as $mvt):
$choix = $this->nettoyer($mvt['choix']);
$rejet = $this->nettoyer($mvt['rejet']);
$idMvtTemp = $this->nettoyer($mvt['id']);
$sensMvt = $mvt['sensMouvement'];
$libelleSensMouvement = est_anglophone() ? $mvt['libelleSensMouvementEng'] : $mvt['libelleSensMouvement'];
@ -77,7 +80,7 @@
</td>
<td class="text-center" style="vertical-align: middle;">
<div style="font-size: 10px;"><?= dateheureLang($this->nettoyer($mvt['dateSysteme'])) ?></div>
<div style="font-size: 10px;"><?= dateheureLang($this->nettoyer($mvt['dateSysteme']), $_SESSION['lang']) ?></div>
<div style="font-size: 9px; color: #777; font-weight: bold;"><?= $this->nettoyer($mvt['codeUtilisateur']) ?></div>
</td>
@ -86,15 +89,21 @@
</td>
<td colspan="2" class="text-center" style="vertical-align: middle;">
<?php //if ($nombreGed > '0'): ?>
<input type="checkbox"
<?= ($choix == '1') ? 'checked' : '' ?>
value="<?= $choix ?>"
onClick="javascript:this.value=(this.value=='1'?'0':'1');selectionner_mouvement_rh(<?= $idMvtTemp ?>, this.value);">
<?php //else: ?>
<!-- <span style="color: #ccc;">-</span>-->
<?php //endif; ?>
<input type="checkbox"
<?= ($choix == '1') ? 'checked' : '' ?>
value="<?= $choix ?>"
onClick="javascript:this.value=(this.value=='1'?'0':'1');selectionner_mouvement_rh(<?= $idMvtTemp ?>, this.value);"
>
</td>
<td class="text-center" style="vertical-align: middle;">
<input type="checkbox"
<?= ($rejet == '1') ? 'checked' : '' ?>
value="<?= $rejet ?>"
onClick="javascript:this.value=(this.value=='1'?'0':'1');selectionner_rejet_rh(<?= $idMvtTemp ?>, this.value);"
>
</td>
<td class="text-center" style="vertical-align: middle;">
<input type="button" value="Obs" onClick='javascript:maj_observation_rejet_rh(<?= $idMvtTemp ?>);'>
</td>
</tr>
<?php endforeach; ?>
@ -103,6 +112,7 @@
</div>
<div id="div_ged" class="modal fade" tabindex="-1" role="dialog"></div>
<div id="div_observation_rh" class="modal fade"></div>
<style>
/* Simulation des comportements de la version précédente en BS3 */

View File

@ -0,0 +1,38 @@
<?php
?>
<div class="modal-dialog" style="max-width:70%" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<legend class="modal-title" id="user" style="text-align:center;"><?= _('Observation de Rejet')?></legend>
</div>
<div class="modal-body">
<div id="div_motif" style="margin-top:30px; margin-bottom:30px;">
<table class="table table-responsive table-condensed" style='font-size:12pt;'>
<tbody>
<tr>
<td style='text-align:center' class="required" width="8%"> <?= _("Motif");?></td>
<td >
<textarea class="form-control-sm" placeholder="<?= _("Obligatoire");?>" name="motif" id="motif" rows="5" required AUTOCOMPLETE="OFF" style="width:100%;"></textarea>
</td>
</tr>
<tr>
<td> </td>
<td >
<input style="font-size:10pt;" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" onClick="javascript:enregistree_obs_rejet(<?= $$idMvtTemp ?>);">
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" id="" class="btn btn-default" data-dismiss="modal"><?= _("Fermer") ?></button>
</div>
</div>
</div>

View File

@ -263,7 +263,7 @@ controlerPlafondBeneficiaire : <?= $_SESSION['controlerPlafondBeneficiaire'] ?>
<script src="Js/datepicker-fr.js"></script>
<?php endif; ?>
<script src="Js/fonctions.js?ver=2026.03.09.21"></script>
<script src="Js/fonctions.js?ver=2026.03.09.22"></script>
<script src="<?= $_SESSION['dossierSociete'].'/Js/societe.js' ?>" > </script>
@ -289,7 +289,6 @@ controlerPlafondBeneficiaire : <?= $_SESSION['controlerPlafondBeneficiaire'] ?>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"> <?= _("Fermer") ?> </button>
</div>
</div>
</div>
</div>