EAS中的单据跳转 一般需要新增,但如果存在相对应的数据时,就要显示相对应的数据了。
String destBillEditUIClassName = "com.kingdee.eas.custom.studentinfo.client.ContactEditUI"; StudentInfo sinfo = new StudentInfo(); sinfo.setNumber(this.txtNumber.getText()); sinfo.setStudentname(this.txtstudentname.getText()); ContactInfo cInfo = getContactInfo(); if(cInfo.getId() == null){ Map map = new UIContext(this); map.put(UIContext.OWNER, this); map.put("studentinfo", sinfo); IUIWindow uiWindow = null; // UIFactoryName.MODEL 为弹出模式 uiWindow = UIFactory.createUIFactory(UIFactoryName.MODEL).create( destBillEditUIClassName, map, null, OprtState.ADDNEW); // 开始展现 UI uiWindow.show(); }else{ // 显示窗口 IUIFactory uiFactory = null; UIContext uiCtx = new UIContext(this); uiCtx.put(UIContext.ID, cInfo.getId().toString()); // RealModeIDList idList = new RealModeIDList(); idList.add(cInfo.getId().toString()); uiCtx.put("IDList", idList); IUIWindow uiWindow = null; // UIFactoryName.MODEL 为弹出模式 uiWindow = UIFactory.createUIFactory(UIFactoryName.MODEL).create( destBillEditUIClassName, uiCtx, null, OprtState.EDIT); // 开始展现 UI uiWindow.show(); }