SMAHB00600_기본코드관리.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMAHB00600.xrw
  4. * 설 명 : 종합건진 기본코드관리
  5. * 설 계 자 : 김영국
  6. * 작 성 자 : 김영국
  7. * 작 성 일 : 2007.06.11
  8. * 수정이력 : 2007.10.04 김다영 화면권한추가
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>기본코드관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <etclst>
  20. <item>
  21. <etccd/>
  22. <etcdetlcd/>
  23. <etccdkey/>
  24. <etcdetlnm/>
  25. <useyn/>
  26. </item>
  27. </etclst>
  28. <detlcodelst>
  29. <item>
  30. <etccd/>
  31. <etcdetlcd/>
  32. <etcdetlcdkey/>
  33. <etcdetlnm/>
  34. <etcitemcnts/>
  35. <etcitemcnts2/>
  36. <etcitemcnts3/>
  37. <useyn/>
  38. </item>
  39. </detlcodelst>
  40. </main>
  41. <send>
  42. <clscd/>
  43. <req>
  44. <savedata/>
  45. <clscd/>
  46. <etccd/>
  47. </req>
  48. </send>
  49. <init>
  50. <selectinput>
  51. <item>
  52. <etcdetlnm/>
  53. <etcdetlcd/>
  54. </item>
  55. </selectinput>
  56. </init>
  57. <hidden>
  58. <item/>
  59. </hidden>
  60. </root>
  61. </instance>
  62. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  63. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  64. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  65. <script type="javascript" src="../../../ast/healexamweb/js/healexam.js"/>
  66. <script type="javascript" ev:event="xforms-ready">
  67. <![CDATA[
  68. // fGetEtcList();
  69. fGetSelInputInit();
  70. var node = instance1.selectSingleNode("/root/init/selectinput/item");
  71. if( node != null ){
  72. cmb_clscd.select(0);
  73. }
  74. //화면권한추가
  75. btn_search.disabled = ! checkAuth("R");
  76. btn_clear1.disabled = ! checkAuth("X");
  77. btn_clear2.disabled = ! checkAuth("X");
  78. btn_save1.disabled = ! checkAuth("X");
  79. btn_save2.disabled = ! checkAuth("X");
  80. ]]>
  81. </script>
  82. <submission id="TRAHB00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/clscd" replace="instance" resultref="/root/main/etclst"/>
  83. <submission id="TXAHB00601" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send/req" replace="instance" resultref="root/hidden"/>
  84. <submission id="TRAHB00602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/detlcodelst"/>
  85. <submission id="TXAHB00602" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send/req" replace="instance" resultref="root/hidden"/>
  86. <submission id="TRAHB00603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/selectinput"/>
  87. <bind id="bind_etccd" ref="/root/main/etclst/item/etccd" readonly="../etccdkey!=''"/>
  88. </model>
  89. <script type="javascript">
  90. <![CDATA[
  91. /**
  92. * 셀렉트박스 초기화
  93. */
  94. function fGetSelInputInit(){
  95. var ret = submit("TRAHB00603");
  96. return ret;
  97. }
  98. /**
  99. * 분류코드 리스트 조회
  100. */
  101. function fGetEtcList(){
  102. model.removeNodeset("/root/main/etclst/item");
  103. model.removeNodeset("/root/main/detlcodelst/item");
  104. var ret = submit("TRAHB00601");
  105. return ret;
  106. }
  107. /**
  108. * 분류코드 저장
  109. */
  110. function fSaveEtc(){
  111. if( ! getGridUpdateData(grd_etclst) )
  112. {
  113. alert("저장할 내역이 없습니다.");
  114. return ;
  115. }
  116. var rsv_cnt = grd_etclst.rows ;
  117. var sNode = grd_etclst.nodeset+ "[";
  118. for( var i = 1; i < rsv_cnt ; i++){
  119. if( model.getValue(sNode + i + "]/etccd" ) == "") {
  120. alert("분류코드의 코드값이 비어있습니다.");
  121. return ;
  122. }
  123. }
  124. var ret = false;
  125. if ( messageBox("기본코드정보를","Q002")==6 ) {
  126. model.setValue("/root/send/req/savedata", grd_etclst.getUpdateData());
  127. model.setValue("/root/send/req/clscd", model.getValue("/root/send/clscd") );
  128. ret = submit("TXAHB00601");
  129. }
  130. return ret;
  131. }
  132. /**
  133. * 상세코드 리스트 조회
  134. */
  135. function fGetDetlCodeList(){
  136. var idx = grd_etclst.row;
  137. if( idx < 1) return ;
  138. model.removeNodeset("/root/main/detlcodelst/item");
  139. model.setValue("/root/send/req/clscd", model.getValue("/root/send/clscd") );
  140. model.setValue("/root/send/req/etccd", grd_etclst.valueMatrix(grd_etclst.row, 2) );
  141. var ret = submit("TRAHB00602");
  142. return ret;
  143. }
  144. /**
  145. * 상세코드 저장
  146. */
  147. function fSaveDetlCode(){
  148. if( ! getGridUpdateData(grd_detlcodelst) ){
  149. alert("저장할 내역이 없습니다.");
  150. return ;
  151. }
  152. if ( model.getValue("/root/send/req/etccd") == null || model.getValue("/root/send/req/etccd") == "" ){
  153. alert("분류코드가 선택되지 않았습니다.");
  154. return ;
  155. }
  156. var rsv_cnt = grd_detlcodelst.rows ;
  157. var sNode = grd_detlcodelst.nodeset+ "[";
  158. for( var i = 1; i < rsv_cnt ; i++){
  159. if( model.getValue(sNode + i + "]/etcdetlcd" ) == "") {
  160. alert("상세코드의 코드값이 비어있습니다.");
  161. return ;
  162. }
  163. }
  164. var ret = false;
  165. if ( messageBox("상세코드정보를","Q002")==6 ) {
  166. model.setValue("/root/send/req/savedata", grd_detlcodelst.getUpdateData());
  167. model.setValue("/root/send/req/clscd", model.getValue("/root/send/clscd") );
  168. ret = submit("TXAHB00602");
  169. }
  170. return ret;
  171. }
  172. /**
  173. * 초기화
  174. */
  175. function fEtcclear(){
  176. model.removeNodeset("/root/main/etclst/item");
  177. model.removeNodeset("/root/main/detlcodelst/item");
  178. model.refresh();
  179. }
  180. function fDeticodeclear(){
  181. model.removeNodeset("/root/main/detlcodelst/item");
  182. model.refresh();
  183. }
  184. /**
  185. * xls 파일 업로드
  186. */
  187. function fExcelUpload(grdObj){
  188. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  189. grdObj.loadExcel(fileName, 1, true);
  190. var cnt = grdObj.rows;
  191. var i = 0;
  192. for( i = 1; i < cnt +1 ; i++)
  193. {
  194. grdObj.addStatus(i, "insert");
  195. }
  196. grdObj.deleteRow(1);
  197. grdObj.refresh();
  198. }
  199. /**
  200. * etccode 설정 ( 상세코드 저장시 사용 )
  201. */
  202. function fSetEtcCode(vGrdObj){
  203. if( vGrdObj == null ) return false;
  204. var sNode = vGrdObj.nodeset+ "[";
  205. var etccd = model.getValue(sNode + vGrdObj.row + "]/etccd" ) ;
  206. model.setValue("/root/send/req/etccd", etccd );
  207. }
  208. ]]>
  209. </script>
  210. </xhtml:head>
  211. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  212. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  213. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:149px; height:14px; ">기본코드 관리</caption>
  214. </group>
  215. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  216. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:78px; height:14px; ">분류코드</caption>
  217. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:594px; y2:70px; "/>
  218. <button id="btn_grddel" class="btn2_letter3" style="left:540px; top:50px; width:53px; height:19px; ">
  219. <caption>행삭제</caption>
  220. <script type="javascript" ev:event="DOMActivate">
  221. <![CDATA[
  222. //grd_etclst.addStatus(grd_etclst.row,"delete");
  223. deleteSelectedRows(grd_etclst,true);
  224. ]]>
  225. </script>
  226. </button>
  227. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  228. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  229. <caption id="caption2" class="search_name" style="left:16px; top:9px; width:86px; height:17px; ">건진구분 :</caption>
  230. <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
  231. <select1 id="cmb_clscd" ref="/root/send/clscd" class="combo_s_essential" appearance="minimal" style="left:105px; top:8px; width:150px; height:19px; ">
  232. <choices>
  233. <itemset nodeset="/root/init/selectinput/item">
  234. <label ref="etcdetlnm"/>
  235. <value ref="etcdetlcd"/>
  236. </itemset>
  237. </choices>
  238. <script type="javascript" ev:event="xforms-select">
  239. <![CDATA[
  240. fGetEtcList();
  241. ]]>
  242. </script>
  243. </select1>
  244. <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  245. <caption>조회</caption>
  246. <script type="javascript" ev:event="DOMActivate">
  247. <![CDATA[
  248. fGetEtcList();
  249. ]]>
  250. </script>
  251. </button>
  252. </group>
  253. <caption id="caption3" class="tit_2" style="left:606px; top:55px; width:78px; height:14px; ">상세코드</caption>
  254. <line id="line2" class="line_1" style="x1:601px; y1:70px; x2:1195px; y2:70px; "/>
  255. <button id="button1" class="btn2_letter3" style="left:980px; top:50px; width:53px; height:19px; ">
  256. <caption>행삭제</caption>
  257. <script type="javascript" ev:event="DOMActivate">
  258. <![CDATA[
  259. //grd_detlcodelst.addStatus(grd_detlcodelst.row,"delete");
  260. deleteSelectedRows(grd_detlcodelst,true);
  261. ]]>
  262. </script>
  263. </button>
  264. <button id="btn_grdadd" class="btn2_letter3" style="left:925px; top:50px; width:53px; height:19px; ">
  265. <caption>행추가</caption>
  266. <script type="javascript" ev:event="DOMActivate">
  267. <![CDATA[
  268. grd_detlcodelst.addRow();
  269. grd_detlcodelst.col = 3;
  270. grd_detlcodelst.editCell();
  271. ]]>
  272. </script>
  273. </button>
  274. <datagrid id="grd_detlcodelst" nodeset="/root/main/detlcodelst/item" caption="caption1^caption2^코드^상세코드명^기타1^기타2^기타3^적용여부" colsep="^" colwidth="10, 10, 100, 215, 70, 70, 70, 102" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:601px; top:75px; width:594px; height:663px; ">
  275. <col ref="etccd" visibility="hidden"/>
  276. <col ref="etcdetlcdkey" type="output" visibility="hidden"/>
  277. <col disabled="false" imemode="alpha" ref="etcdetlcd" type="input" maxbyte="12"/>
  278. <col ref="etcdetlnm" type="input" maxlength="50"/>
  279. <col ref="etcitemcnts" type="input" maxlength="50"/>
  280. <col ref="etcitemcnts2" type="input" maxlength="50"/>
  281. <col ref="etcitemcnts3" type="input" maxlength="50"/>
  282. <col checkvalue="Y,N" ref="useyn" type="checkbox"/>
  283. <!--
  284. <script type="javascript" ev:event="onendedit">
  285. <![CDATA[
  286. if( event.keyCode == 13 ){
  287. if( grd_detlcodelst.col == 3 ){
  288. grd_detlcodelst.col = 4;
  289. grd_detlcodelst.editCell();
  290. }else if( grd_detlcodelst.col == 4){
  291. grd_detlcodelst.addRow();
  292. grd_detlcodelst.col = 3 ;
  293. grd_detlcodelst.editCell();
  294. }
  295. }
  296. ]]>
  297. </script>
  298. -->
  299. <script type="javascript" ev:event="onentercell">
  300. <![CDATA[
  301. if( grd_detlcodelst.colType(grd_detlcodelst.col) == "input" ){
  302. grd_detlcodelst.editCell();
  303. }
  304. ]]>
  305. </script>
  306. </datagrid>
  307. <button id="button2" class="btn2_letter3" style="left:484px; top:50px; width:53px; height:19px; ">
  308. <caption>행추가</caption>
  309. <script type="javascript" ev:event="DOMActivate">
  310. <![CDATA[
  311. grd_etclst.addItem();
  312. grd_etclst.col = 2;
  313. grd_etclst.editCell();
  314. ]]>
  315. </script>
  316. </button>
  317. <datagrid id="grd_etclst" nodeset="/root/main/etclst/item" caption="caption1^코드^상세코드^분류코드명^적용여부" colsep="^" colwidth="0, 100, 0, 373, 99" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:75px; width:594px; height:663px; ">
  318. <col ref="etccdkey" visibility="hidden"/>
  319. <col ref="etccd" type="input" maxlength="12"/>
  320. <col ref="etcdetlcd" visibility="hidden"/>
  321. <col ref="etcdetlnm" type="input" maxlength="50"/>
  322. <col checkvalue="Y,N" ref="useyn" type="checkbox"/>
  323. <script type="javascript" ev:event="ondblclick">
  324. <![CDATA[
  325. fGetDetlCodeList();
  326. ]]>
  327. </script>
  328. <script type="javascript" ev:event="onclick">
  329. <![CDATA[
  330. fSetEtcCode(grd_etclst);
  331. ]]>
  332. </script>
  333. </datagrid>
  334. <button id="btn_fileupload" class="btn2_letter5" style="left:1115px; top:50px; width:75px; height:19px; ">
  335. <caption>파일업로드</caption>
  336. <script type="javascript" ev:event="DOMActivate">
  337. <![CDATA[
  338. fExcelUpload(grd_detlcodelst);
  339. ]]>
  340. </script>
  341. </button>
  342. <button id="btn_seldeldetl" class="btn2_letter5" style="left:1037px; top:50px; width:75px; height:19px; ">
  343. <caption>선택행삭제</caption>
  344. <script type="javascript" ev:event="DOMActivate">
  345. <![CDATA[
  346. deleteSelectedRows(grd_detlcodelst, true);
  347. ]]>
  348. </script>
  349. </button>
  350. </group>
  351. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  352. <button id="btn_clear2" class="btn4_letter3" style="left:1067px; top:5px; width:68px; height:22px; ">
  353. <caption>초기화</caption>
  354. <script type="javascript" ev:event="DOMActivate">
  355. <![CDATA[
  356. fDeticodeclear();
  357. ]]>
  358. </script>
  359. </button>
  360. <button id="btn_save2" class="btn4_letter2" style="left:1138px; top:5px; width:56px; height:22px; ">
  361. <caption>저장</caption>
  362. <script type="javascript" ev:event="DOMActivate">
  363. <![CDATA[
  364. if( fSaveDetlCode() == true ){
  365. fGetDetlCodeList();
  366. }
  367. ]]>
  368. </script>
  369. </button>
  370. <button id="btn_save1" class="btn4_letter2" style="left:537px; top:5px; width:56px; height:22px; ">
  371. <caption>저장</caption>
  372. <script type="javascript" ev:event="DOMActivate">
  373. <![CDATA[
  374. if( fSaveEtc() == true ){
  375. fGetEtcList();
  376. }
  377. ]]>
  378. </script>
  379. </button>
  380. <button id="btn_clear1" class="btn4_letter3" style="left:466px; top:5px; width:68px; height:22px; ">
  381. <caption>초기화</caption>
  382. <script type="javascript" ev:event="DOMActivate">
  383. <![CDATA[
  384. fEtcclear();
  385. ]]>
  386. </script>
  387. </button>
  388. </group>
  389. </xhtml:body>
  390. </xhtml:html>