|
@@ -27,17 +27,19 @@ public class DemandApproveAction extends AbstractAction{
|
|
|
@Override
|
|
|
public void execute() throws Exception {
|
|
|
MainBillMgrPanel mainMgrPanel = (MainBillMgrPanel) getMainPanel();
|
|
|
- int selectedRow = ((DemandMainPanel) getMainPanel()).getSelectedRow();
|
|
|
- HRAggVO[] s = (HRAggVO[]) mainMgrPanel.getMainBillListPanel().getData();
|
|
|
- if (null != s && s[selectedRow] != null){
|
|
|
- DemandVO headvo = (DemandVO) s[selectedRow].getParentVO();
|
|
|
+ //int selectedRow = ((DemandMainPanel) getMainPanel()).getSelectedRow();
|
|
|
+ HRAggVO [] s = new HRAggVO[] {this.getSelection(mainMgrPanel)};
|
|
|
+ //HRAggVO[] s = (HRAggVO[]) mainMgrPanel.getMainBillListPanel().getData();
|
|
|
+ //if (null != s && s[selectedRow] != null){
|
|
|
+ //DemandVO headvo = (DemandVO) s[selectedRow].getParentVO();
|
|
|
+ DemandVO headvo = (DemandVO) s[0].getParentVO();
|
|
|
if (headvo.getBillstatus() != IBillStatus.FREE){
|
|
|
throw new ValidationException("非自由态单据不允许审批");
|
|
|
}
|
|
|
headvo.setBillstatus(IBillStatus.CHECKPASS);
|
|
|
headvo.setApprove(PubEnv.getPk_user());
|
|
|
- }
|
|
|
- ((DemandDataModel)this.frameUI.getDataModel()).execApprove(s[selectedRow]);
|
|
|
+ //}
|
|
|
+ ((DemandDataModel)this.frameUI.getDataModel()).execApprove(s[0]);
|
|
|
getFrameUI().getBtnManager().getCmdByID(AbstractBtnReg.SYSBTN_REFRESH).execute();
|
|
|
|
|
|
}
|