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

📄 dispatch.jsp

📁 J2EE客户关系管理系统!!!!!!!!!!!!!!!!!!!!
💻 JSP
字号:


<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>jb-aptech毕业设计项目</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css">
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/Pager.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/ClienService.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/UserService.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/DAOCSTService.js'></script>
<script type="text/javascript" src='<%=request.getContextPath()%>/js/service.js'></script>
<script type="text/javascript" src='<%=request.getContextPath()%>/js/custService.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/js/s1.js'></script>	
</head>

<!-- 自定义分页控件的客户端js -->
  <script type='text/javascript' src='<%=request.getContextPath()%>/js/PageCtl.js'></script>
  
<script>
      var tab1 = new TablePage('tab1','TBody1', 'pgCtl', 'service');
      //以下是可选的
      tab1.dateformat="yyyy年MM月dd日";     //如果包含日期列,这里可以定义日期的显示格式
      tab1.sqlFilter=" and svr_satisfy <3";  //查询条件
      tab1.pagesize=10;                                //每页多少行
      tab1.wait='waitCtl';                            //等待的提示
      tab1.default_callback=function over()                   //显示完成以后的回调函数
                    {
                      waitCtl.style.display = 'none';
                    };
      
      function reload()
     {
     	tab1.sqlFilter=" and svr_satisfy <3";
     	if("" != $('svrCustName').value){
	    		 	tab1.sqlFilter +=" and svr_cust_name like '%"+$('svrCustName').value+"%'";
	    		 }
	    if("" != $('svrTitle').value){
	    		 	tab1.sqlFilter +=" and svr_title like '%"+$('svrTitle').value+"%'";
	    		 }	 
	    if("" != $('svrType').value){
	    		 	tab1.sqlFilter +=" and svr_type like '%"+$('svrType').value+"%'";
	    		 }   	 
	    if("" != $('svrStatus').value){
	    		 	tab1.sqlFilter +=" and svr_status like '%"+$('svrStatus').value+"%'";
	    		 }
	    if("" != $('createDate1').value && "" != $('createDate2').value){
	    		 	tab1.sqlFilter +=" and svr_create_date between '"+$('createDate1').value+"' and '"+$('createDate2').value+"'";	
	    		 }else{ 
	    		 if("" != $('createDate1').value){
	    		 		tab1.sqlFilter +=" and svr_create_date ='"+$('createDate1').value+"'";
	    			 }
	    			 if("" != $('createDate2').value){
	    		 		tab1.sqlFilter +=" and svr_create_date ='"+$('createDate2').value+"'";
	    		 	 }}     
     	tab1.go(1);
     }
      
     function del(id)
     {
     	if(window.confirm("您确定要删除"+$('template:svr_cust_name'+id).innerHTML+"吗?"))
     	{
     		ClienService.deleteFilert(id,function(data)
     								{
     									dwr.engine.beginBatch();
      									tab1.go(tab1.pageno);
       									dwr.engine.endBatch();
     								}
     		);
     	}
     }
     
     
     
     function user(us){
		UserService.searchName(us,function(username)
										{
    										//DWRUtil.removeAllOptions('svrDueId');
    										DWRUtil.addOptions('svrDueId', username, 'usrId', 'nameName');
										}
							   );
	}
     
     function chang(src){	
		$('svrDueTo').value = src.options[src.selectedIndex].text;
	}
	
	function allot(id){
	if($('status').value == 3){
     	var dd = document.getElementById('svrDueId'+id).value;
        var rowobj = {svrId:null,svrStatus:null,svrDueId:null,svrDueTo:null};
     	rowobj.svrId=id;
     	if(dd != 0){
	     		rowobj.svrDueId =document.getElementById('svrDueId'+id).value;
		     	rowobj.svrDueTo = document.getElementById('svrDueTo').value;
		        dwr.util.setValues(rowobj); 
		        var daqq = $('daqq').value;
		        ClienService.checkDue(rowobj, function(mess){
		        if(mess){
		        	if(confirm("编号为"+id+" 的服务已分配是否二次分配?")){
		        		ClienService.updateDue(rowobj,daqq,function(data)
		                                            {  		      
		                                             alert(data + '二次分配完成');
		                                             window.location.href = 'dispatch.jsp'; 		
		                                            }
		       			);
		        	}
		        }else{
		        	ClienService.updateDue(rowobj,daqq,function(data)
		                                            {  		      
		                                             alert(data + '分配完成'); 
		                                             window.location.href = 'dispatch.jsp';		
		                                            }
		       			);
		        }
		     }); 
     	}else{
     		alert("不能是请选择!");
     	}}else{alert("对不起,您没有分配权限!");}
     }
     
     function shose(id)
		   		{
		   		$('qq1'+id).style.background='#6ec2fd';		
				$('qq2'+id).style.background='#6ec2fd';
				$('qq3'+id).style.background='#6ec2fd';
				$('qq4'+id).style.background='#6ec2fd';
				$('qq5'+id).style.background='#6ec2fd';
				$('qq6'+id).style.background='#6ec2fd';
				$('qq7'+id).style.background='#6ec2fd';
				$('qq8'+id).style.background='#6ec2fd';
		   		}
		   		function go(id)
		   		{
		   		$('qq1'+id).style.background='eeeeff';
				$('qq2'+id).style.background='eeeeff';
				$('qq3'+id).style.background='eeeeff';
				$('qq4'+id).style.background='eeeeff';
				$('qq5'+id).style.background='eeeeff';
				$('qq6'+id).style.background='eeeeff';
				$('qq7'+id).style.background='eeeeff';
				$('qq8'+id).style.background='eeeeff';
		   		}
