SMPMB01301_응급당직의관리.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <h_edoc>
  11. <edoc>
  12. <basedd/>
  13. <dorddrid/>
  14. <eorddrid/>
  15. <norddrid/>
  16. <dorddrnm/>
  17. <eorddrnm/>
  18. <norddrnm/>
  19. <fstrgstrid/>
  20. <fstrgstrnm/>
  21. <fstrgstdt/>
  22. <lastupdtrid/>
  23. <lastupdtrnm/>
  24. <lastupdtdt/>
  25. </edoc>
  26. </h_edoc>
  27. <userpopupinfo>
  28. <param/>
  29. </userpopupinfo>
  30. <oneselect>
  31. </oneselect>
  32. <temp/>
  33. <temp_edoc>
  34. <edoc/>
  35. </temp_edoc>
  36. </main>
  37. <send>
  38. <data1/>
  39. <data2/>
  40. </send>
  41. <init/>
  42. <hidden>
  43. <con>
  44. <year/>
  45. <month/>
  46. </con>
  47. <rcv/>
  48. </hidden>
  49. </root>
  50. </instance>
  51. <script type="javascript" ev:event="xforms-ready">
  52. <![CDATA[
  53. fInit();
  54. ]]>
  55. </script>
  56. <submission id="TRPMB01331" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/h_edoc"/>
  57. <submission id="TXPMB01331" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/rcv"/>
  58. </model>
  59. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  60. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  62. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  63. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  66. <script type="javascript">
  67. <![CDATA[
  68. function fInit(){
  69. today = new Date();
  70. var ls_today, ls_year, ls_month, ls_day;
  71. ls_year = (today.getYear()).toString();
  72. ls_month = (today.getMonth() + 1).toString();
  73. if ((ls_month.toString()).length == 1) ls_month = ("0".concat(ls_month.toString()));
  74. ls_day = (today.getDate()).toString();
  75. ls_today = ((ls_year.concat(ls_month)).concat(ls_day));
  76. var s_year = ls_today.substr(0,4);
  77. var s_month = ls_today.substr(4,2);
  78. model.setValue("/root/hidden/con/year",s_year);
  79. model.setValue("/root/hidden/con/month",s_month);
  80. model.removeNodeset("/root/main/h_edoc/edoc");
  81. model.refresh();
  82. // 조회전용 제어
  83. if (opener.javascript.getParameter("SMPMB01301_param") == "PAM") {
  84. button1.visible = false;
  85. button2.visible = false;
  86. button3.visible = false;
  87. btn_save.visible = false;
  88. }
  89. }
  90. function fSelect(){
  91. //해당 테이블에 데이터가 없으면 병원달력 데이터 조회
  92. var year_q = model.getValue("/root/hidden/con/year");
  93. var month_q = model.getValue("/root/hidden/con/month");
  94. if (year_q == null || year_q == "" || year_q == " " || year_q == "-")
  95. {
  96. messageBox("조회 년도를 정확히 선택하십시요!","E999","");
  97. return false;
  98. }
  99. if (month_q == null || month_q == "" || month_q == " " || month_q == "-")
  100. {
  101. messageBox("조회 월을 정확히 선택하십시요!","E999","");
  102. return false;
  103. }
  104. model.removeNodeset("/root/main/h_edoc/edoc");
  105. model.removenode("/root/send/data1");
  106. model.removenode("/root/send/data2");
  107. model.makeNode("/root/send/data1");
  108. model.makeNode("/root/send/data2");
  109. model.setValue("/root/send/data1",model.getValue("/root/hidden/con/year"));
  110. model.setValue("/root/send/data2",model.getValue("/root/hidden/con/month"));
  111. submit("TRPMB01331");
  112. }
  113. function fSave(){
  114. if (getNodesetCount("/root/main/h_edoc/edoc") < 1)
  115. {
  116. messageBox("저장할 내역이 미존재합니다!","E999","");
  117. return false;
  118. }
  119. model.removenode("/root/send/data1");
  120. model.removenode("/root/send/data2");
  121. model.makeNode("/root/send/data1");
  122. model.makeNode("/root/send/data2");
  123. model.copyNode("/root/send/data1","/root/hidden");
  124. model.setValue("/root/send/data2", datagrid1.getUpdateData());
  125. if (submit("TXPMB01331")) fSelect();
  126. }
  127. ]]>
  128. </script>
  129. </xhtml:head>
  130. <xhtml:body>
  131. <datagrid id="datagrid1" nodeset="/root/main/h_edoc/edoc" class="datagrid1" caption="일자^Day^Evening^Night^Day당직의명^Evening당직의명^Night당직의명^최초등록자^최초등록일시^입력자^입력일시" colsep="^" colwidth="85, 85, 85, 85, 100, 100, 100, 80, 156, 90, 151" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:41px; width:1110px; height:739px; ">
  132. <col key="true" ref="basedd" format="yyyy-mm-dd"/>
  133. <col key="true" ref="dorddrid" type="inputbutton"/>
  134. <col key="true" ref="eorddrid" type="inputbutton"/>
  135. <col key="true" ref="norddrid" type="inputbutton"/>
  136. <script type="javascript" ev:event="onbuttonclick">
  137. <![CDATA[
  138. datagrid1.dispatch("ondblclick");
  139. ]]>
  140. </script>
  141. <col key="true" ref="dorddrnm"/>
  142. <col key="true" ref="eorddrnm"/>
  143. <col key="true" ref="norddrnm"/>
  144. <col key="true" ref="fstrgstrnm" visibility="hidden"/>
  145. <col key="true" ref="fstrgstdt" visibility="hidden" format="yyyy-mm-dd hh:mm:ss"/>
  146. <col key="true" ref="lastupdtrnm"/>
  147. <col key="true" ref="lastupdtdt" format="yyyy-mm-dd hh:mm:ss"/>
  148. <script type="javascript" ev:event="ondblclick">
  149. <![CDATA[
  150. model.resetInstanceNode("/root/main/userpopupinfo");
  151. model.removeNodeset("/root/main/oneselect");
  152. model.makeNode("/root/main/oneselect");
  153. model.setValue("/root/main/userpopupinfo/param", "_OneS");
  154. modal("../../userdeptinfoweb/xrw/SPZSU10103_사용자부서선택조회", "", "200", "200", "SPZSU10103","/root/main/userpopupinfo","/root/main/temp");
  155. var iParam = getParameter("SPZSU10103_");
  156. setCSVToNode("/root/main/oneselect", iParam);
  157. clearParameter("SPZSU10103_");
  158. if (model.getValue("/root/main/oneselect/list/userid") == "" ||
  159. model.getValue("/root/main/oneselect/list/userid") == null ||
  160. model.getValue("/root/main/oneselect/list/userid") == " ") return;
  161. var corrow = datagrid1.row;
  162. var curcol = datagrid1.col;
  163. if (curcol == 2){
  164. model.setValue("/root/main/h_edoc/edoc["+ corrow +"]/dorddrid",model.getValue("/root/main/oneselect/list/userid"));
  165. model.setValue("/root/main/h_edoc/edoc["+ corrow +"]/dorddrnm",model.getValue("/root/main/oneselect/list/usernm"));
  166. }
  167. else if (curcol == 3){
  168. model.setValue("/root/main/h_edoc/edoc["+ corrow +"]/eorddrid",model.getValue("/root/main/oneselect/list/userid"));
  169. model.setValue("/root/main/h_edoc/edoc["+ corrow +"]/eorddrnm",model.getValue("/root/main/oneselect/list/usernm"));
  170. }
  171. else if (curcol == 4){
  172. model.setValue("/root/main/h_edoc/edoc["+ corrow +"]/norddrid",model.getValue("/root/main/oneselect/list/userid"));
  173. model.setValue("/root/main/h_edoc/edoc["+ corrow +"]/norddrnm",model.getValue("/root/main/oneselect/list/usernm"));
  174. }
  175. datagrid1.rowStatus(corrow) = 2;
  176. model.refresh();
  177. ]]>
  178. </script>
  179. </datagrid>
  180. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:130px; height:13px; ">응급당직의관리</caption>
  181. <select1 id="cmb_month1" ref="/root/hidden/con/month" appearance="minimal" style="left:210px; top:20px; width:65px; height:19px; ">
  182. <choices>
  183. <item>
  184. <label>01</label>
  185. <value>01</value>
  186. </item>
  187. <item>
  188. <label>02</label>
  189. <value>02</value>
  190. </item>
  191. <item>
  192. <label>03</label>
  193. <value>03</value>
  194. </item>
  195. <item>
  196. <label>04</label>
  197. <value>04</value>
  198. </item>
  199. <item>
  200. <label>05</label>
  201. <value>05</value>
  202. </item>
  203. <item>
  204. <label>06</label>
  205. <value>06</value>
  206. </item>
  207. <item>
  208. <label>07</label>
  209. <value>07</value>
  210. </item>
  211. <item>
  212. <label>08</label>
  213. <value>08</value>
  214. </item>
  215. <item>
  216. <label>09</label>
  217. <value>09</value>
  218. </item>
  219. <item>
  220. <label>10</label>
  221. <value>10</value>
  222. </item>
  223. <item>
  224. <label>11</label>
  225. <value>11</value>
  226. </item>
  227. <item>
  228. <label>12</label>
  229. <value>12</value>
  230. </item>
  231. </choices>
  232. <script type="javascript" ev:event="xforms-value-changed">
  233. <![CDATA[
  234. fSelect();
  235. ]]>
  236. </script>
  237. </select1>
  238. <select1 id="cmb_year1" ref="/root/hidden/con/year" appearance="minimal" style="left:115px; top:20px; width:70px; height:19px; ">
  239. <choices>
  240. <item>
  241. <label>2007</label>
  242. <value>2007</value>
  243. </item>
  244. <item>
  245. <label>2008</label>
  246. <value>2008</value>
  247. </item>
  248. <item>
  249. <label>2009</label>
  250. <value>2009</value>
  251. </item>
  252. <item>
  253. <label>2010</label>
  254. <value>2010</value>
  255. </item>
  256. <item>
  257. <label>2011</label>
  258. <value>2011</value>
  259. </item>
  260. <item>
  261. <label>2012</label>
  262. <value>2012</value>
  263. </item>
  264. <item>
  265. <label>2013</label>
  266. <value>2013</value>
  267. </item>
  268. <item>
  269. <label>2014</label>
  270. <value>2014</value>
  271. </item>
  272. <item>
  273. <label>2015</label>
  274. <value>2015</value>
  275. </item>
  276. <item>
  277. <label>2016</label>
  278. <value>2016</value>
  279. </item>
  280. <item>
  281. <label>2017</label>
  282. <value>2017</value>
  283. </item>
  284. <item>
  285. <label>2018</label>
  286. <value>2018</value>
  287. </item>
  288. <item>
  289. <label>2019</label>
  290. <value>2019</value>
  291. </item>
  292. <item>
  293. <label>2020</label>
  294. <value>2020</value>
  295. </item>
  296. <item>
  297. <label>2021</label>
  298. <value>2021</value>
  299. </item>
  300. <item>
  301. <label>2022</label>
  302. <value>2022</value>
  303. </item>
  304. <item>
  305. <label>2023</label>
  306. <value>2023</value>
  307. </item>
  308. <item>
  309. <label>2024</label>
  310. <value>2024</value>
  311. </item>
  312. <item>
  313. <label>2025</label>
  314. <value>2025</value>
  315. </item>
  316. <item>
  317. <label>2026</label>
  318. <value>2026</value>
  319. </item>
  320. <item>
  321. <label>2027</label>
  322. <value>2027</value>
  323. </item>
  324. <item>
  325. <label>2028</label>
  326. <value>2028</value>
  327. </item>
  328. <item>
  329. <label>2029</label>
  330. <value>2029</value>
  331. </item>
  332. <item>
  333. <label>2030</label>
  334. <value>2030</value>
  335. </item>
  336. </choices>
  337. <script type="javascript" ev:event="xforms-value-changed">
  338. <![CDATA[
  339. fSelect();
  340. ]]>
  341. </script>
  342. </select1>
  343. <caption id="caption2" style="left:185px; top:20px; width:15px; height:20px; ">년</caption>
  344. <caption id="caption3" style="left:280px; top:20px; width:15px; height:20px; ">월</caption>
  345. <button id="btn_save" class="btn4_letter2" style="left:1054px; top:18px; width:56px; height:22px; ">
  346. <caption>저장</caption>
  347. <script type="javascript" ev:event="onclick">
  348. <![CDATA[
  349. fSave();
  350. ]]>
  351. </script>
  352. </button>
  353. <button id="btn_search2" class="btn1_letter2" style="left:994px; top:18px; width:56px; height:22px; ">
  354. <caption>조회</caption>
  355. <script type="javascript" ev:event="onclick">
  356. <![CDATA[
  357. fSelect();
  358. ]]>
  359. </script>
  360. </button>
  361. <caption id="caption22" class="search_name" style="left:5px; top:20px; width:90px; height:17px; ">검색조건 :</caption>
  362. <button id="button1" class="btn2_letter4" style="left:760px; top:20px; width:64px; height:19px; ">
  363. <caption>내용복사</caption>
  364. <script type="javascript" ev:event="DOMActivate">
  365. <![CDATA[
  366. //var msg = datagrid1.selectedRow + " : " + datagrid1.selectedRows;
  367. //alert(msg);
  368. var iRows = datagrid1.selectedRows;
  369. for (var cnt = 0 ; cnt < iRows ; cnt++) {
  370. var idx = datagrid1.selectedRow(cnt);
  371. if (cnt == 0) {
  372. copyNodesetType("/root/main/temp_edoc/edoc", "/root/main/h_edoc/edoc[" + idx + "]", "replace");
  373. } else {
  374. copyNodesetType("/root/main/temp_edoc/edoc", "/root/main/h_edoc/edoc[" + idx + "]", "after");
  375. }
  376. }
  377. ]]>
  378. </script>
  379. </button>
  380. <button id="button2" class="btn2_letter5" style="left:826px; top:20px; width:75px; height:19px; ">
  381. <caption>내용붙이기</caption>
  382. <script type="javascript" ev:event="DOMActivate">
  383. <![CDATA[
  384. var iCount = getNodesetCount("/root/main/temp_edoc/edoc");
  385. if (iCount > 0) {
  386. var iRows = datagrid1.rows - datagrid1.fixedRows;
  387. var iCurrentIdx = datagrid1.row;
  388. for (var cnt = 0 ; cnt < iCount ; cnt++) {
  389. var iCopyIdx = iCurrentIdx + cnt;
  390. if (iCopyIdx <= iRows) {
  391. model.setValue("/root/main/h_edoc/edoc[" + iCopyIdx + "]/dorddrid", model.getValue("/root/main/temp_edoc/edoc[" + (cnt+1) +"]/dorddrid"));
  392. model.setValue("/root/main/h_edoc/edoc[" + iCopyIdx + "]/eorddrid", model.getValue("/root/main/temp_edoc/edoc[" + (cnt+1) +"]/eorddrid"));
  393. model.setValue("/root/main/h_edoc/edoc[" + iCopyIdx + "]/norddrid", model.getValue("/root/main/temp_edoc/edoc[" + (cnt+1) +"]/norddrid"));
  394. model.setValue("/root/main/h_edoc/edoc[" + iCopyIdx + "]/dorddrnm", model.getValue("/root/main/temp_edoc/edoc[" + (cnt+1) +"]/dorddrnm"));
  395. model.setValue("/root/main/h_edoc/edoc[" + iCopyIdx + "]/eorddrnm", model.getValue("/root/main/temp_edoc/edoc[" + (cnt+1) +"]/eorddrnm"));
  396. model.setValue("/root/main/h_edoc/edoc[" + iCopyIdx + "]/norddrnm", model.getValue("/root/main/temp_edoc/edoc[" + (cnt+1) +"]/norddrnm"));
  397. datagrid1.rowStatus(iCopyIdx) = 2; // update flag
  398. }
  399. }
  400. datagrid1.refresh();
  401. }
  402. ]]>
  403. </script>
  404. </button>
  405. <button id="button3" class="btn2_letter2" style="left:903px; top:20px; width:42px; height:19px; ">
  406. <caption>엑셀</caption>
  407. <script type="javascript" ev:event="DOMActivate">
  408. <![CDATA[
  409. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  410. datagrid1.saveExcel(file);
  411. ]]>
  412. </script>
  413. </button>
  414. </xhtml:body>
  415. </xhtml:html>