⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modifyproductinfo.jsp

📁 java阿里巴巴代码
💻 JSP
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ page import="java.util.*"%>
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="com.saas.biz.commen.ParamethodMgr"%>
<jsp:useBean id="bean" class="com.saas.biz.commodityMgr.CommodityInfo" scope="page"/>
<%
    String commodity_id="",cust_id="";
    String commodity_name="",commodity_unit="",sale_market="",content="",commodity_brand="",commodity_price="",sale_price="";
    if (request.getParameter("commodity_id") != null)
    {
        commodity_id = request.getParameter("commodity_id");
        ArrayList commList=new ArrayList();
        commList=bean.genCommodityList(commodity_id);
        if(commList != null && commList.size()>0)
        {
            HashMap map=(HashMap)commList.get(0);
             if(map.get("commodity_name")!=null)
             {
               commodity_name=map.get("commodity_name").toString();
             }
			if(map.get("commodity_unit")!=null)
			{
			  commodity_unit=map.get("commodity_unit").toString();
			}
			if(map.get("sale_market")!=null)
			{
			  sale_market=map.get("sale_market").toString();
			}
			if(map.get("content")!=null)
			{
			   content=map.get("content").toString();
			}
			if(map.get("commodity_brand")!=null)
			{
			   commodity_brand=map.get("commodity_brand").toString();
			}
			if(map.get("commodity_price")!=null)
			{
			   commodity_price=map.get("commodity_price").toString();
			}
			if(map.get("sale_price")!=null)
			{
			   sale_price=map.get("sale_price").toString();
			}
        }
    }
     ParamethodMgr paramCom=new ParamethodMgr();
	ArrayList  webList =paramCom.getCompareInfo("CRM","web_id");
	ArrayList  comTypeList=paramCom.getCompareInfo("CRM","commodity_type");
%>
<html>
<head>
<title>www.Xsaas.com</title>
<link href="/style/layout.css" rel="stylesheet" type="text/css">

<script language="JavaScript" src="/www/fuction/public.js"></script>
<script src="/www/fuction/calendar.js" type="text/javascript"></script>
<script language="JavaScript">
	function Check_Value()
	{
	    if (cTrim(document.form1.commodity_name.value,0) == "" || document.form1.commodity_name.value == null) 
		{                                                                                         
			alert("商品名称不可以为空!");                                                             
			document.form1.commodity_name.focus();                                                    
			return false;                                                                            
		}                                                                                      
		if (cTrim(document.form1.commodity_unit.value,0) == "" || document.form1.commodity_unit.value == null) 
		{                                                                                         
			alert("计价单位不可以为空!");                                                             
			document.form1.commodity_unit.focus();                                                    
			return false;                                                                            
		}                                                                                        
		if (cTrim(document.form1.sale_market.value,0) == "" || document.form1.sale_market.value == null) 
		{                                                                                         
			alert("销售地点不可以为空!");                                                             
			document.form1.sale_market.focus();                                                    
			return false;                                                                            
		}                                                                                      
		if (cTrim(document.form1.commodity_type.value,0) == "" || document.form1.commodity_type.value == null) 
		{                                                                                         
			alert("商品分类不可以为空!");                                                             
			document.form1.commodity_type.focus();                                                    
			return false;                                                                            
		}                                                                                      
		if (content.getText()=="" || document.form1.content.value == null) 
		{                                                                                         
			alert("说明不可以为空!");                                                             
			document.form1.content.focus();                                                    
			return false;                                                                            
		}                                                                                      
		if (cTrim(document.form1.commodity_brand.value,0) == "" || document.form1.commodity_brand.value == null) 
		{                                                                                         
			alert("品牌不可以为空!");                                                             
			document.form1.commodity_brand.focus();                                                    
			return false;                                                                            
		}                                                                                        
		if (cTrim(document.form1.commodity_price.value,0) == "" || document.form1.commodity_price.value == null) 
		{                                                                                         
			alert("原价不可以为空!");                                                             
			document.form1.commodity_price.focus();                                                    
			return false;                                                                            
		} 
		 else if(! isNum(document.form1.commodity_price.value))
		{
			alert("请输入正确的数字!");
			document.form1.commodity_price.focus(); 
			return false;
		}
		if (cTrim(document.form1.sale_price.value,0) == "" || document.form1.sale_price.value == null) 
		{                                                                                         
			alert("价格不可以为空!");                                                             
			document.form1.sale_price.focus();                                                    
			return false;                                                                            
		}
		else if(! isNum(document.form1.sale_price.value))
		{
			alert("请输入正确的数字!");
			document.form1.sale_price.focus(); 
			return false;
		}                                                                                                   
		if (cTrim(document.form1.trade_type_code.value,0) == "" || document.form1.trade_type_code.value == null) 
		{                                                                                         
			alert("TRADE_TYPE_CODE不可以为空!");                                                             
			document.form1.trade_type_code.focus();                                                    
			return false;                                                                            
		}                                                                                     
		if (cTrim(document.form1.price_type.value,0) == "" || document.form1.price_type.value == null) 
		{                                                                                         
			alert("价格类型不可以为空!");                                                             
			document.form1.price_type.focus();                                                    
			return false;                                                                            
		}                                                                                       
	 	    return true;
	}
     function check_none(current_obj)
    {
            if (current_obj.advshow.checked)
            {
        	    current_obj.submit1.disabled=false;        	     
        	}
        	else
        	{
        	    current_obj.submit1.disabled=true;
        	}
    	}
    	function exit()
    	{
    	    window.close();
    	}
    	function confirmsub(formobj)
    	{
    	    if(window.confirm('你确定要提交吗?')) 
    	    {
    	        if (!Check_Value())
    	        {
    	             return;
    	        }    	            	           
    	        formobj.submit();    	         
    	    }
    	    else
    	    {
    	        return;
    	    }
    	}
    	function   isNum(str)
	{   
	  return   (str.search(/^\d+(\.\d+)?$/)!=-1);   
	}   
