SMRPD02100_표준번표등록.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  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. <stndduttablelist/>
  11. </main>
  12. <send>
  13. <instcd/>
  14. <appym/>
  15. <deptcd/>
  16. <deptnm/>
  17. <stndduttablelist/>
  18. </send>
  19. <init/>
  20. <hidden/>
  21. <temp/>
  22. </root>
  23. </instance>
  24. <submission id="TRRPD02101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/stndduttablelist"/>
  25. <submission id="TXRPD02101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  26. </model>
  27. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  28. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  29. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  30. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  31. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  32. <script type="javascript" src="../../../mis/dligclaznsmngtweb/js/RPD001.js"/>
  33. <script type="javascript" ev:event="xforms-ready">
  34. <![CDATA[
  35. fInitialize();
  36. misfGridInit(grd_stndduttablelist);
  37. misfMsterDetailSet(grd_stndduttablelist,null,"TRRPD02101","N");
  38. //화면 권한 설정
  39. btn_search.disabled = !(checkAuth("R"));
  40. btn_save.disabled = !(checkAuth("X"));
  41. model.refresh();
  42. ]]>
  43. </script>
  44. <script type="javascript">
  45. <![CDATA[
  46. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  47. function fInitialize()
  48. {
  49. model.removeNodeset("/root/main/stndduttablelist");
  50. model.resetInstanceNode("/root/send");
  51. // misfComboComCdListMulti("Z0007","cmb_instcd");
  52. model.setValue("/root/send/appym", getCurrentDate().substr(0, 6));
  53. misfComboInstCdListMulti("cmb_instcd",getCurrentDate().substr(0, 8),"","Y");
  54. misfGetAndSetUserInfo();
  55. misfGetUserAuth();
  56. rpdfSetControlAuth();
  57. rpdfComboCdList(cmb_dutplce); // 권한별 근무부서 세팅
  58. rpdfSetDutUnitCombo();
  59. model.setValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  60. model.setValue("/root/send/deptcd", DUT_UNIT_CD);
  61. model.setValue("/root/send/deptnm", DUT_UNIT_NM);
  62. model.refresh();
  63. if (cmb_dutplce.value == "")
  64. {
  65. cmb_dutplce.select(0);
  66. }
  67. if(cmb_dutplce.length == 1)
  68. {
  69. //rpdfSetControlByJobRespCd("ipt_appym,cmb_dutplce,btn_search,btn_save,btn_clear,btn_duttablecopy,btn_grdadd,btn_grddel,btn_excsave,btn_excadd");
  70. }
  71. }
  72. function fAddRow()
  73. {
  74. var appym = model.getValue("/root/send/appym");
  75. if(appym == "")
  76. {
  77. messageBox("적용년월을","C002");
  78. }
  79. else
  80. {
  81. //행추가를 누를시 근무년월을 입력한다.
  82. misfGridIUD(grd_stndduttablelist, "A");
  83. grd_stndduttablelist.editCell();
  84. model.refresh();
  85. }
  86. }
  87. function fRetrieve()
  88. {
  89. if(ipt_appym.value == "")
  90. {
  91. messageBox("적용년월을","C002");
  92. return;
  93. }
  94. misfMsterDetailRetrieve();
  95. }
  96. function fLoadExcel()
  97. {
  98. if(grd_stndduttablelist.row < 1)
  99. {
  100. var ret = messageBox("중복된 자료가 존재할 수 있습니다. 먼저 조회를 해주시기 바랍니다.","Q003");
  101. if (ret != 6) { // not OK
  102. return;
  103. }
  104. }
  105. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  106. grd_stndduttablelist.loadExcel(fileName);
  107. model.removenode("/root/main/stndduttablelist[1]");
  108. model.removenode("/root/main/stndduttablelist[1]");
  109. grd_stndduttablelist.rebuild();
  110. for(var i = 2 ; i < grd_stndduttablelist.rows; i++)
  111. {
  112. grd_stndduttablelist.addStatus(i,"insert");
  113. }
  114. model.refresh();
  115. }
  116. function fSave()
  117. {
  118. var updtdata = getGridUpdateData(grd_stndduttablelist);
  119. if (updtdata == "" ) {
  120. messageBox("변경된 데이터가","I004");
  121. return;
  122. }
  123. var null_check1 = "";
  124. var null_chech2 = "";
  125. for(var i = 1 ; i < grd_stndduttablelist.rows-1 ; i++)
  126. {
  127. null_check1 = model.getValue(grd_stndduttablelist.attribute("nodeset")+"[" + i + "]/appym");
  128. null_check2 = model.getValue(grd_stndduttablelist.attribute("nodeset")+"[" + i + "]/deptcd");
  129. if(null_check1 =="")
  130. {
  131. messageBox("적용년월","I003");
  132. return;
  133. }
  134. else if(null_check2 == "")
  135. {
  136. messageBox("부서코드","I003");
  137. return;
  138. }
  139. }
  140. misfSave("TXRPD02101");
  141. }
  142. function fReset()
  143. {
  144. var updtdata = getGridUpdateData(grd_stndduttablelist);
  145. if (updtdata != "")
  146. {
  147. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  148. if (ret != 6) // not OK
  149. {
  150. return;
  151. }
  152. }
  153. fInitialize();
  154. }
  155. ]]>
  156. </script>
  157. </xhtml:head>
  158. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  159. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  160. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">표준번표 관리</caption>
  161. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  162. </group>
  163. <group id="group3" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  164. <line id="line2" class="line_1" style="x1:0px; y1:68px; x2:1195px; y2:68px; "/>
  165. <group id="group4" style="left:0px; top:10px; width:1195; height:35px; vertical-align:top; ">
  166. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  167. <caption id="caption5" class="search_name" style="left:270px; top:9px; width:86px; height:17px; ">적용년월 :</caption>
  168. <line id="line3" class="line_4" style="x1:1110px; y1:7px; x2:1110px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  169. <caption id="caption1" class="search_name" style="left:482px; top:9px; width:125px; height:17px; ">관리부서 :</caption>
  170. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1125px; top:7px; width:56px; height:22px; text-align:left; ">
  171. <caption>조회</caption>
  172. <script type="javascript" ev:event="DOMActivate">
  173. <![CDATA[
  174. fRetrieve();
  175. ]]>
  176. </script>
  177. </button>
  178. <button id="btn_dutdept" class="icon_search" visibility="visible" style="left:659px; top:10px; width:16px; height:16px; ">
  179. <caption/>
  180. <script type="javascript" ev:event="DOMActivate">
  181. <![CDATA[
  182. // misfOpenPopUpList("02", ipt_dutdeptcd, "", "deptcd,deptnm", cmb_instcd.value, "instcd");
  183. misfOpenPopUpList("02", ipt_dutdeptcd,"","deptcd,deptnm", cmb_instcd.value + "," + ipt_appym.value+"31", "instcd,basedd");
  184. ]]>
  185. </script>
  186. </button>
  187. <input id="ipt_appym" ref="/root/send/appym" class="input_s_essential" navindex="1" inputtype="date" format="yyyy-mm" style="left:355px; top:8px; width:100px; height:19px; text-align:center; ">
  188. <script type="javascript" ev:event="xforms-value-changed">
  189. <![CDATA[
  190. var instcd = cmb_instcd.value;
  191. if( getStringLength(ipt_appym.value) == "6" ) {
  192. model.removeNodeset(cmb_instcd.attribute("ref"));
  193. model.makeNode("/root/send/instcd");
  194. misfComboInstCdListMulti("cmb_instcd",ipt_appym.value+"31","","N");
  195. cmb_instcd.value = instcd;
  196. model.refresh();
  197. }
  198. btn_search.dispatch("DOMActivate");
  199. ]]>
  200. </script>
  201. </input>
  202. <input id="ipt_dutdeptcd" ref="/root/send/deptcd" class="input_search" navindex="2" visibility="visible" maxlength="10" style="left:574px; top:8px; width:80px; height:19px; ">
  203. <script type="javascript" ev:event="xforms-value-changed">
  204. <![CDATA[
  205. misfValidationCheck("02", "", "deptcd,deptnm", cmb_instcd.value, "instcd");
  206. model.refresh();
  207. ]]>
  208. </script>
  209. <script type="javascript" ev:event="onkeypress">
  210. <![CDATA[
  211. if(event.keyCode == 13)
  212. {
  213. ipt_dutdeptcd.value = ipt_dutdeptcd.currentText;
  214. misfValidationCheck("02", "", "deptcd,deptnm", cmb_instcd.value, "instcd");
  215. model.refresh();
  216. }
  217. ]]>
  218. </script>
  219. </input>
  220. <input id="ipt_dutdeptnm" ref="/root/send/deptnm" class="input_search" navindex="3" visibility="visible" style="left:680px; top:8px; width:132px; height:19px; ">
  221. <script type="javascript" ev:event="xforms-value-changed">
  222. <![CDATA[
  223. misfValidationCheck("02", "", "deptcd,deptnm", cmb_instcd.value, "instcd");
  224. model.refresh();
  225. ]]>
  226. </script>
  227. <script type="javascript" ev:event="onkeypress">
  228. <![CDATA[
  229. if(event.keyCode == 13)
  230. {
  231. ipt_dutdeptnm.value = ipt_dutdeptnm.currentText;
  232. misfValidationCheck("02", "", "deptcd,deptnm", cmb_instcd.value, "instcd");
  233. model.refresh();
  234. }
  235. ]]>
  236. </script>
  237. </input>
  238. <select1 id="cmb_dutplce" ref="/root/send/deptcd" class="combo_s_essential" visibility="visible" appearance="minimal" style="left:572px; top:8px; width:240px; height:19px; ">
  239. <choices>
  240. <itemset>
  241. <label/>
  242. <value/>
  243. </itemset>
  244. </choices>
  245. <script type="javascript" ev:event="xforms-value-changed">
  246. <![CDATA[
  247. model.setValue("/root/send/deptnm", cmb_dutplce.label);
  248. ]]>
  249. </script>
  250. </select1>
  251. <select1 id="cmb_instcd" ref="/root/send/instcd" class="combo_search" navindex="1" appearance="minimal" style="left:100px; top:8px; width:145px; height:19px; ">
  252. <choices>
  253. <itemset>
  254. <label/>
  255. <value/>
  256. </itemset>
  257. </choices>
  258. </select1>
  259. <caption id="caption3" class="search_name" style="left:10px; top:9px; width:86px; height:17px; ">소속기관 :</caption>
  260. </group>
  261. <caption id="caption8" class="tit_2" style="left:5px; top:54px; width:165px; height:13px; ">부서별 표준번표</caption>
  262. <button id="btn_grddel" class="btn2_letter3" style="left:1010px; top:47px; width:53px; height:19px; ">
  263. <caption>행삭제</caption>
  264. <script type="javascript" ev:event="DOMActivate">
  265. <![CDATA[
  266. misfGridIUD(grd_stndduttablelist,"D");
  267. model.refresh();
  268. ]]>
  269. </script>
  270. </button>
  271. <button id="btn_grdadd" class="btn2_letter3" style="left:955px; top:47px; width:53px; height:19px; ">
  272. <caption>행추가</caption>
  273. <script type="javascript" ev:event="DOMActivate">
  274. <![CDATA[
  275. fAddRow();
  276. ]]>
  277. </script>
  278. </button>
  279. <button id="btn_excadd" class="btn2_letter4" style="left:1131px; top:47px; width:64px; height:19px; text-align:left; ">
  280. <caption>엑셀입력</caption>
  281. <script type="javascript" ev:event="DOMActivate">
  282. <![CDATA[
  283. fLoadExcel()
  284. ]]>
  285. </script>
  286. </button>
  287. <button id="btn_duttablecopy" class="btn2_letter5" visibility="hidden" style="left:878px; top:47px; width:75px; height:19px; text-align:left; ">
  288. <caption>번표COPY</caption>
  289. </button>
  290. <datagrid id="grd_stndduttablelist" nodeset="/root/main/stndduttablelist" class="text_center" caption="기관코드^근무년월^부서코드^부서명^월^월^월^화^화^화^수^수^수^목^목^목^금^금^금^토^토^토^일^일^일^밤근무&#xA;연속제한일수^밤근무&#xA;월제한일수^최초등록자ID^최초등록일시^최종등록자ID^최종등록일시^밤근무월제한일수|기관코드^근무년월^부서코드^부서명^D^E^N^D^E^N^D^E^N^D^E^N^D^E^N^D^E^N^D^E^N^밤근무&#xA;연속제한일수^밤근무&#xA;월제한일수^최초등록자ID^최초등록일시^최종등록자ID^최종등록일시^밤근무월제한일수" colsep="^" colwidth="57, 65, 90, 120, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 105" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:73px; width:1195px; height:662px; focus-rect:visible; ">
  291. <col ref="instcd" visibility="hidden"/>
  292. <col ref="appym" format="yyyy-mm"/>
  293. <col disabled="true" ref="deptcd" type="inputbutton"/>
  294. <col disabled="true" ref="deptnm" type="input"/>
  295. <col ref="mondaypsncnt" type="input"/>
  296. <col ref="moneveningpsncnt" type="input"/>
  297. <col ref="monnightpsncnt" type="input"/>
  298. <col ref="tuesdaypsncnt" type="input"/>
  299. <col ref="tueseveningpsncnt" type="input"/>
  300. <col ref="tuesnightpsncnt" type="input"/>
  301. <col ref="weddaypsncnt" type="input"/>
  302. <col ref="wedeveningpsncnt" type="input"/>
  303. <col ref="wednightpsncnt" type="input"/>
  304. <col ref="thurdaypsncnt" type="input"/>
  305. <col ref="thureveningpsncnt" type="input"/>
  306. <col ref="thurnightpsncnt" type="input"/>
  307. <col ref="fridaypsncnt" type="input"/>
  308. <col ref="frieveningpsncnt" type="input"/>
  309. <col ref="frinightpsncnt" type="input"/>
  310. <col ref="satdaypsncnt" type="input"/>
  311. <col ref="sateveningpsncnt" type="input"/>
  312. <col ref="satnightpsncnt" type="input"/>
  313. <col ref="sundaypsncnt" type="input"/>
  314. <col ref="suneveningpsncnt" type="input"/>
  315. <col ref="sunnightpsncnt" type="input"/>
  316. <col ref="nightdutcontlimdayno" type="input"/>
  317. <col ref="nightdutmmlimdayno" type="input"/>
  318. <script type="javascript" ev:event="onbuttonclick">
  319. <![CDATA[
  320. if(grd_stndduttablelist.col == grd_stndduttablelist.colRef("deptcd"))
  321. {
  322. misfOpenPopUpList("02", grd_stndduttablelist, "", "deptcd,deptnm");
  323. }
  324. ]]>
  325. </script>
  326. <script type="javascript" ev:event="oncopy">
  327. <![CDATA[
  328. grid_oncopy();
  329. ]]>
  330. </script>
  331. <script type="javascript" ev:event="xforms-value-changed">
  332. <![CDATA[
  333. if(grd_stndduttablelist.col == grd_stndduttablelist.colRef("deptcd") || grd_stndduttablelist.col == grd_stndduttablelist.colRef("deptnm"))
  334. {
  335. misfValidationCheck("02", "", "deptcd,deptnm" );
  336. model.refresh();
  337. }
  338. ]]>
  339. </script>
  340. <script type="javascript" ev:event="DOMFocusIn">
  341. <![CDATA[
  342. // if(event.keyCode == '9') {
  343. // if(grd_stndduttablelist.colDisabled(grd_stndduttablelist.col) == false) {
  344. // grd_stndduttablelist.editCell();
  345. // } else {
  346. //
  347. // grd_stndduttablelist.endEditCell();
  348. // }
  349. //
  350. // }
  351. ]]>
  352. </script>
  353. </datagrid>
  354. <button id="btn_excsave" class="btn2_letter4" style="left:1065px; top:47px; width:64px; height:19px; ">
  355. <caption>엑셀저장</caption>
  356. <script type="javascript" ev:event="DOMActivate">
  357. <![CDATA[
  358. grp1.visible = true;
  359. // misfSaveExcel(grd_stndduttablelist);
  360. ]]>
  361. </script>
  362. </button>
  363. </group>
  364. <group id="group5" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  365. <line id="line75" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  366. <button id="btn_save" class="btn4_letter2" style="left:1069px; top:3px; width:56px; height:22px; ">
  367. <caption>저장</caption>
  368. <script type="javascript" ev:event="DOMActivate">
  369. <![CDATA[
  370. fSave();
  371. ]]>
  372. </script>
  373. </button>
  374. <button id="btn_clear" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  375. <caption>초기화</caption>
  376. <script type="javascript" ev:event="DOMActivate">
  377. <![CDATA[
  378. fReset();
  379. ]]>
  380. </script>
  381. </button>
  382. </group>
  383. </xhtml:body>
  384. </xhtml:html>