SMPMB02700_CD라벨출력.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMPAO01800_외래예상진료비.xrw
  4. * 설 명 : 외래예상진료비
  5. * 설 계 자 : 채희철
  6. * 작 성 자 : 이성인
  7. * 작 성 일 : 2008.10.04
  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>CD라벨출력</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <patinfo>
  20. <patinfolist>
  21. <pid/>
  22. <hngnm/>
  23. <rrgstno1/>
  24. <rrgstno2/>
  25. </patinfolist>
  26. </patinfo>
  27. <ordinfo>
  28. <printlist>
  29. <chk/>
  30. <pid/>
  31. <hngnm/>
  32. <rrgstno/>
  33. <orddeptnm/>
  34. <orddrnm/>
  35. <orddd/>
  36. <remark/>
  37. </printlist>
  38. </ordinfo>
  39. </main>
  40. <send>
  41. <fromdd/>
  42. <todd/>
  43. <pid/>
  44. <srchcond/>
  45. </send>
  46. <source>
  47. <srchcond/>
  48. <pid/>
  49. <hngnm/>
  50. <rrgstno1/>
  51. <rrgstno2/>
  52. </source>
  53. </root>
  54. </instance>
  55. <submission id="TRPMC02500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/source" resultref="/root/main/patinfo"/>
  56. <submission id="TRPMB02701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/ordinfo"/>
  57. </model>
  58. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  60. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  62. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  63. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  64. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  65. <script type="javascript" ev:event="xforms-ready">
  66. <![CDATA[
  67. //초기화
  68. fInitialize();
  69. //세션정보 추출하기
  70. fGetUserInfosSampling();
  71. model.refresh();
  72. ]]>
  73. </script>
  74. <script type="javascript">
  75. <![CDATA[
  76. //공통코드 및 원무사용 기초코드 세팅(진료과,의사,감면,미수 등)
  77. function fSetCodeList(){
  78. /*
  79. //공통코드
  80. zbcfGetCodeList( new Array("P0104","R0001","P0390","P0073","P0354"),
  81. new Array("/root/init_com/comncdlist/P0104list" //계산급여구분
  82. ,"/root/init_com/comncdlist/R0001list" //은행
  83. ,"/root/init_com/comncdlist/P0390list" //승인구분
  84. ,"/root/init_com/comncdlist/P0073list" //자격구분
  85. ,"/root/init_com/comncdlist/P0354list" //개인/법인
  86. ) );
  87. //원무사용 기초코드 조회(진료과,의사,할인,미수코드)
  88. submit("TRPAMCOM01");
  89. */
  90. }
  91. //수납내역 조회(영수내역,카드내역,현금영수증내역,통장입금내역) - (+) 선수금 수납내역
  92. function fSearch() {
  93. //조회조건 체크
  94. var vcheck_fromdd = (model.getValue("/root/send/fromdd")).getTrim();
  95. var vcheck_todd = (model.getValue("/root/send/todd")).getTrim();
  96. model.setValue("/root/send/pid" ,model.getValue( "/root/main/patinfo/patinfolist/pid"));
  97. if (vcheck_fromdd == "" || vcheck_fromdd == " " || vcheck_fromdd == "-" || vcheck_fromdd == null ) {
  98. messageBox("시작일자가 입력되지","E007");
  99. model.setFocus("ipt_fromdd");
  100. return;
  101. }
  102. if (vcheck_todd == "" || vcheck_todd == " " || vcheck_todd == "-" || vcheck_todd == null ) {
  103. messageBox("종료일자가 입력되지","E007");
  104. model.setFocus("ipt_todd");
  105. return;
  106. }
  107. submit("TRPMB02701", false);
  108. model.refresh();
  109. }
  110. function fInitialize() {
  111. var cur_date = getCurrentDate();
  112. model.setValue("root/send/fromdd", cur_date);
  113. model.setValue("root/send/todd", cur_date);
  114. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  115. model.resetInstanceNode("/root/main/ordinfo/printlist");
  116. model.resetInstanceNode("/root/source");
  117. model.setValue("/root/send/srchcond" , "outord");
  118. // model.setValue("/root/main/patinfo/patinfolist/pid" , "19002860");
  119. }
  120. //세션정보 추출하기
  121. function fGetUserInfosSampling(){
  122. var sUserInfosS = getUserInfos();
  123. sUserInfosS = sUserInfosS + "|";
  124. var UserInfosS_Array = sUserInfosS.split("|");
  125. var userid = UserInfosS_Array[0]; //사용자번호
  126. var usernm = UserInfosS_Array[1]; //사용자이름
  127. var posinstcd = UserInfosS_Array[2]; //소속기관코드
  128. var posinstnm = UserInfosS_Array[3]; //소속기관명
  129. var posdeptcd = UserInfosS_Array[4]; //소속부서코드
  130. var posdeptnm = UserInfosS_Array[5]; //소속부서명
  131. if (userid == null || userid == "" || userid == " " || userid == "-") userid = "pam";
  132. if (posinstcd == null || posinstcd == "" || posinstcd == " " || posinstcd == "-") posinstcd = "012";
  133. model.makeValue("/root/hidden/session/sess_userid",userid);
  134. model.makeValue("/root/hidden/session/sess_usernm",usernm);
  135. model.makeValue("/root/hidden/session/sess_posinstcd",posinstcd);
  136. model.makeValue("/root/hidden/session/sess_posinstnm",posinstnm);
  137. model.makeValue("/root/hidden/session/sess_posdeptcd",posdeptcd);
  138. model.makeValue("/root/hidden/session/sess_posdeptnm",posdeptnm);
  139. model.refresh();
  140. }
  141. ]]>
  142. </script>
  143. </xhtml:head>
  144. <xhtml:body guideline="2,53;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  145. <group id="group1" style="left:0px; top:0px; width:885px; height:13px; ">
  146. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">CD라벨출력</caption>
  147. </group>
  148. <group id="group3" scroll="auto" style="left:0px; top:13px; width:895px; height:532px; ">
  149. <group id="group2" style="left:0px; top:10px; width:885px; height:45px; vertical-align:top; ">
  150. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:885px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  151. <caption id="caption2" class="search_name" style="left:422px; top:11px; width:86px; height:17px; ">등록번호 :</caption>
  152. <caption id="caption21" class="search_name" style="left:16px; top:11px; width:86px; height:17px; ">조회일자 :</caption>
  153. <caption id="caption4" style="left:198px; top:12px; width:10px; height:20px; ">-</caption>
  154. <line id="line1" style="x1:785px; y1:10px; x2:785px; y2:39px; border-color:#ffe4bb; border-left-style:solid; "/>
  155. <input id="ipt_pid" ref="/root/main/patinfo/patinfolist/pid" class="input_default" style="left:511px; top:10px; width:77px; height:19px; ">
  156. <script type="javascript" ev:event="onkeypress">
  157. <![CDATA[
  158. if (event.keyCode == "8") {
  159. model.resetInstanceNode("/root/send");
  160. fInitialize();
  161. }
  162. if(event.keyCode == "13") {
  163. vcheck_pid = ipt_pid.currentText;
  164. fInitialize();
  165. //환자번호 null체크
  166. if (vcheck_pid == null || vcheck_pid == "" || vcheck_pid == " " || vcheck_pid == "-") {
  167. messageBox("환자등록번호가 입력되지","E007");
  168. return;
  169. }
  170. //환자번호 조건으로 인적정보 조회
  171. model.setValue("/root/source/srchcond", "1");
  172. model.setValue("/root/source/pid", vcheck_pid);
  173. //환자기본정보 node clear
  174. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  175. //환자등록번호 체크
  176. if(submit("TRPMC02500")){
  177. var vcheck_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  178. if (vcheck_pid == null || vcheck_pid == "" || vcheck_pid == " " || vcheck_pid == "-") {
  179. //조회내역 체크
  180. messageBox("존재하지 않는 등록번호","E008");//E008=입니다
  181. fInitialize();
  182. return;
  183. }
  184. //재원환자 체크(계산진행 못하게 할 것인지는 추후 수납확인필요)
  185. var vcheck_inhospyn = model.getValue("/root/main/patinfo/patinfolist/inhospyn");
  186. if (vcheck_inhospyn == 'Y') {
  187. messageBox("["+model.getValue("/root/main/patinfo/patinfolist/hngnm")+"] 환자는 재원 중인 환자","E008");//E008=입니다
  188. }
  189. //조회되는 항목들 clear
  190. model.resetInstanceNode("/root/main/baseinfo");
  191. fSearch();
  192. }
  193. else {
  194. messageBox("존재하지 않는 등록번호","E008");//E008=입니다
  195. fInitialize();
  196. model.setFocus("ipt_pid");
  197. model.refresh();
  198. return;
  199. }
  200. }//End if(event.keyCode == "13") {
  201. ]]>
  202. </script>
  203. </input>
  204. <button id="btn_search" class="btn1_letter2" style="left:800px; top:9px; width:56px; height:22px; ">
  205. <caption>조회</caption>
  206. <script type="javascript" ev:event="DOMActivate">
  207. <![CDATA[
  208. fSearch();
  209. ]]>
  210. </script>
  211. </button>
  212. <input id="ipt_fromdd" ref="/root/send/fromdd" class="input_s_essential" inputtype="date" style="left:105px; top:10px; width:92px; height:19px; "/>
  213. <input id="ipt_todd" ref="/root/send/todd" class="input_s_essential" inputtype="date" style="left:209px; top:10px; width:92px; height:19px; "/>
  214. <output id="opt_hngnm" ref="/root/main/patinfo/patinfolist/hngnm" class="output_fix" style="left:590px; top:10px; width:65px; height:19px; "/>
  215. <output id="opt_rrgstno1" ref="/root/main/patinfo/patinfolist/rrgstno1" class="output_fix" style="left:657px; top:10px; width:46px; height:19px; "/>
  216. <output id="opt_rrgstno2" ref="/root/main/patinfo/patinfolist/rrgstno2" class="output_fix" style="left:705px; top:10px; width:52px; height:19px; "/>
  217. <button id="btn_pid" class="icon_search" style="left:759px; top:11px; width:16px; height:16px; ">
  218. <caption/>
  219. <script type="javascript" ev:event="DOMActivate">
  220. <![CDATA[
  221. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/source", "/root/send");
  222. ]]>
  223. </script>
  224. </button>
  225. <select1 id="radio1" ref="/root/send/srchcond" overflow="visible" appearance="full" cols="2" style="left:323px; top:12px; width:90px; height:20px; border-style:none; ">
  226. <choices>
  227. <item>
  228. <label>외래</label>
  229. <value>outord</value>
  230. </item>
  231. <item>
  232. <label>입원</label>
  233. <value>inord</value>
  234. </item>
  235. </choices>
  236. </select1>
  237. </group>
  238. <datagrid id="grd_printlist" nodeset="/root/main/ordinfo/printlist" autoresize="true" caption="chk^등록번호^성명^주민등록번호^진료과^의사명^진료일시^비고^비고^진료의^진료의사^변경이력^상태" colsep="^" colwidth="26, 80, 89, 146, 170, 100, 161, 100" style="left:5px; top:55px; width:880px; height:475px; ">
  239. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  240. <col ref="pid" style="text-align:center; "/>
  241. <col ref="hngnm" type="input" style="text-align:center; "/>
  242. <col ref="rrgstno" format="999999-9999999" style="text-align:center; "/>
  243. <col ref="orddeptnm" style="text-align:center; "/>
  244. <col ref="orddrnm" style="text-align:center; "/>
  245. <col ref="orddd" format="yyyy-mm-dd hh:mm" style="text-align:center; "/>
  246. <col ref="remark"/>
  247. </datagrid>
  248. </group>
  249. <group id="group4" style="left:0px; top:545px; width:895px; height:35px; ">
  250. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:885px; y2:0px; "/>
  251. <button id="btn_clear" class="btn4_letter3" style="left:820px; top:5px; width:68px; height:22px; ">
  252. <caption>초기화</caption>
  253. <script type="javascript" ev:event="DOMActivate">
  254. <![CDATA[
  255. fInitialize();
  256. ]]>
  257. </script>
  258. </button>
  259. <button id="btn_prntset" class="btn3_letter5" style="left:85px; top:5px; width:92px; height:22px; ">
  260. <caption>프린터설정</caption>
  261. <script type="javascript" ev:event="DOMActivate">
  262. <![CDATA[
  263. var count = getNodesetCount("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  264. if(count == 0) {
  265. model.makeNode("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  266. }
  267. open("SPLLC90100_바코드프린터설정.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  268. ]]>
  269. </script>
  270. </button>
  271. <button id="button11" class="btn3_letter3" style="left:5px; top:5px; width:68px; height:22px; ">
  272. <caption>바코드</caption>
  273. <script type="javascript" ev:event="DOMActivate">
  274. <![CDATA[
  275. var cnt = getNodesetCount("/root/main/ordinfo/printlist[ chk = 'Y' ]" );
  276. if(cnt > 0 ){
  277. var sinstnm = model.getValue("/root/hidden/session/sess_posinstnm") ;
  278. for(i = 1 ; i <= grd_printlist.rows ; i++){
  279. if( model.getValue("/root/main/ordinfo/printlist [" + i + " ]/chk") == "Y"){
  280. var spid = model.getValue("/root/main/ordinfo/printlist [" + i + " ]/pid");
  281. var shngnm = model.getValue("/root/main/ordinfo/printlist [" + i + " ]/hngnm");
  282. var sorddd = model.getValue("/root/main/ordinfo/printlist [" + i + " ]/orddd");
  283. sorddd = sorddd.substr(0,4) + "/" + sorddd.substr(4,2) + "/" + sorddd.substr(6,2);
  284. //------------------------------------------- 프린터 연결 체크 ----------------------------------------------------------
  285. // 2008.07.02 모듈 로딩 체크 - 실패시 재로딩
  286. if (!body.isChild("CommAX")) {
  287. var objNm = "CommAX";
  288. body.removeChild(objNm);
  289. body.createChild("xforms:object", "id:"+objNm+"; clsid:{5fe8e390-d882-4ca4-9798-01b1eb10e0f3}; visibility:hidden; left:100px; top:100px; width:100px; height:100px; ");
  290. // lzzfMakeBrcdPrntObjHanDo("CommAX"); //lis / LZZ001.lzzfMakeBrcdPrntObjHanDo()
  291. }// if (!body.isChild("CommAX")) { end
  292. var sSndMsg = "";
  293. var portOpenTF = ""; //오픈 성공 여부
  294. //바코드 출력 시작
  295. //Port 설정
  296. // CommAX.CommPort = "3";
  297. // CommAX.CommPort = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm");
  298. // if(CommAX.CommPort == ""){CommAX.CommPort = "3"; }
  299. CommAX.CommPort = "2"; //유져 프린트포트2
  300. CommAX.Settings = "9600,n,8,1";
  301. portOpenTF = CommAX.PortOpen("true");
  302. if(portOpenTF == "TRUE") {
  303. sSndMsg = sSndMsg + "^XA^LH20,20"; // 출력시작
  304. sSndMsg = sSndMsg + "^CFE40,40^FO80,50^FD" + spid + "^FS"; // 등록번호
  305. CommAX.SendMessage(sSndMsg);
  306. sSndMsg = "";
  307. sSndMsg = sSndMsg + CommAX.PrtImgOut(70, 15, sinstnm, 1, 1); //기관명
  308. sSndMsg = sSndMsg + CommAX.HanImageData();
  309. CommAX.SendMessage(sSndMsg);
  310. sSndMsg = "";
  311. sSndMsg = sSndMsg + CommAX.PrtImgOut(90, 90, shngnm, 3, 3); // 환자명 - 가로시작위치, 세로시작위치, 출력할문자열, 1,1 (비율:X, Y)
  312. sSndMsg = sSndMsg + CommAX.HanImageData();
  313. CommAX.SendMessage(sSndMsg);
  314. sSndMsg = "";
  315. sSndMsg = sSndMsg + "^FO80,210^BC550,40,N,N,N^FD" + spid + "^FS"; // 바코드(등록번호)
  316. sSndMsg = sSndMsg + "^CFA30,30^FO80,180^FD" + sorddd + "^FS"; // 외래진료/입원 일자
  317. sSndMsg = sSndMsg + "^PQ1"; // 출력매수
  318. sSndMsg = sSndMsg + "^XZ";
  319. CommAX.SendMessage(sSndMsg);
  320. CommAX.PortOpen("false");
  321. } else {
  322. messageBox("아래 사항을 확인후 재출력해주십시오."
  323. + " \n 1.프린트설정 화면에서 통신유형을 com 으로 선택한 경우 port 번호 확인"
  324. + " \n 2.케이블 확인"
  325. + " \n 3.먼저 출력중인 바코드 확인(모두 출력된 후 재출력하십시오.)", "I", "");
  326. return;
  327. }
  328. }
  329. }//for end
  330. }//if end
  331. ]]>
  332. </script>
  333. </button>
  334. </group>
  335. </xhtml:body>
  336. </xhtml:html>