SMMRJ00200.xjs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[function fInit() {
  3. ipt_reqfromstnddd.value = utlf_getNewDate().getAddDate(-2, "D").getDateFormat("YYYYMMDD").substr(0, 8);
  4. ipt_reqtostnddd.value = utlf_getCurrentDate().substr(0, 8);
  5. //데이터 없음
  6. //emrfGetCodeList(new Array("J000000001","J000000002","J000000003","J000000004","J000000005","J000000010","J000000014"), new Array("/root/init/J000000001","/root/init/J000000002","/root/init/J000000003","/root/init/J000000004","/root/init/J000000005","/root/init/J000000010","/root/init/J000000014"));
  7. //교육 장애요인여부(Y/N) Radio Button List
  8. var sProp1="col=2,row=1,cellspacing=5,vcellspacing=0,itemWidth=-1,itemHeight=27,overflow=''";
  9. rdo_eduhandcapyn.setInitComp(sProp1, ds_init_eduhandcapyn, "cdid", "cdnm", "fn_setEduhandcapyn");
  10. fGetOpenPatInfo();
  11. //교육 장애요인여부(Y/N) 데이터 설정
  12. fn_getEduhandcapyn();
  13. }
  14. /******************************************************************
  15. * Argument :
  16. * Description : 교육 장애요인여부(Y/N) bind set
  17. ******************************************************************/
  18. function fn_setEduhandcapyn(){
  19. var getEduhandcapyn;
  20. getEduhandcapyn = String(rdo_eduhandcapyn.getData());
  21. ds_main_educordlist.setColumn(0, "eduhandcapyn", getEduhandcapyn);
  22. }
  23. /******************************************************************
  24. * Argument :
  25. * Description : 교육 장애요인여부(Y/N) DBget
  26. ******************************************************************/
  27. function fn_getEduhandcapyn(){
  28. if( !utlf_isNull(ds_main_educordlist.getColumn(0, "eduhandcapyn")) ) {
  29. var setData = ds_main_educordlist.getColumn(0, "eduhandcapyn");
  30. rdo_eduhandcapyn.setData(setData);
  31. }
  32. }
  33. /******************************************************************
  34. * Argument :
  35. * Description : fGetOpenPatInfo()
  36. ******************************************************************/
  37. function fGetOpenPatInfo(){
  38. var pid = "";
  39. var orddd = "";
  40. var cretno = "";
  41. var hngnm = "";
  42. var ioflag= "";
  43. if( frmf_isPopup() ) {
  44. pid = opener.frmf_getParameter("SMMRJ00200_pid");
  45. orddd = opener.frmf_getParameter("SMMRJ00200_orddd");
  46. cretno = opener.frmf_getParameter("SMMRJ00200_cretno");
  47. hngnm = opener.frmf_getParameter("SMMRJ00200_hngnm");
  48. ioflag = opener.frmf_getParameter("SMMRJ00200_ioflag");
  49. }
  50. if ( utlf_isNull(pid) ) { pid = ""; }
  51. if ( utlf_isNull(orddd) ) { orddd = ""; }
  52. if ( utlf_isNull(cretno) ) { cretno = ""; }
  53. if ( utlf_isNull(hngnm) ) { hngnm = ""; }
  54. if ( utlf_isNull(ioflag) ) { ioflag = ""; }
  55. if ( !utlf_isNull(pid) && !utlf_isNull(orddd) && !utlf_isNull(cretno) && !utlf_isNull(hngnm) && !utlf_isNull(ioflag) ) {
  56. ds_send_reqdata.setColumn(0, "pid", pid);
  57. ds_send_reqdata.setColumn(0, "pnm", hngnm);
  58. ds_send_reqdata.setColumn(0, "ordtype", ioflag);
  59. ds_init_condition.setColumn(0, "pid", pid);
  60. ds_init_condition.setColumn(0, "orddd", orddd);
  61. ds_init_condition.setColumn(0, "cretno", cretno);
  62. fSearchOrdList();
  63. if( !utlf_isNull(pid) && utlf_isNull(hngnm) ){
  64. ds_send_reqdata.setColumn(0, "pid", pid);
  65. fSearchPatNm();
  66. }
  67. } else {
  68. if( !utlf_isNull(pid) && utlf_isNull(hngnm) ){
  69. ds_send_reqdata.setColumn(0, "pid", pid);
  70. fSearchPatNm();
  71. }
  72. }
  73. if( utlf_isNull(pid) ) {
  74. // ???? ????????
  75. var pamInfoCvs = sysf_getGlobalVariable("paminfo");
  76. ds_main_paminfo.clearData();
  77. dsf_setCSVToDs("ds_main_paminfo", pamInfoCvs);
  78. pid = ds_main_paminfo.getColumn(0, "pid");
  79. hngnm = ds_main_paminfo.getColumn(0, "hngnm");
  80. ioflag = ds_main_paminfo.getColumn(0, "ioflag");
  81. ds_send_reqdata.setColumn(0, "pid", pid);
  82. ds_send_reqdata.setColumn(0, "pnm", hngnm);
  83. if( ioflag == "I" || ioflag == "D" || ioflag == "E" ){
  84. ioflag = "I";
  85. }
  86. else if( ioflag == "O" ){
  87. ioflag = "O";
  88. }
  89. else{
  90. ioflag = "ALL";
  91. }
  92. if( ioflag == "I" ){
  93. orddd = ds_main_paminfo.getColumn(0, "indd");
  94. } else {
  95. orddd = ds_main_paminfo.getColumn(0, "orddd");
  96. }
  97. cretno = ds_main_paminfo.getColumn(0, "cretno");
  98. // orddd = "20060428";
  99. // cretno = "800339501";
  100. if ( utlf_isNull(pid) ) { pid = ""; }
  101. if ( utlf_isNull(hngnm) ) { hngnm = ""; }
  102. if ( utlf_isNull(orddd) ) { orddd = ""; }
  103. if ( utlf_isNull(cretno) ) { cretno = ""; }
  104. if ( !utlf_isNull(pid) && !utlf_isNull(orddd) && !utlf_isNull(cretno) && !utlf_isNull(hngnm) ) {
  105. ds_init_condition.setColumn(0, "pid", pid);
  106. ds_init_condition.setColumn(0, "orddd", orddd);
  107. ds_init_condition.setColumn(0, "cretno", cretno);
  108. ds_send_reqdata.setColumn(0, "ordtype", ioflag);
  109. fSearchOrdList();
  110. } else {
  111. input1.setFocus();
  112. }
  113. }
  114. }
  115. function fSearchOrdList(){
  116. ds_init_ordlist.clearData();
  117. fInitMainList();
  118. var ordtype = radio2.value;
  119. if( !utlf_isNull(ds_send_reqdata.getColumn(0, "pnm")) ){
  120. ds_send_reqdata.setColumn(0, "ordtype", ordtype);
  121. var oParam = {};
  122. oParam.id = "TRMRJ00102";
  123. oParam.service = "jcimngtapp.JcimngtBase";
  124. oParam.method = "reqGetOrdList";
  125. oParam.inds = "req=ds_send_reqdata";
  126. oParam.outds = "ds_init_ordlist=ordlist";
  127. oParam.async = false;
  128. //oParam.callback = "cf_TRMRJ00102";
  129. tranf_submit(oParam);
  130. if( utlf_isNull(ds_init_condition.getColumn(0, "pid")) && utlf_isNull(ds_init_condition.getColumn(0, "orddd")) && utlf_isNull(ds_init_condition.getColumn(0, "cretno")) ){
  131. combo1.setFocus();
  132. combo1.index = 0;
  133. frmf_inputEnterKey("combo1", "onitemchanged", new ItemChangeEventInfo);
  134. } else {
  135. fChangeValueOrdList("open");
  136. }
  137. }
  138. }
  139. function fInitMainList() {
  140. ds_main_educordlist.clearData();
  141. ds_main_educcntslist.clear();
  142. ds_main_educcntslist.addRow();
  143. }
  144. function fChangeValueOrdList(value){
  145. var ordtype = "";
  146. if( value == "open" && !utlf_isNull(ds_init_condition.getColumn(0, "pid")) && !utlf_isNull(ds_init_condition.getColumn(0, "orddd")) && !utlf_isNull(ds_init_condition.getColumn(0, "cretno")) ){
  147. for( var i = 0; i < ds_init_ordlist.rowcount; i++ ){
  148. if( ds_init_ordlist.getColumn(i, "suminfo") == ds_init_condition.getColumn(0, "pid") + ds_init_condition.getColumn(0, "orddd") + ds_init_condition.getColumn(0, "cretno") ){
  149. ds_init_condition.clearData();
  150. combo1.index = (i);
  151. }
  152. frmf_inputEnterKey("combo1", "onitemchanged", new ItemChangeEventInfo);
  153. }
  154. }else{
  155. ds_search.setColumn(0, "pid", ds_init_ordlist.getColumn(0, "pid"));
  156. ds_search.setColumn(0, "orddd", ds_init_ordlist.getColumn(0, "orddd"));
  157. ds_search.setColumn(0, "cretno", ds_init_ordlist.getColumn(0, "cretno"));
  158. ds_search.setColumn(0, "ordtype", ds_init_ordlist.getColumn(0, "ordtype"));
  159. ds_search.setColumn(0, "fromdd", ds_init_ordlist.getColumn(0, "orddd"));
  160. ordtype = ds_init_ordlist.getColumn(0, "ordtype");
  161. if( ordtype == "I" ){
  162. ds_search.setColumn(0, "daycheck", "");
  163. }else{
  164. ds_search.setColumn(0, "daycheck", "0");
  165. }
  166. fSelectOrdCntsList();
  167. }
  168. }
  169. function fSelectOrdCntsList(){
  170. fInitMainList();
  171. var oParam = {};
  172. oParam.id = "TRMRJ00201";
  173. oParam.service = "jcimngtapp.JcimngtBase";
  174. oParam.method = "reqGetEducOrdCntsList";
  175. oParam.inds = "req=ds_search";
  176. oParam.outds = "ds_main_educordlist=educordlist ds_main_educcntslist=educcntslist ds_main_educorddaylist=educorddaylist";
  177. oParam.async = false;
  178. //oParam.callback = "cf_TRMRJ00201";
  179. tranf_submit(oParam);
  180. //row enable 처리를 위해 컬럼 추가
  181. ds_main_educcntslist.addColumn("type", "string", 256);
  182. fCheckOtherYn(ipt_eduwho9 ,chk_eduwho9.value);
  183. fCheckOtherYn(ipt_eduhandcap9 ,chk_eduhandcap9ck.value);
  184. fCheckOtherYn(ipt_eduway9 ,chk_eduway9ck.value);
  185. fCheckOtherYn(ipt_eduneed9 ,chk_eduneed9ck.value);
  186. if( rdo_eduwill.value== "999" ){
  187. fCheckOtherYn(ipt_eduwill9, "Y");
  188. }else{
  189. fCheckOtherYn(ipt_eduwill9, "N");
  190. }
  191. fColDisableChk();
  192. }
  193. function fCheckOtherYn(ipt, param){
  194. if( param=="Y" ){
  195. ipt.visible = true;
  196. }else{
  197. ipt.visible = false;
  198. ipt.value = "";
  199. }
  200. }
  201. function fSearchPatNm(){
  202. if( utlf_isNull(ds_send_reqdata.getColumn(0, "pid")) ){
  203. return;
  204. }else{
  205. fGetPid("ds_send_reqdata");
  206. }
  207. }
  208. /**
  209. * @desc : ???????????? ???? ????
  210. * @
  211. * @param : refPid - ???????? ???? node path
  212. * refPnm - ?????? ???? node path
  213. * @return :
  214. * @authur : ?????? 2008.03.18
  215. * @---------------------------------------------------
  216. */
  217. function fGetPid(refDs)
  218. {
  219. var NstNodepathDS = this.objects[refDs];
  220. ds_send_reqdata.setColumn(0, "pnm","");
  221. ds_init_ordlist.clearData();
  222. fInitMainList();
  223. ds_patinfolist.clearData();
  224. //?????????? 1???? ???? ???????? ???? ??????.
  225. dsf_createDsRow("ds_hidden_pidpopupinfo",
  226. [{col:"checkfnexam", type:"string", size:256, val:"1"}
  227. , {col:"autoflag", type:"string", size:256, val:"Y"}
  228. , {col:"pid", type:"string", size:256, val:NstNodepathDS.getColumn(0, "pid")}
  229. , {col:"srchcond", type:"string", size:256, val:""}], true);
  230. if( utlf_isNull(ds_hidden_pidpopupinfo.getColumn(0, "srchcond")) ){
  231. ds_hidden_pidpopupinfo.setColumn(0, "srchcond", '1');
  232. }
  233. var objArg = new Object();
  234. objArg.arg_ds_send = ds_hidden_pidpopupinfo;
  235. frmf_modal("SPPMC02500", "SPPMC02500", objArg, null, null, null, null, null, null, null, null, null, "M");
  236. //???????? copy
  237. ds_main_popupendflag.setColumn(0, "popupendflag", frmf_getParameter("SPPMC02500_popupendflag"));
  238. var popupendflag = ds_main_popupendflag.getColumn(0, "popupendflag");
  239. if( popupendflag == "ok" ){
  240. NstNodepathDS.setColumn(0, "pid", ds_patinfolist.getColumn(0, "pid"));
  241. var getPnm = ds_patinfolist.getColumn(0, "hngnm");
  242. if( utlf_isNull(getPnm) ) NstNodepathDS.setColumn(0, "pnm", "");
  243. if( !utlf_isNull(getPnm) ) {
  244. NstNodepathDS.setColumn(0, "pnm", ds_patinfolist.getColumn(0, "hngnm"));
  245. }
  246. fSearchOrdList();
  247. }
  248. }
  249. function fColDisableChk(){
  250. var rowSize = ds_main_educcntslist.rowcount;
  251. for( var i = 0; i < rowSize; i++ ){
  252. if( sysf_getUserId()!= ds_main_educcntslist.getColumn(i, "fstrgstrid") || ds_main_educcntslist.getColumn(i, "linkcd") != "-" ){
  253. ds_main_educcntslist.updatecontrol = false;
  254. ds_main_educcntslist.setColumn(i, "type", "Y");
  255. ds_main_educcntslist.updatecontrol = true;
  256. }
  257. }
  258. }
  259. /******************************************************************
  260. * Argument :
  261. * Description : 추가입력 Button Event
  262. ******************************************************************/
  263. function fGetAddPopup(){
  264. vPid = ds_search.getColumn(0, "pid");
  265. vOrddd = ds_search.getColumn(0, "orddd");
  266. vCretno = ds_search.getColumn(0, "cretno");
  267. frmf_setParameter("SPMRJ00200_pid" ,vPid);
  268. frmf_setParameter("SPMRJ00200_orddd" ,vOrddd);
  269. frmf_setParameter("SPMRJ00200_cretno",vCretno);
  270. frmf_modal("SPMRJ00200", "SPMRJ00200", null, null, null, null, null, null, null, null, null, null, "M");
  271. // modal("SPMRJ00200", 1, 0, 0, "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; min:hidden, max:hidden;");
  272. fSelectOrdCntsList();
  273. }]]></Script>