function(button, e) { debugger; // 中断调试指令,可以手动删除它 var me = this; // this 为列表视图控制器 var viewModel = this.getViewModel(); // 获取视图模型 var grid = this.getView(); // 获取到列表视图 var records = grid.getSelectionModel().getSelection(); // 获取到选中的记录数组 var record=records[0]; var win = Ext.create(util.getCodeGenerate1ClassName('档案转出记录','Store'),{ autoLoad: true, httpGetRequestExParams: { // 如使用本行代码只要求后台的方法中有参数QueryCondition(默认生成的List()方法中就包含有该参数)即可接收多字段查询条件。建议使用本行代码 QueryCondition: { DangAnID:{ Value1: record.data.ID, CompareMode: '等于' // 比较模式:0=>包含;1=>等于 } } }, listeners:{ load: function(store, records, successful, operation, eOpts){ showWin(records[0]); } } }); function showWin(recordBeiAnZhiJiJiBenXinXi) { var record1 = Ext.create(util.getCodeGenerate1ClassName('档案转出记录','Model'),{ BelongTenantID:recordBeiAnZhiJiJiBenXinXi.data.BelongTenantID, BelongOrganizationPath:recordBeiAnZhiJiJiBenXinXi.data.BelongOrganizationPath, XingMing:recordBeiAnZhiJiJiBenXinXi.data.XingMing, XingBie:recordBeiAnZhiJiJiBenXinXi.data.XingBie, YuanGongZuoBuMen:recordBeiAnZhiJiJiBenXinXi.data.YuanGongZuoBuMen, DangAnCaiLiao:recordBeiAnZhiJiJiBenXinXi.data.JingYingDiZhi, YuanZhiWu:recordBeiAnZhiJiJiBenXinXi.data.YuanZhiWu, DangAnBianHao:recordBeiAnZhiJiJiBenXinXi.data.DangAnBianHao, DangAnZhuaiChuShiJian:recordBeiAnZhiJiJiBenXinXi.data.DangAnZhuaiChuShiJian, JingBanRen:recordBeiAnZhiJiJiBenXinXi.data.JingBanRen, GanBuID:recordBeiAnZhiJiJiBenXinXi.data.GanBuID, ZhuaiWangDanWei:recordBeiAnZhiJiJiBenXinXi.data.ZhuaiWangDanWei, ShouDangAnRen:recordBeiAnZhiJiJiBenXinXi.data.ShouDangAnRen, BeiZhu:recordBeiAnZhiJiJiBenXinXi.data.BeiZhu, JiBenBiaoID:recordBeiAnZhiJiJiBenXinXi.data.JiBenBiaoID, GanBuID:recordBeiAnZhiJiJiBenXinXi.data.GanBuID, ID:recordBeiAnZhiJiJiBenXinXi.data.ID, Timestamp:recordBeiAnZhiJiJiBenXinXi.data.Timestamp, // 创建新记录 }); // 创建新记录 record1.phantom = false; var win = Ext.create(util.getCodeGenerate1ClassName('档案转出记录','Edit'), { viewModel: { data: { data: record1 } }, title: '档案转出详情', }); grid.add(win); // 将win归入到grid管理 win.showBy(grid); //在grid中居中显示窗体 var form = win.down('form'); // 从窗体win中获取内部的form util.setReadOnlyForm(form); // 将编辑界面form中的所有字段输入控件设为只读模式 var saveButton = win.down('button[text=确认转出]'); // 查找保存按钮 if(saveButton) // 如果找到了保存按钮 saveButton.setVisible(false); // 将保存按钮设为隐藏不显示 } }