function editDmlb(id, from) { huimv.loadPage('gydmRight', 'editDmlb.htm', { "id" : id, "from" : from }); } /** * 作废代码列表 * @param id */ function disableDmlb(id, from, numOfGydm) { if(numOfGydm != "" && numOfGydm > 0) { var errMsg = document.getElementById('errMsg'); errMsg.innerHTML = "无法删除此代码类别,请先删除此代码类别下的公用代码!"; return; } Dialogs.alert("确定作废当前代码类别?", { title : '提示信息', width : 250, height : 80, top : 150, button : { ok : ['确定',function(){ this.close(); huimv.showProcessModel('处理数据中'); jQuery.ajax({ url : 'disableDmlb.htm', dataType : 'json', type : 'post', cache : false, data : {"id" : id}, success : function(data) { huimv.hideProcessModel(); if (data.returnCode > 0) { if (from == 'list') { huimv.reloadGrid('dmlbGrid'); } else if (from == 'view') { loadDmlbList(); } } else { Dialogs.alert("传入参数有误!", { width : 300, height : 50 }); } }, error : function(data) { huimv.showError(data.responseText); } }); }], cancel : ['取消',function(){ this.close(); }] } }); }