SMRSC05304.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /* ---------------------------------------------------------------------
  2. SMRSC05304_통합물품기관적용내역조회.xrw (SMRSC05304.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. : Create By HR Choi
  6. : 2015.05.02
  7. ---------------------------------------------------------------------- */
  8. var xAuth = !(checkAuth("X"));
  9. var rAuth = !(checkAuth("R"));
  10. // --------------------------------------------------
  11. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  12. // --------------------------------------------------
  13. function fInstInitForm() {
  14. misfGridInit(grd_allsize);
  15. misfGridInit(grd_applist);
  16. model.resetInstanceNode("/root/send");
  17. model.setValue("/root/send/goodlist/filecls", "S");
  18. rszfGoodFlagListByPgmGubn(cmb_goodflag_search,"1","N");
  19. misfMsterDetailSet(grd_applist,null, "TRRPZ00302" ,"N");
  20. misfGridComboComCdList("R0032",grd_allsize , "goodunit");
  21. //기관코드 읽어오는 부분 넣기
  22. var instcd = getUserInfo("dutplceinstcd");
  23. var instnm = getUserInfo("dutplceinstnm");
  24. //물품구분일 경우 첫번째 index 자동 설정
  25. if(cmb_goodflag_search.length> 0) cmb_goodflag_search.selectedindex= 0;
  26. model.removeNodeset(grd_goodlist.nodeset);
  27. model.removeNodeset(grd_instinfo.nodeset);
  28. // 대분류 코드 콤보 설정.
  29. rszfLMSComboList(model.getValue(cmb_goodflag_search.attribute("ref")), "", "", "cmb_lrgcd_search", "", "L", "", "Y");
  30. misfMsterDetailSet(grd_goodlist,null , "TRRSC05309" ,"Y", "byrow");
  31. misfMsterDetailSet(grd_instinfo,grd_goodlist, "TRRSC05308" ,"N", "byrow");
  32. // 물품구분별 권한
  33. //fSetGoodFlagAuth();
  34. grd_goodlist.explorerbar = "sortshow";
  35. model.setFocus("ipt_goodcd");
  36. var curdate = getCurrentDate();
  37. model.setValue("/root/send/goodlist/fr_fromdd", curdate.substr(0,8));
  38. model.setValue("/root/send/goodlist/to_fromdd", curdate.substr(0,8));
  39. misfComboComCdListMulti("Z0007", "cmb_instcd_search");
  40. model.setValue("/root/send/goodlist/instcd", getUserInfo("dutplceinstcd"));
  41. model.refresh();
  42. }
  43. // --------------------------------------------------
  44. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  45. // 화면 전체 조회
  46. // --------------------------------------------------
  47. function fInstRetrGoodList(nodecopy) {
  48. model.setValue("/root/send/goodlist/filecls" ,"S");
  49. misfMsterDetailRetrieve();
  50. fAppInstcdGridSet(model.getValue(ipt_appinstdata.attribute("ref")));
  51. fInstAllSizeRead();
  52. }
  53. //----------------------------
  54. // Check All Size Data
  55. //----------------------------
  56. function fInstAllSizeRead()
  57. {
  58. model.setValue("/root/send/allsizelist/goodcd" ,grd_goodlist.valueMatrix(grd_goodlist.row, grd_goodlist.colRef("goodcd")));
  59. model.setValue("/root/send/allsizelist/instflag","1");
  60. submit("TRRSC00211");
  61. grd_allsize.refresh();
  62. }
  63. function fAppInstcdClear() {
  64. for (var i = 1 ; i < grd_applist.rows ; i++) {
  65. model.setValue(grd_applist.nodeset+"["+ i +"]/minval", "N");
  66. }
  67. // grd_applist.refresh();
  68. }
  69. function fAppInstcdSet() {
  70. var vAppinstdata = "";
  71. for (var i = 1 ; i < grd_applist.rows ; i++) {
  72. if (model.getValue(grd_applist.nodeset+"["+ i +"]/minval") == "Y") {
  73. vAppinstdata += model.getValue(grd_applist.nodeset+"["+ i +"]/cdid") + " ";
  74. }
  75. }
  76. return vAppinstdata;
  77. }
  78. //
  79. function fAppInstcdGridSet(pAppinstdata) {
  80. var vAppinstdata = pAppinstdata.split(" ");
  81. fAppInstcdClear();
  82. for (var j=0; j < vAppinstdata.length; j++){
  83. if (vAppinstdata[j] != "") {
  84. model.setValue(grd_applist.nodeset+"[cdid ='"+ vAppinstdata[j] + "']/minval", "Y");
  85. }
  86. }
  87. grd_applist.refresh();
  88. }
  89. /* ------------------------------------------------- */
  90. /* ------End Of List ------------------------------- */
  91. /* -------------------------------------------------- */