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