Edit C:\Users\Administrator\Desktop\Back\Livraison EVQG22\sales\contratproduit_\edit.jsp
<%/****************************************************************************** * Copyright (c) 2000-2006 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.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.grid.GridData" %> <%@ page import="com.edeal.frontline.*" %> <%@ page import="com.edeal.frontline.controller.actions.SelectAction" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.ProductGroupEntryBean" id="ProductGroupEntry" scope="request"/> <jsp:useBean class="com.edeal.frontline.ProductBean" id="Product" scope="request"/> <jsp:useBean class="com.edeal.frontline.custom.ContratProduit_Bean" id="ContratProduct" scope="request"/> <html> <head> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/master_css.jsp"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/checkFields.jsp"/>"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ac/fobAC_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <script language="javascript" type="text/javascript" src="<fl:webapp/>/js/smalltabs.jsp"></script> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); String id =""; String Cr_Contrat = flRequest.getParameter("initCr_Contrat"); if (Cr_Contrat == null) { Cr_Contrat = ""; } %> <script type="text/javascript" language="javascript"> // Used to handle the action taken when the user hits the enter key var currentAction = 0; var doSubmitProd = false; var produitID = ''; // Used to process price changes function doOnLoad() { document.onkeyup = checkEventKey; show(); hide(); refreshSelectedList(); var forms = document.getElementsByTagName('form'); for (var i=0;i < forms.length;i++) { var inputs = forms[i].getElementsByTagName('input'); for (var j=0;j < inputs.length;j++) addInputSubmitEvent(forms[i], inputs[j]); } } function addInputSubmitEvent(form, input) { input.onkeydown = function(e) { e = e || window.event; if (e.keyCode == 13) { form.submit(); return false; } return true; }; } function checkEventKey(event) { var keyPress = 0; try { keyPress = event.which; } catch (error) { } if (keyPress == 0) { try { keyPress = window.event.keyCode; } catch (error) { } } if (acCurHighlightedDiv == null && keyPress == 13) { switch (currentAction) { case 0: doSearch(); break; case 1: saveConProd(); break; case 2: currentAction=0; break; default: break; } } return false; } function doSearch() { var parameters=new Array(); var f = window.document.forms[0]; if (f.PrdName.value != '' && f.PrdName.value != '<fl:getMessage code="L6122" alt="<Désignation>" js="true"/>') { //str += "&PrdName=" + f.PrdName.value; parameters["PrdName"]=f.PrdName.value; } if (f.PrdFamilyID.value != '' && f.lblPrdFamilyID.vale != '<fl:getMessage code="L635D" alt="<Famille>" js="true"/>') { //str += "&PrdFamilyID=" + f.PrdFamilyID.value; parameters["PrdFamilyID"]=f.PrdFamilyID.value; } if (f.PrdCode.value != '' && f.PrdCode.value != '<fl:getMessage code="M602D" alt="<Code>" js="true"/>') { //str += "&PrdCode=" + f.PrdCode.value; parameters["PrdCode"]=f.PrdCode.value; } parameters['ListProduct_$$nb']=0; parameters['ListProduct_$$idx']=0; _grid__ListProduct_js_.callAjaxForHtml(_grid__ListProduct_js_.getAjaxUrl(),parameters,true,false,null,false,false); } function hide() { divDisplay = document.getElementById('createProd'); divDisplay.style.visibility = 'hidden'; document.getElementById('conprdItemSubmit').style.visibility = 'hidden'; } function show() { document.getElementById('createProd').style.visibility = 'visible'; document.getElementById('conprdItemSubmit').style.visibility = 'visible'; } function selectProd(PrdID) { produitID = PrdID; doSubmitProd = true; currentAction = 1; selectProdOpp(PrdID, ''); } function selectProdOpp(PrdID, ProID) { var strUrl = '<fl:link url="<%= \"/ajax_opp_selectprod.fl?\" %>"/>'; if (ProID != '') { strUrl += '&ProID=' + ProID; } if (PrdID != '') { strUrl += '&PrdID=' + PrdID; } strUrl += '&Cr_ID=<%= id %>'; doAjax(strUrl); show(); } function saveConProd() { if (!doSubmitProd) { return; } if(produitID == '') { return; } var f = window.document.forms[0]; if (f.Cr_DateDebut.value == '') { alert('<fl:getMessage code="MF02A" alt="La date de début est obligatoire" js="true"/>'); f.Cr_DateDebut.focus(); return ; } var args = '&type=ContratProduit_&$$presentFields='; if (f.ProID.value != '') { args += '&id=' + f.ProID.value; } args += '&Cr_Contrat=<%= Cr_Contrat %>'; args += '&Cr_Produit=' + produitID; args += '&Cr_DateDebut=' + encodeURIComponent(f.Cr_DateDebut.value); if (f.Cr_DateFin.value != '') { args += '&Cr_DateFin=' + encodeURIComponent(f.Cr_DateFin.value); } else { args += '&Cr_DateFin='; } if (f.Cr_DateTransfert.value != '') { args += '&Cr_DateTransfert=' + encodeURIComponent(f.Cr_DateTransfert.value); } else { args += '&Cr_DateTransfert='; } if (f.Cr_DateRetour.value != '') { args += '&Cr_DateRetour=' + encodeURIComponent(f.Cr_DateRetour.value); } else { args += '&Cr_DateRetour='; } if (f.Cr_Commentaires.value != '') { args += '&Cr_Commentaires=' + encodeURIComponent(f.Cr_Commentaires.value); } else { args += '&Cr_Commentaires='; } if(f.Cr_Statut.value != '') { args += '&Cr_Statut=' + encodeURIComponent(f.Cr_Statut.value); } else { args += '&Cr_Statut='; } var url = '<fl:link url="/save_object_ajax.fl?1=1"/>' + args; currentAction = 2; // To prevent search list from automatically triggering document.getElementById('searchHref').focus(); // To prevent IE from beeping when next enter is pressed doAjax(url); hide(); doSubmitProd = false; window.setTimeout(doClose, 1000); } function doClose() { window.top.close(); } function doSubmit() { return true; } </script> </head> <body style="height: auto;"> <div id="object_css" style="top: 0px;"> <fl:form action="javascript:saveConProd()" bean="ProductGroupEntry"> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"L653F\", \"Devis\")%>" ou="<%= \"/edit_productgroupentry.fl\" + (id != null ? \"?id=\" + id : \"\")%>"> <input type="hidden" name="$$returnedHtmlHead" value=""> <input type="hidden" name="$$returnedHtmlBody" value="..."> <input type="hidden" name="ProOppID" value=""> <input type="hidden" name="ProPrdID" value=""> <input type="hidden" name="total" value=""> <table class="container" cellpadding="0" border="0"> <tr> <td style="width:15%"> <!-- Begin search area --> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td colspan="2" class="titreInterneSmalltabs"><fl:getMessage code="F2048" alt="Produits"/></td> </tr> <tr valign="top" class="ligne_separation"><td></td></tr> <tr valign="top"> <td id="PrdFamilyID_label" class="dataValue" colspan="2"> <div class="input fieldTable"> <table class="fieldTable" cellpadding="0" cellspacing="0"> <tbody> <tr valign="top"> <td class="principalText bigFieldPart"> <div class="fobLeftDiv"> <input id="PrdFamilyID" name="PrdFamilyID" value="" type="hidden"/> <input id="lblPrdFamilyID" name="lblPrdFamilyID" value="<fl:getMessage code="L635D" alt="<Famille>"/>" autocomplete="off" onfocus="displayOnFocus(this);acResizeDisplayDiv(this);" class="input fob" type="text" style="width: 100%;"/> </div> </td> <td class="smallFieldPart"> <a href="javascript:var win = window.open('<fl:webapp/>/select.fl?type=ProductFamily&field=PrdFamilyID&formIndex=0', 'SelectProductFamily', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=800,height=400')"><img src="<fl:webapp/>/icons/ico/rechercher.gif" class="icon" alt="Sélectionner" title="Sélectionner"></a> <a href="javascript:var f = window.document.forms[0]; f.PrdFamilyID.value = ''; f.lblPrdFamilyID.value = '<fl:getMessage code="L635D" alt="<Famille>" js="true"/>'; acLastCompleteValues['lblPrdFamilyID'] = '';acLastCompleteValues['PrdFamilyID'] = ''; void('')"><img src="<fl:webapp/>/icons/ico/supprimer.gif" class="icon" alt="Vider le champ" title="Vider le champ"></a><script language="javascript">runOnTime("installFobAC(document.forms[0].lblPrdFamilyID);", 200);</script> </td> </tr> </tbody> </table> </div> </td> </tr> <tr valign="top"> <td colspan="2"> <div style="margin-top: 5px;" > <input name="PrdCode" type="text" class="input text" value="<fl:getMessage code="M602D" alt="<Code>"/>" size="20" onfocus="if (this.value=='<fl:getMessage code="M602D" alt="<Code>" js="true"/>') this.value=''" onblur="if(this.value == '') this.value = '<fl:getMessage code="M602D" alt="<Code>" js="true"/>';"> </div> </td> </tr> <tr valign="top"> <td colspan="2"> <div style="margin-top: 5px;" > <input name="PrdName" type="text" class="input text" value="<fl:getMessage code="L6122" alt="<Désignation>"/>" size="20" onfocus="if (this.value=='<fl:getMessage code="L6122" alt="<Désignation>" js="true"/>') this.value=''" onblur="if(this.value == '') this.value = '<fl:getMessage code="L6122" alt="<Désignation>" js="true"/>';"> </div> </td> </tr> <tr> <td align="center" colspan="2"> <div style="margin-top: 10px;" > <a id="searchHref" href="javascript:doSearch();" onmouseover="window.status = '<fl:getMessage code="A2009" alt="Rechercher" js="true"/>'; return true;" onmouseout="window.status = ''; return true;"><img src="<fl:webapp/>/icons/ico/valid_green2_long.gif" border="0" alt="<fl:getMessage code="A2009" alt="Rechercher"/>"></a> </div> </td> </tr> </table> </td> <!-- Fin search area --> <!-- Liste des produits --> <td width="85%" height="180px"> <fl:smallTabs name="ProductList"> <fl:sTab id="ListePrd" hideLink="true" title="<%= Utils.getMessage(session, \"L603D\", false, true, \"Liste des produits\")%>"> <table width="100%"> <tr> <td width="100%"> <div class="edealGrid" style="overflow: auto; height: 200px;"> <fl:grid height="200px" name="ListProduct" ajaxUrl="/list_custom_opp_listproduct_ajax.fl"/> </div> </td> </tr> </table> </fl:sTab> </fl:smallTabs> </td> </tr> <!-- Fin Liste des produits --> <!-- Produit Selectionné --> <tr> <td width="15%"> </td> <td width="85%" height="100px"> <fl:smallTabs name="ProductEntry"> <fl:sTab id="PrdEntry" hideLink="true" title="<%= Utils.getMessage(session, \"L638A\", \"Sélection\")%>"> <div id="createProd" class="edealGrid" style="visibility: hidden;"> <div id="grid-data" class="data"> <table cellpadding="0" cellspacing="0"> <thead><tr valign="top"> <th style="width: 10%;"> <fl:getMessage code="F2000" alt="Code"/> </th> <th style="width: 5%;"> </th> </tr></thead> <tbody> <tr valign="top" class="even bean"> <td id="edit_Code" style="width: 10%;"> </td> <td style="width: 5%; text-align: center;"> <input type="hidden" name="ProID" value=""> <a id="prdItemSubmit" type="submit" href="javascript:saveConProd();"><img src="<fl:link url="/icons/ico/cochevalid.gif"/>"></a> </td> </tr> </table> </div></div></div> </fl:sTab> </fl:smallTabs> </td> </tr> <!--Fin Produit Selectionné --> <!-- Liste des produits Selectionnés --> <tr> <td width="15%" align="center" valign="center"> <a id="conprdItemSubmit" href="javascript:saveConProd();" type="submit" style="visibility: hidden;"><img src="<fl:webapp/>/icons/ico/valid_green_long.gif" value="<fl:getMessage code="A3035" alt="Fermer"/>"></a> </td> <td width="85%"> <fl:smallTabs name="ProductSelected"> <fl:sTab id="PrdSel" hideLink="true" title="<%= Utils.getMessage(session, \"L1035\", false, true, \"Détail\")%>"> <div id="ProdOppTable" class="edealGrid" style="overflow: auto; height: 160px;"> <table class="container" cellpadding="0" style="width: 100%;"> <fl:fieldEdit name="ContratProduct" property="Cr_Statut" alt="" /> <fl:fieldEdit name="ContratProduct" property="Cr_DateDebut" mandatoryMsgCode="MF02A" /> <fl:fieldEdit name="ContratProduct" property="Cr_DateFin"/> <fl:fieldEdit name="ContratProduct" property="Cr_DateTransfert"/> <fl:fieldEdit name="ContratProduct" property="Cr_DateRetour"/> <fl:fieldEdit name="ContratProduct" property="Cr_Commentaires"/> </table> </div> </fl:sTab> </fl:smallTabs> </td> </tr> </table> </fl:bigTabs> </fl:form> <fl:title title="<%=Utils.getMessage(session, \"L6321\", false, true, \"Groupe de produit\")%>"/> </div> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de