SPLNP90800_골수이식환자관리.xrw 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPLNP90700_장기이식대기자.xrw
  4. * 설 명 : 장기이식대기자관리화면
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : 유민규
  7. * 작 성 일 : 2011.02.
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  12. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  13. <xhtml:head>
  14. <xhtml:title>Manual작업대장</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <bonetrlist>
  20. <chk/>
  21. <bmtrnsseqno/>
  22. <pid/>
  23. <patnm/>
  24. <keeppos/>
  25. <dnorpid/>
  26. <dnornm/>
  27. <trnsdt/>
  28. <prerslt/>
  29. <prersltdt/>
  30. <postrslt/>
  31. <postrsltdt/>
  32. <rsltno/>
  33. <rgstdt/>
  34. </bonetrlist>
  35. </main>
  36. <send>
  37. <workgbn/>
  38. <workcmd/>
  39. <colfromdd/>
  40. <coltodd/>
  41. <bmtrnsseqno/>
  42. <pid/>
  43. <bonetrlist/>
  44. <uibonetrlist/>
  45. <bcolgbn/>
  46. </send>
  47. <init>
  48. <report/>
  49. <tclsnm1/>
  50. <tclsnm2/>
  51. <tclsnm3/>
  52. <tclsnm4/>
  53. <tclsnm5/>
  54. <tclsnms/>
  55. </init>
  56. <hidden>
  57. <ref>
  58. <workgbn/>
  59. <workcmd/>
  60. <searchadd/>
  61. <colfromdd/>
  62. <coltodd/>
  63. </ref>
  64. </hidden>
  65. </root>
  66. </instance>
  67. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  68. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  71. <script type="javascript" ev:event="xforms-ready">
  72. <![CDATA[
  73. fSetInit();
  74. ]]>
  75. </script>
  76. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0116"/>
  77. <submission id="TRLLF90401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/testgrupdetl"/>
  78. <submission id="TRLLP02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" add="bottom" resultref="/root/main/nmedworklist/write"/>
  79. <submission id="TRLNP90801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/bonetrList"/>
  80. <submission id="TXLNP90801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  81. <submission id="TXLNP90802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  82. </model>
  83. <script type="javascript">
  84. <![CDATA[
  85. function fExeExcel(pGridId) {
  86. if(pGridId == "1"){
  87. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  88. if (fileName != "")
  89. {
  90. datagrid1.saveExcel(fileName);
  91. }
  92. }
  93. else{
  94. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  95. if (fileName != "")
  96. {
  97. datagrid2.saveExcel(fileName);
  98. }
  99. }
  100. }
  101. function fSetInit() {
  102. model.removeNodeset("/root/main/bonetrlist");
  103. model.setFocus("ipt_search");
  104. model.refresh();
  105. }
  106. //조회
  107. function fGetNmedWorkList(gbn){
  108. var acptfromdd = model.getValue("/root/hidden/ref/acptfromdd");
  109. var acpttodd = model.getValue("/root/hidden/ref/acpttodd");
  110. var divgrupcd = model.getValue("/root/hidden/ref/divgrupcd");
  111. //var divgrupnmlist = chk_divgrupnmlist.value;
  112. //var divgrupnmlistlabel = chk_divgrupnmlist.label;
  113. var divgrupnm = "";
  114. var divgrupnmcount = 0;
  115. if(acptfromdd == "" || acpttodd == ""){
  116. messageBox("접수일자가 선택되지 ","E007","");
  117. return;
  118. }
  119. if(model.getValue("/root/hidden/ref/tclscdlist/tclscdlist2") == ""){
  120. messageBox("작업구분이 선택되지 ","E007","");
  121. return;
  122. }
  123. /*
  124. if(divgrupnmlistlabel != ""){
  125. divgrupnm = divgrupnmlistlabel.split("▦");
  126. divgrupnmcount = divgrupnm.length;
  127. }else{
  128. messageBox("분주라벨이 선택되지 ","E007","");
  129. return;
  130. }
  131. */
  132. model.setValue("/root/send/acptfromdd", model.getValue("/root/hidden/ref/acptfromdd"));
  133. model.setValue("/root/send/acpttodd", model.getValue("/root/hidden/ref/acpttodd"));
  134. model.setValue("/root/send/divgrupcd", model.getValue("/root/hidden/ref/divgrupcd"));
  135. //model.setValue("/root/send/divgrupcd", "TFT");
  136. //if(divgrupnmlist != ""){
  137. // model.setValue("/root/send/tclscd", divgrupnmlist);
  138. //}else if(divgrupnmlist == ""){
  139. // model.setValue("/root/send/tclscd", "");
  140. //}
  141. model.setValue("/root/send/userdeptflagcd", model.getValue("/root/init/LB0000/nm"));
  142. //model.setValue("/root/send/userdeptflagcd", "N");
  143. //alert(model.getValue("/root/send/acptfromdd"));
  144. //alert(model.getValue("/root/send/acpttodd"));
  145. //alert(model.getValue("/root/send/tclscd"));
  146. //alert(model.getValue("/root/send/userdeptflagcd"));
  147. //var nTclsnm = chk_divgrupnmlist.label;
  148. //nTclsnm = nTclsnm.setReplaceWord("▦", ", ");
  149. //model.setValue("/root/hidden/nTclsnm", nTclsnm);
  150. datagrid1.fixedcellischeck(0, 1) = false;
  151. if(gbn == "enter"){
  152. model.setValue("/root/send/tclsgbn", model.getValue("/root/hidden/ref/tclsgbn"));
  153. model.setValue("/root/send/workbcno", model.getValue("/root/hidden/ref/workbcno"));
  154. model.setValue("/root/send/tclscdlist", model.getValue("/root/hidden/ref/tclscdlist/tclscdlist"));
  155. var bcno = model.getValue("/root/hidden/ref/workbcno");
  156. var find = datagrid1.findRow(bcno, 1, 3, true, true);
  157. if(find > 0) {
  158. messageBox("이미 선택된 검체", "E008");
  159. return;
  160. }
  161. submit("TRLLP02601");
  162. var cRow = datagrid1.rows - 1;
  163. var WBC = model.getValue("/root/main/nmedworklist/write["+cRow+"]/cbc");
  164. var NUT = model.getValue("/root/main/nmedworklist/write["+cRow+"]/nut");
  165. fCalWB(WBC, NUT, cRow);
  166. model.refresh();
  167. }else{
  168. model.setValue("/root/send/tclsgbn", model.getValue("/root/hidden/ref/tclsgbn"));
  169. model.setValue("/root/send/tclscdlist", model.getValue("/root/hidden/ref/tclscdlist/tclscdlist"));
  170. submit("TRLLP02602");
  171. if(datagrid1.rows > 1){
  172. for(var cRow = 1; cRow < datagrid1.rows ; cRow++){
  173. var WBC = model.getValue("/root/main/nmedworklist/write["+cRow+"]/cbc");
  174. var NUT = model.getValue("/root/main/nmedworklist/write["+cRow+"]/nut");
  175. fCalWB(WBC, NUT, cRow);
  176. }
  177. model.refresh();
  178. }
  179. }
  180. }
  181. function fCalWB(WBC, NUT, cRow){
  182. if(WBC != "" && NUT != ""){
  183. var calWB = (220000 / (WBC * NUT / 100));
  184. var ext = Math.pow(10, 1);
  185. var calWB = Math.round(calWB * ext) / ext;
  186. model.setValue("/root/main/nmedworklist/write["+cRow+"]/wbval", calWB);
  187. }
  188. }
  189. function getAcptChk(){
  190. modal("SPLNP90100","","","","","/root/send","/root/hidden/ref");
  191. }
  192. //분주라벨그룹 상세조회
  193. function fSelectDivGrup(){
  194. model.removenodeset("/root/main/divgrupnmlist");
  195. model.refresh();
  196. model.setValue("/root/hidden/ref/tclscd", "");
  197. model.setValue("/root/send/divgrupcd", combo2.value);
  198. //model.setValue("/root/send/divgrupcd", "TFT");
  199. submit("TRLNP00102" ,false);
  200. if(model.getValue("/root/hidden/ref/divgrupcd") == "00"){
  201. checkbox1.visible = false;
  202. }
  203. else{
  204. checkbox1.visible = true;
  205. }
  206. model.setValue("/root/hidden/ref/allcheck", "");
  207. model.refresh();
  208. /*
  209. var count = getNodesetCount("/root/main/divgrupnmlist");
  210. if(count > 0){
  211. for(i=0; i< count; i++){
  212. chk_divgrupnmlist.select(i);
  213. }
  214. }
  215. */
  216. }
  217. function fExeallcheck(){
  218. var count = getNodesetCount("/root/main/divgrupnmlist");
  219. if(model.getValue("/root/hidden/ref/allcheck") == "1"){
  220. if(count > 0){
  221. for(i=0; i< count; i++){
  222. chk_divgrupnmlist.select(i);
  223. }
  224. }
  225. }
  226. else{
  227. if(count > 0){
  228. for(i=0; i< count; i++){
  229. chk_divgrupnmlist.deselect(i);
  230. }
  231. }
  232. }
  233. }
  234. //조회
  235. function fGetBoneTranfList(){
  236. model.removeNodeset("/root/main/bonetrlist");
  237. model.resetInstanceNode("/root/send");
  238. model.setValue("/root/send/pid", model.getValue("/root/hidden/ref/workcmd"));
  239. //model.setValue("/root/send/workgbn", model.getValue("/root/hidden/ref/workgbn"));
  240. //model.setValue("/root/send/workcmd", model.getValue("/root/hidden/ref/workcmd"));
  241. submit("TRLNP90801");
  242. model.refresh();
  243. }
  244. function fSetAddRow(){
  245. var tDay = getCurrentDate();
  246. if (grd_bonetrlist.rows < 2 ){
  247. grd_bonetrlist.addRow();
  248. }else{
  249. grd_bonetrlist.insertRow(1);
  250. }
  251. //model.copyNodeset("/root/main/OranList2","/root/main/OranList");
  252. //model.removenodeset("/root/main/OranList");
  253. //model.setValue("/root/main/bonetrlist["+grd_bonetrlist.row+"]/bcolldt" , tDay);
  254. //model.setValue("/root/main/bonetrlist["+grd_bonetrlist.row+"]/rgstdt" , tDay);
  255. //model.setValue("/root/main/bonetrlist["+grd_bonetrlist.row+"]/trnshopeorgncd" , "-");
  256. //model.copyNodeset("/root/main/OranList","/root/main/OranList2");
  257. //model.removeNodeset("/root/main/OranList2");
  258. model.refresh();
  259. }
  260. function fInsRowdel() {
  261. var kRows = grd_bonetrlist.rows;
  262. for (var i =1; i<=grd_bonetrlist.rows; i++){
  263. //alert("for");
  264. var chk = model.getValue("/root/main/bonetrlist["+i+"]/chk" );
  265. //alert(chk);
  266. if(model.getValue("/root/main/bonetrlist["+i+"]/chk") == "true"){
  267. //alert("if");
  268. //grd_eqmttclscd.deleteitem(i);
  269. model.removenodeset("/root/main/bonetrlist["+i+"]");
  270. i = i -1;
  271. kRows = kRows -1 ;
  272. }
  273. }
  274. model.refresh();
  275. //var row = grd_eqmttclscd.row;
  276. //grd_eqmttclscd.deleteItem(row);
  277. for ( i =1 ; i<= grd_bonetrlist.rows ; i++){
  278. grd_bonetrlist.rowStatus(i) = 0 ;
  279. }
  280. //alert (stestcdseqno);
  281. /*if ( stestcdseqno == ""){
  282. var row = grd_eqmttclscd.row;
  283. grd_eqmttclscd.deleteItem(row);
  284. }
  285. else{
  286. grd_eqmttclscd.rowStatus(grd_eqmttclscd.row) = 4;
  287. }
  288. */
  289. }
  290. function fsavelist(){
  291. var comment = "" ;
  292. for ( i = 1 ; i<= grd_bonetrlist.rows - 1 ; i++){
  293. //alert(grd_bonetrlist.rows);
  294. //alert(i);
  295. if (grd_bonetrlist.rowStatus(i) == "1" || "2" ){
  296. if(model.getValue("/root/main/bonetrlist["+i+"]/pid" ) == ""){
  297. comment = comment + "등록번호";
  298. }
  299. if (model.getValue("/root/main/bonetrlist["+i+"]/patnm" ) == ""){
  300. comment = comment + "환자명 ";
  301. }
  302. if (model.getValue("/root/main/bonetrlist["+i+"]/keeppos" ) == ""){
  303. //alert("!!")
  304. model.setValue("/root/main/bonetrlist["+i+"]/keeppos" , "-");
  305. }
  306. if (model.getValue("/root/main/bonetrlist["+i+"]/dnornm" ) == ""){
  307. model.setValue("/root/main/bonetrlist["+i+"]/dnornm" , "-");
  308. }
  309. if(comment != ""){
  310. alert ( comment + " 를 입력하여주세요 ");
  311. return;
  312. }
  313. }
  314. }
  315. var uibonetrlist = grd_bonetrlist.getUpdateData();
  316. //model.setValue("/root/send/eqmtcd" , model.getValue("/root/main/eqmtdetllist["+grd_eqmtlist.row+"]/eqmtcd"));
  317. model.setValue("/root/send/uibonetrlist" , uibonetrlist);
  318. model.copyNode("/root/send/bonetrlist" , "/root/main/bonetrlist");
  319. model.refresh();
  320. if(submit("TXLNP90801")){
  321. // 초기화
  322. fSetInit();
  323. }
  324. }
  325. //출력
  326. function fReportPreview(){
  327. var PrintOption = model.getValue("/root/hidden/printoption");
  328. if(PrintOption == "1"){
  329. exeReportPreview("RPLLP02601", "XMLSTR", "", "");
  330. }else{
  331. exeReportPreview("RPLLP02600", "XMLSTR", "", "");
  332. }
  333. }
  334. function fReportPreview2(){
  335. if(model.getValue("/root/hidden/ref/nacpt") == "1"){
  336. getAcptChk();
  337. }
  338. //alert("개발중입니다");
  339. //return;
  340. var divgrupnmlist = chk_divgrupnmlist.value;
  341. //alert(divgrupnmlist);
  342. var divgrupnmlistlabel = chk_divgrupnmlist.label;
  343. var divgrupnm = "";
  344. var divgrupnmcount = 0;
  345. if(divgrupnmlistlabel != ""){
  346. divgrupnm = divgrupnmlistlabel.split("▦");
  347. divgrupnmcount = divgrupnm.length;
  348. }
  349. if(divgrupnmcount != 1){
  350. if(divgrupnmcount > 5){
  351. alert("5개 이상의 항목을 출력할수 없습니다.");
  352. return;
  353. }
  354. fReportPreview3(); // 단항목 워크리스트가 아닐경우
  355. return;
  356. }
  357. //model.setValue("/root/hidden/ref/tclsnm", "["+divgrupnm+"]");
  358. //model.setValue("/root/hidden/ref/grupnm", combo2.label);
  359. fReportPreview3("single");
  360. //exeReportPreview("RPLNP00106", "XMLSTR");
  361. }
  362. function fReportPreview3(gbn){
  363. var testcds = "";
  364. var n = getNodesetCount("/root/main/divgrupnmlist");
  365. var divgrupnmlist = chk_divgrupnmlist.value;
  366. var Tnm = divgrupnmlist.split("▦");
  367. model.setValue("/root/init/tclsnm1", "");
  368. model.setValue("/root/init/tclsnm2", "");
  369. model.setValue("/root/init/tclsnm3", "");
  370. model.setValue("/root/init/tclsnm4", "");
  371. model.setValue("/root/init/tclsnm5", "");
  372. for(divR = 1 ; divR <= n ; divR++){
  373. testcds = testcds + "'" + model.getValue("/root/main/divgrupnmlist["+divR+"]/tclscd") + "',";
  374. for(i = 0 ; i < Tnm.length ; i++){
  375. if(Tnm[i] == model.getValue("/root/main/divgrupnmlist["+divR+"]/tclscd")){
  376. model.setValue("/root/init/tclsnm" + (i+1), model.getValue("/root/main/divgrupnmlist["+divR+"]/tclsnm"));
  377. }
  378. }
  379. }
  380. testcds = testcds.substr(0,testcds.length-1);
  381. //alert(testcds);
  382. model.setValue("/root/send/testcds" , testcds);
  383. if(gbn == "single"){
  384. model.makeValue("/root/send/single" , "single");
  385. }
  386. submit("TRLNP00103");
  387. if(gbn == "single"){
  388. model.removenode("/root/send/single");
  389. }
  390. var nTclsnm = chk_divgrupnmlist.label;
  391. nTclsnm = nTclsnm.setReplaceWord("▦", ", ");
  392. model.setValue("/root/init/tclsnms", "[" + nTclsnm + "]");
  393. //var divgrupnmlistlabel = chk_divgrupnmlist.label;
  394. //var divgrupnm = divgrupnmlistlabel.split("▦");
  395. //for(i = 0 ; i < divgrupnm.length ; i++){
  396. // model.setValue("/root/init/tclsnm" + (i+1), divgrupnm[i]);
  397. //}
  398. // 단항목 다항목 구분 및 간략출력 여부에 따른 레포트 로딩
  399. datagrid1.fixedcellischeck(0, 1) = false;
  400. if(gbn == "single"){
  401. if(model.getValue("/root/hidden/ref/dprint") == "1"){
  402. exeReportPreview("RPLNP00106", "XMLSTR", "", "", "true", "", "", "", "","true");
  403. //exeReportPreview("RPLNP00106", "XMLSTR", "");
  404. }
  405. else{
  406. exeReportPreview("RPLNP00108", "XMLSTR", "", "", "true", "", "", "", "","true");
  407. //exeReportPreview("RPLNP00108", "XMLSTR", "");
  408. }
  409. }else{
  410. if(model.getValue("/root/hidden/ref/dprint") == "1"){
  411. exeReportPreview("RPLNP00105", "XMLSTR", "", "", "true", "", "", "", "","true");
  412. //exeReportPreview("RPLNP00105", "XMLSTR", "");
  413. }
  414. else{
  415. exeReportPreview("RPLNP00104", "XMLSTR", "", "", "true", "", "", "", "","true");
  416. //exeReportPreview("RPLNP00104", "XMLSTR", "");
  417. }
  418. }
  419. // 다항목 레포트 제목 초기화
  420. //for(i = 0 ; i < 5 ; i++){
  421. // model.setValue("/root/init/tclsnm" + (i+1), "");
  422. //}
  423. }
  424. function fbfrslt(){
  425. var count = getNodesetCount("/root/main/divgrupnmlist");
  426. if(count > 0){
  427. var tclscdlist = model.getValue("/root/main/divgrupnmlist[1]/tclscd");
  428. for(i=2; i<= count; i++){
  429. tclscdlist = tclscdlist + "','" + model.getValue("/root/main/divgrupnmlist["+i+"]/tclscd");
  430. }
  431. tclscdlist = "'" + tclscdlist + "'";
  432. model.setValue("/root/send/data3/pid", model.getValue("/root/main/nmedworklist/write["+ datagrid1.row+"]/pid"));
  433. model.setValue("/root/send/data3/tclslist", tclscdlist);
  434. modal("SPLNR90600","","","","","/root/send/data3","/root/hidden/ref");
  435. }
  436. }
  437. function fSetListRemove(){
  438. if(datagrid1.rows < 2){
  439. return;
  440. }else{
  441. model.removenodeset("/root/main/nmedworklist/write");
  442. model.refresh();
  443. }
  444. }
  445. function fchktrueFalse(){
  446. var selectedCells = datagrid1.selectedCells;
  447. for (var i=0; i<selectedCells.length; i++){
  448. var cell = selectedCells.item(i);
  449. if (cell){
  450. var curRow = cell.row;
  451. var curCol = cell.col;
  452. if(curCol ==1){
  453. if(datagrid1.valueMatrix(curRow,curCol) == "false"){
  454. model.setValue("/root/main/nmedworklist/write["+curRow+"]/chk", "true");
  455. }else if(datagrid1.valueMatrix(curRow,curCol) == "true"){
  456. model.setValue("/root/main/nmedworklist/write["+curRow+"]/chk", "false");
  457. }else{
  458. model.setValue("/root/main/nmedworklist/write["+curRow+"]/chk", "true");
  459. }
  460. }
  461. }
  462. }
  463. }
  464. function fRequestPage(){
  465. var reqno = model.getValue("/root/main/nmedworklist/write["+datagrid1.row+"]/reqno");
  466. var pid = model.getValue("/root/main/nmedworklist/write["+datagrid1.row+"]/pid");
  467. var prcpcd = model.getValue("/root/main/nmedworklist/write["+datagrid1.row+"]/prcpcd");
  468. var spccd = model.getValue("/root/main/nmedworklist/write["+datagrid1.row+"]/spccd");
  469. model.setValue("/root/hidden/request/pid", pid);
  470. model.setValue("/root/hidden/request/reqno", reqno);
  471. model.setValue("/root/hidden/request/prcpcd", prcpcd);
  472. model.setValue("/root/hidden/request/spccd", spccd);
  473. modal("SPLRR91000" ,"","","","","/root/hidden/request", "/root/hidden/reqfrminfo");
  474. }
  475. function fViewList(){
  476. var viewgbn = model.getValue("/root/hidden/ref/viewgbn");
  477. if(viewgbn == "1"){
  478. datagrid1.colWidth(9) = 0;
  479. datagrid1.colWidth(10) = 0;
  480. }else{
  481. datagrid1.colWidth(9) = 65;
  482. datagrid1.colWidth(10) = 65;
  483. }
  484. }
  485. //환자성명 클릭시 상단정보 조회
  486. function fUpPatinfo2(){
  487. if(getPatientInfo("pid") != model.getValue("/root/main/nmedworklist/write["+ datagrid1.row +"]/pid")) {
  488. if(datagrid1.rows> 1){
  489. setParameter("errflag", "Y");
  490. setParameter("condparam", "S" + "▦" + model.getvalue("/root/main/nmedworklist/write["+ datagrid1.row +"]/prcpdd")+ "▦"
  491. + model.getvalue("/root/main/nmedworklist/write["+ datagrid1.row +"]/execprcpuniqno") + "▦"
  492. + model.getvalue("/root/main/nmedworklist/write["+ datagrid1.row +"]/instcd") );
  493. modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
  494. }
  495. var paminfo = getGlobalVariable("paminfo");
  496. if((paminfo.length < 0) || (getPatientInfo("pid") != model.getValue("/root/main/nmedworklist/write["+ datagrid1.row +"]/pid"))){ //상단정보가 없는 경우
  497. delPatientInfos(); //환자정보 전체 삭제
  498. var pid = model.getValue("/root/main/nmedworklist/write["+ datagrid1.row +"]/pid")
  499. var hngnm = model.getValue("/root/main/nmedworklist/write["+ datagrid1.row +"]/patnm");
  500. //상단에 올릴 수 있는 정보가 있으면 아래와 같이 설정해 주시면 됩니다. 없으면 안 해주셔도 되구요..
  501. setPatientInfo("pid" , pid); //등록번호
  502. setPatientInfo("pname" , pid + "|" + hngnm); //환자명
  503. }
  504. }
  505. }
  506. function fSelectTestGrup(){
  507. model.makeValue("/root/send/testgrupnm", combo1.label);
  508. submit("TRLLF90401" ,false);
  509. fSetPopUpTclscdList();
  510. }
  511. function fSetPopUpTclscdList(){
  512. var count = getNodesetCount("/root/main/testgrupdetl");
  513. if(count > 0){
  514. var sendtclsnm = model.getValue("/root/main/testgrupdetl[1]/tclsnm");
  515. var sendtclscd = model.getValue("/root/main/testgrupdetl[1]/tclscd");
  516. var sendtclscd2 = model.getValue("/root/main/testgrupdetl[1]/tclscd");
  517. // 검사그룹 상세 목록 없을때
  518. if(sendtclsnm == ""){
  519. model.setValue("/root/hidden/tclscdlist/tclscdlist", "");
  520. model.setValue("/root/hidden/tclscdlist/tclsnmlist", "");
  521. }else{ // 검사그룹 상세 목록 있을때
  522. for(i=2; i<= count; i++){
  523. sendtclsnm = sendtclsnm + ", " + model.getValue("/root/main/testgrupdetl["+i+"]/tclsnm");
  524. //sendtclscd = sendtclscd + "▦" + model.getValue("/root/main/testgrupdetl["+i+"]/tclscd");
  525. sendtclscd = sendtclscd + "','" + model.getValue("/root/main/testgrupdetl["+i+"]/tclscd");
  526. sendtclscd2 = sendtclscd2 + "▦" + model.getValue("/root/main/testgrupdetl["+i+"]/tclscd");
  527. }
  528. model.setValue("/root/hidden/ref/tclscdlist/tclsnmlist", sendtclsnm);
  529. model.setValue("/root/hidden/ref/tclscdlist/tclscdlist", "'" + sendtclscd + "'");
  530. model.setValue("/root/hidden/ref/tclscdlist/tclscdlist2", sendtclscd2);
  531. }
  532. model.refresh();
  533. }
  534. }
  535. function fSetTclscdClean(){
  536. model.setValue("/root/hidden/ref/tclscdlist/tclscdlist", "");
  537. }
  538. function feditValue(){
  539. var cRow = datagrid1.row;
  540. var WBC = datagrid1.valueMatrix(cRow, 11);
  541. var NUT = datagrid1.valueMatrix(cRow, 12);
  542. fCalWB(WBC, NUT, cRow);
  543. }
  544. function fmovesell(){
  545. var Nrow = grd_bonetrlist.row;
  546. var Mcol = grd_bonetrlist.col + 1;
  547. grd_bonetrlist.row = Nrow;
  548. grd_bonetrlist.col = Mcol;
  549. grd_bonetrlist.editCell();
  550. //model.refresh();
  551. }
  552. function fdelitem(){
  553. for (var i =1; i<=grd_bonetrlist.rows; i++){
  554. //alert("for");
  555. var chk = model.getValue("/root/main/bonetrlist["+i+"]/chk" );
  556. //alert(chk);
  557. if(model.getValue("/root/main/bonetrlist["+i+"]/chk") == "true"){
  558. grd_bonetrlist.rowStatus(i) = 4 ;
  559. }
  560. }
  561. var uibonetrlist = grd_bonetrlist.getUpdateData();
  562. model.setValue("/root/send/uibonetrlist" , uibonetrlist);
  563. model.copyNode("/root/send/bonetrlist" , "/root/main/bonetrlist");
  564. if(submit("TXLNP90802")){
  565. // 초기화
  566. fSetInit();
  567. }
  568. }
  569. ]]>
  570. </script>
  571. </xhtml:head>
  572. <xhtml:body caption="2" itemwidth="50" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  573. <group id="group1" style="left:0px; top:0px; width:1180px; height:13px; ">
  574. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">골수이식환자관리</caption>
  575. </group>
  576. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1181px; height:730px; ">
  577. <group id="group2" style="left:0px; top:0px; width:1180px; height:40px; vertical-align:top; ">
  578. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1180px; height:40px; "/>
  579. <caption id="caption3" class="search_name" style="left:930px; top:10px; width:86px; height:17px; ">등록번호 :</caption>
  580. <input id="ipt_search" ref="/root/hidden/ref/workcmd" class="input_button" inputtype="button" style="left:1030px; top:10px; width:131px; height:19px; ">
  581. <script type="javascript" ev:event="onbuttonclick">
  582. <![CDATA[
  583. if(ipt_search.currentText == ""){
  584. alert("등록번호를 입력해 주세요. ");
  585. return;
  586. fSetInit();
  587. }
  588. fGetBoneTranfList();
  589. model.setFocus("ipt_search");
  590. ]]>
  591. </script>
  592. <script type="javascript" ev:event="onkeyup">
  593. <![CDATA[
  594. if(event.keyCode == "13"){
  595. model.setValue("/root/hidden/ref/workcmd", (ipt_search.currentText).toUpperCase());
  596. if(ipt_search.currentText == ""){
  597. alert("등록번호를 입력해 주세요. ");
  598. model.setFocus("ipt_search");
  599. return;
  600. }
  601. fGetBoneTranfList();
  602. model.setFocus("ipt_search");
  603. }
  604. ]]>
  605. </script>
  606. </input>
  607. </group>
  608. <line id="line2" class="line_1" style="x1:0px; y1:63px; x2:1180px; y2:63px; "/>
  609. <button id="btn_excel" class="btn2_letter2" visibility="hidden" style="left:1028px; top:43px; width:42px; height:19px; ">
  610. <caption>엑셀</caption>
  611. <script type="javascript" ev:event="DOMActivate">
  612. <![CDATA[
  613. var fileName = window.fileDialog("save", ",", false, "장기이식관리", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  614. if (fileName != "")
  615. {
  616. grd_bonetrlist.saveExcel(fileName);
  617. }
  618. ]]>
  619. </script>
  620. </button>
  621. <datagrid id="grd_bonetrlist" nodeset="/root/main/bonetrlist" caption="^번호^차트번호^이름^보관함^공여자ID^공여자명^이식일^Informative결과^◀ 결과입력시간^Chimerism결과^◀ 결과입력시간^결과번호^결과입력시간^" colsep="^" colwidth="30, 60, 80, 70, 90, 80, 70, 100, 100, 100, 100, 100, 80, 100" dataheight="25" defaultrows="1" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:69px; width:1180px; height:655px; ">
  622. <col ref="chk" type="checkbox"/>
  623. <col ref="bmtrnsseqno" type="output" style="text-align:center; "/>
  624. <col ref="pid" type="input" style="text-align:center; "/>
  625. <col ref="patnm" type="input" style="text-align:center; "/>
  626. <col ref="keeppos" type="input" style="text-align:center; "/>
  627. <col ref="dnorpid" type="input" style="text-align:center; "/>
  628. <col ref="dnornm" type="input" style="text-align:center; "/>
  629. <col ref="trnsdt" type="inputdate"/>
  630. <col ref="prerslt" type="combo" style="text-align:left; ">
  631. <choices>
  632. <item>
  633. <label>DIS 80</label>
  634. <value>DIS 80</value>
  635. </item>
  636. <item>
  637. <label>DIS 111</label>
  638. <value>DIS 111</value>
  639. </item>
  640. <item>
  641. <label>ApoB</label>
  642. <value>ApoB</value>
  643. </item>
  644. <item>
  645. <label>Non informative</label>
  646. <value>Non informative</value>
  647. </item>
  648. </choices>
  649. </col>
  650. <col ref="prersltdt" type="inputdate"/>
  651. <col ref="postrslt" type="combo" style="text-align:left; ">
  652. <choices>
  653. <item>
  654. <label>Complete</label>
  655. <value>Complete</value>
  656. </item>
  657. <item>
  658. <label>Mixed</label>
  659. <value>Mixed</value>
  660. </item>
  661. <item>
  662. <label>Only host band</label>
  663. <value>Only host band</value>
  664. </item>
  665. <item>
  666. <label>판독불가</label>
  667. <value>판독불가</value>
  668. </item>
  669. </choices>
  670. </col>
  671. <col ref="postrsltdt" type="inputdate" style="text-align:center; "/>
  672. <col ref="rsltno" type="input"/>
  673. <col disabled="true" ref="rgstdt" type="output" format="yyyy-mm-dd"/>
  674. <script type="javascript" ev:event="onaftersort">
  675. <![CDATA[
  676. grd_bonetrlist.gridToInstance();
  677. ]]>
  678. </script>
  679. <script type="javascript" ev:event="onendedit">
  680. <![CDATA[
  681. if(event.keyCode == "13"){
  682. fmovesell();
  683. }
  684. ]]>
  685. </script>
  686. <script type="javascript" ev:event="xforms-value-changed">
  687. <![CDATA[
  688. if ( grd_bonetrlist.col == 9 ) {
  689. var tDay = getCurrentDate();
  690. if (model.getValue("/root/main/bonetrlist/prersltdt" == "")){
  691. model.setValue("/root/main/bonetrlist/prersltdt",tDay);
  692. }else{
  693. model.setValue("/root/main/bonetrlist/prersltdt", "");
  694. model.setValue("/root/main/bonetrlist/prersltdt",tDay);
  695. }
  696. }
  697. if ( grd_bonetrlist.col == 11 ) {
  698. var tDay = getCurrentDate();
  699. if (model.getValue("/root/main/bonetrlist/postrsltdt" == "")){
  700. model.setValue("/root/main/bonetrlist/postrsltdt",tDay);
  701. }else{
  702. model.setvalue("/root/main/bonetrlist/postrsltdt","");
  703. model.setValue("/root/main/bonetrlist/postrsltdt",tDay);
  704. }
  705. }
  706. model.refresh();
  707. ]]>
  708. </script>
  709. </datagrid>
  710. <button id="button1" class="btn2_letter3" style="left:1072px; top:43px; width:53px; height:19px; ">
  711. <caption>행추가</caption>
  712. <script type="javascript" ev:event="DOMActivate">
  713. <![CDATA[
  714. fSetAddRow();
  715. ]]>
  716. </script>
  717. </button>
  718. <button id="button2" class="btn2_letter3" style="left:1127px; top:43px; width:53px; height:19px; ">
  719. <caption>행삭제</caption>
  720. <script type="javascript" ev:event="DOMActivate">
  721. <![CDATA[
  722. fInsRowdel();
  723. ]]>
  724. </script>
  725. </button>
  726. </group>
  727. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1180px; height:27px; ">
  728. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1179px; y2:25px; "/>
  729. <button id="btn_save" class="btn4_letter3" style="left:974px; top:3px; width:68px; height:22px; ">
  730. <caption>저 장</caption>
  731. <script type="javascript" ev:event="onclick">
  732. <![CDATA[
  733. fsavelist();
  734. ]]>
  735. </script>
  736. </button>
  737. <button id="btn_init" class="btn4_letter3" style="left:1110px; top:3px; width:68px; height:22px; ">
  738. <caption>초기화</caption>
  739. <script type="javascript" ev:event="onclick">
  740. <![CDATA[
  741. fSetInit();
  742. ]]>
  743. </script>
  744. </button>
  745. <button id="button3" class="btn4_letter3" style="left:1042px; top:3px; width:68px; height:22px; ">
  746. <caption>삭 제</caption>
  747. <script type="javascript" ev:event="onclick">
  748. <![CDATA[
  749. fdelitem();
  750. ]]>
  751. </script>
  752. </button>
  753. </group>
  754. </xhtml:body>
  755. </xhtml:html>