SMRPD04301_개인시간외신청.xrw 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  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. <dutscheapp>
  11. <dutscheapplist/>
  12. </dutscheapp>
  13. </main>
  14. <send>
  15. <save>
  16. <dutscheapplist/>
  17. </save>
  18. <dutcd>
  19. <instcd/>
  20. <dutunitcd/>
  21. <dutunitnm/>
  22. </dutcd>
  23. <dutscheapp>
  24. <instcd/>
  25. <srvarmapdd/>
  26. <emplno/>
  27. <emplnm/>
  28. <dutunitcd/>
  29. <dutunitnm/>
  30. <newElement/>
  31. <srvarmapfromdd/>
  32. <srvarmaptodd/>
  33. <ymdflag>2</ymdflag>
  34. </dutscheapp>
  35. </send>
  36. <hidden/>
  37. <tempday>
  38. <dutinfo/>
  39. </tempday>
  40. </root>
  41. </instance>
  42. <submission id="TRRPD04302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/dutscheapp" resultref="/root/main/dutscheapp"/>
  43. <submission id="TXRPD04302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/hiddeen/temp"/>
  44. <submission id="TRRPD10102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/tempday/dutinfo"/>
  45. </model>
  46. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  49. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  50. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  51. <script type="javascript" src="../../../mis/dligclaznsmngtweb/js/RPD001.js"/>
  52. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  53. <script type="javascript" ev:event="xforms-ready">
  54. <![CDATA[
  55. fInit();
  56. ]]>
  57. </script>
  58. <script type="javascript">
  59. <![CDATA[
  60. var DUT_UNIT_CD = "";
  61. var DUT_UNIT_NM = "";
  62. function fInit()
  63. {
  64. misfGridInit(grd_dutscheapplist);
  65. var dt = new Date(getCurrentDate().substr(0, 4), getCurrentDate().substr(4, 2), 0);
  66. submit("TRRPD10102", false);
  67. ipt_srvarmapfromdd.value = model.getValue("/root/tempday/dutinfo/dutlist/fromymd");
  68. ipt_srvarmaptodd.value = model.getValue("/root/tempday/dutinfo/dutlist/toymd");
  69. misfMsterDetailSet(grd_dutscheapplist, null, "TRRPD04302" ,"Y");
  70. misfComboInstCdListMulti("cmb_instcd",ipt_srvarmapfromdd.value,"","N");
  71. misfGetAndSetUserInfo();
  72. misfGetUserAuth();
  73. rpdfSetControlAuth();
  74. rpdfSetDutUnitCombo();
  75. cmb_dutplce.visible = false;
  76. model.setValue("/root/send/dutscheapp/instcd", getUserInfo("dutplceinstcd"));
  77. model.setValue("/root/send/dutscheapp/emplno", getUserInfo("userid"));
  78. model.setValue("/root/send/dutscheapp/emplnm", getUserInfo("usernm"));
  79. model.setValue("/root/send/dutscheapp/dutunitcd", DUT_UNIT_CD);
  80. model.setValue("/root/send/dutscheapp/dutunitnm", DUT_UNIT_NM);
  81. model.setValue("/root/send/dutcd/dutunitcd", DUT_UNIT_CD);
  82. model.setValue("/root/send/dutcd/dutunitnm", DUT_UNIT_NM);
  83. btn_search.dispatch("DOMActivate");
  84. rpdfSetControlByJobRespCd("ipt_emplno,btn_emplno,ipt_emplnm");
  85. btn_search.disabled = !(checkAuth("R"));
  86. btn_save.disabled = !(checkAuth("X"));
  87. ipt_emplno.disabled = true;
  88. btn_emplno.disabled = true;
  89. ipt_emplnm.disabled = true;
  90. model.refresh();
  91. }
  92. function fRetrieve()
  93. {
  94. if(ipt_emplno.value == "" || ipt_emplnm.value == "")
  95. {
  96. messageBox("사원번호를", "C001");
  97. return;
  98. }
  99. model.setValue("/root/send/dutcd/instcd", model.getValue("/root/send/dutscheapp/instcd"));
  100. misfMsterDetailRetrieve();
  101. //submit("TRRPD03702");
  102. for(var i=2; i<grd_dutscheapplist.rows; i++)
  103. {
  104. var sCnfmYn = grd_dutscheapplist.valueMatrix(i, grd_dutscheapplist.colRef("deprtmangraprvyn"));
  105. if(sCnfmYn == "Y")
  106. {
  107. grd_dutscheapplist.rowStyle(i, "all", "background-color") = "#DDDDDD";
  108. misfSetReadOnlyCol(grd_dutscheapplist, "dutcd,srvarmappdd,srvarmfromdd,srvarmtodd,appresn", true, i);
  109. }
  110. else
  111. {
  112. grd_dutscheapplist.rowStyle(i, "all", "background-color") = "#FFFFFF";
  113. misfSetReadOnlyCol(grd_dutscheapplist, "dutcd,srvarmappdd,srvarmfromdd,srvarmtodd,appresn", false, i);
  114. }
  115. }
  116. }
  117. function fSetHoliLen()
  118. {
  119. if (grd_dutscheapplist.col == grd_dutscheapplist.colRef("appfrom"))
  120. {
  121. var sFromDD = grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row, grd_dutscheapplist.colRef("appfrom"));
  122. var sToDD = grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row, grd_dutscheapplist.colRef("appto"));
  123. var sDutCd = grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row, grd_dutscheapplist.colRef("dutcd"));
  124. if (sFromDD != "" && sToDD != ""){
  125. if (sFromDD > sToDD){
  126. messageBox("기간 설정이 잘못 입력되었습니다.", "E999", "");
  127. return;
  128. }
  129. }
  130. /*
  131. if(sToDD.length != 8)
  132. {
  133. grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row, grd_dutscheapplist.colRef("srvarmtodd")) = sFromDD;
  134. }
  135. */
  136. //var stime = grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row,grd_dutscheapplist.colRef("appfrom").substr(8, 11));
  137. //var ttime = grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row,grd_dutscheapplist.colRef("appto").substr(8, 11));
  138. //var dayno = getTimeInterval(grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row,grd_dutscheapplist.colRef("appfrom").substr(8, 11)), grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row,grd_dutscheapplist.colRef("appto").substr(8, 11)));
  139. //alert(stime);
  140. //grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row,grd_dutscheapplist.colRef("srvarmdayno")) = dayno + 1;
  141. model.refresh();
  142. }
  143. else if (grd_dutscheapplist.col == grd_dutscheapplist.colRef("appto"))
  144. {
  145. var sFromDD = grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row, grd_dutscheapplist.colRef("appfrom"));
  146. var sToDD = grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row, grd_dutscheapplist.colRef("appto"));
  147. if (sFromDD != "" && sToDD != ""){
  148. if (sFromDD > sToDD){
  149. messageBox("기간 설정이 잘못 입력되었습니다.", "E999", "");
  150. return;
  151. }
  152. }
  153. //var dayno = getTimeInterval(grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row,grd_dutscheapplist.colRef("appfrom").substr(8, 11)), grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row,grd_dutscheapplist.colRef("appto").substr(8, 11)));
  154. //alert(dayno);
  155. //grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row,grd_dutscheapplist.colRef("srvarmdayno")) = dayno + 1;
  156. model.refresh();
  157. }
  158. }
  159. function fSave(){
  160. fSetHoliLen();
  161. var yoil = model.getValue("/root/tempday/dutinfo/dutlist/yoil");
  162. for(var i=1; i<grd_dutscheapplist.rows; i++){
  163. var iudgb = grd_dutscheapplist.valueMatrix(i, grd_dutscheapplist.colRef("iudgb"));
  164. if (iudgb != "U"){
  165. var sapptm = grd_dutscheapplist.valueMatrix(i, grd_dutscheapplist.colRef("apptm"));
  166. var sDutCd = grd_dutscheapplist.valueMatrix(i, grd_dutscheapplist.colRef("dutcd"));
  167. var sFromDD = grd_dutscheapplist.valueMatrix(i, grd_dutscheapplist.colRef("appfrom"));
  168. var sToDD = grd_dutscheapplist.valueMatrix(i, grd_dutscheapplist.colRef("appto"));
  169. var sAppResn = grd_dutscheapplist.valueMatrix(i, grd_dutscheapplist.colRef("appresn"));
  170. var sCnfmYn = grd_dutscheapplist.valueMatrix(i, grd_dutscheapplist.colRef("deprtmangraprvyn"));
  171. var sCnfm2Yn = grd_dutscheapplist.valueMatrix(i, grd_dutscheapplist.colRef("psnworkapryn"));
  172. if (sDutCd == "03"){
  173. if (yoil == "0" && parseInt(sapptm) < 9){
  174. messageBox("휴일근무는 9시간이 넘어야 가능합니다. 시간외로 신청바랍니다.", "E999", "");
  175. return;
  176. }
  177. }
  178. }else{
  179. if (grd_dutscheapplist.rowStatus(i) == 4){
  180. if(sCnfmYn == "Y" || sCnfm2Yn == "Y"){
  181. messageBox("부서장이나 인사팀 승인이 난 내역은 수정 할 수 없습니다.", "I999");
  182. return;
  183. }
  184. }
  185. }
  186. /*
  187. if(sDutCd == "" || sFromDD == "" || sToDD == ""){
  188. messageBox("[ 근무코드 | 시작일 | 종료일 ] 은 입력하셔야 합니다.", "I999");
  189. return;
  190. }
  191. */
  192. }
  193. if (misfSave("TXRPD04302")){;
  194. fRetrieve();
  195. }
  196. }
  197. function fDelRow(){
  198. /*
  199. for(var i=0; i<grd_dutscheapplist.selectedCells.length; i++){
  200. var iRowIdx = grd_dutscheapplist.selectedCells.item(i).row;
  201. var sCnfmYn = grd_dutscheapplist.valueMatrix(iRowIdx, grd_dutscheapplist.colRef("deprtmangraprvyn"));
  202. var sCnfm2Yn = grd_dutscheapplist.valueMatrix(iRowIdx, grd_dutscheapplist.colRef("psnworkapryn"));
  203. if(sCnfmYn == "Y" || sCnfm2Yn == "Y"){
  204. messageBox("부서장이나 인사팀 승인이 난 내역은 삭제 할 수 없습니다.", "I999");
  205. continue;
  206. }else{
  207. grd_dutscheapplist.addStatus(iRowIdx, "delete");
  208. }
  209. }
  210. */
  211. var iRowIdx = grd_dutscheapplist.row;
  212. var sCnfmYn = grd_dutscheapplist.valueMatrix(iRowIdx, grd_dutscheapplist.colRef("deprtmangraprvyn"));
  213. var sCnfm2Yn = grd_dutscheapplist.valueMatrix(iRowIdx, grd_dutscheapplist.colRef("psnworkapryn"));
  214. if(sCnfmYn == "Y" || sCnfm2Yn == "Y"){
  215. messageBox("부서장이나 인사팀 승인이 난 내역은 삭제 할 수 없습니다.", "I999");
  216. return;
  217. }else{
  218. grd_dutscheapplist.addStatus(iRowIdx, "delete");
  219. }
  220. model.refresh();
  221. }
  222. function fAddRow()
  223. {
  224. if(ipt_emplno.value == "" || ipt_emplnm.value == "")
  225. {
  226. messageBox("사원번호를", "C001");
  227. return;
  228. }
  229. var ymd = getCurrentDate() + getCurrentTime();
  230. misfGridIUD(grd_dutscheapplist, "A");
  231. grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row, grd_dutscheapplist.colRef("deprtmangraprvyn")) = "N";
  232. grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row, grd_dutscheapplist.colRef("psnworkapryn")) = "N";
  233. grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row, grd_dutscheapplist.colRef("appdd")) = getCurrentDate();
  234. grd_dutscheapplist.valueMatrix(grd_dutscheapplist.row, grd_dutscheapplist.colRef("dutymd")) = ymd.substr(0, 12);
  235. grd_dutscheapplist.col = grd_dutscheapplist.colRef("dutcd");
  236. grd_dutscheapplist.editCell();
  237. }
  238. ]]>
  239. </script>
  240. </xhtml:head>
  241. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  242. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  243. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">개인시간외확인</caption>
  244. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  245. </group>
  246. <group id="group3" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  247. <datagrid id="grd_dutscheapplist" nodeset="/root/main/dutscheapp/dutscheapplist" caption="근무코드^근무시작시간^근무종료시간^신청사유^근무시간^부서장승인^인사팀승인^caption1^caption2^caption3^caption4^복무비용^비용지급일자^부서장&#xA;입력여부^부서장승인^인사팀승인^지출결의확인^기관코드^사번^근무지부서^밤근무월제한일수" colsep="^" colwidth="132, 127, 129, 754, 76, 81, 72, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:79px; width:1194px; height:662px; ">
  248. <col disabled="true" ref="dutcd" type="combo" style="text-align:left; vertical-align:middle; ">
  249. <choices>
  250. <item>
  251. <label>시간외</label>
  252. <value>01</value>
  253. </item>
  254. <item>
  255. <label>야간</label>
  256. <value>02</value>
  257. </item>
  258. <item>
  259. <label>휴일</label>
  260. <value>03</value>
  261. </item>
  262. <item>
  263. <label>CALL</label>
  264. <value>04</value>
  265. </item>
  266. <item>
  267. <label>심야야간</label>
  268. <value>05</value>
  269. </item>
  270. </choices>
  271. </col>
  272. <col disabled="true" ref="appfrom" format="yyyy-mm-dd hh:mm" style="text-align:center; "/>
  273. <col ref="appto" format="yyyy-mm-dd hh:mm" style="text-align:center; "/>
  274. <col ref="appresn" type="input"/>
  275. <col ref="apptm" visibility="hidden"/>
  276. <col ref="deprtmangraprvyn" visibility="hidden" style="text-align:center; "/>
  277. <col ref="psnworkapryn" visibility="hidden" style="text-align:center; "/>
  278. <col ref="emplno" visibility="hidden"/>
  279. <col ref="iudgb" visibility="hidden"/>
  280. <col ref="appdd" visibility="hidden"/>
  281. <col ref="dutymd" visibility="hidden"/>
  282. <script type="javascript" ev:event="xforms-value-changed">
  283. <![CDATA[
  284. /*
  285. fSetHoliLen();
  286. if (model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/iudgb") != "U"){
  287. var yoil = model.getValue("/root/tempday/dutinfo/dutlist/yoil");
  288. if (model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/dutcd") == ""){
  289. messageBox("근무코드를 선택한 후 진행하시기 바랍니다.", "E999", "");
  290. return;
  291. }
  292. if (yoil == 8 && model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/dutcd") == "03"){
  293. messageBox("평일은 휴일 근무를 선택할 수 없습니다.", "E999", "");
  294. return;
  295. }
  296. if (grd_dutscheapplist.colAttribute(grd_dutscheapplist.col,"ref") == "appfrom" ) {
  297. }
  298. if (grd_dutscheapplist.colAttribute(grd_dutscheapplist.col,"ref") == "appto" ) {
  299. if (model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appfrom") == ""){
  300. messageBox("시작시간을 먼저 설정하시기 바랍니다.", "E999", "");
  301. return;
  302. }
  303. //model.setValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appto", getCurrentDateTime());
  304. var appfrom = model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appfrom");
  305. var appto = model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appto");
  306. var frDate = appfrom.substr(0, 8);
  307. var frTime = appfrom.substr(8, 4);
  308. var toDate = appto.substr(0, 8);
  309. var toTime = appto.substr(8, 4);
  310. var dutTime = rpdfGetCalcDutyTime(frDate, frTime, toDate, toTime);
  311. var dutTime_v = parseInt(dutTime / 60);
  312. var dutMin_v = dutTime % 60;
  313. var dutTm = dutTime_v + dutMin_v;
  314. //alert(dutTime + "==" + dutTime_v + "==" + dutMin_v + "==" + dutTm);
  315. model.setValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/apptm", dutTime_v);
  316. }
  317. }
  318. model.refresh();
  319. */
  320. ]]>
  321. </script>
  322. <script type="javascript" ev:event="ondblclick">
  323. <![CDATA[
  324. if (model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/iudgb") != "U"){
  325. var yoil = model.getValue("/root/tempday/dutinfo/dutlist/yoil");
  326. if (model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/dutcd") == ""){
  327. messageBox("근무코드를 선택한 후 진행하시기 바랍니다.", "E999", "");
  328. return;
  329. }
  330. if (yoil == 8 && model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/dutcd") == "03"){
  331. if (DUT_PLCEDEPT_CD == "4060100000" || DUT_PLCEDEPT_CD == "3250100000"){
  332. }else{
  333. messageBox("평일은 휴일 근무를 선택할 수 없습니다.", "E999", "");
  334. return;
  335. }
  336. }
  337. if (grd_dutscheapplist.colAttribute(grd_dutscheapplist.col,"ref") == "appfrom" ) {
  338. if (model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appfrom") == ""){
  339. if (yoil == "8"){
  340. //model.setValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appfrom", getCurrentDate()+"1930");
  341. model.setValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appfrom", getCurrentDate() + getCurrentTime().substr(0,4));
  342. }else{
  343. model.setValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appfrom", getCurrentDate() + getCurrentTime().substr(0,4));
  344. }
  345. }
  346. }
  347. if (grd_dutscheapplist.colAttribute(grd_dutscheapplist.col,"ref") == "appto" ) {
  348. if (yoil != "8"){
  349. if (model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appfrom") == ""){
  350. messageBox("시작시간을 먼저 설정하시기 바랍니다.", "E999", "");
  351. return;
  352. }
  353. }
  354. model.setValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appto", getCurrentDate() + getCurrentTime().substr(0,4));
  355. var appfrom = model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appfrom");
  356. var appto = model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appto");
  357. var frDate = appfrom.substr(0, 8);
  358. var frTime = appfrom.substr(8, 4);
  359. var toDate = appto.substr(0, 8);
  360. var toTime = appto.substr(8, 4);
  361. var dutTime = rpdfGetCalcDutyTime(frDate, frTime, toDate, toTime);
  362. var dutTime_v = parseInt(dutTime / 60);
  363. var dutMin_v = dutTime % 60;
  364. model.setValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/apptm", dutTime_v);
  365. }
  366. }else{
  367. if (grd_dutscheapplist.colAttribute(grd_dutscheapplist.col,"ref") == "appto") {
  368. if (yoil != "8"){
  369. if (model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appfrom") == ""){
  370. messageBox("시작시간을 먼저 설정하시기 바랍니다.", "E999", "");
  371. return;
  372. }
  373. }
  374. if (model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appto") == ""){
  375. model.setValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appto", getCurrentDate() + getCurrentTime().substr(0,4));
  376. var appfrom = model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appfrom");
  377. var appto = model.getValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/appto");
  378. var frDate = appfrom.substr(0, 8);
  379. var frTime = appfrom.substr(8, 4);
  380. var toDate = appto.substr(0, 8);
  381. var toTime = appto.substr(8, 4);
  382. var dutTime = rpdfGetCalcDutyTime(frDate, frTime, toDate, toTime);
  383. var dutTime_v = parseInt(dutTime / 60);
  384. var dutMin_v = dutTime % 60;
  385. model.setValue("/root/main/dutscheapp/dutscheapplist[" + grd_dutscheapplist.row + "]/apptm", dutTime_v);
  386. grd_dutscheapplist.rowStatus(grd_dutscheapplist.row) = 2;
  387. }
  388. }
  389. }
  390. model.refresh();
  391. ]]>
  392. </script>
  393. </datagrid>
  394. <line id="line2" class="line_1" style="x1:0px; y1:74px; x2:1195px; y2:74px; "/>
  395. <group id="group4" style="left:0px; top:10px; width:1195px; height:40px; vertical-align:top; ">
  396. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  397. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1125px; top:14px; width:56px; height:22px; text-align:left; ">
  398. <caption>조회</caption>
  399. <script type="javascript" ev:event="DOMActivate">
  400. <![CDATA[
  401. fRetrieve();
  402. ]]>
  403. </script>
  404. </button>
  405. <caption id="caption1" class="search_name" style="left:690px; top:10px; width:86px; height:17px; ">사원번호 :</caption>
  406. <button id="btn_emplno" class="icon_search" style="left:860px; top:11px; width:16px; height:16px; ">
  407. <caption/>
  408. <script type="javascript" ev:event="DOMActivate">
  409. <![CDATA[
  410. rpbfOpenPopUpList("SPRPB00101", ipt_emplno, "emplno,emplnm,dutunitcd,dutunitnm", "", "N");
  411. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  412. model.setValue("/root/send/dutcd/dutunitnm", model.getValue("/root/send/dutscheapp/dutunitnm"));
  413. model.refresh();
  414. ]]>
  415. </script>
  416. </button>
  417. <input id="ipt_emplnm" ref="/root/send/dutscheapp/emplnm" class="input_search" navindex="3" style="left:880px; top:10px; width:150px; height:19px; ">
  418. <script type="javascript" ev:event="onkeypress">
  419. <![CDATA[
  420. if(event.keyCode == 13)
  421. {
  422. if(ipt_emplnm.value == ipt_emplnm.currentText) return;
  423. ipt_emplnm.value = ipt_emplnm.currentText;
  424. rpbfValidationCheck("EMPLNM", "emplno,emplnm,dutunitcd,dutunitnm");
  425. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  426. model.setValue("/root/send/dutcd/dutunitnm", model.getValue("/root/send/dutscheapp/dutunitnm"));
  427. model.refresh();
  428. btn_search.dispatch("DOMActivate");
  429. }
  430. ]]>
  431. </script>
  432. <script type="javascript" ev:event="xforms-value-changed">
  433. <![CDATA[
  434. rpbfValidationCheck("EMPLNO", "emplno,emplnm,dutunitcd,dutunitnm");
  435. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  436. model.setValue("/root/send/dutcd/dutunitnm", model.getValue("/root/send/dutscheapp/dutunitnm"));
  437. model.refresh();
  438. btn_search.dispatch("DOMActivate");
  439. ]]>
  440. </script>
  441. </input>
  442. <input id="ipt_emplno" ref="/root/send/dutscheapp/emplno" class="input_search" navindex="2" style="left:776px; top:10px; width:80px; height:19px; text-align:center; ">
  443. <script type="javascript" ev:event="onkeypress">
  444. <![CDATA[
  445. if(event.keyCode == 13)
  446. {
  447. if(ipt_emplno.value == ipt_emplno.currentText) return;
  448. ipt_emplno.value = ipt_emplno.currentText;
  449. rpbfValidationCheck("EMPLNO", "emplno,emplnm,dutunitcd,dutunitnm");
  450. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  451. model.setValue("/root/send/dutcd/dutunitnm", model.getValue("/root/send/dutscheapp/dutunitnm"));
  452. model.refresh();
  453. btn_search.dispatch("DOMActivate");
  454. }
  455. ]]>
  456. </script>
  457. <script type="javascript" ev:event="xforms-value-changed">
  458. <![CDATA[
  459. rpbfValidationCheck("EMPLNO", "emplno,emplnm,dutunitcd,dutunitnm");
  460. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  461. model.setValue("/root/send/dutcd/dutunitnm", model.getValue("/root/send/dutscheapp/dutunitnm"));
  462. model.refresh();
  463. btn_search.dispatch("DOMActivate");
  464. ]]>
  465. </script>
  466. </input>
  467. <select1 id="cmb_instcd" ref="/root/send/dutscheapp/instcd" class="combo_search" navindex="1" appearance="minimal" style="left:108px; top:10px; width:231px; height:19px; ">
  468. <choices>
  469. <itemset>
  470. <label/>
  471. <value/>
  472. </itemset>
  473. </choices>
  474. <script type="javascript" ev:event="xforms-value-changed">
  475. <![CDATA[
  476. model.setValue("/root/send/dutcd/instcd", model.getValue("/root/send/dutscheapp/instcd"));
  477. ]]>
  478. </script>
  479. </select1>
  480. <caption id="caption7" class="search_name" style="left:20px; top:11px; width:86px; height:17px; ">소속기관 :</caption>
  481. <select1 id="cmb_ymdflag" ref="/root/send/dutscheapp/ymdflag" class="combo_search" disabled="true" appearance="minimal" style="left:392px; top:10px; width:75px; height:19px; text-align:center; ">
  482. <choices>
  483. <item>
  484. <label>적용년월</label>
  485. <value>1</value>
  486. </item>
  487. <item>
  488. <label>신청년월</label>
  489. <value>2</value>
  490. </item>
  491. </choices>
  492. </select1>
  493. <input id="ipt_srvarmapfromdd" ref="/root/send/dutscheapp/srvarmapfromdd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:466px; top:10px; width:91px; height:19px; text-align:center; ">
  494. <script type="javascript" ev:event="xforms-value-changed">
  495. <![CDATA[
  496. var instcd = cmb_instcd.value;
  497. if( getStringLength(ipt_srvarmapfromdd.value) == "8" ) {
  498. model.removeNodeset(cmb_instcd.attribute("ref"));
  499. model.makeNode("/root/send/dutscheapp/instcd");
  500. misfComboInstCdListMulti("cmb_instcd",ipt_srvarmapfromdd.value,"","N");
  501. cmb_instcd.value = instcd;
  502. model.refresh();
  503. }
  504. ]]>
  505. </script>
  506. </input>
  507. <input id="ipt_srvarmaptodd" ref="/root/send/dutscheapp/srvarmaptodd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:570px; top:10px; width:91px; height:19px; text-align:center; "/>
  508. <caption id="caption9" style="left:558px; top:14px; width:11px; height:15px; ">~</caption>
  509. <caption id="caption10" class="search_name" style="left:371px; top:12px; width:15px; height:17px; "/>
  510. </group>
  511. <caption id="caption8" class="tit_2" style="left:5px; top:59px; width:165px; height:13px; ">개인신청내역</caption>
  512. <button id="btn_grdadddutscheapplist" class="btn2_letter3" style="left:1086px; top:53px; width:53px; height:19px; ">
  513. <caption>행추가</caption>
  514. <script type="javascript" ev:event="DOMActivate">
  515. <![CDATA[
  516. fAddRow();
  517. ]]>
  518. </script>
  519. </button>
  520. <button id="btn_grddeldutscheapplist" class="btn2_letter3" visibility="hidden" style="left:1141px; top:53px; width:53px; height:19px; ">
  521. <caption>행삭제</caption>
  522. <script type="javascript" ev:event="DOMActivate">
  523. <![CDATA[
  524. fDelRow();
  525. ]]>
  526. </script>
  527. </button>
  528. <caption id="caption2" class="search_name" visibility="hidden" style="left:20px; top:46px; width:87px; height:17px; ">관리부서 :</caption>
  529. <select1 id="cmb_dutplce" ref="/root/send/dutscheapp/dutunitcd" class="combo_search" visibility="hidden" appearance="minimal" style="left:108px; top:45px; width:231px; height:19px; ">
  530. <choices>
  531. <itemset>
  532. <label/>
  533. <value/>
  534. </itemset>
  535. </choices>
  536. <script type="javascript" ev:event="xforms-value-changed">
  537. <![CDATA[
  538. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  539. btn_search.dispatch("DOMActivate");
  540. ]]>
  541. </script>
  542. </select1>
  543. <button id="btn_dutdept" class="icon_search" visibility="hidden" style="left:460px; top:42px; width:16px; height:16px; ">
  544. <caption/>
  545. <script type="javascript" ev:event="DOMActivate">
  546. <![CDATA[
  547. // misfOpenPopUpList("02", ipt_dutdeptcd, "", "dutunitcd,dutunitnm", cmb_instcd.value, "instcd" );
  548. misfOpenPopUpList("02", ipt_dutdeptcd,"","dutunitcd,dutunitnm", cmb_instcd.value + "," + ipt_srvarmaptodd.value, "instcd,basedd");
  549. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  550. model.refresh();
  551. ]]>
  552. </script>
  553. </button>
  554. <input id="ipt_dutdeptnm" ref="/root/send/dutscheapp/dutunitnm" class="input_search" navindex="3" visibility="hidden" style="left:480px; top:40px; width:127px; height:19px; ">
  555. <script type="javascript" ev:event="xforms-value-changed">
  556. <![CDATA[
  557. misfValidationCheck("02", "", "dutunitcd,dutunitnm", cmb_instcd.value, "instcd" );
  558. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  559. model.refresh();
  560. ]]>
  561. </script>
  562. <script type="javascript" ev:event="onkeypress">
  563. <![CDATA[
  564. if(event.keyCode == 13)
  565. {
  566. ipt_dutdeptnm.value = ipt_dutdeptnm.currentText;
  567. misfValidationCheck("02", "", "dutunitcd,dutunitnm", cmb_instcd.value, "instcd" );
  568. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  569. model.refresh();
  570. }
  571. ]]>
  572. </script>
  573. </input>
  574. <input id="ipt_dutdeptcd" ref="/root/send/dutscheapp/dutunitcd" class="input_search" navindex="2" visibility="hidden" maxlength="10" style="left:376px; top:40px; width:80px; height:19px; ">
  575. <script type="javascript" ev:event="xforms-value-changed">
  576. <![CDATA[
  577. misfValidationCheck("02", "", "dutunitcd,dutunitnm", cmb_instcd.value, "instcd" );
  578. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  579. model.refresh();
  580. ]]>
  581. </script>
  582. <script type="javascript" ev:event="onkeypress">
  583. <![CDATA[
  584. if(event.keyCode == 13)
  585. {
  586. ipt_dutdeptcd.value = ipt_dutdeptcd.currentText;
  587. misfValidationCheck("02", "", "dutunitcd,dutunitnm", cmb_instcd.value, "instcd" );
  588. model.setValue("/root/send/dutcd/dutunitcd", model.getValue("/root/send/dutscheapp/dutunitcd"));
  589. model.refresh();
  590. }
  591. ]]>
  592. </script>
  593. </input>
  594. </group>
  595. <group id="group5" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  596. <button id="btn_save" class="btn4_letter2" style="left:1139px; top:3px; width:56px; height:22px; ">
  597. <caption>저장</caption>
  598. <script type="javascript" ev:event="DOMActivate">
  599. <![CDATA[
  600. fSave();
  601. ]]>
  602. </script>
  603. </button>
  604. <line id="line75" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  605. </group>
  606. </xhtml:body>
  607. </xhtml:html>