</script>

<body onload="javascript:{dwr.engine.beginBatch(); user('us'); tab1.go(1); dwr.engine.endBatch();setCurTime('daqq');smanPromptList('svrCustName')}">
<input type="hidden" id="userFlag" value="${sessionScope.usrIdIndex}">
<input type="hidden" id="status" value="${sessionScope.usrFlagIndex}">
<input type="hidden" id="daqq"/>
<div class="page_title">服务分配</div>
<div class="button_bar">
	<button class="common_button" onclick="helpq3();">帮助</button>
	<button class="common_button" onclick="reload();">查询</button>  
</div>
<table class="query_form_table">
	<tr>
		<th height="28">客户</th>
		<td><input id="svrCustName"/></td>
		<th height="28">概要</th>
		<td><input id="svrTitle"/></td>
		<th height="28">服务类型</th>
		<td>
			<select id="svrType">
				<option value="">全部</option>
				<option value="咨询">咨询</option>
				<option value="建议">建议</option>
				<option value="投诉">投诉</option>
			</select>
		</td>
	</tr>
	<tr>
		<th height="32">创建日期</th>
		<td colspan="3">
			<input name="T2" size="10" id="createDate1"/> - <input name="T1" size="10" id="createDate2"/>
		</td>
		<th height="32">状态</th>
		<td>
			<select id="svrStatus">
				<option value="">全部</option>
				<option value="新创建">未分配</option>
			</select>
		</td>
	</tr>
</table>
<br />


<!-- 表格的主体部分 -->
   <table class="data_list_table" >
      <!-- 表头 -->      
        <th>编号</th>
		<th>客户</th>
		<th>概要</th>
		<th>服务类型</th>
		<th>创建人</th>
		<th>创建日期</th>		
		<th>分配给</th>
		<th>操作</th>     
      <!-- 表主体 -->
      <tbody id="TBody1">
	      <tr id="template" style="display:none" onmouseenter="shose(this.id.substring(8))" onmouseleave="go(this.id.substring(8))">
	         <td class="list_data_number" id="qq1"+template.id.substring(8)><span id="template:svr_id"/></td> 
	         <td class="list_data_text" id="qq2"+template.id.substring(8)><span id="template:svr_cust_name"/></td>
	         <td class="list_data_text" id="qq3"+template.id.substring(8)><span id="template:svr_title"/></td>
	         <td class="list_data_text" id="qq4"+template.id.substring(8)><span id="template:svr_type"/></td>
	         <td class="list_data_text" id="qq5"+template.id.substring(8)><span id="template:svr_create_by"/></td>
	         <td class="list_data_text" id="qq6"+template.id.substring(8)><span id="template:svr_create_date"/></td>
             <td class="list_data_text" id="qq7"+template.id.substring(8)>
             	<select id="svrDueId" onchange="chang(this)">
					<option value="0">请选择...</option>
				</select>
				<input type="hidden" id="svrDueTo"/>
				<input type="hidden" id="svrDueDate"/>
				<input type="hidden" id="name" value='${usrIdIndex}' />
				<button id="due" class="common_button" onclick="allot(this.id.substring(3));">分配</button>  
			</td>
             <td class="list_data_op"  id="qq8"+template.id.substring(8)><span id="template:manipulate"/>
             <img  id="delete" onclick="del(this.id.substring(6))" title="删除" src="../../images/bt_del.gif" class="op_button" style="display=none"/>             	         
	      	 </td>
	      </tr>
      </tbody>
      
      <!-- 表格的分页控制部分 -->
		<tr id="reveal" style="display:none"><td align="center" colspan="8">没有找到你所需要的数据<br><br></td></tr>
		<tr>
			<th colspan="100" class="pager">
				<div align="left" id="waitCtl">正在加载...</div>
				<div id="pgCtl" class="pager">
			</th>
		</tr>
   </table>  
</body>
</html>

⌨️ 快捷键说明

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