SMPMO01500_전화예약통계.xrw 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  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. <reservationstatistic>
  11. <reservationstatisticlist/>
  12. </reservationstatistic>
  13. <changestatistic>
  14. <changestatisticlist/>
  15. </changestatistic>
  16. <cancelstatistic>
  17. <cancelstatisticlist/>
  18. </cancelstatistic>
  19. <telstatisticnum>
  20. <telstatisticnumlist/>
  21. </telstatisticnum>
  22. <breakstatistic>
  23. <breakstatisticlist/>
  24. </breakstatistic>
  25. <result/>
  26. <popupendflag/>
  27. <patinfo>
  28. <patinfolist/>
  29. </patinfo>
  30. </main>
  31. <send>
  32. <fromdd/>
  33. <todd/>
  34. <orddept/>
  35. <orddr/>
  36. <statisticgooboon/>
  37. <department/>
  38. <teldept/>
  39. <coopdept/>
  40. </send>
  41. <init>
  42. <comncdlist>
  43. <P0008list>
  44. <P0008>
  45. <cdnm/>
  46. <cdid/>
  47. </P0008>
  48. </P0008list>
  49. <P0021list>
  50. <P0021>
  51. <cdnm/>
  52. <cdid/>
  53. </P0021>
  54. </P0021list>
  55. <P0341list>
  56. <P0341>
  57. <cdnm/>
  58. <cdid/>
  59. </P0341>
  60. </P0341list>
  61. <P0022list>
  62. <P0022>
  63. <cdnm/>
  64. <cdid/>
  65. </P0022>
  66. </P0022list>
  67. <P0020list>
  68. <P0020>
  69. <cdnm/>
  70. <cdid/>
  71. </P0020>
  72. </P0020list>
  73. <P0029list>
  74. <P0029>
  75. <cdnm/>
  76. <cdid/>
  77. </P0029>
  78. </P0029list>
  79. <P0344list>
  80. <P0344>
  81. <cdnm/>
  82. <cdid/>
  83. </P0344>
  84. </P0344list>
  85. <P0008list>
  86. <P0008>
  87. <cdnm/>
  88. <cdid/>
  89. </P0008>
  90. </P0008list>
  91. <P0010list>
  92. <P0010>
  93. <cdnm/>
  94. <cdid/>
  95. </P0010>
  96. </P0010list>
  97. </comncdlist>
  98. <orddeptcd>
  99. <orddeptcdlist>
  100. <nm/>
  101. <cd/>
  102. </orddeptcdlist>
  103. </orddeptcd>
  104. <orddrid>
  105. <orddridlist>
  106. <cd/>
  107. <nm/>
  108. <dp/>
  109. <sp/>
  110. </orddridlist>
  111. </orddrid>
  112. <rsrvdeptcd>
  113. <rsrvdeptcdlist>
  114. <cdid/>
  115. <cdnm/>
  116. </rsrvdeptcdlist>
  117. </rsrvdeptcd>
  118. </init>
  119. <hidden>
  120. </hidden>
  121. <source>
  122. <srchcond/>
  123. <pid/>
  124. <hngnm/>
  125. <rrgstno1/>
  126. <rrgstno2/>
  127. <acptdd/>
  128. </source>
  129. </root>
  130. </instance>
  131. <script type="javascript" ev:event="xforms-ready">
  132. <![CDATA[
  133. zbcfGetCodeList(new Array("P0008","P0021","P0341","P0022","P0020","P0029","P0344", "P0010"),
  134. new Array("/root/init/comncdlist/P0008list","/root/init/comncdlist/P0021list","/root/init/comncdlist/P0341list","/root/init/comncdlist/P0022list","/root/init/comncdlist/P0020list"
  135. ,"/root/init/comncdlist/P0029list","/root/init/comncdlist/P0344list", "/root/init/comncdlist/P0010list"));
  136. //진료과코드 진료의사ID 조회
  137. pamGetDeptCDDrIDList();
  138. //초기화 및 날자 입력 항목에 오늘 날자 세팅
  139. fInitialize();
  140. model.makeNode("/root/init/temp/orddeptcd/orddeptcdlist/cd");
  141. model.makeNode("/root/init/temp/orddeptcd/orddeptcdlist/nm");
  142. copyNodesetType("/root/init/orddeptcd/orddeptcdlist", "/root/init/temp/orddeptcd/orddeptcdlist", "before");
  143. model.makeNode("/root/init/temp/orddrid/orddridlist/cd");
  144. model.makeNode("/root/init/temp/orddrid/orddridlist/nm");
  145. copyNodesetType("/root/init/orddrid/orddridlist", "/root/init/temp/orddrid/orddridlist", "before");
  146. model.refresh();
  147. if (checkOpener()){ //팝업화면으로 사용될 때
  148. model.setValue("/root/send/pid", opener.javascript.getParameter("pid"));
  149. model.setValue("/root/send/hngnm", opener.javascript.getParameter("hngnm"));
  150. model.setValue("/root/send/rrgstno1", opener.javascript.getParameter("rrgstno1"));
  151. model.setValue("/root/send/rrgstno2", opener.javascript.getParameter("rrgstno2"));
  152. model.setValue("/root/send/fromdd", opener.javascript.getParameter("orddd"));
  153. model.setValue("/root/send/todd", opener.javascript.getParameter("orddd"));
  154. model.setValue("/root/send/orddept", opener.javascript.getParameter("orddeptcd"));
  155. model.setValue("/root/send/orddr", opener.javascript.getParameter("orddrid"));
  156. model.setValue("/root/send/specordyn", opener.javascript.getParameter("specordyn"));
  157. model.setValue("/root/send/rsrvflag", opener.javascript.getParameter("rsrvflag"));
  158. model.setValue("/root/send/insukind", opener.javascript.getParameter("insukind"));
  159. model.setValue("/root/send/acptdd", opener.javascript.getParameter("acptdd"));
  160. model.setValue("/root/send/acptno", opener.javascript.getParameter("acptno"));
  161. model.setValue("/root/send/tablename", opener.javascript.getParameter("tablename"));
  162. //var array_parm = SMPMO00200_PARM.split("▦");
  163. swt_outpatient.selectedIndex = 2;
  164. button1.dispatch("DOMActivate");
  165. }
  166. //예약 통계 관련 부서코드 조회
  167. GetGetRsrvDeptCD();
  168. ]]>
  169. </script>
  170. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  171. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  172. <submission id="TRPMO01500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/reservationstatistic"/>
  173. <submission id="TRPMO01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/telstatisticnum"/>
  174. <submission id="TRPMO01503" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/breakstatistic"/>
  175. <submission id="TRPMO01504" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/rsrvdeptcd"/>
  176. </model>
  177. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  178. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  179. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  180. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  181. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  182. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  183. <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
  184. <script type="javascript">
  185. <![CDATA[
  186. function fCheckSearchValues(){
  187. if( model.getValue("/root/send/pid") != '' || model.getValue("/root/send/hngnm") != '' || model.getValue("/root/send/rrgstno1") != '' ||
  188. model.getValue("/root/send/rrgstno2") != '' || model.getValue("/root/send/fromdd") != '' || model.getValue("/root/send/todd") != '' ||
  189. model.getValue("/root/send/orddept") != '' || model.getValue("/root/send/orddr") != '' || model.getValue("/root/send/statisticgooboon") != '' ||
  190. model.getValue("/root/send/department") != '' ){
  191. return true;
  192. }else{
  193. return false;
  194. }
  195. }
  196. function fInitialize() {
  197. model.resetInstanceNode("/root/send");
  198. //날자 입력 항목에 오늘 날자 세팅
  199. var curDate = getCurrentDate();
  200. curDate = curDate.toDate().getAddDate(-1,"D");
  201. var nextDate = curDate.getFullYear();
  202. nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  203. nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
  204. model.setValue("/root/send/fromdd", nextDate);
  205. model.setValue("/root/send/todd", nextDate);
  206. cmb_department.select(0);
  207. //statistic_gooboon.select(0);
  208. model.setValue("/root/send/statisticgooboon", '1');
  209. cmb_department.disabled = false;
  210. model.refresh();
  211. }
  212. function fSearch(){
  213. if( model.getValue("/root/main/popupendflag") == "ok" ){
  214. //인적사항에 변경이 있는지를 비교하기 위해서 tmp에 인적사항을 미리 저장해 놓는다.
  215. model.makeNode("/root/hidden/tmpnode");
  216. model.copyNode("/root/hidden/tmpnode", "/root/main/patinfo");
  217. //보험/감면/진료기록/신생하*산모내역 조회
  218. model.setValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  219. submit("TRPMC01401");
  220. //model.makeNode("/root/main/popupendflag");
  221. }
  222. }
  223. function searchdepart(){
  224. for(var i=1; i<grd_reservationstatistic.rows ; i++){
  225. var tmpdepart = grd_reservationstatistic.valueMatrix(i , 1) ;
  226. var index =0;
  227. while(tmpdepart != (model.getValue("/root/init/orddeptcd/orddeptcdlist[" +index+ "]/cd") ) ){
  228. index++;
  229. if(index > 300) break;
  230. }
  231. if(model.getValue("/root/init/orddeptcd/orddeptcdlist[" +index+ "]/nm") ==""){
  232. messageBox("부서명과 " +model.getValue("/root/main/reservationstatistic/reservationstatisticlist["+i+"]/orddeptcd") +"이", "E004")
  233. }else if(model.getValue("/root/init/orddeptcd/orddeptcdlist[" +index+ "]/nm") !="") {
  234. model.setValue("/root/main/reservationstatistic/reservationstatisticlist[" +i+"]/orddeptcd",
  235. model.getValue("/root/init/orddeptcd/orddeptcdlist[" +index+ "]/nm") );
  236. }
  237. }
  238. }
  239. function GetGetRsrvDeptCD(){
  240. submit("TRPMO01504");
  241. }
  242. ]]>
  243. </script>
  244. </xhtml:head>
  245. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  246. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  247. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">전화예약통계</caption>
  248. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  249. </group>
  250. <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  251. <line id="line88" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  252. <button id="btn_clear" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  253. <caption>초기화</caption>
  254. <script type="javascript" ev:event="DOMActivate">
  255. <![CDATA[
  256. // model.resetInstanceNode("/root/send");
  257. // model.resetInstanceNode("/root/main/patinforgst/patinforgstlist");
  258. //
  259. // var curDate = getCurrentDate();
  260. // model.setValue("/root/send/fromdd", curDate);
  261. // model.setValue("/root/send/todd", curDate);
  262. //
  263. // model.refresh();
  264. fInitialize();
  265. ]]>
  266. </script>
  267. </button>
  268. </group>
  269. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  270. <group id="group6" style="left:0px; top:85px; width:1195px; height:655px; ">
  271. <switch id="swt_outpatient" style="left:0px; top:25px; width:1194px; height:625px; border-color:#c7a3cf; border-style:solid; ">
  272. <case id="case2"/>
  273. <case id="case_reservation">
  274. <line id="line1" class="line_1" style="x1:5px; y1:25px; x2:1187px; y2:25px; "/>
  275. <button id="btn_updtexcel" class="btn2_letter4" style="left:1123px; top:3px; width:64px; height:19px; ">
  276. <caption>엑셀저장</caption>
  277. <script type="javascript" ev:event="DOMActivate">
  278. <![CDATA[
  279. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  280. if (fileName != "")
  281. {
  282. grd_reservationstatistic.saveExcel(fileName, "SheetName", true, true, "", "");
  283. }
  284. window.exec(fileName);
  285. ]]>
  286. </script>
  287. </button>
  288. <datagrid id="grd_reservationstatistic" nodeset="/root/main/reservationstatistic/reservationstatisticlist" class="datagrid1" caption="진료과^초진^재진^합계^caption1^최종수정일시" colsep="^" colwidth="260, 300, 300, 300, 100" dataheight="23" defaultrows="2" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:5px; top:30px; width:1182px; height:577px; text-align:center; ">
  289. <col ref="orddeptcd"/>
  290. <col ref="fstord"/>
  291. <col ref="reord"/>
  292. <col ref="sum"/>
  293. <col ref="subtotal" visibility="hidden"/>
  294. </datagrid>
  295. </case>
  296. <case id="case_change">
  297. <line id="line2" class="line_1" style="x1:5px; y1:25px; x2:1187px; y2:25px; "/>
  298. <button id="btn_cnclexcel" class="btn2_letter4" style="left:1123px; top:3px; width:64px; height:19px; ">
  299. <caption>엑셀저장</caption>
  300. <script type="javascript" ev:event="DOMActivate">
  301. <![CDATA[
  302. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  303. if (fileName != "")
  304. {
  305. grd_change.saveExcel(fileName, "SheetName", true, true, "", "");
  306. }
  307. window.exec(fileName);
  308. ]]>
  309. </script>
  310. </button>
  311. <datagrid id="grd_change" nodeset="/root/main/reservationstatistic/reservationstatisticlist" class="datagrid2" visibility="visible" caption="진료과^초진^재진^합계^caption1" colsep="^" colwidth="260, 300, 300, 300, 100" dataheight="23" defaultrows="2" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:5px; top:30px; width:1182px; height:577px; ">
  312. <col ref="orddeptcd"/>
  313. <col ref="fstord"/>
  314. <col ref="reord"/>
  315. <col ref="sum"/>
  316. <col ref="subtotal" visibility="hidden"/>
  317. </datagrid>
  318. </case>
  319. <case id="case_cancel">
  320. <button id="button2" class="btn2_letter4" style="left:1123px; top:3px; width:64px; height:19px; ">
  321. <caption>엑셀저장</caption>
  322. <script type="javascript" ev:event="DOMActivate">
  323. <![CDATA[
  324. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  325. if (fileName != "")
  326. {
  327. grd_cancel.saveExcel(fileName, "SheetName", true, true, "", "");
  328. }
  329. window.exec(fileName);
  330. ]]>
  331. </script>
  332. </button>
  333. <datagrid id="grd_cancel" nodeset="/root/main/reservationstatistic/reservationstatisticlist" class="datagrid1" caption="진료과^초진^재진^합계^caption1^최종수정일시" colsep="^" colwidth="260, 300, 300, 300, 100" dataheight="23" defaultrows="2" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:5px; top:30px; width:1182px; height:577px; text-align:center; ">
  334. <col ref="orddeptcd"/>
  335. <col ref="fstord"/>
  336. <col ref="reord"/>
  337. <col ref="sum"/>
  338. <col ref="subtotal" visibility="hidden"/>
  339. </datagrid>
  340. </case>
  341. <case id="case_break">
  342. <line id="line10" class="line_1" style="x1:0px; y1:25px; x2:1183px; y2:25px; "/>
  343. <button id="btn_rgstexcel" class="btn2_letter4" style="left:1118px; top:3px; width:64px; height:19px; ">
  344. <caption>엑셀저장</caption>
  345. <script type="javascript" ev:event="DOMActivate">
  346. <![CDATA[
  347. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  348. if (fileName != "")
  349. {
  350. grd_break.saveExcel(fileName, "SheetName", true, true, "", "");
  351. }
  352. window.exec(fileName);
  353. ]]>
  354. </script>
  355. </button>
  356. <datagrid id="grd_break" nodeset="/root/main/breakstatistic/breakstatisticlist" class="datagrid2" caption="진료과^초진예약^초진부도자^초진부도율(%)^재진예약^재진부도자^재진부도율(%)^예약합계^부도자합계^부도율(%)^caption1" colsep="^" colwidth="165, 100, 100, 130, 100, 100, 130, 100, 150, 180, 100" dataheight="23" defaultrows="2" ellipsis="false" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:30px; width:1182px; height:577px; text-align:center; ">
  357. <col ref="orddeptcd"/>
  358. <col disabled="true" ref="freserve" style="text-align:center; "/>
  359. <col disabled="true" ref="fstord" style="text-align:center; "/>
  360. <col disabled="true" ref="fstordrate" style="text-align:center; "/>
  361. <col disabled="true" ref="rereserve" style="text-align:center; "/>
  362. <col disabled="true" ref="reord" style="text-align:center; "/>
  363. <col disabled="true" ref="reordrate" style="text-align:center; "/>
  364. <col disabled="true" ref="tmpsumreserve" visibility="hidden"/>
  365. <col disabled="true" ref="sum" style="text-align:center; "/>
  366. <col disabled="true" ref="sumrate" style="text-align:center; "/>
  367. <col disabled="true" ref="subtotal" visibility="hidden"/>
  368. </datagrid>
  369. </case>
  370. <case id="case_tel" selected="true">
  371. <datagrid id="datagrid1" nodeset="/root/main/telstatisticnum/telstatisticnumlist" class="datagrid2" caption="사용자^합계^초진예약^재진예약^초진변경^재진변경^초진취소^재진취소^subtotal" colsep="^" colwidth="159, 160, 140, 140, 140, 140, 140, 140, 100" dataheight="23" defaultrows="2" ellipsis="false" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" tooltip="true" style="left:5px; top:30px; width:1182px; height:577px; text-align:center; ">
  372. <col ref="lastupdtrid"/>
  373. <col ref="sum"/>
  374. <col disabled="true" ref="fstord"/>
  375. <col disabled="true" ref="reord"/>
  376. <col disabled="true" ref="fstchanage"/>
  377. <col ref="rechange"/>
  378. <col ref="fstcancel"/>
  379. <col ref="recancel"/>
  380. <col ref="subtotal" visibility="hidden"/>
  381. </datagrid>
  382. <button id="button3" class="btn2_letter4" style="left:1123px; top:3px; width:64px; height:19px; ">
  383. <caption>엑셀저장</caption>
  384. <script type="javascript" ev:event="DOMActivate">
  385. <![CDATA[
  386. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  387. if (fileName != "")
  388. {
  389. datagrid1.saveExcel(fileName, "SheetName", true, true, "", "");
  390. }
  391. window.exec(fileName);
  392. ]]>
  393. </script>
  394. </button>
  395. </case>
  396. </switch>
  397. </group>
  398. <group id="group5" style="left:0px; top:10px; width:1195px; height:75px; vertical-align:top; ">
  399. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:75px; "/>
  400. <button id="button1" class="btn1_letter2" style="left:1122px; top:25px; width:56px; height:22px; ">
  401. <caption>조회</caption>
  402. <script type="javascript" ev:event="DOMActivate">
  403. <![CDATA[
  404. var fromdd = model.getValue("/root/send/fromdd");
  405. var todd = model.getValue("/root/send/todd");
  406. var orddept = model.getValue("/root/send/orddept");
  407. var orddr = model.getValue("/root/send/orddr");
  408. var cnt = getNodesetCount("/root/init/rsrvdeptcd/rsrvdeptcdlist");
  409. //1은 전화예약 2은 의료협력
  410. for( var i = 1; i <= cnt; i++){
  411. if(model.getValue("/root/init/rsrvdeptcd/rsrvdeptcdlist["+ i +"]/cdid") == "1"){
  412. model.setValue("/root/send/teldept", model.getValue("/root/init/rsrvdeptcd/rsrvdeptcdlist["+ i +"]/cdnm"));
  413. }
  414. if(model.getValue("/root/init/rsrvdeptcd/rsrvdeptcdlist["+ i +"]/cdid") == "2"){
  415. model.setValue("/root/send/coopdept", model.getValue("/root/init/rsrvdeptcd/rsrvdeptcdlist["+ i +"]/cdnm"));
  416. }
  417. }
  418. //model.alert(model.getValue("/root/send/teldept"));
  419. //model.alert(model.getValue("/root/send/coopdept"));
  420. if( getDateInterval(fromdd, todd) < 0 ){
  421. messageBox("일자구분에서 시작일자가 종료일자보다 미래일자 입니다. 확인하세요!", "E999", "");
  422. return false;
  423. }
  424. if( getDateInterval(fromdd, todd) > 183 ){
  425. if(messageBox("반년 이상의 데이터를 조회 하시면 시스템에 과부하가 발생 할 수도 있습니다. 계속 진행 하시겠습니까", "Q999", "") != 6){
  426. return false;
  427. }
  428. }
  429. if( fCheckSearchValues()){
  430. if (statistic_gooboon.value == 1 ) {
  431. model.toggle("case_reservation");
  432. submit("TRPMO01500");
  433. grd_reservationstatistic.subtotalposition= "below";
  434. // 합계를 구한다
  435. for(var i=2 ; i<5 ; i++){
  436. grd_reservationstatistic.subtotal("sum",5, i, "#,###", "background-color:#99ff99", 1, "합계");
  437. }
  438. }else if (statistic_gooboon.value == 2 ) {
  439. model.toggle("case_change");
  440. submit("TRPMO01500");
  441. grd_change.subtotalposition= "below";
  442. // 합계를 구한다
  443. for(var i=2 ; i<5 ; i++){
  444. grd_change.subtotal("sum",5, i, "#,###", "background-color:#99ff99", 1, "합계");
  445. }
  446. }else if (statistic_gooboon.value == 3 ) {
  447. model.toggle("case_cancel");
  448. submit("TRPMO01500");
  449. grd_cancel.subtotalposition= "below";
  450. // 합계를 구한다
  451. for(var i=2 ; i<5 ; i++){
  452. grd_cancel.subtotal("sum",5, i, "#,###", "background-color:#99ff99", 1, "합계");
  453. }
  454. model.refresh();
  455. }else if (statistic_gooboon.value == 4 ) {
  456. model.toggle("case_break");
  457. submit("TRPMO01503");
  458. grd_break.colstyle(4, "data", "background-color") = "#DFDFDF"
  459. grd_break.colstyle(7, "data", "background-color") = "#DFDFDF"
  460. grd_break.colstyle(10, "data", "background-color") = "#DFDFDF"
  461. /*
  462. var startRow = grd_break.fixedRows;
  463. var endRow = grd_break.rows;
  464. //var sum = 0;
  465. for( var i = startRow; i < endRow; i++){
  466. var cnt = model.getValue("/root/main/breakstatistic/breakstatisticlist["+ i +"]/freserve");
  467. ccnt = parseInt(cnt);
  468. model.alert(ccnt);
  469. sum = sum+cnt;
  470. model.alert(sum);
  471. }
  472. */
  473. grd_break.subtotalposition= "below";
  474. var sum = 0;
  475. // 합계를 구한다
  476. for(var i=2 ; i<11 ; i++){
  477. if (i ==4 || i==7 || i==10) {
  478. //grd_break.subtotalposition= "above";
  479. //grd_break.subtotal("average",11, i, "#,###", "background-color:#99ff99", 1, "평균(부도율)");
  480. }else{
  481. grd_break.subtotal("sum",11, i, "#,###", "background-color:#99ff99", 1, "합계(부도자)") ;
  482. }
  483. }
  484. //var startRow = grd_break.fixedRows;
  485. var endRow = grd_break.rows;
  486. //alert(endRow);
  487. // model.alert(model.getValue("/root/main/breakstatistic[12]/breakstatisticlist/freserve"));
  488. var row2 = parseInt(grd_break.valuematrix(endRow-1, 2));
  489. var row3 = parseInt(grd_break.valuematrix(endRow-1, 3));
  490. var row5 = parseInt(grd_break.valuematrix(endRow-1, 5));
  491. var row6 = parseInt(grd_break.valuematrix(endRow-1, 6));
  492. var row8 = parseInt(grd_break.valuematrix(endRow-1, 8));
  493. var row9 = parseInt(grd_break.valuematrix(endRow-1, 9));
  494. var freserverate;
  495. if(row2 == '0' || row3 == "0"){
  496. grd_break.valueMatrix(endRow-1, 4) = "0";
  497. }else{
  498. freserverate = Math.round(row3/row2*100);
  499. grd_break.valueMatrix(endRow-1, 4) = freserverate;
  500. }
  501. var rereserverate;
  502. if(row5 == '0' || row6 == "0"){
  503. grd_break.valueMatrix(endRow-1, 7) = "0";
  504. }else{
  505. rereserverate = Math.round(row6/row5*100);
  506. grd_break.valueMatrix(endRow-1, 7) = rereserverate;
  507. }
  508. var totalrate;
  509. if(row8 == '0' || row9 == "0"){
  510. grd_break.valueMatrix(endRow-1, 10) = "0";
  511. }else{
  512. totalrate = Math.round(row9/row8*100);
  513. grd_break.valueMatrix(endRow-1, 10) = totalrate;
  514. }
  515. //var freserve_sum = parseInt(grd_break.valueMatrix(endRow, grd_break.colRef("freserve")));
  516. //model.alert(isNaN(freserve_sum)); --ture인경우 숫자로 변환불가 false 인 경우 숫자로 변환가능
  517. //model.alert(model.getValue("/root/main/breakstatistic/breakstatisticlist["+row+"]/freserve"));
  518. model.refresh();
  519. }else if (statistic_gooboon.value == 5 ) {
  520. model.toggle("case_tel");
  521. submit("TRPMO01501");
  522. datagrid1.subtotalposition= "below";
  523. // 합계를 구한다
  524. for(var i=2 ; i<9 ; i++){
  525. datagrid1.subtotal("sum", 9, i, "#,###", "background-color:#99ff99", 1, "합계");
  526. }
  527. }
  528. }
  529. model.refresh();
  530. ]]>
  531. </script>
  532. </button>
  533. <line id="line13" class="line_4" style="x1:1106px; y1:7px; x2:1106px; y2:65px; border-color:#ffe4bb; border-left-style:solid; "/>
  534. <caption id="caption83" style="left:207px; top:45px; width:15px; height:17px; font-weight:bold; ">~</caption>
  535. <caption id="caption1" class="search_name" style="left:390px; top:10px; width:86px; height:17px; ">진료과 :</caption>
  536. <select1 id="cmb_orddept" ref="/root/send/orddept" class="combo_search" appearance="minimal" style="left:475px; top:10px; width:142px; height:19px; ">
  537. <choices>
  538. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  539. <label ref="nm"/>
  540. <value ref="cd"/>
  541. </itemset>
  542. </choices>
  543. <script type="javascript" ev:event="xforms-value-changed">
  544. <![CDATA[
  545. // model.removeNodeset("/root/hidden/source/orddr");
  546. // model.refresh();
  547. // model.makeNode("/root/hidden/source/orddr");
  548. // fOrddridSet(model.getValue("/root/hidden/source/orddept"));
  549. cmb_orddr.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + cmb_orddept.value + "']";
  550. model.setValue("/root/send/orddr", "");
  551. cmb_orddr.refresh();
  552. //
  553. // ]]>
  554. </script>
  555. </select1>
  556. <caption id="caption3" class="search_name" style="left:390px; top:45px; width:86px; height:17px; ">진료의 :</caption>
  557. <select1 id="cmb_orddr" ref="/root/send/orddr" class="combo_search" appearance="minimal" style="left:475px; top:45px; width:100px; height:19px; ">
  558. <choices>
  559. <itemset nodeset="/root/init/orddrid/orddridlist">
  560. <label ref="nm"/>
  561. <value ref="cd"/>
  562. </itemset>
  563. </choices>
  564. </select1>
  565. <input id="ipt_fromdd" ref="/root/send/fromdd" class="input_s_essential" inputtype="date" style="left:112px; top:45px; width:95px; height:19px; "/>
  566. <input id="ipt_todd" ref="/root/send/todd" class="input_s_essential" inputtype="date" style="left:218px; top:45px; width:95px; height:19px; "/>
  567. <caption id="caption7" class="search_name" style="left:17px; top:10px; width:86px; height:17px; ">부서 :</caption>
  568. <caption id="caption9" class="search_name" style="left:17px; top:45px; width:86px; height:17px; ">조회날자 :</caption>
  569. <caption id="caption2" class="search_name" style="left:680px; top:10px; width:93px; height:17px; ">통계 구분 :</caption>
  570. <select1 id="statistic_gooboon" ref="/root/send/statisticgooboon" overflow="visible" appearance="full" cols="6" style="left:780px; top:10px; width:260px; height:20px; border-style:none; ">
  571. <choices>
  572. <item>
  573. <label>예약</label>
  574. <value>1</value>
  575. </item>
  576. <item>
  577. <label>변경</label>
  578. <value>2</value>
  579. </item>
  580. <item>
  581. <label>취소</label>
  582. <value>3</value>
  583. </item>
  584. <item>
  585. <label>부도자</label>
  586. <value>4</value>
  587. </item>
  588. <item>
  589. <label>통화건수</label>
  590. <value>5</value>
  591. </item>
  592. </choices>
  593. <script type="javascript" ev:event="xforms-value-changed">
  594. <![CDATA[
  595. //button1.dispatch("DOMActivate");
  596. model.setValue("/root/send/statisticgooboon", statistic_gooboon.value );
  597. switch(model.getValue("/root/send/statisticgooboon")){
  598. case 1 : model.toggle("case_reservation");
  599. }
  600. if(model.getvalue("/root/send/statisticgooboon") == "5"){
  601. model.setValue("/root/send/department", "2");
  602. cmb_department.disabled = true;
  603. }else{
  604. cmb_department.disabled = false;
  605. }
  606. model.refresh();
  607. ]]>
  608. </script>
  609. </select1>
  610. <select1 id="cmb_department" ref="/root/send/department" class="combo_search" appearance="minimal" style="left:112px; top:10px; width:80px; height:19px; ">
  611. <choices>
  612. <item>
  613. <label>전체</label>
  614. <value>A</value>
  615. </item>
  616. <item>
  617. <label>전화예약</label>
  618. <value>2</value>
  619. </item>
  620. <item>
  621. <label>인터넷</label>
  622. <value>5</value>
  623. </item>
  624. <item>
  625. <label>의뢰</label>
  626. <value>C</value>
  627. </item>
  628. <item>
  629. <label>협력</label>
  630. <value>1</value>
  631. </item>
  632. <item>
  633. <label>병동</label>
  634. <value>K</value>
  635. </item>
  636. </choices>
  637. </select1>
  638. </group>
  639. </group>
  640. </xhtml:body>
  641. </xhtml:html>