|
@@ -19,17 +19,26 @@ public class OrderDeleteAction extends DeleteAction {
|
|
|
public void execute() throws Exception {
|
|
|
MainBillMgrPanel mainMgrPanel = (MainBillMgrPanel) getMainPanel();
|
|
|
|
|
|
- //int selectedRow = ((OrderMainPanel) getMainPanel()).getSelectedRow();
|
|
|
+// int selectedRow = ((OrderMainPanel) getMainPanel()).getSelectedRow();
|
|
|
+//
|
|
|
+// 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("非自由态单据不允许删除");
|
|
|
+// }
|
|
|
+// }
|
|
|
+ HRAggVO [] s = (HRAggVO[]) mainMgrPanel.getMainBillListPanel().getDeleteData();
|
|
|
+ if(s != null) {
|
|
|
+ for (int i = 0; i < s.length; i++) {
|
|
|
+ OrderMainVO headvo = (OrderMainVO) s[i].getParentVO();
|
|
|
+ if (headvo.getBillstatus()!=IBillStatus.FREE){
|
|
|
+ throw new ValidationException("非自由态单据不允许删除");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- //HRAggVO [] s = (HRAggVO[]) mainMgrPanel.getMainBillListPanel().getData();
|
|
|
-
|
|
|
- //if (null != s && s[selectedRow] != null){
|
|
|
- //OrderMainVO headvo = (OrderMainVO) s[selectedRow].getParentVO();
|
|
|
- OrderMainVO headvo = (OrderMainVO) this.getSelection(mainMgrPanel).getParentVO();
|
|
|
- if (headvo.getBillstatus()!=IBillStatus.FREE){
|
|
|
- throw new ValidationException("非自由态单据不允许删除");
|
|
|
- }
|
|
|
- //}
|
|
|
super.execute();
|
|
|
}
|
|
|
}
|