SMADT30300_마약향정입출고내역.xrw 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163
  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. <main>
  10. <srchcond>
  11. <narclist>
  12. <narccd/>
  13. <narcnm/>
  14. <goodspec/>
  15. <specunit/>
  16. <suplplce/>
  17. <brngfwrdqty/>
  18. <winqty/>
  19. <custnm/>
  20. <allendyn/>
  21. </narclist>
  22. </srchcond>
  23. <prcplist>
  24. <item>
  25. <sel/>
  26. <prcpdd/>
  27. <pid/>
  28. <hngnm/>
  29. <sex/>
  30. <age/>
  31. <addr/>
  32. <diagcd/>
  33. <sympnm/>
  34. <ordqty/>
  35. <deliveqty/>
  36. <etccau/>
  37. <stocqty/>
  38. <seqno/>
  39. <narccd/>
  40. <narcnm/>
  41. <goodspec/>
  42. <specunit/>
  43. <custnm/>
  44. <brngfwrdqty/>
  45. <winqty/>
  46. <orgioflag/>
  47. <ioflag/>
  48. </item>
  49. </prcplist>
  50. <printlist>
  51. <item>
  52. <narccd/>
  53. <narcnm/>
  54. <deliveqty/>
  55. <returnqty/>
  56. <bfstocqty/>
  57. <winqty/>
  58. </item>
  59. </printlist>
  60. <printlist2>
  61. <item>
  62. <narccd/>
  63. <narcnm/>
  64. <packunit/>
  65. <deliveqty/>
  66. <bfstocqty/>
  67. <winqty/>
  68. <stocqty/>
  69. </item>
  70. </printlist2>
  71. <patinfo>
  72. <patinfolist/>
  73. </patinfo>
  74. <prcplist2>
  75. <item>
  76. <drugdd/>
  77. </item>
  78. </prcplist2>
  79. <datacheck>
  80. <datachk>
  81. <yn/>
  82. </datachk>
  83. </datacheck>
  84. </main>
  85. <send>
  86. <srchdata>
  87. <narcflag>M</narcflag>
  88. <srchrtnwardcd/>
  89. <srchwardcd/>
  90. <srchrtnwardnm/>
  91. <srchwardnm/>
  92. <drugcd/>
  93. <drugnm/>
  94. <ioflag/>
  95. <endflag>A</endflag>
  96. <enddd/>
  97. <barcode/>
  98. <totsumqty/>
  99. <chkcnt/>
  100. <preview/>
  101. <deptflag/>
  102. <allward/>
  103. <goodspec/>
  104. <specunit/>
  105. <suplplce/>
  106. <brngfwrdqty/>
  107. <winqty/>
  108. <stocyn/>
  109. <drugkind>N M</drugkind>
  110. <deptnm/>
  111. <drugkindnm/>
  112. <fromenddd/>
  113. <toenddd/>
  114. <prtmode/>
  115. <prniflag>I</prniflag>
  116. <prnoflag/>
  117. <prnmkind>M</prnmkind>
  118. <prnnkind>N</prnnkind>
  119. <prnykind/>
  120. <deptinm/>
  121. <deptonm/>
  122. <statdd/>
  123. <srchdrugkind>N','Y M</srchdrugkind>
  124. <prnaflag/>
  125. <deptanm/>
  126. <m_drugkind/>
  127. <h_drugkind/>
  128. <stocdeptcd/>
  129. <stocdeptcdnm/>
  130. <magamflag/>
  131. <multday/>
  132. </srchdata>
  133. <data>
  134. <narcstocdata/>
  135. <print1>
  136. <item>
  137. <sel/>
  138. <prcpdd/>
  139. <pid/>
  140. <hngnm/>
  141. <sex/>
  142. <age/>
  143. <addr/>
  144. <diagcd/>
  145. <sympnm/>
  146. <ordqty/>
  147. <deliveqty/>
  148. <etccau/>
  149. <stocqty/>
  150. <seqno/>
  151. <narccd/>
  152. <narcnm/>
  153. <goodspec/>
  154. <specunit/>
  155. <suplplce/>
  156. <brngfwrdqty/>
  157. <winqty/>
  158. </item>
  159. </print1>
  160. <print2>
  161. <item>
  162. <drugcd/>
  163. <enddd/>
  164. <orddept/>
  165. <deliveqty_i/>
  166. <deliveqty_o/>
  167. <brngfwrdqty/>
  168. <winqty/>
  169. <stocqty/>
  170. <narccd/>
  171. <narcnm/>
  172. <goodspec/>
  173. <specunit/>
  174. <custnm/>
  175. </item>
  176. </print2>
  177. </data>
  178. </send>
  179. <init>
  180. <deptlist>
  181. <ward>
  182. <wardcd/>
  183. <wardnm/>
  184. </ward>
  185. </deptlist>
  186. <orddept>
  187. <dept>
  188. <depthngnm/>
  189. <deptcd/>
  190. </dept>
  191. </orddept>
  192. <misdeptlist/>
  193. <dayinfo>
  194. <base>
  195. <basedd/>
  196. </base>
  197. </dayinfo>
  198. </init>
  199. <hidden>
  200. <ret/>
  201. <srchinfo>
  202. <wardcd/>
  203. <wardnm/>
  204. </srchinfo>
  205. <prninfo/>
  206. </hidden>
  207. <temp>
  208. <srchcond>
  209. <narclist>
  210. <sel/>
  211. <narcnm/>
  212. <narccd/>
  213. </narclist>
  214. <ward>
  215. <wardcd/>
  216. <wardnm/>
  217. </ward>
  218. <dept>
  219. <deptcd/>
  220. <deptnm/>
  221. </dept>
  222. </srchcond>
  223. <drugdeptinfo/>
  224. <srchinfo>
  225. <ward/>
  226. </srchinfo>
  227. <tttt>
  228. <a/>
  229. <b/>
  230. <c/>
  231. <rr/>
  232. <ww/>
  233. </tttt>
  234. </temp>
  235. </root>
  236. </instance>
  237. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  238. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  239. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  240. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  241. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  242. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  243. <submission id="TRADT30301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/srchcond"/>
  244. <submission id="TRADT30302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/prcplist"/>
  245. <submission id="TRADT30303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/printlist"/>
  246. <submission id="TRADT30304" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/prcplist2"/>
  247. <submission id="TRADT30305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/printlist2"/>
  248. <submission id="TRADT30306" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/printlist2"/>
  249. <submission id="TRADT30308" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instancd" resultref="/root/init/dayinfo"/>
  250. <submission id="TXADT30301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/hidden/ret"/>
  251. <submission id="TXADT30302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/ret"/>
  252. <submission id="TXADT30303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/hidden/ret"/>
  253. <submission id="TRADT30401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchcond" replace="instance" resultref="/root/temp/srchcond"/>
  254. <submission id="TRADT30406" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/dutdeptinfo" replace="instance" resultref="/root/temp/dutdeptinfo"/>
  255. <submission id="TRADT10203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptinfo" replace="instance" resultref="/root/hidden/deptlist"/>
  256. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post"/>
  257. <submission id="TRADT30701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/srchcond"/>
  258. <!-- (20090807)-->
  259. <submission id="TRADT30310" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/datacheck"/>
  260. <!-- (20090807)-->
  261. <!-- 출고부서조회-->
  262. <submission id="TRADT01106" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/misdeptlist"/>
  263. <submission id="submission1" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchcond" replace="instance" resultref="/root/temp/srchcond"/>
  264. <script type="javascript" ev:event="xforms-ready">
  265. <![CDATA[
  266. //병동 체크박스 조회
  267. //model.setValue("/root/send/srchdata/deptflag", "D");
  268. //submit("TRADT10203");
  269. //success = submit("TRADT10203");
  270. //if (success) astfAddCombo("/root/init/deptlist","ward","wardcd,wardnm","H,전체");
  271. model.setValue("/root/send/srchdata/enddd", getCurrentDate());
  272. model.setValue("/root/send/srchdata/statdd", getCurrentDate());
  273. //chk_allward.attribute("visibility")="hidden"; //병동 전체 체크박스 숨김.
  274. chk_ward.attribute("visibility")="hidden"; //병동 체크박스 숨김.
  275. button1.disabled = true; //마감버튼 비활성화
  276. button3.disabled = true; //마감취소버튼 비활성화
  277. btn_save.disabled = true; //저장버튼 비활성화
  278. button4.disabled = true; //전송버튼 비활성화
  279. button19.disabled = true; //수불대장출력버튼 비활성화
  280. btn_prt.disabled = true; //출력버튼 비활성화
  281. //향정출력버튼
  282. button7.visible = false;
  283. button8.visible = false;
  284. chkbox_day.visible = false;
  285. // 진료과세팅
  286. ////zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/init/orddept"); //부서코드 콤보조회
  287. //if ( model.instances(0).selectSingleNode("/root/init/orddept/dept") != null) {
  288. // astfAddCombo("/root/init/orddept","dept","deptcd,depthngnm",",전체");
  289. //}
  290. ////copyNodeType("/root/temp/drugdeptinfo","/root/init/orddept", "replace");
  291. ////zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "W", "/root/init/deptlist"); //부서코드 콤보조회
  292. //copyNodeType("/root/temp/drugdeptinfo","/root/init/deptlist", "after");
  293. //병동 Combo 조회
  294. model.makeValue("/root/send/srchcond/deptflag", "D");
  295. model.makeValue("/root/send/srchcond/narcflag", "M");
  296. submit("TRADT30401");
  297. model.copyNode("/root/temp/drugdeptinfo","/root/temp/srchcond");
  298. ////copyNodeType("/root/temp/drugdeptinfo","/root/temp/srchcond/dept", "after");
  299. //병동 Combo 조회
  300. //model.makeValue("/root/send/deptinfo/deptflag", "W");
  301. //submit("TRADT10203");
  302. model.makeValue("/root/send/srchcond/deptflag", "W");
  303. submit("TRADT30401");
  304. astfAddCombo("/root/hidden/deptlist", "ward", "wardcd,wardnm", "T,전체");
  305. ////copyNodeType("/root/temp/drugdeptinfo","/root/temp/srchcond", "after");
  306. //submit("TRADT30406");
  307. //copyNodeListType("/root/temp/drugdeptinfo","/root/temp/dutdeptinfo/dept ", "after");
  308. //copyNodeListType("/root/temp/srchcond","/root/temp/dutdeptinfo/dept ", "after");
  309. //astfAddCombo("/root/temp/srchcond", "dept", "deptcd,deptnm", ",");
  310. model.refresh();
  311. submit("TRADT30301");
  312. if(model.getValue("/root/main/srchcond/narclist/allendyn") == "Y" ) {
  313. button1.disabled = false;
  314. button6.disabled = false;
  315. }
  316. if( model.getValue("/root/send/srchdata/narcflag") == "M") {
  317. //향정출력버튼
  318. button7.visible = false;
  319. button8.visible = false;
  320. button1.disabled = true;
  321. button3.disabled = true;
  322. btn_save.disabled = true;
  323. grd_prcplist.visible = true;
  324. grd_pshchlist.visible = false;
  325. radio3.visible = true;
  326. radio5.visible = true;
  327. radio6.visible = true;
  328. radio4.value = "A";
  329. radio1.value = "I";
  330. group5.visible = false;
  331. // 수불일자 마감일 invisible
  332. caption9.visible = false;
  333. input5.visible = false;
  334. caption9.refresh();
  335. input5.refresh();
  336. } else if( model.getValue("/root/send/srchdata/narcflag") == "H") {
  337. //향정출력버튼
  338. button7.visible = true;
  339. button7.disabled = true;
  340. button8.visible = true;
  341. button1.disabled = false;
  342. button3.disabled = false;
  343. btn_save.disabled = false;
  344. grd_prcplist.visible = false;
  345. grd_pshchlist.visible = true;
  346. radio3.visible = false;
  347. radio5.visible = false;
  348. radio6.visible = false;
  349. radio4.value = "A";
  350. radio1.value = "I";
  351. group5.visible = true;
  352. if(model.getValue("/root/send/srchdata/prtmode") == "Y") {
  353. caption9.visible = true;
  354. input5.visible = true;
  355. caption9.refresh();
  356. input5.refresh();
  357. }
  358. }
  359. // 출고부서 조회, 설정
  360. submit("TRADT01106");
  361. if(combo1.length == 1) {
  362. combo1.select(0);
  363. }else if(combo1.length > 1) {
  364. // 2010.01.25 pymi 입원주사조제실 제거
  365. if(model.getValue("/root/init/misdeptlist/deptlist[1]/deptcd") == "3242104000") {
  366. combo1.choices.itemset.attribute("nodeset") = "/root/init/misdeptlist/deptlist[deptcd != '3242104000' ]";
  367. }
  368. // (e)
  369. astfAddCombo("/root/init/misdeptlist", "deptlist","deptcd,deptnm", "T,전체(조회용)");
  370. combo1.value = "T";
  371. }
  372. ]]>
  373. </script>
  374. <script type="javascript">
  375. <![CDATA[
  376. function fView(){
  377. model.setValue("/root/send/srchdata/stocyn", "");
  378. submit("TRADT30302");
  379. var sumqty =0;
  380. for ( var i = 1; i < grd_prcplist.rows; i++){
  381. sumqty = sumqty + parseFloat(model.getValue("/root/main/prcplist/item["+i+"]/deliveqty"));
  382. }
  383. model.setValue("/root/send/srchdata/totsumqty", sumqty);
  384. model.refresh();
  385. }
  386. //수불대장 출력시 전체 약품에 대한 내역을 출력하기위해 약품별 출고내역 조회
  387. function fPrint1(){
  388. var cnt = 1;
  389. model.setValue("/root/send/srchdata/ioflag", "");
  390. model.removeNodeset("/root/send/data/print1/item");
  391. model.removeNodeset("/root/main/prcplist/item");
  392. //model.makeNode("/root/send/data/print1");
  393. for ( var i = 1; i <= grd_druglist.rows-1; i++){
  394. model.setValue("/root/send/srchdata/drugcd", model.getValue("/root/main/srchcond/narclist["+i+"]/narccd"));
  395. //--------------------------(20090807)
  396. //마약이면서 향정수불을 체크한다.
  397. submit("TRADT30310", false);
  398. var dataChk = model.getValue("/root/main/datacheck/datachk/yn");
  399. //alert(dataChk);
  400. if(dataChk != "Y"){
  401. continue;
  402. }
  403. //--------------------------
  404. submit("TRADT30302", false);
  405. for ( var j = 1; j <= getNodesetCount("/root/main/prcplist/item") ; j++){
  406. model.makeNode("/root/send/data/print1/item["+cnt+"]");
  407. model.setValue("/root/main/prcplist/item["+j+"]/narccd", model.getValue("/root/main/srchcond/narclist["+i+"]/narccd"));
  408. model.setValue("/root/main/prcplist/item["+j+"]/narcnm", model.getValue("/root/main/srchcond/narclist["+i+"]/narcnm"));
  409. model.setValue("/root/main/prcplist/item["+j+"]/goodspec", model.getValue("/root/main/srchcond/narclist["+i+"]/goodspec"));
  410. model.setValue("/root/main/prcplist/item["+j+"]/specunit", model.getValue("/root/main/srchcond/narclist["+i+"]/specunit"));
  411. model.setValue("/root/main/prcplist/item["+j+"]/custnm", model.getValue("/root/main/srchcond/narclist["+i+"]/custnm"));
  412. model.makeValue("/root/main/prcplist/item["+j+"]/hospnm", model.getValue("/root/main/srchcond/narclist["+i+"]/hospnm"));
  413. model.makeValue("/root/main/prcplist/item["+j+"]/lncsno", model.getValue("/root/main/srchcond/narclist["+i+"]/lncsno"));
  414. model.makeValue("/root/main/prcplist/item["+j+"]/mngtrid", model.getValue("/root/main/srchcond/narclist["+i+"]/mngtrid"));
  415. //model.setValue("/root/main/prcplist/item["+j+"]/brngfwrdqty", model.getValue("/root/main/srchcond/narclist["+i+"]/brngfwrdqty"));
  416. //model.setValue("/root/main/prcplist/item["+j+"]/winqty", model.getValue("/root/main/srchcond/narclist["+i+"]/winqty"));
  417. model.copyNode("/root/send/data/print1/item["+cnt+"]", "/root/main/prcplist/item["+j+"]");
  418. cnt = cnt + 1;
  419. }
  420. }
  421. model.removeNodeset("/root/send/data/print1/item["+cnt+"]");
  422. model.refresh();
  423. }
  424. // 향정 일지
  425. function fPTDrugPnt(){
  426. model.setValue("/root/send/srchdata/drugkindnm", "내복약");
  427. if(model.getValue("/root/send/srchdata/prnnkind") == "N") { //내복약 일지
  428. model.setValue("/root/send/srchdata/drugkind", "N");
  429. submit("TRADT30305");
  430. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  431. exeReportPreview("RPADT30305", "XMLSTR", "RPADT30305", "", "false","","","","","false", "", "");
  432. } else {
  433. exeReportPreview("RPADT30305", "XMLSTR", "RPADT30305", "", "true","","","","","true", "", "");
  434. }
  435. }
  436. model.setValue("/root/send/srchdata/drugkindnm", "주사약");
  437. if(model.getValue("/root/send/srchdata/prnmkind") == "M"){
  438. if(model.getValue("/root/send/srchdata/prniflag") == "I" || model.getValue("/root/send/srchdata/prnaflag") == "A") { // 병동
  439. model.setValue("/root/send/srchdata/drugkind", "M");
  440. submit("TRADT30305");
  441. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  442. exeReportPreview("RPADT30305", "XMLSTR", "RPADT30305", "", "false","","","","","false", "", "");
  443. } else {
  444. exeReportPreview("RPADT30305", "XMLSTR", "RPADT30305", "", "true","","","","","true", "", "");
  445. }
  446. }
  447. }
  448. model.setValue("/root/send/srchdata/drugkindnm", "외용약");
  449. if(model.getValue("/root/send/srchdata/prnykind") == "Y") {
  450. model.setValue("/root/send/srchdata/drugkind", "Y");
  451. submit("TRADT30305");
  452. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  453. exeReportPreview("RPADT30305", "XMLSTR", "RPADT30305", "", "false","","","","","false", "", "");
  454. } else {
  455. exeReportPreview("RPADT30305", "XMLSTR", "RPADT30305", "", "true","","","","","true", "", "");
  456. }
  457. }
  458. }
  459. ]]>
  460. </script>
  461. <submission id="TXADT30305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/ret"/>
  462. <submission id="TXADT30304" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/ret"/>
  463. <submission id="TRADT30307" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/hidden/prninfo"/>
  464. <submission id="TRADT30311" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/hidden/prninfo"/>
  465. </model>
  466. </xhtml:head>
  467. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  468. <script type="javascript" ev:event="onkeyup">
  469. <![CDATA[
  470. if (event.keyCode==121){
  471. grp_all.visible=true;
  472. group6.visible = true;
  473. } else if (event.keyCode == 35){
  474. input10.visible = true;
  475. model.refresh();
  476. } else if (event.keyCode == 120){
  477. button17.visible = true;
  478. }
  479. ]]>
  480. </script>
  481. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  482. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:185px; height:13px; ">마약/향정 입출고내역</caption>
  483. </group>
  484. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; color:#ffffff; ">
  485. <datagrid id="grd_prcplist" nodeset="/root/main/prcplist/item" visibility="hidden" backcoloralternate="#f0f0f0" caption="^일자^I/O^투약번호^등록번호^등록번호^성명^성별^나이^주소^진단코드^주요증상^투여량^출고량^비고^재고^SeqNo^narcbarcode^caption1^caption2" colsep="^" colwidth="28, 85, 27, 60, 85, 20, 63, 34, 38, 173, 54, 79, 54, 55, 5, 48, 100, 100, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:260px; top:100px; width:934px; height:642px; ">
  486. <col checkvalue="Y,N" ref="chkyn" type="checkbox" style="text-align:right; "/>
  487. <col ref="prcpdd" type="inputdate" format="yyyy-mm-dd"/>
  488. <col ref="orgioflag" type="input" validateformat="true" style="text-align:center; "/>
  489. <col ref="drugno" style="text-align:right; "/>
  490. <col ref="pid" type="inputbutton" maxlength="10"/>
  491. <col ref="udt" type="inputbutton"/>
  492. <col ref="hngnm" type="input"/>
  493. <col ref="sex" type="input" maxlength="3"/>
  494. <col ref="age" type="input" maxlength="5"/>
  495. <col ref="addr" type="input" maxlength="300"/>
  496. <col ref="diagcd" type="input" maxlength="5"/>
  497. <col ref="sympnm" type="combo">
  498. <choices>
  499. <item>
  500. <label>Pain</label>
  501. <value>Pain</value>
  502. </item>
  503. <item>
  504. <label>Cough</label>
  505. <value>Cough</value>
  506. </item>
  507. </choices>
  508. </col>
  509. <col imemode="disabled" ref="ordqty" type="input" format="(-)####.##" maxlength="8" style="text-align:right; "/>
  510. <col ref="deliveqty" type="input" format="(-)####.##" maxlength="8" style="text-align:right; "/>
  511. <col ref="etccau" type="input" visibility="hidden"/>
  512. <col ref="stocqty" type="input" format="(-)####.##" maxlength="8" style="text-align:right; "/>
  513. <col ref="seqno" visibility="hidden"/>
  514. <col ref="narcbarcode" visibility="hidden"/>
  515. <col ref="drugsumtm" visibility="hidden"/>
  516. <col ref="ioflag" visibility="hidden"/>
  517. <script type="javascript" ev:event="onbuttonclick">
  518. <![CDATA[
  519. //if(isDataCell()) { // button은 datacell로 인식하지 않음 - 2009-06-11 - 김귀남
  520. if ( grd_prcplist.colRef("pid") ==grd_prcplist.col){
  521. modal("SPPMC02500",0,100,150,"SPPMC02500","","");
  522. if(model.getValue("/root/main/patinfo/patinfolist/pid") != "") {
  523. model.setValue ( "/root/main/prcplist/item["+grd_prcplist.row+"]/pid",model.getValue("/root/main/patinfo/patinfolist/pid"));
  524. model.setValue ( "/root/main/prcplist/item["+grd_prcplist.row+"]/hngnm",model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  525. model.setValue ( "/root/main/prcplist/item["+grd_prcplist.row+"]/sex",model.getValue("/root/main/patinfo/patinfolist/sex"));
  526. model.setValue ( "/root/main/prcplist/item["+grd_prcplist.row+"]/age",model.getValue("/root/main/patinfo/patinfolist/age"));
  527. model.setValue ( "/root/main/prcplist/item["+grd_prcplist.row+"]/addr",model.getValue("/root/main/patinfo/patinfolist/addr")+model.getValue("/root/main/patinfo/patinfolist/detladdr"));
  528. }
  529. if(grd_prcplist.rowStatus(grd_prcplist.row) != "1") {
  530. grd_prcplist.addStatus(grd_prcplist.row,"update");
  531. }
  532. model.refresh();
  533. } else if ( grd_prcplist.colRef("udt") ==grd_prcplist.col){
  534. model.makeValue("/root/source/pid", model.getValue("/root/main/prcplist/item["+grd_prcplist.mouseRow+"]/pid"));
  535. modal("SPPMO01400",0,100,150,"SPPMO01400","/root/source/pid","/root/source/pid");
  536. }
  537. //}
  538. ]]>
  539. </script>
  540. <script type="javascript" ev:event="onclick">
  541. <![CDATA[
  542. if(isDataCell()) {
  543. if(grd_prcplist.colRef("chkyn") == grd_prcplist.mouseCol) {
  544. model.setValue("/root/send/data/narcstocdata", grd_prcplist.getUpdateData());
  545. submit("TXADT30304");
  546. submit("TRADT30302");
  547. }
  548. }
  549. ]]>
  550. </script>
  551. </datagrid>
  552. <datagrid id="grd_pshchlist" nodeset="/root/main/prcplist/item" backcoloralternate="#f0f0f0" caption="^일자^I/O^투약번호^등록번호^등록번호^성명^성별^나이^진료과^투여량^출고량^비고^재고^집계시간^SeqNo^narcbarcode^caption1" colsep="^" colwidth="28, 85, 27, 60, 85, 21, 63, 34, 38, 173, 54, 55, 5, 48, 70, 100, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:260px; top:100px; width:934px; height:642px; ">
  553. <col checkvalue="Y,N" ref="chkyn" type="checkbox" style="text-align:right; "/>
  554. <col ref="prcpdd" type="inputdate" format="yyyy-mm-dd"/>
  555. <col ref="orgioflag" style="text-align:center; "/>
  556. <col ref="drugno" style="text-align:right; "/>
  557. <col ref="pid" type="inputbutton" maxlength="10"/>
  558. <col ref="udt" type="inputbutton"/>
  559. <col ref="hngnm" type="input"/>
  560. <col ref="sex" type="input" maxlength="3"/>
  561. <col ref="age" type="input" maxlength="5"/>
  562. <col ref="addr" type="combo" maxlength="300">
  563. <choices>
  564. <itemset nodeset="/root/temp/drugdeptinfo/dept">
  565. <label ref="deptnm"/>
  566. <value ref="deptcd"/>
  567. </itemset>
  568. </choices>
  569. </col>
  570. <col imemode="disabled" ref="ordqty" type="input" format="(-)####.##" maxlength="8" style="text-align:right; "/>
  571. <col ref="deliveqty" type="input" format="(-)####.##" maxlength="8" style="text-align:right; "/>
  572. <col ref="etccau" type="input" visibility="hidden"/>
  573. <col ref="stocqty" type="input" format="(-)####.##" maxlength="8" style="text-align:right; "/>
  574. <col ref="drugsumtm" format="hh:nn:ss" style="text-align:right; "/>
  575. <col ref="seqno" visibility="hidden"/>
  576. <col ref="narcbarcode" visibility="hidden"/>
  577. <col ref="ioflag" visibility="hidden"/>
  578. <script type="javascript" ev:event="onbuttonclick">
  579. <![CDATA[
  580. //if(isDataCell()) { // button은 datacell로 인식하지 않음 - 2009-06-11 - 김귀남
  581. if ( grd_pshchlist.colRef("pid") ==grd_pshchlist.col){
  582. modal("SPPMC02500",0,100,150,"SPPMC02500","","");
  583. model.setValue ( "/root/main/prcplist/item["+grd_pshchlist.row+"]/pid",model.getValue("/root/main/patinfo/patinfolist/pid"));
  584. model.setValue ( "/root/main/prcplist/item["+grd_pshchlist.row+"]/hngnm",model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  585. model.setValue ( "/root/main/prcplist/item["+grd_pshchlist.row+"]/sex",model.getValue("/root/main/patinfo/patinfolist/sex"));
  586. model.setValue ( "/root/main/prcplist/item["+grd_pshchlist.row+"]/age",model.getValue("/root/main/patinfo/patinfolist/age"));
  587. model.refresh();
  588. } else if ( grd_pshchlist.colRef("udt") ==grd_pshchlist.col){
  589. model.makeValue("/root/source/pid", model.getValue("/root/main/prcplist/item[" + grd_pshchlist.mouseRow+"]/pid"));
  590. modal("SPPMO01400",0,100,150,"SPPMO01400","/root/source/pid","/root/source/pid");
  591. }
  592. //}
  593. ]]>
  594. </script>
  595. <script type="javascript" ev:event="onclick">
  596. <![CDATA[
  597. if(isDataCell()) {
  598. if(grd_prcplist.colRef("chkyn") == grd_prcplist.mouseCol) {
  599. model.setValue("/root/send/data/narcstocdata", grd_prcplist.getUpdateData());
  600. submit("TXADT30304");
  601. submit("TRADT30302");
  602. }
  603. }
  604. ]]>
  605. </script>
  606. </datagrid>
  607. <button id="button5" class="btn2_letter2" style="left:1152px; top:78px; width:42px; height:19px; ">
  608. <caption>엑셀</caption>
  609. <script type="javascript" ev:event="DOMActivate">
  610. <![CDATA[
  611. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  612. if(model.getValue("/root/send/srchdata/narcflag") =="M") {
  613. grd_prcplist.saveExcel(file);
  614. }else if(model.getValue("/root/send/srchdata/narcflag") =="H") {
  615. grd_pshchlist.saveExcel(file);
  616. }
  617. ]]>
  618. </script>
  619. </button>
  620. <group id="group2" style="left:0px; top:5px; width:1195px; height:65px; ">
  621. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:3px; width:1194px; height:62px; background-color:#fffbf2; border-color:#ffd799; "/>
  622. <line id="line13" class="line_4" style="x1:1120px; y1:13px; x2:1120px; y2:63px; border-color:#ffe4bb; border-left-style:solid; "/>
  623. <caption id="caption2" class="search_name" style="left:215px; top:11px; width:96px; height:17px; ">수불일자 :</caption>
  624. <caption id="caption3" class="search_name" style="left:15px; top:11px; width:86px; height:17px; ">구분 :</caption>
  625. <select1 id="radio2" ref="/root/send/srchdata/narcflag" class="radio_search" appearance="full" cols="3" rows="1" overflow="visible" style="left:79px; top:11px; width:90px; height:20px; border-style:none; ">
  626. <choices>
  627. <item>
  628. <label>마약</label>
  629. <value>M</value>
  630. </item>
  631. <item>
  632. <label>향정</label>
  633. <value>H</value>
  634. </item>
  635. </choices>
  636. <script type="javascript" ev:event="xforms-select">
  637. <![CDATA[
  638. submit("TRADT30301");
  639. if( model.getValue("/root/send/srchdata/narcflag") == "M") {
  640. //향정출력버튼
  641. button7.visible = false;
  642. button8.visible = false;
  643. button1.disabled = true;
  644. button3.disabled = true;
  645. btn_save.disabled = true;
  646. grd_prcplist.visible = true;
  647. grd_pshchlist.visible = false;
  648. radio3.visible = true;
  649. radio5.visible = true;
  650. radio6.visible = true;
  651. radio4.value = "A";
  652. radio1.value = "I";
  653. group5.visible = false;
  654. // 수불일자 마감일 invisible
  655. caption9.visible = false;
  656. input5.visible = false;
  657. caption9.refresh();
  658. input5.refresh();
  659. txt_narc.visible = true;
  660. txt_phy.visible = false;
  661. bool1.visible = false;
  662. chkbox_day.visible = false;
  663. } else if( model.getValue("/root/send/srchdata/narcflag") == "H") {
  664. //향정출력버튼
  665. button7.visible = true;
  666. button7.disabled = true;
  667. button8.visible = true;
  668. button1.disabled = false;
  669. button3.disabled = false;
  670. btn_save.disabled = false;
  671. grd_prcplist.visible = false;
  672. grd_pshchlist.visible = true;
  673. radio3.visible = false;
  674. radio5.visible = false;
  675. radio6.visible = false;
  676. radio4.value = "A";
  677. radio1.value = "I";
  678. group5.visible = true;
  679. chkbox_day.visible = true;
  680. if(model.getValue("/root/send/srchdata/prtmode") == "Y") {
  681. caption9.visible = true;
  682. input5.visible = true;
  683. caption9.refresh();
  684. input5.refresh();
  685. }
  686. txt_narc.visible = false;
  687. txt_phy.visible = true;
  688. bool1.visible = true;
  689. }
  690. model.removeNodeset("/root/main/prcplist/item");
  691. model.refresh();
  692. ]]>
  693. </script>
  694. </select1>
  695. <caption id="caption6" class="search_name" style="left:505px; top:39px; width:86px; height:17px; ">수행부서 :</caption>
  696. <output id="ipt_wardnm" ref="/root/send/srchdata/srchwardnm" class="output_search" style="left:595px; top:38px; width:480px; height:19px; ">
  697. <script type="javascript" ev:event="onclick">
  698. <![CDATA[
  699. if (chk_ward.attribute("visibility")=="hidden") {
  700. chk_ward.attribute("visibility")="visible";
  701. chk_allward.attribute("visibility")="visible";
  702. } else if (chk_ward.attribute("visibility")=="visible") {
  703. chk_ward.attribute("visibility")="hidden";
  704. chk_allward.attribute("visibility")="hidden";
  705. }
  706. ]]>
  707. </script>
  708. </output>
  709. <button id="btn_sea" class="btn1_letter2" style="left:1130px; top:28px; width:56px; height:22px; ">
  710. <caption>조회</caption>
  711. <script type="javascript" ev:event="DOMActivate">
  712. <![CDATA[
  713. if(model.getValue("/root/send/srchdata/srchdrugkind") == "") {
  714. messageBox("약품종류를 선택하세요", "I900");
  715. return;
  716. }
  717. submit("TRADT30301");
  718. //submit("TRADT30302");
  719. ]]>
  720. </script>
  721. </button>
  722. <select1 id="radio3" ref="/root/send/srchdata/endflag" class="radio_search" appearance="full" cols="4" rows="1" overflow="visible" style="left:345px; top:40px; width:80px; height:20px; border-style:none; ">
  723. <choices>
  724. <item>
  725. <label>D1</label>
  726. <value>D1</value>
  727. </item>
  728. <item>
  729. <label>D2</label>
  730. <value>D2</value>
  731. </item>
  732. </choices>
  733. <script type="javascript" ev:event="xforms-select">
  734. <![CDATA[
  735. //submit("TRADT30301");
  736. fView();
  737. //마감구분이 전체일 경우만 전송/수불대장출력 버튼 활성화
  738. button4.disabled = true;
  739. //button6.disabled = true;
  740. button19.disabled = true;
  741. //출력/마감/마감취소/저장 버튼 활성화
  742. button1.disabled = false;
  743. button3.disabled = false;
  744. if(combo1.value != "T"){
  745. btn_prt.disabled = false;
  746. btn_save.disabled = false;
  747. }
  748. ]]>
  749. </script>
  750. </select1>
  751. <input id="input3" ref="/root/send/srchdata/enddd" class="input_search" inputtype="date" style="left:305px; top:10px; width:90px; height:19px; ">
  752. <script type="javascript" ev:event="xforms-value-changed">
  753. <![CDATA[
  754. if(model.getValue("/root/send/srchdata/enddd") < "20081003") {
  755. button19.disabled = true;
  756. button6.disabled = true;
  757. } else {
  758. button19.disabled = false;
  759. button6.disabled = false;
  760. }
  761. submit("TRADT30301");
  762. ]]>
  763. </script>
  764. </input>
  765. <input id="input9" ref="/root/send/srchdata/barcode" class="input_search" imemode="alpha" style="left:595px; top:10px; width:205px; height:19px; text-align:left; ">
  766. <script type="javascript" ev:event="onkeyup">
  767. <![CDATA[
  768. if(event.keyCode == "13") {
  769. //input9.disabled=true;
  770. setInputNodeCurText();
  771. var cnt=0;
  772. var matchcnt = 0;
  773. var barcode = model.getValue("/root/send/srchdata/barcode").toUpperCase();
  774. //model.setValue( "/root/main/prcplist/item[narcbarcode='"+model.getValue("/root/send/srchdata/barcode")+"']/chkyn","Y");
  775. if(barcode != "") {
  776. for ( var i = 0; i < grd_prcplist.rows; i++){
  777. if(model.getValue( "/root/main/prcplist/item[" + i + "]/narcbarcode") == barcode){
  778. model.setValue( "/root/main/prcplist/item[" + i + "]/chkyn", "Y");
  779. grd_prcplist.rowStatus(i) = 2;
  780. matchcnt++;
  781. }
  782. if (model.getValue("/root/main/prcplist/item["+i+"]/chkyn")=="Y"){
  783. cnt++;
  784. }
  785. }
  786. //model.refresh();
  787. if(matchcnt == 0) {
  788. messageBox("바코드와 일치하는 처방이", "I004");
  789. } else {
  790. model.setValue("/root/send/data/narcstocdata", grd_prcplist.getUpdateData());
  791. submit("TXADT30304", false); //바코드체크 업데이트
  792. //submit("TRADT30302");
  793. model.setValue("/root/send/srchdata/chkcnt", cnt + "/" + (grd_prcplist.rows-1));
  794. }
  795. }
  796. model.setValue("/root/send/srchdata/barcode", "");
  797. model.setFocus("input9");
  798. model.refresh();
  799. //input9.disabled=false;
  800. }
  801. ]]>
  802. </script>
  803. </input>
  804. <caption id="caption7" class="search_name" style="left:505px; top:10px; width:75px; height:17px; ">바코드 :</caption>
  805. <caption id="caption4" class="search_name" visibility="visible" style="left:810px; top:10px; width:99px; height:17px; ">약품종류 :</caption>
  806. <output id="output4" ref="/root/send/srchdata/chkcnt" style="left:805px; top:25px; width:115px; height:19px; font-size:10pt; font-weight:bold; color:#0000ff; "/>
  807. <caption id="caption8" class="search_name" style="left:215px; top:40px; width:96px; height:17px; ">마감구분 :</caption>
  808. <select1 id="radio4" ref="/root/send/srchdata/endflag" class="radio_search" appearance="full" cols="4" rows="1" overflow="visible" style="left:453px; top:40px; width:45px; height:20px; border-style:none; ">
  809. <choices>
  810. <item>
  811. <label>전체</label>
  812. <value>A</value>
  813. </item>
  814. </choices>
  815. <script type="javascript" ev:event="xforms-select">
  816. <![CDATA[
  817. //submit("TRADT30301");
  818. fView();
  819. if(model.getValue("/root/send/srchdata/narcflag") == "M") {
  820. //마감구분이 전체일 경우만 전송/수불대장출력 버튼 활성화
  821. button4.disabled = false;
  822. //button6.disabled = false;
  823. button19.disabled = false;
  824. //마감구분이 전체일 경우 출력/마감/마감취소/저장 버튼 비활성화
  825. button1.disabled = true;
  826. button3.disabled = true;
  827. if(combo1.value != "T"){
  828. //btn_prt.disabled = true;
  829. btn_save.disabled = true;
  830. }
  831. } else if(model.getValue("/root/send/srchdata/narcflag") == "H") {
  832. //마감구분이 전체일 경우만 전송/수불대장출력 버튼 활성화
  833. button4.disabled = true;
  834. //button6.disabled = true;
  835. //마감구분이 전체일 경우 출력/마감/마감취소/저장 버튼 비활성화
  836. button1.disabled = false;
  837. button3.disabled = false;
  838. if(combo1.value != "T"){
  839. btn_save.disabled = false;
  840. }
  841. }
  842. ]]>
  843. </script>
  844. </select1>
  845. <select1 id="radio5" ref="/root/send/srchdata/endflag" appearance="full" cols="4" rows="1" overflow="visible" style="left:305px; top:40px; width:40px; height:20px; font-weight:bold; color:#ffffff; background-color:#ff6600; border-style:none; ">
  846. <choices>
  847. <item>
  848. <label>D0</label>
  849. <value>N2</value>
  850. </item>
  851. </choices>
  852. <script type="javascript" ev:event="xforms-select">
  853. <![CDATA[
  854. //submit("TRADT30301");
  855. fView();
  856. //마감구분이 전체일 경우만 전송/수불대장출력 버튼 활성화
  857. button4.disabled = true;
  858. //button6.disabled = true;
  859. button19.disabled = true;
  860. //출력/마감/마감취소/저장 버튼 활성화
  861. button1.disabled = false;
  862. button3.disabled = false;
  863. if(combo1.value != "T"){
  864. btn_prt.disabled = false;
  865. btn_save.disabled = false;
  866. }
  867. ]]>
  868. </script>
  869. </select1>
  870. <select1 id="radio6" ref="/root/send/srchdata/endflag" appearance="full" cols="4" rows="1" overflow="visible" style="left:415px; top:40px; width:35px; height:20px; font-weight:bold; color:#ffffff; background-color:#ff6600; border-style:none; ">
  871. <choices>
  872. <item>
  873. <label>N</label>
  874. <value>N1</value>
  875. </item>
  876. </choices>
  877. <script type="javascript" ev:event="xforms-select">
  878. <![CDATA[
  879. //submit("TRADT30301");
  880. fView();
  881. //마감구분이 전체일 경우만 전송/수불대장출력 버튼 활성화
  882. button4.disabled = true;
  883. //button6.disabled = true;
  884. button19.disabled = true;
  885. //출력/마감/마감취소/저장 버튼 활성화
  886. button1.disabled = false;
  887. button3.disabled = false;
  888. if(combo1.value != "T"){
  889. btn_prt.disabled = false;
  890. btn_save.disabled = false;
  891. }
  892. ]]>
  893. </script>
  894. </select1>
  895. <input id="input5" ref="/root/send/srchdata/statdd" class="input_search" visibility="hidden" inputtype="date" style="left:410px; top:10px; width:90px; height:19px; ">
  896. <script type="javascript" ev:event="xforms-value-changed">
  897. <![CDATA[
  898. ]]>
  899. </script>
  900. </input>
  901. <caption id="caption9" visibility="hidden" style="left:398px; top:11px; width:15px; height:20px; ">~</caption>
  902. <select id="checkbox7" ref="/root/send/srchdata/srchdrugkind" overflow="visible" appearance="full" cols="2" style="left:900px; top:10px; width:100px; height:20px; border-style:none; ">
  903. <choices>
  904. <item>
  905. <label>약</label>
  906. <value>N','Y</value>
  907. </item>
  908. <item>
  909. <label>주사</label>
  910. <value>M</value>
  911. </item>
  912. </choices>
  913. </select>
  914. <caption id="caption10" style="left:5px; top:35px; width:70px; height:20px; font-weight:bold; color:#ff0000; ">실출고부서</caption>
  915. <select1 id="combo1" ref="/root/send/srchdata/stocdeptcd" appearance="minimal" style="left:79px; top:35px; width:131px; height:19px; ">
  916. <choices>
  917. <itemset nodeset="/root/init/misdeptlist/deptlist">
  918. <label ref="deptnm"/>
  919. <value ref="deptcd"/>
  920. </itemset>
  921. </choices>
  922. <script type="javascript" ev:event="xforms-value-changed">
  923. <![CDATA[
  924. if(combo1.value == "T") {
  925. if(model.getValue("/root/send/srchdata/endflag") != "A") {
  926. btn_save.disabled = true;
  927. btn_prt.disabled = true;
  928. }
  929. if(model.getValue("/root/send/srchdata/narcflag") == "M" ) {
  930. //전체일 경우만 전송/수불대장출력 버튼 활성화
  931. button4.disabled = false;
  932. //button6.disabled = false;
  933. if(model.getValue("/root/send/srchdata/endflag") == "A") {
  934. button19.disabled = false;
  935. }
  936. } else if(model.getValue("/root/send/srchdata/narcflag") == "H") {
  937. //전체일 경우만 전송/수불대장출력 버튼 활성화
  938. button4.disabled = false;
  939. //button6.disabled = false;
  940. if(model.getValue("/root/send/srchdata/endflag") == "A") {
  941. button19.disabled = false;
  942. }
  943. }
  944. } else {
  945. if(model.getValue("/root/send/srchdata/endflag") != "A") {
  946. btn_save.disabled = false;
  947. }
  948. btn_prt.disabled = false;
  949. button4.disabled = true;
  950. //button6.disabled = true;
  951. button19.disabled = true;
  952. }
  953. ]]>
  954. </script>
  955. </select1>
  956. <select id="chkbox_day" ref="/root/send/srchdata/multday" overflow="visible" appearance="full" cols="2" style="left:173px; top:11px; width:45px; height:20px; border-style:none; ">
  957. <choices>
  958. <item>
  959. <label>기간</label>
  960. <value>Y</value>
  961. </item>
  962. </choices>
  963. </select>
  964. </group>
  965. <button id="btn_grdadd" class="btn2_letter3" disabled="true" style="left:984px; top:78px; width:53px; height:19px; ">
  966. <caption>행추가</caption>
  967. <script type="javascript" ev:event="DOMActivate">
  968. <![CDATA[
  969. if(model.getValue("/root/send/srchdata/narcflag") =="M") {
  970. grd_prcplist.addItem();
  971. model.setValue("/root/main/prcplist/item[" + grd_prcplist.row + "]/prcpdd", model.getValue("/root/send/srchdata/enddd"));
  972. //model.setValue("/root/main/prcplist/item[" + grd_prcplist.row + "]/ioflag", model.getValue("/root/send/srchdata/ioflag"));
  973. }else if(model.getValue("/root/send/srchdata/narcflag") == "H") {
  974. grd_pshchlist.addItem();
  975. model.setValue("/root/main/prcplist/item[" + grd_pshchlist.row + "]/prcpdd", model.getValue("/root/send/srchdata/enddd"));
  976. //model.setValue("/root/main/prcplist/item[" + grd_pshchlist.row + "]/ioflag", model.getValue("/root/send/srchdata/ioflag"));
  977. }
  978. ]]>
  979. </script>
  980. </button>
  981. <button id="btn_grdcopy" class="btn2_letter3" disabled="true" style="left:1040px; top:78px; width:53px; height:19px; ">
  982. <caption>행복사</caption>
  983. <script type="javascript" ev:event="DOMActivate">
  984. <![CDATA[
  985. var chkrow = 0;
  986. if(model.getValue("/root/send/srchdata/narcflag") =="M") {
  987. copyNodesetType("/root/main/prcplist/item[" + grd_prcplist.row + "]", "/root/main/prcplist/item[" + grd_prcplist.row + "]", "after");
  988. model.refresh();
  989. chkrow = grd_prcplist.rows-1;
  990. model.setValue("/root/main/prcplist/item[" + chkrow + "]/narcbarcode", ""); //직접입력건은 바코드 생성 하지 않음
  991. grd_prcplist.addStatus(chkrow, "insert");
  992. }else if(model.getValue("/root/send/srchdata/narcflag") == "H") {
  993. copyNodesetType("/root/main/prcplist/item[" + grd_pshchlist.row + "]", "/root/main/prcplist/item[" + grd_pshchlist.row + "]", "after");
  994. model.refresh();
  995. chkrow = grd_pshchlist.rows-1;
  996. model.setValue("/root/main/prcplist/item[" + chkrow + "]/narcbarcode", ""); //직접입력건은 바코드 생성 하지 않음
  997. grd_pshchlist.addStatus(chkrow, "insert");
  998. }
  999. ]]>
  1000. </script>
  1001. </button>
  1002. <button id="btn_grddel" class="btn2_letter3" disabled="true" style="left:1096px; top:78px; width:53px; height:19px; ">
  1003. <caption>행삭제</caption>
  1004. <script type="javascript" ev:event="DOMActivate">
  1005. <![CDATA[
  1006. if(model.getValue("/root/send/srchdata/narcflag") =="M") {
  1007. grd_prcplist.addStatus(grd_prcplist.row,"delete");
  1008. }else if(model.getValue("/root/send/srchdata/narcflag") =="H") {
  1009. grd_pshchlist.addStatus(grd_pshchlist.row,"delete");
  1010. }
  1011. ]]>
  1012. </script>
  1013. </button>
  1014. <datagrid id="grd_druglist" nodeset="/root/main/srchcond/narclist" backcoloralternate="#f0f0f0" caption="약품코드^약품명" colsep="^" colwidth="92, 120" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:100px; width:255px; height:642px; ">
  1015. <col ref="narccd"/>
  1016. <col ref="narcnm"/>
  1017. <script type="javascript" ev:event="onclick">
  1018. <![CDATA[
  1019. if(isDataCell()) {
  1020. /*if ( model.getValue("/root/send/srchdata/ioflag") ==""){
  1021. messageBox ( "병동/외래 구분을 ", "C002" );
  1022. return;
  1023. }*/
  1024. if ( model.getValue("/root/send/srchdata/endflag") ==""){
  1025. messageBox ( "마감 구분을 ", "C002" );
  1026. return;
  1027. }
  1028. btn_grdadd.disabled = false;
  1029. btn_grdcopy.disabled = false;
  1030. btn_grddel.disabled = false;
  1031. //button6.disabled = false;
  1032. model.setValue("/root/send/srchdata/drugcd", model.getValue("/root/main/srchcond/narclist["+grd_druglist.row+"]/narccd"));
  1033. model.setValue("/root/send/srchdata/drugnm", model.getValue("/root/main/srchcond/narclist["+grd_druglist.row+"]/narcnm"));
  1034. // model.setValue("/root/send/srchdata/goodspec", model.getValue("/root/main/srchcond/narclist["+grd_druglist.row+"]/goodspec"));
  1035. // model.setValue("/root/send/srchdata/specunit", model.getValue("/root/main/srchcond/narclist["+grd_druglist.row+"]/specunit"));
  1036. // model.setValue("/root/send/srchdata/brngfwrdqty", model.getValue("/root/main/srchcond/narclist["+grd_druglist.row+"]/brngfwrdqty"));
  1037. // model.setValue("/root/send/srchdata/winqty", model.getValue("/root/main/srchcond/narclist["+grd_druglist.row+"]/winqty"));
  1038. model.makeValue("/root/send/srchdata/stocprntyn", "");
  1039. fView();
  1040. }
  1041. ]]>
  1042. </script>
  1043. <script type="javascript" ev:event="onaftersort">
  1044. <![CDATA[
  1045. grd_druglist.gridToInstance();
  1046. ]]>
  1047. </script>
  1048. </datagrid>
  1049. <output id="output3" ref="/root/send/srchdata/totsumqty" style="left:840px; top:77px; width:85px; height:19px; font-size:11pt; font-weight:bold; color:#3366ff; "/>
  1050. <caption id="caption1" style="left:788px; top:79px; width:50px; height:15px; font-size:10pt; font-weight:bold; ">출고합</caption>
  1051. <datagrid id="grd_prnt2" nodeset="/root/main/prcplist2/item" visibility="hidden" caption="caption1^caption2^caption3" colsep="^" mergecellsfixedrows="bycolrec" rowsep="|" ref="/root/main/prcplist2/item" style="left:295px; top:175px; width:325px; height:180px; ">
  1052. <col ref="drugcd"/>
  1053. <col ref="stnddd"/>
  1054. <col ref="enddd"/>
  1055. </datagrid>
  1056. <input id="ipt_wardcd" ref="/root/send/srchdata/srchwardcd" class="input_search" visibility="hidden" style="left:985px; top:25px; width:115px; height:19px; "/>
  1057. <button id="button11" class="icon_search" visibility="visible" style="left:1085px; top:40px; width:16px; height:16px; ">
  1058. <caption/>
  1059. <script type="javascript" ev:event="onclick">
  1060. <![CDATA[
  1061. if(chk_ward.visible==true){
  1062. chk_ward.visible = false;
  1063. }else {
  1064. chk_ward.visible = true;
  1065. }
  1066. model.refresh();
  1067. ]]>
  1068. </script>
  1069. </button>
  1070. <select id="chk_ward" ref="/root/temp/srchinfo/ward" class="checkbox_search" visibility="hidden" overflow="visible" appearance="full" cols="4" itemwidth="150" sep="|" style="left:595px; top:60px; width:480px; height:20px; background-color:#e5eae9; border-style:none; ">
  1071. <choices>
  1072. <itemset nodeset="/root/temp/srchcond/dept">
  1073. <label ref="deptnm"/>
  1074. <value ref="deptcd"/>
  1075. </itemset>
  1076. </choices>
  1077. <script type="javascript" ev:event="onclick">
  1078. <![CDATA[
  1079. //if(isSearchString(model.getValue("/root/temp/srchinfo/ward"),"T")){
  1080. if(chk_ward.mouseRow == 0 && chk_ward.mouseCol == 0){
  1081. if(isSearchString(model.getValue("/root/temp/srchinfo/ward"),"T")){
  1082. //ipt_wardcd.value = "2100300000|2110200000|2110201000|2280200000|2360800000|2361501000|3050107000|3050108000|3050109000|3050110000|3050112000|3050113000|3050115000|3050116000|3050118000|3050119000|3050120000|3050121000|3050122000|3050123000|3050135000|3050136000|3060000000|3060100000|3060200000|3060300000|3060400000|3060600000|3120400000";
  1083. //ipt_wardnm.value = "분만실|신생아실|신생아중환자실|응급의료센터|통원수술센터|임상시험센터병동|04층동병동|04층서병동|05층동병동|05층서병동|06층동병동|06층서병동|07층동병동|07층서병동|08층동병동|08층서병동|09층동병동|09층서병동|10층동병동|10층서병동|응급병동|호스피스병동|중환자실|내과중환자실|외과중환자실|신경외과중환자실|순환기계중환자실|2층중환자실|특수주사실특수주사";
  1084. //model.setValue("/root/temp/srchinfo/ward", "T|2100300000|2110200000|2110201000|2280200000|2360800000|2361501000|3050107000|3050108000|3050109000|3050110000|3050112000|3050113000|3050115000|3050116000|3050118000|3050119000|3050120000|3050121000|3050122000|3050123000|3050135000|3050136000|3060000000|3060100000|3060200000|3060300000|3060400000|3060600000|3120400000");
  1085. // for(var i = 0; i < chk_ward.length; i++) {
  1086. // chk_ward.select(i);
  1087. // }
  1088. var strwardnm = "";
  1089. var strwardcd = "";
  1090. for(var i = 0 ; i <= getNodesetCount("/root/hidden/deptlist/ward") ; i++) {
  1091. strwardnm = strwardnm+ "|"+ model.getValue("/root/hidden/deptlist/ward[" + i + "]/wardnm");
  1092. strwardcd = strwardcd + "|" + model.getValue("/root/hidden/deptlist/ward[" + i + "]/wardcd");
  1093. }
  1094. model.setValue("/root/send/srchdata/srchwardcd", strwardcd);
  1095. } else {
  1096. //ipt_wardcd.value = "";
  1097. //ipt_wardnm.value = "";
  1098. model.setValue("/root/temp/srchinfo/ward", "");
  1099. }
  1100. model.refresh();
  1101. }
  1102. if(isSearchString(model.getValue("/root/temp/srchinfo/ward"),"T")){
  1103. ipt_wardcd.value = chk_ward.value.substr(2,chk_ward.value.length);
  1104. ipt_wardnm.value = chk_ward.label.substr(3,chk_ward.label.length);
  1105. } else {
  1106. ipt_wardcd.value = chk_ward.value.setReplaceWord("|", " ");
  1107. ipt_wardnm.value = chk_ward.label.setReplaceWord("|", " ");
  1108. }
  1109. //input3.refresh();
  1110. //검사실 체크박스 감추기
  1111. //chk_excuroom.visible = false;
  1112. ]]>
  1113. </script>
  1114. </select>
  1115. <group id="grp_all" visibility="hidden" style="left:5px; top:70px; width:375px; height:25px; ">
  1116. <button id="button9" class="btn4_letter3" style="left:235px; top:3px; width:68px; height:22px; ">
  1117. <caption>재마감</caption>
  1118. <script type="javascript" ev:event="DOMActivate">
  1119. <![CDATA[
  1120. /*
  1121. if ( model.getValue("/root/send/srchdata/ioflag") ==""){
  1122. messageBox("병동 외래 구분을 선택하십시오. ","C999");
  1123. return;
  1124. }
  1125. */
  1126. if (model.getValue("/root/send/srchdata/stocdeptcd") == "" || model.getValue("/root/send/srchdata/stocdeptcd") == "T"){
  1127. messageBox("실출고부서를 선택하세요. ","C999");
  1128. return;
  1129. }
  1130. if ( messageBox("재마감 작업을 ","Q003")==6 ) {
  1131. for ( var i = 0 ; i==i; i++ )
  1132. {
  1133. model.setValue("/root/send/srchdata/enddd", model.getValue("/root/send/srchdata/fromenddd").toDate("YYYYMMDD").getAddDate(i,"D").getDateFormat("YYYYMMDD"));
  1134. model.refresh();
  1135. submit("TRADT30301");
  1136. submit("TXADT30303"); //마감취소
  1137. submit("TRADT30302");
  1138. submit("TXADT30301"); //마감
  1139. submit("TRADT30302");
  1140. if (model.getValue("/root/send/srchdata/toenddd") ==model.getValue("/root/send/srchdata/fromenddd").toDate("YYYYMMDD").getAddDate(i,"D").getDateFormat("YYYYMMDD") ) {
  1141. break;
  1142. }
  1143. }
  1144. alert( "재마감 완료");
  1145. }
  1146. ]]>
  1147. </script>
  1148. </button>
  1149. <input id="input1" ref="/root/send/srchdata/fromenddd" class="input_search" inputtype="date" style="left:5px; top:5px; width:100px; height:19px; ">
  1150. <script type="javascript" ev:event="xforms-value-changed">
  1151. <![CDATA[
  1152. if(model.getValue("/root/send/srchdata/enddd") < "20081003") {
  1153. button19.disabled = true;
  1154. button6.disabled = true;
  1155. } else {
  1156. button19.disabled = false;
  1157. button6.disabled = false;
  1158. }
  1159. submit("TRADT30301");
  1160. ]]>
  1161. </script>
  1162. </input>
  1163. <input id="input2" ref="/root/send/srchdata/toenddd" class="input_search" inputtype="date" style="left:115px; top:5px; width:100px; height:19px; ">
  1164. <script type="javascript" ev:event="xforms-value-changed">
  1165. <![CDATA[
  1166. if(model.getValue("/root/send/srchdata/enddd") < "20081003") {
  1167. button19.disabled = true;
  1168. button6.disabled = true;
  1169. } else {
  1170. button19.disabled = false;
  1171. button6.disabled = false;
  1172. }
  1173. submit("TRADT30301");
  1174. ]]>
  1175. </script>
  1176. </input>
  1177. <button id="button10" class="btn4_letter3" style="left:305px; top:3px; width:68px; height:22px; ">
  1178. <caption>재반영</caption>
  1179. <script type="javascript" ev:event="DOMActivate">
  1180. <![CDATA[
  1181. if ( messageBox("재반영 작업을 ","Q003")==6 ) {
  1182. if(model.getValue("/root/send/srchdata/narcflag") == "M") {
  1183. model.setValue("/root/send/srchdata/m_drugkind", "N','Y','M");
  1184. model.setValue("/root/send/srchdata/h_drugkind", "");
  1185. } else if(model.getValue("/root/send/srchdata/narcflag") == "H") {
  1186. model.setValue("/root/send/srchdata/m_drugkind", "");
  1187. model.setValue("/root/send/srchdata/h_drugkind", "N','Y','M");
  1188. }
  1189. for ( var i = 0 ; i==i; i++ )
  1190. {
  1191. model.setValue("/root/send/srchdata/enddd", model.getValue("/root/send/srchdata/fromenddd").toDate("YYYYMMDD").getAddDate(i,"D").getDateFormat("YYYYMMDD"));
  1192. model.refresh();
  1193. /*submit("TRADT30301");
  1194. model.setValue("/root/send/srchdata/stocyn", "Y"); // stocyn = "Y" 인 상태에서 TRADT30302 호출시 재고에 불출 수량이 빠지지 않는 오류 발생.
  1195. fPrint1(); //수불대장 조회
  1196. */
  1197. submit("TRADT30701");
  1198. if (model.getValue("/root/send/srchdata/toenddd") ==model.getValue("/root/send/srchdata/fromenddd").toDate("YYYYMMDD").getAddDate(i,"D").getDateFormat("YYYYMMDD") ) {
  1199. break;
  1200. }
  1201. }
  1202. alert( "재반영 완료");
  1203. }
  1204. ]]>
  1205. </script>
  1206. </button>
  1207. </group>
  1208. <select1 id="radio1" ref="/root/send/srchdata/ioflag" class="radio_search" visibility="hidden" appearance="full" cols="3" rows="1" overflow="visible" style="left:445px; top:75px; width:135px; height:20px; border-style:none; ">
  1209. <choices>
  1210. <item>
  1211. <label>병동약국</label>
  1212. <value>I</value>
  1213. </item>
  1214. <item>
  1215. <label>외래약국</label>
  1216. <value>O</value>
  1217. </item>
  1218. </choices>
  1219. <script type="javascript" ev:event="xforms-select">
  1220. <![CDATA[
  1221. //submit("TRADT30301");
  1222. //fView();
  1223. ]]>
  1224. </script>
  1225. <script type="javascript" ev:event="xforms-value-changed">
  1226. <![CDATA[
  1227. //전체일 경우만 전송/수불대장출력 버튼 활성화
  1228. button4.disabled = true;
  1229. button6.disabled = true;
  1230. button19.disabled = true;
  1231. //출력/마감/마감취소/저장 버튼 활성화
  1232. // btn_prt.disabled = false;
  1233. // button1.disabled = false;
  1234. // button3.disabled = false;
  1235. // btn_save.disabled = false;
  1236. ]]>
  1237. </script>
  1238. </select1>
  1239. <select1 id="radio7" ref="/root/send/srchdata/ioflag" visibility="hidden" appearance="full" overflow="visible" style="left:390px; top:75px; width:50px; height:20px; border-style:none; ">
  1240. <choices>
  1241. <item>
  1242. <label>전체</label>
  1243. <value/>
  1244. </item>
  1245. </choices>
  1246. <script type="javascript" ev:event="xforms-value-changed">
  1247. <![CDATA[
  1248. //if(model.getValue("/root/send/srchdata/narcflag") == "M" ) {
  1249. //전체일 경우만 전송/수불대장출력 버튼 활성화
  1250. // button4.disabled = false;
  1251. // button6.disabled = false;
  1252. // button19.disabled = false;
  1253. //전체일 경우 출력/마감/마감취소/저장 버튼 비활성화
  1254. // btn_prt.disabled = true;
  1255. // button1.disabled = true;
  1256. // button3.disabled = true;
  1257. // btn_save.disabled = true;
  1258. // } else if(model.getValue("/root/send/srchdata/narcflag") == "H") {
  1259. // //전체일 경우만 전송/수불대장출력 버튼 활성화
  1260. // button4.disabled = false;
  1261. // button6.disabled = false;
  1262. // button19.disabled = false;
  1263. //전체일 경우 출력/마감/마감취소/저장 버튼 비활성화
  1264. // btn_prt.disabled = true;
  1265. // button1.disabled = true;
  1266. // button3.disabled = true;
  1267. // btn_save.disabled = true;
  1268. // }
  1269. ]]>
  1270. </script>
  1271. </select1>
  1272. <group id="group7" visibility="hidden" style="left:685px; top:305px; width:350px; height:370px; ">
  1273. <input id="input6" ref="/root/temp/tttt/a" class="input_search" inputtype="date" style="left:75px; top:20px; width:90px; height:19px; "/>
  1274. <input id="input7" ref="/root/temp/tttt/b" class="input_search" inputtype="date" style="left:195px; top:20px; width:90px; height:19px; "/>
  1275. <button id="button14" class="btn4_letter6" style="left:20px; top:90px; width:104px; height:22px; ">
  1276. <caption>향정재고반영</caption>
  1277. <script type="javascript" ev:event="DOMActivate">
  1278. <![CDATA[
  1279. var sTemp = "";
  1280. var sSS = model.getValue("/root/temp/tttt/a");
  1281. var sEE = model.getValue("/root/temp/tttt/b");
  1282. alert(sSS + " ~ " + sEE);
  1283. var iInter = getDateInterval(sSS, sEE);
  1284. for(var iNo = 0 ; iNo <= iInter ; iNo++) {
  1285. model.setValue("/root/send/srchdata/enddd", (sSS.toDate().getAddDate(iNo, "D")).getDateFormat("YYYYMMDD") );
  1286. sTemp += ", " + (sSS.toDate().getAddDate(iNo, "D")).getDateFormat("YYYYMMDD") ;
  1287. model.setValue("/root/temp/tttt/c", (sSS.toDate().getAddDate(iNo, "D")).getDateFormat("YYYYMMDD") );
  1288. model.setValue("/root/temp/tttt/rr", sTemp);
  1289. submit("TRADT30301");
  1290. model.refresh();
  1291. if(model.getValue("/root/send/srchdata/narcflag") == "M") {
  1292. model.setValue("/root/send/srchdata/m_drugkind", "N','Y','M");
  1293. model.setValue("/root/send/srchdata/h_drugkind", "");
  1294. } else if(model.getValue("/root/send/srchdata/narcflag") == "H") {
  1295. model.setValue("/root/send/srchdata/m_drugkind", "");
  1296. model.setValue("/root/send/srchdata/h_drugkind", "N','Y','M");
  1297. }
  1298. submit("TRADT30311");
  1299. }
  1300. ]]>
  1301. </script>
  1302. </button>
  1303. <input id="input8" ref="/root/temp/tttt/c" style="left:140px; top:55px; width:95px; height:19px; "/>
  1304. <button id="button15" class="btn4_letter4" style="left:140px; top:90px; width:80px; height:22px; ">
  1305. <caption>향정마감</caption>
  1306. <script type="javascript" ev:event="DOMActivate">
  1307. <![CDATA[
  1308. var sTemp = "";
  1309. var sSS = model.getValue("/root/temp/tttt/a");
  1310. var sEE = model.getValue("/root/temp/tttt/b");
  1311. alert(sSS + " ~ " + sEE);
  1312. var iInter = getDateInterval(sSS, sEE);
  1313. for(var iNo = 0 ; iNo <= iInter ; iNo++) {
  1314. model.setValue("/root/send/srchdata/enddd", (sSS.toDate().getAddDate(iNo, "D")).getDateFormat("YYYYMMDD") );
  1315. sTemp += ", " + (sSS.toDate().getAddDate(iNo, "D")).getDateFormat("YYYYMMDD") ;
  1316. model.setValue("/root/temp/tttt/c", (sSS.toDate().getAddDate(iNo, "D")).getDateFormat("YYYYMMDD") );
  1317. model.setValue("/root/temp/tttt/rr", sTemp);
  1318. model.refresh();
  1319. submit("TRADT30301");
  1320. /*if (model.getValue("/root/main/srchcond/narclist/allendyn") != "Y" && model.getValue("/root/send/srchdata/ioflag") == ""){
  1321. messageBox("병동 외래 구분을 선택하십시오. ","C999");
  1322. return;
  1323. }*/
  1324. if (model.getValue("/root/send/srchdata/narcflag") == "M" && model.getValue("/root/send/srchdata/endflag") == "A") {
  1325. messageBox("마약은 마감구분을 전체로 마감할 수 없습니다.", "C999");
  1326. return;
  1327. }
  1328. if (model.getValue("/root/send/srchdata/stocdeptcd") == "" || model.getValue("/root/send/srchdata/stocdeptcd") == "T"){
  1329. messageBox("실출고부서를 선택하세요. ","C999");
  1330. return;
  1331. }
  1332. //if ( messageBox("마감 작업을 ","Q003")==6 ) {
  1333. /*
  1334. if(model.getValue("/root/main/srchcond/narclist/allendyn") == "Y" && model.getValue("/root/send/srchdata/ioflag") == "") {
  1335. model.setValue("/root/send/srchdata/ioflag", "O");
  1336. submit("TXADT30301");
  1337. submit("TRADT30302");
  1338. model.setValue("/root/send/srchdata/ioflag", "I");
  1339. submit("TXADT30301");
  1340. submit("TRADT30302");
  1341. } else {
  1342. submit("TXADT30301");
  1343. submit("TRADT30302");
  1344. }
  1345. */
  1346. /*
  1347. 20091014 이선경 수정 : 입원환자는 병동약국으로, 외래환자는 외래약국으로 마감하지 않고
  1348. 실제 약이 조제, 불출이 어디에서 되었나를 가지고 출고마감하도록 수정
  1349. 처방전출력화면에서 실출고부서(외래약국조제실, 병동약국조제실, 약무실(약제팀))를 어디로 하느냐에 따라 출고마감을 하도록 수정함
  1350. 업무상으로 외래약국에서 입원환자의 약을 조제, 불출할 수도 있고 병동약국에서 외래환자의 약을 조제,불출할 수도 있음
  1351. 그래서 어느 출고부서로 출고마감을 하던지 입원환자마감, 외래환자마감을 모두 해야함
  1352. 단, 주사제는 모두 병동약국 또는 약무실(약제팀)으로 마감됨
  1353. */
  1354. submit("TXADT30301");
  1355. submit("TRADT30302");
  1356. //}
  1357. }
  1358. ]]>
  1359. </script>
  1360. </button>
  1361. <textarea id="textarea1" ref="/root/temp/tttt/rr" style="left:25px; top:125px; width:315px; height:225px; "/>
  1362. <button id="button16" class="btn6_letter5" style="left:240px; top:90px; width:92px; height:22px; ">
  1363. <caption>향정 일지</caption>
  1364. <script type="javascript" ev:event="DOMActivate">
  1365. <![CDATA[
  1366. var sTemp = "";
  1367. var sSS = model.getValue("/root/temp/tttt/a");
  1368. var sEE = model.getValue("/root/temp/tttt/b");
  1369. alert(sSS + " ~ " + sEE);
  1370. var iInter = getDateInterval(sSS, sEE);
  1371. for(var iNo = 0 ; iNo <= iInter ; iNo++) {
  1372. model.setValue("/root/send/srchdata/enddd", (sSS.toDate().getAddDate(iNo, "D")).getDateFormat("YYYYMMDD") );
  1373. sTemp += ", " + (sSS.toDate().getAddDate(iNo, "D")).getDateFormat("YYYYMMDD") ;
  1374. model.setValue("/root/temp/tttt/c", (sSS.toDate().getAddDate(iNo, "D")).getDateFormat("YYYYMMDD") );
  1375. model.setValue("/root/temp/tttt/rr", sTemp);
  1376. submit("TRADT30301");
  1377. model.refresh();
  1378. if(model.getValue("/root/send/srchdata/prniflag") == "I") {
  1379. model.setValue("/root/send/srchdata/deptinm", "병동");
  1380. } else {
  1381. model.setValue("/root/send/srchdata/deptinm", "");
  1382. }
  1383. if(model.getValue("/root/send/srchdata/prnoflag") == "O") {
  1384. model.setValue("/root/send/srchdata/deptonm", "외래");
  1385. } else {
  1386. model.setValue("/root/send/srchdata/deptonm", "");
  1387. }
  1388. if(model.getValue("/root/send/srchdata/prnaflag") == "A") {
  1389. model.setValue("/root/send/srchdata/deptanm", "원내");
  1390. } else {
  1391. model.setValue("/root/send/srchdata/deptanm", "");
  1392. }
  1393. if( model.getValue("/root/send/srchdata/prtmode") == "Y") { // 대장
  1394. model.setValue("/root/send/srchdata/drugkindnm", "내복약");
  1395. if(model.getValue("/root/send/srchdata/prnnkind") == "N") { //내복약 일지
  1396. model.setValue("/root/send/srchdata/drugkind", "N");
  1397. submit("TRADT30306");
  1398. submit("TRADT30307");
  1399. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1400. exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "false","","","","","false", "", "");
  1401. } else {
  1402. exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "true","","","","","true", "", "");
  1403. }
  1404. }
  1405. model.setValue("/root/send/srchdata/drugkindnm", "주사약");
  1406. if(model.getValue("/root/send/srchdata/prnmkind") == "M"){ // 주사
  1407. if(model.getValue("/root/send/srchdata/prniflag") == "I" || model.getValue("/root/send/srchdata/prnaflag") == "A") { // 병동 또는 원내
  1408. model.setValue("/root/send/srchdata/drugkind", "M");
  1409. submit("TRADT30306");
  1410. submit("TRADT30307");
  1411. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1412. exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "false","","","","","false", "", "");
  1413. } else {
  1414. exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "true","","","","","true", "", "");
  1415. }
  1416. }
  1417. }
  1418. model.setValue("/root/send/srchdata/drugkindnm", "외용약");
  1419. if( model.getValue("/root/send/srchdata/prnykind") == "Y") { // 외용
  1420. model.setValue("/root/send/srchdata/drugkind", "Y");
  1421. submit("TRADT30306");
  1422. submit("TRADT30307");
  1423. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1424. exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "false","","","","","false", "", "");
  1425. } else {
  1426. exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "true","","","","","true", "", "");
  1427. }
  1428. }
  1429. }
  1430. else { // 일지
  1431. if(model.getValue("/root/send/srchdata/prniflag") == "I") {
  1432. model.setValue("/root/send/srchdata/deptnm", "병동약국");
  1433. model.setValue("/root/send/srchdata/ioflag", "I")
  1434. fPTDrugPnt();
  1435. }
  1436. if(model.getValue("/root/send/srchdata/prnoflag") == "O") {
  1437. model.setValue("/root/send/srchdata/deptnm", "외래약국");
  1438. model.setValue("/root/send/srchdata/ioflag", "O")
  1439. fPTDrugPnt();
  1440. }
  1441. if(model.getValue("/root/send/srchdata/prnaflag") == "A") {
  1442. model.setValue("/root/send/srchdata/deptnm", "원내약국");
  1443. model.setValue("/root/send/srchdata/ioflag", "")
  1444. fPTDrugPnt();
  1445. }
  1446. }
  1447. }
  1448. ]]>
  1449. </script>
  1450. </button>
  1451. </group>
  1452. <input id="input10" ref="/root/temp/tttt/ww" visibility="hidden" style="left:790px; top:275px; width:155px; height:19px; ">
  1453. <script type="javascript" ev:event="onkeyup">
  1454. <![CDATA[
  1455. if (event.keyCode == 13){
  1456. alert(input10.currentText );
  1457. if(input10.currentText == "정보지원팀") {
  1458. group7.visible = true;
  1459. model.refresh();
  1460. } else {
  1461. input10.visible = false;
  1462. group7.visible = false;
  1463. model.refresh();
  1464. }
  1465. }
  1466. ]]>
  1467. </script>
  1468. </input>
  1469. </group>
  1470. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  1471. <button id="btn_prt" class="btn6_letter5" style="left:70px; top:5px; width:92px; height:22px; ">
  1472. <caption>마감표 출력</caption>
  1473. <script type="javascript" ev:event="DOMActivate">
  1474. <![CDATA[
  1475. submit("TRADT30303");
  1476. model.setValue("/root/send/srchdata/stocdeptcdnm", combo1.label);
  1477. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1478. exeReportPreview("RPADT30301", "XMLSTR", "RPADT30301", "", "false","","","","","false", "", "");
  1479. } else {
  1480. exeReportPreview("RPADT30301", "XMLSTR", "RPADT30301", "", "true","","","","","true", "", "");
  1481. }
  1482. ]]>
  1483. </script>
  1484. </button>
  1485. <button id="button17" class="btn6_letter6" visibility="hidden" style="left:160px; top:5px; width:104px; height:22px; ">
  1486. <caption>수불대장출력</caption>
  1487. <script type="javascript" ev:event="DOMActivate">
  1488. <![CDATA[
  1489. var ioflag = model.getValue("/root/send/srchdata/ioflag");
  1490. model.setValue("/root/send/srchdata/stocyn", "");
  1491. model.makeValue("/root/send/srchdata/stocprntyn", "Y");
  1492. fPrint1(); //수불대장 조회
  1493. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1494. exeReportPreview("RPADT30302", "XMLSTR", "RPADT30302", "", "false","","","","","false", "", "");
  1495. } else {
  1496. exeReportPreview("RPADT30302", "XMLSTR", "RPADT30302", "", "true","","","","","true", "", "");
  1497. }
  1498. model.setValue("/root/send/srchdata/ioflag", ioflag);
  1499. model.removeNodeset("/root/send/data/print1/item");
  1500. model.removeNodeset("/root/main/prcplist/item");
  1501. ]]>
  1502. </script>
  1503. </button>
  1504. <button id="button7" class="btn6_letter6" style="left:166px; top:5px; width:104px; height:22px; ">
  1505. <caption>향정관리대장</caption>
  1506. <script type="javascript" ev:event="DOMActivate">
  1507. <![CDATA[
  1508. /*model.setValue("/root/send/srchdata/stocyn", "");
  1509. var cnt = 1;
  1510. var ioflag = model.getValue("/root/send/srchdata/ioflag");
  1511. //model.setValue("/root/send/srchdata/ioflag", "");
  1512. model.makeNode("/root/send/data/print2");
  1513. //for ( var i = 1; i < grd_druglist.rows; i++){
  1514. var i = grd_druglist.row;
  1515. if(model.getValue("/root/main/srchcond/narclist["+i+"]/narccd") == "") {
  1516. messageBox("출력할 향정약품을 ", "C002");
  1517. return;
  1518. }
  1519. model.setValue("/root/send/srchdata/drugcd", model.getValue("/root/main/srchcond/narclist["+i+"]/narccd"));
  1520. submit("TRADT30304", false);
  1521. for ( var j = 1; j <= getNodesetCount("/root/main/prcplist2/item") ; j++){
  1522. model.makeNode("/root/send/data/print2/item["+cnt+"]");
  1523. model.makeValue("/root/main/prcplist2/item["+j+"]/narccd", model.getValue("/root/main/srchcond/narclist["+i+"]/narccd"));
  1524. model.makeValue("/root/main/prcplist2/item["+j+"]/narcnm", model.getValue("/root/main/srchcond/narclist["+i+"]/narcnm"));
  1525. model.makeValue("/root/main/prcplist2/item["+j+"]/goodspec", model.getValue("/root/main/srchcond/narclist["+i+"]/goodspec"));
  1526. model.makeValue("/root/main/prcplist2/item["+j+"]/specunit", model.getValue("/root/main/srchcond/narclist["+i+"]/specunit"));
  1527. model.makeValue("/root/main/prcplist2/item["+j+"]/custnm", model.getValue("/root/main/srchcond/narclist["+i+"]/custnm"));
  1528. model.makeValue("/root/main/prcplist2/item["+j+"]/hospnm", model.getValue("/root/main/srchcond/narclist["+i+"]/hospnm"));
  1529. model.makeValue("/root/main/prcplist2/item["+j+"]/lncsno", model.getValue("/root/main/srchcond/narclist["+i+"]/lncsno"));
  1530. model.makeValue("/root/main/prcplist2/item["+j+"]/mngtrid", model.getValue("/root/main/srchcond/narclist["+i+"]/mngtrid"));
  1531. //model.setValue("/root/main/prcplist/item["+j+"]/brngfwrdqty", model.getValue("/root/main/srchcond/narclist["+i+"]/brngfwrdqty"));
  1532. //model.setValue("/root/main/prcplist/item["+j+"]/winqty", model.getValue("/root/main/srchcond/narclist["+i+"]/winqty"));
  1533. model.copyNode("/root/send/data/print2/item["+cnt+"]", "/root/main/prcplist2/item["+j+"]");
  1534. cnt = cnt + 1;
  1535. model.makeNode("/root/send/data/print2/item["+cnt+"]");
  1536. }
  1537. //}
  1538. model.removeNodeset("/root/send/data/print2/item["+cnt+"]");
  1539. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1540. exeReportPreview("RPADT30304", "XMLSTR", "RPADT30304", "", "false","","","","","true", "", "");
  1541. } else {
  1542. exeReportPreview("RPADT30304", "XMLSTR", "RPADT30304", "", "true","","","","","true", "", "");
  1543. }
  1544. model.setValue("/root/send/srchdata/ioflag", ioflag);
  1545. model.removeNodeset("/root/send/data/print2/item");
  1546. model.removeNodeset("/root/main/prcplist2/item");
  1547. */
  1548. if(model.getValue("/root/send/srchdata/prniflag") == "I") {
  1549. model.setValue("/root/send/srchdata/deptinm", "병동");
  1550. } else {
  1551. model.setValue("/root/send/srchdata/deptinm", "");
  1552. }
  1553. if(model.getValue("/root/send/srchdata/prnoflag") == "O") {
  1554. model.setValue("/root/send/srchdata/deptonm", "외래");
  1555. } else {
  1556. model.setValue("/root/send/srchdata/deptonm", "");
  1557. }
  1558. if(model.getValue("/root/send/srchdata/prnaflag") == "A") {
  1559. model.setValue("/root/send/srchdata/deptanm", "원내");
  1560. } else {
  1561. model.setValue("/root/send/srchdata/deptanm", "");
  1562. }
  1563. // 20110503 wify 경북대병원 항정관리대장 출력시 조회기간이 멀티로 입력되면 출력을 1일기준으로 출력해야함.
  1564. // 20110503 wify 경북대병원 조회기간 날짜 가져오기.
  1565. submit("TRADT30308");
  1566. // alert(instance1.selectNodesXml("/root/init/dayinfo"));
  1567. //// 20112년 12월 13일 김치국
  1568. if (chkbox_day.value == "Y") { //// 기간별 출력에 체크된 경우
  1569. // 조회 일자 찾기
  1570. // var startday = model.getValue("/root/send/srchdata/enddd");
  1571. // var endday = model.getValue("/root/send/srchdata/statdd");
  1572. if( model.getValue("/root/send/srchdata/prtmode") == "Y") { // 대장
  1573. model.setValue("/root/send/srchdata/drugkindnm", "내복약");
  1574. if(model.getValue("/root/send/srchdata/prnnkind") == "N") { //내복약 일지
  1575. model.setValue("/root/send/srchdata/drugkind", "N");
  1576. submit("TRADT30306");
  1577. submit("TRADT30307");
  1578. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1579. exeReportPreview("RPADT30309", "XMLSTR", "RPADT30309", "", "false","","","","","false", "", "");
  1580. } else {
  1581. exeReportPreview("RPADT30309", "XMLSTR", "RPADT30309", "", "true","","","","","true", "", "");
  1582. }
  1583. }
  1584. model.setValue("/root/send/srchdata/drugkindnm", "주사약");
  1585. if(model.getValue("/root/send/srchdata/prnmkind") == "M"){ // 주사
  1586. if(model.getValue("/root/send/srchdata/prniflag") == "I" || model.getValue("/root/send/srchdata/prnaflag") == "A" || model.getValue("/root/send/srchdata/prnoflag") == "O") { // 병동 또는 원내 20110812_LABORU_외래 주사도 출력
  1587. model.setValue("/root/send/srchdata/drugkind", "M");
  1588. submit("TRADT30306");
  1589. submit("TRADT30307");
  1590. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1591. exeReportPreview("RPADT30308", "XMLSTR", "RPADT30308", "", "false","","","","","false", "", "");
  1592. } else {
  1593. exeReportPreview("RPADT30308", "XMLSTR", "RPADT30308", "", "true","","","","","true", "", "");
  1594. }
  1595. }
  1596. }
  1597. model.setValue("/root/send/srchdata/drugkindnm", "외용약");
  1598. if( model.getValue("/root/send/srchdata/prnykind") == "Y") { // 외용
  1599. model.setValue("/root/send/srchdata/drugkind", "Y");
  1600. submit("TRADT30306");
  1601. submit("TRADT30307");
  1602. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1603. exeReportPreview("RPADT30308", "XMLSTR", "RPADT30308", "", "false","","","","","false", "", "");
  1604. } else {
  1605. exeReportPreview("RPADT30308", "XMLSTR", "RPADT30308", "", "true","","","","","true", "", "");
  1606. }
  1607. }
  1608. }
  1609. } else {
  1610. var dayno = model.getValue("/root/init/dayinfo/base/basedd");
  1611. var ins = instance1.selectNodes("/root/init/dayinfo/base/basedd");
  1612. model.setValue("/root/send/srchdata/stocdeptcdnm", combo1.label);
  1613. for ( var i = 0 ; i < ins.length; i++) {
  1614. if ( ins.length > i ) {
  1615. // 20110503 wify 경북대병원 instance에 있는 날짜를 가져온다.
  1616. var inss = ins.nextNode();
  1617. // alert(inss.text);
  1618. }
  1619. // 20110503 wify 경북대병원 가져온 날짜를 마감일자에 set한다.
  1620. model.setValue("/root/send/srchdata/enddd", inss.text);
  1621. if( model.getValue("/root/send/srchdata/prtmode") == "Y") { // 대장
  1622. model.setValue("/root/send/srchdata/drugkindnm", "내복약");
  1623. if(model.getValue("/root/send/srchdata/prnnkind") == "N") { //내복약 일지
  1624. model.setValue("/root/send/srchdata/drugkind", "N");
  1625. submit("TRADT30306");
  1626. submit("TRADT30307");
  1627. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1628. // exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "false","","","","","false", "", "");
  1629. exeReportPreview("RPADT30309", "XMLSTR", "RPADT30309", "", "false","","","","","false", "", "");
  1630. } else {
  1631. // exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "true","","","","","true", "", "");
  1632. exeReportPreview("RPADT30309", "XMLSTR", "RPADT30309", "", "true","","","","","true", "", "");
  1633. }
  1634. }
  1635. model.setValue("/root/send/srchdata/drugkindnm", "주사약");
  1636. if(model.getValue("/root/send/srchdata/prnmkind") == "M"){ // 주사
  1637. if(model.getValue("/root/send/srchdata/prniflag") == "I" || model.getValue("/root/send/srchdata/prnaflag") == "A" || model.getValue("/root/send/srchdata/prnoflag") == "O") { // 병동 또는 원내 20110812_LABORU_외래 주사도 출력
  1638. model.setValue("/root/send/srchdata/drugkind", "M");
  1639. submit("TRADT30306");
  1640. submit("TRADT30307");
  1641. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1642. // exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "false","","","","","false", "", "");
  1643. exeReportPreview("RPADT30308", "XMLSTR", "RPADT30308", "", "false","","","","","false", "", "");
  1644. } else {
  1645. // exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "true","","","","","true", "", "");
  1646. exeReportPreview("RPADT30308", "XMLSTR", "RPADT30308", "", "true","","","","","true", "", "");
  1647. }
  1648. }
  1649. }
  1650. model.setValue("/root/send/srchdata/drugkindnm", "외용약");
  1651. if( model.getValue("/root/send/srchdata/prnykind") == "Y") { // 외용
  1652. model.setValue("/root/send/srchdata/drugkind", "Y");
  1653. submit("TRADT30306");
  1654. submit("TRADT30307");
  1655. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1656. // exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "false","","","","","false", "", "");
  1657. exeReportPreview("RPADT30308", "XMLSTR", "RPADT30308", "", "false","","","","","false", "", "");
  1658. } else {
  1659. // exeReportPreview("RPADT30307", "XMLSTR", "RPADT30307", "", "true","","","","","true", "", "");
  1660. exeReportPreview("RPADT30308", "XMLSTR", "RPADT30308", "", "true","","","","","true", "", "");
  1661. }
  1662. }
  1663. }
  1664. }
  1665. }
  1666. ]]>
  1667. </script>
  1668. </button>
  1669. <button id="button19" class="btn6_letter6" visibility="hidden" style="left:70px; top:5px; width:104px; height:22px; ">
  1670. <caption>수불대장출력</caption>
  1671. <script type="javascript" ev:event="DOMActivate">
  1672. <![CDATA[
  1673. var ioflag = model.getValue("/root/send/srchdata/ioflag");
  1674. model.setValue("/root/send/srchdata/stocyn", "");
  1675. fPrint1(); //수불대장 조회
  1676. if (checkbox2.value == 1) { //미리보기가 체크된 경우
  1677. exeReportPreview("RPADT30302", "XMLSTR", "RPADT30302", "", "false","","","","","false", "", "");
  1678. } else {
  1679. exeReportPreview("RPADT30302", "XMLSTR", "RPADT30302", "", "true","","","","","true", "", "");
  1680. }
  1681. model.setValue("/root/send/srchdata/ioflag", ioflag);
  1682. model.removeNodeset("/root/send/data/print1/item");
  1683. model.removeNodeset("/root/main/prcplist/item");
  1684. ]]>
  1685. </script>
  1686. </button>
  1687. <button id="button8" class="btn6_letter5" style="left:70px; top:5px; width:92px; height:22px; ">
  1688. <caption>향정 일지</caption>
  1689. <script type="javascript" ev:event="DOMActivate">
  1690. <![CDATA[
  1691. if(model.getValue("/root/send/srchdata/prniflag") == "I") {
  1692. model.setValue("/root/send/srchdata/deptinm", "병동");
  1693. } else {
  1694. model.setValue("/root/send/srchdata/deptinm", "");
  1695. }
  1696. if(model.getValue("/root/send/srchdata/prnoflag") == "O") {
  1697. model.setValue("/root/send/srchdata/deptonm", "외래");
  1698. } else {
  1699. model.setValue("/root/send/srchdata/deptonm", "");
  1700. }
  1701. if(model.getValue("/root/send/srchdata/prnaflag") == "A") {
  1702. model.setValue("/root/send/srchdata/deptanm", "원내");
  1703. } else {
  1704. model.setValue("/root/send/srchdata/deptanm", "");
  1705. }
  1706. if( model.getValue("/root/send/srchdata/prtmode") != "Y") {// 일지
  1707. if(model.getValue("/root/send/srchdata/prniflag") == "I") {
  1708. model.setValue("/root/send/srchdata/deptnm", "병동약국");
  1709. model.setValue("/root/send/srchdata/ioflag", "I")
  1710. fPTDrugPnt();
  1711. }
  1712. if(model.getValue("/root/send/srchdata/prnoflag") == "O") {
  1713. model.setValue("/root/send/srchdata/deptnm", "외래약국");
  1714. model.setValue("/root/send/srchdata/ioflag", "O")
  1715. fPTDrugPnt();
  1716. }
  1717. if(model.getValue("/root/send/srchdata/prnaflag") == "A") {
  1718. model.setValue("/root/send/srchdata/deptnm", "원내약국");
  1719. model.setValue("/root/send/srchdata/ioflag", "")
  1720. fPTDrugPnt();
  1721. }
  1722. }
  1723. ]]>
  1724. </script>
  1725. </button>
  1726. <select id="checkbox2" ref="/root/send/srchdata/preview" class="checkbox_search" overflow="visible" appearance="full" cols="2" rows="1" style="left:0px; top:8px; width:68px; height:14px; border-style:none; ">
  1727. <choices>
  1728. <item>
  1729. <label>미리보기</label>
  1730. <value>1</value>
  1731. </item>
  1732. </choices>
  1733. </select>
  1734. <button id="btn_save" class="btn4_letter2" style="left:1080px; top:5px; width:56px; height:22px; ">
  1735. <caption>저장</caption>
  1736. <script type="javascript" ev:event="DOMActivate">
  1737. <![CDATA[
  1738. /*
  1739. 1. 행추가, 행복사, 행삭제 적용후 저장버튼 클릭시 체크되어야하는 조건
  1740. - 마약향정 구분(narcflag)
  1741. - 병동약국, 외래약국 마감구분(ioflag)
  1742. - 마약일 경우 마감구분 (endflag or rtnendflag)
  1743. - 선택된 약품코드값(drugcd)
  1744. */
  1745. if(model.getValue("/root/send/srchdata/narcflag") =="M") {
  1746. var data = grd_prcplist.getUpdateData();
  1747. }else if(model.getValue("/root/send/srchdata/narcflag") =="H") {
  1748. var data = grd_pshchlist.getUpdateData();
  1749. }
  1750. model.setValue("/root/send/data/narcstocdata", data);
  1751. if(submit("TXADT30302")){
  1752. submit("TRADT30302");
  1753. }
  1754. ]]>
  1755. </script>
  1756. </button>
  1757. <button id="button1" class="btn4_letter2" style="left:935px; top:5px; width:56px; height:22px; ">
  1758. <caption>마감</caption>
  1759. <script type="javascript" ev:event="DOMActivate">
  1760. <![CDATA[
  1761. /*if (model.getValue("/root/main/srchcond/narclist/allendyn") != "Y" && model.getValue("/root/send/srchdata/ioflag") == ""){
  1762. messageBox("병동 외래 구분을 선택하십시오. ","C999");
  1763. return;
  1764. }*/
  1765. if (model.getValue("/root/send/srchdata/narcflag") == "M" && model.getValue("/root/send/srchdata/endflag") == "A") {
  1766. messageBox("마약은 마감구분을 전체로 마감할 수 없습니다.", "C999");
  1767. return;
  1768. }
  1769. if (model.getValue("/root/send/srchdata/stocdeptcd") == "" || model.getValue("/root/send/srchdata/stocdeptcd") == "T"){
  1770. messageBox("실출고부서를 선택하세요. ","C999");
  1771. return;
  1772. }
  1773. if ( messageBox("마감 작업을 ","Q003")==6 ) {
  1774. /*
  1775. if(model.getValue("/root/main/srchcond/narclist/allendyn") == "Y" && model.getValue("/root/send/srchdata/ioflag") == "") {
  1776. model.setValue("/root/send/srchdata/ioflag", "O");
  1777. submit("TXADT30301");
  1778. submit("TRADT30302");
  1779. model.setValue("/root/send/srchdata/ioflag", "I");
  1780. submit("TXADT30301");
  1781. submit("TRADT30302");
  1782. } else {
  1783. submit("TXADT30301");
  1784. submit("TRADT30302");
  1785. }
  1786. */
  1787. /*
  1788. 20091014 이선경 수정 : 입원환자는 병동약국으로, 외래환자는 외래약국으로 마감하지 않고
  1789. 실제 약이 조제, 불출이 어디에서 되었나를 가지고 출고마감하도록 수정
  1790. 처방전출력화면에서 실출고부서(외래약국조제실, 병동약국조제실, 약무실(약제팀))를 어디로 하느냐에 따라 출고마감을 하도록 수정함
  1791. 업무상으로 외래약국에서 입원환자의 약을 조제, 불출할 수도 있고 병동약국에서 외래환자의 약을 조제,불출할 수도 있음
  1792. 그래서 어느 출고부서로 출고마감을 하던지 입원환자마감, 외래환자마감을 모두 해야함
  1793. 단, 주사제는 모두 병동약국 또는 약무실(약제팀)으로 마감됨
  1794. */
  1795. // 20110217_laboru_경북대병원_향정 약,주사 마감시 마감 구분자 추가
  1796. if(model.getValue("/root/send/srchdata/srchdrugkind") == "M") {
  1797. model.makeValue("/root/send/srchdata/magamflag", "1"); // 주사만
  1798. } else if(model.getValue("/root/send/srchdata/srchdrugkind") == "N','Y") {
  1799. model.makeValue("/root/send/srchdata/magamflag", "2"); // 약만
  1800. } else {
  1801. model.makeValue("/root/send/srchdata/magamflag", "3"); // 약, 주사 모두
  1802. }
  1803. submit("TXADT30301");
  1804. submit("TRADT30302");
  1805. }
  1806. ]]>
  1807. </script>
  1808. </button>
  1809. <button id="button4" class="btn4_letter2" visibility="hidden" style="left:1135px; top:5px; width:56px; height:22px; ">
  1810. <caption>전송</caption>
  1811. <script type="javascript" ev:event="DOMActivate">
  1812. <![CDATA[
  1813. //var data = model.instances(0).selectNodes( "/root/main/prcplist/item" );
  1814. //model.setValue("/root/send/data/narcstocdata", getNodeListCSV(data));
  1815. submit("TXADT30305");
  1816. ]]>
  1817. </script>
  1818. </button>
  1819. <button id="button2" class="btn3_letter4" style="left:580px; top:5px; width:80px; height:22px; ">
  1820. <caption>재고관리</caption>
  1821. <script type="javascript" ev:event="DOMActivate">
  1822. <![CDATA[
  1823. open("SMADT30700",0,0,10,"SMADT30700","","");
  1824. ]]>
  1825. </script>
  1826. </button>
  1827. <button id="button6" class="btn4_letter4" disabled="false" style="left:855px; top:5px; width:80px; height:22px; ">
  1828. <caption>재고반영</caption>
  1829. <script type="javascript" ev:event="DOMActivate">
  1830. <![CDATA[
  1831. //model.setValue("/root/send/srchdata/stocyn", "Y"); // stocyn = "Y" 인 상태에서 TRADT30302 호출시 재고에 불출 수량이 빠지지 않는 오류 발생.
  1832. //fPrint1(); //수불대장 조회
  1833. if(combo1.value == "T" && radio4.value != "A") {
  1834. messageBox("실출고부서를 선택하세요", "E999");
  1835. return;
  1836. }
  1837. if(model.getValue("/root/send/srchdata/narcflag") == "M") {
  1838. model.setValue("/root/send/srchdata/m_drugkind", "N','Y','M");
  1839. model.setValue("/root/send/srchdata/h_drugkind", "");
  1840. } else if(model.getValue("/root/send/srchdata/narcflag") == "H") {
  1841. model.setValue("/root/send/srchdata/m_drugkind", "");
  1842. model.setValue("/root/send/srchdata/h_drugkind", "N','Y','M");
  1843. }
  1844. submit("TRADT30311");
  1845. ]]>
  1846. </script>
  1847. </button>
  1848. <group id="group5" visibility="hidden" style="left:275px; top:4px; width:300px; height:23px; ">
  1849. <shape id="roundrect2" class="roundrect_btnset" appearance="roundrect" el3lipsewidth="20" ellipseheight="20" style="left:0px; top:2px; width:300px; height:21px; background-color:#f2fafe; border-color:#7cbbdd; "/>
  1850. <select id="checkbox4" ref="/root/send/srchdata/prniflag" overflow="visible" appearance="full" style="left:5px; top:4px; width:47px; height:16px; border-style:none; ">
  1851. <choices>
  1852. <item>
  1853. <label>병동</label>
  1854. <value>I</value>
  1855. </item>
  1856. </choices>
  1857. <script type="javascript" ev:event="xforms-select">
  1858. <![CDATA[
  1859. checkbox8.deselect(0);
  1860. ]]>
  1861. </script>
  1862. </select>
  1863. <select id="checkbox5" ref="/root/send/srchdata/prnoflag" overflow="visible" appearance="full" style="left:53px; top:4px; width:47px; height:16px; border-style:none; ">
  1864. <choices>
  1865. <item>
  1866. <label>외래</label>
  1867. <value>O</value>
  1868. </item>
  1869. </choices>
  1870. <script type="javascript" ev:event="xforms-select">
  1871. <![CDATA[
  1872. checkbox8.deselect(0);
  1873. ]]>
  1874. </script>
  1875. </select>
  1876. <select id="checkbox1" ref="/root/send/srchdata/prnnkind" overflow="visible" appearance="full" style="left:151px; top:4px; width:47px; height:16px; border-style:none; ">
  1877. <choices>
  1878. <item>
  1879. <label>내복</label>
  1880. <value>N</value>
  1881. </item>
  1882. </choices>
  1883. </select>
  1884. <select id="checkbox3" ref="/root/send/srchdata/prnykind" overflow="visible" appearance="full" style="left:199px; top:4px; width:47px; height:16px; border-style:none; ">
  1885. <choices>
  1886. <item>
  1887. <label>외용</label>
  1888. <value>Y</value>
  1889. </item>
  1890. </choices>
  1891. </select>
  1892. <select id="checkbox6" ref="/root/send/srchdata/prnmkind" overflow="visible" appearance="full" style="left:247px; top:4px; width:47px; height:16px; border-style:none; ">
  1893. <choices>
  1894. <item>
  1895. <label>주사</label>
  1896. <value>M</value>
  1897. </item>
  1898. </choices>
  1899. </select>
  1900. <select id="checkbox8" ref="/root/send/srchdata/prnaflag" overflow="visible" appearance="full" style="left:101px; top:4px; width:47px; height:16px; border-style:none; ">
  1901. <choices>
  1902. <item>
  1903. <label>원내</label>
  1904. <value>A</value>
  1905. </item>
  1906. </choices>
  1907. <script type="javascript" ev:event="xforms-select">
  1908. <![CDATA[
  1909. checkbox4.deselect(0);
  1910. checkbox5.deselect(0);
  1911. ]]>
  1912. </script>
  1913. </select>
  1914. </group>
  1915. <group id="group6" visibility="hidden" style="left:995px; top:0px; width:85px; height:27px; ">
  1916. <button id="button3" class="btn4_letter4" style="left:0px; top:5px; width:80px; height:22px; ">
  1917. <caption>마감취소</caption>
  1918. <script type="javascript" ev:event="DOMActivate">
  1919. <![CDATA[
  1920. /*
  1921. if ( model.getValue("/root/send/srchdata/ioflag") ==""){
  1922. messageBox("병동 외래 구분을 선택하십시오. ","C999");
  1923. return;
  1924. }
  1925. */
  1926. if ( model.getValue("/root/send/srchdata/narcflag") == "M" && model.getValue("/root/send/srchdata/endflag") == "A") {
  1927. messageBox("마약은 마감구분을 전체로 마감취소할 수 없습니다.", "C999");
  1928. return;
  1929. }
  1930. if (model.getValue("/root/send/srchdata/stocdeptcd") == "" || model.getValue("/root/send/srchdata/stocdeptcd") == "T"){
  1931. messageBox("실출고부서를 선택하세요. ","C999");
  1932. return;
  1933. }
  1934. if ( messageBox("마감 취소 작업을 ","Q003")==6 ) {
  1935. submit("TXADT30303");
  1936. submit("TRADT30302");
  1937. }
  1938. ]]>
  1939. </script>
  1940. </button>
  1941. </group>
  1942. <button id="button12" class="btn3_letter6" style="left:660px; top:5px; width:104px; height:22px; ">
  1943. <caption>마감시간관리</caption>
  1944. <script type="javascript" ev:event="DOMActivate">
  1945. <![CDATA[
  1946. modal("SPADT64100");
  1947. ]]>
  1948. </script>
  1949. </button>
  1950. <button id="button13" class="btn3_letter5" style="left:760px; top:5px; width:92px; height:22px; ">
  1951. <caption>마약일계표</caption>
  1952. <script type="javascript" ev:event="DOMActivate">
  1953. <![CDATA[
  1954. open("SMADT30900",0,0,10,"SMADT30900","","");
  1955. ]]>
  1956. </script>
  1957. </button>
  1958. <bool id="bool1" visibility="hidden" checkvalue="Y,N" ref="/root/send/srchdata/prtmode" style="left:171px; top:6px; width:15px; height:20px; ">
  1959. <script type="javascript" ev:event="xforms-value-changed">
  1960. <![CDATA[
  1961. if(model.getValue("/root/send/srchdata/narcflag") == "H") {
  1962. if(model.getValue("/root/send/srchdata/prtmode") == "Y") {
  1963. caption9.visible = true;
  1964. input5.visible = true;
  1965. caption9.refresh();
  1966. input5.refresh();
  1967. button7.disabled = false;
  1968. button8.disabled = true;
  1969. } else {
  1970. caption9.visible = false;
  1971. input5.visible = false;
  1972. caption9.refresh();
  1973. input5.refresh();
  1974. button7.disabled = true;
  1975. button8.disabled = false;
  1976. }
  1977. } else {
  1978. caption9.visible = false;
  1979. input5.visible = false;
  1980. caption9.refresh();
  1981. input5.refresh();
  1982. }
  1983. ]]>
  1984. </script>
  1985. </bool>
  1986. </group>
  1987. <caption id="txt_narc" style="left:820px; top:0px; width:368px; height:20px; ">* 재고관리, 수불대장출력, 마감표출력은 반드시 재고반영 후 사용</caption>
  1988. <caption id="txt_phy" visibility="hidden" style="left:825px; top:0px; width:350px; height:20px; ">* 재고관리, 향정관리대장, 향정일지는 반드시 재고반영 후 사용</caption>
  1989. </xhtml:body>
  1990. </xhtml:html>