var commonGridObj_feetemplate;
function $(id){
return document.getElementById(id);
}
function createGrid(){
//header
var headerArgs_feetemplate = new Array("","业务种类","费用类型","模板系统名称","模板中文名称","创建人","创建时间","备注");
//width
var widthArgs_feetemplate = new Array("40","100","80","120","120","120","120","120");
//column align
var colAlignArgs_feetemplate = new Array("center","center","center","center","center","center","center","center");
//column sort
var colSortArgs_feetemplate = new Array("na","str","str","str","str","str","str","str");
//column type
var colTypeArgs_feetemplate = new Array("ch","ro","ro","ro","ro","ro","ro","ro");
commonGridObj_feetemplate = new TGridCommon("mygrid_container_feetemplate","form1",headerArgs_feetemplate,widthArgs_feetemplate,colAlignArgs_feetemplate,colSortArgs_feetemplate,colTypeArgs_feetemplate);
commonGridObj_feetemplate.setResponseUrl("FeeTemplateGridSource.aspx");
commonGridObj_feetemplate.setRequest("FeeTemplateGridSource.aspx?handle=templatelist&show_page=15&cur_page=1&uid="+commonGridObj_feetemplate.newGuid());
commonGridObj_feetemplate.setSourceType("json");
commonGridObj_feetemplate.setSkin("xp");
commonGridObj_feetemplate.setImageUrl("../images/");
commonGridObj_feetemplate.initGrid();
commonGridObj_feetemplate.bind();
commonGridObj_feetemplate.initPageByGID("templatelist");
commonGridObj_feetemplate.getGridObj().attachEvent("onRowSelect", function(id,ind){
var openSet = "height=490, width=800, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top= " +(screen.height-490)/2 + ",Left= "+(screen.width-800)/2
var openType = "_blank";
var openUrl = "FeeTemplateSetEdit.aspx?handle=edit&id="+id;
window.open (openUrl,openType,openSet);
});
commonGridObj_feetemplate.clickEvent = function(){
commonGridObj_feetemplate.getGridObj().attachEvent("onRowSelect", function(id,ind){
var openSet = "height=490, width=800, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top= " +(screen.height-490)/2 + ",Left= "+(screen.width-800)/2
var openType = "_blank";
var openUrl = "FeeTemplateSetEdit.aspx?handle=edit&id="+id;
window.open (openUrl,openType,openSet);
});
}
commonGridObj_feetemplate.getGridObj().attachEvent("onEditCell",function(stage,rId,cInd,nValue,oValue){
if(stage == 0){
if(cInd != 0){
return false;
}else{
return true;
}
}
});
}
function addFeeTemplate(){
var openSet = "height=490, width=800, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top= " +(screen.height-490)/2 + ",Left= "+(screen.width-800)/2
var openType = "_blank";
var openUrl = "FeeTemplateSetEdit.aspx?handle=add";
window.open (openUrl,openType,openSet);
}
function refreshList(){
createGrid();
}
function deleteTemplate(){
var iCount = 0;
var iDelCount = 0;
if(commonGridObj_feetemplate != null){
if(window.confirm("您确定要将选中的费用模板删除")){
for(var i=0;i