바코드테스트.xrw 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : 바코드테스트.xrw
  4. * 설 명 :
  5. * 설 계 자 : (주)에이씨케이 - Jin Hwa Ji
  6. * 작 성 자 : (주)에이씨케이 - Jin Hwa Ji
  7. * 작 성 일 : 2007.05.08
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>Untitle</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. </main>
  20. <send>
  21. </send>
  22. <init>
  23. </init>
  24. <hidden>
  25. <Message/>
  26. <barprntinfo>
  27. <!--<comport>4</comport>지과장님자리-->
  28. <comport/>
  29. <!--정은자리-->
  30. <setting>9600,n,8,1</setting>
  31. <ip/>
  32. </barprntinfo>
  33. <b472>
  34. <sendmsg/>
  35. <btest>
  36. <start>{C|}{D0950,0900,0900|}{AX;-000,-000,+00|}</start>
  37. <engA>
  38. <x>0</x>
  39. <y>0</y>
  40. <text/>
  41. <result/>
  42. <w>20</w>
  43. <h>20</h>
  44. </engA>
  45. <engG>
  46. <x>0</x>
  47. <y>0</y>
  48. <text/>
  49. <result/>
  50. </engG>
  51. <han>
  52. <x>0</x>
  53. <y>0</y>
  54. <text/>
  55. <result/>
  56. </han>
  57. <end>{XS;I,1,0002C5101|}</end>
  58. </btest>
  59. <xxxx>
  60. <!--
  61. <barcodeinfo>
  62. <blodno>8110000001</blodno>
  63. <tnsrpid>11409703</tnsrpid>
  64. <tnsrnm>표호영</tnsrnm>
  65. <tnssexage>M / 62</tnssexage>
  66. <tnsrbtype>AB+</tnsrbtype>
  67. <dnornm>표호영</dnornm>
  68. <dnsexage>M / 62</dnsexage>
  69. <dnbtype>AB+</dnbtype>
  70. <panjung/>
  71. <bcolldt>20100302170159</bcolldt>
  72. <prtdd>20100210</prtdd>
  73. <prttm>170220</prttm>
  74. <abocd>8400</abocd>
  75. <blodbarcd>A0001</blodbarcd>
  76. <blodbarnm>Autologous Blood Transfusion</blodbarnm>
  77. <validt>20100405170159</validt>
  78. <blodvol>123</blodvol>
  79. <bcolldd>20100317</bcolldd>
  80. <title>자가 1차</title>
  81. <wardroom> </wardroom>
  82. <bcollnm>LIS사용자</bcollnm>
  83. </barcodeinfo>
  84. -->
  85. </xxxx>
  86. </b472>
  87. </hidden>
  88. </root>
  89. </instance>
  90. </model>
  91. <script type="javascript" src="../../../lis/commonweb/js/LLZ001.js"/>
  92. <script type="javascript" src="../../../lis/commonweb/js/LZZ001.js"/>
  93. <!-- <script type="javascript" src="../../../lis/commonweb/js/LZZ002.js"/>-->
  94. <script type="javascript" src="../../../lis/commonweb/js/LPZ001.js"/>
  95. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  96. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  97. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  98. <script type="javascript" src="../../../lis/commonweb/js/HanFont24.js"/>
  99. <script type="javascript" src="../../../lis/commonweb/js/HanFont32.js"/>
  100. <script type="javascript" src="../../../lis/commonweb/js/HanFont48.js"/>
  101. <script type="javascript" ev:event="xforms-ready">
  102. <![CDATA[
  103. // 바코드OCX 생성
  104. //lzzfMakeBrcdPrntObjHanDo("CommAX");
  105. body.createChild("xforms:object", "id:"+"CommAX"+"; clsid:{5fe8e390-d882-4ca4-9798-01b1eb10e0f3}; visibility:hidden; left:100px; top:100px; width:100px; height:100px; ");
  106. ]]>
  107. </script>
  108. </xhtml:head>
  109. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  110. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; "/>
  111. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  112. <!--<object id="CommAX" visibility="hidden" clsid="{dc53f18a-7b68-4ca7-9c9d-b3f20e327186}" style="left:20px; top:160px; width:45px; height:45px; "/>-->
  113. <!--<object id="CommAX" visibility="hidden" clsid="{35cc9cfa-e6f8-4b22-b6d2-fe7cd108f943}" style="left:0px; top:0px; width:45px; height:45px; "/>-->
  114. <!--<object id="CommAX" clsid="{AD952C59-FBD8-4EB9-8960-7CE23A898328}" style="left:15px; top:15px; width:45px; height:45px; "/>-->
  115. <caption id="caption2" class="tit_2" style="left:5px; top:60px; width:145px; height:13px; background-image:../../../com/commonweb/images/tit_bullet2.gif; ">전송결과</caption>
  116. <output id="output1" ref="/root/hidden/Message" style="left:20px; top:81px; width:335px; height:19px; "/>
  117. <button id="button2" class="btn4_letter5" disable.background-image="../../../com/commonweb/images/dis_btn4_letter5.gif" style="left:1095px; top:85px; width:92px; height:22px; background-image:../../../com/commonweb/images/btn4_letter5.gif; ">
  118. <caption>바코드출력</caption>
  119. <script type="javascript" ev:event="DOMActivate">
  120. <![CDATA[
  121. var oZBPrint = new Object("ZBPrint");
  122. var ID = "";
  123. ID=ZBPrint.ZPL_CommPortSetting(1,9600,8,"N",1);
  124. ID=ZBPrint.ZPL_Print( "COM1","^XA^FO181,80^BY2,3.0^BCN,172,Y,N,N^FR^FD0000000011123456^FS^FO51,416^A0N,20,20^FDDEST :^FS^FO258,408^A0N,30,30^FD(001)^FS^FO51,509^A0N,20,20^FDV_Code:^FS^FO258,498^A0N,30,30^FD101040^FS^FO51,599^A0N,20,20^FDV_Name:^FS^FO258,589^A0N,30,30^FDCOTTONCLUB^FS^FO51,690^A0N,20,20^FDDATE :^FS^FO258,682^A0N,30,30^FD04-07-01^FS^FO605,549^^A0N,50,50^FDASN SREIAL^FS^FO1,358^GB779,0,4^FS^FO558,360^GB0,422,4^FS^FO1,1^GB779,781,4^FS^PQ1^XZ");
  125. ]]>
  126. </script>
  127. </button>
  128. <caption id="caption1" class="tit_2" style="left:5px; top:5px; width:145px; height:14px; background-image:../../../com/commonweb/images/tit_bullet2.gif; ">기본설정</caption>
  129. <select1 id="combo1" ref="/root/hidden/barprntinfo/comport" appearance="minimal" style="left:25px; top:25px; width:110px; height:19px; ">
  130. <choices>
  131. <item>
  132. <label>COM1</label>
  133. <value>1</value>
  134. </item>
  135. <item>
  136. <label>COM2</label>
  137. <value>2</value>
  138. </item>
  139. <item>
  140. <label>COM3</label>
  141. <value>3</value>
  142. </item>
  143. <item>
  144. <label>COM4</label>
  145. <value>4</value>
  146. </item>
  147. <item>
  148. <label>COM7</label>
  149. <value>7</value>
  150. </item>
  151. </choices>
  152. </select1>
  153. <input id="input1" ref="/root/hidden/barprntinfo/setting" style="left:140px; top:25px; width:75px; height:19px; "/>
  154. <line id="line7" class="line_1" style="x1:0px; y1:20px; x2:1194px; y2:20px; "/>
  155. <line id="line1" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:75px; "/>
  156. <button id="button1" class="btn4_letter8" disable.background-image="../../../com/commonweb/images/dis_btn4_letter5.gif" style="left:20px; top:110px; width:128px; height:22px; background-image:../../../com/commonweb/images/btn4_letter5.gif; ">
  157. <caption>바코드출력(COM)</caption>
  158. <script type="javascript" ev:event="DOMActivate">
  159. <![CDATA[
  160. var sSndMsg = "";
  161. var sBcNo = "200611140";
  162. alert(model.getValue("/root/hidden/barprntinfo/comport"));
  163. alert(model.getValue("/root/hidden/barprntinfo/setting"));
  164. // Comm 설정
  165. CommAX.CommPort = model.getValue("/root/hidden/barprntinfo/comport"); // 출력 Port
  166. CommAX.Settings = model.getValue("/root/hidden/barprntinfo/setting"); // Comm 설정
  167. CommAX.PortOpen("true");
  168. sSndMsg = "N";
  169. CommAX.SendMessage(sSndMsg);
  170. sSndMsg = "JF";
  171. CommAX.SendMessage(sSndMsg);
  172. sSndMsg = "D9";
  173. CommAX.SendMessage(sSndMsg);
  174. sSndMsg = "S2";
  175. CommAX.SendMessage(sSndMsg);
  176. sSndMsg = "Q223,27";
  177. CommAX.SendMessage(sSndMsg);
  178. sSndMsg = "q456";
  179. CommAX.SendMessage(sSndMsg);
  180. sSndMsg = "ZB";
  181. CommAX.SendMessage(sSndMsg);
  182. sSndMsg = "A0,0,0,9,1,1,N," + "\"" + "시행부서" + "\"";
  183. CommAX.SendMessage(sSndMsg);
  184. sSndMsg = "P1";
  185. CommAX.SendMessage(sSndMsg);
  186. ]]>
  187. </script>
  188. </button>
  189. <button id="button4" class="btn4_letter8" disable.background-image="../../../com/commonweb/images/dis_btn4_letter5.gif" style="left:290px; top:110px; width:128px; height:22px; background-image:../../../com/commonweb/images/btn4_letter5.gif; ">
  190. <caption>바코드출력2(COM)</caption>
  191. <script type="javascript" ev:event="DOMActivate">
  192. <![CDATA[
  193. var iXPos = 20;
  194. var iYPos = 20;
  195. var sSndMsg = "";
  196. var sBcNo = "200611140";
  197. var bcno = "I23VT0061";
  198. var pid = '21313514';
  199. var sexage = 'F/38';
  200. var deptcd = 'MG/16-112';
  201. var spcnm = 'Serum';
  202. var tube = 'SST 8ml';
  203. var sectcd = 'A1';
  204. var sectnm = '자동화';
  205. var patnm = '지명희';
  206. // Comm 설정
  207. CommAX.CommPort = model.getValue("/root/hidden/barprntinfo/comport"); // 출력 Port
  208. CommAX.Settings = model.getValue("/root/hidden/barprntinfo/setting"); // Comm 설정
  209. portOpenTF = CommAX.PortOpen("true");
  210. // 라벨사이즈
  211. //sSndMsg += lzzfBP_B47_LabelSize("0350", "0550", "0330");
  212. sSndMsg += "{D0350,0550,0330|}";
  213. //sSndMsg += "{T20C30|}"
  214. // 온도
  215. //sSndMsg += "{AY;+4,0|}"
  216. // 버퍼클리어
  217. sSndMsg += "{C|}";
  218. // 피트량
  219. sSndMsg += "{AX;+000,+000,+00|}";
  220. /*
  221. 100, 40, Data, 30, 30
  222. Form1.MSComm1.object.Output = "{PV" & Right("00" + Trim(Str(cCount)), 2) & ";" & Right("0000" + Trim(Str(xPos)), 4) & "," & Right("0000" + Trim(Str(ypos)), 4) & "," & Right("0000" + Trim(Str(ysiz)), 4) & "," & Right("0000" + Trim(Str(xsiz)), 4) & ",A,+000,00,B|}"
  223. Form1.MSComm1.object.Output = "{RV" & Right("00" + Trim(Str(cCount)), 2) & ";" & PrnStr & "|}"
  224. */
  225. //iXPos = iXPos + 120;
  226. //alert("iXPos " + iXPos + " pad= "+ getLeftPad(4, iXPos));
  227. //var pad = xpos.toString().getLeftPad(4, "0");
  228. // *바코드번호*
  229. sSndMsg += "{PV" + "01" + ";" + "0120" + "," + "0020" + "," + "0020" + "," + "0020" + ",B,+000,00,B|}" ;
  230. sSndMsg += "{RV" + "01" + ";*"+ bcno +"*|}";
  231. // 채혈일시
  232. sSndMsg += "{PV" + "02" + ";" + "0310" + "," + "0020" + "," + "0020" + "," + "0020" + ",B,+000,00,B|}" ;
  233. sSndMsg += "{RV" + "02" + ";"+ "01/06 15:55" +"|}";
  234. // code39 바코드
  235. //sSndMsg += "{XB01;0030,0040,3,1,02,02,06,06,02,0,0100,+0000000001,1,00|}"
  236. sSndMsg += "{XB01;0030,0030,3,1,02,02,04,04,02,0,0120,+0000000001,0,00|}"
  237. sSndMsg += "{RB01;"+bcno+"|}"
  238. // 환자번호
  239. sSndMsg += "{PV" + "03" + ";" + "0140" + "," + "0175" + "," + "0020" + "," + "0020" + ",B,+000,00,B|}" ;
  240. sSndMsg += "{RV" + "03" + ";"+ pid +"|}";
  241. // sexage
  242. sSndMsg += "{PV" + "04" + ";" + "0340" + "," + "0175" + "," + "0020" + "," + "0020" + ",B,+000,00,B|}" ;
  243. sSndMsg += "{RV" + "04" + ";"+ sexage +"|}";
  244. // 진료과 병동병실
  245. sSndMsg += "{PV" + "05" + ";" + "0000" + "," + "0210" + "," + "0020" + "," + "0020" + ",B,+000,00,B|}" ;
  246. sSndMsg += "{RV" + "05" + ";"+ deptcd +"|}";
  247. //검체명
  248. sSndMsg += "{PV" + "06" + ";" + "0180" + "," + "0210" + "," + "0020" + "," + "0020" + ",B,+000,00,B|}" ;
  249. sSndMsg += "{RV" + "06" + ";"+ spcnm +"|}";
  250. //용기명
  251. sSndMsg += "{PV" + "07" + ";" + "0320" + "," + "0210" + "," + "0020" + "," + "0020" + ",B,+000,00,B|}" ;
  252. sSndMsg += "{RV" + "07" + ";"+ tube +"|}";
  253. //시행부서 영문
  254. sSndMsg += "{PV" + "08" + ";" + "0000" + "," + "0240" + "," + "0020" + "," + "0020" + ",B,+000,00,B|}" ;
  255. sSndMsg += "{RV" + "08" + ";"+ sectcd +"|}";
  256. // 시행부서 한글 찍어야됨
  257. sSndMsg += "{PV" + "09" + ";" + "0000" + "," + "0020" + "," + "0020" + "," + "0020" + ",B,+000,00,W|}" ;
  258. sSndMsg += "{RV" + "09" + ";"+ "start" +"|}";
  259. // 환자명 한글 찍어야됨
  260. sSndMsg += "{PV" + "09" + ";" + "0000" + "," + "0175" + "," + "0020" + "," + "0020" + ",B,+000,00,W|}" ;
  261. sSndMsg += "{RV" + "09" + ";"+ "patnm" +"|}";
  262. // 한글 테스트
  263. sSndMsg += "{PC001;0000,0280,1,1,B,00,B,+0000000001|}"
  264. sSndMsg += "{RC001;"+ patnm +"|}"
  265. sSndMsg += "{LC;0000,0299,0430,0300,1,9|}";
  266. //sSndMsg += "{LF;|}";
  267. // 한글테스트 2
  268. //sSndMsg += "{SG001;0000,0280,1,1,B,00,B,+0000000001|}"
  269. //sSndMsg += "{PV" + "01" + ";" + "0100" + "," + "0040" + "," + "0020" + "," + "0020" + ",A,+000,00,B|}" ;
  270. //sSndMsg += "{RV" + "01" + ";BC001|}";
  271. //sSndMsg += "{PV" + "02" + ";" + "0100" + "," + "0090" + "," + "0020" + "," + "0020" + ",A,+000,00,W|}" ;
  272. //sSndMsg += "{RV" + "02" + ";BC002|}";
  273. //sSndMsg += "{PC001;0010,0010,1,1,A,00,B,+0000000001|}"
  274. //sSndMsg += "{XB01;0010,0120,3,1,02,02,04,04,02,0,0100,+0000000001,1,00|}"
  275. //sSndMsg += sPV;
  276. //sSndMsg += "{RC001;A0001|}"
  277. sSndMsg += "{XS;I,0001,0002C5101|}";
  278. //alert(sSndMsg);
  279. // 전송
  280. CommAX.SendMessage(sSndMsg);
  281. // Close COM Port
  282. CommAX.PortOpen("false");
  283. ]]>
  284. </script>
  285. </button>
  286. <button id="button6" class="btn4_letter8" disable.background-image="../../../com/commonweb/images/dis_btn4_letter5.gif" style="left:290px; top:145px; width:128px; height:22px; background-image:../../../com/commonweb/images/btn4_letter5.gif; ">
  287. <caption>바코드출력3(COM)</caption>
  288. <script type="javascript" ev:event="DOMActivate">
  289. <![CDATA[
  290. var iXPos = 20;
  291. var iYPos = 20;
  292. var sSndMsg = "";
  293. var sBcNo = "200611140";
  294. var bcno = "I23VT0061";
  295. var pid = '21313514';
  296. var sexage = 'F/38';
  297. var deptcd = 'MG/16-112';
  298. var spcnm = 'Serum';
  299. var tube = 'SST 8ml';
  300. var sectcd = 'A1';
  301. var sectnm = '자동화';
  302. var patnm = '지명희';
  303. // Comm 설정
  304. CommAX.CommPort = model.getValue("/root/hidden/barprntinfo/comport"); // 출력 Port
  305. CommAX.Settings = model.getValue("/root/hidden/barprntinfo/setting"); // Comm 설정
  306. portOpenTF = CommAX.PortOpen("true");
  307. // 라벨사이즈
  308. //sSndMsg += lzzfBP_B47_LabelSize("0350", "0550", "0330");
  309. sSndMsg += "{D0350,0550,0330|}";
  310. //sSndMsg += "{T20C30|}"
  311. // 온도
  312. //sSndMsg += "{AY;+4,0|}"
  313. // 버퍼클리어
  314. sSndMsg += "{C|}";
  315. // 피트량
  316. sSndMsg += "{AX;+000,+000,+00|}";
  317. //sSndMsg += lzzfBP_HanDisp24("가황1AaQ0&최", 10, 20);
  318. //sSndMsg += "{RB01;"+bcno+"|}"
  319. //sSndMsg += "{XB01;"+ "0020" + "," + "0020" +",3,1,02,02,"+"05"+","+"04"+",02,0,"+ "0120" +",+0000000000,0,00|}{RB01;" + "*111111111*" +"|}";
  320. sSndMsg += "{XB01;0110,0050,3,1,02,02,04,04,02,0,0120,+0000000000,0,00|}"
  321. sSndMsg += "{RB01;"+"*XXXXXX*"+"|}"
  322. sSndMsg += "{PC" + "001" + ";" + "0150" + "," + "0200" + ",1,1,G,-02,00,"+ "B" +"|}{RC" + "01" + ";"+ "* XXXXXX *" +"|}" ;
  323. sSndMsg += "{XS;I,0001,0002C5101|}";
  324. //alert(sSndMsg);
  325. // 전송
  326. CommAX.SendMessage(sSndMsg);
  327. // Close COM Port
  328. CommAX.PortOpen("false");
  329. ]]>
  330. </script>
  331. </button>
  332. <button id="button7" class="btn4_letter8" disable.background-image="../../../com/commonweb/images/dis_btn4_letter5.gif" style="left:440px; top:110px; width:128px; height:22px; background-image:../../../com/commonweb/images/btn4_letter5.gif; ">
  333. <caption>바코드출력4(COM)</caption>
  334. <script type="javascript" ev:event="DOMActivate">
  335. <![CDATA[
  336. // 병리 바코드
  337. //var iXPos = 20;
  338. //var iYPos = 20;
  339. var sSndMsg = "";
  340. var sBcNo = "200611140";
  341. var bcno = "I23VT0061";
  342. var pid = '21313514';
  343. var sexage = 'F/38';
  344. var deptcd = 'MG/16-112';
  345. var spcnm = 'Serum';
  346. var tube = 'SST 8ml';
  347. var sectcd = 'A1';
  348. var sectnm = '자동화';
  349. var patnm = '지명희';
  350. var iLeft = 0;
  351. var iTop = 0;
  352. var iXPos = 0;
  353. var iYPos = 0;
  354. var iWidth = 0;
  355. var sBarCdNoH = "20XT40002";
  356. var iPrntCnt = "1";
  357. // Comm 설정
  358. CommAX.CommPort = model.getValue("/root/hidden/barprntinfo/comport"); // 출력 Port
  359. CommAX.Settings = model.getValue("/root/hidden/barprntinfo/setting"); // Comm 설정
  360. portOpenTF = CommAX.PortOpen("true");
  361. // 라벨사이즈
  362. //sSndMsg += lzzfBP_B47_LabelSize("0350", "0550", "0330");
  363. sSndMsg += "{D0350,0550,0330|}";
  364. //sSndMsg += "{T20C30|}"
  365. // 온도
  366. //sSndMsg += "{AY;+4,0|}"
  367. // 버퍼클리어
  368. sSndMsg += "{C|}";
  369. // 피트량
  370. sSndMsg += "{AX;+000,+000,+00|}";
  371. // 내용
  372. sSndMsg += "{PC" + "01" + ";" + "0120" + "," + "0020" + "," + "0020" + "," + "0020" + ",B,+000,00,B|}" ;
  373. sSndMsg += "{RC" + "01" + ";*"+ bcno +"*|}";
  374. /*
  375. iXPos = Number(iLeft)+20 ;
  376. iYPos = Number(iTop)+20;
  377. sSndMsg += lzzfBP_HanDisp24(sectnm, iXPos, iYPos);
  378. iXPos = Number(iLeft)+20 ;
  379. iYPos = Number(iTop) + 100;
  380. sSndMsg += lzzfBP_HanDisp32(sectnm, iXPos, iYPos);
  381. iXPos = Number(iLeft)+20 ;
  382. iYPos = Number(iTop) + 200;
  383. sSndMsg += lzzfBP_HanDisp48(sectnm, iXPos, iYPos);
  384. */
  385. /*
  386. iXPos = Number(iLeft) + 20;
  387. iYPos = Number(iTop) + 5;
  388. var newbcno = sBarCdNoH + (iPrntCnt).toString().getLeftPad(2, "0");
  389. sSndMsg += lzzfBP_BarCode_Code39_B472(iXPos, iYPos, 4, 4, newbcno); // 바코드
  390. iXPos = Number(iLeft) + 140;
  391. iYPos = Number(iTop) + 150;
  392. sSndMsg += lzzfBP_FieldDataA_B472(iXPos, iYPos, 20, 20, newbcno); //바코드번호
  393. iXPos = Number(iLeft);
  394. iYPos = Number(iTop) + 175;
  395. sSndMsg += lzzfBP_FieldDataA_B472(iXPos, iYPos, 20, 20, "PATHOLOGY");
  396. iXPos = Number(iLeft) + 170;
  397. iYPos = Number(iTop) + 175;
  398. sTempStr = deptcd;
  399. sSndMsg += lzzfBP_FieldDataA_B472(iXPos, iYPos, 20, 20, deptcd);
  400. //sSndMsg += lzzfBP_HanDisp24(sTempStr, iXPos, iYPos);
  401. iXPos = Number(iLeft) + 330;
  402. iYPos = Number(iTop) + 175;
  403. sSndMsg += lzzfBP_FieldDataA_B472(iXPos, iYPos, 20, 20, "2010-01-07");
  404. iXPos = Number(iLeft) + 300;
  405. iYPos = Number(iTop) + 175;
  406. sSndMsg += lzzfBP_FieldDataA_B472(iXPos, iYPos, 20, 20, "");
  407. iXPos = Number(iLeft);
  408. iYPos = Number(iTop) + 210;
  409. sSndMsg += lzzfBP_FieldDataA_B472(iXPos, iYPos, 20, 20, pid);
  410. iXPos = Number(iLeft) + 150;
  411. iYPos = Number(iTop) + 190;
  412. sSndMsg += lzzfBP_HanDisp24(patnm, iXPos, iYPos);
  413. iXPos = Number(iLeft) + 310;
  414. iYPos = Number(iTop) + 210;
  415. sSndMsg += lzzfBP_FieldDataA_B472(iXPos, iYPos, 20, 20, "F" + "/" + "33");
  416. iXPos = Number(iLeft) + 400;
  417. iYPos = Number(iTop) + 210;
  418. //수술실이 있을 경우 진료과 옆에 수술방 이름을 표시하여 준다.
  419. sSndMsg += lzzfBP_FieldDataA_B472(iXPos, iYPos, 20, 20, "GS");
  420. iXPos = Number(iLeft);
  421. iYPos = Number(iTop) + 220;
  422. sTempStr = "1/1 Other";
  423. sSndMsg += lzzfBP_HanDisp24(sTempStr, iXPos, iYPos);
  424. */
  425. sSndMsg += "{XS;I,0001,0002C5101|}";
  426. alert(sSndMsg);
  427. // 전송
  428. CommAX.SendMessage(sSndMsg);
  429. // Close COM Port
  430. CommAX.PortOpen("false");
  431. ]]>
  432. </script>
  433. </button>
  434. <button id="button8" class="btn4_letter10" disable.background-image="../../../com/commonweb/images/dis_btn4_letter5.gif" style="left:20px; top:185px; width:158px; height:22px; background-image:../../../com/commonweb/images/btn4_letter5.gif; ">
  435. <caption>zebra 혈액 XX바코드</caption>
  436. <script type="javascript" ev:event="DOMActivate">
  437. <![CDATA[
  438. CommAX.PortOpen("true");
  439. var sSndMsg = "";
  440. var sBcNo = "XXXXXX";
  441. // Comm 설정
  442. CommAX.CommPort = model.getValue("/root/hidden/barprntinfo/comport"); // 출력 Port
  443. CommAX.Settings = model.getValue("/root/hidden/barprntinfo/setting"); // Comm 설정
  444. //시작(X, Y)
  445. sSndMsg += lzzfBP_StartFormat(0, 20);
  446. //sSndMsg += CommAX.PrtImgOut(60, 80, "혈액은행 enter 바코드", 1, 1);
  447. //sSndMsg += CommAX.HanImageData();
  448. //바코드
  449. sSndMsg += lzzfBP_ChangeFont("F", 10, 10);
  450. sSndMsg += lzzfBP_BarCode_Code39(60, 50, "N", 80, sBcNo);
  451. //실제바코드내용
  452. sSndMsg += lzzfBP_ChangeFont("C", 10, 10);
  453. sSndMsg += lzzfBP_FieldDataA(110, 140, "* " + sBcNo + " *");
  454. //실제바코드내용(반전)
  455. //sSndMsg += lzzfBP_GraphicBox(95, 155, 150, 20, 10);
  456. //sSndMsg += lzzfBP_ChangeFont("C", 10, 10);
  457. //sSndMsg += lzzfBP_FieldDataA(100, 160, "*" + sBcNo + "*", "Y");
  458. //환자명
  459. // sSndMsg += lzzfBP_ChangeFont("A", 10, 10);
  460. // sSndMsg += CommAX.PrtImgOut("GRAPH003", "테스트1");
  461. // sSndMsg += lzzfBP_FiendOrigin(0, 160)
  462. // sSndMsg += "^XGGRAPH003,1,1^FS";
  463. //sSngMsg += lzzfBP_FieldDataH(0, 160, "GRAPH003", "테스트1");
  464. //실제바코드내용(반전)
  465. //sSndMsg += lzzfBP_GraphicBox(0, 195, 100, 30, 10);
  466. //sSndMsg += lzzfBP_ChangeFont("A", 10, 10);
  467. //sSngMsg += lzzfBP_FieldDataH(0, 200, "GRAPH003", "테스트1", "Y");
  468. //종료(매수)
  469. sSndMsg += lzzfBP_EndFormat();
  470. // 전송
  471. CommAX.SendMessage(sSndMsg);
  472. model.setValue("/root/hidden/Message", CommAX.Message);
  473. model.refresh();
  474. CommAX.PortOpen("false");
  475. ]]>
  476. </script>
  477. </button>
  478. <textarea id="textarea1" ref="/root/hidden/b472/sendmsg" style="left:105px; top:505px; width:465px; height:165px; "/>
  479. <button id="button9" class="btn4_letter6" style="left:105px; top:675px; width:104px; height:22px; ">
  480. <caption>B 472 출력</caption>
  481. <script type="javascript" ev:event="DOMActivate">
  482. <![CDATA[
  483. CommAX.CommPort = model.getValue("/root/hidden/barprntinfo/comport"); // 출력 Port
  484. CommAX.Settings = model.getValue("/root/hidden/barprntinfo/setting"); // Comm 설정
  485. portOpenTF = CommAX.PortOpen("true");
  486. var sSndMsg = model.getValue("/root/hidden/b472/sendmsg");
  487. // 전송
  488. CommAX.SendMessage(sSndMsg);
  489. // Close COM Port
  490. CommAX.PortOpen("false");
  491. ]]>
  492. </script>
  493. </button>
  494. <caption id="caption3" style="left:105px; top:350px; width:200px; height:30px; font-size:14pt; font-weight:bold; color:#ff0000; ">B-472 테스트용</caption>
  495. <input id="input2" ref="/root/hidden/b472/btest/engA/text" style="left:230px; top:415px; width:100px; height:19px; ">
  496. <script type="javascript" ev:event="onkeypress">
  497. <![CDATA[
  498. // 영문A
  499. var sBuf = "";
  500. var sReverse="";
  501. var ppX = model.getValue("/root/hidden/b472/btest/engA/x").toString().getLeftPad(4, "0");
  502. var ppY = model.getValue("/root/hidden/b472/btest/engA/y").toString().getLeftPad(4, "0");
  503. var ppWs = model.getValue("/root/hidden/b472/btest/engA/w").toString().getLeftPad(4, "0");
  504. var ppHs = model.getValue("/root/hidden/b472/btest/engA/h").toString().getLeftPad(4, "0");
  505. var sText = model.getValue("/root/hidden/b472/btest/engA/text");
  506. sBuf = "{PV" + "01" + ";" + ppX + "," + ppY + "," + ppWs + "," + ppHs + ",B,+000,00,"+ "B" +"|}{RV" + "01" + ";"+ sText +"|}" ;
  507. model.setValue("/root/hidden/b472/btest/engA/result", sBuf);
  508. input4.refresh();
  509. ]]>
  510. </script>
  511. </input>
  512. <input id="input3" ref="/root/hidden/b472/btest/han/text" style="left:230px; top:460px; width:100px; height:19px; ">
  513. <script type="javascript" ev:event="onkeypress">
  514. <![CDATA[
  515. var retVal = "";
  516. var iLen = model.getValue("/root/hidden/b472/btest/han/text").length;
  517. var iXPos = model.getValue("/root/hidden/b472/btest/han/x");
  518. var iYPos = model.getValue("/root/hidden/b472/btest/han/y");
  519. var iYPos2 = model.getValue("/root/hidden/b472/btest/han/y") + 30;
  520. var iTCnt = 40;
  521. var text = "";
  522. for (var i=0; i < iLen; i++) {
  523. var sChar = model.getValue("/root/hidden/b472/btest/han/text").substring(i, i + 1);
  524. var sStrBuff = ""
  525. //alert( i.toString() + " : " + sStr.substring(i, i + 1) + " : " + sChar.charCodeAt());
  526. if (sChar.charCodeAt() < 0 || sChar.charCodeAt() >= 127) {
  527. // 한글
  528. sStrBuff = "{SG;";
  529. sStrBuff += iXPos.toString().getLeftPad(4, "0");
  530. sStrBuff += "," + iYPos.toString().getLeftPad(4, "0") + ",0032,0032,0,";
  531. sStrBuff += lzzfBP_GetHanFont32( sChar );
  532. sStrBuff += "|}";
  533. iXPos += 40
  534. } else {
  535. // 영문, 숫자
  536. ++iTCnt;
  537. sStrBuff = "{PV";
  538. sStrBuff += iTCnt.toString().getLeftPad(2, "0") + ";";
  539. sStrBuff += iXPos.toString().getLeftPad(4, "0");
  540. sStrBuff += "," + iYPos2.toString().getLeftPad(4, "0") + ",0026,0026,B,+000,00,B=";
  541. sStrBuff += sChar;
  542. sStrBuff += "|}";
  543. iXPos += 36
  544. }
  545. retVal += sStrBuff;
  546. //model.setValue( "/root/output", model.getValue("/root/output") + sStrBuff);
  547. }
  548. //return retVal;
  549. model.setValue("/root/hidden/b472/btest/han/result", retVal);
  550. input5.refresh();
  551. ]]>
  552. </script>
  553. </input>
  554. <caption id="caption4" style="left:105px; top:415px; width:40px; height:20px; ">영문A</caption>
  555. <caption id="caption5" style="left:105px; top:460px; width:40px; height:20px; ">한글32</caption>
  556. <input id="input4" ref="/root/hidden/b472/btest/engA/result" style="left:340px; top:415px; width:405px; height:19px; "/>
  557. <input id="input5" ref="/root/hidden/b472/btest/han/result" style="left:340px; top:460px; width:405px; height:19px; "/>
  558. <caption id="caption7" style="left:105px; top:438px; width:40px; height:20px; ">영문G</caption>
  559. <input id="input6" ref="/root/hidden/b472/btest/engG/text" style="left:230px; top:438px; width:100px; height:19px; ">
  560. <script type="javascript" ev:event="onkeypress">
  561. <![CDATA[
  562. var sBuf = "";
  563. //var sReverse="";
  564. var ppX = model.getValue("/root/hidden/b472/btest/engG/x").toString().getLeftPad(4, "0");
  565. var ppY = model.getValue("/root/hidden/b472/btest/engG/y").toString().getLeftPad(4, "0");
  566. var text = model.getValue("/root/hidden/b472/btest/engG/text");
  567. sBuf = "{PC" + "001" + ";" + ppX + "," + ppY + ",1,1,G,-02,00,"+ "B" +"|}{RC" + "01" + ";"+ text +"|}" ;
  568. model.setValue("/root/hidden/b472/btest/engG/result", sBuf);
  569. input7.refresh();
  570. ]]>
  571. </script>
  572. </input>
  573. <input id="input7" ref="/root/hidden/b472/btest/engG/result" style="left:340px; top:438px; width:405px; height:19px; "/>
  574. <caption id="caption8" style="left:105px; top:392px; width:40px; height:20px; ">시작</caption>
  575. <input id="input9" ref="/root/hidden/b472/btest/start" style="left:340px; top:392px; width:405px; height:19px; "/>
  576. <input id="input8" ref="/root/hidden/b472/btest/end" style="left:340px; top:482px; width:405px; height:19px; "/>
  577. <caption id="caption9" style="left:105px; top:482px; width:40px; height:20px; ">끝</caption>
  578. <input id="input10" ref="/root/hidden/b472/btest/engA/x" style="left:150px; top:414px; width:35px; height:19px; "/>
  579. <input id="input11" ref="/root/hidden/b472/btest/engA/y" style="left:190px; top:414px; width:35px; height:19px; "/>
  580. <caption id="caption10" style="left:150px; top:395px; width:137px; height:20px; ">X Y text</caption>
  581. <input id="input12" ref="/root/hidden/b472/btest/engG/x" style="left:150px; top:437px; width:35px; height:19px; "/>
  582. <input id="input13" ref="/root/hidden/b472/btest/engG/y" style="left:190px; top:437px; width:35px; height:19px; "/>
  583. <input id="input14" ref="/root/hidden/b472/btest/han/x" style="left:150px; top:460px; width:35px; height:19px; "/>
  584. <input id="input15" ref="/root/hidden/b472/btest/han/y" style="left:190px; top:460px; width:35px; height:19px; "/>
  585. <input id="input16" ref="/root/hidden/b472/btest/engA/w" style="left:750px; top:415px; width:50px; height:19px; "/>
  586. <input id="input17" ref="/root/hidden/b472/btest/engA/h" style="left:805px; top:415px; width:50px; height:19px; "/>
  587. <textarea id="textarea2" ref="/root/hidden/b472/xxxx" style="left:645px; top:510px; width:535px; height:220px; "/>
  588. </group>
  589. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  590. <button id="button5" class="btn4_letter3" disable.background-image="../../../com/commonweb/images/dis_btn4_letter3.gif" style="left:1127px; top:3px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  591. <caption>초기화</caption>
  592. <script type="javascript" ev:event="onclick">
  593. <![CDATA[
  594. ]]>
  595. </script>
  596. </button>
  597. <line id="line15" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  598. </group>
  599. <group id="group5" style="left:0px; top:0px; width:1195px; height:13px; ">
  600. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; background-image:../../../com/commonweb/images/tit_bullet1.gif; ">바코드출력 테스트</caption>
  601. </group>
  602. <button id="button3" class="btn4_letter8" disable.background-image="../../../com/commonweb/images/dis_btn4_letter5.gif" style="left:20px; top:185px; width:128px; height:22px; background-image:../../../com/commonweb/images/btn4_letter5.gif; ">
  603. <caption>바코드출력(LPT)</caption>
  604. <script type="javascript" ev:event="DOMActivate">
  605. <![CDATA[
  606. var sSndMsg = "";
  607. var sBcNo = "200611140";
  608. //시작(X, Y)
  609. sSndMsg += lzzfBP_StartFormat(0, 20);
  610. //바코드
  611. sSndMsg += lzzfBP_ChangeFont("F", 10, 10);
  612. sSndMsg += lzzfBP_BarCode_Code39(10, 50, "N", 50, sBcNo);
  613. //실제바코드내용
  614. sSndMsg += lzzfBP_ChangeFont("C", 10, 10);
  615. sSndMsg += lzzfBP_FieldDataA(100, 25, "*" + sBcNo + "*");
  616. //실제바코드내용(반전)
  617. sSndMsg += lzzfBP_GraphicBox(95, 155, 150, 20, 10);
  618. sSndMsg += lzzfBP_ChangeFont("C", 10, 10);
  619. sSndMsg += lzzfBP_FieldDataA(100, 160, "*" + sBcNo + "*", "Y");
  620. //환자명
  621. sSndMsg += lzzfBP_ChangeFont("A", 10, 10);
  622. sSndMsg += CommAX.PrtImgOut("GRAPH003", "테스트1");
  623. sSndMsg += lzzfBP_FiendOrigin(0, 160)
  624. sSndMsg += "^XGGRAPH003,1,1^FS";
  625. //sSngMsg += lzzfBP_FieldDataH(0, 160, "GRAPH003", "테스트1");
  626. //실제바코드내용(반전)
  627. //sSndMsg += lzzfBP_GraphicBox(0, 195, 100, 30, 10);
  628. //sSndMsg += lzzfBP_ChangeFont("A", 10, 10);
  629. //sSngMsg += lzzfBP_FieldDataH(0, 200, "GRAPH003", "테스트1", "Y");
  630. //종료(매수)
  631. sSndMsg += lzzfBP_EndFormat();
  632. //전송
  633. CommAX.SendMessageToLPT(sSndMsg);
  634. model.setValue("/root/hidden/Message", CommAX.Message);
  635. model.refresh();
  636. ]]>
  637. </script>
  638. </button>
  639. </xhtml:body>
  640. </xhtml:html>