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

142 lines
5.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_list.jspf"%>
<%
/*
Author: undefined 2017-05-12
Content:
History Log:
*/
String ProjectId= CurPage.getParameter("ProjectId");
String ContractId= CurPage.getParameter("ContractId");
String ProductId=CurPage.getParameter("ProductId");
String plannumber=CurPage.getParameter("plannumber");
String calType = CurPage.getParameter("calType");
if(calType == null){
calType = "proj_process";
}
String planCName="PROJECT_PLAN_NUMBER";
String tableName="";
String jbowhere="";
if("proj_process".equals(calType)){
planCName="PROJECT_PLAN_NUMBER";
tableName="jbo.app.tenwa.calc.LC_PROJ_CONDITION";
jbowhere="project_id='"+ProjectId+"'";
}else if("pay_process".equals(calType)){
planCName="PAYMENT_NUMBER";
tableName="jbo.app.tenwa.calc.LC_CALC_CONDITION";
jbowhere="contract_id='"+ContractId+"'";
}else{
planCName="CONTRACT_PLAN_NUMBER";
tableName="jbo.app.tenwa.calc.LC_CONTRACT_CONDITION";
jbowhere="contract_id='"+ContractId+"'";
}
ASObjectModel doTemp = new ASObjectModel("LCCalcPlanTempList");
doTemp.setVisible(planCName, true);
if("pay_process".equals(calType)){
doTemp.setVisible("FILENAME", false);
doTemp.setVisible("INPUTTIME", false);
doTemp.setVisible("ACTION", false);
}
doTemp.setJboClass(tableName);
doTemp.setJboWhere(jbowhere);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
sButtons=new String[][] {
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_edit"},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function viewAndEdit(){
var sUrl = "/Accounting/LoanSimulation_formal/LoanBasicInfo.jsp";
var sPara = getItemValue(0,getRow(0),'ID');
var plannumber = getItemValue(0,getRow(0),'<%=planCName%>');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
var sParam="ProjectId=<%=ProjectId%>&ContractId=<%=ContractId%>&calType=<%=calType%>&plannumber="+plannumber+"&ProductId=<%=ProductId%>";
AsControl.OpenView(sUrl,sParam,'_self','');
}
//在加载完表格后调用
function afterSearch(){
if("pay_process"=="<%=calType%>"){
return;
}
var RightType = "ReadOnly";
var ishistory = "true";
for(var i=0;i<getRowCount(0);i++){
var html="";
html+='<a onclick=downloadFile(\''+getItemValue(0,i,"attrid")+'\')><font color="blue">'+getObj(0,i,"FILENAME").innerHTML+'</font></a>';
getObj(0,i,"FILENAME").innerHTML=html;
html='<a class="btn_icon_down" onclick="viewOffice()">&nbsp</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if((null ==RightType||RightType!="ReadOnly")&&(null==ishistory||ishistory!="true")){
html+=' <a class="btn_icon_edit" onclick="editOffice()">&nbsp;</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class="btn_icon_delete"onclick="deleteFile()">&nbsp;</a>&nbsp;&nbsp;&nbsp; ';
}
getObj(0,i,"ACTION").innerHTML=html;
}
setColumnWidth(0,"ACTION",150);
}
function viewOffice(){
var id = getItemValue(0,getRow(),"attrid");
var filename = getItemValue(0,getRow(),"FILENAME");
var filetype=filename.substr(filename.indexOf(".")+1);
var status=1;
AsDialog.PopView("/Tenwa/Core/OfficeTemplate/OnlineOperation/online/editOfficeOnLine.jsp","filetype="+filetype+"&status="+status+"&id="+id+"&CompClientID=<%=CurPage.getParameter("CompClientID")%>","dialogWidth=1024px;dialogHeight=1000px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") {
return;
}else if(sPhaseInfo == "Success" || sPhaseInfo == "success"){
alert("提交成功!");
reloadSelf();
}else{
alert("提交失败!");
}
},"查看文档");
}
function editOffice(){
var id = getItemValue(0,getRow(),"attrid");
var filename = getItemValue(0,getRow(),"FILENAME");
var filetype=filename.substr(filename.indexOf(".")+1);
var status=2;
AsDialog.PopView("/Tenwa/Core/OfficeTemplate/OnlineOperation/online/editOfficeOnLine.jsp","filetype="+filetype+"&status="+status+"&id="+id+"&CompClientID=<%=CurPage.getParameter("CompClientID")%>","dialogWidth=1024px;dialogHeight=1000px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") {
return;
}else if(sPhaseInfo == "Success" || sPhaseInfo == "success"){
alert("提交成功!");
reloadSelf();
}else{
alert("提交失败!");
}
},"编辑文档");
}
function deleteFile(){
var id = getItemValue(0,getRow(),"attrid");
var sParams="attId="+id;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","deleteFile",sParams);
reloadSelf();
}
function downloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=CurPage.getParameter("CompClientID")%>&sqlString=save@"+id, "downloadTemplate");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>