SMMQK00320.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. function fInitialize(){
  2. ipt_fromdd.value = getCurrentDate().substring(0,4).concat("0101");
  3. ipt_todd.value = getCurrentDate();
  4. if(fchkUser() == "Q"){
  5. //cap_prizyn.visible = true;
  6. //cmb_prizyn.visible = true;
  7. //btn_prizyn.visible = true;
  8. btn_first.visible = true;
  9. btn_second.visible = true;
  10. btn_third.visible = true;
  11. btn_fourth.visible = true;
  12. btn_fifth.visible = true;
  13. group1.visible = true;
  14. btn_search.attribute("left") = "720px";
  15. line2.attribute("style") = "x1:712px; y1:10px; x2:712px; y2:41px";
  16. }
  17. else{
  18. //cap_prizyn.visible = false;
  19. //cmb_prizyn.visible = false;
  20. //btn_prizyn.visible = false;
  21. btn_first.visible = false;
  22. btn_second.visible = false;
  23. btn_third.visible = false;
  24. btn_fourth.visible = false;
  25. btn_fifth.visible = false;
  26. group1.visible = false;
  27. btn_search.attribute("left") = "1110px";
  28. line2.attribute("style") = "x1:1097px; y1:10px; x2:1097px; y2:41px";
  29. }
  30. model.refresh();
  31. fGetList();
  32. }
  33. function fGetList(){
  34. var auth = fchkUser();
  35. model.setValue("/root/send/cond/auth", auth);
  36. submit("TRMQK00320");
  37. for(var i = 1; i < grd_list.rows ; i++){
  38. for(var a =0; a < 4 ; a++){
  39. var endFlag = model.getValue("/root/main/list/row[" + i + "]/prcsstat"+a);
  40. if(endFlag.substr(0,2) != "마감"){
  41. model.setValue("/root/main/list/row[" + i + "]/prcsstat"+(a+1), "");
  42. }
  43. else{
  44. // //등록자, 간사, 팀장이 아닌 QI팀은 전송이전단계가 보이지않음
  45. // if(auth == "Q"){
  46. // var text = model.getValue("/root/main/list/row[" + i + "]/prcsstat"+(a+1));
  47. // var loginID = getUserId();
  48. // var rgstID = model.getValue("/root/main/list/row[" + i + "]/rgstrid");
  49. // var chfID = model.getValue("/root/main/list/row[" + i + "]/chfid");
  50. // var staffid = model.getValue("/root/main/list/row[" + i + "]/staffid");
  51. // if(text == "저장" || text == "-"){
  52. // if(!(loginID == rgstID || loginID == chfID || loginID == staffid)){
  53. // model.setValue("/root/main/list/row[" + i + "]/prcsstat"+(a+1), "");
  54. // }
  55. // }
  56. // }
  57. }
  58. }
  59. }
  60. model.refresh();
  61. }
  62. function fPrizynSave(){
  63. if(messageBox("포상유무를 ", "Q002") == "7"){
  64. return false;
  65. }
  66. var checkNodeList = instance1.selectNodes("/root/main/list/row[prizyn='Y']");
  67. var csv = getNodeListCSV(checkNodeList);
  68. model.setValue("/root/send/prizyn/acptno", csv);
  69. submit("TXMQK00300");
  70. model.refresh();
  71. }
  72. function fGridOnclick(){
  73. var cur_row = grd_list.row;
  74. var acptno = model.getValue("/root/main/list/row[" + cur_row + "]/acptno");
  75. if (acptno != "") {
  76. var col = grd_list.col;
  77. setParameter("ano", acptno);
  78. if(col == "7"){
  79. setParameter("prcsstagecd", eval((col-6)*100));
  80. modal("SMMQK00110", "1", "", "");
  81. //grd_list.select(cur_row) = false;
  82. fGetList();
  83. }
  84. else if(col == "8" || col == "9" || col == "10" || col == "11"|| col == "12"|| col == "13"|| col == "14"){
  85. var endFlag = model.getValue("/root/main/list/row[" + cur_row + "]/prcsstat" + (col - 8));
  86. if(endFlag.substr(0,2) == "마감"){
  87. setParameter("prcsstagecd", eval((col-6)*100));
  88. if(model.getValue("/root/main/list/row[" + cur_row + "]/prcsstat" + (col - 7)) != ""){
  89. modal("SMMQK00220", "1", "", "", "", "", "", "left:100; top:100; width:1230; height:784;");
  90. fGetList();
  91. }
  92. }
  93. }
  94. }
  95. else{
  96. return;
  97. }
  98. }
  99. //계획서, 보고서 양식 저장
  100. function fFormSave(prcsstagecd){
  101. var maxsize = upload1.attribute("filesize");
  102. files = window.fileDialog("open");
  103. //파일사이즈 체크
  104. if (!checkFileSize(upload1)){
  105. messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
  106. }
  107. if(files != ""){
  108. model.setValue("/root/send/filecond/attach/file", files);
  109. model.setValue("/root/send/filecond/prcsstagecd", prcsstagecd);
  110. if (submit("TXMQK00301")) {
  111. messageBox("저장 ", "I002");
  112. }
  113. model.refresh();
  114. }
  115. }