📄 problemreplay.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="cn.com.aheadsoft.util.StringFormat" %>
<%@ page import="cn.com.aheadsoft.recordset.ReplyFlowActionRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.DEProblemRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.ReplyTransferRecordSet" %>
<%@ page import="cn.com.aheadsoft.business.PersonInfoBusiness,cn.com.aheadsoft.recordset.DeInforAttachmentRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.PersonInfoRecordSet,cn.com.aheadsoft.recordset.DeInforAttachmentRecordSet" %>
<jsp:useBean id="userinfo" scope="session" class="cn.com.aheadsoft.util.UserInfo"/>
<jsp:useBean id="upm" scope="session" class="cn.com.aheadsoft.manage.UserPurviewManage"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css">
<title>问题回复列表</title>
<%
DeInforAttachmentRecordSet DeProblemAttachSet = (DeInforAttachmentRecordSet)request.getAttribute("DeProblemAttachSet");
ReplyFlowActionRecordSet rfaRdSet = (ReplyFlowActionRecordSet)request.getAttribute("rfaRdSet");
String RF_ID = (String)request.getAttribute("RF_ID");
ReplyTransferRecordSet deRdSet = (ReplyTransferRecordSet)request.getAttribute("replyset");
DEProblemRecordSet proset = (DEProblemRecordSet)request.getAttribute("proset");
proset.beforefirst();
proset.next();
ReplyTransferRecordSet rt1RdSet = (ReplyTransferRecordSet)request.getAttribute("onereplyset");
String replyname = (String)request.getAttribute("applyname");
String D_Serial = proset.getD_Serial();
String userid = (String)request.getAttribute("userid");
String endFlag = (String)request.getAttribute("endFlag");
// added by wjant 2004.3.20
String noend = (String)request.getParameter("noend");
if (noend==null) noend = "0";
PersonInfoRecordSet person=(PersonInfoRecordSet)request.getAttribute("personSet");
// 得到最后一个添加回复信息的人和问题的下一步执行者
String lastReplyer = null;
if (deRdSet!=null && deRdSet.size()>0)
{
deRdSet.beforefirst();
while(deRdSet.next())
lastReplyer = deRdSet.getRT_ReplyerID();
}
if (lastReplyer==null) // 没有人回复
lastReplyer = proset.getReply_UserID();
deRdSet.beforefirst();
// 添加变量表示不让显示下一步过程
boolean bEnd = false;
// 查询改用户id所属的部门,如果部门为“公司领导”,则对所有任务都可以放开权限 先锋特有
String curruserid = userinfo.GetUserID();
PersonInfoBusiness pifo = new PersonInfoBusiness();
pifo.setQueryWhere(curruserid);
pifo.execute("query");
PersonInfoRecordSet piRdRs = pifo.getRecordSet();
piRdRs.next();
String deptid = piRdRs.getDept_ID();
//
String deptsel=request.getParameter("deptSel");
String usersel=request.getParameter("userSel");
String title = request.getParameter("title");
String task = request.getParameter("task");
String senddate = request.getParameter("senddate");
String lastdate = request.getParameter("lastdate");
String url ="/krm/servlet/DetailServlet?module=deproblem&&status=q&&queryterm=search";
String addurl = "";
if (title!=null && !title.equals(""))
addurl = addurl + "&&title=" + title;
if (senddate!=null && !senddate.equals(""))
addurl = addurl + "&&senddate=" + senddate;
if (task!=null && !task.equals(""))
addurl = addurl + "&&task=" + task;
if (lastdate!=null && !lastdate.equals(""))
addurl = addurl + "&&lastdate=" + lastdate;
if (usersel!=null && !usersel.equals(""))
addurl = addurl + "&&userSel=" + usersel;
if (deptsel!=null && !deptsel.equals(""))
addurl = addurl + "&&deptSel=" + deptsel;
url = url + addurl;
//
%>
<SCRIPT language=JavaScript>
function openWin(url) {
window.open(url,'','toolbar=no,location=no,menubar=no,resizable=1,scrollbars=no,left=0,top=0,width=600,height=400');
}
function openWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
function changeItem() {
if(document.replyform.replyitem.selectedIndex==0)
document.replyform.RT_ReplyMind.value = "";
else if(document.replyform.replyitem.selectedIndex==1)
document.replyform.RT_ReplyMind.value = "同意";
else if(document.replyform.replyitem.selectedIndex==2)
document.replyform.RT_ReplyMind.value = "不同意";
else if(document.replyform.replyitem.selectedIndex==3)
document.replyform.RT_ReplyMind.value = "电话联系";
}
function changeNextStep() {
if (document.replyform.isnextstep.checked==true) {
document.all.nextStep.style.display="none";
document.all.nextPerson.style.display="none";
} else {
document.all.nextStep.style.display="";
document.all.nextPerson.style.display="";
}
}
function update(id,key,val) {
document.form1.DIM_ID.value = id;
//document.form1.IT_Title.value = key;
document.form1.ItemType.value=key;
if(val=="") {
val = " ";
}
//document.form1.IT_Memo.value = val;
document.form1.ItemName.value=val;
document.form1.status.value = "u";
//document.form1.IT_Title.focus();
document.form1.ItemName.focus();
}
function atSubmit(obj){
isOK=false;
lab="";
for(i=0;i<obj.length;i++){
if(obj.elements[i].value!=null && obj.elements[i].value!=""){
isOK=true;
}else{
isOK=false;
lab=obj.elements[i].alt;
obj.elements[i].focus();
break;
}
}
if(!isOK){
alert("您没有填写"+lab+"!请填写后提交。");
return false;
}else{
// obj.submit();
}
}
function atDelete() {
return confirm("您确定要删除吗?");
}
</SCRIPT>
<script>
var person = new Array();
<%
if(person != null && person.size() > 0) {
int i = 0;
while(person.next()) {
out.println("person["+String.valueOf(i)+"]=new Array();");
out.println("person["+String.valueOf(i)+"][0]='"+StringFormat.Source2GB(person.getI_Name())+"';");
out.println("person["+String.valueOf(i)+"][1]='"+person.getUser_ID()+"';");
out.println("person["+String.valueOf(i)+"][2]='"+person.getUI_RoleID()+"';");
i++;
}
}
%>
action = new Array();
<%
int j=0;
while(rfaRdSet.next()){
out.println("action["+String.valueOf(j)+"]=new Array();");
out.println("action["+String.valueOf(j)+"][0]='"+rfaRdSet.getFA_ID()+"';");
out.println("action["+String.valueOf(j)+"][1]='"+rfaRdSet.getFA_Roles()+"';");
j++;
}
%>
function selectAction() {
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
len=document.replyform.RT_ReplyerID.options.length;
if(len>0){
for(i=len-1;i>=0;i--)
document.replyform.RT_ReplyerID.remove(i);
}
index=document.replyform.RT_ActionID.selectedIndex;
values=document.replyform.RT_ActionID.options[index].value;
for(i=0;i<action.length;i++) {
if(action[i][0]==values) {
for(j=0;j<person.length;j++)
{
if(action[i][1].indexOf("#"+person[j][2]+"#")!=-1)
{
optionnew=document.createElement("option");
optionnew.text=person[j][0];
optionnew.value=person[j][1];
if(isIE) {
document.replyform.RT_ReplyerID.add(optionnew);
}else {
document.replyform.RT_ReplyerID.appendChild(optionnew);
}
}
}
}
}
}
function selectActionForU() {
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
len=document.replyform.RT_ReplyerID.options.length;
if(len>0){
for(i=len-1;i>=0;i--)
document.replyform.RT_ReplyerID.remove(i);
}
index=document.replyform.RT_ActionID.selectedIndex;
values=document.replyform.RT_ActionID.options[index].value;
for(i=0;i<action.length;i++) {
if(action[i][0]==values) {
for(j=0;j<person.length;j++)
{
if(action[i][1].indexOf("#"+person[j][2]+"#")!=-1)
{
optionnew=document.createElement("option");
optionnew.text=person[j][0];
optionnew.value=person[j][1];
<%if(rt1RdSet!=null){%>if(person[j][1]=="<%=rt1RdSet.getRT_ReplyerID()%>")
{
optionnew.selected=true;
}
<%}%>
if(isIE) {
document.replyform.RT_ReplyerID.add(optionnew);
}else {
document.replyform.RT_ReplyerID.appendChild(optionnew);
}
}
}
}
}
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="<%if(rt1RdSet==null && lastReplyer.equals(userid) && (!endFlag.equals("1"))) { %>selectAction();<%} else if(rt1RdSet!=null && (replyname!=null)){%>selectActionForU();<%}%>">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr height="8">
<td></td>
</tr>
<tr>
<td align="center" >
<%if(rt1RdSet==null) { %>
<form action="/krm/servlet/replytransferservlet?status=i&&noend=<%=noend+addurl%>" method="post" name="replyform" onsubmit="return atSubmit(this)">
<% } else { %>
<form action="/krm/servlet/replytransferservlet?status=u&&RT_ID=<%=rt1RdSet.getRT_ID()%>&&noend=<%=noend+addurl%>" method="post" name="replyform" onsubmit="return atSubmit(this)">
<% } %>
<table border="0" width="100%" align="center" class="collapse">
<tr >
<td class="tdA" colspan="4"> 问题回复列表</td>
</tr>
<tr>
<td width="18%" class="tdB" align="center" nowrap>提问日期</td>
<td width="20%" class="tdB" align="center" nowrap>提问人</td>
<td width="44%" colspan="1" align="center" class="tdB">问题名称</td>
<td width="18%" colspan="1" align="center" nowrap class="tdB">下一步处理人</td>
</tr>
<tr>
<td width="18%" class="common" align="center" ><%=proset.getP_SendDate()%></td>
<td width="20%" class="common" align="center" >
<%
String userID = proset.getCreate_UserID();
PersonInfoBusiness pibu = new PersonInfoBusiness();
pibu.setQueryWhere(userID);
pibu.execute("query");
PersonInfoRecordSet piRdSet = pibu.getRecordSet();
piRdSet.next();
out.println(piRdSet.getI_Name());
%>
</td>
<td class="common" align="left" colspan="1"><%=proset.getP_Title()%></td>
<td class="common" colspan="1" align="center">
<%
deRdSet.beforefirst();
int snum = deRdSet.size();
String applyid = null;
for (int i=0; i<snum; i++)
deRdSet.next();
if (snum==0)
applyid = proset.getReply_UserID();
else
applyid = deRdSet.getRT_ReplyerID();
if (!applyid.equals("")){
PersonInfoBusiness pibuid = new PersonInfoBusiness();
pibuid.setQueryWhere(applyid);
pibuid.execute("query");
PersonInfoRecordSet piRdSetid = pibuid.getRecordSet();
piRdSetid.next();
out.println(piRdSetid.getI_Name());
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -