RAD001.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. /***************************************************************************************************************
  2. *
  3. * radfcheckAcountClose 주어진 날짜 기준으로 회계 마감 상태 여부를 return 한다.
  4. * radfgetAcntYY 주어진 날짜 기준으로 회계 년도를 return 한다.
  5. * radfcheckCustExist 유효한 거래처인지 Check
  6. * radfcheckEmplExist 유효한 사번인지 Check
  7. * radfGetBankcd 유효한 은행명인지 Check, 은행코드 return
  8. * radfGetIcpncd 유효한 소득자인지 Check, 주민번호 return
  9. * radfseizureynCheck 압류거래처 체크
  10. * radfBizCheck 사업자 등록번호 체크
  11. * radfJuminCheck 주민등록번호 체크
  12. * radfFgnJuminCheck 외국인 주민등록번호 체크
  13. * radGetInstCardNO 법인카드 기본값 조회
  14. * radfSaveExcel excel 다운로드
  15. * radfCheckInstSearchAuth 기관코드 조회 권한 기관 체크(현재 의료원[001])
  16. *
  17. ***************************************************************************************************************/
  18. /*************************************
  19. * Instcd 기관코드
  20. * ym 년월
  21. *************************************/
  22. function radfcheckAcountClose(Instcd, YM)
  23. {
  24. var comcd_node = "/root/send/comcdref";
  25. var comcd_rsltnode = "/root/init/comcd";
  26. model.removeNodeset(comcd_node);
  27. model.makeValue(comcd_node + "/ym", YM);
  28. model.makeValue(comcd_node + "/instcd", Instcd);
  29. model.makeNode(comcd_rsltnode);
  30. model.removeChild("TRRAZ00003");
  31. model.createChild("xforms:submission", "id:TRRAZ00003;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  32. submit("TRRAZ00003");
  33. if(model.getValue("/root/init/comcd/comcodelist/closyn") == 'Y')
  34. {
  35. return 'close';
  36. }
  37. else
  38. {
  39. return 'open';
  40. }
  41. }
  42. /*************************************
  43. * Instcd 기관코드
  44. * ymdd 년월일
  45. *************************************/
  46. function radfgetAcntYY(Instcd, YMDD, nZipcd1, nZipcd2, nSupaddr, nInfaddr, cadl, nEntrregno, nFromDD, nToDD)
  47. {
  48. var comcd_node = "/root/send/comcdref";
  49. var comcd_rsltnode = "/root/init/comcd";
  50. model.removeNodeset(comcd_node);
  51. model.makeValue(comcd_node + "/ymdd", YMDD);
  52. model.makeValue(comcd_node + "/instcd", Instcd);
  53. model.makeNode(comcd_rsltnode);
  54. model.removeChild("TRRAZ00004");
  55. model.createChild("xforms:submission", "id:TRRAZ00004;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  56. submit("TRRAZ00004");
  57. if(!(nZipcd1 == "" || nZipcd1 == null)) {model.setValue(nZipcd1, model.getValue("/root/init/comcd/comcodelist/zipcd1"));}
  58. if(!(nZipcd2 == "" || nZipcd2 == null)) {model.setValue(nZipcd2, model.getValue("/root/init/comcd/comcodelist/zipcd2"));}
  59. if(!(nSupaddr == "" || nSupaddr == null)) {model.setValue(nSupaddr, model.getValue("/root/init/comcd/comcodelist/supaddr"));}
  60. if(!(nInfaddr == "" || nInfaddr == null)) {model.setValue(nInfaddr, model.getValue("/root/init/comcd/comcodelist/infaddr"));}
  61. if(!(cadl == "" || cadl == null)) {model.setValue(cadl, model.getValue("/root/init/comcd/comcodelist/cadl"));}
  62. if(!(nEntrregno == "" || nEntrregno == null)) {model.setValue(nEntrregno, model.getValue("/root/init/comcd/comcodelist/entrregno"));}
  63. if(!(nFromDD == "" || nFromDD == null)) {model.setValue(nFromDD, model.getValue("/root/init/comcd/comcodelist/fromdd"));}
  64. if(!(nToDD == "" || nToDD == null)) {model.setValue(nToDD, model.getValue("/root/init/comcd/comcodelist/todd"));}
  65. return model.getValue("/root/init/comcd/comcodelist/acntyy");
  66. }
  67. /*************************************
  68. * Instcd 기관코드
  69. * entrregno 사업자등록번호
  70. *************************************/
  71. function radfcheckCustExist(Instcd, entrregno, allscanyn)
  72. {
  73. var comcd_node = "/root/send/comcdref";
  74. var comcd_rsltnode = "/root/init/comcd";
  75. model.removeNodeset(comcd_node);
  76. model.makeValue(comcd_node + "/entrregno", entrregno);
  77. model.makeValue(comcd_node + "/instcd", Instcd);
  78. model.makeValue(comcd_node + "/allscanyn", allscanyn);
  79. model.makeNode(comcd_rsltnode);
  80. model.removeChild("TRRAZ00005");
  81. model.createChild("xforms:submission", "id:TRRAZ00005;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  82. submit("TRRAZ00005");
  83. return model.getValue("/root/init/comcd/comcodelist/custnm");
  84. }
  85. /*************************************
  86. * emplno 사번
  87. *************************************/
  88. function radfcheckEmplExist(emplno, vNode)
  89. {
  90. var comcd_node = "/root/send/comcdref";
  91. var comcd_rsltnode = "/root/init/comcd";
  92. model.removeNodeset(comcd_node);
  93. model.makeValue(comcd_node + "/emplno", emplno);
  94. model.makeNode(comcd_rsltnode);
  95. model.removeChild("TRRAZ00006");
  96. model.createChild("xforms:submission", "id:TRRAZ00006;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  97. submit("TRRAZ00006");
  98. if(vNode != null)
  99. {
  100. //alert(model.getValue("/root/init/comcd/comcodelist/rregno"));
  101. model.setValue(vNode,model.getValue("/root/init/comcd/comcodelist/rregno"));
  102. }
  103. return model.getValue("/root/init/comcd/comcodelist/emplnm");
  104. }
  105. /*************************************
  106. * banknm 은행명
  107. *************************************/
  108. function radfGetBankcd(banknm)
  109. {
  110. var comcd_node = "/root/send/comcdref";
  111. var comcd_rsltnode = "/root/init/comcd";
  112. model.removeNodeset(comcd_node);
  113. model.makeValue(comcd_node + "/banknm", banknm);
  114. model.makeNode(comcd_rsltnode);
  115. model.removeChild("TRRAZ00007");
  116. model.createChild("xforms:submission", "id:TRRAZ00007;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  117. submit("TRRAZ00007");
  118. return model.getValue("/root/init/comcd/comcodelist/bankcd");
  119. }
  120. /*************************************
  121. * instcd 기관코드
  122. * rrgstno 주민등록번호
  123. *************************************/
  124. function radfGetIcpncd(instcd, rrgstno)
  125. {
  126. var comcd_node = "/root/send/comcdref";
  127. var comcd_rsltnode = "/root/init/comcd";
  128. model.removeNodeset(comcd_node);
  129. model.makeValue(comcd_node + "/instcd", instcd);
  130. model.makeValue(comcd_node + "/rrgstno", rrgstno);
  131. model.makeNode(comcd_rsltnode);
  132. model.removeChild("TRRAZ00008");
  133. model.createChild("xforms:submission", "id:TRRAZ00008;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  134. submit("TRRAZ00008");
  135. return model.getValue("/root/init/comcd/comcodelist/name");
  136. }
  137. /*************************************
  138. * instcd 기관코드
  139. * entrregno 사업자등록번호
  140. *************************************/
  141. function radfseizureynCheck(instcd, entrregno, messageflag)
  142. {
  143. var comcd_node = "/root/send/comcdref";
  144. var comcd_rsltnode = "/root/init/comcd";
  145. model.removeNodeset(comcd_node);
  146. model.makeValue(comcd_node + "/instcd", instcd);
  147. model.makeValue(comcd_node + "/entrregno", entrregno);
  148. model.makeNode(comcd_rsltnode);
  149. model.removeChild("TRRAZ00009");
  150. model.createChild("xforms:submission", "id:TRRAZ00009;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  151. submit("TRRAZ00009");
  152. if(messageflag == 'Y' && model.getValue("/root/init/comcd/comcodelist/seizureyn") == "Y")
  153. {
  154. messageBox(model.getValue("/root/init/comcd/comcodelist/custnm") + "은(는) 압류 거래처입니다." ,"I000");
  155. }
  156. return model.getValue("/root/init/comcd/comcodelist/seizureyn");
  157. }
  158. /*************************************
  159. * bizID 사업자등록번호
  160. *************************************/
  161. function radfBizCheck(bizID)
  162. {
  163. var checkID = new Array(1, 3, 7, 1, 3, 7, 1, 3, 5, 1);
  164. var tmpBizID, i, chkSum=0, c2, remander;
  165. for (i=0; i<=7; i++)
  166. {
  167. chkSum += checkID[i] * bizID.charAt(i);
  168. }
  169. c2 = "0" + (checkID[8] * bizID.charAt(8));
  170. c2 = c2.substring(c2.length - 2, c2.length);
  171. chkSum += Math.floor(c2.charAt(0)) + Math.floor(c2.charAt(1));
  172. remander = (10 - (chkSum % 10)) % 10 ;
  173. if (Math.floor(bizID.charAt(9)) == remander)
  174. {
  175. return true; // OK!
  176. }
  177. return false;
  178. }
  179. /*************************************
  180. * jumin 주민등록번호
  181. *************************************/
  182. function radfJuminCheck(juminno)
  183. {
  184. jumin = juminno.substr(0, 6) + "-" + juminno.substr(6, 7);
  185. if(jumin.match(/^\d{2}[0-1]\d[0-3]\d-[1-4]\d{6}$/) == null)
  186. {
  187. return false;
  188. }
  189. var chk = 0;
  190. var i;
  191. var last_num = jumin.substring(13, 14);
  192. var chk_num = '234567-892345';
  193. for(i = 0; i < 13; i++)
  194. {
  195. if(jumin.charAt(i) != '-')
  196. chk += ( parseInt(chk_num.charAt(i)) * parseInt(jumin.charAt(i)) );
  197. }
  198. chk = (11 - (chk % 11)) % 10;
  199. if (chk != last_num) return false;
  200. return true;
  201. }
  202. /*************************************
  203. * jumin 외국인 주민등록번호
  204. *************************************/
  205. function radfFgnJuminCheck(juminno) {
  206. var sum = 0;
  207. var odd = 0;
  208. buf = new Array(13);
  209. for (i = 0; i < 13; i++) buf[i] = parseInt(juminno.charAt(i));
  210. odd = buf[7]*10 + buf[8];
  211. if (odd%2 != 0) {
  212. return false;
  213. }
  214. if ((buf[11] != 6)&&(buf[11] != 7)&&(buf[11] != 8)&&(buf[11] != 9)) {
  215. return false;
  216. }
  217. multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
  218. for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]);
  219. sum=11-(sum%11);
  220. if (sum>=10) sum-=10;
  221. sum += 2;
  222. if (sum>=10) sum-=10;
  223. if ( sum != buf[12]) {
  224. return false;
  225. }
  226. else {
  227. return true;
  228. }
  229. }
  230. /*************************************
  231. * instcd 기관코드
  232. * userid 사용자 ID
  233. *************************************/
  234. function radGetInstCardNO(instcd, userid, deptcd)
  235. {
  236. var comcd_node = "/root/send/comcdref";
  237. var comcd_rsltnode = "/root/init/comcd";
  238. model.removeNodeset(comcd_node);
  239. model.makeValue(comcd_node + "/instcd", instcd);
  240. model.makeValue(comcd_node + "/userid", userid);
  241. model.makeValue(comcd_node + "/deptcd", deptcd);
  242. model.makeNode(comcd_rsltnode);
  243. model.removeChild("TRRAZ00010");
  244. model.createChild("xforms:submission", "id:TRRAZ00010;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  245. submit("TRRAZ00010");
  246. if(model.instance1.selectNodes("/root/init/comcd/comcodelist").length == 1)
  247. {
  248. return model.getValue("/root/init/comcd/comcodelist/cardno");
  249. }
  250. else
  251. {
  252. return null;
  253. }
  254. }
  255. /*************************************
  256. * pGrid 그리드명
  257. * sTitle 파일이름
  258. * sSheetName 시트명
  259. * bColhidden hidden 행 출력여부 (true/false)
  260. * bRowhidden hidden 열 출력여부 (true/false)
  261. * sExportfalsecols 출력 제외 행 (1,2,3,4,5)
  262. * sExportfalserows 출력 제외 열 (6,7,8,9,10)
  263. *************************************/
  264. function radfSaveExcel(pGrid, sTitle, sSheetName, bColhidden, bRowhidden, sExportfalsecols, sExportfalserows)
  265. {
  266. if(sTitle == null) { sTitle = "excel"; };
  267. if(sSheetName == null) { sSheetName = "sheet1"; }
  268. else { sSheetName = "sheetname:" + sSheetName + ";"; };
  269. if(bColhidden == null) { bColhidden = ""; }
  270. else { bColhidden = "colhiddenextend:" + bColhidden + ";"; };
  271. if(bRowhidden == null) { bRowhidden = ""; }
  272. else { bRowhidden = "rowhiddenextend:" + bRowhidden + ";"; };
  273. if(sExportfalsecols == null) { sExportfalsecols = ""; }
  274. else { sExportfalsecols = "exportfalsecols:" + sExportfalsecols + ";"; };
  275. if(sExportfalserows == null) { sExportfalserows = ""; }
  276. else { sExportfalserows = "exportfalserows:" + sExportfalserows + ";"; };
  277. var sProperty = sSheetName + bColhidden + bRowhidden + sExportfalsecols + sExportfalserows;
  278. var fileName = window.fileDialog("save", ",", false, sTitle, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  279. if (fileName != "")
  280. {
  281. pGrid.saveExcel(fileName,"");
  282. }
  283. }
  284. /*************************************
  285. * Instcd 기관코드
  286. * CmbBoxID 기관코드 콤보박스
  287. *************************************/
  288. function radfCheckInstSearchAuth(Instcd, CmbBoxID)
  289. {
  290. if(Instcd == '001')
  291. {
  292. CmbBoxID.disabled = false;
  293. }
  294. else
  295. {
  296. CmbBoxID.disabled = true;
  297. }
  298. CmbBoxID.refresh();
  299. }
  300. /*************************************
  301. * Instcd 기관코드
  302. * UserID 사용자ID
  303. *************************************/
  304. function radfCheckAcntAuth(Instcd, UserID, ControlColumn, ColumnValue)
  305. {
  306. var comcd_node = "/root/send/comcdref";
  307. var comcd_rsltnode = "/root/init/comcd";
  308. model.removeNodeset(comcd_node);
  309. model.makeValue(comcd_node + "/instcd", Instcd);
  310. model.makeValue(comcd_node + "/userid", UserID);
  311. model.makeValue(comcd_node + "/" + ControlColumn, ColumnValue);
  312. model.makeNode(comcd_rsltnode);
  313. model.removeChild("TRRAZ00011");
  314. model.createChild("xforms:submission", "id:TRRAZ00011;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  315. submit("TRRAZ00011");
  316. return model.getValue("/root/init/comcd/comcodelist/authyn");
  317. }
  318. /*************************************
  319. * Instcd 기관코드
  320. * UserID 사용자ID
  321. *************************************/
  322. function radfCheckInstMngt(Instcd, ConditionID)
  323. {
  324. var comcd_node = "/root/send/comcdref";
  325. var comcd_rsltnode = "/root/init/comcd";
  326. model.removeNodeset(comcd_node);
  327. model.makeValue(comcd_node + "/instcd", Instcd);
  328. model.makeValue(comcd_node + "/conditionid", ConditionID);
  329. model.makeNode(comcd_rsltnode);
  330. model.removeChild("TRRAZ00012");
  331. model.createChild("xforms:submission", "id:TRRAZ00012;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  332. submit("TRRAZ00012");
  333. return model.getValue("/root/init/comcd/comcodelist/mngtcontent");
  334. }
  335. /*************************************
  336. * Instcd 기관코드
  337. * Emplno 사번
  338. * Deptcd 부서코드
  339. * WorkFlag 업무구분
  340. *************************************/
  341. function radfCheckBugtAuth(Instcd, Emplno, Deptcd, WorkFlag)
  342. {
  343. var comcd_node = "/root/send/comcdref";
  344. var comcd_rsltnode = "/root/init/comcd";
  345. model.removeNodeset(comcd_node);
  346. model.makeValue(comcd_node + "/instcd", Instcd);
  347. model.makeValue(comcd_node + "/emplno", Emplno);
  348. model.makeValue(comcd_node + "/deptcd", Deptcd);
  349. model.makeValue(comcd_node + "/workflag", WorkFlag);
  350. model.makeNode(comcd_rsltnode);
  351. model.removeChild("TRRAZ00013");
  352. model.createChild("xforms:submission", "id:TRRAZ00013;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  353. submit("TRRAZ00013");
  354. return model.getValue("/root/init/comcd/comcodelist/auth");
  355. }
  356. /*************************************
  357. * Instcd 기관코드
  358. * Entrregno 세금계산서번호
  359. * Nodeset Return Node
  360. *************************************/
  361. function radfGetCustEmailList(Instcd, Entrregno, Nodeset)
  362. {
  363. var comcd_node = "/root/send/comcdref";
  364. var comcd_rsltnode = "/root/init/comcd";
  365. model.removeNodeset(comcd_node);
  366. model.makeValue(comcd_node + "/instcd", Instcd);
  367. model.makeValue(comcd_node + "/entrregno", Entrregno);
  368. model.makeNode(comcd_rsltnode);
  369. model.removeChild("TRRAZ00014");
  370. model.createChild("xforms:submission", "id:TRRAZ00014;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  371. submit("TRRAZ00014");
  372. for(var i = 1 ; i <= instance1.selectNodes("/root/init/comcd/comcodelist").length ; i++)
  373. {
  374. model.makeValue(Nodeset + "[" + i + "]" + "/label", model.getValue("/root/init/comcd/comcodelist[" + i + "]/label"));
  375. model.makeValue(Nodeset + "[" + i + "]" + "/value", model.getValue("/root/init/comcd/comcodelist[" + i + "]/value"));
  376. }
  377. return model.getValue("/root/init/comcd/comcodelist");
  378. }
  379. /*************************************
  380. * Instcd 기관코드
  381. * Entrregno 세금계산서번호
  382. * Nodeset Return Node
  383. *************************************/
  384. function radfGetDTIPassword()
  385. {
  386. var comcd_node = "/root/send/comcdref";
  387. var comcd_rsltnode = "/root/init/comcd";
  388. model.removeNodeset(comcd_node);
  389. model.makeValue(comcd_node + "/emplno", getUserInfo("userid"));
  390. model.makeNode(comcd_rsltnode);
  391. model.removeChild("TRRAZ00015");
  392. model.createChild("xforms:submission", "id:TRRAZ00015;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  393. submit("TRRAZ00015");
  394. var sPasswd = model.getValue("/root/init/comcd/comcodelist/passwd")
  395. var sLink = "http://222.106.233.111:8081/login.do?method=process1&userId=" + getUserInfo("userid") + "&password=" + sPasswd;
  396. if(sPasswd != "")
  397. {
  398. window.load(sLink, "html");
  399. }
  400. }
  401. /*************************************
  402. * ctr_repaymthd 상각구분 컨트롤러
  403. * ctr_cntsyearno 내용연수 컨트롤러
  404. *************************************/
  405. function radfGetCntsYearNOList(ctr_repaymthd,ctr_cntsyearno,ctr_repayrate)
  406. {
  407. var comcd_node = "/root/send/comcdref";
  408. var comcd_rsltnode = "/root/init/comcd/cntsyearnolist";
  409. model.removeNodeset(comcd_node);
  410. model.makeValue(comcd_node + "/repaymthd", model.getValue(ctr_repaymthd.attribute("ref")));
  411. model.makeNode(comcd_rsltnode);
  412. model.removeChild("TRRAZ00016");
  413. model.createChild("xforms:submission", "id:TRRAZ00016;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  414. submit("TRRAZ00016");
  415. //alert(model.getValue("/root/init/comcd/comcodelist/cntsyearno"));
  416. //alert(model.instance1.selectNodes("/root/init/comcd/comcodelist/cntsyearno").length);
  417. var vLen = model.instance1.selectNodes(comcd_rsltnode + "/comcodelist/cntsyearno").length;
  418. model.setValue(ctr_cntsyearno.attribute("ref"), "");
  419. vNodeset = "/root/hidden/cntsyearnolist";
  420. model.removeNodeset(vNodeset);
  421. for(var i = 1 ; i <= vLen ; i++)
  422. {
  423. model.makeValue(vNodeset + "[" + i + "]" + "/label", model.getValue(comcd_rsltnode + "/comcodelist[" + i + "]/cntsyearno"));
  424. model.makeValue(vNodeset + "[" + i + "]" + "/value", model.getValue(comcd_rsltnode + "/comcodelist[" + i + "]/cntsyearno"));
  425. }
  426. ctr_cntsyearno.choices.itemset.attribute("nodeset") = vNodeset;
  427. ctr_cntsyearno.choices.itemset.label.attribute("ref") = "label";
  428. ctr_cntsyearno.choices.itemset.value.attribute("ref") = "value";
  429. ctr_cntsyearno.refresh();
  430. model.setValue(ctr_repayrate.attribute("ref"), "");
  431. ctr_repayrate.refresh();
  432. }
  433. /*************************************
  434. * ctr_repaymthd 상각구분 컨트롤러
  435. * ctr_cntsyearno 내용연수 컨트롤러
  436. * ctr_repayrate 상각율 컨트롤러
  437. *************************************/
  438. function radfGetRepayRate(ctr_repaymthd,ctr_cntsyearno,ctr_repayrate)
  439. {
  440. var comcd_node = "/root/send/comcdref";
  441. var comcd_rsltnode = "/root/init/comcd/repayratelist";
  442. model.removeNodeset(comcd_node);
  443. model.makeValue(comcd_node + "/repaymthd", model.getValue(ctr_repaymthd.attribute("ref")));
  444. model.makeValue(comcd_node + "/cntsyearno", model.getValue(ctr_cntsyearno.attribute("ref")));
  445. model.makeNode(comcd_rsltnode);
  446. model.removeChild("TRRAZ00017");
  447. model.createChild("xforms:submission", "id:TRRAZ00017;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  448. submit("TRRAZ00017");
  449. model.setValue(ctr_repayrate.attribute("ref"), model.getValue(comcd_rsltnode + "/comcodelist/repayrate"));
  450. ctr_repayrate.refresh();
  451. }
  452. /*************************************
  453. * Instcd 기관코드
  454. * Acntyy 회계년도
  455. * FromDD 시작일
  456. *************************************/
  457. function radfRenewalBebtClos(Instcd, Acntyy, FromDD)
  458. {
  459. var comcd_node = "/root/send/comcdref";
  460. var comcd_rsltnode = "/root/init/comcd";
  461. model.removeNodeset(comcd_node);
  462. model.makeValue(comcd_node + "/instcd", Instcd);
  463. model.makeValue(comcd_node + "/acntyy", Acntyy);
  464. model.makeValue(comcd_node + "/fromdd", FromDD);
  465. model.makeNode(comcd_rsltnode);
  466. model.removeChild("TXRAZ00002");
  467. model.createChild("xforms:submission", "id:TXRAZ00002;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; ");
  468. submit("TXRAZ00002");
  469. }