SMRSC08200.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /* ---------------------------------------------------------------------
  2. SMRSC08200_구매인터페이스거래처정보.xrw (SMRSC08200.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. : Create By HR Choi
  6. : 2015.05.02
  7. ---------------------------------------------------------------------- */
  8. var vGoodNew = "U"; //U:UPDATE, N:NEW
  9. // --------------------------------------------------
  10. // 사용자권한 Check
  11. // --------------------------------------------------
  12. function fInitForm() {
  13. fInitialize();
  14. }
  15. // --------------------------------------------------
  16. // 사용자권한 Check
  17. // --------------------------------------------------
  18. function fCheckAuth() {
  19. // btn_search.disabled = rAuth ;
  20. btn_save.disabled = xAuth ;
  21. }
  22. // --------------------------------------------------
  23. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  24. // --------------------------------------------------
  25. function fInitialize() {
  26. model.resetInstanceNode("/root/send");
  27. misfGridInit(grd_rscifcust);
  28. rszfUserInstList(cmb_instcd,getUserInfo("userid"),"Y");
  29. //기관코드 읽어오는 부분 넣기
  30. var instcd = getUserInfo("dutplceinstcd");
  31. var instnm = getUserInfo("dutplceinstnm");
  32. model.setValue(ipt_maindeptcd.attribute("ref") , getUserInfo("dutplcecd")); // 부서코드
  33. model.setValue(opt_mngtdeptnm.attribute("ref") , getUserInfo("dutplcenm")); // 부서명칭
  34. if(instcd.length > 0)model.setValue(cmb_instcd.attribute("ref"), instcd);
  35. else
  36. {
  37. if(cmb_instcd.length> 0) cmb_instcd.selectedindex= 0;
  38. }
  39. misfMsterDetailSet(grd_rscifcust,null, "TRRSC08200" ,"Y");
  40. grd_rscifcust.explorerbar = "sortshow";
  41. model.refresh();
  42. }
  43. function fSaveDataSetting(pSubmit_Id) {
  44. fgrid = grd_rscifcust;
  45. // var insfromdd = model.getValue(ipt_insfromdd.attribute("ref"));
  46. model.removenode("/root/send/rscifcustlist");
  47. model.makeNode("/root/send/rscifcustlist");
  48. model.setValue("/root/send/rscifcustlist" , grd_rscifcust.getUpdateData());
  49. submit(pSubmit_Id);
  50. if (model.getValue(gvErrorMsgPath + "/type") != "error") btn_search.dispatch("DOMActivate");
  51. }
  52. //
  53. function fOnButtonClick(pGrid) {
  54. if (pGrid.col == pGrid.colRef("entrregno")) {
  55. rszfOpenPopUpListByWndName(pGrid,"","entrregno,entrregnonnm","SPRSD00220","instcd","instcd");
  56. }
  57. //
  58. if (pGrid.col == pGrid.colRef("maindeptcd")) {
  59. misfOpenPopUpList("02", pGrid,"", "maindeptcd,maindeptcdnm",pGrid.valueMatrix(pGrid.row, pGrid.colRef("instcd")),"instcd" );
  60. }
  61. model.refresh();
  62. }
  63. //
  64. function fValueChanged(pGrid) {
  65. if (pGrid.col == pGrid.colRef("entrregno")) {
  66. rszfOpenPopUpListByWndName(pGrid,"","entrregno,entrregnonnm","SPRSD00220","instcd","instcd");
  67. }
  68. //
  69. if (pGrid.col == pGrid.colRef("maindeptcd")) {
  70. misfValidationCheck("02", "", "maindeptcd,maindeptcdnm" );
  71. }
  72. model.refresh();
  73. }
  74. /* ------------------------------------------------- */
  75. /* ------End Of List ------------------------------- */
  76. /* -------------------------------------------------- */