EAS 打开一组单据的方法。(通过下一个,或者上一个打开)



super.actionCreateTiDan_actionPerformed(e);

int activieRowIndex = tblMain.getSelectManager().getActiveRowIndex();
if(activieRowIndex==-1){
MsgBox.showInfo("请选择记录行");
SysUtil.abort();
}
String id = tblMain.getCell(activieRowIndex, "id").getValue().toString();
ObjectUuidPK pk = new ObjectUuidPK(id);
if(!getBizInterface().exists(pk)){
MsgBox.showInfo("记录不存在!");
SysUtil.abort();
}
BuyerPurSalContractInfo BuyerPurSalContractInfo = getBizInterface().getBuyerPurSalContractInfo(pk);
if(!BillStatusEnum.audit.equals(BuyerPurSalContractInfo.getBillStatus())){
MsgBox.showInfo("非审核状态下的单据不允许生成提货通知单!");
SysUtil.abort();
}

IObjectPK[] pks = getBizInterface().createTiDan(BOSUuid.read(id));


   //idList 中保存需要单开单据的id

IIDList idList = RealModeIDList.getEmptyIDList();
for(IObjectPK idPk:pks){
idList.add(idPk.toString());
}
UIContext uiContext = new UIContext();
uiContext.put("ID", pks[0]);//首先显示的单据
uiContext.put("IDList", idList);//所有需要显示单据的集合
IUIWindow uiWindow = null;
uiContext.put(UIContext.OWNER, ui);
try {
IUIFactory uiFactory = UIFactory.createUIFactory(UIFactoryName.NEWWIN); 
uiWindow = uiFactory.create(DeliveryNoticeBillEditUI.class.getName(), uiContext, null, OprtState.VIEW);
} catch (UIException e1) {
e1.printStackTrace();
handUIException(e1);
}

if(uiWindow != null) uiWindow.show();


EAS 打开一组单据的方法。(通过下一个,或者上一个打开)