This commit is contained in:
KANE LAZENI 2026-07-15 13:56:15 +00:00
parent 90c9661756
commit 8d3f81fbe6
4 changed files with 183 additions and 6 deletions

View File

@ -0,0 +1,66 @@
<?php
require_once 'vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
require_once 'Framework/Controleurrequete.php'; // OK
require_once 'Modele/Prestataire.php';
class ControleurAjaxexclureservices extends Controleurrequete
{
private $prestataire;
public function __construct()
{
$this->prestataire = new Prestataire();
}
public function index()
{
$codePrestataire = $_SESSION['codePrestataire_C'];
$medecinsnonaccessibles = $this->prestataire->getmedecinsnonaccessibles($codePrestataire);
$medecinsaccessibles = $this->prestataire->getmedecinsprestataire($codePrestataire);
$this->genererVueAjax(array('medecinsnonaccessibles' => $medecinsnonaccessibles, 'medecinsaccessibles' => $medecinsaccessibles));
}
public function ajouterunmedecinprestataire()
{
$codePrestataire = $_SESSION['codePrestataire_C'];
$codeMedecin = $this->requete->getParametreFormulaire("codeMedecin");
$this->prestataire->ajouterunmedecinprestataire($codePrestataire, $codeMedecin);
$this->executerAction("index");
}
public function retirertousmedecinsprestataire()
{
$codePrestataire = $_SESSION['codePrestataire_C'];
$this->prestataire->retirertousmedecinsprestataire($codePrestataire);
$this->executerAction("index");
}
public function ajoutertousmedecinsprestataire()
{
$codePrestataire = $_SESSION['codePrestataire_C'];
$this->prestataire->ajoutertousmedecinsprestataire($codePrestataire);
$this->executerAction("index");
}
public function retirerunmedecinprestataire()
{
$codePrestataire = $_SESSION['codePrestataire_C'];
$codeMedecin = $this->requete->getParametreFormulaire("codeMedecin");
$this->prestataire->retirerunmedecinprestataire($codePrestataire, $codeMedecin);
$this->executerAction("index");
}
}

View File

@ -45584,4 +45584,37 @@ function afficher_demande_fraisfun(idBeneficiaire, no) {
alert("Erreur lors de la mise à jour du contexte bénéficiaire.");
}
});
}
}
// 15/07/2026 => exclusion services
function retirer_exclusion_un_service_prestataire(codeFamilleActe)
{
codePrestataire=$("#codePrestataire").val();
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
return;
}
donnees = 'codePrestataire='+codePrestataire+'&codeFamilleActe='+codeFamilleActe;
$("#div_medecins_prestataire").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Exclureservices/retirerexclusionunserviceprestataire/",
type: 'POST',
data: donnees,
success: function(data) {
$('#div_medecins_prestataire').html(data);
},
error: function(data) {
},
complete: function()
{
}
});
}

View File

@ -0,0 +1,75 @@
<div class="row">
<div id="div_medecin_1" class="col-xs-7" >
<legend> <?= _("Services non exlus") ?> </legend>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
<thead>
<tr>
<th style='text-align:center'> <?= _("Code") ?> </th>
<th style='text-align:center'> <?= _("Famille Acte") ?> </th>
<th style='text-align:center'> => </th>
</tr>
<tr>
<th colspan="5"> <button type="button" style="font-size:8pt;" class="form-control btn btn-primary" onclick="javascript:exclure_tous_services_prestataire();" > <?= _("Ajouter tous"). " ==>" ?> </button> </th>
</tr>
</thead>
<tbody>
<?php foreach ($servicesnonexclus as $servicenonexclu):
$idFamilleActe = $servicenonexclu['idFamilleActe'];
$codeFamilleActe = $servicenonexclu['codeFamilleActe'];
?>
<tr valign="top">
<td align='center'> <?= $this->nettoyer($servicenonexclu['codeFamilleActe']) ?> </td>
<?php if (est_anglophone()): ?>
<td><?= $this->nettoyer($servicenonexclu['libelleEng']) ?></td>
<?php else: ?>
<td><?= $this->nettoyer($servicenonexclu['libelle']) ?></td>
<?php endif; ?>
<td align='center'> <input type="button" value="=>" onClick="javascript:exclure_un_servive_prestataire('<?=$codeFamilleActe?>');" ></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div id="div_medecin_2" class="col-xs-5" >
<legend> <?= _("Services exlus") ?> </legend>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
<thead>
<tr>
<th style='text-align:center'> <= </th>
<th style='text-align:center'> <?= _("Code") ?> </th>
<th style='text-align:center'> <?= _("Famille Acte") ?> </th>
</tr>
<tr>
<td colspan="4"> <button type="button" style="font-size:8pt;" class="form-control btn btn-danger" onclick="javascript:retirer_exclusion_tous_servives_prestataire();" > <?= "<== " . _("Retirer tous les réseaux") ?> </button> </td>
</tr>
</thead>
<tbody>
<?php foreach ($servicesexclus as $serviceexclu):
$idExclu = $serviceexclu['idExclu'];
$codeFamilleActe = $serviceexclu['codeFamilleActe'];
?>
<tr valign="top">
<td align='center'> <input type="button" value="<=" onClick="javascript:retirer_exclusion_un_service_prestataire('<?=$codeFamilleActe?>');" ></td>
<td align='center'> <?= $this->nettoyer($serviceexclu['codeFamilleActe']) ?> </td>
<?php if (est_anglophone()): ?>
<td><?= $this->nettoyer($servicenonexclu['libelleEng']) ?></td>
<?php else: ?>
<td><?= $this->nettoyer($servicenonexclu['libelle']) ?></td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>

