271 lines
9.1 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 userId= CurUser.getUserID();
String userName = CurUser.getUserName();
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
String FlowNo = CurPage.getParameter("FlowNo");//流程编号
String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号
String projectNo=CurPage.getParameter("ProjectNo");//项目编号
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
String ShowButton = "false";
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "-2";//只读模式
RightType="ReadOnly";
// isShowButton=false;
}else{
// isShowButton=true;
ShowButton = "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[][]{
{ShowButton,"All","Button","保存","保存所有修改","saveRecord()","","","",""},
{"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""},
{"true","","Button","尽职信审报告","尽职信审报告","openAppointFileList('APZLCTYWXSCL','传统业务信审资料')","","","","btn_icon_saveNew",""}
};
%>
<%/*~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();
function selectManySubject(){
AsDialog.OpenSelector("selectManySubject","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="")
{
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
setItemValue(0,0,"subjectid",sReturn[0]);
setItemValue(0,0,"subjectname",sReturn[1]);
},"请选择主体",'');
}
function openFileList(){
let appInfo = getAppInfo();
let index = appInfo.indexOf("@");
if(index==-1){
alert(appInfo);
return;
}
let appCode = appInfo.substr(0,index);
let appName = appInfo.substr(index+1,appInfo.length);
if(appCode=='0000'){
alert(appName);
return;
}
openAppointFileList(appCode,appName);
}
function openAppointFileList(appCode,appName){
let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
let code = getCode();
let params = getRequestParam(appCode,appName,code);
if(params!=null){
AsControl.postICMS(url,params);
}
}
function getAppInfo(){
let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
return appInfo;
}
function getCode(){
let code = 'ECM0002';
if(
"<%=FlowNo%>"=="ProjectApprovalFlow"&&("<%=sPhaseNo%>"=="0010"||"<%=sPhaseNo%>"=="0040"||"<%=sPhaseNo%>"=="0050")||
"<%=FlowNo%>"=="ProjectCreditFlow"&&("<%=sPhaseNo%>"=="0010"||"<%=sPhaseNo%>"=="0040")
){
code = 'ECM0001';
}
return code;
}
function getRequestParam(appCode,appName,code){
let busiNo = '<%=projectNo%>';
if(busiNo==null||busiNo==""||busiNo=="null"){
busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
}
let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>");
return param;
}
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>