XSMRS99999_바코드TEST.xrw 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <?xml-stylesheet href="C:/CMCProject/application/webapps/com/commonweb/css/common.css" type="text/css" ?>
  4. <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">
  5. <xhtml:head>
  6. <xhtml:title>Bar Code TEST</xhtml:title>
  7. <model id="model1">
  8. <instance id="instance1">
  9. <root xmlns="">
  10. <main>
  11. <grid>
  12. <rfcmetpllist/>
  13. </grid>
  14. <list>
  15. <fixaset>
  16. <fixasetlist>
  17. <instcd>012</instcd>
  18. <fixasetcd>
  19. <![CDATA[E01010034]]>
  20. </fixasetcd>
  21. <goodflaghngnm>
  22. <![CDATA[심전도계]]>
  23. </goodflaghngnm>
  24. <goodflagengnm>
  25. <![CDATA[ELECTROCARDIOGRAPH_ELECTROCARDIOGRAPH]]>
  26. </goodflagengnm>
  27. <maineqmt/>
  28. <goodmodel>
  29. <![CDATA[Pagewriter Touch]]>
  30. </goodmodel>
  31. <goodspec>
  32. <![CDATA[서울성모건 선납]]>
  33. </goodspec>
  34. <installplcecd>
  35. <![CDATA[2280200000]]>
  36. </installplcecd>
  37. <installplcenm>
  38. <![CDATA[응급의료센터]]>
  39. </installplcenm>
  40. <suplplcecd>
  41. <![CDATA[2118688589]]>
  42. </suplplcecd>
  43. <suplplcenm>
  44. <![CDATA[지피앤피(주)]]>
  45. </suplplcenm>
  46. <prodplce>
  47. <![CDATA[02]]>
  48. </prodplce>
  49. <prodcmpy>
  50. <![CDATA[02964]]>
  51. </prodcmpy>
  52. <prodcmpynm>
  53. <![CDATA[Philips]]>
  54. </prodcmpynm>
  55. <possndd>
  56. <![CDATA[20081024]]>
  57. </possndd>
  58. <possnamt>
  59. <![CDATA[9000000]]>
  60. </possnamt>
  61. <mngtdeptcd>
  62. <![CDATA[2280200000]]>
  63. </mngtdeptcd>
  64. <mngtdeptnm>
  65. <![CDATA[응급의료센터]]>
  66. </mngtdeptnm>
  67. <photoyn>
  68. <![CDATA[N]]>
  69. </photoyn>
  70. <suppcustcd/>
  71. <suppcustnm/>
  72. <cntrdeptcd>
  73. <![CDATA[2280000000]]>
  74. </cntrdeptcd>
  75. <cntrdeptnm>
  76. <![CDATA[응급의학과]]>
  77. </cntrdeptnm>
  78. <forgncurncyamt>
  79. <![CDATA[0]]>
  80. </forgncurncyamt>
  81. <curncyunit/>
  82. <barcdprntyn>
  83. <![CDATA[√]]>
  84. </barcdprntyn>
  85. <choice/>
  86. <chkcnt>
  87. <![CDATA[√]]>
  88. </chkcnt>
  89. <mngtno>
  90. <![CDATA[US90812882]]>
  91. </mngtno>
  92. <oldcd/>
  93. <acqtflag>
  94. <![CDATA[2]]>
  95. </acqtflag>
  96. <possnflagcd>
  97. <![CDATA[H]]>
  98. </possnflagcd>
  99. <goodflag>
  100. <![CDATA[E]]>
  101. </goodflag>
  102. <tempmngtdeptcd>
  103. <![CDATA[2280200000]]>
  104. </tempmngtdeptcd>
  105. <tempmngtdeptnm>
  106. <![CDATA[응급의료센터]]>
  107. </tempmngtdeptnm>
  108. <incmreptno/>
  109. <incmpemtno>
  110. <![CDATA[수허04-214호]]>
  111. </incmpemtno>
  112. <mtlmngtno>
  113. <![CDATA[A26010(2)]]>
  114. </mtlmngtno>
  115. <cmt/>
  116. <cntctel/>
  117. <dsplflag>
  118. <![CDATA[0]]>
  119. </dsplflag>
  120. <fixasetunit>
  121. <![CDATA[EA]]>
  122. </fixasetunit>
  123. <lrgcd>
  124. <![CDATA[01]]>
  125. </lrgcd>
  126. <mdlcd>
  127. <![CDATA[01]]>
  128. </mdlcd>
  129. <smlcd/>
  130. <flwgrnttermfr>
  131. <![CDATA[20081024]]>
  132. </flwgrnttermfr>
  133. <flwgrnttermto>
  134. <![CDATA[20111023]]>
  135. </flwgrnttermto>
  136. <acntcd>
  137. <![CDATA[12205001]]>
  138. </acntcd>
  139. <acntnm>
  140. <![CDATA[의료장비]]>
  141. </acntnm>
  142. <cmt/>
  143. <cntrdeptcd>
  144. <![CDATA[2280000000]]>
  145. </cntrdeptcd>
  146. <windd>
  147. <![CDATA[20081024]]>
  148. </windd>
  149. </fixasetlist>
  150. <fixasetlist>
  151. <instcd>012</instcd>
  152. <fixasetcd>
  153. <![CDATA[G00010400063]]>
  154. </fixasetcd>
  155. <goodflaghngnm>
  156. <![CDATA[컴퓨터 본체 / Pentium E6550]]>
  157. </goodflaghngnm>
  158. <goodflagengnm/>
  159. <maineqmt/>
  160. <goodmodel>
  161. <![CDATA[DC7800P CMT(OCS)]]>
  162. </goodmodel>
  163. <goodspec>
  164. <![CDATA[R2GB/H160G/DVD/on Board]]>
  165. </goodspec>
  166. <installplcecd>
  167. <![CDATA[3240400000]]>
  168. </installplcecd>
  169. <installplcenm>
  170. <![CDATA[외래약국]]>
  171. </installplcenm>
  172. <suplplcecd>
  173. <![CDATA[2148804923]]>
  174. </suplplcecd>
  175. <suplplcenm>
  176. <![CDATA[평화이즈(주)]]>
  177. </suplplcenm>
  178. <prodplce/>
  179. <prodcmpy>
  180. <![CDATA[02197]]>
  181. </prodcmpy>
  182. <prodcmpynm>
  183. <![CDATA[Hewlett Packard]]>
  184. </prodcmpynm>
  185. <possndd>
  186. <![CDATA[20081031]]>
  187. </possndd>
  188. <possnamt>
  189. <![CDATA[690000]]>
  190. </possnamt>
  191. <mngtdeptcd>
  192. <![CDATA[3242100000]]>
  193. </mngtdeptcd>
  194. <mngtdeptnm/>
  195. <photoyn>
  196. <![CDATA[N]]>
  197. </photoyn>
  198. <suppcustcd/>
  199. <suppcustnm/>
  200. <cntrdeptcd>
  201. <![CDATA[3242100000]]>
  202. </cntrdeptcd>
  203. <cntrdeptnm/>
  204. <forgncurncyamt>
  205. <![CDATA[0]]>
  206. </forgncurncyamt>
  207. <curncyunit/>
  208. <barcdprntyn>
  209. <![CDATA[√]]>
  210. </barcdprntyn>
  211. <choice/>
  212. <chkcnt/>
  213. <mngtno/>
  214. <oldcd/>
  215. <acqtflag/>
  216. <possnflagcd/>
  217. <goodflag>
  218. <![CDATA[G]]>
  219. </goodflag>
  220. <tempmngtdeptcd/>
  221. <tempmngtdeptnm/>
  222. <incmreptno/>
  223. <incmpemtno/>
  224. <mtlmngtno/>
  225. <cmt/>
  226. <cntctel/>
  227. <dsplflag>
  228. <![CDATA[0]]>
  229. </dsplflag>
  230. <fixasetunit>
  231. <![CDATA[EA]]>
  232. </fixasetunit>
  233. <lrgcd>
  234. <![CDATA[00]]>
  235. </lrgcd>
  236. <mdlcd>
  237. <![CDATA[01]]>
  238. </mdlcd>
  239. <smlcd>
  240. <![CDATA[04]]>
  241. </smlcd>
  242. <flwgrnttermfr/>
  243. <flwgrnttermto/>
  244. <acntcd/>
  245. <acntnm/>
  246. <cmt/>
  247. <cntrdeptcd>
  248. <![CDATA[3242100000]]>
  249. </cntrdeptcd>
  250. <windd>
  251. <![CDATA[20081120]]>
  252. </windd>
  253. </fixasetlist>
  254. </fixaset>
  255. </list>
  256. <barcdprntsetup>
  257. <prntsetupinfo>
  258. <setupinfo>
  259. <prntkind>7</prntkind>
  260. <commkind>01</commkind>
  261. <comm01>
  262. <setupval>SATO CL408e</setupval>
  263. </comm01>
  264. <comm02>
  265. <comm>1</comm>
  266. <databit>8</databit>
  267. <stopbit>1</stopbit>
  268. <baudrate>9600</baudrate>
  269. <parity>n</parity>
  270. <setupval/>
  271. </comm02>
  272. <comm03>
  273. <setupval/>
  274. </comm03>
  275. <blank>
  276. <left>0</left>
  277. <top>0</top>
  278. </blank>
  279. </setupinfo>
  280. </prntsetupinfo>
  281. </barcdprntsetup>
  282. </main>
  283. <send>
  284. <barcodetarget/>
  285. </send>
  286. <init>
  287. </init>
  288. <hidden/>
  289. <temp/>
  290. </root>
  291. </instance>
  292. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  293. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  294. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  295. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  296. <script type="javascript" src="../../../mis/purcbaseweb/js/SMRFC00700.js"/>
  297. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  298. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  299. <script type="javascript" src="../../../lis/commonweb/js/LLZ001.js"/>
  300. <script type="javascript" src="../../../lis/commonweb/js/LZZ001.js"/>
  301. <script type="javascript" src="../../../lis/commonweb/js/LPZ001.js"/>
  302. <script type="javascript" ev:event="xforms-ready">
  303. <![CDATA[
  304. //바코드 object 선언
  305. // lzzfMakeBrcdPrntObjHanDo("CommAX");
  306. ]]>
  307. </script>
  308. <submission id="TRRFC00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/fixasetlist" resultref="/root/main/list/fixaset"/>
  309. <submission id="TXRFC00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/barcodetarget" resultref="/root/copytemp"/>
  310. </model>
  311. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  312. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  313. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  314. <script type="javascript">
  315. <![CDATA[
  316. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  317. function fInitialize() {
  318. misfGridInit(grd_rfcmetpllist);
  319. misfComboComCdList("Z0007", cmb_instcd); //기관코드
  320. misfMsterDetailSet(grd_rfcmetpllist, null, "TRRFC00101","Y"); //마스터 설정
  321. model.setValue("/root/send/instcd", getUserInfo("dutplceinstcd")); // 기관 설정
  322. //화면 권한 설정
  323. btn_save.disabled = !(checkAuth("X"));
  324. btn_prt.disabled= !(checkAuth("P"));
  325. btn_search.dispatch("DOMActivate");
  326. }
  327. function fsearch(){
  328. var updtdata = getGridUpdateData(grd_rfcmetpllist);
  329. if ( updtdata != "") {
  330. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  331. if (ret != 6) { // not OK
  332. return;
  333. }
  334. }
  335. isRequiredControls("cmb_instcd");
  336. misfMsterDetailRetrieve();
  337. // misfSetReadOnlyCol(grd_rfcmetpllist, "instcd,deptcd,deptnm", true);
  338. }
  339. //프린터 설정
  340. function fSetPrint() {
  341. var count = getNodesetCount("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  342. if(count == 0) {
  343. model.makeNode("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  344. }
  345. open("SPLLC90100_바코드프린터설정.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  346. }
  347. function fBarcodePrt( ) {
  348. // misfMakeBrcdPrntObjHanDo("CommAX");
  349. var ref = "/root/main/list/stokasetcnfminfo/stokasetcnfmlist/"
  350. var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo";
  351. var sPrntKind = model.getValue(barcdRef + "[1]/prntkind");
  352. var portOpenCheck = "";
  353. var LCount = 0;
  354. var iXPos = 0;
  355. var iYPos = 0;
  356. var sSndMsg = "";
  357. if (sPrntKind == 0) return;
  358. var sCommKind = model.getValue(barcdRef + "[1]/commkind");
  359. var sLeftBank = model.getValue(barcdRef + "[1]/blank/left");
  360. var sTopBank = model.getValue(barcdRef + "[1]/blank/top");
  361. PrnKind =2;
  362. CommAX.PrnKind =7;
  363. CommAX.PortNm = 2;
  364. CommAX.PrtNm = "SATO CL408e";
  365. //시작(X, Y)
  366. sSndMsg += misfStartFormat(0, 0);
  367. //////////////////////////////////////////////////
  368. // 라벨 상단내용 //
  369. /////////////////////////////////////////////////
  370. //투약번호
  371. //sSndMsg += misfPrintOut(30, 30, 6, "test" ,"");
  372. sSndMsg += misfPrintOut(30, 30, 6, "test" ,"");
  373. sSndMsg += misfPrintOut(30, 60, 6, "나와라" ,"");
  374. //종료(매수)
  375. sSndMsg += misfEndFormat(0);
  376. //CommAX.SendMessage(sSndMsg);
  377. CommAX.SendMessageToLPT(sSndMsg);
  378. sSndMsg = "";
  379. //fSleep(500);
  380. }
  381. function fGridItemCheck( choiceFlag ) {
  382. var choiceCnt = 0;
  383. if (grd_fixasetlist.rows - grd_fixasetlist.fixedRows <= 0 ) {
  384. messageBox("선택할 데이터가","I004");
  385. return false;
  386. }
  387. if ( choiceFlag == "check" ) {
  388. /*
  389. var goodflagengnm = "";
  390. var goodmodel = "";
  391. var possndd = "";
  392. var mngtdeptnm = "";
  393. var fixasetcd = "";
  394. var instcd = "";
  395. var goodflaghngnm = "";
  396. var installplcecd = "";
  397. var installplcenm = "";
  398. var cntrdeptnm = "";
  399. var suplplcenm = "";
  400. var barcdprntyn = "";
  401. var i = 1;
  402. for( cnt = grd_fixasetlist.fixedRows; cnt < grd_fixasetlist.rows ; cnt++ ) {
  403. if( grd_fixasetlist.valueMatrix( cnt, grd_fixasetlist.colRef("choice") ) == "Y") {
  404. choiceCnt = choiceCnt + 1;
  405. grd_barcodetarget.addRow(false); //그리드 열추가
  406. goodflagengnm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/goodflagengnm");
  407. goodmodel = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/goodmodel");
  408. possndd = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/possndd");
  409. mngtdeptnm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/mngtdeptnm");
  410. fixasetcd = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/fixasetcd");
  411. instcd = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/instcd");
  412. goodflaghngnm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/goodflaghngnm");
  413. installplcecd = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/installplcecd");
  414. installplcenm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/installplcenm");
  415. cntrdeptnm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/cntrdeptnm");
  416. suplplcenm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/suplplcenm");
  417. //필요한 항목들을 전부 노드에서 가져와서 변수에 저장한다음 프린트한다.
  418. /*
  419. 장비명 goodflagengnm
  420. 모델명+제조원 goodmodel
  421. SN+취득일자 ?? + possndd
  422. 부서명(관리) mngtdeptnm
  423. 코드번호(바코드번호) fixasetcd
  424. 바코드
  425. */
  426. //바코드출력 함수 호출 및 매개변수 넘겨주기
  427. // BarcodePrtRFCMFACD(goodflagengnm , goodmodel , possndd , mngtdeptnm , fixasetcd);
  428. //선택된 고정자산자료들을 해당 노드에 부어주고 그 엄마 노드를 펑션에 보내서 바코드 출력하는 데 쓴다.
  429. /*
  430. model.setValue("/root/send/barcodetarget["+i+"]/fixasetcd" , fixasetcd , true );
  431. model.setValue("/root/send/barcodetarget["+i+"]/goodflagengnm" , goodflagengnm , true );
  432. model.setValue("/root/send/barcodetarget["+i+"]/goodmodel" , goodmodel , true );
  433. model.setValue("/root/send/barcodetarget["+i+"]/possndd" , possndd , true );
  434. model.setValue("/root/send/barcodetarget["+i+"]/mngtdeptnm" , mngtdeptnm , true );
  435. model.setValue("/root/send/barcodetarget["+i+"]/instcd" , instcd );
  436. model.setValue("/root/send/barcodetarget["+i+"]/goodflaghngnm" , goodflaghngnm , true );
  437. model.setValue("/root/send/barcodetarget["+i+"]/installplcecd" , installplcecd , true );
  438. model.setValue("/root/send/barcodetarget["+i+"]/installplcenm" , installplcenm , true );
  439. model.setValue("/root/send/barcodetarget["+i+"]/cntrdeptnm" , cntrdeptnm , true );
  440. model.setValue("/root/send/barcodetarget["+i+"]/suplplcenm" , suplplcenm , true );
  441. //출력함수에 해당 노드 첫번째 를 넘기고 출력이 잘 되었다면 그리드의 스테이터스를 update로 하고
  442. //출력여부를 Y로 셋팅한다.
  443. //바코드출력 함수 호출 및 매개변수(해당노드) 넘겨주기
  444. // BarcodePrtRFCMFACD(goodflagengnm , goodmodel , possndd , mngtdeptnm , fixasetcd);
  445. grd_barcodetarget.rowStatus(i) = 2;
  446. i = i+1;
  447. }
  448. }
  449. model.refresh();
  450. */
  451. model.resetInstanceNode("/root/copytemp");
  452. var varcopy = instance1.selectNodes(grd_fixasetlist.nodeset + "[choice='Y']");
  453. if ( varcopy.length == 0 ) {
  454. messageBox("선택한 데이터가","I004");
  455. return false;
  456. }
  457. }
  458. return true;
  459. }
  460. /**
  461. * @group :
  462. * @ver : 2007.09.18
  463. * @by : 최경용
  464. * @---------------------------------------------------
  465. * @type : function
  466. * @access : public
  467. * @desc : 한글 및 특수문자 Field정의
  468. * @param : pX = 시작 가로위치 (in dots)
  469. * @param : pY = 시작 세로위치 (in dots)
  470. * @param : pFont = 글자크기(1-10)
  471. * @param : pData = Field Data
  472. * @param : pReverse = 배경 기준으로 역상으로표시 ( Y:역상으로 )
  473. * @return :
  474. * @---------------------------------------------------
  475. */
  476. /*
  477. *바코드 출력 함수
  478. * psRef 바코드프린트 셋팅관련 노드셋
  479. * pRef 고정자산 프린트 관련 노드셋
  480. * cvtdate 점검일(오늘날짜)
  481. * nextcvtdate 다음점검일(현재는 일년뒤로 셋팅되어 있음)
  482. */
  483. function BarcodePrtRFCMFACD2(psRef , pRef , cvtdate , nextcvtdate , pKCount , pPCount){
  484. var vInstance = document.models(0).instances(0);
  485. var cntHR = vInstance.selectNodes(pRef).length; //고정자산 프린트 할 전체 목록의 갯수
  486. //alert(cntHR);
  487. //var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo"; //바코드프린터 셋팅관련
  488. var barcdRef = "/root/main/barcdprntsetup";
  489. /*
  490. var checkdate = cvtdate.substr(2,6);
  491. var nextcheckdate = nextcvtdate.substr(2,6);
  492. */
  493. // var sPrntKind = model.getValue(barcdRef + "[1]/prntkind"); //바코드프린터 종류
  494. var sPrntKind = "1"; //바코드프린터 종류
  495. var portOpenTF = "";
  496. // Lcount , Mcont(접수 바코드출력수 , 미생물바코드 출력수)
  497. var KCount = 0;
  498. var PCount = 0;
  499. if (pKCount == null || pKCount == ""){
  500. KCount = 0;
  501. }else{
  502. KCount = pKCount;
  503. }
  504. if (pPCount == null || pPCount == ""){
  505. PCount = 0;
  506. }else{
  507. PCount = pPCount;
  508. }
  509. //
  510. if (cntHR > 0 && sPrntKind != 0){
  511. //var sCommKind = model.getValue(barcdRef + "[1]/commkind"); //통신유형(PRT , COM , TCP/IP)
  512. var sCommKind = "02"
  513. var sLeftBank = model.getValue(barcdRef + "[1]/blank/left"); //왼쪽여백
  514. var sTopBank = model.getValue(barcdRef + "[1]/blank/top"); //위쪽여백
  515. if (sCommKind == "01") { //통신유형(PRT)
  516. var sSetUpVal = model.getValue(barcdRef + "[1]/comm01/setupval");
  517. } else if (sCommKind == "02") { //통신유형(COM)
  518. var sComm = model.getValue(barcdRef + "[1]/comm02/comm" ); //COM Port
  519. var sDataBit = model.getValue(barcdRef + "[1]/comm02/databit" ); //Data Bit
  520. var sStopBit = model.getValue(barcdRef + "[1]/comm02/stopbit" ); //Stop Bit
  521. var sBaudRate = model.getValue(barcdRef + "[1]/comm02/baudrate"); //Baud Rate
  522. var sParity = model.getValue(barcdRef + "[1]/comm02/parity" ); //Parity
  523. // CommAX.CommPort = sComm;
  524. // CommAX.Settings = sBaudRate + "," + sParity + "," + sDataBit + "," + sStopBit;
  525. CommAX.CommPort = "2";
  526. CommAX.Settings = "9600" + "," + "n "+ "," + "8" + "," + "1";
  527. if(KCount > 0){
  528. //이미 포트 오픈 되어 있으므로 "TRUE" 셋팅
  529. portOpenTF = "TRUE";
  530. }else if(KCount == 0){
  531. //port open 반환값 -> String 문자 포트 오픈 성공이면 "TRUE" , 실패하면 "FALSE"
  532. portOpenTF = CommAX.PortOpen("true");
  533. }
  534. } else if (sCommKind == "03") { //통신유형(TCP/IP)
  535. var sSetUpVal = model.getValue(barcdRef + "[1]/comm03/setupval");
  536. }
  537. //alert(portOpenTF);
  538. var DeptNm = "";
  539. if ( (portOpenTF == "TRUE" && sCommKind == "02")
  540. ||(sCommKind == "01") || (sCommKind == "03")){
  541. for (i=1 ; i<= cntHR;i++){
  542. var goodflag = model.getvalue(pRef+ "["+i+"]/goodflag" );
  543. var fixasetcd = model.getvalue(pRef+ "["+i+"]/fixasetcd" );
  544. var goodflagengnm = model.getvalue(pRef+ "["+i+"]/goodflagengnm");
  545. var goodmodel = model.getvalue(pRef+ "["+i+"]/goodmodel" );
  546. var possndd = model.getvalue(pRef+ "["+i+"]/possndd" );
  547. var mngtdeptnm = model.getvalue(pRef+ "["+i+"]/mngtdeptnm" );
  548. var mngtno = model.getvalue(pRef+ "["+i+"]/mngtno" );
  549. var instcd = model.getvalue(pRef+ "["+i+"]/instcd" );
  550. var goodflaghngnm = model.getvalue(pRef+ "["+i+"]/goodflaghngnm");
  551. var installplcecd = model.getvalue(pRef+ "["+i+"]/installplcecd");
  552. var installplcenm = model.getvalue(pRef+ "["+i+"]/installplcenm");
  553. var cntrdeptnm = model.getvalue(pRef+ "["+i+"]/cntrdeptnm" );
  554. var suplplcenm = model.getvalue(pRef+ "["+i+"]/suplplcenm" );
  555. var prodcmpynm = model.getvalue(pRef+ "["+i+"]/prodcmpynm" );
  556. var leftmargin = 300;
  557. var leftmarginother = 10;
  558. //시작 위치 설정
  559. if (sLeftBank == "" || sLeftBank == "-") sLeftBank = leftmargin; //350
  560. if (sTopBank == "" || sTopBank == "-") sTopBank = 20;
  561. var sSndMsg = "";
  562. if(sPrntKind == "1") {
  563. sSndMsg += misfBP_StartFormat(sLeftBank, sTopBank); // 시작위치 셋팅
  564. //sSndMsg += misfBP_ChangeFont("A", 0, 0); // 폰트 설정
  565. //misfBP_FieldDataHNEW(pX, pY, pW, pH, pData)
  566. //시작(X, Y)
  567. //sSndMsg += misfBP_StartFormat(0, 30);
  568. sSndMsg += "^SEE:UHANGUL.DAT^FS^CWQ,E:AAAAA.FNT^FS^CI26^FO10,46^AQN,16,16^FD^FS";
  569. //장비명
  570. if (goodflag == "EQ"){
  571. sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 15 , 25 , 25 , goodflagengnm.substr(0,20));
  572. sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 47 , 25 , 25 , goodflagengnm.substr(20,20));
  573. }else{
  574. sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 15 , 25 , 25 , goodflaghngnm.substr(0,20));
  575. sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 47 , 25 , 25 , goodflaghngnm.substr(20,20));
  576. }
  577. //모델명
  578. sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 75 , 24 , 24 , "- "+goodmodel);
  579. //취득일자(일-월-년 순서로 출력)+SN
  580. if (goodflag == "GE") {
  581. sSndMsg += misfBP_FieldDataHNEW(leftmarginother, 105 , 24 , 24 , "- "+possndd.substr(6,2)+possndd.substr(4,2)+possndd.substr(2,2)+mngtno); //82
  582. } else {
  583. sSndMsg += misfBP_FieldDataHNEW(leftmarginother, 105 , 24 , 24 , "- "+possndd.substr(6,2)+possndd.substr(4,2)+possndd.substr(2,2)+"_"+mngtno); //82
  584. }
  585. //부서명(관리부서)
  586. sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 140 , 24 , 24 , "- "+mngtdeptnm); //100 , mngtdeptnm
  587. if (goodflag == "EQ"){
  588. //제조원(장비만...)
  589. sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 172 , 24 , 24 , "- "+prodcmpynm);
  590. }else{
  591. sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 172 , 24 , 24 , "-");
  592. }
  593. //코드번호
  594. sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 205 , 24 , 24 , "- "+fixasetcd);
  595. //바코드
  596. sSndMsg += misfBP_ChangeFont("F", 10, 10);
  597. sSndMsg += misfBP_BarCode_Code39NEW(0, 240, "N", 50, "*" +fixasetcd + "*"); // 바코드 //114
  598. sSndMsg += misfBP_EndFormat();
  599. if(sCommKind == "01") {
  600. CommAX.SendMessageToLPT(sSndMsg);
  601. } else if(sCommKind == "02") {
  602. CommAX.SendMessage(sSndMsg);
  603. }
  604. }//end if(sPrntKind == "1")
  605. }//end for
  606. //portopen이 true이고 통신유형이 com이고 출력할 병리 바코드가 없을때 port close
  607. if( portOpenTF == "TRUE" && sCommKind == "02" && PCount == 0){
  608. CommAX.PortOpen("false");
  609. }
  610. }else if((portOpenTF = "FALSE" && sCommKind == "02")){
  611. messageBox("아래 사항을 확인후 재출력해주십시오."
  612. + " \n 1.프린트설정 화면에서 통신유형을 com 으로 선택한 경우 port 번호 확인"
  613. + " \n 2.케이블 확인"
  614. + " \n 3.먼저 출력중인 바코드 확인(모두 출력된 후 재출력하십시오.)", "I", "");
  615. return false;
  616. }
  617. }//End if
  618. }//End Function
  619. ]]>
  620. </script>
  621. </xhtml:head>
  622. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  623. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  624. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">Bar Code Test</caption>
  625. </group>
  626. <button id="btn_prntset" class="btn3_letter5" visibility="hidden" style="left:10px; top:45px; width:92px; height:22px; ">
  627. <caption>프린터설정</caption>
  628. <script type="javascript" ev:event="DOMActivate">
  629. <![CDATA[
  630. fSetPrint();
  631. ]]>
  632. </script>
  633. </button>
  634. <button id="btn_barcodeprt" class="btn2_letter4" style="left:115px; top:45px; width:64px; height:19px; ">
  635. <caption>라벨출력</caption>
  636. <script type="javascript" ev:event="DOMActivate">
  637. <![CDATA[
  638. fBarcodePrt();
  639. ]]>
  640. </script>
  641. </button>
  642. <datagrid id="grd_fixasetlist" nodeset="/root/main/list/fixaset/fixasetlist" caption="^기관코드^출력여부^자산코드^품명^품명(영문)^모델^구입일자^사용부서^청구부서^설치장소^설치장소^SERIAL NO^제조원^업체명^연락처" colsep="^" colwidth="29, 60, 84, 85, 170, 170, 130, 79, 120, 120, 80, 120, 100, 100, 153, 100" dataheight="23" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:15px; top:100px; width:1194px; height:95px; ">
  643. <col checkvalue="Y,N" ref="choice" type="checkbox"/>
  644. <col ref="instcd"/>
  645. <col ref="barcdprntyn"/>
  646. <col ref="fixasetcd" style="text-align:center; "/>
  647. <col ref="goodflaghngnm"/>
  648. <col ref="goodflagengnm"/>
  649. <col ref="goodmodel"/>
  650. <col disabled="true" ref="possndd" format="yyyy-mm-dd" style="text-align:center; "/>
  651. <col ref="mngtdeptnm"/>
  652. <col ref="cntrdeptnm" visibility="hidden"/>
  653. <col ref="installplcecd"/>
  654. <col ref="installplcenm"/>
  655. <col ref="mngtno" visibility="visible"/>
  656. <col ref="prodcmpynm"/>
  657. <col ref="suplplcenm"/>
  658. <col ref="cntctel" visibility="visible"/>
  659. <script type="javascript" ev:event="onaftersort">
  660. <![CDATA[
  661. grd_fixasetlist.gridToInstance();
  662. ]]>
  663. </script>
  664. </datagrid>
  665. <datagrid id="grd_barcodetarget" nodeset="/root/main/barcodetarget" visibility="visible" caption="기관코드^출력여부^코드번호^품명(한글)^품명(영문)^모델명^취득일자^관리부서^SERIAL NO^설치장소^설치장소^귀속부서^업체명^연락처" colsep="^" colwidth="36, 40, 79, 151, 100, 100, 117, 100, 23, 47, 99, 87, 130, 55" dataheight="23" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:15px; top:210px; width:1064px; height:95px; ">
  666. <col ref="instcd"/>
  667. <col ref="barcdprntyn"/>
  668. <col ref="fixasetcd"/>
  669. <col ref="goodflaghngnm"/>
  670. <col ref="goodflagengnm"/>
  671. <col ref="goodmodel"/>
  672. <col disabled="true" ref="possndd" type="inputdate"/>
  673. <col ref="mngtdeptnm"/>
  674. <col ref="mngtno"/>
  675. <col ref="installplcecd"/>
  676. <col ref="installplcenm"/>
  677. <col ref="cntrdeptnm"/>
  678. <col ref="suplplcenm"/>
  679. <col/>
  680. </datagrid>
  681. <caption id="caption1" class="search_name" style="left:195px; top:45px; width:97px; height:17px; ">COM Port :</caption>
  682. <select1 id="combo1" ref="/root/main/barcdprntsetup/comm" appearance="minimal" style="left:295px; top:45px; width:116px; height:19px; ">
  683. <choices>
  684. <item>
  685. <label>COM1</label>
  686. <value>1</value>
  687. </item>
  688. <item>
  689. <label>COM2</label>
  690. <value>2</value>
  691. </item>
  692. <item>
  693. <label>COM3</label>
  694. <value>3</value>
  695. </item>
  696. <item>
  697. <label>COM4</label>
  698. <value>4</value>
  699. </item>
  700. </choices>
  701. </select1>
  702. <object id="CommAX" clsid="{b721f534-d025-466b-8a28-7cf40e700acd}" style="left:40px; top:330px; width:45px; height:45px; "/>
  703. </xhtml:body>
  704. </xhtml:html>