SMLBT12000_혈액출고관리.xrw 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. * 제 목 : SMLBT12000_혈액출고관리.xrw
  4. * 설 명 : 혈액출고관리
  5. * 설 계 자 :
  6. * 작 성 자 : 김성희
  7. * 작 성 일 : 2008.07.28
  8. * 수정이력: 2010.03.24 박정은 출고취소기능 추가
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  13. <xhtml:head>
  14. <xhtml:title>혈액출고관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <delivepsninfo>
  20. <delivepid/>
  21. <delivenm/>
  22. </delivepsninfo>
  23. <bloddelive>
  24. <bloddelivelist>
  25. <chk/>
  26. <blodno/>
  27. <blodcomcd/>
  28. <blodbarcd/>
  29. <abo/>
  30. <windt/>
  31. <validt/>
  32. <delivedt/>
  33. <deliveid/>
  34. <delivekindcd/>
  35. <delivekindresn/>
  36. <instcd/>
  37. <iokind/>
  38. <iokindresn/>
  39. </bloddelivelist>
  40. </bloddelive>
  41. <temp>
  42. <bloddelivelist>
  43. <chk/>
  44. <blodno/>
  45. <blodcomcd/>
  46. <blodbarcd/>
  47. <abo/>
  48. <windt/>
  49. <validt/>
  50. <delivedt/>
  51. <deliveid/>
  52. <delivekindcd/>
  53. <delivekindresn/>
  54. <instcd/>
  55. </bloddelivelist>
  56. </temp>
  57. <tempcc>
  58. <bloddelivelist>
  59. <chk/>
  60. <blodno/>
  61. <blodcomcd/>
  62. <blodbarcd/>
  63. <abo/>
  64. <windt/>
  65. <validt/>
  66. <delivedt/>
  67. <deliveid/>
  68. <delivekindcd/>
  69. <delivekindresn/>
  70. <instcd/>
  71. <iokind/>
  72. <iokindresn/>
  73. </bloddelivelist>
  74. </tempcc>
  75. </main>
  76. <send>
  77. <codeflag/>
  78. <delivepid/>
  79. <grddata/>
  80. <data>
  81. <startdt/>
  82. <enddt/>
  83. <blodcomcd/>
  84. <blodbarcd/>
  85. <blodno/>
  86. </data>
  87. </send>
  88. <init>
  89. </init>
  90. <hidden>
  91. <ref>
  92. <delivekindcd>00</delivekindcd>
  93. <delivekindresn>00</delivekindresn>
  94. <delivepid/>
  95. <delivenm/>
  96. <blodno/>
  97. <startdt/>
  98. <enddt/>
  99. <blodcomcd/>
  100. <searchgbn/>
  101. <blodcomcdcc>00</blodcomcdcc>
  102. <blodnocc/>
  103. </ref>
  104. <stat>1</stat>
  105. <stat2/>
  106. </hidden>
  107. </root>
  108. </instance>
  109. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  110. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  111. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  112. <script type="javascript" ev:event="xforms-ready">
  113. <![CDATA[
  114. fSetInit();
  115. ]]>
  116. </script>
  117. <!-- 출고유형 사유코드 조회-->
  118. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0801"/>
  119. <submission id="TRLBT12101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/delivepsninfo"/>
  120. <submission id="TRLBT12102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/bloddelive"/>
  121. <submission id="TRLBT12103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/temp"/>
  122. <submission id="TRLBT12104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/tempcc"/>
  123. <submission id="TXLBT12101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  124. <submission id="TXLBT12102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  125. </model>
  126. <script type="javascript">
  127. <![CDATA[
  128. /* @group : 초기화
  129. * @ver : 2008.08.18
  130. * @by : 김성희
  131. * @-----------------------------------
  132. * @type : function
  133. * @access : public
  134. * @desc : 초기화 Function
  135. */
  136. function fSetInit() {
  137. model.removeNodeset("/root/init/LB0801");
  138. model.removeNodeset("/root/init/LB0802");
  139. model.removeNodeset("/root/init/LB0803");
  140. model.removeNodeset("/root/main/bloddelive/bloddelivelist");
  141. model.removeNodeset("/root/main/temp/bloddelivelist");
  142. var toDay = getCurrentDate();
  143. model.setValue("/root/hidden/ref/startdt", toDay);
  144. model.setValue("/root/hidden/ref/enddt", toDay);
  145. model.setValue("/root/hidden/ref/delivepid", "");
  146. model.setValue("/root/hidden/ref/delivenm", "");
  147. // 초기정보 조회
  148. model.setValue("/root/send/codeflag", "0801|0802|0803|");
  149. submit("TRLZZ00101");
  150. //데이타 초기화
  151. cmb_delivekindcd.select(0);
  152. cmb_delivekindresn.select(0);
  153. cmb_blodcomcd.select(0);
  154. //출고유형별 사유코드 비활성화
  155. cmb_delivekindresn.disabled = true;
  156. grd_bloddelivelist.colHidden(9) = false;
  157. grd_bloddelivelist.colHidden(10) = false;
  158. grd_bloddelivelist.colHidden(11) = true;
  159. grd_bloddelivelist.colHidden(12) = true;
  160. model.setFocus("ipt_delivepid");
  161. }
  162. /* @group : 출고유형 콤보 셋팅
  163. * @ver : 2008.08.18
  164. * @by : 김성희
  165. * @-----------------------------------
  166. * @type : function
  167. * @access : public
  168. * @desc : 출고유형, 출고유형 사유 코드 셋팅
  169. */
  170. function fSetDeliveKindCd(){
  171. var delivekindcd = model.getValue("/root/hidden/ref/delivekindcd");
  172. //출고유형 선택 하지 않았을때
  173. if(delivekindcd == "00"){
  174. //출고유형별 사유코드 비활성화
  175. cmb_delivekindresn.disabled = true;
  176. model.setValue("/root/hidden/ref/delivekindresn" , "00");
  177. cmb_delivekindresn.choices.itemset.attribute("nodeset") = "/root/init/LB0802[etc01= '00']";
  178. //출고유형 선택시 유형별 사유코드 조회
  179. }else{
  180. //출고유형별 사유코드 활성화
  181. cmb_delivekindresn.disabled = false;
  182. model.setValue("/root/hidden/ref/delivekindresn" , "00");
  183. cmb_delivekindresn.choices.itemset.attribute("nodeset") = "/root/init/LB0802[etc01= '00' or etc01='"+ delivekindcd +"']";
  184. }
  185. cmb_delivekindresn.refresh();
  186. //fSetDeliveKindRsen();
  187. }
  188. function fSetDeliveKindRsen(){
  189. var searchgbn = model.getValue("/root/hidden/ref/searchgbn");
  190. if(searchgbn == "blodno"){
  191. var delivekindcd = model.getValue("/root/hidden/ref/delivekindcd");
  192. var delivekindresn= model.getValue("/root/hidden/ref/delivekindresn");
  193. grd_bloddelivelist.cellComboNodeset(grd_bloddelivelist.row ,grd_bloddelivelist.colRef("delivekindresn")) = "/root/init/LB0802[etc01= '"+ delivekindcd +"']";
  194. if(delivekindcd == "00"){
  195. model.setValue("/root/main/bloddelive/bloddelivelist["+grd_bloddelivelist.row+"]/delivekindcd", "");
  196. }else{
  197. model.setValue("/root/main/bloddelive/bloddelivelist["+grd_bloddelivelist.row+"]/delivekindcd", delivekindcd);
  198. }
  199. if(delivekindresn == "00"){
  200. model.setValue("/root/main/bloddelive/bloddelivelist["+grd_bloddelivelist.row+"]/delivekindresn", "");
  201. }else{
  202. model.setValue("/root/main/bloddelive/bloddelivelist["+grd_bloddelivelist.row+"]/delivekindresn", delivekindresn);
  203. }
  204. }
  205. }
  206. /* @group : 키이벤트
  207. * @ver : 2008.08.18
  208. * @by : 김성희
  209. * @-----------------------------------
  210. * @type : function
  211. * @access : public
  212. * @desc : 엔터키 입력시
  213. */
  214. function fKeyEvent(){
  215. if(event.keyCode == "13"){
  216. //-------------------------------------
  217. //출고자 엔터키 입력시
  218. if(event.target == "ipt_delivepid"){
  219. fGetDelivePsn();
  220. model.setFocus("ipt_blodno");
  221. }
  222. //-------------------------------------
  223. //혈액번호 리딩시
  224. if(event.target == "ipt_blodno"){
  225. model.setValue("/root/hidden/ref/blodno", "");
  226. model.setValue("/root/hidden/ref/blodno", (ipt_blodno.currentText).substr(0,10));
  227. if(model.getValue("/root/hidden/ref/blodcomcd") == "00"){
  228. messageBox("혈액성분을 선택해주십시오.", "I");
  229. return;
  230. }
  231. fGetBlodDeliveList("blodno");
  232. model.setValue("/root/hidden/ref/blodno", "");
  233. ipt_blodno.refresh();
  234. model.setFocus("ipt_blodno");
  235. ipt_blodno.selBegin = 0;
  236. ipt_blodno.selEnd = ipt_blodno.currentText.length;
  237. }
  238. if(event.target =="ipt_cancelblod"){ // 출고취소 혈액번호 리딩시
  239. if(model.getValue("/root/hidden/ref/blodcomcdcc") == "00"){
  240. messageBox("혈액성분을 선택해주십시오.", "I");
  241. return;
  242. }
  243. model.setValue("/root/hidden/ref/blodnocc", "");
  244. model.setValue("/root/hidden/ref/blodnocc", (ipt_cancelblod.currentText).substr(0,10));
  245. model.setValue("/root/hidden/ref/searchgbn", "blodno");
  246. fGetBlodDeliveListcc("blodno");
  247. model.setFocus("ipt_cancelblod");
  248. }
  249. }
  250. }
  251. /* @group : 출고자 조회
  252. * @ver : 2008.08.18
  253. * @by : 김성희
  254. * @-----------------------------------
  255. * @type : function
  256. * @access : public
  257. * @desc : 출고자 조회
  258. */
  259. function fGetDelivePsn(){
  260. model.setValue("/root/hidden/ref/delivepid", (ipt_delivepid.currentText).toUpperCase());
  261. model.setValue("/root/send/delivepid", model.getValue("/root/hidden/ref/delivepid"));
  262. submit("TRLBT12101");
  263. model.setValue("/root/hidden/ref/delivenm", model.getValue("/root/main/delivepsninfo/delivenm"));
  264. opt_delivenm.refresh();
  265. if(opt_delivenm.value == ""){
  266. model.setFocus("ipt_delivepid");
  267. ipt_delivepid.selBegin = 0;
  268. ipt_delivepid.selEnd = ipt_delivepid.currentText.length;
  269. }else{
  270. model.setFocus("ipt_blodbarcd");
  271. }
  272. }
  273. /* @group : 혈액출고 조회
  274. * @ver : 2008.08.18
  275. * @by : 김성희
  276. * @-----------------------------------
  277. * @type : function
  278. * @access : public
  279. * @desc : 혈액출고 조회
  280. */
  281. function fGetBlodDeliveList(ref){
  282. grd_bloddelivelist.rebuildStyle();
  283. var blodcomcd = model.getValue("/root/hidden/ref/blodcomcd");
  284. var blodbarcd = model.getValue("/root/init/LB0803[cd='"+ blodcomcd +"']/etc01");
  285. var searchgbn = model.getValue("/root/hidden/ref/searchgbn");
  286. var returnValue ="";
  287. //// if(model.getValue("/root/hidden/stat")=="2"){
  288. //// var stat2 = model.getValue("/root/hidden/stat2");
  289. //// fSetgrdstat(stat2);
  290. //// model.setValue("/root/hidden/stat","1");
  291. //// model.refresh();
  292. //// }
  293. //-------------------------------------
  294. //조회버튼 클릭시
  295. if(ref == "btn"){
  296. //전체 체크박스
  297. grd_bloddelivelist.fixedcellcheckbox(0,1)= false;
  298. grd_bloddelivelist.colHidden(9) = false;
  299. grd_bloddelivelist.colHidden(10) = false;
  300. grd_bloddelivelist.colHidden(11) = true;
  301. grd_bloddelivelist.colHidden(12) = true;
  302. if(model.getValue("/root/hidden/ref/startdt") == "" || model.getValue("/root/hidden/ref/enddt") == ""){
  303. messageBox("출고일자를 입력해주십시오.", "I");
  304. return;
  305. }
  306. model.setValue("/root/send/data/startdt" , model.getValue("/root/hidden/ref/startdt"));
  307. model.setValue("/root/send/data/enddt" , model.getValue("/root/hidden/ref/enddt"));
  308. model.setValue("/root/send/data/blodcomcd" , blodcomcd);
  309. model.setValue("/root/send/data/blodbarcd" , blodbarcd);
  310. grd_bloddelivelist.colDisabled(1) = true;
  311. /*if(searchgbn == "blodno"){
  312. //Q010=초기화 하시겠습니까? retrun yes=6, no=7
  313. returnValue = messageBox("출고중인 혈액이 있습니다. \n출고중인 혈액을","Q010");
  314. }
  315. //-------------------------------------------------------------------
  316. if(returnValue == "7"){ //혈액출고 계속 진행
  317. return false;
  318. }else if(returnValue == "6"){
  319. return true;
  320. } */
  321. model.setValue("/root/hidden/ref/searchgbn", ref);
  322. submit("TRLBT12102");
  323. //------------------------------------
  324. //혈액번호 바코드 리딩시
  325. }else if(ref == "blodno"){
  326. //전체 체크박스
  327. grd_bloddelivelist.fixedcellcheckbox(0,1)= true;
  328. grd_bloddelivelist.colHidden(9) = true;
  329. grd_bloddelivelist.colHidden(10) = true;
  330. grd_bloddelivelist.colHidden(11) = false;
  331. grd_bloddelivelist.colHidden(12) = false;
  332. if(model.getValue("/root/hidden/ref/delivekindcd") == "00" || model.getValue("/root/hidden/ref/delivekindresn") == "00"){
  333. messageBox("출고유형을 선택해주십시오.", "I");
  334. return;
  335. }
  336. var cnt = 0;
  337. var rows = 0;
  338. model.setValue("/root/send/data/blodno" , model.getValue("/root/hidden/ref/blodno"));
  339. model.setValue("/root/send/data/blodbarcd" , blodbarcd);
  340. grd_bloddelivelist.colDisabled(1) = false;
  341. submit("TRLBT12103");
  342. var tmpcnt = getNodesetCount("/root/main/temp/bloddelivelist");
  343. if(searchgbn == "blodno"){
  344. //cnt = getNodesetCount("/root/main/bloddelive/bloddelivelist");
  345. rows = grd_bloddelivelist.rows;
  346. //if(cnt == 0) {
  347. // model.removeNodeset("/root/main/bloddelive/bloddelivelist");
  348. // model.refresh();
  349. // copyNodeType("/root/main/bloddelive", "/root/main/temp", "replace");
  350. //}else if(cnt > 0){
  351. //alert("22222");
  352. copyNodeType("/root/main/bloddelive", "/root/main/temp", "after");
  353. //}
  354. }else {
  355. rows = 1;
  356. model.removeNodeset("/root/main/bloddelive/bloddelivelist");
  357. model.refresh();
  358. copyNodeType("/root/main/bloddelive", "/root/main/temp", "replace");
  359. //alert("3333");
  360. }
  361. if(tmpcnt > 0){
  362. var delivekindcd = model.getValue("/root/hidden/ref/delivekindcd");
  363. var delivekindresn= model.getValue("/root/hidden/ref/delivekindresn");
  364. model.setValue("/root/main/bloddelive/bloddelivelist["+rows+"]/delivekindcd", delivekindcd);
  365. grd_bloddelivelist.refresh();
  366. grd_bloddelivelist.cellComboNodeset(rows ,grd_bloddelivelist.colRef("delivekindresn")) = "/root/init/LB0802[etc01= '"+ delivekindcd +"']";
  367. grd_bloddelivelist.refresh();
  368. model.setValue("/root/main/bloddelive/bloddelivelist["+rows+"]/delivekindresn", delivekindresn);
  369. }
  370. grd_bloddelivelist.refresh();
  371. //grd_bloddelivelist.addRow(false);
  372. grd_bloddelivelist.row = (grd_bloddelivelist.rows-1);
  373. var gridRow = grd_bloddelivelist.rows; //===
  374. grd_bloddelivelist.topRow = gridRow;
  375. model.setValue("/root/hidden/ref/searchgbn", "blodno");
  376. }
  377. model.setValue("/root/hidden/stat2", "1");
  378. }
  379. /* @group : 혈액출고 취소 할 혈액 조회
  380. * @ver : 2010.03.12
  381. * @by : 박정은
  382. * @-----------------------------------
  383. * @type : function
  384. * @access : public
  385. * @desc : 출고 취소할 혈액 조회
  386. */
  387. function fGetBlodDeliveListcc(ref){
  388. //grd_bloddelivelist.rebuildStyle();
  389. grd_bloddelivelist.fixedcellcheckbox(0,1)= true;
  390. var blodcomcdcc = model.getValue("/root/hidden/ref/blodcomcdcc");
  391. var blodbarcdcc = model.getValue("/root/init/LB0803[cd='"+ blodcomcdcc +"']/etc01");
  392. //var searchgbn = model.getValue("/root/hidden/ref/searchgbn");
  393. //var returnValue ="";
  394. //-------------------------------------
  395. //혈액번호 바코드리딩 클릭시
  396. if(ref == "blodno"){
  397. //// if(model.getValue("/root/hidden/stat")=="1"){
  398. //// var stat2 = model.getValue("/root/hidden/stat2");
  399. //// fSetgrdstat(stat2);
  400. //// model.setValue("/root/hidden/stat","2");
  401. //// model.refresh();
  402. //// }
  403. model.makeValue("/root/send/data/blodnocc" , model.getValue("/root/hidden/ref/blodnocc"));
  404. model.makeValue("/root/send/data/blodbarcdcc" , blodbarcdcc);
  405. submit("TRLBT12104");
  406. grd_bloddelivelist.colHidden(9) = true;
  407. grd_bloddelivelist.colHidden(10) = true;
  408. grd_bloddelivelist.colHidden(11) = false;
  409. grd_bloddelivelist.colHidden(12) = false;
  410. if(getNodesetCount("/root/main/tempcc/bloddelivelist") > 0){ // 취소할 혈액 조회되면
  411. //grd_bloddelivelist.addRow();
  412. //copyNodeType("/root/main/bloddelive", "/root/main/tempcc", "replace");
  413. var tblodno = model.getValue("/root/main/tempcc/bloddelivelist/blodno");
  414. var tblodbarcd = model.getValue("/root/main/tempcc/bloddelivelist/blodbarcd");
  415. if(grd_bloddelivelist.rows > 1) { // 조회된 목록 있을때
  416. var findrow = grd_bloddelivelist.findRow(tblodno , 1, 2 , true, true);
  417. if(findrow<1){ // 혈액번호 없을때
  418. grd_bloddelivelist.addRow();
  419. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/chk", "Y");
  420. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodno", model.getValue("/root/main/tempcc/bloddelivelist/blodno"));
  421. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodcomcd", model.getValue("/root/main/tempcc/bloddelivelist/blodcomcd"));
  422. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodbarcd", model.getValue("/root/main/tempcc/bloddelivelist/blodbarcd"));
  423. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/deliveid", model.getValue("/root/main/tempcc/bloddelivelist/deliveid"));
  424. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivekindcd", model.getValue("/root/main/tempcc/bloddelivelist/delivekindcd"));
  425. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivekindresn", model.getValue("/root/main/tempcc/bloddelivelist/delivekindresn"));
  426. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/instcd", model.getValue("/root/main/tempcc/bloddelivelist/instcd"));
  427. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/abo", model.getValue("/root/main/tempcc/bloddelivelist/abo"));
  428. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/windt", model.getValue("/root/main/tempcc/bloddelivelist/windt"));
  429. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/validt", model.getValue("/root/main/tempcc/bloddelivelist/validt"));
  430. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivedt", model.getValue("/root/main/tempcc/bloddelivelist/delivedt"));
  431. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivenm", model.getValue("/root/main/tempcc/bloddelivelist/delivenm"));
  432. grd_bloddelivelist.cellStyle("color", (grd_bloddelivelist.rows-1), 1, (grd_bloddelivelist.rows-1), 12) = "red";
  433. }else{ // 있을때
  434. model.setValue("/root/main/bloddelive/bloddelivelist["+findrow+"]/chk", "Y");
  435. model.setValue("/root/main/bloddelive/bloddelivelist["+findrow+"]/delivekindresn", model.getValue("/root/main/tempcc/bloddelivelist/delivekindresn"));
  436. model.setValue("/root/main/bloddelive/bloddelivelist["+findrow+"]/iokindresn", model.getValue("/root/main/tempcc/bloddelivelist/iokindresn"));
  437. model.setValue("/root/main/bloddelive/bloddelivelist["+findrow+"]/iokind", model.getValue("/root/main/tempcc/bloddelivelist/iokind"));
  438. model.setValue("/root/main/bloddelive/bloddelivelist["+findrow+"]/delivekindcd", model.getValue("/root/main/tempcc/bloddelivelist/delivekindcd"));
  439. grd_bloddelivelist.cellStyle("color", findrow, 1, findrow, 12) = "red";
  440. //grd_bloddelivelist.refresh();
  441. }
  442. }else{ // 그리드 내용 없을떄
  443. grd_bloddelivelist.addRow();
  444. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/chk", "Y");
  445. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodno", model.getValue("/root/main/tempcc/bloddelivelist/blodno"));
  446. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodcomcd", model.getValue("/root/main/tempcc/bloddelivelist/blodcomcd"));
  447. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodbarcd", model.getValue("/root/main/tempcc/bloddelivelist/blodbarcd"));
  448. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/deliveid", model.getValue("/root/main/tempcc/bloddelivelist/deliveid"));
  449. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivekindcd", model.getValue("/root/main/tempcc/bloddelivelist/delivekindcd"));
  450. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivekindresn", model.getValue("/root/main/tempcc/bloddelivelist/delivekindresn"));
  451. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/instcd", model.getValue("/root/main/tempcc/bloddelivelist/instcd"));
  452. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/abo", model.getValue("/root/main/tempcc/bloddelivelist/abo"));
  453. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/windt", model.getValue("/root/main/tempcc/bloddelivelist/windt"));
  454. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/validt", model.getValue("/root/main/tempcc/bloddelivelist/validt"));
  455. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivedt", model.getValue("/root/main/tempcc/bloddelivelist/delivedt"));
  456. model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivenm", model.getValue("/root/main/tempcc/bloddelivelist/delivenm"));
  457. grd_bloddelivelist.cellStyle("color", (grd_bloddelivelist.rows-1), 1, (grd_bloddelivelist.rows-1), 12) = "red";
  458. }
  459. }
  460. model.refresh();
  461. // grd_bloddelivelist.row = (grd_bloddelivelist.rows-1);
  462. //grd_bloddelivelist.rowStatus(grd_bloddelivelist.row)=1;
  463. }
  464. model.setValue("/root/hidden/stat2", "2");
  465. //model.refresh();
  466. }
  467. /* @group : 혈액출고 조회
  468. * @ver : 2008.08.18
  469. * @by : 김성희
  470. * @-----------------------------------
  471. * @type : function
  472. * @access : public
  473. * @desc : 혈액출고 조회
  474. */
  475. function fSaveBlodDelive(){
  476. if(model.getValue("/root/hidden/ref/delivepid") == "" || model.getValue("/root/hidden/ref/delivenm") == ""){
  477. messageBox("출고자를 입력하십시오." , "I");
  478. return;
  479. }
  480. var cnt = getNodesetCount("/root/main/bloddelive/bloddelivelist");
  481. var TF = false;
  482. var delivekindcd = "";
  483. var delivekindresn = "";
  484. for(iRow = 1; iRow <= cnt; iRow++){
  485. delivekindcd = model.getValue("/root/main/bloddelive/bloddelivelist["+iRow+"]/delivekindcd");
  486. delivekindresn = model.getValue("/root/main/bloddelive/bloddelivelist["+iRow+"]/delivekindresn");
  487. if(delivekindcd == "" || delivekindresn == ""){
  488. messageBox(iRow + "번째 행에 출고유형 및 사유가 누락되었습니다." , "I");
  489. return;
  490. }
  491. if(model.getValue("/root/main/bloddelive/bloddelivelist["+iRow+"]/chk") == "Y"){
  492. grd_bloddelivelist.addStatus(iRow, "insert");
  493. TF = true;
  494. }
  495. }
  496. if(TF){
  497. //alert(grd_bloddelivelist.getUpdateData("insert"));
  498. model.setValue("/root/send/grddata" , grd_bloddelivelist.getUpdateData("insert"));
  499. model.setValue("/root/send/delivepid", model.getValue("/root/hidden/ref/delivepid"));
  500. submit("TXLBT12101");
  501. grd_bloddelivelist.clearStatus();
  502. grd_bloddelivelist.refresh();
  503. }else{
  504. messageBox("저장 할 내역이 없습니다." , "I");
  505. return;
  506. }
  507. }
  508. // 출고취소
  509. function fSaveBlodDeliveCancel(){
  510. for(iRow = 1; iRow < grd_bloddelivelist.rows; iRow++){
  511. if(model.getValue("/root/main/bloddelive/bloddelivelist["+iRow+"]/chk")=="Y"){
  512. grd_bloddelivelist.rowStatus(iRow) = 1;
  513. }
  514. }
  515. //grd_bloddelivelist.refresh();
  516. if(grd_bloddelivelist.getUpdateData("insert") == ""){
  517. messageBox("저장 할 내역이 없습니다." , "I");
  518. return;
  519. }
  520. model.makeValue("/root/send/grddata" , grd_bloddelivelist.getUpdateData("insert"));
  521. //model.makeValue("/root/send/delivepid", model.getValue("/root/hidden/ref/delivepid"));
  522. submit("TXLBT12102");
  523. model.removeNodeset("/root/main/bloddelive/bloddelivelist");
  524. grd_bloddelivelist.clearStatus();
  525. grd_bloddelivelist.refresh();
  526. }
  527. // 그리드상태 설정
  528. function fSetgrdstat(ref){
  529. var stat = model.getValue("/root/hidden/stat"); // 라디오버튼
  530. var returnValue = "";
  531. if(grd_bloddelivelist.rows>1){
  532. if(stat == "1"){
  533. //alert("ref= " + ref);
  534. //Q010=초기화 하시겠습니까? retrun yes=6, no=7
  535. returnValue = messageBox("취소중인 혈액이 있습니다. \n취소중인 혈액을","Q010");
  536. }else if(stat =="2"){
  537. //alert("ref= " + ref);
  538. returnValue = messageBox("출고중인 혈액이 있습니다. \n출고중인 혈액을","Q010");
  539. }
  540. //-------------------------------------------------------------------
  541. if(returnValue == "7"){ //혈액출고 계속 진행
  542. return false;
  543. }else if(returnValue == "6"){
  544. model.removeNodeset("/root/main/bloddelive/bloddelivelist");
  545. model.refresh();
  546. return true;
  547. }
  548. }
  549. }
  550. ]]>
  551. </script>
  552. </xhtml:head>
  553. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  554. <group id="group4" style="left:0px; top:40px; width:1195px; height:744px; ">
  555. <caption id="caption11" class="tit_2" style="left:5px; top:105px; width:139px; height:13px; ">혈액출고 목록</caption>
  556. <line id="line7" class="line_1" style="x1:0px; y1:120px; x2:1194px; y2:120px; "/>
  557. <datagrid id="grd_bloddelivelist" nodeset="/root/main/bloddelive/bloddelivelist" caption="^혈액번호^성분제제^혈액형^입고일시^유효일시^출고일시^출고자^출고유형^사유^출고유형^사유^혈액바코드^기관코드" colsep="^" colwidth="35, 123, 138, 70, 117, 104, 100, 100, 100, 181, 100, 181,0, 0" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:125px; width:1194px; height:608px; text-align:center; ">
  558. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  559. <col ref="blodno" type="input"/>
  560. <col disabled="true" ref="blodbarcd" type="combo">
  561. <choices>
  562. <itemset nodeset="/root/init/LB0803">
  563. <label ref="nm"/>
  564. <value ref="etc01"/>
  565. </itemset>
  566. </choices>
  567. </col>
  568. <col ref="abo" style="text-align:center; "/>
  569. <col ref="windt" format="yyyy-mm-dd hh:nn"/>
  570. <col ref="validt" format="yyyy-mm-dd hh:nn"/>
  571. <col ref="delivedt" format="yyyy-mm-dd hh:nn"/>
  572. <col ref="delivenm"/>
  573. <col ref="iokind"/>
  574. <col ref="iokindresn"/>
  575. <col disabled="true" ref="delivekindcd" type="combo">
  576. <choices>
  577. <itemset nodeset="/root/init/LB0801">
  578. <label ref="nm"/>
  579. <value ref="cd"/>
  580. </itemset>
  581. </choices>
  582. </col>
  583. <col disabled="true" ref="delivekindresn" type="combo">
  584. <choices>
  585. <itemset nodeset="/root/init/LB0802">
  586. <label ref="nm"/>
  587. <value ref="cd"/>
  588. </itemset>
  589. </choices>
  590. </col>
  591. <col ref="blodbarcd"/>
  592. <col ref="instcd"/>
  593. <script type="javascript" ev:event="onaftersort">
  594. <![CDATA[
  595. grd_bloddelivelist.gridToInstance();
  596. ]]>
  597. </script>
  598. </datagrid>
  599. <group id="group2" style="left:0px; top:0px; width:1195px; height:100px; ">
  600. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:1195px; height:95px; "/>
  601. <input id="ipt_startdt" ref="/root/hidden/ref/startdt" class="input_search" inputtype="date" style="left:470px; top:8px; width:90px; height:19px; "/>
  602. <caption id="caption7" style="left:565px; top:10px; width:15px; height:20px; ">~</caption>
  603. <input id="ipt_enddt" ref="/root/hidden/ref/enddt" class="input_search" inputtype="date" style="left:580px; top:8px; width:90px; height:19px; "/>
  604. <button id="btn_ref" class="btn1_letter2" style="left:1124px; top:19px; width:56px; height:22px; ">
  605. <caption>조회</caption>
  606. <script type="javascript" ev:event="DOMActivate">
  607. <![CDATA[
  608. fGetBlodDeliveList("btn");
  609. ]]>
  610. </script>
  611. </button>
  612. <caption id="caption2" class="search_name" style="left:30px; top:9px; width:96px; height:17px; ">출고자 :</caption>
  613. <input id="ipt_delivepid" ref="/root/hidden/ref/delivepid" class="input_button" inputtype="button" style="left:125px; top:8px; width:100px; height:19px; "/>
  614. <caption id="caption3" class="search_name" style="left:375px; top:9px; width:89px; height:17px; ">출고일자 :</caption>
  615. <output id="opt_delivenm" ref="/root/hidden/ref/delivenm" class="output_search" style="left:232px; top:8px; width:101px; height:19px; "/>
  616. <line id="line13" class="line_4" style="x1:1109px; y1:8px; x2:1109px; y2:52px; "/>
  617. <input id="ipt_blodno" ref="/root/hidden/ref/blodno" class="input_button" inputtype="button" style="left:125px; top:33px; width:208px; height:19px; "/>
  618. <caption id="caption1" class="search_name" style="left:30px; top:34px; width:90px; height:17px; ">혈액번호 :</caption>
  619. <caption id="caption4" class="search_name" style="left:375px; top:33px; width:89px; height:17px; ">출고유형 :</caption>
  620. <select1 id="cmb_delivekindcd" ref="/root/hidden/ref/delivekindcd" class="combo_s_essential" appearance="minimal" style="left:470px; top:32px; width:110px; height:19px; ">
  621. <choices>
  622. <itemset nodeset="/root/init/LB0801">
  623. <label ref="nm"/>
  624. <value ref="cd"/>
  625. </itemset>
  626. </choices>
  627. <script type="javascript" ev:event="xforms-value-changed">
  628. <![CDATA[
  629. //출고유형별로 콤보내용변경..
  630. fSetDeliveKindCd();
  631. ]]>
  632. </script>
  633. </select1>
  634. <select1 id="cmb_delivekindresn" ref="/root/hidden/ref/delivekindresn" class="combo_s_essential" appearance="minimal" style="left:579px; top:32px; width:135px; height:19px; ">
  635. <choices>
  636. <itemset nodeset="/root/init/LB0802">
  637. <label ref="nm"/>
  638. <value ref="cd"/>
  639. </itemset>
  640. </choices>
  641. <script type="javascript" ev:event="xforms-value-changed">
  642. <![CDATA[
  643. //사유 선택시 출고목록에 셋팅
  644. //fSetDeliveKindRsen();
  645. ]]>
  646. </script>
  647. </select1>
  648. <caption id="caption6" class="search_name" style="left:745px; top:9px; width:89px; height:17px; ">혈액성분 :</caption>
  649. <select1 id="cmb_blodcomcd" ref="/root/hidden/ref/blodcomcd" class="combo_s_essential" appearance="minimal" style="left:840px; top:8px; width:135px; height:19px; ">
  650. <choices>
  651. <itemset nodeset="/root/init/LB0803">
  652. <label ref="nm"/>
  653. <value ref="cd"/>
  654. </itemset>
  655. </choices>
  656. </select1>
  657. <line id="line5" class="line_7" style="x1:15px; y1:59px; x2:1180px; y2:59px; "/>
  658. <caption id="caption8" class="search_name" style="left:375px; top:67px; width:156px; height:17px; ">출고취소 혈액번호 :</caption>
  659. <input id="ipt_cancelblod" ref="/root/hidden/ref/blodnocc" class="input_button" inputtype="button" style="left:525px; top:66px; width:153px; height:19px; "/>
  660. <select1 id="combo1" ref="/root/hidden/ref/blodcomcdcc" class="combo_s_essential" appearance="minimal" style="left:125px; top:68px; width:208px; height:19px; ">
  661. <choices>
  662. <itemset nodeset="/root/init/LB0803">
  663. <label ref="nm"/>
  664. <value ref="cd"/>
  665. </itemset>
  666. </choices>
  667. </select1>
  668. <caption id="caption9" class="search_name" style="left:30px; top:69px; width:89px; height:17px; ">혈액성분 :</caption>
  669. <select1 id="radio1" ref="/root/hidden/stat" visibility="hidden" appearance="full" vcellspacing="28" overflow="visible" style="left:1020px; top:10px; width:80px; height:75px; font-weight:bold; text-decoration:underline; color:#000000; border-style:none; ">
  670. <choices>
  671. <item>
  672. <label>혈액출고</label>
  673. <value>1</value>
  674. </item>
  675. <item>
  676. <label>출고취소</label>
  677. <value>2</value>
  678. </item>
  679. </choices>
  680. <script type="javascript" ev:event="xforms-value-changed">
  681. <![CDATA[
  682. //// fSetgrdstat();
  683. ]]>
  684. </script>
  685. </select1>
  686. </group>
  687. <button id="btn_add" class="btn2_letter3" style="left:1141px; top:98px; width:53px; height:19px; ">
  688. <caption>행삭제</caption>
  689. <script type="javascript" ev:event="onclick">
  690. <![CDATA[
  691. grd_bloddelivelist.deleteRow(grd_bloddelivelist.row);
  692. ]]>
  693. </script>
  694. </button>
  695. </group>
  696. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  697. <caption id="caption5" class="tit_1" style="left:0px; top:0px; width:145px; height:14px; ">혈액출고관리</caption>
  698. </group>
  699. <group id="group3" style="left:0px; top:13px; width:1195px; height:27px; ">
  700. <button id="btn_init" class="btn4_letter3" style="left:1126px; top:3px; width:68px; height:22px; ">
  701. <caption>초기화</caption>
  702. <script type="javascript" ev:event="DOMActivate">
  703. <![CDATA[
  704. fSetInit();
  705. ]]>
  706. </script>
  707. </button>
  708. <line id="line1" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  709. <button id="btn_save" class="btn4_letter2" style="left:984px; top:3px; width:56px; height:22px; ">
  710. <caption>저장</caption>
  711. <script type="javascript" ev:event="DOMActivate">
  712. <![CDATA[
  713. if(model.getValue("/root/hidden/ref/searchgbn") == "blodno"){
  714. fSaveBlodDelive();
  715. }
  716. ]]>
  717. </script>
  718. </button>
  719. <button id="button1" class="btn4_letter4" style="left:1043px; top:3px; width:80px; height:22px; ">
  720. <caption>출고취소</caption>
  721. <script type="javascript" ev:event="DOMActivate">
  722. <![CDATA[
  723. if(model.getValue("/root/hidden/ref/searchgbn") == "blodno"){
  724. fSaveBlodDeliveCancel();
  725. }
  726. ]]>
  727. </script>
  728. </button>
  729. </group>
  730. <script type="javascript" ev:event="onkeypress">
  731. <![CDATA[
  732. fKeyEvent();
  733. ]]>
  734. </script>
  735. </xhtml:body>
  736. </xhtml:html>