</script>
</head>
<body>
<table width="818" border="0" cellspacing="0" cellpadding="0" align="center">
 <tr>
	    <td height="26" background="/img/bg-1.gif">&nbsp;</td>
	  </tr>
	  <tr>
	    <td background="/img/bg-2.gif">
         <table  width="93%" border="0" cellpadding="5" cellspacing="1" align="center" bgcolor="#dddddd">
         <form name=form1 action=/doTradeReg.do method=post target="blank">
		  <tr>    
            <td  class="line1" align="left" colspan="2">修改商品信息
            </td>
          </tr>          
		  <tr>
           <td  style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;" align="right">商品名称</td>
           <td  style="background-color:#ffffff; color:#000000;  font-size:12px;" align=left><input type=text name=commodity_name value="<%=commodity_name%>"></td>
         </tr>
           <input name=commodity_id type=hidden value="<%=commodity_id%>">
           <input type=hidden name=reattach_tag value="0">
         <tr>
          <td  style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;" align="right">计价单位</td>
         <td  style="background-color:#ffffff; color:#000000;  font-size:12px;" align=left><input type=text name=commodity_unit value="<%=commodity_unit%>"></td>
       </tr>
       <tr>
         <td  style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;" align="right">销售地点</td>
         <td  style="background-color:#ffffff; color:#000000;  font-size:12px;" align=left><input type=text name=sale_market value="<%=sale_market%>"></td>
       </tr>
       <tr>
        <td  style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;" align="right">选择子网</td>
        <td  style="background-color:#ffffff; color:#000000;  font-size:12px;" align=left>
      	<select name=web_id>
              <%
					if(webList != null && webList.size()>0)
					{
						for(int i=0;i<webList.size();i++)
						{
							HashMap map=(HashMap)webList.get(i);
							String value=map.get("para_code1").toString();
							String name=map.get("para_code2").toString();
							%>
                               <option value="<%= value %>"><%= name %></option>
                               <%
						}
					} %>
        </select>
         </td>
       </tr>
       <tr>
         <td  style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;" align="right">商品分类</td>
         <td  style="background-color:#ffffff; color:#000000;  font-size:12px;" align=left><select name=commodity_type>
               <%
					if(comTypeList != null && comTypeList.size()>0)
					{
						for(int i=0;i<comTypeList.size();i++)
						{
							HashMap map=(HashMap)comTypeList.get(i);
							String value=map.get("para_code1").toString();
							String name=map.get("para_code2").toString();
							%>
                               <option value="<%= value %>"><%= name %></option>
                               <%
						}
					} %>
        </select>
        </td>
      </tr>
      <tr>
        <td  style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;" align="right" valign="top">商品说明</td>
        <td  style="background-color:#ffffff; color:#000000;  font-size:12px;" align=left><textarea name=content style=display:none><%=content%></textarea>
         <iframe id="content" src="/www/ewebeditor/ewebeditor.htm?id=content&style=coolblue&root_id=<%=commodity_id%>" frameborder=0 scrolling=no width=600 height=350></iframe>  
        </td>
      </tr>
      <tr>
        <td  style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;" align="right">品牌</td>
        <td  style="background-color:#ffffff; color:#000000;  font-size:12px;" align=left><input type=text name=commodity_brand value="<%=commodity_brand%>"></td>
      </tr>
      <tr>
        <td  style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;" align="right">原价</td>
        <td  style="background-color:#ffffff; color:#000000;  font-size:12px;" align=left><input type=text name=commodity_price value="<%=commodity_price%>"></td>
      </tr>
      <tr>
        <td  style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;" align="right">价格</td>
        <td  style="background-color:#ffffff; color:#000000;  font-size:12px;" align=left><input type=text name=sale_price value="<%=sale_price%>">
		<input type=hidden name=trade_type_code value=0312></td>
      </tr>
      <tr>
        <td  style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;" align="right">价格类型</td>
        <td  style="background-color:#ffffff; color:#000000;  font-size:12px;" align=left><select name=price_type>
          <option value=0>正常价格</option>
          <option value=1>打折价格</option>
        </select></td>
      </tr>
      <tr>
        <input type=hidden name=rsrv_num1 value=0>
        <td class=grayE colspan=2 align="center"><INPUT id=advcheck name=advshow type=checkbox value=0 onclick=check_none(form1)>
         以上资料正确无误。
        </td>
      </tr>
      <tr>
        <td   style="background-color:#f6f6f6; color:#000000;  font-weight:bold; font-size:13px;padding-top:10px;padding-bottom:10px;"  align=center colspan=2><input name=submit1 type=button value=确定 disabled=true onclick=confirmsub(form1)>
        <input name=button1 type=button value=取消 onclick=exit()></td>
      </tr>
    </form>
  </table>
  	     </td>
	  </tr>
	  <tr>
	    <td height="46" background="/img/bg-3.gif">&nbsp;</td>
	  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -