SMRTS02900_당직비기준정보관리.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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. <ngdtamt>
  11. <ngdtamtlist>
  12. </ngdtamtlist>
  13. </ngdtamt>
  14. </main>
  15. <hidden>
  16. </hidden>
  17. <temp>
  18. </temp>
  19. <init/>
  20. <send>
  21. <req>
  22. <instcd/>
  23. <appym/>
  24. <sdeptcd/>
  25. </req>
  26. <save>
  27. <ngdtamtlist/>
  28. </save>
  29. </send>
  30. <tempamt>
  31. <ngdtamt/>
  32. <holingdtamt/>
  33. </tempamt>
  34. </root>
  35. </instance>
  36. <script type="javascript" ev:event="xforms-ready">
  37. <![CDATA[
  38. //사용자 권한
  39. fCheckAuth();
  40. misfGridInit(grd_ngdtamtlist);
  41. misfMsterDetailSet(grd_ngdtamtlist, null, "TRRTS02901", "Y");
  42. rszfGetLabelControlComboList("R0314", "cmb_instcd", "detldesc");
  43. misfComboComCdListMulti("R0234,R0234", "cmb_deptcd,grd_ngdtamtlist.deptcd");
  44. var dutplceinstcd = getUserInfo("dutplceinstcd");
  45. model.setValue("/root/send/req/instcd", dutplceinstcd);
  46. addComboItem( "cmb_deptcd", "전체", "", "above");
  47. model.setValue(cmb_deptcd.attribute("ref"), "");
  48. var today = getCurrentDate();
  49. var cur_yymm = parseInt(today.substring(0,6));
  50. model.setValue("/root/send/req/appym", cur_yymm);
  51. if (dutplceinstcd == "001" && getUserInfo("dutplcecd") == "4110100000") {
  52. cmb_instcd.disabled = false;
  53. }else{
  54. cmb_instcd.disabled = true;
  55. }
  56. model.refresh();
  57. ]]>
  58. </script>
  59. <submission id="TRRTS02901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" resultref="/root/main/ngdtamt"/>
  60. <submission id="TXRTS02901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  61. </model>
  62. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  63. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  66. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  67. <script type="javascript" src="../../../mis/tistrngeducplanmngtweb/js/SMRTS00600.js"/>
  68. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  69. <script type="javascript">
  70. <![CDATA[
  71. function fCheckSaveData()
  72. {
  73. for(var currow = grd_ngdtamtlist.fixedRows ; currow < grd_ngdtamtlist.rows ; currow++)
  74. {
  75. if(grd_ngdtamtlist.valueMatrix(currow , grd_ngdtamtlist.colRef("instcd")).length == 0)
  76. {
  77. messageBox(currow + " 번째 근무 병원을 " ,"C001");
  78. grd_ngdtamtlist.row = currow;
  79. grd_ngdtamtlist.col= grd_ngdtamtlist.colRef("instcd");
  80. return false;
  81. }
  82. else
  83. {
  84. for(srcrow = currow + 1 ; srcrow < grd_ngdtamtlist.rows ; srcrow++)
  85. {
  86. if(grd_ngdtamtlist.valueMatrix(currow , grd_ngdtamtlist.colRef("instcd")) == grd_ngdtamtlist.valueMatrix(srcrow , grd_ngdtamtlist.colRef("instcd")))
  87. {
  88. messageBox("동일 근무병원이 [" + (currow - grd_ngdtamtlist.fixedRows + 1)+ "," + (srcrow - grd_ngdtamtlist.fixedRows + 1)+ "->" + grd_ngdtamtlist.valueMatrix(currow , grd_ngdtamtlist.colRef("instcd")) + "] 존재하여 저장 " ,"E001");
  89. return false;
  90. }
  91. }
  92. }
  93. }
  94. }
  95. ]]>
  96. </script>
  97. </xhtml:head>
  98. <xhtml:body>
  99. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  100. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">당직비 기준 등록</caption>
  101. </group>
  102. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  103. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:5px; width:1195px; height:36px; background-color:#fffbf2; border-color:#ffd799; "/>
  104. <datagrid id="grd_ngdtamtlist" nodeset="/root/main/ngdtamt/ngdtamtlist" caption="임상과^평일당직비^휴일당직비^적용일자^instcd^olddeptcd^oldappdd|임상과^평일당직비^휴일당직비^적용일자^instcd^olddeptcd^oldappdd" colsep="^" colwidth="279, 254, 245, 163, 100, 100, 100" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:70px; width:1190px; height:670px; ">
  105. <col ref="deptcd" type="combo">
  106. <choices>
  107. <itemset>
  108. <label/>
  109. <value/>
  110. </itemset>
  111. </choices>
  112. </col>
  113. <col ref="ngdtamt" type="input" format="#,###" style="text-align:right; "/>
  114. <col ref="holingdtamt" type="input" format="#,###" style="text-align:right; "/>
  115. <col ref="appdd" type="inputdate"/>
  116. <col ref="instcd" visibility="hidden"/>
  117. <col ref="olddeptcd" visibility="hidden"/>
  118. <col ref="oldappdd" visibility="hidden"/>
  119. </datagrid>
  120. <button id="btn_search" class="btn1_letter2" style="left:1130px; top:12px; width:56px; height:22px; text-align:left; ">
  121. <caption>조회</caption>
  122. <script type="javascript" ev:event="DOMActivate">
  123. <![CDATA[
  124. submit("TRRTS02901");
  125. model.refresh();
  126. ]]>
  127. </script>
  128. </button>
  129. <line id="line82" class="line_4" style="x1:1115px; y1:10px; x2:1115px; y2:36px; border-color:#ffe4bb; border-left-style:solid; "/>
  130. <caption id="caption5" class="tit_2" style="left:5px; top:48px; width:140px; height:15px; font-size:10pt; ">당직비</caption>
  131. <line id="line1" class="line_1" style="x1:0px; y1:65px; x2:1190px; y2:66px; "/>
  132. <select1 id="cmb_instcd" ref="/root/send/req/instcd" class="combo_s_essential" disabled="false" appearance="minimal" style="left:287px; top:15px; width:148px; height:19px; ">
  133. <choices>
  134. <itemset>
  135. <label/>
  136. <value/>
  137. </itemset>
  138. </choices>
  139. </select1>
  140. <caption id="cap_instcd" class="search_name" style="left:201px; top:15px; width:94px; height:17px; ">근무병원 :</caption>
  141. <button id="btn_insert" class="btn2_letter3" style="left:1004px; top:43px; width:53px; height:19px; ">
  142. <caption>행추가</caption>
  143. <script type="javascript" ev:event="DOMActivate">
  144. <![CDATA[
  145. if(!isRequiredControls("cmb_instcd"))return;
  146. misfGridIUD(grd_ngdtamtlist, "A");
  147. // grd_ngdtamtlist.addRow();
  148. // model.setValue(grd_ngdtamtlist.nodeset +"[" + (grd_ngdtamtlist.rows - grd_ngdtamtlist.fixedRows) + "]/instcd" ,model.getValue(cmb_instcd.attribute("ref")));
  149. ]]>
  150. </script>
  151. </button>
  152. <button id="button2" class="btn2_letter3" style="left:1061px; top:43px; width:53px; height:19px; ">
  153. <caption>행삭제</caption>
  154. <script type="javascript" ev:event="DOMActivate">
  155. <![CDATA[
  156. misfGridIUD(grd_ngdtamtlist, "D");
  157. // grd_ngdtamtlist.rowStatus(grd_ngdtamtlist.row) = "4";
  158. // grd_ngdtamtlist.row += 1;
  159. ]]>
  160. </script>
  161. </button>
  162. <input id="ipt_appym" ref="/root/send/req/appym" inputtype="date" format="yyyy-mm" style="left:70px; top:15px; width:100px; height:19px; "/>
  163. <caption id="cap_yy" class="search_name" style="left:10px; top:15px; width:60px; height:17px; ">년월 :</caption>
  164. <select1 id="cmb_deptcd" ref="/root/send/req/sdeptcd" class="combo_s_essential" disabled="false" appearance="minimal" style="left:543px; top:15px; width:148px; height:19px; ">
  165. <choices>
  166. <itemset>
  167. <label/>
  168. <value/>
  169. </itemset>
  170. </choices>
  171. </select1>
  172. <caption id="caption1" class="search_name" style="left:469px; top:15px; width:74px; height:17px; ">임상과 :</caption>
  173. <button id="button1" class="btn2_letter5" style="left:1115px; top:43px; width:67px; height:19px; ">
  174. <caption>excel저장</caption>
  175. <script type="javascript" ev:event="DOMActivate">
  176. <![CDATA[
  177. grd_ngdtamtlist.rowStatus(grd_ngdtamtlist.row) = "4";
  178. grd_ngdtamtlist.row += 1;
  179. ]]>
  180. </script>
  181. </button>
  182. <button id="button3" class="btn5_letter4" style="left:465px; top:43px; width:64px; height:19px; ">
  183. <caption>일괄생성</caption>
  184. <script type="javascript" ev:event="DOMActivate">
  185. <![CDATA[
  186. model.removeNodeset(grd_ngdtamtlist.nodeset);
  187. model.refresh();
  188. var today = getCurrentDate();
  189. var cur_yymm = today.substring(0,6);
  190. var cur_yymmdd = cur_yymm+'01';
  191. for(var i=1; i<=model.instance1.selectNodes("/root/init/comcd/R02340/R02340").length; i++){
  192. var deptcd = model.getValue("/root/init/comcd/R02340/R02340["+i+"]/cdid");
  193. if (deptcd != "" && deptcd != "AH" && deptcd != "TB" && deptcd != "HS" ) {
  194. grd_ngdtamtlist.addRow();
  195. model.setValue(
  196. grd_ngdtamtlist.nodeset +"[" + (grd_ngdtamtlist.rows - grd_ngdtamtlist.fixedRows) + "]/deptcd",
  197. model.getValue("/root/init/comcd/R02340/R02340["+i+"]/cdid")
  198. );
  199. model.setValue(
  200. grd_ngdtamtlist.nodeset +"[" + (grd_ngdtamtlist.rows - grd_ngdtamtlist.fixedRows) + "]/ngdtamt",
  201. model.getValue("/root/tempamt/ngdtamt")
  202. );
  203. model.setValue(
  204. grd_ngdtamtlist.nodeset +"[" + (grd_ngdtamtlist.rows - grd_ngdtamtlist.fixedRows) + "]/holingdtamt",
  205. model.getValue("/root/tempamt/holingdtamt")
  206. );
  207. model.setValue(
  208. grd_ngdtamtlist.nodeset +"[" + (grd_ngdtamtlist.rows - grd_ngdtamtlist.fixedRows) + "]/appdd",
  209. cur_yymmdd
  210. );
  211. model.setValue(grd_ngdtamtlist.nodeset +"[" + (grd_ngdtamtlist.rows - grd_ngdtamtlist.fixedRows) + "]/instcd" ,model.getValue(cmb_instcd.attribute("ref")));
  212. }
  213. }
  214. // grd_ngdtamtlist.addRow();
  215. // model.setValue(grd_ngdtamtlist.nodeset +"[" + (grd_ngdtamtlist.rows - grd_ngdtamtlist.fixedRows) + "]/instcd" ,model.getValue(cmb_instcd.attribute("ref")));
  216. ]]>
  217. </script>
  218. </button>
  219. <caption id="caption2" class="search_name" style="left:90px; top:44px; width:94px; height:17px; ">평일당직비:</caption>
  220. <input id="input2" ref="/root/tempamt/ngdtamt" format="#,###" style="left:185px; top:43px; width:85px; height:19px; "/>
  221. <caption id="caption3" class="search_name" style="left:275px; top:44px; width:94px; height:17px; ">휴일당직비:</caption>
  222. <input id="input3" ref="/root/tempamt/holingdtamt" format="#,###" style="left:370px; top:43px; width:85px; height:19px; "/>
  223. <caption id="caption4" style="left:550px; top:45px; width:425px; height:20px; font-weight:bold; color:#ff0000; ">※일괄 생성시 당직비 틀린 임상과는 개별 수정 해야 합니다.</caption>
  224. </group>
  225. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  226. <button id="btn_save" class="btn4_letter2" style="left:1130px; top:3px; width:56px; height:22px; text-align:left; ">
  227. <caption>저장</caption>
  228. <script type="javascript" ev:event="DOMActivate">
  229. <![CDATA[
  230. misfSave("TXRTS02901");
  231. btn_search.dispatch("DOMActivate");
  232. model.refresh();
  233. // fCheckSaveData();
  234. // var retMes = messageBox("", "Q002");
  235. // if ( retMes != 6) {
  236. // return;
  237. // }
  238. //
  239. // model.setValue("/root/send/save/ngdtamtlist", grd_ngdtamtlist.getUpdateData());
  240. // submit("TXRTS02901");
  241. //
  242. // model.removenode("/root/main/ngdtamt");
  243. //
  244. // submit("TRRTS02901");
  245. //
  246. // grd_ngdtamtlist.clearStatus();
  247. // model.refresh();
  248. ]]>
  249. </script>
  250. </button>
  251. </group>
  252. </xhtml:body>
  253. </xhtml:html>