SMMQI04100.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /**
  2. * @desc : 초기화
  3. * @
  4. * @param :
  5. * @return :
  6. * @---------------------------------------------------
  7. */
  8. function fInitialize(){
  9. model.setValue("/root/main/cond/instcd", getUserInfo("dutplceinstcd"));
  10. model.setValue("/root/main/cond/userid", getUserInfo("userid"));
  11. model.setValue("/root/main/cond/fromdd", getCurrentDate());
  12. model.setValue("/root/main/cond/todd", getCurrentDate());
  13. fGetHardCDList("N", 5666, 0 , "/root/init/bathexec");
  14. model.refresh();
  15. }
  16. /**
  17. * @desc : 미비 확인
  18. * @
  19. * @param :
  20. * @return :
  21. * @---------------------------------------------------
  22. */
  23. function fCnfmBtn(){
  24. if(isNull(model.getValue("/root/main/cond/pid").getTrim())){
  25. if(isNull(model.getValue("/root/init/bathexec/hardcd[ hardcd = '"+getUserId()+"' ]/hardcd"))){
  26. if( getDateInterval(model.getValue("/root/main/cond/fromdd"), model.getValue("/root/main/cond/todd")) > 31 ){
  27. messageBox("배치 최대 기간은 1달입니다. 일자구분에서 날짜를 수정하세요!", "E999", "");
  28. return false;
  29. }
  30. }
  31. }
  32. model.resetInstanceNode("/root/temp/countinfo/count");
  33. submit("TRMQI04100");
  34. var count = model.getValue("/root/temp/countinfo/count");
  35. if(count > 0){
  36. var flag = messageBox(model.getValue("/root/main/cond/fromdd")+" ~ "+ model.getValue("/root/main/cond/todd")+" 사이에 "+ count + "건의 배치정보가 존재 합니다. \n" , "Q003");
  37. if(flag == "6"){
  38. fExecute();
  39. }
  40. }else{
  41. fExecute();
  42. }
  43. }
  44. function fExecute(){
  45. if (submit("TXMQI04100") == true){
  46. alert("미비 배치가 성공하였습니다. ");
  47. }else {
  48. alert("미비 배치가 실패하였습니다. 담당자에게 문의 바랍니다. ");
  49. }
  50. }
  51. /**
  52. * @desc : Close
  53. * @
  54. * @param :
  55. * @return :
  56. * @---------------------------------------------------
  57. */
  58. function fClose(){
  59. model.close();
  60. }