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