// 修改猪舍档案 function editZsda(id, from) { huimv.loadPage('zsdaRight', 'editZsda.htm', { "id" : id, "from" : from }); } /** * 删除猪舍档案 * @param id * @param from * @param numOfExistLq */ function disableZsda(id, from, numOfExistLq) { if (numOfExistLq != "" && numOfExistLq > 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 : 'disableZsda.htm', dataType : 'json', type : 'post', cache : false, data : {"id" : id}, success : function(data) { huimv.hideProcessModel(); if (data.returnCode > 0) { if (from == 'list') { huimv.reloadGrid('zsdaGrid'); } else if (from == 'view') { loadZsdaList(); } } else { Dialogs.alert("传入参数有误!", { width : 300, height : 50 }); } }, error : function(data) { huimv.showError(data.responseText); } }); }], cancel : ['取消',function(){ this.close(); }] } }); }