Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\product\read.jsp
<%@page import="com.edeal.frontline.helper.custom.PriceSeasonality_Helper"%> <% /****************************************************************************** * 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.DataDictionary" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="java.util.Vector" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.ProductBean" id="Product" 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; String pdfID = null; String pdfFileName = null; String logo = null; String sfwID = flRequest.getRequestParameterOrAttribute("SfwID"); String currentMillesime = context.getContextParameter("Millesime"); try { id = Product.getID(); } catch (FieldNotInitializedException fnie) { } boolean isGroup = false; try { String prdType = Product.getPrdTypID(); isGroup = prdType != null && prdType.equals(dico.getRefIdByCode("PrdTypID","GROUPE")); } catch (FieldNotInitializedException fnie) { } boolean isCalcul = false; if (isGroup){ try{ String idPriceType = Product.getPrdTprID(); isCalcul = idPriceType !=null && idPriceType.equals(dico.getRefIdByCode("PrdTprID", "CAL")); }catch(FieldNotInitializedException fnie){} } try{ pdfID = Product.getPrdPdfID(); pdfFileName = Product.getPrdPdfFileName(); } catch (FieldNotInitializedException fnie) { } try{ logo = Product.getPrdPicID(); } catch (FieldNotInitializedException fnie) { } String tailleTab1 = "50%"; String tailleTab2 = "50%"; if (logo!=null){ tailleTab1 = "45%"; tailleTab2 = "35%"; } boolean isGesStocks = false; try { isGesStocks = new Boolean(Product.getCustomProperty("PrdGestionStocks_").toString()); } catch (FieldNotInitializedException ex) { } String productFamilyID = null; String productFamilyVal = null; try { productFamilyID = (String)Product.getCustomProperty("PrdFamilleProduit_"); productFamilyVal = dico.getRefCode("PrdFamilleProduit_", productFamilyID); } catch (FieldNotInitializedException fnie) { } boolean isIncludedInCot = false; try { isIncludedInCot = (Boolean)Product.getCustomProperty("PrdIncludedInCot_"); } catch (FieldNotInitializedException fnie) { } //PrdDontApplyTVArules_ boolean PrdDontApplyTVArules_ = false; try { PrdDontApplyTVArules_ = (Boolean)Product.getCustomProperty("PrdDontApplyTVArules_"); } catch (FieldNotInitializedException fnie) { } /* String label = null; try { label = (String)Product.getCustomProperty("PrdLabel_"); label = Utils.getMessage(session, label, Utils.getMessage(session, "L60E0", "<non spécifié>")); } catch (FieldNotInitializedException fnie) { } */ %> <style> .borderLineOne { border-right: 1px dashed #9EC6D0; border-bottom: 1px dashed #9EC6D0; } .black_overlay { display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 200%; background-color: grey; z-index: 1001; y-index: -200; -moz-opacity: 0.8; opacity: .50; filter: alpha(opacity = 50); } .white_content { display: none; position: absolute; top: 35%; left: 35%; width: 20%; height: 25%; padding: 5px; border: 5px solid DodgerBlue; background-color: white; z-index: 1002; overflow: auto; } </style> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script language="javascript"> function doOnLoad(){ refreshList(); } function waitNrefresh(){ setTimeout("refreshList()", 50); } function refreshList(){ <% if (isGroup) { %> doAjax('<fl:webapp/>/groupEntries_table_ajax.fl?PrdID=<%= id %>&listOnly=true'); <% } %> } function refreshSelectedPrd(){ setTimeout("refreshList()", 100); } function refreshHisto(){ _grid__HISTO_EMB_js_.render(); } function refreshPrices(){ var millesime = document.getElementById("Ps_Millesime").value; myAjaxURL_Ps_EMB = _grid__PS_EMB_js_.getAjaxUrl(); params = {}; params["Ps_PrdID"]='<%=id%>'; if(millesime != ''){ params["Ps_Millesime$From"]=millesime; params["Ps_Millesime$To"]=millesime; }else{ params["Ps_Millesime$From"]=""; params["Ps_Millesime$To"]=""; } params['_gridname'] = _grid__PS_EMB_js_.gridName _grid__PS_EMB_js_.callAjaxForHtml(myAjaxURL_Ps_EMB,params,false); updateMillesimeSearchCriteria(millesime); } function doRefresh() { window.top.location.reload(); } function deleteMarkedPriceSeasonality(ps_ID){ if (confirm('<fl:getMessage code="MF1DF" alt="Etes-vous sûr de vouloir supprimer cette Marque ?" js="true"/>')) { doAjax('<fl:webapp/>/delete_object_ajax.fl?type=PriceSeasonality_&id=' + ps_ID , waitNrefreshSPS_); } } function waitNrefreshSPS_(arrIndex) { if(eDealXmlhttpArr[arrIndex].readyState == 4) { var rtrn = trimStr(eDealXmlhttpArr[arrIndex].responseText); if (rtrn == '') { refreshPrices(); window.scrollTo(0,1000); } else { hideWaiting(); } } } function doAddPriceSeasonality() { window.open('<fl:webapp/>/create_price_seasonality_.fl?Ps_PrdID=<%= id == null ? "" : id %>' , 'Ajouter une Marque', 'width=800,height=300,menubar=no,status=no,toolbar=no,scrollbars=auto,resizable=no'); } </script> <input type="hidden" name="$$presentFields" value=""> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"F203E\", false, true, \"Produit\") %>" ou="<%= \"/read_product.fl\" + (id != null ? \"?id=\" + id : \"\")%>"> <table class="container" cellpadding="0"> <% if (id != null) { %> <tr class="fieldline"> <td colspan="3" class="titreFiche"> <fl:getProperty name="Product" property="PrdNamelng_" alt=" " /><br> </td> </tr> <% } %> <tr class="ligne_separation"><td></td></tr> <tr class="fieldline"> <td class="column2"> <table class="data_column" cellpadding="0"> <%-- <tr class="fieldline"> <td id="PrdLabel_" class="dataLabel"> <fl:label field="PrdLabel_"/> </td> <td id="Apercu_value" class="dataValue"> <fl:getMessage code="<%=label %>" alt=""/> </td> </tr> --%> <fl:fieldRead property="PrdCode" /> <fl:fieldRead property="PrdFamilleProduit_" /> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <fl:fieldRead property="PrdDistributeur_" /> <fl:fieldRead property="PrdFournisseur_" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_enterprise.fl\") %>"/> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <% if(!(productFamilyVal.startsWith("COT"))){ %> <% if(isGesStocks) { %> <tr class="fieldline"> <td id="Hs_label" class="dataLabel"> <fl:label field="PrdGestionStocks_"/> </td> <td id="Apercu_value" class="dataValue"> <input type="checkbox" checked="checked" disabled="disabled"/> </td> </tr> <fl:fieldRead property="PrdStockActuel_" /> <fl:fieldRead property="PrdStockMinimum_" /> <% } else { %> <tr class="fieldline"> <td id="Hs_label" class="dataLabel"> <fl:label field="PrdGestionStocks_"/> </td> <td id="Apercu_value" class="dataValue"> <input type="checkbox" disabled="disabled"/> </td> </tr> <% }}else{%> <fl:fieldRead property="PrdMaxQt_"/> <% } %> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"><fl:getMessage code="LF090" alt="Commercialisation"/></span></td> </tr> <fl:fieldRead property="PrdStatut_" /> <fl:fieldRead property="PrdPrice" postText=" €" format="money"/> <fl:fieldRead property="PrdPrixVenteUnitHTSais_" postText=" €" format="money"/> <fl:fieldRead property="PrdTVADefaut_" /> <fl:fieldRead property="PrdTaxeParafiscale_" /> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <fl:fieldRead property="PrdType_" /> <fl:fieldRead property="PrdPubSince"/> <fl:fieldRead property="PrdPubTo"/> <fl:fieldRead property="PrdCodeComptable_" /> <fl:fieldRead property="PrdCodeAnalytique_" /> <fl:fieldRead property="PrdCompteFrance_" /> <fl:fieldRead property="PrdCompteExport_" /> <fl:fieldRead property="PrdCompteINTRACOM_" /> <%-- <fl:fieldRead property="PrdActID" bean="true" disp="<%= flRequest.computeURL(\"/read_actor.fl\")%>" href="true"/> <fl:fieldRead property="PrdFamilyID" bean="true" disp="<%=flRequest.computeURL(\"/read_productfamily.fl\", true, true, true)%>" href="true"/> <fl:fieldRead property="PrdTypID"/> <% if(isGroup) { %> <fl:fieldRead property="PrdTprID"/> <% } %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F2043" alt="Prix unitaire"/></td> <td<%= isCalcul ? " id=\"productPriceTotal\"" : "" %> class="dataValue"><fl:getProperty name="Product" property="PrdPrice" format="#,##0.##" alt=""/> €</td> </tr> <fl:fieldRead property="PrdRopID"/> <fl:fieldRead property="PrdTvaID" postText="%"/> <fl:fieldRead property="PrdQualification" /> --%> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <% if(isIncludedInCot) { %> <tr class="fieldline"> <td id="Ct_label" class="dataLabel"><fl:getMessage code="FF24A" alt="Appartient aux cotisations"/></td> <td id="Apercu_value" class="dataValue"><input type="checkbox" disabled="disabled" checked="checked"/></td> </tr> <% } else { %> <tr class="fieldline"> <td id="Ct_label" class="dataLabel"><fl:getMessage code="FF24A" alt="Appartient aux cotisations"/></td> <td id="Apercu_value" class="dataValue"><input type="checkbox" disabled="disabled"/></td> </tr> <% } %> <% try { String picID = Product.getPrdPicID(); %> <tr class="fieldline"> <td> <img src="<fl:webapp/>/download?id=<%= picID %>" alt="" height="150" width="200"/> </td> </tr> <% } catch (Exception e) { } %> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <fl:fieldRead property="PrdRespProduit_" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_actor.fl\") %>"/> <tr class="fieldline"> <td id="PhVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <fl:fieldRead property="PrdID_partenaire_"/> <fl:fieldRead property="PrdTypologieProduit_"/> <%-- <fl:fieldRead property="PrdMillesime_" /> --%> <%-- <fl:fieldRead property="PrdCtrID_" /> --%> <fl:fieldRead property="PrdCtTypID_" /> <fl:fieldRead property="PrdOrderQst_" /> <tr class="fieldline"> <td id="Ct_label" class="dataLabel"><fl:getMessage code="FF29B" alt="Ne pas appliquer les règles de TVA" /></td> <td id="Apercu_value" class="dataValue"><input type="checkbox" disabled="disabled" <% if(PrdDontApplyTVArules_) { %>checked="checked" <% } %>/></td> </tr> <fl:fieldRead property="PrdRegles_" /> <fl:fieldRead property="PrdIsSaison_" /> <fl:fieldRead property="PrdCtrsID_" /> <%-- <fl:fieldRead property="PrdPubSince"/> <fl:fieldRead property="PrdPubTo"/> <% if (pdfID != null) { %> <tr class="fieldline"> <td id="PrdPdfID_label" class="dataLabel"> <fl:label code="F60C0"/> </td> <td id="PrdPdfID_value" class="dataValue"> <div> <fl:attach name="Product" colID="PrdPdfID" edit="false"/> </div> </td> </tr> <% } %> <fl:fieldRead property="PrdStock"/> <fl:fieldRead property="PrdPkgID"/> <fl:fieldRead property="PrdCptID" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_competitor.fl\") %>"/> --%> </table> </td> </tr> <tr class="ligne_separation"><td> </td></tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="ProductTabs"> <fl:sTab id="DescCol" title="<%= Utils.getMessage(session, \"FF11C\", \"Descriptif\") %>"> <div> <table class="container"> <tr class="fieldline"> <td class="dataValue"> <fl:getProperty name="Product" property="PrdProdCard" alt=" "/> </td> </tr> </table> </div> </fl:sTab> <fl:sTab id="DescCol" title="<%= Utils.getMessage(session, \"FF11D\", \"Informations complémentaires\") %>"> <div> <table class="container"> <tr class="fieldline"> <td class="dataValue"> <fl:getProperty name="Product" property="PrdInfosComplementaires_" alt=" "/> </td> </tr> </table> </div> </fl:sTab> <fl:sTab id="Histo" title="<%= Utils.getMessage(session, \"LF04A\", \"Historique de stocks\") %>" onselect="refreshHisto();" visible="<%= isGesStocks %>"> <fl:grid name="HISTO_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=HISTO_EMB&Hs_Produit=\" + id %>"/> </fl:sTab> <fl:sTab id="PtFort" title="<%= Utils.getMessage(session, \"FF120\", \"Forces\") %>"> <div> <table class="container"> <tr class="fieldline"> <td class="dataValue"> <fl:getProperty name="Product" property="PrdStrength" alt=" "/> </td> </tr> </table> </div> </fl:sTab> <fl:sTab id="PtFaible" title="<%= Utils.getMessage(session, \"FF121\", \"Faiblesses\") %>"> <div> <table class="container"> <tr class="fieldline"> <td class="dataValue"> <fl:getProperty name="Product" property="PrdWeakness" alt=" "/> </td> </tr> </table> </div> </fl:sTab> <fl:sTab id="Tarification" title="<%=Utils.getMessage(session, \"MF1E1\", \"Tarification\")%>" onselect="refreshPrices();"> <table class="container" cellpadding="0"> <tr> <td style="text-align: center;"> <select id="Ps_Millesime" class="criteriaField leftMargin10" style="width: 250px;"> </select> </td> <td align="right"><a id="valid-button" class="search-button inactive" style="margin-right: 150px;" title="Rechercher" href="javascript:refreshPrices();"><img src="<fl:webapp/>/icons/ico/valid_green2_long.gif"></a></td> </tr> <tr><td colspan="2" class="dataLabel"> </td></tr> <tr> <td colspan="2" align="right"> <span class="grid-action"> <a class="action-item" href="#" onclick="document.getElementById('light2').style.display='block';document.getElementById('fade2').style.display='block';document.getElementById('millesime').focus();return false;"> <fl:getMessage code="MF1E0" alt="Générer les prix"/> </a> </span> </td> </tr> <tr><td class="dataLabel"> </td></tr> </table> <fl:grid name="PS_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=PS_EMB&Ps_PrdID=\" + id %>"/> </fl:sTab> <fl:sTab id="PrdAttach" title="<%=Utils.getMessage(session, \"L201C\", \"Documents joints\")%>"> <fl:attach name="Product" colID="PrdAttID" edit="false"/> </fl:sTab> </fl:smallTabs> </fl:bigTabs> <div id="light2" class="white_content" align="center"> <br/> <span></span><strong><fl:getMessage code="MF1E5" alt="Génération des prix Pour ce produit " js="false"/></strong><span></span><br/> <fl:getMessage code="MF081" alt="Veillez saisir le millesime" js="false"/> <br/><br/> <input type="text" name="millesime" id="millesime" size="30"> <br/> <br/> <input type="button" id="btnSearch2" value="<%=Utils.getMessage(context, null, "A2002", true,true,"Annuler")%>" onClick="cancel();" onkeydown="if (event.keyCode == 13) document.getElementById('btnSearch2').click()"> <input type="button" value='<%=Utils.getMessage(context, null, "A304A", true,true,"Générer")%>' onClick="doGeneratePricesForSpeceficMil();" /><br/><br/> </div> <div id="fade2" class="black_overlay" onClick="cancel()"></div> <script type="text/javascript"> function cancel(){ document.getElementById('light2').style.display='none'; document.getElementById('fade2').style.display='none'; document.getElementById('millesime').className = ''; refreshPrices(); } function doGeneratePrices(millesime){ // var millesime = document.getElementById("millesime").value; if(millesime != undefined && millesime != ''){ var args = '&Ps_PrdID=<%=id %>'; args += '&Ps_Millesime=' + encodeURIComponent(millesime); var url = "<fl:webapp/>/genereate_PriceSeasonality_.fl?" + args; $.getJSON(url, function(data) { if(data.Status == "KO"){ alert('<fl:getMessage code="MF1E3" alt="Les prix de ce millésime existe déjà" js="true"/>'); document.getElementById('light2').style.display='none'; document.getElementById('fade2').style.display='none'; refreshPrices(); document.getElementById("millesime").value = ''; document.getElementById("millesime").className = '' return; } else{ window.scrollTo(0,1000); alert('<fl:getMessage code="MF1E2" alt="Les prix sont bien ajoutés pour le millésime" js="true"/>' + ' ' + millesime); refreshPrices(); document.getElementById('light2').style.display='none'; document.getElementById('fade2').style.display='none'; document.getElementById("millesime").value = ''; document.getElementById("millesime").className = ''; return; } }); } else{ alert('<fl:getMessage code="MF1E4" alt="Veuillez saisir le millésime !" js="true"/>'); document.getElementById("millesime").className = 'chpsTextObligatoire'; } } function doGeneratePricesForSpeceficMil(){ doGeneratePrices(document.getElementById("millesime").value); } function updateMillesimeSearchCriteria(millesime){ /*if(millesime){ if(listMillesime.indexOf(parseInt(millesime, 10)) === -1){ listMillesime.push(parseInt(millesime, 10)); var select = document.getElementById('Ps_Millesime'); select.textContent =''; var defaultElement = document.createElement('option'); defaultElement.setAttribute('value', ''); defaultElement.textContent = '<Millesime>'; select.appendChild(defaultElement); listMillesime.sort(function(a, b) { return a - b; }); for(var i = 0; i < listMillesime.length; i++){ var element = document.createElement('option'); element.setAttribute('value', listMillesime[i]); element.textContent = listMillesime[i]; select.appendChild(element); } } }*/ var listMillesime = []; var select = document.getElementById('Ps_Millesime'); select.textContent =''; var defaultElement = document.createElement('option'); defaultElement.setAttribute('value', ''); defaultElement.textContent = '<Millesime>'; select.appendChild(defaultElement); var args = '&Ps_PrdID=<%=id%>'; var url = "<fl:webapp/>/get_PriceSeasonality_Millesime.fl?" + args; $.getJSON(url, function(data) { if(data.Status == "OK"){ listMillesime = JSON.parse(data.millesimes); for(var i = 0; i < listMillesime.length; i++){ var element = document.createElement('option'); element.setAttribute('value', listMillesime[i]); if(listMillesime[i] == millesime){ element.setAttribute('selected', 'true'); } element.textContent = listMillesime[i]; select.appendChild(element); } listMillesime.splice(0); return; } }); } </script>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de