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