SPRAD00120_집합계좌등록.xrw 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>이체계좌등록</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <group>
  11. <grouplist/>
  12. </group>
  13. <list2>
  14. <groupdetaillist>
  15. </groupdetaillist>
  16. <returnlist/>
  17. </list2>
  18. <list>
  19. <transacntinfo>
  20. <acntflagcd/>
  21. <acntflagnm/>
  22. <rcipntacntno/>
  23. <bankcd/>
  24. <banknm/>
  25. <depor/>
  26. </transacntinfo>
  27. </list>
  28. </main>
  29. <send>
  30. <transacnt/>
  31. <retrparams>
  32. <instcd/>
  33. <acntsetnm/>
  34. </retrparams>
  35. <retrparams2/>
  36. <data1>
  37. <instcd/>
  38. <acntflagcd/>
  39. <acntflagnm/>
  40. <acntflag/>
  41. <getcond/>
  42. </data1>
  43. </send>
  44. <init>
  45. <acntflaglist>
  46. <acntflag>
  47. <cd>1</cd>
  48. <nm>거래처</nm>
  49. </acntflag>
  50. <acntflag>
  51. <cd>4</cd>
  52. <nm>교직원</nm>
  53. </acntflag>
  54. <acntflag>
  55. <cd>5</cd>
  56. <nm>개인</nm>
  57. </acntflag>
  58. </acntflaglist>
  59. <R0001list>
  60. <R0001>
  61. <cdnm/>
  62. <cdid/>
  63. </R0001>
  64. </R0001list>
  65. </init>
  66. <temp>
  67. <flag>Y</flag>
  68. </temp>
  69. <target/>
  70. <hidden>
  71. <excelupload/>
  72. </hidden>
  73. </root>
  74. </instance>
  75. <submission id="TRRAD00121" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/group"/>
  76. <submission id="TRRAD00122" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/list2"/>
  77. <submission id="TXRAD00121" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  78. <submission id="TRZBC00101" method="urlencoded-post" replace="instance"/>
  79. <submission id="TRRAD00110" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/list"/>
  80. </model>
  81. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  82. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  83. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  84. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  85. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  86. <script type="javascript" src="../../../mis/acntcommonweb/js/RAD001.js"/>
  87. <script type="javascript" ev:event="xforms-ready">
  88. <![CDATA[
  89. fCheckAuth();//화면 권한체크
  90. fOpenForm();
  91. //공통함수 호출(help명)
  92. misfMsterDetailSet(grd_groupdetaillist, null, "TRRAD00121", "Y");
  93. misfMsterDetailSet(grd_groupacnt, null, "TRRAD00122", "Y");
  94. btn_search.dispatch("DOMActivate");
  95. model.refresh();
  96. ]]>
  97. </script>
  98. <script type="javascript">
  99. <![CDATA[
  100. //========================================================================================
  101. //버튼에 대한 화면 권한 체크(R : 읽기, X : 입력/수정/삭제, P : 출력)
  102. //========================================================================================
  103. function fCheckAuth()
  104. {
  105. btn_search.disabled = !checkAuth("R") ;
  106. btn_save.disabled = !checkAuth("X") ;
  107. }
  108. //========================================================================================
  109. //화면 로드시 초기화 함수
  110. //========================================================================================
  111. function fOpenForm()
  112. {
  113. if(checkOpener())
  114. {
  115. btn_save.visible = true;
  116. btn_cancel.visible = true;
  117. }
  118. var instcd = getUserInfo("dutplceinstcd");
  119. var expsacntsum = model.getValue("/root/target/slipinfo/expsacntsum");
  120. model.removenode("/root/main/group/grouplist");
  121. model.removenode("/root/main/list2/groupdetaillist");
  122. model.setValue("/root/send/retrparams/instcd", instcd);
  123. model.refresh()
  124. //공통코드 조회
  125. zbcfGetCodeList(new Array("R0001"), new Array("/root/init/R0001list"));
  126. model.refresh();
  127. }
  128. //========================================================================================
  129. // 저장버튼 클릭시 저장 수행 함수
  130. //========================================================================================
  131. function fClickSaveBtn()
  132. {
  133. if(!fIsValidForSave())//저장전 유효성 검사
  134. return;
  135. model.resetInstanceNode("/root/send");
  136. model.makeNode("/root/send/transacnt");
  137. model.setValue("/root/send/transacnt", grd_groupdetaillist.getUpdateData());
  138. misfSave("TXRAD00121");
  139. }
  140. //========================================================================================
  141. // 행추가버튼 클릭시
  142. //========================================================================================
  143. function fGrdAdd(pGrid)
  144. {
  145. pGrid.addRow();
  146. //pGrid.editCell();
  147. var row = pGrid.row;
  148. model.setValue("/root/main/list2/groupdetaillist[" + row + "]/instcd", model.getValue("/root/send/retrparams/instcd"));
  149. model.refresh();
  150. }
  151. function fSetDefaulValue()
  152. {
  153. var acntflag = model.getValue("/root/main/list2/groupdetaillist[1]/acntflag");
  154. for(var i=1; i<grd_groupdetaillist.rows; i++)
  155. {
  156. if(grd_groupdetaillist.rowStatus(i) == 1)
  157. {
  158. grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("instcd")) = model.getValue("/root/hidden/condition/instcd");
  159. grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("acntflag")) = acntflag;
  160. }
  161. }
  162. }
  163. //========================================================================================
  164. // 행삭제버튼 클릭시
  165. //========================================================================================
  166. function fGrdDel(pGrid)
  167. {
  168. var cur_row = pGrid.row;
  169. if(cur_row > -1)
  170. {
  171. deleteSelectedRows(pGrid, false); //true : 바로삭제, false : 상태만 삭제로 변경
  172. pGrid.refresh();
  173. }
  174. else if(cur_row == -1)
  175. {
  176. messageBox("삭제하려는 행을", "C002");
  177. }
  178. }
  179. //========================================================================================
  180. //저장전 유효성 검사
  181. //========================================================================================
  182. function fIsValidForSave()
  183. {
  184. //필수 입력 항목 체크(공통 ftHelper.js)
  185. /* if(!isRequiredControls("ipt_acntcdi", "ipt_acntnmi", "rdo_drcustflag", "rdo_crcustflag",
  186. "cmb_balflag", "rdo_acntuseyn", "com_acntflag", "com_acntclsflag")) {
  187. return false;
  188. }
  189. */
  190. var stransacnt = getGridUpdateData(grd_groupdetaillist);
  191. if(stransacnt == "") {
  192. messageBox("변경된 데이터가","I004");
  193. return false;
  194. }else if(stransacnt != "") {
  195. return true;
  196. }
  197. }
  198. //========================================================================================
  199. //엑셀입력(excel file을 그리드에 입력)
  200. //========================================================================================
  201. function fInputExcel(pGrid)
  202. {
  203. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  204. if(fileName != "")
  205. {
  206. pGrid.loadExcel(fileName, 1, true);
  207. pGrid.deleteRow(1);
  208. for(i = 1; i < pGrid.rows; i++)
  209. {
  210. pGrid.rowStatus(i) = 1;
  211. }
  212. pGrid.refresh();
  213. }
  214. }
  215. //========================================================================================
  216. //입력 선택
  217. //========================================================================================
  218. function fSelected()
  219. {
  220. if(!checkOpener() || grd_groupacnt.rows == grd_groupacnt.fixedRows)
  221. {
  222. return;
  223. }
  224. if(fCheckStatus() == false) return;
  225. if(getUserInfo("dutplceinstcd") == '103')
  226. {
  227. fCheckAmt();
  228. }
  229. if(grd_groupacnt.row >= grd_groupacnt.fixedRows)
  230. {
  231. var bEdit = false;
  232. for(var i=1; i<grd_groupdetaillist.rows; i++)
  233. {
  234. var iRowStatus = grd_groupdetaillist.rowStatus(i);
  235. if(iRowStatus != 0)
  236. {
  237. bEdit = true;
  238. }
  239. if(grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("amt")) == "")
  240. {
  241. grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("amt")) = 0;
  242. }
  243. }
  244. if(bEdit)
  245. {
  246. messageBox("수정중이거나 입력중인 데이터가 있어\n\n집합계좌를 이체계좌로 등록 할 수", "I004");
  247. return;
  248. }
  249. misfPopUpCheckedListReturn(grd_returnlist, grd_returnlist.colRef("chk"));
  250. }
  251. }
  252. //========================================================================================
  253. //금액 체크 (0 원은 제외함)
  254. //========================================================================================
  255. function fCheckAmt()
  256. {
  257. var grd_rows = grd_returnlist.rows;
  258. var grd_fixedRows = grd_returnlist.fixedRows;
  259. for(var i = grd_fixedRows ; i < grd_rows ; i ++)
  260. {
  261. if(parseInt(grd_returnlist.valueMatrix(i, grd_returnlist.colRef("amt"))) == 0)
  262. {
  263. grd_returnlist.valueMatrix(i, grd_returnlist.colRef("chk")) = 'N';
  264. }
  265. }
  266. }
  267. //========================================================================================
  268. //금액 체크 (0 원은 제외함)
  269. //========================================================================================
  270. function fAllCheckCancel(YN)
  271. {
  272. var grd_rows = grd_groupdetaillist.rows
  273. var grd_fixedRows = grd_groupdetaillist.fixedRows;
  274. for(var i = grd_fixedRows ; i < grd_rows ; i++)
  275. {
  276. grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("chk")) = YN;
  277. grd_returnlist.valueMatrix(i, grd_returnlist.colRef("chk")) = YN;
  278. }
  279. }
  280. //========================================================================================
  281. //진행중인 작업 여부 Check
  282. //========================================================================================
  283. function fCheckStatus()
  284. {
  285. var grd_rows = grd_groupdetaillist.rows;
  286. var grd_fixedRows = grd_groupdetaillist.fixedRows;
  287. for(var i = grd_fixedRows ; i <= grd_rows ; i++)
  288. {
  289. if(grd_groupdetaillist.rowStatus(i) != 0)
  290. {
  291. messageBox("진행중인 작업 완료/취소 후 실행하십시요" ,"");
  292. return false;
  293. }
  294. }
  295. return true;
  296. }
  297. //========================================================================================
  298. //엑셀입력(excel file을 그리드에 입력)
  299. //========================================================================================
  300. function fInputExcel(pGrid) {
  301. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  302. if(fileName != "") {
  303. pGrid.loadExcel(fileName, 1, true);
  304. pGrid.deleteRow(1);
  305. for(i = 1; i < pGrid.rows; i++) {
  306. pGrid.rowStatus(i) = 1;
  307. }
  308. pGrid.rebuild();
  309. //pGrid.refresh();
  310. return true;
  311. }
  312. else
  313. {
  314. return false;
  315. }
  316. }
  317. //========================================================================================
  318. //상대처코드 유효값 체크
  319. //========================================================================================
  320. //facntflagcdCheck(model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflag"),acntflagcd, grd_excelupload.nodeset, i, returnlist);
  321. function facntflagcdCheck(acntflag, acntflagcd, gridnodeset, gridrow, returnlist)
  322. {
  323. var valflag = false;
  324. if(acntflag == '1') { return radfcheckCustExist(getUserInfo("dutplceinstcd"), acntflagcd, gridnodeset, gridrow, returnlist) }
  325. else if(acntflag == '4') { return radfcheckEmplExist(acntflagcd, gridnodeset, gridrow, returnlist) }
  326. else if(acntflag == '5') { return radfcheckIcpnExist(getUserInfo("dutplceinstcd"),acntflagcd, gridnodeset, gridrow, returnlist) }
  327. }
  328. ]]>
  329. </script>
  330. </xhtml:head>
  331. <xhtml:body pagewidth="1100" pageheight="580" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  332. <group id="group4" scroll="auto" style="left:0px; top:42px; width:1079px; height:35px; ">
  333. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1075px; height:35px; "/>
  334. <button id="btn_search" class="btn1_letter2" navindex="4" visibility="visible" style="left:1014px; top:7px; width:56px; height:22px; text-align:left; ">
  335. <caption>조회</caption>
  336. <script type="javascript" ev:event="DOMActivate">
  337. <![CDATA[
  338. submit("TRRAD00121");
  339. misfSetReadOnlyCol(grd_groupdetaillist, "acntflag,acntflagcd,acntflagnm", true);
  340. model.removenode("/root/main/list2");
  341. //model.makeNode("/root/main/list2/groupdetaillist");
  342. model.refresh();
  343. ]]>
  344. </script>
  345. </button>
  346. <line id="line5" class="line_4" style="x1:1007px; y1:7px; x2:1007px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  347. <caption id="caption7" class="search_name" visibility="visible" style="left:27px; top:9px; width:99px; height:17px; ">집합계좌명 :</caption>
  348. <input id="input1" ref="/root/send/retrparams/acntsetnm" style="left:130px; top:8px; width:300px; height:19px; "/>
  349. </group>
  350. <group id="group1" style="left:0px; top:0px; width:1079px; height:13px; ">
  351. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">집합계좌 등록 및 선택</caption>
  352. </group>
  353. <group id="group3" scroll="auto" style="left:0px; top:77px; width:1079px; height:446px; ">
  354. <line id="line3" class="line_1" style="x1:0px; y1:25px; x2:1075px; y2:25px; "/>
  355. <caption id="caption1" class="tit_2" style="left:5px; top:9px; width:95px; height:14px; ">집합계좌목록</caption>
  356. <datagrid id="grd_groupacnt" nodeset="/root/main/group/grouplist" caption="기관코드^집합계좌명" colsep="^" colwidth="50, 165" dataheight="25" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:30px; width:210px; height:415px; ">
  357. <col ref="instcd" visibility="hidden"/>
  358. <col ref="acntsetnm" type="input"/>
  359. <script type="javascript" ev:event="onrowchanged">
  360. <![CDATA[
  361. model.setValue("/root/send/retrparams/instcd", grd_groupacnt.valueMatrix(grd_groupacnt.row, grd_groupacnt.colRef("instcd")));
  362. model.setValue("/root/send/retrparams/acntsetnm", grd_groupacnt.valueMatrix(grd_groupacnt.row, grd_groupacnt.colRef("acntsetnm")));
  363. submit("TRRAD00122");
  364. misfSetReadOnlyCol(grd_groupdetaillist, "acntflag,acntflagcd", true);
  365. grd_groupacnt.dispatch("onmouseup");
  366. ]]>
  367. </script>
  368. <script type="javascript" ev:event="ondblclick">
  369. <![CDATA[
  370. var vStatus = grd_groupacnt.rowStatus(grd_groupacnt.row);
  371. if(vStatus == 1 || vStatus == 3)
  372. {
  373. return;
  374. }
  375. fSelected();
  376. ]]>
  377. </script>
  378. </datagrid>
  379. <caption id="caption2" class="tit_2" style="left:220px; top:10px; width:110px; height:13px; ">이체계좌목록</caption>
  380. <line id="line1" class="line_1" style="x1:211px; y1:29px; x2:211px; y2:445px; "/>
  381. <button id="btn_grupgrdadd" class="btn2_letter3" style="left:104px; top:5px; width:53px; height:19px; ">
  382. <caption>행추가</caption>
  383. <script type="javascript" ev:event="onclick">
  384. <![CDATA[
  385. misfGridIUD(grd_groupacnt, "I");
  386. grd_groupacnt.valueMatrix(grd_groupacnt.row, grd_groupacnt.colRef("instcd")) = getUserInfo("dutplceinstcd");
  387. ]]>
  388. </script>
  389. </button>
  390. <button id="btn_grddel" class="btn2_letter3" style="left:1021px; top:4px; width:53px; height:19px; ">
  391. <caption>행삭제</caption>
  392. <script type="javascript" ev:event="onclick">
  393. <![CDATA[
  394. misfGridIUD(grd_groupdetaillist, "D");
  395. model.recalculate();
  396. ]]>
  397. </script>
  398. </button>
  399. <button id="btn_grdadd" class="btn2_letter3" style="left:966px; top:4px; width:53px; height:19px; ">
  400. <caption>행추가</caption>
  401. <script type="javascript" ev:event="onclick">
  402. <![CDATA[
  403. if(grd_groupacnt.row == 0 || model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row +"]/acntsetnm") == "")
  404. {
  405. messageBox("집합계좌명을 추가하시거나 입력하세요", "I999");
  406. return;
  407. }
  408. misfGridIUD(grd_groupdetaillist, "A");
  409. grd_groupdetaillist.col = 4;
  410. model.setValue("/root/main/list2/groupdetaillist[" + grd_groupdetaillist.row + "]/instcd", model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row +"]/instcd"));
  411. model.setValue("/root/main/list2/groupdetaillist[" + grd_groupdetaillist.row + "]/acntsetnm", model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row +"]/acntsetnm"));
  412. model.setValue("/root/main/list2/groupdetaillist[" + grd_groupdetaillist.row + "]/amt", 0);
  413. if (model.getValue("/root/main/list2/groupdetaillist[1]/acntflag") != "")
  414. {
  415. model.setValue("/root/main/list2/groupdetaillist[" + grd_groupdetaillist.row + "]/acntflag", model.getValue("/root/main/list2/groupdetaillist[1]/acntflag"));
  416. model.refresh();
  417. }
  418. ]]>
  419. </script>
  420. </button>
  421. <button id="btn_grupgrddel" class="btn2_letter3" style="left:158px; top:5px; width:53px; height:19px; ">
  422. <caption>행삭제</caption>
  423. <script type="javascript" ev:event="onclick">
  424. <![CDATA[
  425. misfGridIUD(grd_groupacnt, "D");
  426. ]]>
  427. </script>
  428. </button>
  429. <datagrid id="grd_groupdetaillist" nodeset="/root/main/list2/groupdetaillist" autoresize="false" caption="선택^집합계좌명^상대처구분^dummy^dummy1^상대처코드^상대처명^dummy2^dummy3^계좌번호^은행명^은행명1^예금주^금액^입금명^비고^기관코드" colsep="^" colwidth="30, 110, 70, 0, 0, 100, 100, 0,0,120, 140, 110, 100, 91, 105, 75, 158, 0" dataheight="25" ellipsis="false" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:216px; top:30px; width:859px; height:415px; ">
  430. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  431. <col ref="acntsetnm"/>
  432. <col ref="acntflag" type="combo">
  433. <choices>
  434. <itemset nodeset="/root/init/acntflaglist/acntflag">
  435. <label ref="nm"/>
  436. <value ref="cd"/>
  437. </itemset>
  438. </choices>
  439. </col>
  440. <col ref="dummy"/>
  441. <col ref="dummy1"/>
  442. <col ref="acntflagcd" type="inputbutton"/>
  443. <col ref="acntflagnm" type="input"/>
  444. <col ref="dummy2"/>
  445. <col ref="dummy3"/>
  446. <col ref="rcipntacntno" type="input" style="text-align:left; padding-right:5; "/>
  447. <col ref="bankcd" type="combo" showvalue="true">
  448. <choices>
  449. <itemset nodeset="/root/init/R0001list/R0001">
  450. <label ref="cdnm"/>
  451. <value ref="cdid"/>
  452. </itemset>
  453. </choices>
  454. </col>
  455. <col ref="banknm" type="input" visibility="hidden"/>
  456. <col ref="depor" type="input"/>
  457. <col ref="amt" type="input" format="#,###" style="text-align:right; padding-right:1; "/>
  458. <col ref="deponm" type="input" style="text-align:right; "/>
  459. <col ref="cmt" type="input"/>
  460. <col ref="instcd" visibility="hidden"/>
  461. <script type="javascript" ev:event="onbuttonclick">
  462. <![CDATA[
  463. var cur_row = grd_groupdetaillist.row;
  464. var row_cnt = grd_groupdetaillist.rows;
  465. var instcd = model.getValue("/root/send/retrparams/instcd");
  466. var acntflag = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflag");
  467. var acntflagcd = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflagcd");
  468. var acntflagnm = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflagnm");
  469. var pVal;
  470. if (acntflag == "")
  471. {
  472. messageBox("상대처구분을", "C002");
  473. grd_groupdetaillist.col = 4;
  474. model.setFocus("grd_groupdetaillist");
  475. return;
  476. }
  477. if(grd_groupdetaillist.col == grd_groupdetaillist.colRef("acntflagcd") && acntflag != "9")
  478. {
  479. pVal = instcd + "," + acntflag + "," + acntflagcd + "," + acntflagnm;
  480. misfOpenPopUpList("24", grd_groupdetaillist, "", "dummy,dummy1,acntflagcd,acntflagnm,dummy2,dummy3,bankcd,banknm,rcipntacntno,depor", pVal, "instcd,acntflag,acntflagcd,acntflagnm");
  481. if (row_cnt < grd_groupdetaillist.rows)
  482. {
  483. fSetDefaulValue();
  484. model.refresh();
  485. }
  486. }
  487. for(var i=1; i<grd_groupdetaillist.rows; i++)
  488. {
  489. grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("instcd")) = model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row + "]/instcd");
  490. grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("acntsetnm")) = model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row + "]/acntsetnm");
  491. if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("amt")) == "")
  492. {
  493. grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("amt")) = 0;
  494. }
  495. }
  496. ]]>
  497. </script>
  498. <script type="javascript" ev:event="xforms-value-changed">
  499. <![CDATA[
  500. if(grd_groupdetaillist.colRef("acntflag") == grd_groupdetaillist.col)
  501. {
  502. var vInstanceRow = grd_groupdetaillist.row - grd_groupdetaillist.fixedRows + 1;
  503. if(model.getValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/acntflagcd") != "")
  504. {
  505. model.setValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/acntflagcd", "");
  506. model.setValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/acntflagnm", "");
  507. model.setValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/rcipntacntno", "");
  508. model.setValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/bankcd", "");
  509. model.setValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/depor", "");
  510. grd_groupdetaillist.refresh();
  511. }
  512. }
  513. else if(grd_groupdetaillist.colRef("acntflagcd") == grd_groupdetaillist.col || grd_groupdetaillist.colRef("acntflagnm") == grd_groupdetaillist.col)
  514. {
  515. var cur_col = grd_groupdetaillist.col;
  516. var cur_row = grd_groupdetaillist.row;
  517. var row_cnt = grd_groupdetaillist.rows;
  518. var instcd = model.getValue("/root/send/retrparams/instcd");
  519. var acntflag = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflag");
  520. var acntflagcd = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflagcd");
  521. var acntflagnm = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflagnm");
  522. var pVal;
  523. if (acntflag == "")
  524. {
  525. messageBox("상대처구분을 선택하세요.","I000");
  526. grd_groupdetaillist.col= 4;
  527. model.setFocus("grd_groupdetaillist");
  528. return;
  529. }
  530. if (cur_col == grd_groupdetaillist.colRef("acntflagnm") && acntflag != "9")
  531. {
  532. pVal = instcd + "," + acntflag + "," + acntflagcd + "," + acntflagnm;
  533. misfOpenPopUpList("24", grd_groupdetaillist, "", "dummy1,acntflagcd,acntflagnm,dummy2,dummy3,bankcd,banknm,rcipntacntno,depor", pVal, "instcd,acntflag,acntflagcd,acntflagnm");
  534. if (row_cnt < grd_groupdetaillist.rows)
  535. {
  536. fSetDefaulValue();
  537. model.refresh();
  538. }
  539. }
  540. }
  541. else if(grd_groupdetaillist.colRef("chk") == grd_groupdetaillist.col)
  542. {
  543. if(grd_groupdetaillist.rowStatus(grd_groupdetaillist.row) != 1 && grd_groupdetaillist.rowStatus(grd_groupdetaillist.row) != 3)
  544. {
  545. grd_groupdetaillist.rowStatus(grd_groupdetaillist.row) = 0;
  546. }
  547. grd_returnlist.valueMatrix(grd_groupdetaillist.row, grd_returnlist.colRef("chk")) = grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("chk"));
  548. }
  549. else if(grd_groupdetaillist.colRef("amt") == grd_groupdetaillist.col)
  550. {
  551. var vAmt = grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("amt"));
  552. if(vAmt == 0 || vAmt == "")
  553. {
  554. grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("chk")) = "N";
  555. }
  556. else
  557. {
  558. grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("chk")) = "Y";
  559. }
  560. }
  561. ]]>
  562. </script>
  563. <script type="javascript" ev:event="onendedit">
  564. <![CDATA[
  565. if(grd_groupdetaillist.col == grd_groupdetaillist.colRef("amt"))
  566. {
  567. var sAmt = grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("amt"));
  568. if(sAmt == "" || parseFloat(sAmt) < 0)
  569. {
  570. grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("amt")) = 0;
  571. }
  572. }
  573. ]]>
  574. </script>
  575. </datagrid>
  576. <datagrid id="grd_returnlist" nodeset="/root/main/list2/returnlist" visibility="hidden" caption="C^상대처구분^상대처코드^상대처명^계좌번호^은행명^은행명1^예금주^금액^입금명^비고^기관코드" colsep="^" colwidth="20, 70, 70, 70, 150, 60, 0, 90, 80, 75, 57, 30" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:225px; top:315px; width:810px; height:115px; ">
  577. <col ref="chk"/>
  578. <col ref="acntflag"/>
  579. <col ref="acntflagcd"/>
  580. <col ref="acntflagnm"/>
  581. <col ref="rcipntacntno"/>
  582. <col ref="bankcd"/>
  583. <col ref="banknm"/>
  584. <col ref="depor"/>
  585. <col ref="amt"/>
  586. <col ref="deponm"/>
  587. <col ref="cmt"/>
  588. <col ref="instcd"/>
  589. </datagrid>
  590. <button id="button2" class="btn2_letter4" style="left:385px; top:5px; width:64px; height:19px; ">
  591. <caption>전체취소</caption>
  592. <script type="javascript" ev:event="onclick">
  593. <![CDATA[
  594. fAllCheckCancel("N");
  595. ]]>
  596. </script>
  597. </button>
  598. <button id="button3" class="btn2_letter4" style="left:319px; top:5px; width:64px; height:19px; ">
  599. <caption>전체선택</caption>
  600. <script type="javascript" ev:event="onclick">
  601. <![CDATA[
  602. fAllCheckCancel("Y");
  603. ]]>
  604. </script>
  605. </button>
  606. <datagrid id="grd_excelupload" nodeset="/root/hidden/excelupload" visibility="hidden" caption="상대처구분^상대처코드^상대처명^계좌번호^은행코드^예금주^금액^입금명^비고" colsep="^" colwidth="80, 80, 80, 80, 80, 80, 80, 80, 80" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:225px; top:200px; width:810px; height:105px; ">
  607. <col ref="acntflag"/>
  608. <col ref="acntflagcd"/>
  609. <col ref="acntflagnm"/>
  610. <col ref="rcipntacntno" style="text-align:left; padding-right:5; "/>
  611. <col ref="bankcd"/>
  612. <col ref="depor"/>
  613. <col ref="amt" format="#,###" style="text-align:right; padding-right:1; "/>
  614. <col ref="deponm" format="#,###" style="text-align:right; "/>
  615. <col ref="cmt"/>
  616. </datagrid>
  617. <button id="btn_excelupload" class="btn2_letter4" style="left:895px; top:4px; width:64px; height:19px; ">
  618. <caption>액셀입력</caption>
  619. <script type="javascript" ev:event="onclick">
  620. <![CDATA[
  621. if(grd_groupacnt.row == 0 || model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row +"]/acntsetnm") == "")
  622. {
  623. messageBox("집합계좌명을 추가하시거나 입력하세요", "I999");
  624. return;
  625. }
  626. if(fCheckStatus() == false) return;
  627. if(fInputExcel(grd_excelupload) == false)return;
  628. var grd_fixedRows = grd_excelupload.fixedRows;
  629. var grd_rows = grd_excelupload.rows;
  630. var acntflag = '';
  631. var acntflagcd = '';
  632. var acntflagnm = '';
  633. var rcipntacntno = '';
  634. var bankcd = '';
  635. var banknm = '';
  636. var depor = '';
  637. var amt = '';
  638. var vAcntflag = '';
  639. for(var i = grd_fixedRows ; i < grd_rows ; i++)
  640. {
  641. acntflag = model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflag");
  642. acntflagcd = model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflagcd");
  643. acntflagnm = model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflagnm");
  644. rcipntacntno = model.getValue(grd_excelupload.nodeset + "[" + i + "]/rcipntacntno");
  645. bankcd = model.getValue(grd_excelupload.nodeset + "[" + i + "]/bankcd");
  646. banknm = '';
  647. depor = model.getValue(grd_excelupload.nodeset + "[" + i + "]/depor");
  648. amt = model.getValue(grd_excelupload.nodeset + "[" + i + "]/amt");
  649. if(acntflag == '거래처') {vAcntflag = "1";}
  650. else if(acntflag == '교직원') {vAcntflag = "4";}
  651. else if(acntflag == '개인') {vAcntflag = "5";}
  652. else {messageBox(i + " 번째줄 상대처가 잘못되었습니다." ,""); return;}
  653. model.setValue(grd_excelupload.nodeset + "[" + i + "]/acntflag", vAcntflag);
  654. model.setValue("/root/send/data1/instcd", getUserInfo("dutplceinstcd"));
  655. model.setValue("/root/send/data1/acntflagcd", model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflagcd"));
  656. model.setValue("/root/send/data1/acntflagnm", "");
  657. model.setValue("/root/send/data1/acntflag", vAcntflag);
  658. model.setValue("/root/send/data1/getcond", "code");
  659. submit("TRRAD00110");
  660. if(model.getValue("/root/main/list/transacntinfo/acntflagnm") == "")
  661. {
  662. messageBox(i + " 번째줄 " + acntflag + "코드가 잘못되었습니다." ,""); return;
  663. }
  664. if(model.getValue(grd_excelupload.nodeset + "[" + i + "]/bankcd") != "") // 은행코드를 입력했을 시 데이터 검사
  665. {
  666. banknm = radfGetBankcd(bankcd);
  667. if(banknm != "") {model.setValue(grd_excelupload.nodeset + "[" + i + "]/bankcd", banknm);}
  668. // else {messageBox(i + " 번째줄 은행명이 잘못되었습니다." ,""); return;}
  669. }
  670. model.setValue(grd_excelupload.nodeset + "[" + i + "]/acntflagcd", model.getValue("/root/main/list/transacntinfo/acntflagcd"));
  671. model.setValue(grd_excelupload.nodeset + "[" + i + "]/acntflagnm", model.getValue("/root/main/list/transacntinfo/acntflagnm"));
  672. if(model.getValue(grd_excelupload.nodeset + "[" + i + "]/bankcd") == "") {model.setValue(grd_excelupload.nodeset + "[" + i + "]/bankcd", model.getValue("/root/main/list/transacntinfo/bankcd")); }
  673. if(model.getValue(grd_excelupload.nodeset + "[" + i + "]/rcipntacntno") == "") {model.setValue(grd_excelupload.nodeset + "[" + i + "]/rcipntacntno", model.getValue("/root/main/list/transacntinfo/rcipntacntno")); }
  674. if(model.getValue(grd_excelupload.nodeset + "[" + i + "]/depor") == "") {model.setValue(grd_excelupload.nodeset + "[" + i + "]/depor", model.getValue("/root/main/list/transacntinfo/depor")); }
  675. }
  676. var grd_rows = grd_excelupload.rows;
  677. var grd_fixedRows = grd_excelupload.fixedRows;
  678. var Instance_row = grd_groupdetaillist.rows - grd_groupdetaillist.fixedRows + 1;
  679. var status_row = grd_groupdetaillist.rows - grd_groupdetaillist.fixedRows + 1;
  680. for(var i = grd_fixedRows ; i < grd_rows ; i++)
  681. {
  682. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/chk", "N");
  683. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/acntsetnm", grd_groupacnt.valueMatrix(grd_groupacnt.row, grd_groupacnt.colRef("acntsetnm")));
  684. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/acntflag", model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflag"));
  685. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/acntflagcd", model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflagcd"));
  686. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/acntflagnm", model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflagnm"));
  687. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/rcipntacntno", model.getValue(grd_excelupload.nodeset + "[" + i + "]/rcipntacntno"));
  688. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/bankcd", model.getValue(grd_excelupload.nodeset + "[" + i + "]/bankcd"));
  689. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/depor", model.getValue(grd_excelupload.nodeset + "[" + i + "]/depor"));
  690. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/amt", model.getValue(grd_excelupload.nodeset + "[" + i + "]/amt"));
  691. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/deponm", model.getValue(grd_excelupload.nodeset + "[" + i + "]/deponm"));
  692. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/cmt", model.getValue(grd_excelupload.nodeset + "[" + i + "]/cmt"));
  693. model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/instcd", grd_groupacnt.valueMatrix(grd_groupacnt.row, grd_groupacnt.colRef("instcd")));
  694. Instance_row++;
  695. }
  696. model.refresh(); // 그리드 반영
  697. for(var i = grd_fixedRows ; i < grd_rows ; i++)
  698. {
  699. grd_groupdetaillist.rowStatus(status_row) = 3;
  700. status_row++;
  701. }
  702. ]]>
  703. </script>
  704. </button>
  705. <button id="button4" class="btn2_letter4" visibility="visible" style="left:825px; top:4px; width:64px; height:19px; text-align:left; ">
  706. <caption>엑셀양식</caption>
  707. <script type="javascript" ev:event="onclick">
  708. <![CDATA[
  709. radfSaveExcel(grd_excelupload);
  710. ]]>
  711. </script>
  712. </button>
  713. </group>
  714. <group id="group2" scroll="auto" style="left:0px; top:524px; width:1079px; height:27px; ">
  715. <button id="btn_cancel" class="btn4_letter2" visibility="hidden" style="left:1017px; top:2px; width:56px; height:22px; ">
  716. <caption>닫기</caption>
  717. <script type="javascript" ev:event="DOMActivate">
  718. <![CDATA[
  719. window.close();
  720. ]]>
  721. </script>
  722. </button>
  723. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1074px; y2:0px; "/>
  724. <button id="btn_save" class="btn4_letter2" visibility="hidden" style="left:153px; top:2px; width:56px; height:22px; ">
  725. <caption>선택</caption>
  726. <script type="javascript" ev:event="DOMActivate">
  727. <![CDATA[
  728. fSelected();
  729. ]]>
  730. </script>
  731. </button>
  732. </group>
  733. <group id="group5" scroll="auto" style="left:0px; top:12px; width:1075px; height:33px; ">
  734. <line id="line75" class="line_6" style="x1:0px; y1:25px; x2:1074px; y2:25px; "/>
  735. <button id="button1" class="btn4_letter2" style="left:1014px; top:3px; width:56px; height:22px; ">
  736. <caption>저장</caption>
  737. <script type="javascript" ev:event="DOMActivate">
  738. <![CDATA[
  739. for(var i=1; i<grd_groupdetaillist.rows; i++)
  740. {
  741. if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("acntflag")) == "")
  742. {
  743. messageBox("상대처구분은", "I003");
  744. return;
  745. }
  746. if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("acntflagcd")) == "" )
  747. {
  748. messageBox("상대처코드는", "I003");
  749. return;
  750. }
  751. if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("rcipntacntno")) == "" )
  752. {
  753. messageBox("계좌번호는", "I003");
  754. return;
  755. }
  756. if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("bankcd")) == "" )
  757. {
  758. messageBox("은행코드는", "I003");
  759. return;
  760. }
  761. if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("depor")) == "" )
  762. {
  763. messageBox("예금주는", "I003");
  764. return;
  765. }
  766. }
  767. misfSave("TXRAD00121");
  768. model.setValue("/root/send/retrparams/acntsetnm", "");
  769. btn_search.dispatch("DOMActivate");
  770. ]]>
  771. </script>
  772. </button>
  773. </group>
  774. </xhtml:body>
  775. </xhtml:html>