日期:2014-05-16 浏览次数:20445 次
grid604.addListener("cellclick", function(grid, rowIndex, columnIndex, e) { var record = grid604.getStore().getAt(rowIndex); var fd=record.get("FD_OBJECTID604"); showPopUp(fd,"604"); var mybtndata = parent.com.haah.linzhou.SysInfo. getSightinfo().getButtonByID('id');
var state = record.get("字段的值") if(sm.getCount()==1){ if(state=='1'){//事件已确认 grid.getTopToolbar().items.get('chaxun').setVisible(true); //查询 configureButtonByID(mybtndata,"chaxun60,add60,pdate60,info60");
buttons: [{ text: '添加', handler: function() { if (!form.getForm().isValid()) { return; } if (form.getForm().findField("id").getValue() == "") { // 添加 form.getForm().submit({ url: 'add.jsp', success: function(f, action) { if (action.result.success) { Ext.Msg.alert('消息', action.result.msg, function() { grid.getStore().reload(); form.getForm().reset(); form.buttons[0].setText('添加'); }); } }, failure: function() { Ext.Msg.alert('错误', "添加失败"); } }); } else { // 修改 form.getForm().submit({ url: 'update.jsp', success: function(f, action) { if (action.result.success) { Ext.Msg.alert('消息', action.result.msg, function() { grid.getStore().reload(); form.getForm().reset(); form.buttons[0].setText('添加'); }); } }, failure: function() { Ext.Msg.alert('错误', "修改失败"); } }); } } }