var workflow={add:function(){ct.form("\u6dfb\u52a0\u5de5\u4f5c\u6d41","?app=system&controller=workflow&action=add",400,350,function(a){if(a.state){tableApp.addRow(a.data);ct.ok("\u64cd\u4f5c\u6210\u529f");return true}else{ct.error(a.error);return false}})},edit:function(a){ct.form("\u4fee\u6539\u5de5\u4f5c\u6d41","?app=system&controller=workflow&action=edit&workflowid="+a,400,350,function(b){if(b.state){tableApp.updateRow(a,b.data);ct.ok("\u64cd\u4f5c\u6210\u529f");return true}else{ct.error(b.error);
return false}})},del:function(a){if(a===undefined){a=tableApp.checkedIds();var b='\u786e\u5b9a\u5220\u9664\u9009\u4e2d\u7684<b style="color:red">'+a.length+"</b>\u6761\u8bb0\u5f55\u5417\uff1f"}else b='\u786e\u5b9a\u5220\u9664\u7f16\u53f7\u4e3a<b style="color:red">'+a+"</b>\u7684\u8bb0\u5f55\u5417\uff1f";if(a.length===0){ct.warn("\u8bf7\u9009\u62e9\u8981\u64cd\u4f5c\u7684\u8bb0\u5f55");return false}ct.confirm(b,function(){$.getJSON("?app=system&controller=workflow&action=delete&workflowid="+a,function(c){if(c.state){tableApp.load();
ct.ok("\u5220\u9664\u6210\u529f\uff01")}else ct.error("\u5220\u9664\u5931\u8d25\uff01")})})}};
