Merge branch 'main' of https://git.ebene.ovh/ebene/radiantproduction
This commit is contained in:
commit
090f868c06
|
|
@ -1,11 +1,13 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Mouvementassure.php';
|
||||
require_once 'Modele/Ouinon.php';
|
||||
|
||||
class ControleurAjaxmouvementassurevalider extends Controleur {
|
||||
|
||||
public function __construct() {
|
||||
$this->mouvementassure = new Mouvementassure();
|
||||
$this->ouinoncorrection = (new Ouinon())->getListe();
|
||||
}
|
||||
|
||||
public function index()
|
||||
|
|
@ -41,5 +43,35 @@ 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 ouvremotif()
|
||||
{
|
||||
$idMvtTemp = $this->requete->getParametreFormulaire("idMvtTemp");
|
||||
|
||||
$mouvementassure = $this->mouvementassure->getMouvementassureID($idMvtTemp);
|
||||
|
||||
$this->genererVueAjax(array(
|
||||
'idMvtTemp' => $idMvtTemp,
|
||||
'mouvementassure' => $mouvementassure,
|
||||
'ouinoncorrection' => $this->ouinoncorrection
|
||||
));
|
||||
}
|
||||
|
||||
public function savemotif()
|
||||
{
|
||||
$idMvtTemp = $this->requete->getParametreFormulaire("idMvtTemp");
|
||||
$motif = $this->requete->getParametreFormulaire("motif");
|
||||
$aCorriger = $this->requete->getParametreFormulaire("aCorriger");
|
||||
|
||||
$this->mouvementassure->enregistrer_motif_rejet_rh($idMvtTemp, $motif, $aCorriger);
|
||||
}
|
||||
|
||||
}
|
||||
127
Js/fonctions.js
127
Js/fonctions.js
|
|
@ -43935,6 +43935,7 @@ function selectionner_mouvement_rh(idMvtTemp, choix)
|
|||
error: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
liste_mouvemements_rh_valider();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -43973,19 +43974,27 @@ function valider_mouvement_rh()
|
|||
{
|
||||
v_url = $("#racineWeb").val()+"Ajaxmouvementassurevalider/valider/";
|
||||
|
||||
$.ajax({
|
||||
url: v_url,
|
||||
type: 'POST',
|
||||
success: function(data) {
|
||||
// alert(data);
|
||||
// $('#div_test_gabarit').html(data);
|
||||
},
|
||||
error: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
window.location.assign($("#racineWeb" ).val()+"Mouvementsrh/");
|
||||
}
|
||||
});
|
||||
v_msg="Confirmez-vous cette validation ?";
|
||||
v_msgEng="Do you confirm this validation?";
|
||||
|
||||
if(confirm_ebene(v_msg, v_msgEng))
|
||||
{
|
||||
$.ajax({
|
||||
url: v_url,
|
||||
type: 'POST',
|
||||
success: function(data) {
|
||||
// alert(data);
|
||||
// $('#div_test_gabarit').html(data);
|
||||
},
|
||||
error: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
window.location.assign($("#racineWeb" ).val()+"Mouvementsrh/");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function activer_extranet_client(idClient, choix)
|
||||
|
|
@ -45386,4 +45395,96 @@ 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);
|
||||
liste_mouvemements_rh_valider();
|
||||
|
||||
setTimeout(function() {
|
||||
if((rejet=="1")){
|
||||
ouvre_motif_rejet_rh(idMvtTemp);
|
||||
}
|
||||
}, 150);
|
||||
},
|
||||
error: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ouvre_motif_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/ouvremotif/",
|
||||
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() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function enregistrer_motif_rejet(idMvtTemp)
|
||||
{
|
||||
motif = $("#motif").val();
|
||||
aCorriger = $("#aCorriger").val();
|
||||
|
||||
if (motif<=" ")
|
||||
{
|
||||
v_msg="Veuillez entrer le motif du rejet !";
|
||||
v_msgEng="Please enter the reason for rejection!";
|
||||
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#motif").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
donnees = 'idMvtTemp='+idMvtTemp+'&motif='+motif+'&aCorriger='+aCorriger;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxmouvementassurevalider/savemotif/",
|
||||
type : 'post',
|
||||
data: donnees,
|
||||
error: function(errorData){
|
||||
alert("Erreur : "+errorData);
|
||||
},
|
||||
success: function(data) {
|
||||
//alert("Success : "+data);
|
||||
v_msg="Le motif du rejet a été bien enregistré !";
|
||||
v_msgEng="The reason for the rejection has been properly recorded!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$('#div_observation_rh').modal('hide');
|
||||
},
|
||||
complete: function() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -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,25 @@ 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));
|
||||
}
|
||||
|
||||
public function enregistrer_motif_rejet_rh($idMvtTemp, $motif, $aCorriger)
|
||||
{
|
||||
$sql = 'call sp_r_enregistrer_motif_rejet_rh(?, ?, ?)';
|
||||
|
||||
$this->executerRequete($sql, array($idMvtTemp, $motif, $aCorriger));
|
||||
}
|
||||
|
||||
public function getMouvementassureID($idMvtTemp)
|
||||
{
|
||||
$sql = 'call sp_r_get_mouvementassures_rh_id(?)';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($idMvtTemp));
|
||||
|
||||
return $resultat->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<div class="small"><?= dateheureLang($this->nettoyer($mvt['dateSysteme'])) ?></div>
|
||||
<div class="small"><?= dateheureLang($this->nettoyer($mvt['dateSysteme']), $_SESSION['lang']) ?></div>
|
||||
<div class="x-small text-muted fw-bold"><?= $this->nettoyer($mvt['codeUtilisateur']) ?></div>
|
||||
</td>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,27 +8,30 @@
|
|||
<th style="border-bottom: 0;"><?= _("Bénéficiaire / Matricule") ?></th>
|
||||
<th style="border-bottom: 0;"><?= _("Adhérent") ?></th>
|
||||
<th class="text-center" style="border-bottom: 0;"><?= _("Lien") ?></th>
|
||||
<th class="text-center" style="border-bottom: 0;"><?= _("Consulter") ?></th>
|
||||
<th class="text-center" style="border-bottom: 0;"><?= _("GED") ?></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;"><?= _("Traitement") ?></th>
|
||||
</tr>
|
||||
<tr style="background-color: #eee;">
|
||||
<tr style="background-color: #000;">
|
||||
<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;"><?= _('Rejet');?></th>
|
||||
<th style="text-align:center; padding: 5px;"><?= _('Motif');?></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'];
|
||||
|
|
@ -69,7 +72,7 @@
|
|||
<td class="text-center" style="vertical-align: middle;">
|
||||
<?php if ($nombreGed > '0'): ?>
|
||||
<button class="btn btn-primary btn-xs" onClick="javascript:consulter_ged_assure_mvt('<?= $idBeneficiaire ?>');">
|
||||
<?= _("GED") ?>
|
||||
<?= _("Voir") ?>
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<span style="color: #ccc;">-</span>
|
||||
|
|
@ -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,24 @@
|
|||
</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; ?>
|
||||
<?php if ($rejet == '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 endif; ?>
|
||||
</td>
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<?php if ($choix == '0' || $rejet == '1'): ?>
|
||||
<input type="checkbox" <?= ($rejet == '1') ? 'checked' : '' ?> value="<?= $rejet ?>"
|
||||
onClick="javascript:this.value=(this.value=='1'?'0':'1');selectionner_rejet_rh(<?= $idMvtTemp ?>, this.value);"
|
||||
>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<?php if ($rejet == '1'): ?>
|
||||
<input type="button" value="Obs" onClick='javascript:ouvre_motif_rejet_rh(<?= $idMvtTemp ?>);'>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
|
@ -103,6 +115,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 */
|
||||
|
|
|
|||
119
Vue/Ajaxmouvementassurevalider/ouvremotif.php
Normal file
119
Vue/Ajaxmouvementassurevalider/ouvremotif.php
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
<?php
|
||||
$motif = $mouvementassure['motif'];
|
||||
$traite = $mouvementassure['traite'];
|
||||
$aCorriger = $mouvementassure['aCorriger'];
|
||||
?>
|
||||
|
||||
<div class="modal-dialog" style="width: 70%;" role="document">
|
||||
<div class="modal-content" style="border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,.5);">
|
||||
|
||||
<div class="modal-header" style="background-color: #f5f5f5; border-bottom: 1px solid #e5e5e5; border-top-left-radius: 4px; border-top-right-radius: 4px;">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="user" style="text-align:center; font-weight: bold; color: #a94442;">
|
||||
<span class="glyphicon glyphicon-warning-sign" style="margin-right: 10px;"></span>
|
||||
<?= _('Motif de Rejet')?>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="padding: 20px;">
|
||||
<div id="div_motif" style="margin-bottom:10px;">
|
||||
<table class="table table-condensed" style="border: none; margin-bottom: 0;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align:center; vertical-align: top; border-top: none; font-weight: bold; width: 20%; padding-top: 15px;">
|
||||
<label class="control-label <?= ($traite == '0') ? 'required' : '' ?>"><?= _("Commentaire");?></label>
|
||||
</td>
|
||||
<td style="border-top: none;">
|
||||
<div class="form-group" style="margin-bottom: 15px;">
|
||||
<?php if($traite == "0"): ?>
|
||||
<textarea class="form-control"
|
||||
placeholder="<?= _("Saisissez ici le motif du rejet (obligatoire)...");?>"
|
||||
name="motif"
|
||||
id="motif"
|
||||
rows="6"
|
||||
required
|
||||
AUTOCOMPLETE="OFF"
|
||||
style="width:100%; border-radius: 4px; resize: vertical;"><?= $motif; ?></textarea>
|
||||
<?php else: ?>
|
||||
<div class="well well-sm" style="min-height: 120px; background-color: #fcfcfc; margin-bottom: 0;">
|
||||
<?= nl2br($motif); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align:center; vertical-align: middle; border-top: none; font-weight: bold;">
|
||||
<?= _("Permettre Correction ?") ?>
|
||||
</td>
|
||||
<td style="border-top: none;">
|
||||
<div style="width: 150px;">
|
||||
<?php if($traite == "0"): ?>
|
||||
<select class="form-control input-sm" id="aCorriger" name="aCorriger">
|
||||
<?php liste_options($ouinoncorrection, $aCorriger, true); ?>
|
||||
</select>
|
||||
<?php else: ?>
|
||||
<select class="form-control input-sm" id="aCorriger" name="aCorriger" disabled>
|
||||
<?php liste_options($ouinoncorrection, $aCorriger); ?>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if($traite == "0"): ?>
|
||||
<tr>
|
||||
<td style="border-top: none;"> </td>
|
||||
<td style="border-top: none; padding-top: 20px;">
|
||||
<button type="button"
|
||||
class="btn btn-primary"
|
||||
style="font-weight: bold; padding: 10px 40px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);"
|
||||
onClick="javascript:enregistrer_motif_rejet(<?= $idMvtTemp ?>);">
|
||||
<span class="glyphicon glyphicon-floppy-disk" style="margin-right: 8px;"></span>
|
||||
<?= _("Enregistrer la décision") ?>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer" style="background-color: #f9f9f9; border-top: 1px solid #eee;">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" style="font-weight: bold;">
|
||||
<span class="glyphicon glyphicon-remove" style="margin-right: 5px;"></span>
|
||||
<?= _("Fermer") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* Marquage des champs requis */
|
||||
.required:after {
|
||||
content: " *";
|
||||
color: #a94442;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Animation modale standard */
|
||||
.modal-content {
|
||||
animation: modalFadeIn 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes modalFadeIn {
|
||||
from { opacity: 0; transform: translateY(-30px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
/* Amélioration visuelle des champs BS3 */
|
||||
.form-control:focus {
|
||||
border-color: #66afe9;
|
||||
outline: 0;
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
// var_dump(array("debutMois_C" => $_SESSION['debutMois_C'] ));
|
||||
?>
|
||||
|
||||
<input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbligne" name="nbligne" value="<?= _("RECAPITULATIF MOUVEMMENTS RH") ?>" readonly>
|
||||
<input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbligne" name="nbligne" value="<?= _("RECAPITULATIF MOUVEMENTS RH") ?>" readonly>
|
||||
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@
|
|||
<script src="Js/datepicker-fr.js"></script>
|
||||
<?php endif; ?>
|
||||
|
||||
<script src="Js/fonctions.js?ver=2026.03.09.20"></script>
|
||||
<script src="Js/fonctions.js?ver=2026.04.18.00"></script>
|
||||
|
||||
<script src="<?= $_SESSION['dossierSociete'].'/Js/societe.js' ?>" > </script>
|
||||
|
||||
|
|
@ -284,7 +284,6 @@
|
|||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user