SPARH00800_병원장가족사항.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  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. <example/>
  10. <send>
  11. <search>
  12. <coophospcd/>
  13. </search>
  14. <savedata>
  15. </savedata>
  16. </send>
  17. <main>
  18. <list>
  19. <hospinfo>
  20. <coophospnm/>
  21. <dirofhospnm/>
  22. <telno/>
  23. <faxno/>
  24. <zipcd1/>
  25. <zipcd2/>
  26. <zipcdseq/>
  27. <addr/>
  28. <detladdr/>
  29. </hospinfo>
  30. <itemlist>
  31. <rrgstno1/>
  32. <rrgstno2/>
  33. <famynm/>
  34. <famyrel/>
  35. <discflag/>
  36. <orddiscyn/>
  37. <mediexamdiscyn/>
  38. <coophospcd/>
  39. <oldorddiscyn/>
  40. <oldmediexamdiscyn/>
  41. <coophospnm/>
  42. <status/>
  43. </itemlist>
  44. </list>
  45. </main>
  46. <init>
  47. <cmblist>
  48. <famyref>
  49. <P0438/>
  50. </famyref>
  51. <discflag>
  52. </discflag>
  53. </cmblist>
  54. </init>
  55. </root>
  56. </instance>
  57. <script type="javascript" ev:event="xforms-ready">
  58. <![CDATA[
  59. fInit();
  60. ]]>
  61. </script>
  62. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  63. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post"/>
  64. <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  65. <submission id="TRARH00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/list"/>
  66. <submission id="TXARH00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root"/>
  67. </model>
  68. </xhtml:head>
  69. <script src="../../../com/commonweb/js/common.js" type="javascript"/>
  70. <script src="../../../com/commonweb/js/utilHelper.js" type="javascript"/>
  71. <script src="../../../com/commonweb/js/tfHelper.js" type="javascript"/>
  72. <script src="../../../com/commonweb/js/stringHelper.js" type="javascript"/>
  73. <script src="../../../com/commonweb/js/dateHelper.js" type="javascript"/>
  74. <script src="../../../ast/soclworkweb/js/AWMCommon.js" type="javascript"/>
  75. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  76. <script type="javascript">
  77. <![CDATA[
  78. /*
  79. 1. 관계 코드 변경 : R0077 ==> P0438
  80. ==> 가족할인으로 인해 변경함
  81. */
  82. //화면 오픈시
  83. function fInit() {
  84. //grd_attntrlist.colHidden(4) = true;
  85. if (checkOpener()) {
  86. var coophospcd = opener.javascript.getParameter("coophospcd");
  87. //var scrnstatus = opener.javascript.getParameter("scrnstatus");
  88. model.resetInstanceNode("/root/send/search");
  89. model.resetInstanceNode("/root/main/list/hospinfo");
  90. model.removeNodeset("/root/main/list/itemlist");
  91. model.setValue("/root/send/search/coophospcd", coophospcd);
  92. // 공통코드 목록 가져오기
  93. zbcfGetCodeList(new Array("P0438"),
  94. new Array("/root/init/cmblist/famyref") , true);
  95. // 유형코드
  96. zbcfGetKindCodeList(
  97. new Array("A0013"), //업무규칙
  98. new Array("A0488"), //코드군
  99. new Array("/root/init/cmblist/discflag"), //노드
  100. true, //minimum : true TRZBC00105
  101. new Array(""), //sorting 항목
  102. new Array("")
  103. );
  104. // 조회
  105. fSearch();
  106. model.refresh();
  107. } else {
  108. messageBox("상위화면이 변경되어 데이터를 전달할 수 ", "I004");
  109. }
  110. }
  111. // 조회
  112. function fSearch()
  113. {
  114. // reqGetDirOfHospFamyList
  115. // getFamyList
  116. if (submit("TRARH00801", false) == true)
  117. {
  118. }
  119. else
  120. {
  121. }
  122. }
  123. // 행추가
  124. function fGrdRowAdd()
  125. {
  126. if (grd_list.rows <= 1)
  127. {
  128. grd_list.addItem();
  129. lrow = grd_list.rows -1;
  130. model.setValue("/root/main/list/itemlist[" + lrow + "]/coophospcd", model.getValue("/root/send/search/coophospcd"));
  131. model.setValue("/root/main/list/itemlist[" + lrow + "]/orddiscyn", "N");
  132. model.setValue("/root/main/list/itemlist[" + lrow + "]/mediexamdiscyn", "N");
  133. //model.setValue("/root/main/traineeinfo/familylist[" + lrow + "]/famynm", "N");
  134. grd_list.col = grd_list.colRef("rrgstno1");
  135. grd_list.editCell();
  136. model.refresh();
  137. }
  138. else
  139. {
  140. for (i = 1; i < grd_list.rows; i++)
  141. {
  142. if (grd_list.valueMatrix(i, grd_list.colRef("rrgstno1")) == "")
  143. {
  144. //fGrdSetFocus(grd_famy, i, 0);
  145. grd_list.col = grd_list.colRef("rrgstno1");
  146. grd_list.editCell();
  147. return;
  148. }
  149. if (grd_list.valueMatrix(i, grd_list.colRef("rrgstno2")) == "")
  150. {
  151. //fGrdSetFocus(grd_famy, i, 0);
  152. grd_list.col = grd_list.colRef("rrgstno2");
  153. grd_list.editCell();
  154. return;
  155. }
  156. }
  157. grd_list.addItem();
  158. lrow = grd_list.rows -1;
  159. model.setValue("/root/main/list/itemlist[" + lrow + "]/coophospcd", model.getValue("/root/send/search/coophospcd"));
  160. model.setValue("/root/main/list/itemlist[" + lrow + "]/orddiscyn", "N");
  161. model.setValue("/root/main/list/itemlist[" + lrow + "]/mediexamdiscyn", "N");
  162. //fGrdSetFocus(grd_famy, lrow, 0);
  163. grd_list.col = grd_list.colRef("rrgstno1");
  164. grd_list.editCell();
  165. model.refresh();
  166. }
  167. }
  168. // 행삭제
  169. function fGrdRowDel()
  170. {
  171. if (grd_list.rows <= 1) return;
  172. if (grd_list.row < 1) return;
  173. grd_list.addStatus(grd_list.row,"delete");
  174. //grd_list.deleteItem(grd_list.row);
  175. }
  176. //저장 버튼 클릭시
  177. function fSave()
  178. {
  179. // 가족사항 그리드에서 필요없는 Row 삭제
  180. for (i=1; i < grd_list.rows; i++)
  181. {
  182. var rrgstno1 = grd_list.valueMatrix(i, grd_list.colRef("rrgstno1"));
  183. var rrgstno2 = grd_list.valueMatrix(i, grd_list.colRef("rrgstno2"));
  184. //alert(grd_targetlist.rowStatus(i));
  185. /*
  186. if (grd_list.rowStatus(i) == "0" && grdvalue.length > 0)
  187. {
  188. grd_list.addStatus(i, "update");
  189. }
  190. */
  191. if (rrgstno1.length == 0 || rrgstno2.length== 0)
  192. {
  193. //grd_list.deleteItem(i);
  194. grd_list.addStatus(i, "delete");
  195. }
  196. else
  197. {
  198. if (grd_list.rowStatus(i) == "1" || grd_list.rowStatus(i) == "2" || grd_list.rowStatus(i) == "3")
  199. {
  200. var rrgstno = rrgstno1.concat(rrgstno2);
  201. if (isResidentNo(rrgstno) == false)
  202. {
  203. messageBox(rrgstno + "은 유효하지 않은 주민번호입니다!","E999","");
  204. //model.setFocus("ipt_rrgstno1");
  205. grd_list.row = i;
  206. grd_list.col = 1;
  207. return;
  208. }
  209. }
  210. }
  211. }
  212. //model.makeNode("/root/send/savedata");
  213. model.setValue("/root/send/savedata", grd_list.getUpdateData());
  214. // reqExeDirOfHospFamyList
  215. if (submit("TXARH00801") == true)
  216. {
  217. // 처리되었습니다
  218. messageBox("저장", "I001");
  219. grd_list.clearStatus();
  220. fSearch();
  221. }
  222. else
  223. {
  224. messageBox("저장에", "E009");
  225. }
  226. }
  227. // 그리드 클릭시 entercell
  228. function fFamyEnterCell()
  229. {
  230. if (grd_list.rowStatus(grd_list.row) == "1" || grd_list.rowStatus(grd_list.row) == "3" )
  231. {
  232. grd_list.isReadOnly(grd_list.row, grd_list.colRef("rrgstno1")) = false;
  233. grd_list.isReadOnly(grd_list.row, grd_list.colRef("rrgstno2")) = false;
  234. if (grd_list.colType(grd_list.col) == "input")
  235. grd_list.editCell();
  236. }
  237. else
  238. {
  239. grd_list.isReadOnly(grd_list.row, grd_list.colRef("rrgstno1")) = true;
  240. grd_list.isReadOnly(grd_list.row, grd_list.colRef("rrgstno2")) = true;
  241. if (grd_list.colType(grd_list.col) == "input")
  242. grd_list.editCell();
  243. }
  244. }
  245. ]]>
  246. </script>
  247. <xhtml:body pagewidth="624" pageheight="347" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  248. <group id="group3" scroll="auto" style="left:0px; top:0px; width:608px; height:345px; "/>
  249. <group id="group5" scroll="auto" style="left:0px; top:320px; width:608px; height:25px; ">
  250. <button id="bt_cncl" class="btn4_letter2" style="left:543px; top:3px; width:56px; height:22px; ">
  251. <caption>취소</caption>
  252. <script type="javascript" ev:event="DOMActivate">
  253. <![CDATA[
  254. model.close();
  255. ]]>
  256. </script>
  257. </button>
  258. <button id="btn_save" class="btn4_letter2" style="left:482px; top:3px; width:56px; height:22px; ">
  259. <caption>저장</caption>
  260. <script type="javascript" ev:event="DOMActivate">
  261. <![CDATA[
  262. fSave();
  263. model.refresh();
  264. ]]>
  265. </script>
  266. </button>
  267. </group>
  268. <group id="group2" style="left:0px; top:0px; width:608px; height:320px; ">
  269. <caption id="caption1" class="tit_2" style="left:5px; top:6px; width:147px; height:14px; ">병원기본정보</caption>
  270. <line id="line1" class="line_1" style="x1:0px; y1:21px; x2:605; y2:21px; "/>
  271. <line id="line2" class="line_2" style="x1:0px; y1:48px; x2:605px; y2:48px; "/>
  272. <line id="line6" class="line_3" style="x1:0px; y1:96px; x2:605px; y2:96px; "/>
  273. <input id="input43" ref="/root/main/list/hospinfo/zipcd1" class="input_default" disabled="true" style="left:118px; top:52px; width:43px; height:19px; "/>
  274. <caption id="caption53" class="cell_1" style="left:0px; top:50px; width:115px; height:45px; text-align:left; vertical-align:middle; ">주 소</caption>
  275. <input id="input44" ref="/root/main/list/hospinfo/addr" class="input_default" disabled="true" style="left:210px; top:52px; width:396px; height:19px; "/>
  276. <input id="input45" ref="/root/main/list/hospinfo/detladdr" class="input_default" disabled="true" style="left:118px; top:75px; width:487px; height:19px; "/>
  277. <input id="input35" ref="/root/main/list/hospinfo/coophospnm" class="input_default" disabled="true" style="left:119px; top:27px; width:215px; height:19px; "/>
  278. <input id="input36" ref="/root/main/list/hospinfo/dirofhospnm" class="input_default" disabled="true" style="left:453px; top:27px; width:152px; height:19px; "/>
  279. <caption id="caption6" class="cell_1" style="left:335px; top:25px; width:115px; height:23px; vertical-align:middle; ">병원장명</caption>
  280. <button id="button20" class="icon_search" disabled="true" visibility="hidden" style="left:211px; top:103px; width:16px; height:16px; ">
  281. <caption/>
  282. </button>
  283. <input id="input1" ref="/root/main/list/hospinfo/zipcd2" class="input_default" disabled="true" style="left:163px; top:52px; width:43px; height:19px; "/>
  284. <caption id="caption38" class="cell_1" style="left:0px; top:25px; width:115px; height:23px; vertical-align:middle; ">병원명칭</caption>
  285. <caption id="caption5" class="tit_2" style="left:5px; top:109px; width:111px; height:13px; ">가족사항</caption>
  286. <line id="line8" class="line_1" style="x1:0px; y1:124px; x2:605px; y2:124px; "/>
  287. <button id="btn_rowadd" class="btn2_letter3" _auth="X" style="left:490px; top:104px; width:53px; height:19px; ">
  288. <caption>행추가</caption>
  289. <script type="javascript" ev:event="DOMActivate">
  290. <![CDATA[
  291. fGrdRowAdd();
  292. ]]>
  293. </script>
  294. </button>
  295. <button id="btn_rowdel" class="btn2_letter3" _auth="X" style="left:546px; top:104px; width:53px; height:19px; ">
  296. <caption>행삭제</caption>
  297. <script type="javascript" ev:event="DOMActivate">
  298. <![CDATA[
  299. fGrdRowDel();
  300. ]]>
  301. </script>
  302. </button>
  303. <datagrid id="grd_list" nodeset="/root/main/list/itemlist" caption="주민번호^주민번호^성명^관계^할인구분^진료할인^검진할인^caption1" colsep="^" colwidth="70, 70, 150, 80, 80, 60, 60, 100" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="32" rowsep="|" style="left:0px; top:128px; width:605px; height:190px; ">
  304. <col class="input_essential" imemode="alpha" key="true" ref="rrgstno1" type="input" format="999999" maxlength="6" style="text-align:center; "/>
  305. <col class="input_essential" imemode="alpha" key="true" ref="rrgstno2" secretstartposition="1" type="input" format="9999999" maxlength="7" style="text-align:center; "/>
  306. <col imemode="hangul" ref="famynm" type="input" maxlength="16"/>
  307. <col imemode="hangul" ref="famyrel" type="combo">
  308. <choices>
  309. <itemset nodeset="/root/init/cmblist/famyref/P0438">
  310. <label ref="cdnm"/>
  311. <value ref="cdid"/>
  312. </itemset>
  313. </choices>
  314. </col>
  315. <col ref="discflag" type="combo">
  316. <choices>
  317. <itemset nodeset="/root/init/cmblist/discflag/A0013A0488">
  318. <label ref="cdnm"/>
  319. <value ref="cdid"/>
  320. </itemset>
  321. </choices>
  322. </col>
  323. <col ref="orddiscyn" type="combo" style="text-align:center; ">
  324. <choices>
  325. <item>
  326. <label>Y</label>
  327. <value>Y</value>
  328. </item>
  329. <item>
  330. <label>N</label>
  331. <value>N</value>
  332. </item>
  333. </choices>
  334. </col>
  335. <col ref="mediexamdiscyn" type="combo" style="text-align:center; ">
  336. <choices>
  337. <item>
  338. <label>Y</label>
  339. <value>Y</value>
  340. </item>
  341. <item>
  342. <label>N</label>
  343. <value>N</value>
  344. </item>
  345. </choices>
  346. </col>
  347. <col ref="coophospcd" visibility="hidden"/>
  348. <script type="javascript" ev:event="onentercell">
  349. <![CDATA[
  350. fFamyEnterCell();
  351. ]]>
  352. </script>
  353. </datagrid>
  354. </group>
  355. </xhtml:body>
  356. </xhtml:html>