DemandAddAction.java 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package u8c.ui.mytest.action;
  2. import nc.hr.utils.PubEnv;
  3. import nc.ui.hr.frame.FrameUI;
  4. import nc.ui.hr.frame.action.AddAction;
  5. import nc.vo.pub.ValidationException;
  6. import nc.vo.trade.pub.IBillStatus;
  7. import u8c.ui.mytest.panel.DemandTestUI;
  8. import u8c.vo.DemandVO;
  9. public class DemandAddAction extends AddAction{
  10. DemandTestUI frameUI = null;
  11. public DemandAddAction(FrameUI frameUI) {
  12. super(frameUI);
  13. this.frameUI = (DemandTestUI) frameUI;
  14. }
  15. public boolean validate() throws ValidationException { // 前台校验
  16. return super.validate();
  17. }
  18. public void execute() throws Exception{
  19. super.execute();
  20. DemandTestUI ui = (DemandTestUI) this.getFrameUI();
  21. ui.getBillCardPanel().setHeadItem(DemandVO.PK_CORP, PubEnv.getPk_corp()); // 默认当前公司
  22. ui.getBillCardPanel().setHeadItem(DemandVO.BILLSTATUS, IBillStatus.COMMIT); // 增加时状态设自由编写态
  23. ui.getBillCardPanel().setTailItem(DemandVO.MAKEDATE, PubEnv.getServerDate());//默认当前时间
  24. ui.getBillCardPanel().setTailItem(DemandVO.BILLMAKER, PubEnv.getPk_user());//默认当前登录用户
  25. }
  26. }