SMMQK00310.js 3.6 KB

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