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

68 lines
2.7 KiB
Plaintext

<%@ page contentType="text/html; charset=GBK"%>
<%@page import="com.amarsoft.app.base.util.ObjectWindowHelper"%>
<%@page import="com.amarsoft.app.base.util.XMLHelper" %>
<%@page import="com.amarsoft.app.base.businessobject.*"%>
<%@include file="/Frame/resources/include/include_begin_list.jspf"%>
<%
String xmlFile = CurPage.getParameter("XMLFile");//"{$ARE.PRD_HOME}/etc/app/accounting/accountcode-config.xml"
String xmlTags = CurPage.getParameter("XMLTags");//BookTypes//BookType
String keys = CurPage.getParameter("Keys"); //ID
String type = CurPage.getParameter("Type");
ASObjectWindow dwTemp = ObjectWindowHelper.createObjectWindow_List("PRD_ComponentACList", BusinessObject.createBusinessObject(), CurPage, request);
ASDataObject doTemp=dwTemp.getDataObject();
doTemp.setBusinessProcess("com.amarsoft.app.als.businessobject.web.XMLBusinessObjectProcessor");
dwTemp.Style="1"; //设置为Grid风格
dwTemp.ReadOnly="1";
dwTemp.setPageSize(20);
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = {
{"true","All","Button","新增","新增","newComponent()","","","","",""},
{"true","","Button","编辑","编辑","editComponent()","","","","",""},
{"true","All","Button","删除","删除","deleteComponent()","","","","",""},
};
%>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newComponent(){
AsDialog.PopView("/ProductManage/ComponentConfig/ComponentLibraryACInfo.jsp","XMLFile=<%=xmlFile%>&XMLTags=<%=xmlTags%>||ID=''&Keys=<%=keys%>&ID=&Type=<%=type%>","",function(returnValue){
reloadSelf();
});
}
function editComponent(){
var id = getItemValue(0,getRow(0),"ID");
var format = getItemValue(0,getRow(0),"Format");
var width = top.document.body.offsetWidth-180;
var componentName = getItemValue(0,getRow(),"Name");
var height = top.document.body.offsetHeight-100;
if(typeof(id)=="undefined" || id.length==0) {
alert(getHtmlMessage('1'));//请选择一条信息!
return ;
}
AsDialog.PopView("/ProductManage/ComponentConfig/ComponentLibraryACInfo.jsp","XMLFile=<%=xmlFile%>&XMLTags=<%=xmlTags%>||ID='"+id+"'&Keys=<%=keys%>&ID="+id+"&Type=<%=type%>&Format="+format,{width:width,height:height,title:componentName},function(returnValue){
reloadSelf();
});
}
function deleteComponent(){
var id = getItemValue(0,getRow(0),"ID");
if(typeof(id)=="undefined" || id.length==0) {
alert(getHtmlMessage('1'));//请选择一条信息!
return ;
}
as_delete(0);
}
$(document).ready(function(){
//非数据库表数据操作,请加入以下代码
for(var i=0;i<DZ[0][1].length;i++){
TableFactory.ColKeyIndexs[TableFactory.ColKeyIndexs.length] = i;
}
});
</script>
<%@include file="/Frame/resources/include/include_end.jspf"%>