SPPMC02010_보호자연락처관리.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPPMC02010_보호자연락처관리.xrw
  4. * 설 명 : 보호자연락처관리
  5. * 설 계 자 :
  6. * 작 성 자 : 조중래
  7. * 작 성 일 : 2015.06.19
  8. * 수정이력 :
  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. <protinfo>
  20. <protlist/>
  21. </protinfo>
  22. <patinfo>
  23. <hngnm/>
  24. <patinfolist/>
  25. </patinfo>
  26. </main>
  27. <send>
  28. <pid/>
  29. <savedata>
  30. <protlist/>
  31. </savedata>
  32. <data9>
  33. <pid/>
  34. <srchcond/>
  35. <checkfnexam/>
  36. <autoflag/>
  37. </data9>
  38. <srchcnd>1</srchcnd>
  39. <prothngnm/>
  40. </send>
  41. <init>
  42. </init>
  43. <hidden>
  44. </hidden>
  45. </root>
  46. </instance>
  47. <script type="javascript" ev:event="xforms-ready">
  48. <![CDATA[
  49. if (isPopup()) {
  50. var sPid = opener.javascript.getParameter("SPPMC02010_PID");
  51. var sHngnm = opener.javascript.getParameter("SPPMC02010_HNGNM");
  52. if (sPid == null || sPid == "") {
  53. //alert("환자가 선택되어 있지 않습니다.");
  54. } else {
  55. model.setValue("/root/send/pid", sPid);
  56. model.setValue("/root/main/patinfo/hngnm", sHngnm);
  57. fSearch();
  58. }
  59. }
  60. model.refresh();
  61. ]]>
  62. </script>
  63. <submission id="TRPMC01404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/protinfo"/>
  64. <submission id="TXPMC01404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata/protlist" resultref="/root/main/protinfo"/>
  65. </model>
  66. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  67. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  68. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  71. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  73. <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
  74. <script type="javascript">
  75. <![CDATA[
  76. function fSearch() {
  77. var srchCnd = model.getValue("/root/send/srchcnd");
  78. var sPid = model.getValue("/root/send/pid");
  79. if (srchCnd == "1" && (sPid == null || sPid == "")) {
  80. alert("환자조회 시 환자정보는 필수입니다.");
  81. return;
  82. }
  83. // 재조회
  84. submit("TRPMC01404");
  85. if (getNodesetCount("/root/main/protinfo/protlist") < 1) {
  86. alert("검색결과가 존재하지 않습니다.");
  87. }
  88. }
  89. ]]>
  90. </script>
  91. </xhtml:head>
  92. <xhtml:body pagewidth="740" pageheight="300" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  93. <group id="group3" scroll="auto" style="left:0px; top:0px; width:710px; height:270px; ">
  94. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:707px; y2:70px; "/>
  95. <caption id="caption1" class="tit_2" style="left:5px; top:-69px; width:108px; height:84px; ">통장입금내역</caption>
  96. <datagrid id="datagrid1" nodeset="/root/main/protinfo/protlist" caption="등록번호^환자성명^관계^보호자성명^연락처^비고^pid^seqno^caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^caption11^caption12^caption13^caption14" colsep="^" colwidth="70, 70, 82, 70, 111, 266, 100, 100" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:75px; width:707px; height:190px; ">
  97. <col ref="pid" style="text-align:center; "/>
  98. <col ref="hngnm" style="text-align:center; "/>
  99. <col ref="protflag" type="combo" style="text-align:center; ">
  100. <choices>
  101. <item>
  102. <label>본인</label>
  103. <value>1</value>
  104. </item>
  105. <item>
  106. <label>배우자</label>
  107. <value>2</value>
  108. </item>
  109. <item>
  110. <label>자녀</label>
  111. <value>3</value>
  112. </item>
  113. <item>
  114. <label>부모</label>
  115. <value>4</value>
  116. </item>
  117. <item>
  118. <label>기타</label>
  119. <value>5</value>
  120. </item>
  121. </choices>
  122. </col>
  123. <col ref="name" type="input" style="text-align:center; "/>
  124. <col ref="phone" type="input" style="text-align:center; "/>
  125. <col ref="remark" type="input"/>
  126. <col ref="pid" visibility="hidden"/>
  127. <col ref="seqno" visibility="hidden"/>
  128. <script type="javascript" ev:event="ondblclick">
  129. <![CDATA[
  130. var row = datagrid1.row;
  131. if ((datagrid1.col == datagrid1.colRef("pid"))
  132. || (datagrid1.col == datagrid1.colRef("hngnm"))) {
  133. // 검색조건 재설정
  134. model.setValue("/root/send/srchcnd", "1");
  135. model.setValue("/root/send/prothngnm", "");
  136. input3.disabled=true;
  137. input1.disabled=false;
  138. model.setValue("/root/send/pid", model.getValue("/root/main/protinfo/protlist[" + row + "]/pid"));
  139. model.refresh();
  140. button6.dispatch("DOMActivate");
  141. }
  142. ]]>
  143. </script>
  144. </datagrid>
  145. <caption id="caption2" class="tit_2" style="left:5px; top:55px; width:100px; height:13px; font-family:돋움; vertical-align:middle; ">보호자 연락처</caption>
  146. <button id="button1" class="btn2_letter3" style="left:448px; top:50px; width:53px; height:19px; ">
  147. <caption>초기화</caption>
  148. <script type="javascript" ev:event="DOMActivate">
  149. <![CDATA[
  150. fSearch();
  151. ]]>
  152. </script>
  153. </button>
  154. <button id="button2" class="btn2_letter2" style="left:503px; top:50px; width:42px; height:19px; ">
  155. <caption>추가</caption>
  156. <script type="javascript" ev:event="DOMActivate">
  157. <![CDATA[
  158. var srchCnd = model.getValue("/root/send/srchcnd");
  159. var sHngnm = model.getValue("/root/main/patinfo/hngnm");
  160. if (srchCnd != "1") {
  161. alert("환자조회시에만 가능합니다.");
  162. return;
  163. } else if (srchCnd == "1" && (sHngnm == null || sHngnm == "")) {
  164. alert("환자가 조회되어있지 않습니다. \r\n환자정보 재조회하십시오.");
  165. return;
  166. }
  167. datagrid1.addRow();
  168. datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("pid")) = input1.value;
  169. ]]>
  170. </script>
  171. </button>
  172. <button id="button3" class="btn2_letter2" style="left:547px; top:50px; width:42px; height:19px; ">
  173. <caption>삭제</caption>
  174. <script type="javascript" ev:event="DOMActivate">
  175. <![CDATA[
  176. var srchCnd = model.getValue("/root/send/srchcnd");
  177. var sHngnm = model.getValue("/root/main/patinfo/hngnm");
  178. if (srchCnd != "1") {
  179. alert("환자조회시에만 가능합니다.");
  180. return;
  181. } else if (srchCnd == "1" && (sHngnm == null || sHngnm == "")) {
  182. alert("환자가 조회되어있지 않습니다. \r\n환자정보 재조회하십시오.");
  183. return;
  184. }
  185. if ( datagrid1.rowStatus(datagrid1.row) == 1 || datagrid1.rowStatus(datagrid1.row) == 3 ) {
  186. datagrid1.deleteRow();
  187. } else {
  188. datagrid1.rowStatus(datagrid1.row) = 4;
  189. }
  190. ]]>
  191. </script>
  192. </button>
  193. <button id="button4" class="btn5_letter2" style="left:591px; top:50px; width:42px; height:19px; ">
  194. <caption>저장</caption>
  195. <script type="javascript" ev:event="DOMActivate">
  196. <![CDATA[
  197. var srchCnd = model.getValue("/root/send/srchcnd");
  198. var sHngnm = model.getValue("/root/main/patinfo/hngnm");
  199. if (srchCnd != "1") {
  200. alert("환자조회시에만 가능합니다.");
  201. return;
  202. } else if (srchCnd == "1" && (sHngnm == null || sHngnm == "")) {
  203. alert("환자가 조회되어있지 않습니다. \r\n환자정보 재조회하십시오.");
  204. return;
  205. }
  206. for (var i = datagrid1.fixedRows; i < datagrid1.rows; i++) {
  207. if ( datagrid1.rowStatus(i) == 1 || datagrid1.rowStatus(i) == 2 || datagrid1.rowStatus(i) == 3 ) {
  208. if ( datagrid1.valueMatrix(i, datagrid1.colRef("protflag")) == "" || datagrid1.valueMatrix(i, datagrid1.colRef("name")) == "") {
  209. messageBox("관계, 성명은 필수입력값입니다.", "E999", "");
  210. return;
  211. }
  212. }
  213. }
  214. model.removeNodeset("/root/send/savedata/protlist");
  215. model.makeValue("/root/send/savedata/protlist", getGridUpdateData(datagrid1));
  216. submit("TXPMC01404");
  217. // 재조회
  218. submit("TRPMC01404");
  219. ]]>
  220. </script>
  221. </button>
  222. <shape id="roundrect1" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:15px; width:707px; height:30px; "/>
  223. <input id="input1" ref="/root/send/pid" navindex="1" style="left:117px; top:20px; width:66px; height:19px; padding-left:5; ">
  224. <script type="javascript" ev:event="onkeypress">
  225. <![CDATA[
  226. if (event.keyCode == "13") {
  227. setInputNodeCurText();
  228. button6.dispatch("DOMActivate");
  229. }
  230. ]]>
  231. </script>
  232. </input>
  233. <caption id="caption3" class="search_name" style="left:9px; top:20px; width:85px; height:17px; ">등록번호 :</caption>
  234. <button id="button5" class="btn1_letter2" navindex="3" style="left:640px; top:20px; width:56px; height:22px; ">
  235. <caption>조회</caption>
  236. <script type="javascript" ev:event="DOMActivate">
  237. <![CDATA[
  238. fSearch();
  239. ]]>
  240. </script>
  241. </button>
  242. <caption id="caption5" class="tit_2" style="left:5px; top:0px; width:100px; height:13px; font-family:돋움; vertical-align:middle; ">인적사항</caption>
  243. <input id="input2" ref="/root/main/patinfo/hngnm" disabled="true" navindex="5" visibility="visible" style="left:182px; top:20px; width:63px; height:19px; text-align:center; "/>
  244. <button id="button6" class="icon_search" navindex="4" style="left:97px; top:20px; width:16px; height:16px; ">
  245. <caption/>
  246. <script type="javascript" ev:event="DOMActivate">
  247. <![CDATA[
  248. var ptbs_pid = model.getValue("/root/send/pid");
  249. if (ptbs_pid == null || ptbs_pid ==" " || ptbs_pid == "") {
  250. model.resetInstanceNode("/root/send/data9");
  251. } else {
  252. model.setValue("/root/send/data9/pid", ptbs_pid);
  253. model.setValue("/root/send/data9/srchcond", "1");
  254. }
  255. model.setValue("/root/send/data9/checkfnexam", "1");
  256. model.setValue("/root/send/data9/autoflag", "Y"); //조회내역이 1건인 경우 자동 화면 닫기
  257. modal("../../../pam/commonweb/xrw/SPPMC02500", "1","150", "150", "SPPMC02500", "/root/send/data9", "/root/send");
  258. model.resetInstanceNode("/root/send/data9");
  259. if (model.getValue("/root/main/popupendflag") == "ok") {
  260. var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  261. var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  262. model.setValue("/root/send/pid", sPid);
  263. model.setValue("/root/main/patinfo/hngnm", sHngnm);
  264. fSearch();
  265. } else {
  266. return;
  267. }
  268. ]]>
  269. </script>
  270. </button>
  271. <caption id="caption4" class="search_name" style="left:260px; top:20px; width:100px; height:17px; ">조회구분 :</caption>
  272. <select1 id="radio1" ref="/root/send/srchcnd" navindex="2" appearance="full" cols="2" overflow="visible" style="left:345px; top:22px; width:100px; height:20px; border-style:none; ">
  273. <choices>
  274. <item>
  275. <label>환자</label>
  276. <value>1</value>
  277. </item>
  278. <item>
  279. <label>보호자</label>
  280. <value>2</value>
  281. </item>
  282. </choices>
  283. <script type="javascript" ev:event="xforms-value-changed">
  284. <![CDATA[
  285. var srchCnd = model.getValue("/root/send/srchcnd");
  286. if (srchCnd == "1") {
  287. model.setValue("/root/send/prothngnm", "");
  288. input3.disabled=true;
  289. input1.disabled=false;
  290. } else {
  291. model.setValue("/root/send/pid", "");
  292. model.setValue("/root/main/patinfo/hngnm", "");
  293. input3.disabled=false;
  294. input1.disabled=true;
  295. }
  296. model.refresh();
  297. ]]>
  298. </script>
  299. </select1>
  300. <caption id="caption6" class="search_name" style="left:460px; top:20px; width:100px; height:17px; ">보호자성명 :</caption>
  301. <input id="input3" ref="/root/send/prothngnm" disabled="true" navindex="6" visibility="visible" style="left:558px; top:20px; width:63px; height:19px; text-align:center; ">
  302. <script type="javascript" ev:event="onkeypress">
  303. <![CDATA[
  304. if (event.keyCode == "13") {
  305. setInputNodeCurText();
  306. button5.dispatch("DOMActivate");
  307. }
  308. ]]>
  309. </script>
  310. </input>
  311. <button id="button7" class="btn2_letter4" style="left:643px; top:50px; width:64px; height:19px; ">
  312. <caption>엑셀저장</caption>
  313. <script type="javascript" ev:event="DOMActivate">
  314. <![CDATA[
  315. if(datagrid1.rows <= 1) {
  316. messageBox("저장할 데이터가","I004");
  317. return false;
  318. }
  319. var fileName = window.fileDialog("save", ",", false, "보호자리스트", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  320. if (fileName != "")
  321. {
  322. datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", "");
  323. }
  324. ]]>
  325. </script>
  326. </button>
  327. </group>
  328. <button id="btn_cancel" class="btn4_letter2" navindex="7" style="left:652px; top:273px; width:56px; height:22px; ">
  329. <caption>닫기</caption>
  330. <script type="javascript" ev:event="DOMActivate">
  331. <![CDATA[
  332. if (checkOpener())
  333. {
  334. window.close();
  335. }
  336. ]]>
  337. </script>
  338. </button>
  339. </xhtml:body>
  340. </xhtml:html>