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

📄 gradedeal.jsp

📁 自己制作的联通CRM,支持客户分类,管理,升级,积分管理等等..
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/UrlTag" prefix="UrlTag" %>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
	<meta http-equiv="expires" content="Wed, 26 Feb 1970 08:21:57 GMT" />
	<link href="${pageContext.request.contextPath}/image/main.css" rel="stylesheet" type="text/css">
		
 <style type="text/css">
<!--
.STYLE1 {
	font-size: 14px;
	font-weight: bold;
	font-family: "宋体";
}
.STYLE2 {
	color: #FFFFFF;
	font-weight: bold;
}
.STYLE3 {
	font-size: 12px;
	color: #FF0000;
}
-->
    </style>
 
 
<script language="javascript">
	function check()
	{
		if(form1.userphone.value.replace(/[0-9]/g,"").length!=0)
		{
			alert('手机号码必须是数字!');
			form1.userphone.focus();
		}
		else
		{
			var tag = document.getElementById("tag");
			tag.value = "list";
			form1.submit();
		}
	}
	
	function detail(userid)
	{
		window.open("${pageContext.request.contextPath}/gradeDealAction.do?tag=detail&userid=" + userid,"_blank","top=200,left=200,height=400,width=550");
	}
	
	function gradeinfo()
	{
	
		var rule = document.getElementById("graderule");
		var len = rule.options.length;
		var ruleid = 1;
		for(var i=0;i<len;i++)
		{
			if(rule.options[i].selected == true)
			{
				ruleid = rule.options[i].value;
				break;
			}
		}
		if(ruleid == "")
		{
			alert('规则不能为空!');
		}
		else
		{
			document.location.href="${pageContext.request.contextPath}/gradeDealAction.do?tag=gradeinfo&ruleid=" + ruleid;	
		}
	}
	
	
	function selectchild()
	{
		var objs = document.getElementsByTagName("input");	//获取所有以input开头的标签
		var allcheck = document.getElementById("all");
		for(var i=0;i<objs.length;i++)
		{
			if(objs[i].type == "checkbox")	//判断以input开头的标签的类型是不是checkbox
			{
				objs[i].checked = allcheck.checked;
			}
		}
	}
	
	function selectparent(id)
	{
		var obj = document.getElementById("child"+id);
		var allcheck = document.getElementById("all");
		
		if(obj.checked == false)
		{
			allcheck.checked = false;
		}
		else
		{
			var objs = document.getElementsByTagName("input");
			var tag = true;
			for(var i=0;i<objs.length;i++)
			{
				if(objs[i].type == "checkbox" && objs[i].name != "all")
				{
					if(objs[i].checked == false)
					{
						tag = false;
					}
				}
			}
			if(tag == true)
			{
				allcheck.checked = true;
			}
		}
	}
	
	function checkuser()
	{
		var objs = document.getElementsByTagName("input");
		var temp = 0;
		for(var i=0;i<objs.length;i++)
		{
			if(objs[i].type == "checkbox")
			{
				if(objs[i].checked == true)
				{
					temp++;
				}
			}
		}
		if(temp == 0)
		{
			alert("至少选择一个用户");
		}
		else
		{	
			var tag = document.getElementById("tag");
			tag.value = "gradedeal";
			form1.submit();
		}
	}
	
	
	function showall()
	{
		document.location.href="${pageContext.request.contextPath}/gradeDealAction.do?tag=list";
	}
	
</script> 
    
    
    
