Edit C:\galaxie\Back\galaxie\sales\classement_\edit.jsp
<%/****************************************************************************** * Copyright (c) 2000-2005 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. ******************************************************************************/ %> <%@page session="true"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.custom.Classement_Bean"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.custom.Classement_Bean" id="Classement_" scope="request"/> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); String id = null; try { id = Classement_.getID(); } catch (FieldNotInitializedException fnie) {} String dossierID = null; try { dossierID = Classement_.getCl_Dossier(); } catch (FieldNotInitializedException fnie) { } String tiersID = null; try { tiersID = Classement_.getCl_Tiers(); } catch (FieldNotInitializedException fnie) { tiersID =""; } String comiteID = null; try { comiteID = Classement_.getCl_Comite(); } catch (FieldNotInitializedException fnie) { comiteID =""; } // récupérer l'id de la typologie du dossier classé String typoDossierID = null; typoDossierID = flRequest.getParameter("initCl_DossClassType"); // Typologie String classTypoID = null; String themTypoID = null; String semvertTypoID = null; String adhesionTypoID = null; String reclassTypoID = null; String suiviQualiteID = null; try { classTypoID = (String) dico.getRefIdByCode("Ds_Typologie", "CLASSEMENT"); themTypoID = (String) dico.getRefIdByCode("Ds_Typologie", "THEMATIQUE"); semvertTypoID = (String) dico.getRefIdByCode("Ds_Typologie", "SEMINAIRE_VERT"); adhesionTypoID = (String) dico.getRefIdByCode("Ds_Typologie", "ADHES"); reclassTypoID = (String) dico.getRefIdByCode("Ds_Typologie", "RECL"); suiviQualiteID = (String) dico.getRefIdByCode("Ds_Typologie", "SVQUAL"); } catch (Exception e) { classTypoID = ""; themTypoID = ""; semvertTypoID = ""; adhesionTypoID = ""; reclassTypoID = ""; suiviQualiteID = ""; } if(typoDossierID == null) { typoDossierID = classTypoID; } String ruptureRefID = null; String retrogradRefID = null; String reclassRefID = null; String reintegAccRefID = null; String reintegRejRefID = null; String promoRefID = null; String demAdhRefID = null; String radiationSuiviRefID = null; String radiationDemissionRefID = null; String radiationVenteRefID = null; String radiationCessationRefID = null; String radiationHorsCharteRefID = null; String SuiviQltRefID = null; String DossSpeRefID = null; try { ruptureRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "RUPTCONTRAT"); retrogradRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "RETROGRAD"); reclassRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "RECLASS"); reintegAccRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "REINTACC"); reintegRejRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "REINTREJ"); promoRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "PROMO"); demAdhRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "DEMADH"); SuiviQltRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "SUIVIQUA"); DossSpeRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "DOSSPE"); radiationSuiviRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "RADSUIVQ"); radiationDemissionRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "RADDEM"); radiationVenteRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "RADVEN"); radiationCessationRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "RADCESACT"); radiationHorsCharteRefID = (String) dico.getRefIdByCode("Cl_ClassDecision", "RADHCH"); } catch (Exception e) { reintegAccRefID = ""; reintegRejRefID = ""; ruptureRefID = ""; retrogradRefID = ""; reclassRefID = ""; promoRefID = ""; demAdhRefID = ""; radiationSuiviRefID = ""; radiationDemissionRefID = ""; radiationVenteRefID = ""; radiationCessationRefID = ""; radiationHorsCharteRefID = ""; SuiviQltRefID = ""; DossSpeRefID = ""; } String cocRefID = null; String chemRefID = null; try { cocRefID = (String) dico.getRefIdByCode("Cl_ClassType", "COC"); chemRefID = (String) dico.getRefIdByCode("Cl_ClassType", "CHE"); } catch (Exception e) { cocRefID = ""; chemRefID = ""; } String classID = null; String typeClassID = null; String restClassID = null; String classementID = null; try { classID = Classement_.getCl_ClassDecision(); } catch (FieldNotInitializedException e1){ } try { typeClassID = Classement_.getCl_ClassType(); } catch (FieldNotInitializedException e2){ } try { classementID = Classement_.getCl_Classement(); } catch (FieldNotInitializedException e2){ } Boolean affChdecision = true; if (classID != null) { if ((classID.equals(retrogradRefID) || classID.equals(reclassRefID) || classID.equals(promoRefID) || classID.equals(demAdhRefID) || classID.equals(SuiviQltRefID) || classID.equals(DossSpeRefID) || classID.equals(reintegAccRefID) || classID.equals(reintegRejRefID))) { affChdecision = true; } else { affChdecision = false; } } Boolean affChpsRupture = false; if(classID != null) { if(classID.equalsIgnoreCase(ruptureRefID) || classID.equalsIgnoreCase(radiationDemissionRefID) || classID.equalsIgnoreCase(radiationVenteRefID) || classID.equalsIgnoreCase(radiationCessationRefID) ){ affChpsRupture = true; } } %> <script type="text/javascript" language="javascript"> function loadClassement(ctrID) { if (ctrID == undefined || ctrID == null || ctrID == '') { $("#Cl_Classement").html("<option value=''> </option>"); $("#Cl_Classement").width($("#div_Cl_Classement").width()); return; } $.getJSON("<fl:webapp/>/get_classement_classements.fl?ctrID=" + ctrID, function(data) { if (data != null) { var optContent = ""; for (var i = 0; i < data.length; i++) { var optValue = data[i].value; var optText = data[i].text; optContent += "<option" <% if (typeClassID != null) { %> if (optValue == '<%=classementID%>') { optContent += " selected"; } <% } %> optContent += " value='" + optValue + "'>" + optText + "</option>" } $("#Cl_Classement").html(optContent); $("#Cl_Classement").width($("#div_Cl_Classement").width());//For IE7 } }); } function doCl_DecisionChange() { doRefreshClassement_(); } function doCl_ClassTypeChange() { doRefreshClassement_(); } function doSubmit() { var f = document.forms[0]; return true; } function doRefreshClassement_() { var f = document.forms[0]; f.action = "<fl:webapp/>/refresh_classement_.fl?initCl_DossClassType=<%=typoDossierID%>"; f.submit(); } function createAndContinue() { var f = document.forms[0]; f.action = "continue_classement_.fl?initCl_Dossier=<%= dossierID %>&initCl_Tiers=<%= tiersID %>&initCl_Comite=<%= comiteID %>&initCl_DossClassType=<%= typoDossierID %>"; submit(); } function doOnLoad() { var f = document.forms[0]; refreshClass(); loadClassement(f.Cl_ClassType.value); } function refreshClass(){ _grid__CLAS_EMB_js_.render(); } function waitNrefreshSLCl_(arrIndex) { currentState = 0; if (eDealXmlhttpArr[arrIndex].readyState == 4) { refreshClass(); } } function deleteMarkedCl_(Cl_ID) { if(Cl_ID.indexOf('<%=id%>') > -1) { if (confirm('<fl:getMessage code="MF107" alt="Vous êtes sur le point de supprimer la décision courante ?" js="true"/>')) { //doAjax('<fl:webapp/>/read_classement_.fl?id=' + Cl_ID); window.location.replace('<fl:webapp/>/read_classement_.fl?id=' + Cl_ID); } }else{ if (confirm('<fl:getMessage code="MF0B8" alt="Etes-vous sûr de vouloir supprimer ce classement ?" js="true"/>')) { doAjax('<fl:webapp/>/delete_object_ajax.fl?type=Classement_&id=' + Cl_ID , waitNrefreshSLCl_); } } } </script> <fl:form action="save_classement_.fl" bean="Classement_"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"LF014\", \"Classement\") %>" ou="<%= \"edit_classement_.fl\" + (id != null ? \"?id=\" + id : \"\")%>" > <% if (dossierID != null) { %> <input type="hidden" name="Cl_Dossier" value="<%=dossierID%>"> <%} %> <table class="container" cellpadding="0"> <%-- <tr> <td colspan="5"> <table class="container" cellpadding="0"> <tr class="fieldLine"> <td class="labelTitreFiche"> <fl:label field="Cl_Label" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <fl:input property="Cl_Label" mandatoryMsgCode="M60BF"/> </td> </tr> </table> </td> </tr> --%> <tr class="ligne_separation"><td></td></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="Cl_Tiers" mandatoryMsgCode="MF01F"/> <fl:fieldEdit property="Cl_Comite"/> <tr class="ligne_separation"><td></td></tr> <td class="titreInterneSmalltabs" colspan="5"> <fl:getMessage code="FF094" alt="Décision Comité"/> </td> <tr class="ligne_separation"><td></td></tr> <fl:fieldEdit property="Cl_ClassDecision" onchange="doCl_DecisionChange();"/> <% if( affChdecision && ((typoDossierID != null && typoDossierID.equals(classTypoID)) || (typoDossierID != null && typoDossierID.equals(adhesionTypoID)) || (typoDossierID != null && typoDossierID.equals(reclassTypoID)) || (typoDossierID != null && typoDossierID.equals(suiviQualiteID)))) { %> <!--<fl:fieldEdit property="Cl_HotDecision" onchange="doCl_DecisionChange();"/> --> <fl:fieldEdit property="Cl_ClassType" onchange="loadClassement(this.value);"/> <fl:fieldEdit property="Cl_Classement"/> <fl:fieldEdit property="Cl_SenVert"/> <fl:fieldEdit property="Cl_Observation"/> <%} else if (affChdecision && (typoDossierID != null && typoDossierID.equals(themTypoID))) {%> <fl:fieldEdit property="Cl_ThemaRet"/> <fl:fieldEdit property="Cl_Observation"/> <%} else if (affChdecision && (typoDossierID != null && typoDossierID.equals(semvertTypoID))) {%> <fl:fieldEdit property="Cl_SenVert"/> <fl:fieldEdit property="Cl_Observation"/> <%} else{ %> <fl:fieldEdit property="Cl_Observation"/> <%} %> <% if (affChpsRupture) { %> <fl:fieldEdit property="Cl_DateRuptuCt"/> <fl:fieldEdit property="Cl_MotifRupture"/> <%} %> <tr class="ligne_separation"><td></td></tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="Cl_Aud" alt=""/> <fl:fieldEdit property="Cl_TypAud" alt=""/> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> </table> <table class="container" cellpadding="0"> <tr class="ligne_separation"><td></td></tr> <tr> <td class="titrePartie"><fl:getMessage code="L64B4" alt="Commentaires"/></td> </tr> <tr> <td class="dataValue noPaddingLeft"> <fl:input property="Cl_Commentaires" style="width:100%" nodiv="false"/> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr class="ligne_separation_couleur"><td></td></tr> <tr class="ligne_separation"><td></td></tr> </table> <% if (dossierID != null) {%> <fl:smallTabs name="DossierTabs"> <fl:sTab id="OtherClassements" title="<%=Utils.getMessage(session, \"LF195\", false, true, \"Autres Classements du même dossier\")%>" onselect="refreshClass();"> <fl:grid name="CLAS_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=CLAS_EMB&Cl_Dossier=\" + dossierID %>"/> </fl:sTab> </fl:smallTabs> <%} %> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de