201 lines
6.6 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=Info00;Describe=注释区;]~*/%>
<%
/*
Author:lzb 2017-05-5
Tester:
Content: 项目基本信息详情页面
Input Param:
Output param:
History Log:
*/
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info01;Describe=定义页面属性;]~*/%>
<%
String PG_TITLE = "项目基本信息详情页面"; // 浏览器窗口标题 <title> PG_TITLE </title>
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info02;Describe=定义变量,获取参数;]~*/%>
<%
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String FlowNo = CurPage.getParameter("FlowNo");//流程编号
if(sFlowUnid == null) sFlowUnid="";
String sTempletNo = CurPage.getParameter("TempletNo");//模板号
if(sTempletNo == null) sTempletNo = "LBProjectInfoTemp";
String orgid = CurUser.getOrgID();//当前用户部门id
String levelOrgId ="";//上级部门
String orgdeptname="";//部门层级名称
String orgidname="";//项目出单部门
if(orgid.length()>12){
orgidname=NameManager.getOrgName(orgid);
levelOrgId=orgid.substring(0, 9);
orgdeptname="";
for(int i=0;i<(orgid.length()-9)/4;i++){
orgdeptname+=NameManager.getOrgName(levelOrgId)+">>";
levelOrgId=orgid.substring(0, 9+(i+1)*4);
}
orgdeptname+=CurUser.getOrgName();
}else{
orgdeptname=CurUser.getOrgName();
orgidname=CurUser.getOrgName();
}
String userid = CurUser.getUserID();//用户id
String useridname = CurUser.getUserName();//用户姓名
String today = StringFunction.getToday();
String RightType=CurPage.getParameter("RightType");
String ishistory=CurPage.getParameter("IsHistory");
String nodeNo=CurPage.getParameter("NodeNo");
String productId = CurPage.getParameter("ProductId");
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%>
<%
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
if(null!=ishistory&&ishistory.equals("true") && !"ProjectApprovalFlow".equals(FlowNo)){
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataInfoHistory");//如果是历史则新显示历史数据
}
CurPage.getCurComp().setAttribute("RightType", null);
doTemp.setDefaultValue("FlowUnid", sFlowUnid);//赋值流程编号
//通用产品
if("currentProduct".equals(productId)){
doTemp.setRequired("LEAS_FORM", false);
doTemp.setVisible("LEAS_FORM", false);
}
%>
<%@ include file="/Tenwa/Lease/Flow/Comm/baseShowFormal.jspf"%>
<%
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "-2";//只读模式
RightType="ReadOnly";
isShowButton=false;
}else{
isShowButton=true;
}
if(isShowForaml.equals("true")){
dwTemp.genHTMLObjectWindow(sProjectId);
}else{
dwTemp.genHTMLObjectWindow(sFlowUnid);
}
CurPage.getCurComp().setAttribute("RightType",RightType);
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%>
<%
String sButtons[][] =null;
sButtons= new String[][]{
{"true","All","Button","保存","保存所有修改","saveRecord()","","","",""}
};
%>
<%/*~END~*/%>
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=Info05;Describe=主体页面;]~*/%>
<%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info06;Describe=定义按钮事件-;]~*/%>
<script type="text/javascript">
//---------------------定义按钮事件------------------------------------
/*~[Describe=保存记录;InputParam=无;OutPutParam=无;]~*/
function saveRecord(){
as_save("myiframe0");
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info07;Describe=自定义函数;]~*/%>
<script type="text/javascript">
//选择项目经理
function selectManager(){
AsDialog.OpenSelector("SelectManager","orgid,<%=orgid%>","dialogWidth=" + parseInt(window.screen.width * 0.5) + "px dialogHeight=" + parseInt(window.screen.height * 0.3) + "px",function(sReturn){
if(!sReturn || sReturn == "_CANCEL_"||sReturn=="_NONE_"||sReturn=="_CLEAR_"){
return;
}
sReturn = sReturn.split("@");
setItemValue(0,getRow(),"PROJECT_MANAGE_NAME",sReturn[1]);
setItemValue(0,getRow(),"PROJECT_MANAGE",sReturn[0]);
},"请选项目经理");
}
//选择项目协办
function selectAssist(){
AsDialog.OpenSelector("SelectManager","orgid,<%=orgid%>","dialogWidth=" + parseInt(window.screen.width * 0.5) + "px dialogHeight=" + parseInt(window.screen.height * 0.3) + "px",function(sReturn){
if(!sReturn || sReturn == "_CANCEL_"||sReturn=="_NONE_"||sReturn=="_CLEAR_"){
return;
}
sReturn = sReturn.split("@");
setItemValue(0,getRow(),"PROJECT_ASSIST_NAME",sReturn[1]);
setItemValue(0,getRow(),"PROJECT_ASSIST",sReturn[0]);
},"请选项目协办");
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info08;Describe=页面装载时,进行初始化;]~*/%>
<script type="text/javascript">
//初始化数据
function init(){
var num = RunJavaMethodSqlca("com.tenwa.lease.flow.project.projectapproval.BusinessTypeController","getNumber","");
if(num==1){
//字段隐藏,当系统中只有1个业务品种的时候该字段隐藏当系统中只有1个业务品种的时候该字段隐藏
hideItem(0,'productName');
}else if(num>1){
showItem(0,"productName");//字段显示0109
}
var ProjectDept=getItemValue(0, getRow(),"Project_Dept");//项目出单部
var ProjectDeptDetail=getItemValue(0, getRow(),"Project_Dept_Detail");//部门层级名称
var ProjectRegistrar=getItemValue(0, getRow(),"Project_Registrar");//经办人
var ProjectManage=getItemValue(0, getRow(),"Project_Manage");//项目经理
var ProjectDate=getItemValue(0, getRow(),"Project_Date");//项目日期
if(typeof(ProjectDept) == "undefined" || ProjectDept.length == 0 ){
setItemValue(0,getRow(),"Project_Dept","<%=orgid%>");
setItemValue(0,getRow(),"Project_Dept_Name","<%=orgidname%>");
}
if(typeof(ProjectDeptDetail) == "undefined" || ProjectDeptDetail.length == 0 ){
setItemValue(0,getRow(),"Project_Dept_Detail","<%=orgdeptname%>");
}
if(typeof(ProjectRegistrar) == "undefined" || ProjectRegistrar.length == 0 ){
setItemValue(0,0,"Project_Registrar","<%=userid%>");
setItemValue(0,0,"Project_Registrar_Name","<%=useridname%>");
}
if(typeof(ProjectManage) == "undefined" || ProjectManage.length == 0 ){
setItemValue(0,0,"Project_Manage","<%=userid%>");
setItemValue(0,0,"Project_Manage_Name","<%=useridname%>");
}
if(typeof(ProjectDate) == "undefined" || ProjectDate.length == 0 ){
setItemValue(0,getRow(),"Project_Date","<%=today%>");
}
}
init();
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>