SMSTP00800_선택진료료배분관리.xrw 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  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. <speccd>
  11. <speccdlist>
  12. <cdflag/>
  13. <orddeptcd/>
  14. <orddrid/>
  15. <cd1/>
  16. <cd2/>
  17. <cd3/>
  18. <cd4/>
  19. <cd5/>
  20. <cd6/>
  21. <cd7/>
  22. <cd8/>
  23. <cd9/>
  24. <cd10/>
  25. <cdflagold/>
  26. <orddeptcdold/>
  27. <orddridold/>
  28. </speccdlist>
  29. </speccd>
  30. <specamtreport>
  31. <specamtreportlist>
  32. <orddeptnm/>
  33. <orddrnm/>
  34. <jobposnm/>
  35. <ownspamt/>
  36. <newownspamt/>
  37. <baseamt/>
  38. <deptpamt/>
  39. <psumamt/>
  40. <inctax/>
  41. <restax/>
  42. <realamt/>
  43. <deptrealamt/>
  44. </specamtreportlist>
  45. </specamtreport>
  46. <specamtdeptreport>
  47. <specamtdeptreportlist>
  48. <seq/>
  49. <orddeptnm/>
  50. <realamt/>
  51. <sign/>
  52. </specamtdeptreportlist>
  53. </specamtdeptreport>
  54. <specamtpcntreport>
  55. <specamtpcntreportlist>
  56. <orddeptnm/>
  57. <orddrnm/>
  58. <opatcnt/>
  59. <ospcamt/>
  60. <ipatcnt/>
  61. <ispcamt/>
  62. <tpatcnt/>
  63. <tspcamt/>
  64. </specamtpcntreportlist>
  65. </specamtpcntreport>
  66. </main>
  67. <send>
  68. <statisticflag/>
  69. <fromdd/>
  70. <todd/>
  71. <month/>
  72. <year/>
  73. <cdflag/>
  74. <endyn/>
  75. <passwd/>
  76. </send>
  77. <hidden>
  78. <rcv/>
  79. <fromtodd/>
  80. </hidden>
  81. <init>
  82. <orddeptcd>
  83. <orddeptcdlist/>
  84. </orddeptcd>
  85. <orddrid>
  86. <orddridlist/>
  87. </orddrid>
  88. </init>
  89. <init_code>
  90. <P0488list>
  91. <P0488>
  92. <cdid/>
  93. <cdnm/>
  94. </P0488>
  95. </P0488list>
  96. </init_code>
  97. </root>
  98. </instance>
  99. <script type="javascript" ev:event="xforms-ready">
  100. <![CDATA[
  101. zbcfGetCodeList(new Array("P0488"),
  102. new Array("/root/init_code/P0488list"));
  103. //
  104. // //진료과코드 진료의사ID 조회
  105. pamGetDeptCDDrIDList();
  106. //초기화 및 날자 입력 항목에 오늘 날자 세팅
  107. fInitialize();
  108. ]]>
  109. </script>
  110. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  111. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  112. <submission id="TXSTP00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  113. <submission id="TXSTP00802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  114. <submission id="TRSTP00803" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  115. <submission id="TXSTP00804" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updtdata" resultref="/root/hidden/rcv"/>
  116. <submission id="TXSTP00805" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  117. </model>
  118. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  119. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  120. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  121. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  122. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  123. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  124. <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
  125. <script type="javascript">
  126. <![CDATA[
  127. var Authority = 'N'; //권한설정 'S' 모든권한, 'N' 조회권한
  128. var psswd = '';
  129. function fCheckSearchValues(){
  130. if( model.getValue("/root/send/pid") != '' || model.getValue("/root/send/hngnm") != '' || model.getValue("/root/send/rrgstno1") != '' ||
  131. model.getValue("/root/send/rrgstno2") != '' || model.getValue("/root/send/fromdd") != '' || model.getValue("/root/send/todd") != '' ||
  132. model.getValue("/root/send/orddept") != '' || model.getValue("/root/send/orddr") != '' || model.getValue("/root/send/statisticgooboon") != '' ||
  133. model.getValue("/root/send/department") != '' ){
  134. return true;
  135. }else{
  136. return false;
  137. }
  138. }
  139. function fInitialize() {
  140. Authority = getScreenMenuParameter();
  141. model.resetInstanceNode("/root/send");
  142. model.resetInstanceNode("/root/main");
  143. //날자 입력 항목에 오늘 날자 세팅
  144. var curDate = getCurrentDate();
  145. // model.setValue("/root/send/fromdd", curDate-1);
  146. // model.setValue("/root/send/todd", curDate-1);
  147. model.setValue("/root/send/year", curDate.substr(0, 4));
  148. model.setValue("/root/send/month", curDate.substr(4, 2));
  149. cmb_month.dispatch("xforms-select");
  150. model.setValue("/root/send/statisticflag", 'D');
  151. if( Authority != 'S' ){
  152. btn_totaling.visible = false;
  153. btn_distributing.visible = false;
  154. button6.visible = false;
  155. button7.visible = false;
  156. btn_add.visible = false;
  157. btn_save.visible = false;
  158. btn_delete.visible = false;
  159. secret1.visible = false;
  160. caption9.visible = false;
  161. }else{
  162. btn_totaling.visible = false;
  163. btn_distributing.visible = true;
  164. }
  165. model.refresh();
  166. }
  167. function fSearch(){
  168. if( model.getValue("/root/main/popupendflag") == "ok" ){
  169. //인적사항에 변경이 있는지를 비교하기 위해서 tmp에 인적사항을 미리 저장해 놓는다.
  170. model.makeNode("/root/hidden/tmpnode");
  171. model.copyNode("/root/hidden/tmpnode", "/root/main/patinfo");
  172. //보험/감면/진료기록/신생하*산모내역 조회
  173. model.setValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  174. submit("TRPMC01401");
  175. //model.makeNode("/root/main/popupendflag");
  176. }
  177. }
  178. function searchdepart(){
  179. for(var i=1; i<grd_reservationstatistic.rows ; i++){
  180. var tmpdepart = grd_reservationstatistic.valueMatrix(i , 1) ;
  181. var index =0;
  182. while(tmpdepart != (model.getValue("/root/init/orddeptcd/orddeptcdlist[" +index+ "]/cd") ) ){
  183. index++;
  184. if(index > 300) break;
  185. }
  186. if(model.getValue("/root/init/orddeptcd/orddeptcdlist[" +index+ "]/nm") ==""){
  187. messageBox("부서명과 " +model.getValue("/root/main/reservationstatistic/reservationstatisticlist["+i+"]/orddeptcd") +"이", "E004")
  188. }else if(model.getValue("/root/init/orddeptcd/orddeptcdlist[" +index+ "]/nm") !="") {
  189. model.setValue("/root/main/reservationstatistic/reservationstatisticlist[" +i+"]/orddeptcd",
  190. model.getValue("/root/init/orddeptcd/orddeptcdlist[" +index+ "]/nm") );
  191. }
  192. }
  193. }
  194. function GetGetRsrvDeptCD(){
  195. submit("TRPMO01504");
  196. }
  197. function fRsrvInfolistPrint(){
  198. model.removeNodeset("/root/temp/rsrvlist");
  199. model.makeNode("/root/temp/rsrvlist/otpt_histstat");
  200. model.makeNode("/root/temp/rsrvlist/otpt_pid");
  201. model.makeNode("/root/temp/rsrvlist/otpt_orddd");
  202. model.makeNode("/root/temp/rsrvlist/otpt_rsrvflag");
  203. model.makeNode("/root/temp/rsrvlist/otpt_remfact");
  204. model.makeNode("/root/temp/rsrvlist/otpt_telnum");
  205. model.makeNode("/root/temp/rsrvlist/otpt_telrsrvrem");
  206. model.makeNode("/root/temp/rsrvlist/ptbs_hngnm");
  207. model.makeNode("/root/temp/rsrvlist/otpt_updtcnclresn");
  208. model.makeNode("/root/temp/rsrvlist/otpt_ordtm");
  209. model.makeNode("/root/temp/rsrvlist/otpt_orddeptcd");
  210. model.makeNode("/root/temp/rsrvlist/otpt_orddrid");
  211. //var orddd = model.getValue("");
  212. model.makeValue("/root/temp/rsrvlist/otpt_orddeptcd", cmb_orddeptcd.label);
  213. model.makeValue("/root/temp/rsrvlist/otpt_orddrid", cmb_orddrid.label);
  214. model.setValue("/root/temp/rsrvlist/otpt_orddd", orddd);
  215. // model.copyNode("/root/temp/rsrvlist", "/root/main/h_otpt3/otpt[" + datagrid6.row + "]");
  216. for (i = 1; i <= getNodesetCount("/root/main/h_otpt3/otpt"); i++) {
  217. var aa = model.getValue("/root/main/h_otpt3/otpt/otpt_ordtm");
  218. model.makeValue("/root/temp/rsrvlist[" + i + "]/otpt_ordtm",datagrid6.labelmatrix(i, 1));
  219. model.makeValue("/root/temp/rsrvlist[" + i + "]/otpt_pid",datagrid6.labelmatrix(i, 2));
  220. model.makeValue("/root/temp/rsrvlist[" + i + "]/ptbs_hngnm",datagrid6.labelmatrix(i, 3));
  221. model.makeValue("/root/temp/rsrvlist[" + i + "]/otpt_histstat",datagrid6.labelmatrix(i, 7));
  222. model.makeValue("/root/temp/rsrvlist[" + i + "]/otpt_rsrvflag",datagrid6.labelmatrix(i, 8));
  223. model.makeValue("/root/temp/rsrvlist[" + i + "]/otpt_telnum",model.getValue("/root/main/h_otpt3/otpt["+ i + "]/otpt_telnum"));
  224. model.makeValue("/root/temp/rsrvlist[" + i + "]/otpt_remfact",model.getValue("/root/main/h_otpt3/otpt["+ i + "]/otpt_remfact"));
  225. model.makeValue("/root/temp/rsrvlist[" + i + "]/otpt_telrsrvrem",model.getValue("/root/main/h_otpt3/otpt["+ i + "]/otpt_telrsrvrem"));
  226. model.makeValue("/root/temp/rsrvlist[" + i + "]/otpt_updtcnclresn",model.getValue("/root/main/h_otpt3/otpt["+ i + "]/otpt_updtcnclresn"));
  227. }
  228. exeReportPreview("RPPMO00301", "XMLSTR", "","", "false","","","","","false");
  229. }
  230. ]]>
  231. </script>
  232. </xhtml:head>
  233. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  234. <group id="group2" style="left:0px; top:15px; width:1180px; height:35px; vertical-align:top; ">
  235. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1180px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  236. <caption id="caption2" class="search_name" style="left:16px; top:9px; width:86px; height:17px; ">기준년월 :</caption>
  237. <button id="button1" class="btn1_letter2" style="left:1111px; top:7px; width:56px; height:22px; ">
  238. <caption>조회</caption>
  239. <script type="javascript" ev:event="DOMActivate">
  240. <![CDATA[
  241. model.resetInstanceNode("/root/main");
  242. // if( model.getValue("") == 'D' ){
  243. submit("TRSTP00803");
  244. model.copyNode("/root/main", "/root/hidden/rcv");
  245. model.removeNodeset("/root/hidden/rcv");
  246. model.makeNode("/root/hidden/rcv");
  247. model.refresh();
  248. ]]>
  249. </script>
  250. </button>
  251. <line id="line13" class="line_4" style="x1:1096px; y1:7px; x2:1096px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  252. <input id="ipt_pid" ref="/root/send/fromdd" class="input_s_essential" disabled="true" inputtype="date" maxlength="8" style="left:245px; top:8px; width:90px; height:19px; ">
  253. <script type="javascript" ev:event="onkeypress">
  254. <![CDATA[
  255. if (event.keyCode == "13")
  256. {
  257. setInputNodeCurText();
  258. fOutHistRef();
  259. }
  260. ]]>
  261. </script>
  262. </input>
  263. <caption id="caption1" class="search_name" style="left:464px; top:9px; width:61px; height:17px; ">구분 :</caption>
  264. <select1 id="radio1" ref="/root/send/statisticflag" overflow="visible" appearance="full" cellspacing="5" cols="2" style="left:523px; top:8px; width:222px; height:20px; border-style:none; ">
  265. <choices>
  266. <item>
  267. <label>선택진료료 집계</label>
  268. <value>G</value>
  269. </item>
  270. <item>
  271. <label>선택진료료 배분</label>
  272. <value>D</value>
  273. </item>
  274. </choices>
  275. <script type="javascript" ev:event="xforms-value-changed">
  276. <![CDATA[
  277. //model.resetInstanceNode("/root/send");
  278. model.removeNodeset("/root/main");
  279. model.makeNode("/root/main");
  280. //날자 입력 항목에 오늘 날자 세팅
  281. // var curDate = getCurrentDate();
  282. // model.setValue("/root/send/year", curDate.substr(0, 4));
  283. // model.setValue("/root/send/month", curDate.substr(4, 2));
  284. //fInitialize();
  285. var rsrvgubn = model.getValue("/root/send/statisticflag");
  286. if (rsrvgubn == "G"){
  287. if( Authority == 'S' ){
  288. btn_totaling.visible = true;
  289. btn_distributing.visible = false;
  290. }
  291. model.toggle("case_g");
  292. }else if (rsrvgubn == "D"){
  293. if( Authority == 'S' ){
  294. btn_totaling.visible = false;
  295. btn_distributing.visible = true;
  296. }
  297. model.toggle("case_d");
  298. }
  299. cmb_month.dispatch("xforms-select");
  300. model.refresh();
  301. ]]>
  302. </script>
  303. </select1>
  304. <input id="input1" ref="/root/send/todd" class="input_s_essential" disabled="true" inputtype="date" maxlength="8" style="left:351px; top:8px; width:90px; height:19px; ">
  305. <script type="javascript" ev:event="onkeypress">
  306. <![CDATA[
  307. if (event.keyCode == "13")
  308. {
  309. setInputNodeCurText();
  310. fOutHistRef();
  311. }
  312. ]]>
  313. </script>
  314. </input>
  315. <caption id="caption3" style="left:337px; top:9px; width:25px; height:15px; ">~</caption>
  316. <button id="btn_totaling" class="btn4_letter2" style="left:755px; top:7px; width:56px; height:22px; ">
  317. <caption>집계</caption>
  318. <script type="javascript" ev:event="DOMActivate">
  319. <![CDATA[
  320. if(messageBox("선택진료배분자료 집계하시겠습니까? 이전 집계된 자료는 삭제됩니다. 계속하시겠습니까?", "Q999", "") != 6) return;
  321. var orgfromdd = model.getValue("/root/send/fromdd");
  322. var orgtodd = model.getValue("/root/send/todd");
  323. var addedfromdd = orgfromdd;
  324. //var addedfromdd = orgfromdd.toDate("YYYYMMDD").getAddDate('1', 'D').getDateFormat("YYYYMMDD");
  325. //var notaddedfromdd = orgfromdd;
  326. while( addedfromdd <= orgtodd ){
  327. model.setValue("/root/send/fromdd", addedfromdd);
  328. model.setValue("/root/send/todd", addedfromdd);
  329. if(submit("TXSTP00801")){
  330. //notaddedfromdd = addedfromdd.toDate("YYYYMMDD").getAddDate('1', 'D').getDateFormat("YYYYMMDD");
  331. // if( addedfromdd > orgtodd ){
  332. // addedfromdd = orgtodd;
  333. // model.setValue("/root/send/fromdd", notaddedfromdd);
  334. // model.setValue("/root/send/todd", addedfromdd);
  335. // if(submit("TXSTP00801")){
  336. // return true;
  337. // }else{
  338. // messageBox("자료집계 실패했습니다. 확인 후 다시 시도하세요", "E999", "");
  339. // }
  340. // }
  341. }else{
  342. messageBox(addedfromdd + "일자 자료집계를 실패했습니다. 확인 후 해당 일자부터 다시 집계하세요", "E999", "");
  343. return false;
  344. }
  345. addedfromdd = addedfromdd.toDate("YYYYMMDD").getAddDate(1, 'D').getDateFormat("YYYYMMDD");
  346. //alert(addedfromdd);
  347. }
  348. ]]>
  349. </script>
  350. </button>
  351. <button id="btn_distributing" class="btn4_letter2" style="left:755px; top:7px; width:56px; height:22px; ">
  352. <caption>배분</caption>
  353. <script type="javascript" ev:event="DOMActivate">
  354. <![CDATA[
  355. submit("TXSTP00802");
  356. ]]>
  357. </script>
  358. </button>
  359. <select1 id="cmb_month" ref="/root/send/month" class="combo_s_essential" appearance="minimal" style="left:168px; top:8px; width:70px; height:19px; ">
  360. <choices>
  361. <item>
  362. <label>1월</label>
  363. <value>01</value>
  364. </item>
  365. <item>
  366. <label>2월</label>
  367. <value>02</value>
  368. </item>
  369. <item>
  370. <label>3월</label>
  371. <value>03</value>
  372. </item>
  373. <item>
  374. <label>4월</label>
  375. <value>04</value>
  376. </item>
  377. <item>
  378. <label>5월</label>
  379. <value>05</value>
  380. </item>
  381. <item>
  382. <label>6월</label>
  383. <value>06</value>
  384. </item>
  385. <item>
  386. <label>7월</label>
  387. <value>07</value>
  388. </item>
  389. <item>
  390. <label>8월</label>
  391. <value>08</value>
  392. </item>
  393. <item>
  394. <label>9월</label>
  395. <value>09</value>
  396. </item>
  397. <item>
  398. <label>10월</label>
  399. <value>10</value>
  400. </item>
  401. <item>
  402. <label>11월</label>
  403. <value>11</value>
  404. </item>
  405. <item>
  406. <label>12월</label>
  407. <value>12</value>
  408. </item>
  409. </choices>
  410. <script type="javascript" ev:event="xforms-select">
  411. <![CDATA[
  412. var selectedMonth = model.getValue("/root/send/month");
  413. // model.setValue("/root/send/month", selectedMonth);
  414. var selectedYear = model.getValue("/root/send/year");
  415. // model.setValue("/root/send/year", selectedYear);
  416. var fromdd = selectedYear + selectedMonth + '01';
  417. var todd = selectedYear + selectedMonth + getDayCountForMonth(selectedYear, selectedMonth);
  418. model.setValue("/root/send/fromdd", fromdd);
  419. model.setValue("/root/send/todd", todd);
  420. //배분확정여부 체크
  421. var flag = model.getValue("/root/send/statisticflag");
  422. model.setValue("/root/send/statisticflag", "G");
  423. model.setValue("/root/send/cdflag", '00');
  424. submit("TRSTP00803");
  425. model.setValue("/root/send/cdflag", '');
  426. model.setValue("/root/send/statisticflag", flag);
  427. model.setValue("/root/send/passwd", '');
  428. psswd = '-';
  429. if( Authority == 'S' ){
  430. //해당월의 선택진료배분마감
  431. if( model.getValue("/root/hidden/rcv/speccd/speccdlist/cd3") == 'Y' ){
  432. psswd = model.getValue("/root/hidden/rcv/speccd/speccdlist/cd10");
  433. btn_totaling.disabled = true;
  434. btn_distributing.disabled = true;
  435. button6.visible = false;
  436. button7.visible = true;
  437. button6.disabled = true;
  438. button7.disabled = true;
  439. }else{
  440. btn_totaling.disabled = false;
  441. btn_distributing.disabled = false;
  442. button6.visible = true;
  443. button7.visible = false;
  444. button6.disabled = true;
  445. button7.disabled = true;
  446. }
  447. }
  448. model.refresh();
  449. ]]>
  450. </script>
  451. </select1>
  452. <input id="ipt_year" ref="/root/send/year" class="input_s_essential" autonext="false" maxlength="4" style="left:105px; top:8px; width:60px; height:19px; ">
  453. <script type="javascript" ev:event="xforms-value-changed">
  454. <![CDATA[
  455. var selectedMonth = model.getValue("/root/send/month");
  456. // model.setValue("/root/send/month", selectedMonth);
  457. var selectedYear = model.getValue("/root/send/year");
  458. // model.setValue("/root/send/year", selectedYear);
  459. var fromdd = selectedYear + selectedMonth + '01';
  460. var todd = selectedYear + selectedMonth + getDayCountForMonth(selectedYear, selectedMonth);
  461. model.setValue("/root/send/fromdd", fromdd);
  462. model.setValue("/root/send/todd", todd);
  463. //배분확정여부 체크
  464. var flag = model.getValue("/root/send/statisticflag");
  465. model.setValue("/root/send/statisticflag", "G");
  466. model.setValue("/root/send/cdflag", '00');
  467. submit("TRSTP00803");
  468. model.setValue("/root/send/cdflag", '');
  469. model.setValue("/root/send/statisticflag", flag);
  470. model.setValue("/root/send/passwd", '');
  471. psswd = '-';
  472. if( Authority == 'S' ){
  473. //해당월의 선택진료배분마감
  474. if( model.getValue("/root/hidden/rcv/speccd/speccdlist/cd3") == 'Y' ){
  475. psswd = model.getValue("/root/hidden/rcv/speccd/speccdlist/cd10");
  476. btn_totaling.disabled = true;
  477. btn_distributing.disabled = true;
  478. button6.visible = false;
  479. button7.visible = true;
  480. button6.disabled = true;
  481. button7.disabled = true;
  482. }else{
  483. btn_totaling.disabled = false;
  484. btn_distributing.disabled = false;
  485. button6.visible = true;
  486. button7.visible = false;
  487. button6.disabled = true;
  488. button7.disabled = true;
  489. }
  490. }
  491. model.refresh();
  492. ]]>
  493. </script>
  494. </input>
  495. <caption id="caption9" class="search_name" style="left:825px; top:9px; width:61px; height:17px; ">마감 :</caption>
  496. <button id="button6" class="btn4_letter4" style="left:995px; top:7px; width:80px; height:22px; ">
  497. <caption>마감적용</caption>
  498. <script type="javascript" ev:event="DOMActivate">
  499. <![CDATA[
  500. var secretValue = model.getValue("/root/send/passwd");
  501. if( secretValue == '' || secretValue.length < 4 ){
  502. messageBox("마감 비밀번호는 4자리 이상입력하세요.", "E999", "");
  503. return false;
  504. }
  505. if(messageBox("선택진료배분을 마감 하시겠습니까? 마감된 기간에는 집계/배분이 되지 않습니다. 계속하시겠습니까?", "Q999", "") != 6) return;
  506. model.setValue("/root/send/endyn", "I");
  507. if(submit("TXSTP00805")){
  508. cmb_month.dispatch("xforms-select");
  509. }else{
  510. messageBox("마감적용 실패했습니다. 잠시 후 다시 하시거나 정보지원팀에 문의하세요.", "E999", "");
  511. return false;
  512. }
  513. ]]>
  514. </script>
  515. </button>
  516. <button id="button7" class="btn4_letter4" style="left:995px; top:7px; width:80px; height:22px; ">
  517. <caption>마감취소</caption>
  518. <script type="javascript" ev:event="DOMActivate">
  519. <![CDATA[
  520. if(psswd != model.getValue("/root/send/passwd") ){
  521. messageBox("마감 비밀번호랑 다릅니다. 정확히 입력하세요,", "E999", "");
  522. return false;
  523. }
  524. if(messageBox("마감을 취소 하시겠습니까? 마감취소 후에는 집계/배분이 가능합니다. 계속하시겠습니까?", "Q999", "") != 6) return;
  525. model.setValue("/root/send/endyn", "D");
  526. if(submit("TXSTP00805")){
  527. cmb_month.dispatch("xforms-select");
  528. }else{
  529. messageBox("마감적용 실패했습니다. 잠시 후 다시 하시거나 정보지원팀에 문의하세요.", "E999", "");
  530. return false;
  531. }
  532. ]]>
  533. </script>
  534. </button>
  535. <secret id="secret1" ref="/root/send/passwd" imemode="disabled" maxlength="10" appearance="secret" style="left:888px; top:8px; width:100px; height:19px; ">
  536. <script type="javascript" ev:event="onkeypress">
  537. <![CDATA[
  538. if (event.keyCode == "13"){
  539. model.setFocus("button6");
  540. }
  541. ]]>
  542. </script>
  543. <script type="javascript" ev:event="xforms-value-changed">
  544. <![CDATA[
  545. //마감취소
  546. if( button7.visible == true ){
  547. //패스워드 체크후 같으면 사용가능
  548. if(psswd == secret1.value ){
  549. button7.disabled = false;
  550. }else{
  551. messageBox("마감 비밀번호랑 다릅니다. 정확히 입력하세요,", "E999", "");
  552. return false;
  553. }
  554. }else{
  555. if( secret1.value == '' || secret1.value.length < 4 ){
  556. messageBox("마감 비밀번호는 4자리 이상입력하세요.", "E999", "");
  557. return false;
  558. }else{
  559. button6.disabled = false;
  560. }
  561. }
  562. ]]>
  563. </script>
  564. </secret>
  565. </group>
  566. <group id="grp_tle" style="left:0px; top:0px; width:1180px; height:13px; ">
  567. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:311px; height:14px; ">선택진료료배분관리</caption>
  568. </group>
  569. <group id="group1" style="left:0px; top:50px; width:1180px; height:740px; ">
  570. <switch id="switch1" style="left:0px; top:0px; width:1180px; height:730px; border-color:#ffffff; ">
  571. <case id="case_g" style="border-style:none; ">
  572. <line id="line1" class="line_1" style="x1:5px; y1:28px; x2:1172px; y2:28px; "/>
  573. <datagrid id="grd_d" nodeset="/root/main/speccd/speccdlist" caption="분류^진료과^진료과명^진료의^진료의명^cd1^cd2^cd3^cd4^cd5^cd6^cd7^cd8^cd9^cd10^cdflagold^orddeptcdold^orddridold^최종수정일시" colsep="^" colwidth="160, 100, 120, 80, 80, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="23" defaultrows="2" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:5px; top:33px; width:1167px; height:692px; text-align:center; ">
  574. <col ref="cdflag" type="combo">
  575. <choices>
  576. <itemset nodeset="/root/init_code/P0488list/P0488">
  577. <label ref="cdnm"/>
  578. <value ref="cdid"/>
  579. </itemset>
  580. </choices>
  581. </col>
  582. <col ref="orddeptcd" type="input" maxlength="10"/>
  583. <col ref="orddeptnm"/>
  584. <col ref="orddrid" type="input" maxlength="10"/>
  585. <col ref="orddrnm"/>
  586. <col ref="cd1" type="input" maxlength="50"/>
  587. <col ref="cd2" type="input" maxlength="50"/>
  588. <col ref="cd3" type="input" maxlength="50"/>
  589. <col ref="cd4" type="input" maxlength="50"/>
  590. <col ref="cd5" type="input" maxlength="50"/>
  591. <col ref="cd6" type="input" maxlength="50"/>
  592. <col ref="cd7" type="input" maxlength="50"/>
  593. <col ref="cd8" type="input" maxlength="50"/>
  594. <col ref="cd9" type="input" maxlength="50"/>
  595. <col ref="cd10" type="input" maxlength="50"/>
  596. <col ref="cdflagold" visibility="hidden"/>
  597. <col ref="orddeptcdold" visibility="hidden"/>
  598. <col ref="orddridold" visibility="hidden"/>
  599. </datagrid>
  600. <caption id="caption7" class="tit_2" style="left:10px; top:13px; width:170px; height:13px; ">선택진료료 배분 공통코드</caption>
  601. <button id="btn_delete" class="btn5_letter2" style="left:1128px; top:6px; width:42px; height:19px; ">
  602. <caption>삭제</caption>
  603. <script type="javascript" ev:event="DOMActivate">
  604. <![CDATA[
  605. if(messageBox("선택된 행을", "Q001") != 6) return;
  606. var cur_row = grd_d.row;
  607. if( cur_row > 0 ){
  608. //디비에 입력되지 않은 데이터는 그리드에서만 삭제한다.
  609. if (grd_d.rowStatus(cur_row) == "1" || grd_d.rowStatus(cur_row) == "3"){
  610. grd_d.deleteItem(cur_row);
  611. return;
  612. }
  613. grd_d.addStatus(cur_row, "delete");
  614. //삭제할 행의 정보를 send에 넣는다.
  615. model.makeNode("/root/send/updtdata/datalist");
  616. model.setValue("/root/send/updtdata/datalist", grd_d.getUpdateData("delete"));
  617. if ( submit("TXSTP00804") ) {
  618. grd_d.removeStatus(cur_row, "delete");
  619. grd_d.deleteItem( cur_row);
  620. model.removeNodeset("/root/send/updtdata");
  621. }
  622. }
  623. ]]>
  624. </script>
  625. </button>
  626. <button id="btn_add" class="btn2_letter2" style="left:1038px; top:6px; width:42px; height:19px; ">
  627. <caption>추가</caption>
  628. <script type="javascript" ev:event="DOMActivate">
  629. <![CDATA[
  630. grd_d.addRow(false);
  631. grd_d.refresh();
  632. ]]>
  633. </script>
  634. </button>
  635. <button id="btn_save" class="btn5_letter2" style="left:1083px; top:6px; width:42px; height:19px; ">
  636. <caption>저장</caption>
  637. <script type="javascript" ev:event="DOMActivate">
  638. <![CDATA[
  639. var cur_row = grd_d.rows - grd_d.fixedRows;
  640. if( cur_row > 0 ){
  641. if(messageBox("공통코드자료를 저장 하시겠습니까?", "Q999") != 6) return;
  642. model.makeNode("/root/send/updtdata/datalist");
  643. model.setValue("/root/send/updtdata/datalist",grd_d.getUpdateData());
  644. if ( submit("TXSTP00804") ) {
  645. grd_d.rebuild();
  646. //진료일정기준자료를 재 조회한다.
  647. model.removeNodeset("/root/send/updtdata");
  648. button1.dispatch("DOMActivate");
  649. }
  650. model.refresh();
  651. }
  652. ]]>
  653. </script>
  654. </button>
  655. <select1 id="combo1" ref="/root/send/cdflag" appearance="minimal" style="left:200px; top:7px; width:155px; height:19px; ">
  656. <choices>
  657. <itemset nodeset="/root/init_code/P0488list/P0488">
  658. <label ref="cdnm"/>
  659. <value ref="cdid"/>
  660. </itemset>
  661. </choices>
  662. <script type="javascript" ev:event="xforms-value-changed">
  663. <![CDATA[
  664. button1.dispatch("DOMActivate");
  665. ]]>
  666. </script>
  667. </select1>
  668. <button id="button8" class="btn2_letter4" style="left:972px; top:6px; width:64px; height:19px; ">
  669. <caption>엑셀저장</caption>
  670. <script type="javascript" ev:event="DOMActivate">
  671. <![CDATA[
  672. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  673. if (fileName != "")
  674. {
  675. grd_d.saveExcel(fileName, "SheetName", true, true, "", "");
  676. }
  677. window.exec(fileName);
  678. ]]>
  679. </script>
  680. </button>
  681. </case>
  682. <case id="case_d" selected="true" style="left:0px; top:0px; width:1178px; height:738px; ">
  683. <line id="line2" class="line_1" style="x1:5px; y1:28px; x2:845px; y2:28px; "/>
  684. <caption id="caption4" class="tit_2" style="left:10px; top:12px; width:175px; height:14px; ">선택진료 배분 결과 리스트</caption>
  685. <datagrid id="datagrid1" nodeset="/root/main/specamtreport/specamtreportlist" caption="진료과^진료의사^직위^개인실적^신개인실적^전스텝^과개인^개인계^소득세^주민세^실지급액^의국비^최종수정일시" colsep="^" colwidth="110, 65, 60, 65, 65, 65, 65, 65, 65, 65, 65, 65" dataheight="23" defaultrows="2" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:5px; top:33px; width:840px; height:347px; text-align:center; ">
  686. <col ref="orddeptnm"/>
  687. <col ref="orddrnm"/>
  688. <col ref="jobposnm"/>
  689. <col ref="ownspamt"/>
  690. <col ref="newownspamt"/>
  691. <col ref="baseamt"/>
  692. <col ref="deptpamt"/>
  693. <col ref="psumamt"/>
  694. <col ref="inctax"/>
  695. <col ref="restax"/>
  696. <col ref="realamt"/>
  697. <col ref="deptrealamt"/>
  698. </datagrid>
  699. <line id="line3" class="line_1" style="x1:850px; y1:28px; x2:1177px; y2:28px; "/>
  700. <datagrid id="datagrid2" nodeset="/root/main/specamtdeptreport/specamtdeptreportlist" caption="순번^진료과^지급액^sign^최종수정일시" colsep="^" colwidth="34, 140, 90, 50" dataheight="23" defaultrows="2" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:850px; top:33px; width:327px; height:692px; text-align:center; ">
  701. <col ref="seq"/>
  702. <col ref="orddeptnm"/>
  703. <col ref="realamt"/>
  704. <col ref="sign"/>
  705. </datagrid>
  706. <caption id="caption5" class="tit_2" style="left:855px; top:12px; width:162px; height:14px; ">의국비 배분 결과 리스트</caption>
  707. <datagrid id="datagrid3" nodeset="/root/main/specamtpcntreport/specamtpcntreportlist" caption="진료과^진료의사^외래^외래^입원^입원^합계^합계^최종수정일시|진료과^진료의사^환자수^수입^환자수^수입^과개인^개인계^최종수정일시" colsep="^" colwidth="126, 65, 105, 105, 105, 105, 105, 105" dataheight="23" defaultrows="2" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:5px; top:408px; width:840px; height:317px; text-align:center; ">
  708. <col ref="orddeptnm"/>
  709. <col ref="orddrnm"/>
  710. <col ref="opatcnt"/>
  711. <col ref="ospcamt"/>
  712. <col ref="ipatcnt"/>
  713. <col ref="ispcamt"/>
  714. <col ref="tpatcnt"/>
  715. <col ref="tspcamt"/>
  716. </datagrid>
  717. <caption id="caption8" class="tit_2" style="left:10px; top:389px; width:245px; height:14px; ">선택진료 임상과별 환자수 및 수입현황</caption>
  718. <line id="line4" class="line_1" style="x1:5px; y1:403px; x2:845px; y2:403px; "/>
  719. <button id="button3" class="btn2_letter4" style="left:783px; top:383px; width:64px; height:19px; ">
  720. <caption>엑셀저장</caption>
  721. <script type="javascript" ev:event="DOMActivate">
  722. <![CDATA[
  723. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  724. if (fileName != "")
  725. {
  726. datagrid3.saveExcel(fileName, "SheetName", true, true, "", "");
  727. }
  728. window.exec(fileName);
  729. ]]>
  730. </script>
  731. </button>
  732. <button id="button2" class="btn2_letter4" style="left:783px; top:7px; width:64px; height:19px; ">
  733. <caption>엑셀저장</caption>
  734. <script type="javascript" ev:event="DOMActivate">
  735. <![CDATA[
  736. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  737. if (fileName != "")
  738. {
  739. datagrid1.saveExcel(fileName, "SheetName", true, true, "", "");
  740. }
  741. window.exec(fileName);
  742. ]]>
  743. </script>
  744. </button>
  745. <button id="btn_updtexcel" class="btn2_letter4" style="left:1113px; top:7px; width:64px; height:19px; ">
  746. <caption>엑셀저장</caption>
  747. <script type="javascript" ev:event="DOMActivate">
  748. <![CDATA[
  749. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  750. if (fileName != "")
  751. {
  752. datagrid2.saveExcel(fileName, "SheetName", true, true, "", "");
  753. }
  754. window.exec(fileName);
  755. ]]>
  756. </script>
  757. </button>
  758. <button id="btn_print" class="btn6_letter2" style="left:726px; top:6px; width:56px; height:22px; ">
  759. <caption>출력</caption>
  760. <script type="javascript" ev:event="DOMActivate">
  761. <![CDATA[
  762. model.makeNode("/root/hidden/fromtodd");
  763. var fromdd = model.getValue("/root/send/fromdd");
  764. var todd = model.getValue("/root/send/todd");
  765. if( fromdd == '' || fromdd.length < 8 || todd == '' || todd.length < 8 ){
  766. messageBox("기준년월이 정확이 입력되지 않았습니다. 다시 입력 후 출력해주세요", "E999", "");
  767. return false;
  768. }
  769. fromdd = fromdd.substr(0, 4) + '년' + ' ' + fromdd.substr(4, 2) + '월' + ' ' + fromdd.substr(6, 2) + '일';
  770. todd = todd.substr(0, 4) + '년' + ' ' + todd.substr(4, 2) + '월' + ' ' + todd.substr(6, 2) + '일';
  771. model.setValue("/root/hidden/fromtodd", fromdd + ' ~ ' + todd );
  772. exeReportPreview("RPSTP00802", "XMLSTR", "","", "false","","","","","false");
  773. ]]>
  774. </script>
  775. </button>
  776. <button id="button4" class="btn6_letter2" style="left:1056px; top:6px; width:56px; height:22px; ">
  777. <caption>출력</caption>
  778. <script type="javascript" ev:event="DOMActivate">
  779. <![CDATA[
  780. model.makeNode("/root/hidden/fromtodd");
  781. var fromdd = model.getValue("/root/send/fromdd");
  782. var todd = model.getValue("/root/send/todd");
  783. if( fromdd == '' || fromdd.length < 8 || todd == '' || todd.length < 8 ){
  784. messageBox("기준년월이 정확이 입력되지 않았습니다. 다시 입력 후 출력해주세요", "E999", "");
  785. return false;
  786. }
  787. fromdd = fromdd.substr(0, 4) + '년' + ' ' + fromdd.substr(4, 2) + '월' + ' ' + fromdd.substr(6, 2) + '일';
  788. todd = todd.substr(0, 4) + '년' + ' ' + todd.substr(4, 2) + '월' + ' ' + todd.substr(6, 2) + '일';
  789. model.setValue("/root/hidden/fromtodd", fromdd + ' ~ ' + todd );
  790. exeReportPreview("RPSTP00803", "XMLSTR", "","", "false","","","","","false");
  791. ]]>
  792. </script>
  793. </button>
  794. <button id="button5" class="btn6_letter2" style="left:726px; top:381px; width:56px; height:22px; ">
  795. <caption>출력</caption>
  796. <script type="javascript" ev:event="DOMActivate">
  797. <![CDATA[
  798. model.makeNode("/root/hidden/fromtodd");
  799. var fromdd = model.getValue("/root/send/fromdd");
  800. var todd = model.getValue("/root/send/todd");
  801. if( fromdd == '' || fromdd.length < 8 || todd == '' || todd.length < 8 ){
  802. messageBox("기준년월이 정확이 입력되지 않았습니다. 다시 입력 후 출력해주세요", "E999", "");
  803. return false;
  804. }
  805. fromdd = fromdd.substr(0, 4) + '년' + ' ' + fromdd.substr(4, 2) + '월' + ' ' + fromdd.substr(6, 2) + '일';
  806. todd = todd.substr(0, 4) + '년' + ' ' + todd.substr(4, 2) + '월' + ' ' + todd.substr(6, 2) + '일';
  807. model.setValue("/root/hidden/fromtodd", fromdd + ' ~ ' + todd );
  808. exeReportPreview("RPSTP00801", "XMLSTR", "","", "false","","","","","false");
  809. ]]>
  810. </script>
  811. </button>
  812. </case>
  813. </switch>
  814. </group>
  815. </xhtml:body>
  816. </xhtml:html>