SMRPD04200_당직(인턴레지던트)수당등록.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  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. <list>
  11. <dutsumlist/>
  12. </list>
  13. </main>
  14. <send>
  15. <retrparams>
  16. <instcd/>
  17. <frdutym/>
  18. <dutunitcd/>
  19. <dutunitnm/>
  20. <retrflag>0510</retrflag>
  21. <emplno/>
  22. <emplnm/>
  23. <deptgb/>
  24. <gb/>
  25. </retrparams>
  26. <save>
  27. <dutsumlist/>
  28. </save>
  29. </send>
  30. <init/>
  31. <temp/>
  32. </root>
  33. </instance>
  34. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  35. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  36. <submission id="TRRPD04201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/list"/>
  37. <submission id="TXRPD04201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/hidden/temp"/>
  38. </model>
  39. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  40. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  41. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  42. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  43. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  44. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  45. <script type="javascript" src="../../../mis/dligclaznsmngtweb/js/RPD001.js"/>
  46. <script type="javascript" ev:event="xforms-ready">
  47. <![CDATA[
  48. fInitialize();
  49. ]]>
  50. </script>
  51. <script type="javascript">
  52. <![CDATA[
  53. // var DUT_UNIT_CD = "";
  54. // var DUT_UNIT_NM = "";
  55. // var DUTY_RESP_YN = ""; // 복무 책임자
  56. // var DUTY_PART_YN = ""; // 인사 복무 담당자
  57. function fInitialize()
  58. {
  59. model.removenode("/root/main/list/dutsumlist");
  60. // misfComboComCdListMulti("Z0007","cmb_instcd");
  61. model.setValue("/root/send/retrparams/frdutym", getCurrentDate().substr(0, 6));
  62. //model.setValue("/root/send/retrparams/todutym", getCurrentDate().substr(0, 6));
  63. misfComboInstCdListMulti("cmb_instcd", ipt_dutym.value+getCurrentDate().substr(6, 2),"","N");
  64. misfGetAndSetUserInfo();
  65. model.setValue("/root/send/retrparams/instcd", getUserInfo("dutplceinstcd"));
  66. cmb_instcd.disabled = true;
  67. model.setValue("/root/send/retrparams/deptgb", "1");
  68. btn_search.dispatch("DOMActivate");
  69. model.refresh();
  70. }
  71. ]]>
  72. </script>
  73. </xhtml:head>
  74. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-right:8; ">
  75. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  76. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">당직(인턴/레지던트)등록</caption>
  77. </group>
  78. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  79. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  80. <line id="line13" class="line_4" style="x1:1110px; y1:16px; x2:1110px; y2:38px; "/>
  81. <caption id="caption278" class="tit_2" style="left:5px; top:54px; width:162px; height:14px; ">근태집계목록</caption>
  82. <line id="line207" class="line_1" style="x1:0px; y1:69px; x2:1195px; y2:69px; "/>
  83. <datagrid id="grd_dutsumlist" nodeset="/root/main/list/dutsumlist" caption="일자^요일^구분^사원번호^성명^주민번호^부서^비고^caption1^caption2" colsep="^" colwidth="80, 86, 100, 101, 73, 135, 233, 330, 100" dataheight="25" explorerbar="sortshow" extendlastcol="scroll" frozencols="4" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:74px; width:1195px; height:670px; border-right-color:#3366ff; ">
  84. <col disabled="true" ref="ilja" type="input" format="99" style="text-align:center; "/>
  85. <col ref="yoil" style="text-align:center; "/>
  86. <col ref="dangjikgb" type="combo" style="font-weight:bold; ">
  87. <choices>
  88. <item>
  89. <label>숙직</label>
  90. <value>1</value>
  91. </item>
  92. <item>
  93. <label>일직</label>
  94. <value>2</value>
  95. </item>
  96. <item>
  97. <label>일숙직</label>
  98. <value>3</value>
  99. </item>
  100. </choices>
  101. </col>
  102. <col disabled="true" ref="emplno" type="inputbutton" style="text-align:center; "/>
  103. <col ref="emplnm"/>
  104. <col ref="rregno" format="999999-9999999" style="text-align:center; "/>
  105. <col ref="dutplcedeptnm"/>
  106. <col ref="remark" type="input"/>
  107. <col ref="yymmdd" visibility="hidden"/>
  108. <script type="javascript" ev:event="onaftersort">
  109. <![CDATA[
  110. grd_dutsumlist.gridToInstance();
  111. ]]>
  112. </script>
  113. <script type="javascript" ev:event="onbuttonclick">
  114. <![CDATA[
  115. if (grd_dutsumlist.colAttribute(grd_dutsumlist.col,"ref") == "emplno" ) { //계산기준코드
  116. var recv_list = "emplno,emplnm";
  117. rpbfOpenPopUpList("SPRPB00101", grd_dutsumlist, recv_list,"","N");
  118. model.refresh();
  119. }
  120. ]]>
  121. </script>
  122. <script type="javascript" ev:event="xforms-value-changed">
  123. <![CDATA[
  124. if (grd_dutsumlist.colAttribute(grd_dutsumlist.col,"ref") == "ilja" ) {
  125. var ilja = model.getValue("/root/main/list/dutsumlist[" + grd_dutsumlist.row + "]/ilja");
  126. var ymd = model.getValue("/root/send/retrparams/frdutym") + ilja;
  127. if (isValidDateTime(ymd) == false){
  128. messageBox("일자가 잘못 입력되었습니다.", "E999", "");
  129. return;
  130. }
  131. model.setValue("/root/main/list/dutsumlist[" + grd_dutsumlist.row + "]/yymmdd", ymd);
  132. var ymd = model.getValue("/root/main/list/dutsumlist[" + grd_dutsumlist.row + "]/yymmdd");
  133. var yoil = ymd.toDate().getDayOfWeek("K");
  134. if (yoil == "토" || yoil == "일"){
  135. model.setValue("/root/main/list/dutsumlist[" + grd_dutsumlist.row + "]/dangjikgb", "3");
  136. }else{
  137. model.setValue("/root/main/list/dutsumlist[" + grd_dutsumlist.row + "]/dangjikgb", "1");
  138. }
  139. model.setValue("/root/main/list/dutsumlist[" + grd_dutsumlist.row + "]/yoil", ymd.toDate().getDayOfWeek("K") + "요일");
  140. model.refresh();
  141. }
  142. ]]>
  143. </script>
  144. </datagrid>
  145. <caption id="caption5" class="search_name" style="left:10px; top:19px; width:86px; height:17px; ">소속기관 :</caption>
  146. <caption id="caption1" class="search_name" style="left:250px; top:19px; width:86px; height:17px; ">년월 :</caption>
  147. <input id="ipt_dutym" ref="/root/send/retrparams/frdutym" class="input_search" navindex="2" inputtype="date" format="yyyy-mm" style="left:315px; top:18px; width:85px; height:19px; text-align:center; ">
  148. <script type="javascript" ev:event="xforms-value-changed">
  149. <![CDATA[
  150. /*
  151. var instcd = cmb_instcd.value;
  152. if( getStringLength(ipt_dutym.value) == "6" ) {
  153. model.removeNodeset(cmb_instcd.attribute("ref"));
  154. model.makeNode("/root/send/retrparams/instcd");
  155. misfComboInstCdListMulti("cmb_instcd",ipt_dutym.value+"31","","N");
  156. cmb_instcd.value = instcd;
  157. model.refresh();
  158. }
  159. */
  160. btn_search.dispatch("DOMActivate");
  161. ]]>
  162. </script>
  163. </input>
  164. <select1 id="cmb_instcd" ref="/root/send/retrparams/instcd" class="combo_search" navindex="1" appearance="minimal" style="left:100px; top:18px; width:140px; height:19px; ">
  165. <choices>
  166. <itemset>
  167. <label/>
  168. <value/>
  169. </itemset>
  170. </choices>
  171. <script type="javascript" ev:event="xforms-value-changed">
  172. <![CDATA[
  173. btn_search.dispatch("DOMActivate");
  174. ]]>
  175. </script>
  176. </select1>
  177. <button id="btn_dutdept" class="icon_search" navindex="5" style="left:678px; top:20px; width:16px; height:16px; ">
  178. <caption/>
  179. <script type="javascript" ev:event="DOMActivate">
  180. <![CDATA[
  181. misfOpenPopUpList("02", ipt_dutdeptcd, "", "dutunitcd,dutunitnm", cmb_instcd.value, "instcd");
  182. model.refresh();
  183. ]]>
  184. </script>
  185. </button>
  186. <caption id="caption2" class="search_name" style="left:422px; top:19px; width:88px; height:17px; ">근무부서 :</caption>
  187. <input id="ipt_dutdeptnm" ref="/root/send/retrparams/dutunitnm" class="input_search" navindex="6" style="left:696px; top:18px; width:114px; height:19px; ">
  188. <script type="javascript" ev:event="onkeypress">
  189. <![CDATA[
  190. if(event.keyCode == 13)
  191. {
  192. if(ipt_dutdeptnm.value == ipt_dutdeptnm.currentText) return;
  193. ipt_dutdeptnm.value = ipt_dutdeptnm.currentText;
  194. misfValidationCheck("02", "", "dutunitcd,dutunitnm", cmb_instcd.value, "instcd" );
  195. model.refresh();
  196. }
  197. ]]>
  198. </script>
  199. <script type="javascript" ev:event="xforms-value-changed">
  200. <![CDATA[
  201. misfValidationCheck("02", "", "dutunitcd,dutunitnm", cmb_instcd.value, "instcd" );
  202. model.refresh();
  203. ]]>
  204. </script>
  205. </input>
  206. <input id="ipt_dutdeptcd" ref="/root/send/retrparams/dutunitcd" class="input_search" navindex="4" maxlength="10" style="left:605px; top:18px; width:70px; height:19px; text-align:center; ">
  207. <script type="javascript" ev:event="onkeypress">
  208. <![CDATA[
  209. if(event.keyCode == 13)
  210. {
  211. if(ipt_dutdeptcd.value == ipt_dutdeptcd.currentText) return;
  212. ipt_dutdeptcd.value = ipt_dutdeptcd.currentText;
  213. misfValidationCheck("02", "", "dutunitcd,dutunitnm", cmb_instcd.value, "instcd" );
  214. model.refresh();
  215. }
  216. ]]>
  217. </script>
  218. <script type="javascript" ev:event="xforms-value-changed">
  219. <![CDATA[
  220. misfValidationCheck("02", "", "dutunitcd,dutunitnm", cmb_instcd.value, "instcd" );
  221. model.refresh();
  222. ]]>
  223. </script>
  224. </input>
  225. <button id="btn_search" class="btn1_letter2" navindex="10" style="left:1125px; top:17px; width:56px; height:22px; ">
  226. <caption>조회</caption>
  227. <script type="javascript" ev:event="DOMActivate">
  228. <![CDATA[
  229. submit("TRRPD04201");
  230. ]]>
  231. </script>
  232. </button>
  233. <select1 id="rdo_retrflag" ref="/root/send/retrparams/retrflag" overflow="visible" appearance="full" cellspacing="20" cols="3" style="left:670px; top:50px; width:215px; height:15px; border-style:none; ">
  234. <choices>
  235. <item>
  236. <label>인턴</label>
  237. <value>0610</value>
  238. </item>
  239. <item>
  240. <label>레지던트</label>
  241. <value>0510</value>
  242. </item>
  243. <item>
  244. <label>전체</label>
  245. <value/>
  246. </item>
  247. </choices>
  248. <script type="javascript" ev:event="xforms-value-changed">
  249. <![CDATA[
  250. btn_search.dispatch("DOMActivate");
  251. ]]>
  252. </script>
  253. </select1>
  254. <button id="btn_excsave" class="btn2_letter4" style="left:1127px; top:49px; width:64px; height:19px; ">
  255. <caption>엑셀저장</caption>
  256. <script type="javascript" ev:event="DOMActivate">
  257. <![CDATA[
  258. misfSaveExcel(grd_dutsumlist);
  259. ]]>
  260. </script>
  261. </button>
  262. <caption id="caption3" class="search_name" style="left:840px; top:19px; width:63px; height:17px; ">사번 :</caption>
  263. <button id="btn_emplno" class="icon_search" navindex="8" style="left:973px; top:18px; width:16px; height:16px; ">
  264. <caption/>
  265. <script type="javascript" ev:event="DOMActivate">
  266. <![CDATA[
  267. var recv_list = "emplno,emplnm" ;
  268. rpbfOpenPopUpList("SPRPB00101", ipt_emplnos, recv_list,"","N");
  269. model.refresh();
  270. if (model.getValue(ipt_emplnos.attribute("ref")).length > 0) {
  271. //btn_search.dispatch("DOMActivate");
  272. ipt_emplnos.dispatch("xforms-value-changed");
  273. }
  274. ]]>
  275. </script>
  276. </button>
  277. <input id="ipt_emplnos" ref="/root/send/retrparams/emplno" class="input_default" navindex="7" style="left:901px; top:18px; width:67px; height:19px; ">
  278. <script type="javascript" ev:event="onkeyup">
  279. <![CDATA[
  280. if (ipt_emplnos.currentText != null && ipt_emplnos.currentText != "" ) {
  281. inputEnterKey("ipt_emplnos", "xforms-value-changed");
  282. }
  283. ]]>
  284. </script>
  285. <script type="javascript" ev:event="xforms-value-changed">
  286. <![CDATA[
  287. var recv_list = "emplno,emplnm" ;
  288. rpbfValidationCheck("EMPLNO", recv_list);
  289. model.refresh();
  290. if (model.getValue(ipt_emplnos.attribute("ref")).length > 0) {
  291. btn_search.dispatch("DOMActivate");
  292. }
  293. ]]>
  294. </script>
  295. </input>
  296. <input id="ipt_emplnms" ref="/root/send/retrparams/emplnm" class="input_default" navindex="9" style="left:992px; top:18px; width:96px; height:19px; ">
  297. <script type="javascript" ev:event="onkeyup">
  298. <![CDATA[
  299. if (ipt_emplnms.currentText != null && ipt_emplnms.currentText != "" ) {
  300. inputEnterKey("ipt_emplnms", "xforms-value-changed");
  301. }
  302. ]]>
  303. </script>
  304. <script type="javascript" ev:event="xforms-value-changed">
  305. <![CDATA[
  306. var recv_list = "emplno,emplnm" ;
  307. rpbfValidationCheck("EMPLNM", recv_list);
  308. model.refresh();
  309. if (model.getValue(ipt_emplnos.attribute("ref")).length > 0) {
  310. btn_search.dispatch("DOMActivate");
  311. }
  312. ]]>
  313. </script>
  314. </input>
  315. <button id="btn_grddelpaydedulist" class="btn2_letter3" style="left:1004px; top:49px; width:53px; height:19px; ">
  316. <caption>행삭제</caption>
  317. <script type="javascript" ev:event="DOMActivate">
  318. <![CDATA[
  319. //grd_dutsumlist.deleteRow(grd_dutsumlist.row);
  320. misfGridIUD(grd_dutsumlist, "D");
  321. //deleteSelectedRows(grd_dutsumlist, true);
  322. ]]>
  323. </script>
  324. </button>
  325. <button id="btn_grdaddpaydedulist" class="btn2_letter3" style="left:948px; top:49px; width:53px; height:19px; ">
  326. <caption>행추가</caption>
  327. <script type="javascript" ev:event="DOMActivate">
  328. <![CDATA[
  329. grd_dutsumlist.addRow();
  330. var irow = grd_dutsumlist.row;
  331. grd_dutsumlist.topRow = irow;
  332. model.refresh();
  333. ]]>
  334. </script>
  335. </button>
  336. <select1 id="combo1" ref="/root/send/retrparams/deptgb" navindex="3" appearance="minimal" style="left:510px; top:18px; width:90px; height:19px; ">
  337. <choices>
  338. <item>
  339. <label>근무지</label>
  340. <value>1</value>
  341. </item>
  342. <item>
  343. <label>근무부서</label>
  344. <value>2</value>
  345. </item>
  346. <item>
  347. <label>근무과(팀)</label>
  348. <value>3</value>
  349. </item>
  350. <item>
  351. <label>근무부(실)</label>
  352. <value>4</value>
  353. </item>
  354. </choices>
  355. </select1>
  356. <caption id="caption4" style="left:190px; top:50px; width:235px; height:20px; font-weight:bold; ">구분 : 1. 숙직 2.일직 3.일숙직</caption>
  357. <button id="btn_inputexcel" class="btn2_letter4" style="left:1060px; top:49px; width:64px; height:19px; ">
  358. <caption>엑셀입력</caption>
  359. <script type="javascript" ev:event="DOMActivate">
  360. <![CDATA[
  361. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  362. grd_dutsumlist.loadExcel(fileName, 1, true);
  363. //grd_paydedulist.deleteRow(grd_paydedulist.fixedRows);
  364. grd_dutsumlist.refresh();
  365. for (var i = 1; i < grd_dutsumlist.rows; i++) {
  366. var ilja = model.getValue("/root/main/list/dutsumlist[" + i + "]/ilja");
  367. var ymd = model.getValue("/root/send/retrparams/frdutym") + ilja;
  368. /*
  369. if (isValidDateTime(ymd) == false){
  370. messageBox("일자가 잘못 입력되었습니다.", "E999", "");
  371. return;
  372. }
  373. */
  374. model.setValue("/root/main/list/dutsumlist[" + i + "]/yymmdd", ymd);
  375. var ymd = model.getValue("/root/main/list/dutsumlist[" + i + "]/yymmdd");
  376. var yoil = ymd.toDate().getDayOfWeek("K");
  377. if (yoil == "토" || yoil == "일"){
  378. model.setValue("/root/main/list/dutsumlist[" + i + "]/dangjikgb", "3");
  379. }else{
  380. model.setValue("/root/main/list/dutsumlist[" + i + "]/dangjikgb", "1");
  381. }
  382. model.setValue("/root/main/list/dutsumlist[" + i + "]/yoil", ymd.toDate().getDayOfWeek("K") + "요일");
  383. grd_dutsumlist.rowStatus(i) = 1;
  384. }
  385. model.refresh();
  386. ]]>
  387. </script>
  388. </button>
  389. </group>
  390. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  391. <line id="line4" class="line_6" style="x1:0px; y1:25; x2:1195px; y2:25; "/>
  392. <button id="button36" class="btn4_letter2" style="left:1139px; top:3; width:56px; height:22px; ">
  393. <caption>저장</caption>
  394. <script type="javascript" ev:event="DOMActivate">
  395. <![CDATA[
  396. for (var i = 1; i < grd_dutsumlist.rows; i ++){
  397. var emplno1 = model.getValue("/root/main/list/dutsumlist[" + i + "]/emplno");
  398. var ymd1 = model.getValue("/root/main/list/dutsumlist[" + i + "]/yymmdd");
  399. if (isValidDateTime(ymd1) == false){
  400. messageBox("일자가 잘못 입력되었습니다.", "E999", "");
  401. return;
  402. }
  403. if (model.getValue("/root/main/list/dutsumlist[" + i + "]/emplno") == ""){
  404. messageBox(i + "번째의 사원번호는 필수 입력항목입니다.", "E999", "");
  405. return;
  406. }
  407. if (model.getValue("/root/main/list/dutsumlist[" + i + "]/yymmdd") == ""){
  408. messageBox(i + "번째의 일자는 필수 입력항목입니다.", "E999", "");
  409. return;
  410. }
  411. /*
  412. for (var j = 1; j < grd_dutsumlist.rows; j ++){
  413. var emplno2 = model.getValue("/root/main/list/dutsumlist[" + j + "]/emplno");
  414. var ymd2 = model.getValue("/root/main/list/dutsumlist[" + j + "]/yymmdd");
  415. if (i != j){
  416. if (emplno1 == emplno2 && ymd1 == ymd2){
  417. messageBox(j + "번째에서 중복된 자료가 존재합니다", "E999", "");
  418. return;
  419. }
  420. }
  421. }
  422. */
  423. }
  424. var update = getGridUpdateData(grd_dutsumlist);
  425. if(update == ""){
  426. messageBox("업데이트 정보가 없습니다.", "E999", "");
  427. return 0;
  428. } else {
  429. model.setValue("/root/send/save/dutsumlist", update);
  430. if (submit("TXRPD04201")){
  431. messageBox("정상적으로 처리되었습니다.", "E999", "");
  432. btn_search.dispatch("DOMActivate");
  433. }
  434. }
  435. ]]>
  436. </script>
  437. </button>
  438. </group>
  439. </xhtml:body>
  440. </xhtml:html>