SMMNP04000.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. /* ---------------------------------------------------------------------
  2. 수술마취 처방집계(SMMNP03400.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. : Create By 김진명
  6. : 2007.10.08
  7. 2) : Ver.1.01.01
  8. : Modify By HR Choi
  9. : 2007.10.08
  10. ---------------------------------------------------------------------- */
  11. /* --------------------------------------------------*/
  12. /* type : function */
  13. /* access : public */
  14. /* desc : 수술마취 처방집계 초기화 */
  15. /* param : */
  16. /* return : */
  17. /* --------------------------------------------------*/
  18. var FirstCheck = "N";
  19. function fInit() {
  20. FirstCheck = "Y";
  21. var instcd = getUserInfo("dutplceinstcd");
  22. if( instcd == "014" ) {
  23. radio7.visible = true;
  24. radio2.visible = false;
  25. }else {
  26. radio7.visible = false;
  27. radio2.visible = true;
  28. }
  29. submit("TRMNP04004"); // 수술방가져오기
  30. //removeComboItem("cmb_oproomlist");
  31. addComboItem("cmb_oproomlist", "전 체", "", "above" );
  32. removeComboItem("cmb_orddept" );
  33. model.removenode("/root/send" );
  34. model.makeValue("/root/send/flag" , "X" );
  35. model.makeValue("/root/send/searchitem", "XX" );
  36. model.makeValue("/root/send/deptflag" , "011" );
  37. submit("TRMNP00102");
  38. addComboItem("cmb_orddept", "전 체", "", "above" );
  39. model.MakeNode("/root/send/reqdata");
  40. model.setValue("/root/main/cond/orddept", ""); //마취과 하드코등 수정 쿼리에서 과 코드 조회로 수정 2009.04.16
  41. model.copyNode("/root/send/reqdata", "/root/main/cond");
  42. submit("TRMNP00104");//마취의 조회
  43. addComboItem("cmb_anstdrlist", "전 체", "", "above" );
  44. //2009-06-22 K.J.M 병원별 Display 여부
  45. model.removenode("/root/send");
  46. model.makeValue("/root/send/reqdata/cdgrupid", "106");//병원별 Display 여부
  47. model.makeValue("/root/send/reqdata/supcdid", "");//서브구분
  48. model.makeValue("/root/send/reqdata/cdid", "");//서브구분
  49. submit("TRMNP04903", false);
  50. if( model.getValue("/root/init/hardcodeinfo/cdid").substr(3, 1) == "Y" ) {//과별엑셀저장 display 여부
  51. btn_deptexcel.visible = "true";
  52. }else {
  53. btn_deptexcel.visible = "false";
  54. }
  55. if( model.getValue("/root/init/hardcodeinfo/cdid").substr(8, 1) == "Y" ) {//수술관리 display여부 2010.02.03 K.J.M
  56. cap_opmn.visible = "true";
  57. chk_opmn.visible = "true";
  58. }else {
  59. cap_opmn.visible = "false";
  60. chk_opmn.visible = "false";
  61. }
  62. var curtDate = getCurrentDate();
  63. curtDate = curtDate.substr(0, 8);
  64. model.setValue("/root/main/cond/refopfromdd", curtDate);
  65. model.setValue("/root/main/cond/refoptodd" , curtDate);
  66. grd_sumgoodlist.explorerbar = "sort";
  67. grd_prcpdetllist.explorerbar = "sort";
  68. model.refresh();
  69. model.removenode("/root/send");
  70. model.MakeNode("/root/send/reqdata");
  71. //fSearch();
  72. }
  73. /* --------------------------------------------------*/
  74. /* type : function */
  75. /* access : public */
  76. /* desc : 콤보아이템 제거 */
  77. /* param : */
  78. /* return : */
  79. /* --------------------------------------------------*/
  80. function removeComboItem( comboID ) {
  81. var comboObj = document.all.item(comboID);
  82. var comboItemNodeSet = comboObj.choices.itemset.attribute("nodeset");
  83. model.removenode(comboItemNodeSet + "[1]");//CCR
  84. model.removenode(comboItemNodeSet + "[1]");//Clean-Zone
  85. model.removenode(comboItemNodeSet + "[1]");//OR(창고)
  86. model.refresh();
  87. }
  88. /* --------------------------------------------------*/
  89. /* type : function */
  90. /* access : public */
  91. /* desc : 수술마취 처방집계 조회 */
  92. /* param : */
  93. /* return : */
  94. /* --------------------------------------------------*/
  95. var sColWith1 = "68*32*65*181*70*70*70*40*37*32";
  96. var sTxtAlign1 = "center;*center;*center;*left;*left;*left;*left;*center;*right;*right;";
  97. var sWith1 = sColWith1.split("*");
  98. var sAlign1 = sTxtAlign1.split("*");
  99. //var sColWith2 = "80*330*60*40";
  100. //var sTxtAlign2 = "left;*left;*right;*right;";
  101. //
  102. //var sWith2 = sColWith2.split("*");
  103. //var sAlign2 = sTxtAlign2.split("*");
  104. function fSearch() {
  105. model.removeNodeset("/root/main/sumgoodlist");
  106. model.removeNodeset("/root/main/prcpinfo/prcpdetlinfo");
  107. model.removeNodeset("/root/main/prcpinfo/prcpdetllist");
  108. model.makeNode("/root/main/sumgoodlist/row");
  109. //model.removeNodeset("/root/main/sumdrugcurelist");
  110. //model.makeNode("/root/main/sumdrugcurelist/row");
  111. model.refresh();
  112. if (FirstCheck == "Y") {
  113. // 그리드 초기화
  114. var cols = grd_sumgoodlist.cols-grd_sumgoodlist.fixedCols;
  115. for(var i = 0; i < cols; i++ ) {
  116. grd_sumgoodlist.removeColumn(false);
  117. }
  118. //var cols2 = grd_sumdrugcurelist.cols-grd_sumdrugcurelist.fixedCols;
  119. //for(var j = 0; j < cols2; j++ ) {
  120. // grd_sumdrugcurelist.removeColumn(false);
  121. //}
  122. }
  123. var prcpflag = model.getValue("/root/main/cond/prcpflag");
  124. var deptflag = model.getValue("/root/main/cond/deptflag");
  125. var tmpflag = "", cureflag = "", chkcureflag = 0;
  126. if( prcpflag != "" ) {
  127. tmpflag = prcpflag.split(" ");
  128. for(var i = 0; i < tmpflag.length; i++ ){
  129. if( cureflag == "" ) {
  130. cureflag = "'" + tmpflag[i] + "'";
  131. }else {
  132. cureflag = cureflag + ", '" + tmpflag[i] + "'";
  133. }
  134. if( tmpflag[i] == "3" ) {
  135. if( (deptflag == ""||deptflag == "A"||deptflag == "R") ) {//부서구분이 전체, 마취
  136. chkcureflag = 3;//약 포함하는 집계
  137. }else {
  138. chkcureflag = 4;//약 포함하는 집계
  139. }
  140. }
  141. }
  142. if( parseInt(tmpflag.length) == 11 ) {
  143. if( (deptflag == ""||deptflag == "A"||deptflag == "R") ) {//부서구분이 전체, 마취
  144. chkcureflag = 1;
  145. }else {
  146. chkcureflag = 2;
  147. }
  148. }
  149. }
  150. var fromdd = model.getValue("/root/main/cond/refopfromdd");
  151. model.copyNode("/root/send/reqdata", "/root/main/cond");
  152. model.setValue("/root/send/reqdata/cureflag", cureflag);
  153. model.setValue("/root/send/reqdata/prcpflag", chkcureflag);
  154. model.setValue("/root/send/reqdata/bffromdd", getDateAddc(fromdd, -14));
  155. submit("TRMNP04001", false);
  156. //submit("TRMNP04002", false);
  157. var gridCaption = model.getValue("/root/temp/sumgoodlist/header/caption"); // caption
  158. var gridColRef = model.getValue("/root/temp/sumgoodlist/header/colref" ); // ref 정보
  159. var gridColType = model.getValue("/root/temp/sumgoodlist/header/type" ); // col type
  160. var gridColRefArray = gridColRef.split("^");
  161. var gridColTypeArray = gridColType.split("^");
  162. if (FirstCheck == "Y") {
  163. FirstCheck = "N";
  164. var j = 0;
  165. for(var i = 0; i < gridColRefArray.length; i++ ) {
  166. j = i;
  167. if (i > 8 ) {
  168. j = 8;
  169. }
  170. //
  171. grd_sumgoodlist.addColumn("ref:" + gridColRefArray[i] + "; type:"+gridColTypeArray[i]+"; text-align:"+sAlign1[j], false);
  172. if( i == (gridColRefArray.length - 1) ) {//마지막 컬럼
  173. grd_sumgoodlist.colWidth(i+1) = "34";
  174. }else {
  175. grd_sumgoodlist.colWidth(i+1) = sWith1[j];
  176. }
  177. }
  178. grd_sumgoodlist.caption = gridCaption;
  179. // var gridCaption2 = model.getValue("/root/temp/sumdrugcurelist/header/caption"); // caption
  180. // var gridColRef2 = model.getValue("/root/temp/sumdrugcurelist/header/colref" ); // ref 정보
  181. // var gridColType2 = model.getValue("/root/temp/sumdrugcurelist/header/type" ); // col type
  182. //
  183. // var gridColRefArray2 = gridColRef2.split("^");
  184. // var gridColTypeArray2 = gridColType2.split("^");
  185. //
  186. //
  187. // j = 0;
  188. // for(var i = 0; i < gridColRefArray2.length; i++ ) {
  189. // j = i;
  190. // if (i > 3 ) {
  191. // j = 3;
  192. // }
  193. //
  194. // grd_sumdrugcurelist.addColumn("ref:" + gridColRefArray2[i] + "; type:"+gridColTypeArray2[i]+"; text-align:"+sAlign2[j], false);
  195. // grd_sumdrugcurelist.colWidth(i+1) = sWith2[j];
  196. // }
  197. //
  198. // grd_sumdrugcurelist.caption = gridCaption2;
  199. //
  200. grd_sumgoodlist.refresh();
  201. //grd_sumdrugcurelist.refresh();
  202. }
  203. var node = instance1.selectSingleNode("/root/main");
  204. if( FirstCheck != "Y" ) {
  205. node.replaceChild(instance1.root.temp.sumgoodlist, instance1.root.main.sumgoodlist );
  206. FirstCheck = "Y";
  207. }
  208. // if ( model.getValue("/root/main/cond/prcpflag") == "" ) { //전체
  209. // node.replaceChild(instance1.root.temp.sumgoodlist , instance1.root.main.sumgoodlist );
  210. // node.replaceChild(instance1.root.temp.sumdrugcurelist, instance1.root.main.sumdrugcurelist);
  211. //
  212. // } else if(model.getValue("/root/main/cond/prcpflag") == "G" ) { //물품
  213. // node.replaceChild(instance1.root.temp.sumgoodlist , instance1.root.main.sumgoodlist );
  214. // }else {
  215. // node.replaceChild(instance1.root.temp.sumdrugcurelist, instance1.root.main.sumdrugcurelist);
  216. // }
  217. //var sumqty = "", tmpqty = "", cnt = "";
  218. //var nodeCnt = parseInt(getNodesetCount("/root/main/sumgoodlist/row"))+1;
  219. //var roomcnt = getNodesetCount("/root/init/oproomlist");
  220. //for( var k = 0; k < nodeCnt; k++ ) {
  221. // for( var s = 0; s < roomcnt; s++ ) {
  222. // cnt = s + "";
  223. // tmpqty = model.getValue("/root/main/sumgoodlist/row[" + k + "]/op" + cnt.getLeftPad(4, '0'));
  224. // if( tmpqty == "0" || tmpqty == "0.0" ) {
  225. // model.setValue("/root/main/sumgoodlist/row[" + k + "]/op" + cnt.getLeftPad(4, '0'), "");
  226. // }
  227. // // alert(s.getLeftPad(4, '0'));
  228. // }
  229. //}
  230. model.refresh();
  231. //var nodeLen = instance1.selectSingleNode("/root/main/sumgoodlist/row").length;
  232. /* if( nodeLen > 0 ) {
  233. //grd_sumgoodlist.rows
  234. for(var k = 0; k < 2; k++) {
  235. var total = model.getValue("/root/main/sumgoodlist/row[" + k + "]/total");
  236. alert(total);
  237. // model.setValue("/root/main/sumgoodlist/row[" + k + "]/total", (Math.round(total*1000) / 1000) );
  238. }
  239. model.refresh();*/
  240. // alert(model.getValue("/root/main/sumgoodlist/row[1]/total"));
  241. }
  242. /* --------------------------------------------------*/
  243. /* type : function */
  244. /* access : public */
  245. /* desc : 수술마취 처방집계 그리도 넓이 조절 */
  246. /* param : btnFlag(true:펼치기, false:닫기) */
  247. /* return : */
  248. /* --------------------------------------------------*/
  249. function fGridSetWidth(btnFlag) {
  250. if ( btnFlag == "true" ) {
  251. grd_sumgoodlist.attribute("width") = "1194";
  252. // grd_sumdrugcurelist.attribute("width") = "1194";
  253. // grd_sumdrugcurelist.attribute("visibility") = "visible";
  254. grb_gooddetlinfo.attribute("visibility") = "visible";
  255. grb_gooddetlinfo.attribute("visibility") = "hidden";
  256. grd_prcpdetllist.attribute("visibility") = "hidden";
  257. btn_open.visible = "false";
  258. btn_close.visible = "true";
  259. }else {
  260. grd_sumgoodlist.attribute("width") = "393";
  261. // grd_sumdrugcurelist.attribute("width") = "645";
  262. grb_gooddetlinfo.attribute("visibility") = "visible";
  263. grd_prcpdetllist.attribute("visibility") = "visible";
  264. btn_open.visible = "true";
  265. btn_close.visible = "false";
  266. }
  267. model.refresh();
  268. }
  269. /* --------------------------------------------------*/
  270. /* type : function */
  271. /* access : public */
  272. /* desc : 수술마취 처방집계 처방 상세내역 */
  273. /* param : pFlag : S:싱글, M:멀티 */
  274. /* return : */
  275. /* --------------------------------------------------*/
  276. function fDblClick(pFlag) {
  277. var iRow = -1;
  278. iRow = grd_sumgoodlist.row;
  279. if(iRow < 1) {
  280. return;
  281. }else {
  282. fGridSetWidth("false");
  283. model.setValue("/root/main/cond/goodcd" , model.getValue("/root/main/sumgoodlist/row" + "[" + iRow + "]/goodcd" ));
  284. model.setValue("/root/main/cond/allsizespecid", model.getValue("/root/main/sumgoodlist/row" + "[" +iRow + "]/allsizespecid"));
  285. var prcpflag = model.getValue("/root/main/cond/prcpflag");
  286. var tmpflag = "", cureflag = "", chkcureflag = 0;
  287. if( prcpflag != "" ) {
  288. tmpflag = prcpflag.split(" ");
  289. for(var i = 0; i < tmpflag.length; i++ ){
  290. if( cureflag == "" ) {
  291. cureflag = "'" + tmpflag[i] + "'";
  292. }else {
  293. cureflag = cureflag + ", '" + tmpflag[i] + "'";
  294. }
  295. if( tmpflag[i] == "3" ) {
  296. chkcureflag = 1;//약 포함하는 집계
  297. }
  298. }
  299. if( parseInt(tmpflag.length) == 11 ) {
  300. chkcureflag = 1;
  301. }
  302. }
  303. var fromdd = model.getValue("/root/main/cond/refopfromdd");
  304. model.copyNode("/root/send/reqdata", "/root/main/cond");
  305. model.setValue("/root/send/reqdata/cureflag", cureflag);
  306. model.setValue("/root/send/reqdata/prcpflag", chkcureflag);
  307. model.setValue("/root/send/reqdata/selflag", pFlag);
  308. model.setValue("/root/send/reqdata/bffromdd", getDateAddc(fromdd, -14));
  309. submit("TRMNP04003", false);
  310. var nodeCnt = getNodesetCount("/root/main/prcpinfo/prcpdetllist");//처방상세내역 갯수
  311. var goodqty = 0, total = 0, alltotal = 0;
  312. var deptnm = "", olddeptnm = "";
  313. for( var i = 1; i <= nodeCnt; i++ ) {
  314. deptnm = model.getValue("/root/main/prcpinfo/prcpdetllist["+i+"]/deptnm");
  315. goodqty = model.getValue("/root/main/prcpinfo/prcpdetllist["+i+"]/goodqty");
  316. if( i == 1 ) {
  317. olddeptnm = deptnm;
  318. }
  319. if( deptnm == olddeptnm ) {//같은과이면 합산
  320. total = total + parseFloat(goodqty);
  321. alltotal = alltotal + parseFloat(goodqty);
  322. if( i == nodeCnt ) {//마직막 행이면 합산 표시
  323. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/subtot", total);
  324. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/total", alltotal);
  325. }
  326. }else {//다르면 합계에 표시
  327. model.setValue("/root/main/prcpinfo/prcpdetllist["+(i-1)+"]/subtot", total);
  328. total = 0;//초기화
  329. total = total + parseFloat(goodqty); //현재 과별 합산
  330. alltotal = alltotal + parseFloat(goodqty);
  331. if( i == nodeCnt ) {//마직막 행이면 합산 표시
  332. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/subtot", total);
  333. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/total", alltotal);
  334. }
  335. }
  336. olddeptnm = deptnm;
  337. }
  338. model.setValue("/root/main/cond/goodcd", "");
  339. model.setValue("/root/main/cond/allsizespecid", "");
  340. model.refresh();
  341. }
  342. }
  343. /* --------------------------------------------------*/
  344. /* type : function */
  345. /* access : public */
  346. /* desc : 수술마취 처방집계 처방 상세내역 */
  347. /* param : pFlag : S:싱글, M:멀티 */
  348. /* return : */
  349. /* --------------------------------------------------*/
  350. function fMultiDetlInfo(pFlag) {
  351. var goodcd="", allsizespecid="", tmpgoodcd="", tmpallsizespecid="", selIndex, cnt = 0;
  352. fGridSetWidth("false");//그리드 줄이기(처방물품 집계내역)
  353. for( var k = 0; k <= grd_sumgoodlist.rows; k++ ) {
  354. selIndex = grd_sumgoodlist.selectedRow(k);
  355. if( selIndex > 0 ) {
  356. tmpgoodcd = model.getValue("/root/main/sumgoodlist/row" + "[" + selIndex + "]/goodcd");
  357. tmpallsizespecid = model.getValue("/root/main/sumgoodlist/row" + "[" + selIndex + "]/allsizespecid");
  358. if( goodcd == "" ) {
  359. goodcd = "'" + tmpgoodcd + tmpallsizespecid + "'";
  360. }else {
  361. goodcd = goodcd + ", '" + tmpgoodcd + tmpallsizespecid + "'";
  362. }
  363. cnt++;
  364. }
  365. }
  366. if( cnt < 1 ) {
  367. messageBox("선택한 물품이 없습니다.!", "E000");
  368. return;
  369. }
  370. var prcpflag = model.getValue("/root/main/cond/prcpflag");
  371. var tmpflag = "", cureflag = "", chkcureflag = 0;
  372. if( prcpflag != "" ) {
  373. tmpflag = prcpflag.split(" ");
  374. for(var i = 0; i < tmpflag.length; i++ ){
  375. if( cureflag == "" ) {
  376. cureflag = "'" + tmpflag[i] + "'";
  377. }else {
  378. cureflag = cureflag + ", '" + tmpflag[i] + "'";
  379. }
  380. if( tmpflag[i] == "3" ) {
  381. chkcureflag = 3;//약 포함하는 집계
  382. }
  383. }
  384. if( parseInt(tmpflag.length) == 11 ) {
  385. chkcureflag = 1;
  386. }
  387. }
  388. var fromdd = model.getValue("/root/main/cond/refopfromdd");
  389. model.copyNode("/root/send/reqdata", "/root/main/cond");
  390. model.setValue("/root/send/reqdata/goodcd", goodcd);
  391. model.setValue("/root/send/reqdata/cureflag", cureflag);
  392. model.setValue("/root/send/reqdata/prcpflag", chkcureflag);
  393. model.setValue("/root/send/reqdata/selflag", pFlag);
  394. model.setValue("/root/send/reqdata/bffromdd", getDateAddc(fromdd, -7));
  395. submit("TRMNP04003", false);
  396. var nodeCnt = getNodesetCount("/root/main/prcpinfo/prcpdetllist");//처방상세내역 갯수
  397. var goodqty = 0, total = 0, alltotal = 0;
  398. var deptnm = "", olddeptnm = "", goodcd = "", oldgoodcd = "";
  399. for( var i = 1; i <= nodeCnt; i++ ) {
  400. deptnm = model.getValue("/root/main/prcpinfo/prcpdetllist["+i+"]/deptnm");
  401. goodqty = model.getValue("/root/main/prcpinfo/prcpdetllist["+i+"]/goodqty");
  402. goodcd = model.getValue("/root/main/prcpinfo/prcpdetllist["+i+"]/goodcd") + model.getValue("/root/main/prcpinfo/prcpdetllist["+i+"]/allsizespecid");
  403. if( i == 1 ) {
  404. olddeptnm = deptnm;
  405. oldgoodcd = goodcd;
  406. }
  407. if( oldgoodcd == goodcd ) {//같은 물품이면
  408. if( deptnm == olddeptnm ) {//같은과이면 합산
  409. total = total + parseFloat(goodqty);
  410. alltotal = alltotal + parseFloat(goodqty);
  411. if( i == nodeCnt ) {//마직막 행이면 합산 표시
  412. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/subtot", total);
  413. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/total", alltotal);
  414. }
  415. }else {//다르면 합계에 표시
  416. model.setValue("/root/main/prcpinfo/prcpdetllist["+(i-1)+"]/subtot", total);
  417. total = 0;//초기화
  418. total = total + parseFloat(goodqty); //현재 과별 합산
  419. alltotal = alltotal + parseFloat(goodqty);
  420. if( i == nodeCnt ) {//마직막 행이면 합산 표시
  421. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/subtot", total);
  422. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/total", alltotal);
  423. }
  424. }
  425. olddeptnm = deptnm;
  426. }else {//다른 물품이면
  427. model.setValue("/root/main/prcpinfo/prcpdetllist["+(i-1)+"]/subtot", total);
  428. model.setValue("/root/main/prcpinfo/prcpdetllist["+(i-1)+"]/total", alltotal);
  429. total = 0;
  430. alltotal = 0;
  431. olddeptnm = deptnm;
  432. if( deptnm == olddeptnm ) {//같은과이면 합산
  433. total = total + parseFloat(goodqty);
  434. alltotal = alltotal + parseFloat(goodqty);
  435. if( i == nodeCnt ) {//마직막 행이면 합산 표시
  436. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/subtot", total);
  437. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/total", alltotal);
  438. }
  439. }else {//다르면 합계에 표시
  440. model.setValue("/root/main/prcpinfo/prcpdetllist["+(i-1)+"]/subtot", total);
  441. total = 0;//초기화
  442. total = total + parseFloat(goodqty); //현재 과별 합산
  443. alltotal = alltotal + parseFloat(goodqty);
  444. if( i == nodeCnt ) {//마직막 행이면 합산 표시
  445. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/subtot", total);
  446. model.setValue("/root/main/prcpinfo/prcpdetllist["+i+"]/total", alltotal);
  447. }
  448. }
  449. olddeptnm = deptnm;
  450. }
  451. oldgoodcd = goodcd;
  452. }
  453. model.setValue("/root/main/cond/goodcd", "");
  454. model.setValue("/root/main/cond/allsizespecid", "");
  455. model.refresh();
  456. }
  457. /* --------------------------------------------------*/
  458. /* type : function */
  459. /* access : public */
  460. /* desc : 수술마취 처방집계 출력 */
  461. /* param : */
  462. /* return : */
  463. /* --------------------------------------------------*/
  464. function fSumListPrnt() {
  465. var node = instance1.selectSingleNode("/root/init/sumgoodlist");
  466. if( !node ) {
  467. model.makeNode("/root/init/sumgoodlist");
  468. model.makeNode("/root/init/cond/instcd");
  469. }
  470. model.copyNode("/root/init/sumgoodlist", "/root/main/sumgoodlist");
  471. model.setValue("/root/init/cond/instcd", getUserInfo("dutplceinstcd"));
  472. //exeReportPreview("RPMNP03000", "XMLSTR", "", "", "true", "", "", "", "", "true");
  473. exeReportPreview("RPMNP04001", "XMLSTR", "", "", "", "", "", "", "", "true");
  474. }
  475. /* --------------------------------------------------*/
  476. /* type : function */
  477. /* access : public */
  478. /* desc : 수술마취 처방집계 상세내역 출력 */
  479. /* param : */
  480. /* return : */
  481. /* --------------------------------------------------*/
  482. function fSumDetlListPrnt() {
  483. var node = instance1.selectSingleNode("/root/init/prcpinfo/prcpdetllist");
  484. if( !node ) {
  485. model.makeNode("/root/init/prcpinfo/prcpdetllist");
  486. }
  487. model.copyNode("/root/init/prcpinfo", "/root/main/prcpinfo");
  488. //exeReportPreview("RPMNP03000", "XMLSTR", "", "", "true", "", "", "", "", "true");
  489. exeReportPreview("RPMNP04002", "XMLSTR", "", "", "true", "", "", "", "", "true");
  490. }