2018-06-03 22:26:41 +08:00

233 lines
7.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List00;Describe=注释区;]~*/%>
<%
/*
Author: CChang 2003.8.25
Tester:
Content: 签署意见
Input Param:
TaskNo任务流水号
ObjectNo对象编号
ObjectType对象类型
Output param:
History Log: zywei 2005/07/31 重检页面
jychen 2014/12/24 添加功能按钮“退回前一步”
*/
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info01;Describe=定义页面属性;]~*/%>
<%
String PG_TITLE = "签署意见";
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List02;Describe=定义变量,获取参数;]~*/%>
<%
//获取组件参数:任务流水号
String sSerialNo = CurPage.getParameter("TaskNo");
String sObjectNo = CurPage.getParameter("ObjectNo");
String sObjectType = CurPage.getParameter("ObjectType");
//将空值转化为空字符串
if(sSerialNo == null) sSerialNo = "";
if(sObjectNo == null) sObjectNo = "";
if(sObjectType == null) sObjectType = "";
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List03;Describe=定义数据对象;]~*/%>
<%
//通过显示模版产生ASObjectModel对象doTemp
ASObjectModel doTemp = new ASObjectModel("SignTaskOpinionInfo");
if("ChangeScopeApply".equals(sObjectType) || "BailReWriteApply".equals(sObjectType))//客户国标行业与企业规模变更申请,设置"意见"的字数限制为 1000 add bymxlu 20170206/保证金担保合同补录申请
{
doTemp.setLimit("PhaseOpinion",1000);
}
else {
//设置"意见"的字数限制 add by cbsu 2009-11-06
doTemp.setLimit("PhaseOpinion",4000);
}
doTemp.setHTMLStyle("PhaseOpinion"," style={height:180px;width:450;overflow:scroll;font-size:9pt;} ");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
//生成HTMLDataWindow
dwTemp.genHTMLObjectWindow(sSerialNo);
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%>
<%
//依次为:
//0.是否显示
//1.注册目标组件号(为空则自动取当前组件)
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
//3.按钮文字
//4.说明文字
//5.事件
//6.shortcutKey 快捷键 7.href 资源路径 8.parm 资源路径参数 9.iconCls 图标 CSS名称
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","saveRecord()","","","",""},
{"true","All","Button","删除","删除意见","deleteRecord()","","","",""},
//jychen 2014/12/24
{"true","All","Button","退回前一步","退回前一步","backStep()","","","",""},
};
//jychen 2014/12/24 检查退回按钮是否可见
String iCount = Sqlca.getString(" select count(1) from flow_task ft,flow_model fm where ft.serialno ='"+sSerialNo+"' "+
" and fm.flowno = ft.flowno and ft.phaseno = fm.phaseno and fm.attribute1 like '%backStep%' "+
" and fm.phaseno not in (select initphase from flow_catalog where flowno = fm.flowno) and ft.phaseno!='3000'");
if("0".equals(iCount))
{
sButtons[2][0]="false";
}
//会计初审岗签发了银行承兑汇票就不能退回 合并来自对公 add by pzhao2 20161227
String sFlag ="0";
if("PutOutApply".equals(sObjectType))
{
sFlag = Sqlca.getString(" select count(1) from flow_task ft,business_putout bp where ft.serialno ='"+sSerialNo+"' "+
" and ft.objectno = bp.serialno and ft.phaseno ='0070' and bp.putOutStatus ='15' ");
}
%>
<%/*~END~*/%>
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=Info05;Describe=主体页面;]~*/%>
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=自定义函数;]~*/%>
<script language="javascript">
/*~[Describe=保存签署的意见;InputParam=无;OutPutParam=无;]~*/
function saveRecord()
{
sOpinionNo = getItemValue(0,getRow(),"OpinionNo");
if (typeof(sOpinionNo)=="undefined" || sOpinionNo.length==0)
{
initOpinionNo();
}
//不允许签署的意见为空白字符
if(/^\s*$/.exec(getItemValue(0,0,"PhaseOpinion"))){
alert("请签署意见!");
setItemValue(0,0,"PhaseOpinion","");
return false;
}
/* //jychen 2015/01/05 检查必输项
if(!vI_all("myiframe0")) return false; */
setItemValue(0,0,"UpdateUser","<%=CurUser.getUserID()%>");
setItemValue(0,0,"UpdateTime","<%=StringFunction.getToday()%>");
as_save("myiframe0");
return true;
}
/*~[Describe=删除已删除意见;InputParam=无;OutPutParam=无;]~*/
function deleteRecord()
{
sSerialNo=getItemValue(0,getRow(),"SerialNo");
sOpinionNo = getItemValue(0,getRow(),"OpinionNo");
//不允许签署的意见为空白字符 增加对于先点击保存按钮后在点击删除按钮出现的错误提示 xjzhu
if(/^\s*$/.exec(getItemValue(0,0,"PhaseOpinion"))){
alert("您还没有签署意见,不能做删除意见操作!");
setItemValue(0,0,"PhaseOpinion","");
return;
}
if (typeof(sOpinionNo)=="undefined" || sOpinionNo.length==0)
{
alert("您还没有签署意见,不能做删除意见操作!");
}
else if(confirm("你确实要删除意见吗?"))
{
sReturn= RunMethod("BusinessManage","DeleteSignOpinion",sSerialNo+","+sOpinionNo);
if (sReturn==1)
{
alert("意见删除成功!");
}
else
{
alert("意见删除失败!");
}
}
top.reloadSelf();
}
//jychen 2014/01/24
/*~[Describe=退回前一步;InputParam=无;OutPutParam=无;]~*/
function backStep()
{
//保存签署意见
if(!saveRecord()) return;
//获取任务流水号
sSerialNo = "<%=sSerialNo%>";
//会计初审岗签发了银行承兑汇票就不能退回 来自对公 add by pzhao2 20161227
if("<%=sFlag%>" != "0"){
alert("该银行承兑汇票已经签发,不允许退回前一步!");
return;
}
if(!confirm(getMessageText('ALS70509'))) return; //您确认要将该申请退回上一环节吗?
//退回任务操作
sRetValue = PopPage("/Common/WorkFlow/CancelTaskAction.jsp?SerialNo="+sSerialNo+"&rand=" + randomNumber(),"退回任务操作","dialogWidth=0;dialogHeight=0;status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;statusbar:no");
//如果成功,则关闭页面
if(sRetValue == "Commit"){
self.close();
}else{
alert(sRetValue);
}
}
/*~[Describe=初始化流水号字段;InputParam=无;OutPutParam=无;]~*/
function initOpinionNo()
{
var sTableName = "FLOW_OPINION";//表名
var sColumnName = "OPINIONNO";//字段名
var sPrefix = "";//无前缀
var sOpinionNo = getSerialNo(sTableName,sColumnName,sPrefix);
//将流水号置入对应字段
setItemValue(0,getRow(),sColumnName,sOpinionNo);
}
/*~[Describe=插入一条新记录;InputParam=无;OutPutParam=无;]~*/
function initRow()
{
//如果没有找到对应记录,则新增一条,并可以设置字段默认值
if (getRowCount(0)==0)
{
setItemValue(0,getRow(),"SerialNo","<%=sSerialNo%>");
setItemValue(0,getRow(),"ObjectType","<%=sObjectType%>");
setItemValue(0,getRow(),"ObjectNo","<%=sObjectNo%>");
setItemValue(0,getRow(),"InputOrg","<%=CurUser.getOrgID()%>");
setItemValue(0,getRow(),"InputOrgName","<%=CurUser.getOrgName()%>");
setItemValue(0,getRow(),"InputUser","<%=CurUser.getUserID()%>");
setItemValue(0,getRow(),"InputUserName","<%=CurUser.getUserName()%>");
setItemValue(0,getRow(),"InputTime","<%=StringFunction.getToday()%>");
}
}
</script>
<%/*~END~*/%>
<script language=javascript>
initRow(); //页面装载时对DW当前记录进行初始化
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>