瀏覽代碼

下标BUG修复

zthwr 1 年之前
父節點
當前提交
13b730975d

+ 6 - 4
mm/mm/src/client/u8c/ui/mm/action/OperationApproveAction.java

@@ -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();
 		

+ 5 - 4
mm/mm/src/client/u8c/ui/mm/action/OperationDeleteAction.java

@@ -18,13 +18,14 @@ public class OperationDeleteAction extends DeleteAction {
 	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[0].getParentVO();
 			if (headvo.getBillstatus()!=IBillStatus.FREE){
 				throw new ValidationException("非自由态单据不允许删除");
 		    }
-		}
+	//	}
 		super.execute();
 	}
 }

+ 6 - 4
mm/mm/src/client/u8c/ui/mm/action/OperationEditAction.java

@@ -20,13 +20,15 @@ public class OperationEditAction extends BrowseFromListToCardAction{
 	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("非自由态单据不可编辑");
 			}
-		}
+//		}
 		super.execute();	
 		OperationTestUI ui = (OperationTestUI)this.getFrameUI();
 		ui.getBillCardPanel().setHeadItem(OperationMainVO.PK_CORP, PubEnv.getPk_corp());

+ 6 - 4
mm/mm/src/client/u8c/ui/mm/action/OperationUnApproveAction.java

@@ -27,15 +27,17 @@ public class OperationUnApproveAction 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.CHECKPASS){
 				throw new ValidationException("非审批态单据不允许取消审批");
 			}
 			headvo.setBillstatus(IBillStatus.FREE);
 			headvo.setChecker("");
-		}
+//		}
 		((OperationDataModel)this.frameUI.getDataModel()).execApprove(s[selectedRow]);
 		getFrameUI().getBtnManager().getCmdByID(AbstractBtnReg.SYSBTN_REFRESH).execute();
 	}