View File

@ -16,12 +16,15 @@
<tbody>
<tr valign="top">
<td align='center' width="60%" ><INPUT style="font-size:12pt;" class="form-control" TYPE="text" value="Services exclus du prestataire : <?= $nomPrestataire ?> " disabled ></td>
<td align='center'> <button type="button" style="font-size:10pt;" class="form-control btn btn-primary" onclick="javascript:afficher_medecins_prestataire();" > <?= _("Actualiser...") ?> </button> </td>
<td align='center'> <button type="button" style="font-size:10pt;" class="form-control btn btn-primary" onclick="javascript:afficher_services_prestataire();" > <?= _("Actualiser...") ?> </button> </td>
</tr>
</tbody>
</table>
<div id="div_medecins_prestataire">
<?php require "Vue/Ajaximpayeclient/index.php";?>
<div class="row">
<div id="div_medecin_1" class="col-xs-7" >
<legend> <?= _("Services non exlus") ?> </legend>
@ -34,7 +37,7 @@
</tr>
<tr>
<th colspan="5"> <button type="button" style="font-size:8pt;" class="form-control btn btn-primary" onclick="javascript:ajouter_tous_medecins_prestataire();" > <?= _("Ajouter tous"). " ==>" ?> </button> </th>
<th colspan="5"> <button type="button" style="font-size:8pt;" class="form-control btn btn-primary" onclick="javascript:exclure_tous_services_prestataire();" > <?= _("Ajouter tous"). " ==>" ?> </button> </th>
</tr>
</thead>
@ -53,7 +56,7 @@
<td><?= $this->nettoyer($servicenonexclu['libelle']) ?></td>
<?php endif; ?>
<td align='center'> <input type="button" value="=>" onClick="javascript:ajouter_un_medecin_prestataire('<?=$codeFamilleActe?>');" ></td>
<td align='center'> <input type="button" value="=>" onClick="javascript:exclure_un_servive_prestataire('<?=$codeFamilleActe?>');" ></td>
</tr>
<?php endforeach; ?>
</tbody>
@ -71,7 +74,7 @@
</tr>
<tr>
<td colspan="4"> <button type="button" style="font-size:8pt;" class="form-control btn btn-danger" onclick="javascript:retirer_tous_medecins_prestataire();" > <?= "<== " . _("Retirer tous les réseaux") ?> </button> </td>
<td colspan="4"> <button type="button" style="font-size:8pt;" class="form-control btn btn-danger" onclick="javascript:retirer_exclusion_tous_servives_prestataire();" > <?= "<== " . _("Retirer tous les réseaux") ?> </button> </td>
</tr>
</thead>
@ -82,7 +85,7 @@
$codeFamilleActe = $serviceexclu['codeFamilleActe'];
?>
<tr valign="top">
<td align='center'> <input type="button" value="<=" onClick="javascript:retirer_un_medecin_prestataire('<?=$codeFamilleActe?>');" ></td>
<td align='center'> <input type="button" value="<=" onClick="javascript:retirer_exclusion_un_service_prestataire('<?=$codeFamilleActe?>');" ></td>
<td align='center'> <?= $this->nettoyer($serviceexclu['codeFamilleActe']) ?> </td>