90 lines
3.5 KiB
Plaintext

<%@page import="com.itextpdf.text.log.SysoCounter"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@include file="/Frame/resources/include/include_begin_info.jspf"%><%
String id = CurPage.getParameter("id");//ID
String flowunid = CurPage.getParameter("flowunid");//流程编号
String phaseNo = CurPage.getAttribute("phaseNo"); //流程节点
String taskno=CurPage.getParameter("taskno"); //流程节点ID
String userid=CurPage.getParameter("userid");//当前登录人
String orgid=CurPage.getParameter("orgid");//当前登录部门
String username = Sqlca.getString("select username from user_info ui where userid = '"+userid+"'");
String orgname = Sqlca.getString("select orgname from org_info oi where orgid = '"+orgid+"'");
//判断修改人是否为提交人
String comm = Sqlca.getString("select case when phaseno = '"+phaseNo+"' and inputuser = '"+userid+"' then 'false' else 'true' end as comm from communication where id = '"+id+"'");
String sPrevUrl = CurPage.getParameter("PrevUrl");
if(sPrevUrl == null) sPrevUrl = "/Tenwa/Customer/Lessee/Comm/Communication/Communication_list.jsp";
String sTempletNo = "COMMUNICATION_INFO";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "0";//只读模式
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
String sButtons[][] = {
{"true", "All", "Button", "保存","保存所有修改", "saveRecord()", "", "", "", ""},
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
window.onload=function(){
var today = new Date();
setItemValue(0,0,"flowunid",'<%=flowunid%>');
setItemValue(0,0,"phaseno",'<%=phaseNo%>');
setItemValue(0,0,"taskno",'<%=taskno%>');
setItemValue(0,0,"username",'<%=username%>');
setItemValue(0,0,"orgname",'<%=orgname%>');
setItemValue(0,0,"inputtime",getNowFormatDate());
};
function goBack(){
parent.AsDialog.ClosePage();
}
function saveRecord(){
var comm = "<%=comm%>";
if(comm == "false"){
alert("只有录入人可以修改! ");
goBack();
}else {
var remark = getItemValue(0,0,"remark");
var time = getNowFormatDate();
var param = "flowunid=<%=flowunid%>,phaseNo=<%=phaseNo%>,taskno=<%=taskno%>,userid=<%=userid%>,orgid=<%=orgid%>,remark="+remark+",time="+time+",id=<%=id%>";
var Return = AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.Communicationsave","soleVerify",param);
if(Return=="true"){
alert("保存成功! ");
goBack();
}else{
alert("保存失败,请联系管理员! ");
return;
}
}
}
function getNowFormatDate() {
var date = new Date();
var seperator1 = "/";
var seperator2 = ":";
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
+ " " + date.getHours() + seperator2 + date.getMinutes()
+ seperator2 + date.getSeconds();
return currentdate;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>