</head> 
<body>
<center>
<html:form action="/gradeDealAction" styleId="form1" method="POST">
<html:hidden property="tag" styleId="tag" />
<html:hidden property="usergrade" styleId="usergrade" value="${requestScope.usergrade}" />
<html:hidden property="ruleid" styleId="ruleid" value="${requestScope.ruleid}" />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="middle"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="27" align="center" valign="middle"><span class="STYLE1">
        <logic:equal value="gradeinfo" name="gradeDealActionForm" property="tag">
        	符 合 分 级 规 则 用 户 信 息
        </logic:equal>
        <logic:equal value="list" name="gradeDealActionForm" property="tag">
        	客 户 分 级 处 理
        </logic:equal>
        <logic:equal value="dealafter" name="gradeDealActionForm" property="tag">
        	规 则 分 级 后 用 户 信 息
        </logic:equal>
        </span><br></td>
      </tr>
    </table>
      <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#D71920">
        <tr>
          <td align="center" valign="middle"><table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="20" colspan="3" align="center" valign="middle">&nbsp;</td>
           </tr>
            <tr>
              <td width="4%">&nbsp;</td>
              <td width="92%"><table width="100%" border="1" cellspacing="0" cellpadding="0" id="ttc">
                <tr>
                  <td height="27" colspan="9" align="center" valign="middle" nowrap id="ttc">
                  	<select name="graderule" style="width=150px;">
                  		<option value="">分级规则</option>
                  		<c:forEach var="ruleinfo" items="${requestScope.ruleList}">
                  			<option value="${ruleinfo.nid}"
                  			<c:if test="${ruleinfo.nid == requestScope.ruleid}">
                  				selected
                  			</c:if>
                  			>
                  			${ruleinfo.rulename}
                  			</option>
                  		</c:forEach>
                  	</select>
              		&nbsp;<input type="button" value="查询分级信息" onClick="gradeinfo();" style="width=90px;" />
              		<logic:notEmpty name="userInfoList" scope="request">
	                  	<logic:equal value="gradeinfo" name="gradeDealActionForm" property="tag">
	              			&nbsp;<input type="button" value="按规则分级" onClick="checkuser();" />
	              		</logic:equal>
              		</logic:notEmpty>
              		<logic:equal value="list" name="gradeDealActionForm" property="tag">
              		&nbsp;手机号码:<html:text property="userphone" maxlength="11" size="12"></html:text>
              		<html:select property="brandtype">
              		<html:option value="">品牌类型</html:option>
              			<logic:present name="brandList" scope="request">
              				<logic:notEmpty	name="brandList" scope="request">
              					<html:optionsCollection name="brandList" label="sname" value="sname" />
              				</logic:notEmpty>
              			</logic:present>
              		</html:select>&nbsp;
              		<html:select property="membergrade">
              		<html:option value="">会员等级</html:option>
              			<logic:present name="gradeList" scope="request">
              				<logic:notEmpty	name="gradeList" scope="request">
              					<html:optionsCollection name="gradeList" label="sname" value="sname" />
              				</logic:notEmpty>
              			</logic:present>
              		</html:select>
              		&nbsp;<input type=button value="查询" onClick="check();" />&nbsp;
              		</logic:equal>
              		&nbsp;[<a href="#" onClick="return showall();">显示全部</a>]
				  </td>
                </tr>
                <tr>
                  <logic:equal value="gradeinfo" name="gradeDealActionForm" property="tag">
	                  <td width="8%" height="22" align="center" valign="middle" nowrap id="ttc" background="${pageContext.request.contextPath}/image/newTop_02.jpg">
	                  	<span class="STYLE2">
	                  	全选<input type="checkbox" value="" name="all"  onclick="selectchild();" />
	                  	</span>
	                  </td>
                  </logic:equal>
                  <td width="8%" height="22" align="center" valign="middle" nowrap id="ttc" background="${pageContext.request.contextPath}/image/newTop_02.jpg">
                  	<span class="STYLE2">用户编号</span>
                  </td>
                  <td width="13%" height="22" align="center" valign="middle" nowrap id="ttc" background="${pageContext.request.contextPath}/image/newTop_02.jpg">
                  	<span class="STYLE2">手机号码</span>
                  </td>
                  <td width="13%" align="center" valign="middle" nowrap id="ttc" background="${pageContext.request.contextPath}/image/newTop_02.jpg">
                  	<span class="STYLE2">开户时间</span>
                  </td>
                  <td width="9%" align="center" valign="middle" nowrap id="ttc" background="${pageContext.request.contextPath}/image/newTop_02.jpg">
                  	<span class="STYLE2">主套餐</span>
                  </td>
                  <td width="10%" align="center" valign="middle" nowrap id="ttc" background="${pageContext.request.contextPath}/image/newTop_02.jpg">
                  	<span class="STYLE2">是否会员</span>
                  </td>
                  <td width="11%" align="center" valign="middle" nowrap id="ttc" background="${pageContext.request.contextPath}/image/newTop_02.jpg">
                  	<span class="STYLE2">是否集团客户</span>
                  </td>
                  <td width="9%" align="center" valign="middle" nowrap id="ttc" background="${pageContext.request.contextPath}/image/newTop_02.jpg">
                  	<span class="STYLE2">会员等级</span>
                  </td>
                  <td width="19%" align="center" valign="middle" nowrap id="ttc" background="${pageContext.request.contextPath}/image/newTop_02.jpg">
                 	 <span class="STYLE2">操作</span>
                  </td>
                </tr>
<logic:present name="userInfoList" scope="request">
	<logic:notEmpty name="userInfoList" scope="request">
		<logic:iterate id="userinfo" name="userInfoList" scope="request">
                <tr>
                  <logic:equal value="gradeinfo" name="gradeDealActionForm" property="tag">
	                  <td height="20" align="center" valign="middle" nowrap id="ttc">
	                  &nbsp;
	                  <html:multibox property="selectuser" value="${userinfo.userid}" styleId="child${userinfo.userid}" onclick="selectparent(${userinfo.userid});" />
	                  </td>
                  </logic:equal>
                  <td height="20" align="center" valign="middle" nowrap id="ttc">&nbsp;${userinfo.userid}</td>
                  <td height="20" align="center" valign="middle" nowrap id="ttc">&nbsp;${userinfo.phone}</td>
                  <td height="20" align="center" valign="middle" nowrap id="ttc">&nbsp;${userinfo.regtime}</td>
                  <td height="20" align="center" valign="middle" nowrap id="ttc">
	                  <logic:equal value="0" name="userinfo" property="mainoption">
	                  	&nbsp;无
	                  </logic:equal>
	                  <logic:notEqual value="0" name="userinfo" property="mainoption">
	                  	&nbsp;${userinfo.mainoption}
	                  </logic:notEqual>
                  </td>
                  <td height="20" align="center" valign="middle" nowrap id="ttc">
                  	  <logic:equal value="0" name="userinfo" property="ismember">
	                  	&nbsp;否
	                  </logic:equal>
	              	  <logic:equal value="1" name="userinfo" property="ismember">
	                  	&nbsp;是
	              	  </logic:equal>
                  </td>
                  <td height="20" align="center" valign="middle" nowrap id="ttc">
                      <logic:equal value="0" name="userinfo" property="isgroupclient">
	                  	&nbsp;否
	                  </logic:equal>
	              	  <logic:equal value="1" name="userinfo" property="isgroupclient">
	                  	&nbsp;是
	              	  </logic:equal>
                  </td>
                  <td height="20" align="center" valign="middle" nowrap id="ttc">
                  	  <logic:equal value="0" name="userinfo" property="usergrade">
	                  	&nbsp;无
	                  </logic:equal>
	                  <logic:notEqual value="0" name="userinfo" property="usergrade">
	                  	&nbsp;${userinfo.usergrade}
	                  </logic:notEqual>
                  </td>
                  <td height="20" align="center" valign="middle" nowrap id="ttc">
                  	<a href="#" onClick="detail(${userinfo.userid});">详细</a>
              <logic:equal value="list" name="gradeDealActionForm" property="tag">
              		<logic:equal value="0" name="userinfo" property="islock">
                  		|
                  	<UrlTag:edit href="${pageContext.request.contextPath}/gradeDealAction.do?tag=slock&userid=${userinfo.userid}"
                  	 param="注销" flog="0" sentence="确定要注销吗?"/>
                  	</logic:equal>
                  	<logic:equal value="1" name="userinfo" property="islock">
                  		|
                  		已注销
                  	</logic:equal>
              			|
              		<UrlTag:edit href="${pageContext.request.contextPath}/gradeDealAction.do?tag=brandback&userid=${userinfo.userid}"
              		param="品牌回退" flog="0" sentence="确定要回退吗?"/>
             </logic:equal>
                  </td>
                </tr> 
		</logic:iterate>
	</logic:notEmpty>
</logic:present>
                <tr>
                  <td height="20" colspan="9" align="center" valign="middle" nowrap id="ttc">
                  	${requestScope.pageTool}
                  </td>
                </tr>
                
              </table></td>
              <td width="4%">&nbsp;</td>
            </tr>
            <tr>
              <td height="20" colspan="3">&nbsp;</td>
              </tr>
          </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<br><center>
	<logic:empty name="userInfoList" scope="request">
		<span class="STYLE3">对不起,没有符合的记录!</span>
	</logic:empty>
	</center>
</html:form>
</center>
</body>
</html>




⌨️ 快捷键说明

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