Quellcode durchsuchen

修改按钮在列表可用

pancy vor 11 Monaten
Ursprung
Commit
145aab51fc

+ 4 - 4
mmpac/mmpac/src/client/u8c/ui/mmpac/action/OrderApproveAction.java

@@ -30,16 +30,16 @@ public class OrderApproveAction extends AbstractAction{
 	public void execute() throws Exception {
 		MainBillMgrPanel mainMgrPanel = (MainBillMgrPanel) getMainPanel();
 		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){
 				throw new ValidationException("非自由态单据不允许审批");
 			}
 			headvo.setBillstatus(IBillStatus.CHECKPASS);
 			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();
 	}
 }

+ 3 - 3
mmpac/mmpac/src/client/u8c/ui/mmpac/action/OrderDeleteAction.java

@@ -21,10 +21,10 @@ public class OrderDeleteAction extends DeleteAction {
 		
 		int selectedRow = ((OrderMainPanel) getMainPanel()).getSelectedRow();
 		
-		HRAggVO s = (HRAggVO) mainMgrPanel.getMainBillCardPanel().getData();
+		HRAggVO [] s = (HRAggVO[]) mainMgrPanel.getMainBillListPanel().getData();
 		
-		if (null != s && s != null){
-			OrderMainVO headvo = (OrderMainVO) s.getParentVO();
+		if (null != s && s[selectedRow] != null){
+			OrderMainVO headvo = (OrderMainVO) s[selectedRow].getParentVO();
 			if (headvo.getBillstatus()!=IBillStatus.FREE){
 				throw new ValidationException("非自由态单据不允许删除");
 		    }

+ 3 - 3
mmpac/mmpac/src/client/u8c/ui/mmpac/action/OrderEditAction.java

@@ -21,9 +21,9 @@ public class OrderEditAction extends BrowseFromListToCardAction{
 	public void execute() throws Exception {
 		MainBillMgrPanel mainMgrPanel = (MainBillMgrPanel) getMainPanel();
 		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){
 				throw new ValidationException("非自由态单据不可编辑");
 			}

+ 1 - 1
mmpac/mmpac/src/client/u8c/ui/mmpac/action/OrderSaveAction.java

@@ -59,6 +59,6 @@ public class OrderSaveAction extends SaveAction{
 		super.execute();
 		frameUI.getDataModel().setCurrentState(StateRegister.STATE_NOTEDIT); 
 		
-//		getFrameUI().getBtnManager().getCmdByID(AbstractBtnReg.SYSBTN_REFRESH).execute();
+		getFrameUI().getBtnManager().getCmdByID(AbstractBtnReg.SYSBTN_REFRESH).execute();
 	}
 }

+ 3 - 3
mmpac/mmpac/src/client/u8c/ui/mmpac/action/OrderUnApproveAction.java

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