SMMRC00200.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. /**
  2. * @desc : Source Node의 갯수를 구한다.
  3. * @
  4. * @param : path - node path
  5. * @return :
  6. * @authur : 김선태 2007. 5. 8
  7. * @---------------------------------------------------
  8. */
  9. function getNodeSetCnt(path)
  10. {
  11. var insXml = model.instances(0);
  12. var nodeList = insXml.selectNodes(path);
  13. return nodeList.length;
  14. }
  15. /**
  16. * @desc : Source Node의 child nodelist를 Destination의 nodelist로 append한다.
  17. *
  18. * @param : strDest - 도착node path
  19. * : strSrc - 출발node path
  20. * @return : void
  21. * @authur : 이상현 2007. 3. 27
  22. * @---------------------------------------------------
  23. */
  24. function addCopyNodeset(strDest, strSrc, mode, destModel, srcModel) {
  25. if( destModel == null || destModel =="" )
  26. destModel = document.models.item(0);
  27. if( srcModel == null || srcModel =="" )
  28. srcModel = document.models.item(0);
  29. var srcNodeList = srcModel.instances(0).selectNodes(strSrc);
  30. var srcNode;
  31. var pDestNode = destModel.instances.item(0).selectSingleNode(strDest).parentNode;
  32. if( mode == "replace" || mode == null ) {
  33. destModel.removeNodeset(strDest);
  34. while( srcNode = srcNodeList.nextNode() ) {
  35. pDestNode.appendChild(srcNode.cloneNode(true));
  36. }
  37. }
  38. else if( mode == "after" ) {
  39. while( srcNode = srcNodeList.nextNode() ) {
  40. pDestNode.appendChild(srcNode.cloneNode(true));
  41. }
  42. }
  43. else if( mode == "before" ) {
  44. var destNode;
  45. for( var i = srcNodeList.length - 1; i >= 0; i-- ) {
  46. destNode = destModel.instances.item(0).selectSingleNode(strDest + "[1]");
  47. pDestNode.insertBefore(srcNodeList.item(i).cloneNode(true), destNode);
  48. }
  49. }
  50. }
  51. /**
  52. * @desc : 사용자의 권한을 체크하여 버튼셋팅.
  53. * btn_r 조회버튼, btn_x 저장 및 수정 버튼, btn_p : 출력버튼
  54. * @return : void
  55. * @authur : 김선태 2007. 5. 8
  56. */
  57. function fchkAuth()
  58. {
  59. for(var i=0; i<= document.controls.length-1 ; i++){
  60. if(document.controls.item(i).elementName == "xforms:button"){
  61. if(document.controls.item(i).attribute("id").substr(0,6) == "btn_r_"){
  62. document.controls.item(i).disabled = !checkAuth("R");
  63. }
  64. if(document.controls.item(i).attribute("id").substr(0,6) == "btn_x_"){
  65. document.controls.item(i).disabled = !checkAuth("X");
  66. }
  67. if(document.controls.item(i).attribute("id").substr(0,6) == "btn_p_"){
  68. document.controls.item(i).disabled = !checkAuth("P");
  69. }
  70. if(document.controls.item(i).attribute("id").substr(0,6) == "btn_e_"){
  71. document.controls.item(i).disabled = !checkAuth("P");
  72. }
  73. }
  74. }
  75. }
  76. /**
  77. * @desc : 폼초기화
  78. * @
  79. * @param :
  80. * @return :
  81. * @authur : 이은영 2008.03.18
  82. * @---------------------------------------------------
  83. */
  84. function fFormInit()
  85. {
  86. // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
  87. mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/dutplcecd", 5502);
  88. // KNUH_20101207_박성호_end
  89. // 대출목록을 먼저 보여준다.
  90. btn_rendlsit.dispatch("onclick");
  91. // 버튼권한체크
  92. fchkAuth();
  93. //공통코드 가져오기...
  94. //M0392:챠트미대출사유코드
  95. //M0412:과보관사유코드
  96. //M0424:차트상태코드
  97. zbcfGetCodeList(new Array("M0392","M0412","M0424"), new Array("/root/init/M0392","/root/init/M0412","/root/init/M0424"));
  98. // 대출용도, 대출과, 차트과, 차트담당자, 보관장소
  99. model.makeValue("/root/send/reqdata/ioflag" , "O");
  100. model.makeValue("/root/send/reqdata/useyn" , "");
  101. model.makeValue("/root/send/reqdata/allwardyn", "");
  102. model.refresh();
  103. submit("TRMRC00100");
  104. var today = getCurrentDate();
  105. var valitodd = (today.toDate()).getAddDate(-14); // 디폴트는 몇일 이전 기준으로 보여주나??
  106. valitodd = valitodd.getDateFormat();
  107. model.setValue("/root/condition/rendlist/fromrenddd" , today);
  108. model.setValue("/root/condition/rendlist/torenddd" , today);
  109. model.setValue("/root/condition/rendlist/rendcd" , "ALL");
  110. model.setValue("/root/condition/rendlist/appdeptcd" , "ALL");
  111. model.setValue("/root/condition/rendlist/chrtdeptcd" , "ALL");
  112. model.setValue("/root/condition/rendlist/setcd" , "90000000000000060");
  113. model.setValue("/root/condition/rtnlist/fromrtndd" , today);
  114. model.setValue("/root/condition/rtnlist/tortndd" , today);
  115. model.setValue("/root/condition/rtnlist/fromrenddd" , today);
  116. model.setValue("/root/condition/rtnlist/torenddd" , today);
  117. model.setValue("/root/condition/rtnlist/rendcd" , "ALL");
  118. model.setValue("/root/condition/rtnlist/appdeptcd" , "ALL");
  119. model.setValue("/root/condition/rtnlist/chrtdeptcd" , "ALL");
  120. model.setValue("/root/condition/rtnlist/setcd" , "90000000000000060");
  121. model.setValue("/root/condition/unrtnlist/fromschertndd" , today);
  122. model.setValue("/root/condition/unrtnlist/toschertndd" , today);
  123. model.setValue("/root/condition/unrtnlist/fromrenddd" , today);
  124. model.setValue("/root/condition/unrtnlist/torenddd" , today);
  125. model.setValue("/root/condition/unrtnlist/rendcd" , "ALL");
  126. model.setValue("/root/condition/unrtnlist/appdeptcd" , "ALL");
  127. model.setValue("/root/condition/unrtnlist/chrtdeptcd" , "ALL");
  128. model.setValue("/root/condition/unrtnlist/setcd" , "90000000000000060");
  129. model.setValue("/root/condition/wardunrtnlist/fromdschdd" , today);
  130. model.setValue("/root/condition/wardunrtnlist/todschdd" , today);
  131. model.setValue("/root/condition/wardunrtnlist/fromrenddd" , today);
  132. model.setValue("/root/condition/wardunrtnlist/torenddd" , today);
  133. model.setValue("/root/condition/wardunrtnlist/rendcd" , "ALL");
  134. model.setValue("/root/condition/wardunrtnlist/appdeptcd" , "ALL");
  135. model.setValue("/root/condition/wardunrtnlist/chrtdeptcd" , "ALL");
  136. model.setValue("/root/condition/wardunrtnlist/sortwardcd" , "Y");
  137. model.setValue("/root/condition/wardunrtnlist/setcd" , "90000000000000060");
  138. model.refresh();
  139. // 2009.01.12. 대출용도 셋 조회... (의료정보팀..3230000000)
  140. // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
  141. var dutplcecd = model.getValue("/root/init/dutplcecd/hardcd/hardcd");
  142. //model.makeValue("/root/send/reqdata/deptcd" , "3230000000");
  143. model.makeValue("/root/send/reqdata/deptcd" , dutplcecd);
  144. // KNUH_20101207_박성호_end
  145. submit("TRMRC01312");
  146. }
  147. /**
  148. * @desc : 환자등록번호 조회 팝업
  149. * @
  150. * @param : refPid - 환자번호 node path
  151. * @ refPnm - 환자명 node path
  152. * @return :
  153. * @authur : 이은영 2008.03.18
  154. * @---------------------------------------------------
  155. */
  156. function fGetPid(refPid, refPnm)
  157. {
  158. //조회건수가 1건일 경우 팝업창을 바로 닫는다.
  159. model.makeValue("/root/hidden/tmp/pidpopupinfo/checkfnexam", "1");
  160. model.makeValue("/root/hidden/tmp/pidpopupinfo/autoflag", "N");
  161. if( model.getValue("/root/hidden/tmp/pidpopupinfo/srchcond") == '' ){
  162. model.makeValue("/root/hidden/tmp/pidpopupinfo/srchcond", '2');
  163. }
  164. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/tmp/pidpopupinfo", "/root/send");
  165. model.resetInstanceNode("/root/source");
  166. //환자번호 copy
  167. var popupendflag = model.getValue("/root/main/popupendflag");
  168. if (popupendflag == "ok")
  169. {
  170. model.makeValue(refPid, model.getValue("/root/main/patinfo/patinfolist/pid"));
  171. if (refPnm == null) { refPnm = "" }
  172. if (refPnm != "") {
  173. model.makeValue(refPnm, model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  174. }
  175. model.refresh();
  176. }
  177. }
  178. /**
  179. * @desc : 사용자 조회
  180. * @
  181. * @param : refUserid - 대출자 ID, refUserDeptcd - 소속부서코드 ( posdeptcd )
  182. * @return :
  183. * @authur : 이은영 2008.03.18
  184. * @---------------------------------------------------
  185. */
  186. function fGetUserid(refUserid, refUsernm)
  187. {
  188. model.removenode("/root/hidden/tmp/tempuserinfo/list");
  189. model.reset("/root/hidden/tmp/tempuserinfo");
  190. var user = model.getValue(refUserid);
  191. var flag = "userid";
  192. if(isNaN(user)){
  193. flag = "usernm";
  194. }
  195. model.setValue("/root/hidden/tmp/userpopupinfo/param", "_OneS");
  196. model.setValue("/root/hidden/tmp/userpopupinfo/flag", flag);
  197. model.setValue("/root/hidden/tmp/userpopupinfo/searchitem", user);
  198. modal("SPZSU10103", "", "200", "200", "SPZSU10103","/root/hidden/tmp/userpopupinfo","/root/main/temp");
  199. var iParam = getParameter("SPZSU10103_");
  200. setCSVToNode("/root/hidden/tmp/tempuserinfo", iParam);
  201. clearParameter("SPZSU10103_");
  202. model.refresh();
  203. //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
  204. if( getNodesetCount("/root/hidden/tmp/tempuserinfo/list") > 0 ){
  205. var userid = model.getValue("/root/hidden/tmp/tempuserinfo/list/userid");
  206. var usernm = model.getValue("/root/hidden/tmp/tempuserinfo/list/usernm");
  207. model.makeValue(refUserid, userid);
  208. if (refUsernm == null) { refUsernm = ""; }
  209. if (refUsernm != "") {
  210. model.makeValue(refUsernm, usernm);
  211. }
  212. model.refresh();
  213. }
  214. }
  215. /**
  216. * @desc : 대출목록 조회
  217. * @
  218. * @param :
  219. * @return :
  220. * @authur : 이은영 2008.03.18
  221. * @---------------------------------------------------
  222. */
  223. function fGetLendList()
  224. {
  225. model.copyNode("/root/send/reqdata", "/root/condition/rendlist");
  226. // 2009.01.12. 대출용도 셋 아이템 셋하기.. ^^
  227. fSetRendCdList();
  228. submit("TRMRC00200");
  229. // 2008.01.02. 대출목록 조회 총건수..
  230. model.setValue ("/root/hidden/rendcnt", grd_rendlist.rows - 1);
  231. cap_lendlist.refresh();
  232. }
  233. /**
  234. * @desc : 미반납목록 조회
  235. * @
  236. * @param :
  237. * @return :
  238. * @authur : 이은영 2008.03.18
  239. * @---------------------------------------------------
  240. */
  241. function fGetUnRtnList()
  242. {
  243. model.copyNode("/root/send/reqdata", "/root/condition/unrtnlist");
  244. // 2009.01.12. 대출용도 셋 아이템 셋하기.. ^^
  245. fSetRendCdList();
  246. submit("TRMRC00220");
  247. // 2008.01.02. 미반납목록 조회 총건수..
  248. model.setValue ("/root/hidden/unrtncnt", grd_unrtnlist.rows - 1);
  249. cap_unrtnlist.refresh();
  250. }
  251. /**
  252. * @desc : 미반납목록 조회 - 병동
  253. * @
  254. * @param :
  255. * @return :
  256. * @authur : 이은영 2008.03.18
  257. * @---------------------------------------------------
  258. */
  259. function fGetWardUnRtnList()
  260. {
  261. model.copyNode("/root/send/reqdata", "/root/condition/wardunrtnlist");
  262. // 2009.01.12. 대출용도 셋 아이템 셋하기.. ^^
  263. fSetRendCdList();
  264. submit("TRMRC00240");
  265. // 2008.01.02. 미반납목록 조회 총건수..
  266. model.setValue ("/root/hidden/wardunrtncnt", grd_wardunrtnlist.rows - 1);
  267. cap_wardunrtnlist.refresh();
  268. }
  269. /**
  270. * @desc : 반납목록 조회
  271. * @
  272. * @param :
  273. * @return :
  274. * @authur : 이은영 2008.03.18
  275. * @---------------------------------------------------
  276. */
  277. function fGetRtnList()
  278. {
  279. model.copyNode("/root/send/reqdata", "/root/condition/rtnlist");
  280. // 2009.01.12. 대출용도 셋 아이템 셋하기.. ^^
  281. fSetRendCdList();
  282. submit("TRMRC00210");
  283. // 2008.01.02. 미반납목록 조회 총건수..
  284. model.setValue ("/root/hidden/rtncnt", grd_rtnlist.rows - 1);
  285. cap_rtnlist.refresh();
  286. }
  287. /**
  288. * @desc : 분실차트 조회
  289. * @
  290. * @param :
  291. * @return :
  292. * @authur : 이은영 2008.06.11
  293. * @---------------------------------------------------
  294. */
  295. function fGetCherStatList()
  296. {
  297. model.copyNode("/root/send/reqdata", "/root/condition/chrtstatlist");
  298. submit("TRMRC00230");
  299. // 2008.01.02. 차트 리스트 조회 총건수..
  300. model.setValue ("/root/hidden/chrtstatcnt", grd_chrtstat.rows - 1);
  301. cap_chrtstat.refresh();
  302. }
  303. /**
  304. * @desc : 외래/입원 구분에 따른 컨트롤 보여주기..
  305. * @
  306. * @param :
  307. * @return :
  308. * @authur : 이은영 2008.06.11
  309. * @---------------------------------------------------
  310. */
  311. function fDisplayControl()
  312. {
  313. var ioflag = rdo_ioflag.value ;
  314. if (ioflag == "O") {
  315. cap_indd.visible = false;
  316. ipt_indd.visible = false;
  317. cap_dcshdd.visible = false;
  318. ipt_dcshdd.visible = false;
  319. } else {
  320. cap_indd.visible = true;
  321. ipt_indd.visible = true;
  322. cap_dcshdd.visible = true;
  323. ipt_dcshdd.visible = true;
  324. }
  325. }
  326. /**
  327. * @desc : 차트 반납에서 대출일자 기간 콤보 보여줄까? 말까?
  328. * @
  329. * @param :
  330. * @return :
  331. * @authur : 이은영 2008.05.30
  332. * @---------------------------------------------------
  333. */
  334. function fLendTermDisabled()
  335. {
  336. var lendtermdisabled = lendterm_disabled.value;
  337. if (lendtermdisabled == "Y") {
  338. var today = getCurrentDate();
  339. model.setValue("/root/condition/unrtnlist/fromrenddd", today);
  340. model.setValue("/root/condition/unrtnlist/torenddd" , today);
  341. ipt_fromrendd.disabled = false;
  342. ipt_torendd.disabled = false;
  343. } else {
  344. model.setValue("/root/condition/unrtnlist/fromrenddd", "");
  345. model.setValue("/root/condition/unrtnlist/torenddd" , "");
  346. ipt_fromrendd.disabled = true;
  347. ipt_torendd.disabled = true;
  348. }
  349. ipt_fromrendd.refresh();
  350. ipt_torendd.refresh();
  351. }
  352. /**
  353. * @desc : 차트 반납에서 반납예정일 기간 콤보 보여줄까? 말까?
  354. * @
  355. * @param :
  356. * @return :
  357. * @authur : 이은영 2008.05.30
  358. * @---------------------------------------------------
  359. */
  360. function fRtnTermDisabled()
  361. {
  362. var rtntermdisabled = rtnterm_disabled.value;
  363. if (rtntermdisabled == "Y") {
  364. var today = getCurrentDate();
  365. model.setValue("/root/condition/unrtnlist/fromschertndd", today);
  366. model.setValue("/root/condition/unrtnlist/toschertndd" , today);
  367. ipt_fromschertndd.disabled = false;
  368. ipt_toschertndd.disabled = false;
  369. } else {
  370. model.setValue("/root/condition/unrtnlist/fromschertndd", "");
  371. model.setValue("/root/condition/unrtnlist/toschertndd" , "");
  372. ipt_fromschertndd.disabled = true;
  373. ipt_toschertndd.disabled = true;
  374. }
  375. ipt_fromschertndd.refresh();
  376. ipt_toschertndd.refresh();
  377. }
  378. /**
  379. * @desc : 차트 반납에서 대출일자 기간 콤보 보여줄까? 말까? -> 병동
  380. * @
  381. * @param :
  382. * @return :
  383. * @authur : 이은영 2008.05.30
  384. * @---------------------------------------------------
  385. */
  386. function fWardLendTermDisabled()
  387. {
  388. var lendtermdisabled = wardlendterm_disabled.value;
  389. if (lendtermdisabled == "Y") {
  390. var today = getCurrentDate();
  391. model.setValue("/root/condition/wardunrtnlist/fromrenddd", today);
  392. model.setValue("/root/condition/wardunrtnlist/torenddd" , today);
  393. ipt_wardfromrendd.disabled = false;
  394. ipt_wardtorendd.disabled = false;
  395. } else {
  396. model.setValue("/root/condition/wardunrtnlist/fromrenddd", "");
  397. model.setValue("/root/condition/wardunrtnlist/torenddd" , "");
  398. ipt_wardfromrendd.disabled = true;
  399. ipt_wardtorendd.disabled = true;
  400. }
  401. ipt_wardfromrendd.refresh();
  402. ipt_wardtorendd.refresh();
  403. }
  404. /**
  405. * @desc : 차트 반납에서 반납예정일 기간 콤보 보여줄까? 말까? -> 병동
  406. * @
  407. * @param :
  408. * @return :
  409. * @authur : 이은영 2008.05.30
  410. * @---------------------------------------------------
  411. */
  412. function fWardDschTermDisabled()
  413. {
  414. var dschtermdisabled = warddschterm_disabled.value;
  415. if (dschtermdisabled == "Y") {
  416. var today = getCurrentDate();
  417. model.setValue("/root/condition/wardunrtnlist/fromdschdd", today);
  418. model.setValue("/root/condition/wardunrtnlist/todschdd" , today);
  419. ipt_wardfromdschdd.disabled = false;
  420. ipt_wardtodschdd.disabled = false;
  421. } else {
  422. model.setValue("/root/condition/wardunrtnlist/fromdschdd", "");
  423. model.setValue("/root/condition/wardunrtnlist/todschdd" , "");
  424. ipt_wardfromdschdd.disabled = true;
  425. ipt_wardtodschdd.disabled = true;
  426. }
  427. ipt_wardfromdschdd.refresh();
  428. ipt_wardtodschdd.refresh();
  429. }
  430. /**
  431. * @desc : 차트 반납에서 대출일자 기간 콤보 보여줄까? 말까?
  432. * @
  433. * @param :
  434. * @return :
  435. * @authur : 이은영 2008.05.30
  436. * @---------------------------------------------------
  437. */
  438. function fRtnLendTermDisabled()
  439. {
  440. var lendtermdisabled = rtnlendterm_disabled.value;
  441. if (lendtermdisabled == "Y") {
  442. var today = getCurrentDate();
  443. model.setValue("/root/condition/rtnlist/fromrenddd" , today);
  444. model.setValue("/root/condition/rtnlist/torenddd" , today);
  445. ipt_rtnfromrendd.disabled = false;
  446. ipt_rtntorendd.disabled = false;
  447. } else {
  448. model.setValue("/root/condition/rtnlist/fromrenddd" , "");
  449. model.setValue("/root/condition/rtnlist/torenddd" , "");
  450. ipt_rtnfromrendd.disabled = true;
  451. ipt_rtntorendd.disabled = true;
  452. }
  453. ipt_rtnfromrendd.refresh();
  454. ipt_rtntorendd.refresh();
  455. }
  456. /**
  457. * @desc : 차트 반납에서 반납예정일 기간 콤보 보여줄까? 말까?
  458. * @
  459. * @param :
  460. * @return :
  461. * @authur : 이은영 2008.05.30
  462. * @---------------------------------------------------
  463. */
  464. function fRtnRtnTermDisabled()
  465. {
  466. var rtntermdisabled = rtnrtnterm_disabled.value;
  467. if (rtntermdisabled == "Y") {
  468. var today = getCurrentDate();
  469. model.setValue("/root/condition/rtnlist/fromrtndd", today);
  470. model.setValue("/root/condition/rtnlist/tortndd" , today);
  471. ipt_rtnfromrtndd.disabled = false;
  472. ipt_rtntortndd.disabled = false;
  473. } else {
  474. model.setValue("/root/condition/rtnlist/fromrtndd", "");
  475. model.setValue("/root/condition/rtnlist/tortndd" , "");
  476. ipt_rtnfromrtndd.disabled = true;
  477. ipt_rtntortndd.disabled = true;
  478. }
  479. ipt_rtnfromrtndd.refresh();
  480. ipt_rtntortndd.refresh();
  481. }
  482. /**
  483. * @desc : excel 저장 하기
  484. * @
  485. * @param :
  486. * @return :
  487. * @authur : 이은영 2008.07.14
  488. * @---------------------------------------------------
  489. */
  490. function fExcel(gridObj, title){
  491. if (title == null) { title = "" }
  492. var fileName = window.fileDialog("save", ",", false, title + "_" + getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  493. if (fileName != "") {
  494. gridObj.saveExcel(fileName, "SheetName", true, true, "", "", true);
  495. }
  496. }
  497. /**
  498. * @desc : 등록된 환자번호인지 체킹한다..
  499. * @
  500. * @param : iptObj - 환자번호 입력 컨트롤 (pid)
  501. * @return :
  502. * @authur : 이은영 2008.09.17
  503. * @---------------------------------------------------
  504. */
  505. function fGetPidNo(iptObj, ref)
  506. {
  507. var chkyn = model.getValue(ref);
  508. if (chkyn == "Y") {
  509. if (iptObj.currentText.length > 0) {
  510. var pid = iptObj.currentText;
  511. pid = getCretCheckNo(pid, getUserInfo("dutplceinstcd"));
  512. model.makeValue(iptObj.attribute("ref"), pid);
  513. iptObj.refresh();
  514. }
  515. }
  516. }
  517. /**
  518. * @desc : 선택된 대출용도 코드 리스트 스트링 만들기..
  519. * @
  520. * @param :
  521. * @return :
  522. * @authur : 이은영 2009.01.12
  523. * @---------------------------------------------------
  524. */
  525. function fGetChkRendCdList(setcd, refData, cboObj)
  526. {
  527. model.makeValue("/root/send/reqdata/setcd" , setcd);
  528. submit("TRMRC01313");
  529. var ref = "/root/init/lendsetitem/setitemlist";
  530. var cnt = getNodesetCnt(model, ref);
  531. var chkrendcdlist = "";
  532. for ( var i = 1; i <= cnt; i++)
  533. {
  534. var rendcd = model.getValue(ref + "[" + i + "]/rendcd");
  535. var srchuseyn = model.getValue(ref + "[" + i + "]/srchuseyn");
  536. if (srchuseyn == "Y") {
  537. chkrendcdlist = chkrendcdlist + rendcd + "|";
  538. }
  539. }
  540. var rendcdlist = chkrendcdlist.split("|");
  541. if (rendcdlist.length > 0) {
  542. chkrendcdlist = chkrendcdlist.substring(0, chkrendcdlist.length -1);
  543. }
  544. model.setValue(refData, chkrendcdlist);
  545. cboObj.refresh();
  546. }
  547. /**
  548. * @desc : 대출용도 셋 코드 아이템 리스트 저장하기 전 셋 해주기..
  549. * @
  550. * @param :
  551. * @return :
  552. * @authur : 이은영 2009.01.12
  553. * @---------------------------------------------------
  554. */
  555. function fSetRendCdList()
  556. {
  557. // 2009.01.12. 대출용도 셋으로 조회하기.. ^^
  558. var rendcd = model.getValue("/root/send/reqdata/rendcdlist");
  559. var rendcdlist = rendcd.split("|");
  560. if (rendcd.length > 0) {
  561. for (var i = 0 ; i < rendcdlist.length ; i++) {
  562. rendcd = rendcd.replace("|","','");
  563. }
  564. rendcd = "'" + rendcd + "'";
  565. }
  566. if (rendcd != "") {
  567. model.setValue("/root/send/reqdata/rendcd", rendcd);
  568. }
  569. }
  570. /**
  571. * @desc : 하드코드 조회
  572. * @
  573. * @param : ref - reference path
  574. * rsltref - result reference path
  575. * hardcd - 하드코드
  576. * @return :
  577. * @author : 오지훈
  578. * @---------------------------------------------------
  579. */
  580. function mmbfGetHardCodeInfo(ref, rsltref, hardcd){
  581. var mmb_rsltref = "/root/hidden/mmb/hardcd";
  582. model.removeNode(mmb_rsltref);
  583. model.makeNode(mmb_rsltref);
  584. model.removeNode(ref);
  585. model.makeValue(ref + "/hardcd", hardcd);
  586. if(submit("TRMMB04103", "false", ref, mmb_rsltref)==true){
  587. model.copyNode(rsltref, mmb_rsltref);
  588. model.removeNode(mmb_rsltref);
  589. }
  590. model.refresh();
  591. }