SMPMB00100_보험자기호관리.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  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. <Insucd>
  11. <insucdlist/>
  12. </Insucd>
  13. <desc>
  14. <insucd/>
  15. <fromdd/>
  16. <tel/>
  17. <insucdnm/>
  18. <todd/>
  19. <faxno/>
  20. <insuflag/>
  21. <zipcd1/>
  22. <zipcd2/>
  23. <zipcdseq/>
  24. <addr/>
  25. <detladdr/>
  26. <insucmno/>
  27. </desc>
  28. <result/>
  29. </main>
  30. <send>
  31. <insuflag/>
  32. <ref>1</ref>
  33. <refsub/>
  34. <fromdd/>
  35. <todd/>
  36. <updatedata>
  37. <datalist/>
  38. </updatedata>
  39. </send>
  40. <init>
  41. <P0007list>
  42. <P0007>
  43. <cdnm/>
  44. <cdid/>
  45. </P0007>
  46. </P0007list>
  47. <PK032list>
  48. <PK032>
  49. <cdnm/>
  50. <cdid/>
  51. </PK032>
  52. </PK032list>
  53. </init>
  54. <hidden/>
  55. </root>
  56. </instance>
  57. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  58. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  59. <submission id="TRPMB00100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/Insucd"/>
  60. <submission id="TXPMB00100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/Insucd"/>
  61. </model>
  62. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  63. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  64. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  65. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  66. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  67. <script type="javascript" ev:event="xforms-ready">
  68. <![CDATA[
  69. zbcfGetCodeList(new Array("P0007"), new Array("/root/init/P0007list"));
  70. pamfGetCodeList(new Array("PK032"), new Array("/root/init/PK032list"));
  71. fInitialize();
  72. ]]>
  73. </script>
  74. <script type="javascript">
  75. <![CDATA[
  76. /*
  77. * 초기화 및 날자 입력 항목에 오늘 날자 세팅
  78. */
  79. function fInitialize(){
  80. model.resetInstanceNode("/root/send");
  81. model.resetInstanceNode("/root/main/desc");
  82. //model.resetInstanceNode("/root/main/Insucd/insucdlist");
  83. model.removenode("/root/main/Insucd/insucdlist");
  84. //날자 입력 항목에 오늘 날자 세팅
  85. var curDate = getCurrentDate();
  86. // model.setValue("/root/send/fromdd" , curDate);
  87. // model.setValue("/root/send/todd" , curDate);
  88. model.setValue("/root/send/fromdd" , '19991231');
  89. model.setValue("/root/send/todd" , '99991231');
  90. // 보험자 형태와 조회조건 제일 앞에것(보험형태기본은 공단...조회조건 전체 너무 데이터 많아 막음...)
  91. // model.setValue("/root/send/insuflag" , '1');
  92. // model.setValue("/root/send/ref" , '0');
  93. model.setValue("/root/send/ref" , '1');
  94. model.refresh();
  95. }
  96. /*
  97. * 중증도내역 테이블에 한 행을 추가하고 숨긴 컬럼 값을 세팅한다.
  98. */
  99. function fAddRow(){
  100. datagrid1.addRow();
  101. }
  102. /*
  103. * 조회 조건에 맞는 input 컨트롤을 세팅해 준다.
  104. */
  105. function fChangeSearchCondition( cond){
  106. switch(cond){
  107. case '0': // 전체 모두 조회
  108. input27.visible =false;
  109. break;
  110. case '1':
  111. input27.visible =true;
  112. break;
  113. case '2':
  114. input27.visible =true;
  115. break;
  116. }
  117. }
  118. ]]>
  119. </script>
  120. </xhtml:head>
  121. <xhtml:body guideline="1,1200;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  122. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  123. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">보험자기호관리</caption>
  124. </group>
  125. <group id="group3" scroll="auto" style="left:0px; top:15px; width:1195px; height:744px; ">
  126. <line id="line2" class="line_2" style="x1:0px; y1:126px; x2:1194px; y2:126px; "/>
  127. <line id="line6" class="line_2" style="x1:0px; y1:99px; x2:1194px; y2:99px; "/>
  128. <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  129. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  130. <caption id="caption2" class="search_name" style="left:6px; top:8px; width:99px; height:17px; ">보험자형태 :</caption>
  131. <button id="btn_search" class="btn1_letter2" style="left:1128px; top:7px; width:56px; height:22px; ">
  132. <caption>조회</caption>
  133. <script type="javascript" ev:event="DOMActivate">
  134. <![CDATA[
  135. model.resetInstanceNode("/root/main/desc");
  136. // model.removeNodeset("/root/main/Insucd/Insucdlist");
  137. submit("TRPMB00100");
  138. ]]>
  139. </script>
  140. </button>
  141. <line id="line13" class="line_4" style="x1:1118px; y1:7px; x2:1118px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  142. <input id="input27" ref="/root/send/refsub" class="input_search" style="left:399px; top:8px; width:195px; height:19px; ">
  143. <script type="javascript" ev:event="onkeypress">
  144. <![CDATA[
  145. if (event.keyCode == "13"){
  146. var refsub_number = input27.currentText;
  147. model.setValue("/root/send/refsub", refsub_number);
  148. //조회 조건 2자이상 입력
  149. if(refsub_number.length < 2){
  150. messageBox("2자리 이상 데이터 입력하세요!","E999","");
  151. model.setFocus("input27");
  152. return;
  153. }
  154. button1.dispatch("DOMActivate");
  155. }
  156. ]]>
  157. </script>
  158. </input>
  159. <script type="javascript" ev:event="xforms-value-changed">
  160. <![CDATA[
  161. // var refsub_number = model.getValue("/root/send/refsub");
  162. // //조회 조건 2자이상 입력
  163. // if (refsub_number.length < 2) {
  164. // messageBox("2자리 이상 데이터 입력!","E999","");
  165. // model.setFocus("input27");
  166. // return;
  167. // }
  168. ]]>
  169. </script>
  170. <caption id="caption21" class="search_name" style="left:603px; top:8px; width:86px; height:17px; ">적용일자 :</caption>
  171. <input id="input18" ref="/root/send/todd" class="input_search" inputtype="date" style="left:803px; top:8px; width:90px; height:19px; "/>
  172. <input id="input19" ref="/root/send/fromdd" class="input_search" inputtype="date" style="left:692px; top:8px; width:90px; height:19px; "/>
  173. <select1 id="combo2" ref="/root/send/insuflag" class="combo_s_essential" appearance="minimal" style="left:108px; top:8px; width:90px; height:19px; ">
  174. <choices>
  175. <itemset nodeset="/root/init/P0007list/P0007">
  176. <label ref="cdnm"/>
  177. <value ref="cdid"/>
  178. </itemset>
  179. </choices>
  180. <script type="javascript" ev:event="xforms-value-changed">
  181. <![CDATA[
  182. model.setFocus("input27");
  183. ]]>
  184. </script>
  185. </select1>
  186. <caption id="caption16" style="left:785px; top:8px; width:15px; height:19px; font-weight:bold; text-align:center; ">~</caption>
  187. <caption id="caption17" class="search_name" style="left:207px; top:8px; width:86px; height:17px; ">조회조건 :</caption>
  188. <select1 id="combo3" ref="/root/send/ref" class="combo_s_essential" appearance="minimal" style="left:296px; top:8px; width:100px; height:19px; ">
  189. <choices>
  190. <item>
  191. <label>보험자명칭</label>
  192. <value>1</value>
  193. </item>
  194. <item>
  195. <label>보험자기호</label>
  196. <value>2</value>
  197. </item>
  198. </choices>
  199. <script type="javascript" ev:event="xforms-value-changed">
  200. <![CDATA[
  201. var cond = model.getValue("/root/send/ref");
  202. model.refresh();
  203. fChangeSearchCondition( cond );
  204. ]]>
  205. </script>
  206. </select1>
  207. </group>
  208. <caption id="caption1" class="tit_2" style="left:6px; top:55px; width:108px; height:14px; ">보험자기호내역</caption>
  209. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  210. <caption id="caption7" class="cell_1" style="left:0px; top:75px; width:80px; height:23px; vertical-align:middle; ">보험자기호</caption>
  211. <caption id="caption8" class="cell_1" style="left:175px; top:75px; width:80px; height:23px; vertical-align:middle; ">보험자기호명</caption>
  212. <caption id="caption3" class="cell_1" style="left:0px; top:101px; width:80px; height:23px; vertical-align:middle; ">시작일자</caption>
  213. <caption id="caption5" class="cell_1" style="left:175px; top:101px; width:80px; height:23px; vertical-align:middle; ">종료일자</caption>
  214. <input id="input1" ref="/root/main/desc/fromdd" class="input_default" navindex="5" inputtype="date" style="left:83px; top:104px; width:90px; height:19px; "/>
  215. <caption id="caption9" class="cell_1" style="left:350px; top:101px; width:80px; height:23px; vertical-align:middle; ">전화번호</caption>
  216. <caption id="caption10" class="cell_1" style="left:525px; top:101px; width:80px; height:23px; vertical-align:middle; ">팩스번호</caption>
  217. <caption id="caption12" class="cell_1" style="left:700px; top:101px; width:80px; height:23px; vertical-align:middle; ">우편번호</caption>
  218. <caption id="caption14" class="cell_1" style="left:700px; top:75px; width:80px; height:23px; vertical-align:middle; ">보험회사</caption>
  219. <caption id="caption15" class="cell_1" style="left:700px; top:129px; width:80px; height:23px; vertical-align:middle; ">하위주소</caption>
  220. <input id="input13" ref="/root/main/desc/detladdr" class="input_default" navindex="12" appearance="input" style="left:783px; top:131px; width:407px; height:19px; "/>
  221. <caption id="caption20" class="tit_2" style="left:6px; top:166px; width:152px; height:13px; ">보험자기호내역 리스트</caption>
  222. <line id="line8" class="line_1" style="x1:0px; y1:180px; x2:1194px; y2:180px; "/>
  223. <datagrid id="datagrid1" nodeset="/root/main/Insucd/insucdlist" caption="보험자기호^보험자명^형태^보험회사^시작일자^종료일자^전화번호^팩스번호^우편번호^우편번호^우편번호^기본주소^하위주소^최종수정일자^최종수정자^seqno" colsep="^" colwidth="70, 200, 65, 200, 80, 80, 90, 90, 35, 35, 16, 200, 200, 84, 90, 100" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:185px; width:1195px; height:550px; ">
  224. <col ref="insucd" type="input" maxlength="20"/>
  225. <col disabled="true" ref="insucdnm" type="input"/>
  226. <col disabled="true" ref="insuflag" type="combo">
  227. <choices>
  228. <itemset nodeset="/root/init/P0007list/P0007">
  229. <label ref="cdnm"/>
  230. <value ref="cdid"/>
  231. </itemset>
  232. </choices>
  233. </col>
  234. <col disabled="true" ref="insucmno" type="combo">
  235. <choices>
  236. <itemset nodeset="/root/init/PK032list/PK032">
  237. <label ref="cdnm"/>
  238. <value ref="cdid"/>
  239. </itemset>
  240. </choices>
  241. </col>
  242. <col disabled="true" ref="fromdd" format="yyyy-mm-dd"/>
  243. <col disabled="true" ref="todd" format="yyyy-mm-dd"/>
  244. <col disabled="true" ref="tel" type="input"/>
  245. <col disabled="true" ref="faxno" type="input"/>
  246. <col disabled="true" ref="zipcd1" type="input" format="999"/>
  247. <col disabled="true" ref="zipcd2" type="input" format="999"/>
  248. <col disabled="true" ref="zipcdseq" type="input" format="9"/>
  249. <col ref="addr" style="text-align:left; "/>
  250. <col disabled="true" ref="detladdr" type="input"/>
  251. <col ref="lastupdtdt" format="yyyy-mm-dd" style="text-align:center; "/>
  252. <col ref="lastupdtrid" style="left:1138px; top:23px; width:100px; height:23px; text-align:center; "/>
  253. <col ref="seqno" visibility="hidden"/>
  254. <script type="javascript" ev:event="onrowchanged">
  255. <![CDATA[
  256. var cur_row = datagrid1.row;
  257. if ( cur_row > 0 ) {
  258. model.copyNode("/root/main/desc","/root/main/Insucd/insucdlist["+cur_row+"]");
  259. model.refresh();
  260. }
  261. ]]>
  262. </script>
  263. </datagrid>
  264. <line id="line7" class="line_3" style="x1:0px; y1:154px; x2:1194px; y2:154px; "/>
  265. <input id="input20" ref="/root/main/desc/insucd" class="input_s_essential" navindex="2" maxlength="20" appearance="input" style="left:83px; top:77px; width:90px; height:19px; "/>
  266. <input id="input21" ref="/root/main/desc/insucdnm" class="input_essential" navindex="4" appearance="input" style="left:258px; top:77px; width:265px; height:19px; "/>
  267. <select1 id="combo1" ref="/root/main/desc/insucmno" class="combo_essential" navindex="4" appearance="minimal" style="left:783px; top:77px; width:407px; height:19px; ">
  268. <choices>
  269. <itemset nodeset="/root/init/PK032list/PK032">
  270. <label ref="cdnm"/>
  271. <value ref="cdid"/>
  272. </itemset>
  273. </choices>
  274. </select1>
  275. <input id="input2" ref="/root/main/desc/tel" class="input_default" navindex="7" imemode="disabled" style="left:433px; top:104px; width:90px; height:19px; ">
  276. <!--전화번호 잘못 입력시 메세지 보여줌
  277. <script type="javascript" ev:event="xforms-value-changed">
  278. <![CDATA[
  279. var pattern = /^0\d{1,2}\-\d{3,4}\-\d{4}$/ig;
  280. var inputValue = model.getValue("/root/main/desc/tel");
  281. if( pattern.exec(inputValue) == null ) {
  282. messageBox("전화번호 형식이", "E004");
  283. var ctrlID = event.target;
  284. var crtlObj = document.controls.item(ctrlID);
  285. crtlObj.value = "";
  286. model.setFocus(ctrlID);
  287. }
  288. ]]>
  289. </script> -->
  290. </input>
  291. <input id="input4" ref="/root/main/desc/todd" class="input_default" navindex="6" inputtype="date" appearance="input" style="left:258px; top:104px; width:90px; height:19px; "/>
  292. <input id="input3" ref="/root/main/desc/faxno" class="input_default" navindex="8" appearance="input" style="left:608px; top:104px; width:90px; height:19px; "/>
  293. <button id="button37" class="icon_search" style="left:875px; top:105px; width:16px; height:16px; ">
  294. <caption/>
  295. <script type="javascript" ev:event="DOMActivate">
  296. <![CDATA[
  297. zbcfOpenZipCodeList("combination", "", "/root/main/desc/zipcd1", "/root/main/desc/zipcd2", "/root/main/desc/zipcdseq", "/root/main/desc/addr")
  298. ]]>
  299. </script>
  300. </button>
  301. <input id="input31" ref="/root/main/desc/zipcd1" class="input_default" navindex="9" maxlength="3" format="999" style="left:783px; top:104px; width:30px; height:19px; "/>
  302. <input id="input29" ref="/root/main/desc/zipcd2" class="input_default" navindex="10" maxlength="3" format="999" style="left:816px; top:104px; width:30px; height:19px; "/>
  303. <input id="input5" ref="/root/main/desc/addr" class="output_fix" style="left:905px; top:104px; width:285px; height:19px; "/>
  304. <button id="button52" class="btn2_letter2" style="left:1051px; top:50px; width:42px; height:19px; ">
  305. <caption>추가</caption>
  306. <script type="javascript" ev:event="DOMActivate">
  307. <![CDATA[
  308. datagrid1.addRow();
  309. var cur_row = datagrid1.row;
  310. model.copyNode("/root/main/Insucd/insucdlist["+cur_row+"]","/root/main/desc");
  311. model.refresh();
  312. ]]>
  313. </script>
  314. </button>
  315. <button id="button53" accesskey="f1" class="btn5_letter5" style="left:1119px; top:160px; width:75px; height:19px; ">
  316. <caption>선택행삭제</caption>
  317. <script type="javascript" ev:event="DOMActivate">
  318. <![CDATA[
  319. if(messageBox("선택된 행의 보험자 기호코드를", "Q001") != 6) return;
  320. var cur_row = datagrid1.row;
  321. if( cur_row > 0 ){
  322. //디비에 저장되지 않은 데이타는 그냥 삭제한다. 1: insert , 3 : insert and update
  323. if (datagrid1.rowStatus(cur_row) == "1" || datagrid1.rowStatus(cur_row) == "3"){
  324. datagrid1.deleteRow(cur_row);
  325. return;
  326. }
  327. datagrid1.addStatus(cur_row, "delete");
  328. model.setValue("root/send/updatedata/datalist", datagrid1.getUpdateData("delete"));
  329. if(submit("TXPMB00100")){
  330. // datagrid1.deleteRow( cur_row);
  331. btn_search.dispatch("DOMActivate");
  332. }else{
  333. datagrid1.removeStatus(cur_row, "delete");
  334. }
  335. }else{
  336. messageBox("삭제할 행을 다시", "C002");
  337. datagrid1.removeStatus(cur_row, "delete");
  338. }
  339. ]]>
  340. </script>
  341. </button>
  342. <button id="button3" class="btn2_letter2" style="left:1096px; top:50px; width:42px; height:19px; ">
  343. <caption>수정</caption>
  344. <script type="javascript" ev:event="DOMActivate">
  345. <![CDATA[
  346. var cur_row = datagrid1.row;
  347. model.copyNode("/root/main/Insucd/insucdlist["+cur_row+"]","/root/main/desc");
  348. datagrid1.addStatus(cur_row,"update");
  349. model.refresh();
  350. ]]>
  351. </script>
  352. </button>
  353. <button id="button4" class="btn2_letter3" style="left:1141px; top:50px; width:53px; height:19px; ">
  354. <caption>지우기</caption>
  355. <script type="javascript" ev:event="DOMActivate">
  356. <![CDATA[
  357. model.resetInstanceNode("/root/main/desc");
  358. model.refresh();
  359. ]]>
  360. </script>
  361. </button>
  362. <input id="input6" ref="/root/main/desc/zipcdseq" navindex="11" maxlength="1" format="9" style="left:850px; top:104px; width:15px; height:19px; "/>
  363. <caption id="caption4" class="cell_1" style="left:525px; top:75px; width:80px; height:23px; vertical-align:middle; ">보험자형태</caption>
  364. <choices>
  365. <itemset nodeset="/root/init/P0007list/P0007">
  366. <label ref="cdnm"/>
  367. <value ref="cdid"/>
  368. </itemset>
  369. </choices>
  370. <select1 id="combo4" ref="/root/main/desc/insuflag" class="combo_essential" navindex="3" appearance="minimal" style="left:608px; top:77px; width:90px; height:19px; ">
  371. <choices>
  372. <itemset nodeset="/root/init/P0007list/P0007">
  373. <label ref="cdnm"/>
  374. <value ref="cdid"/>
  375. </itemset>
  376. </choices>
  377. </select1>
  378. </group>
  379. <group id="group5" style="left:0px; top:757px; width:1195px; height:27px; ">
  380. <button id="button2" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  381. <caption>초기화</caption>
  382. <script type="javascript" ev:event="DOMActivate">
  383. <![CDATA[
  384. fInitialize();
  385. ]]>
  386. </script>
  387. </button>
  388. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  389. <button id="button5" class="btn4_letter2" style="left:1068px; top:5px; width:56px; height:22px; ">
  390. <caption>저장</caption>
  391. <script type="javascript" ev:event="DOMActivate">
  392. <![CDATA[
  393. model.setValue("/root/send/updatedata/datalist",datagrid1.getupdatedata());
  394. if(submit("TXPMB00100")){
  395. // datagrid1.clearStatus();
  396. btn_search.dispatch("DOMActivate");
  397. }
  398. ]]>
  399. </script>
  400. </button>
  401. </group>
  402. </xhtml:body>
  403. </xhtml:html>