SMRPD03600_행정당직등록.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  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. <dutyworkapplist/>
  11. </main>
  12. <send>
  13. <instcd/>
  14. <dutym/>
  15. <emplno/>
  16. <emplnm/>
  17. <dutyworkapplist/>
  18. <dutunitcd/>
  19. <dutunitnm/>
  20. <dutym_s/>
  21. <popworkgbn/>
  22. <dutplceinstcd/>
  23. <instnm/>
  24. <instcd/>
  25. <dutplceinstnm/>
  26. <dutplceinstcd/>
  27. <deptcd/>
  28. <deptnm/>
  29. <dutdeptcd/>
  30. <dutdeptnm/>
  31. </send>
  32. <init>
  33. <combo1>
  34. <label>주간</label>
  35. <value>D</value>
  36. <label>야간</label>
  37. <value>N</value>
  38. </combo1>
  39. <combo2>
  40. <label>예정</label>
  41. <value>1</value>
  42. <label>실시</label>
  43. <value>2</value>
  44. <label>확정</label>
  45. <value>3</value>
  46. </combo2>
  47. </init>
  48. <temp>
  49. </temp>
  50. </root>
  51. </instance>
  52. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  54. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  55. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  56. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  57. <script type="javascript" src="../../../mis/dligclaznsmngtweb/js/RPD001.js"/>
  58. <script type="javascript" src="../../../mis/pubwelfmngtweb/js/RPS001.js"/>
  59. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  60. <script type="javascript" ev:event="xforms-ready">
  61. <![CDATA[
  62. fInitialize();
  63. ]]>
  64. </script>
  65. <submission id="TRRPD03601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/dutyworkapplist"/>
  66. <submission id="TXRPD03601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="root/temp/douchecklist"/>
  67. <submission id="TXRPD03602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  68. <submission id="TXRPD03603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  69. </model>
  70. <script type="javascript">
  71. <![CDATA[
  72. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  73. function fInitialize()
  74. {
  75. model.removeNodeset("/root/main/dutyworkapplist");
  76. model.resetInstanceNode("/root/send");
  77. misfGridInit(grd_dutyworkapplist);
  78. misfMsterDetailSet(grd_dutyworkapplist,null,"TRRPD03601","Y");
  79. // misfComboComCdListMulti("Z0007","cmb_instcd");
  80. model.setValue("/root/send/dutym", getCurrentDate().substr(0, 6));
  81. misfComboInstCdListMulti("cmb_instcd",ipt_dutym.value+getCurrentDate().substr(6, 2),"","N");
  82. misfGetAndSetUserInfo();
  83. misfGetUserAuth();
  84. model.setValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  85. //model.setValue("/root/send/dutunitcd", DUT_UNIT_CD);
  86. //model.setValue("/root/send/dutunitnm", DUT_UNIT_NM);
  87. //model.setValue("/root/send/emplno", getUserInfo("userid"));
  88. //model.setValue("/root/send/emplnm", getUserInfo("usernm"));
  89. model.setValue("/root/send/dutplceinstcd", getUserInfo("dutplceinstcd"));
  90. model.setValue("/root/send/popworkgbn", "SMRPD03600");
  91. if(getUserInfo("dutplceinstcd") == "001" && DUTY_PART_YN == "Y")
  92. {
  93. cmb_instcd.disabled = false;
  94. }
  95. else
  96. {
  97. cmb_instcd.disabled = true;
  98. }
  99. //화면 권한 설정
  100. btn_save.disabled = !(checkAuth("X"));
  101. btn_search.dispatch("DOMActivate");
  102. model.refresh();
  103. }
  104. function fSendSms()
  105. {
  106. var iCheckedCnt = 0;
  107. for(var i=1; i<grd_dutyworkapplist.rows; i++)
  108. {
  109. if(grd_dutyworkapplist.valueMatrix(i, grd_dutyworkapplist.colRef("smsyn")) == "Y")
  110. {
  111. iCheckedCnt++;
  112. }
  113. }
  114. if(iCheckedCnt == 0)
  115. {
  116. messageBox("SMS 보낼 사용자를 선택하십시오", "I999");
  117. return;
  118. }
  119. else
  120. {
  121. var dlgResult = messageBox("선택하신 당직일자의 근무자에게 SMS를 발송하겠습니까?", "Q999");
  122. if(dlgResult == 6)
  123. {
  124. misfSave("TXRPD03602");
  125. }
  126. }
  127. }
  128. ]]>
  129. </script>
  130. </xhtml:head>
  131. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  132. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  133. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">행정당직등록</caption>
  134. </group>
  135. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  136. <line id="line1" class="line_1" style="x1:0; y1:68px; x2:1194; y2:68px; "/>
  137. <group id="group4" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  138. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; "/>
  139. <caption id="caption5" class="search_name" style="left:470px; top:9px; width:86px; height:17px; ">사원번호 :</caption>
  140. <button id="button3" class="icon_search" style="left:640px; top:10px; width:16px; height:16px; ">
  141. <caption/>
  142. <script type="javascript" ev:event="DOMActivate">
  143. <![CDATA[
  144. rpbfOpenPopUpList("SPRPB00101", ipt_emplno, "emplno,emplnm,dutunitcd,dutunitnm", "", "N");
  145. //fDutCdRetreive();
  146. ]]>
  147. </script>
  148. </button>
  149. <caption id="caption1" class="search_name" style="left:270px; top:9px; width:86px; height:17px; ">근 무 월 :</caption>
  150. <line id="line3" class="line_4" style="x1:1110px; y1:6px; x2:1110px; y2:28px; border-color:#ffe4bb; border-left-style:solid; "/>
  151. <input id="ipt_emplno" ref="/root/send/emplno" class="input_search" navindex="2" style="left:555px; top:8px; width:80px; height:19px; ">
  152. <script type="javascript" ev:event="onkeypress">
  153. <![CDATA[
  154. if(event.keyCode == 13)
  155. {
  156. if(ipt_emplno.value == ipt_emplno.currentText) return;
  157. ipt_emplno.value = ipt_emplno.currentText;
  158. rpbfValidationCheck("EMPLNO", "emplno,emplnm,dutunitcd,dutunitnm");
  159. model.refresh();
  160. }
  161. ]]>
  162. </script>
  163. <script type="javascript" ev:event="xforms-value-changed">
  164. <![CDATA[
  165. rpbfValidationCheck("EMPLNO", "emplno,emplnm,dutunitcd,dutunitnm");
  166. model.refresh();
  167. ]]>
  168. </script>
  169. </input>
  170. <input id="ipt_emplnm" ref="/root/send/emplnm" class="input_search" navindex="3" style="left:661px; top:8px; width:135px; height:19px; ">
  171. <script type="javascript" ev:event="onkeypress">
  172. <![CDATA[
  173. if(event.keyCode == 13)
  174. {
  175. if(ipt_emplnm.value == ipt_emplnm.currentText) return;
  176. ipt_emplnm.value = ipt_emplnm.currentText;
  177. rpbfValidationCheck("EMPLNM", "emplno,emplnm,dutunitcd,dutunitnm");
  178. model.refresh();
  179. }
  180. ]]>
  181. </script>
  182. <script type="javascript" ev:event="xforms-value-changed">
  183. <![CDATA[
  184. rpbfValidationCheck("EMPLNM", "emplno,emplnm,dutunitcd,dutunitnm");
  185. model.refresh();
  186. ]]>
  187. </script>
  188. </input>
  189. <input id="ipt_instnm" ref="/root/send/instnm" class="input_search" navindex="3" visibility="hidden" style="left:930px; top:8px; width:19px; height:19px; "/>
  190. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1125px; top:7px; width:56px; height:22px; text-align:left; ">
  191. <caption>조회</caption>
  192. <script type="javascript" ev:event="DOMActivate">
  193. <![CDATA[
  194. if(ipt_dutym.value=="")
  195. {
  196. messageBox("근무월은","I003");
  197. return;
  198. }
  199. submit("TRRPD03601");
  200. var mmngdtsumyn = model.getValue(grd_dutyworkapplist.attribute("nodeset") + "[1]/mmngdtsumyn");
  201. if(mmngdtsumyn =='Y')
  202. {
  203. btn_save.disabled=true;
  204. }
  205. ]]>
  206. </script>
  207. </button>
  208. <input id="ipt_dutym" ref="/root/send/dutym" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:355px; top:8px; width:95px; height:19px; ">
  209. <script type="javascript" ev:event="xforms-value-changed">
  210. <![CDATA[
  211. var instcd = cmb_instcd.value;
  212. if( getStringLength(ipt_dutym.value) == "6" ) {
  213. model.removeNodeset(cmb_instcd.attribute("ref"));
  214. model.makeNode("/root/send/instcd");
  215. misfComboInstCdListMulti("cmb_instcd",ipt_dutym.value+"31","","N");
  216. cmb_instcd.value = instcd;
  217. model.refresh();
  218. }
  219. ]]>
  220. </script>
  221. </input>
  222. <input id="ipt_dutdeptcd" ref="/root/send/dutunitcd" class="input_search" navindex="2" visibility="hidden" style="left:850px; top:8px; width:19px; height:19px; "/>
  223. <input id="ipt_dutdeptnm" ref="/root/send/dutunitnm" class="input_search" navindex="2" visibility="hidden" style="left:870px; top:8px; width:19px; height:19px; "/>
  224. <input id="ipt_popworkgbn" ref="/root/send/popworkgbn" class="input_search" navindex="2" visibility="hidden" style="left:890px; top:8px; width:19px; height:19px; "/>
  225. <input id="ipt_dutplceinstcd" ref="/root/send/dutplceinstcd" class="input_search" navindex="2" visibility="hidden" style="left:910px; top:8px; width:19px; height:19px; "/>
  226. <select1 id="cmb_instcd" ref="/root/send/instcd" class="combo_search" navindex="1" appearance="minimal" style="left:102px; top:8px; width:153px; height:19px; ">
  227. <choices>
  228. <itemset>
  229. <label/>
  230. <value/>
  231. </itemset>
  232. </choices>
  233. <script type="javascript" ev:event="xforms-value-changed">
  234. <![CDATA[
  235. model.setValue("/root/send/dutplceinstcd", model.getValue("/root/send/instcd"));
  236. ]]>
  237. </script>
  238. </select1>
  239. <caption id="caption8" class="search_name" style="left:14px; top:9px; width:86px; height:17px; ">소속기관 :</caption>
  240. </group>
  241. <caption id="caption9" class="tit_2" style="left:5px; top:54px; width:170px; height:14px; ">행정당직근무내역</caption>
  242. <button id="btn_grdadd" class="btn2_letter3" style="left:1086px; top:48px; width:53px; height:19px; ">
  243. <caption>행추가</caption>
  244. <script type="javascript" ev:event="DOMActivate">
  245. <![CDATA[
  246. misfGridIUD(grd_dutyworkapplist, "A");
  247. var cur_row=grd_dutyworkapplist.row;
  248. grd_dutyworkapplist.valueMatrix(cur_row, grd_dutyworkapplist.colRef("appscheexecflag")) = "3";
  249. grd_dutyworkapplist.valueMatrix(cur_row, grd_dutyworkapplist.colRef("adminngdtdnflag")) = "N";
  250. grd_dutyworkapplist.valueMatrix(cur_row, grd_dutyworkapplist.colRef("dutplceinstcd")) = ipt_dutplceinstcd.value;
  251. grd_dutyworkapplist.valueMatrix(cur_row, grd_dutyworkapplist.colRef("dutplcedeptcd")) = ipt_dutdeptcd.value;
  252. grd_dutyworkapplist.valueMatrix(cur_row, grd_dutyworkapplist.colRef("dutplcedeptnm")) = ipt_dutdeptnm.value;
  253. grd_dutyworkapplist.valueMatrix(cur_row, grd_dutyworkapplist.colRef("appscheexecflag")) = "1";
  254. ]]>
  255. </script>
  256. </button>
  257. <button id="btn_grddel" class="btn2_letter3" style="left:1140px; top:48px; width:53px; height:19px; ">
  258. <caption>행삭제</caption>
  259. <script type="javascript" ev:event="DOMActivate">
  260. <![CDATA[
  261. misfGridIUD(grd_dutyworkapplist,"D");
  262. model.refresh();
  263. ]]>
  264. </script>
  265. </button>
  266. <datagrid id="grd_dutyworkapplist" nodeset="/root/main/dutyworkapplist" class="text_center" visibility="visible" caption="E-Mail^SMS^기관코드^사원번호^성명^근무지부서코드^근무지부서명^주야구분^당직일^H / P^E-Mail^비고^실시여부^dutunitcd^dutunitnm" colsep="^" colwidth="45, 45, 0, 80, 90, 0, 130, 60, 90, 100, 180, 354, 60, 0, 0, 0" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:73px; width:1195px; height:660px; ">
  267. <col checkvalue="Y,N" ref="emailyn" type="checkbox" visibility="hidden"/>
  268. <col checkvalue="Y,N" ref="smsyn" type="checkbox" visibility="hidden"/>
  269. <col ref="instcd" visibility="hidden"/>
  270. <col ref="emplno" type="inputbutton" _key="true"/>
  271. <col ref="emplnm" type="input"/>
  272. <col ref="dutplcedeptcd" visibility="hidden"/>
  273. <col ref="dutplcedeptnm" _key="true"/>
  274. <col ref="adminngdtdnflag" type="combo">
  275. <choices>
  276. <itemset nodeset="/root/init/combo1">
  277. <label ref="label"/>
  278. <value ref="value"/>
  279. </itemset>
  280. </choices>
  281. </col>
  282. <col disabled="true" ref="dutdd" type="inputdate" format="yyyy-mm-dd" _key="true"/>
  283. <col ref="mpphonno" type="input"/>
  284. <col ref="emailaddr" type="input"/>
  285. <col ref="cmt" type="input" maxlength="100"/>
  286. <col ref="appscheexecflag" type="combo">
  287. <choices>
  288. <itemset nodeset="/root/init/combo2">
  289. <label ref="label"/>
  290. <value ref="value"/>
  291. </itemset>
  292. </choices>
  293. </col>
  294. <col ref="dutunitcd" visibility="hidden"/>
  295. <col ref="dutunitnm" visibility="hidden"/>
  296. <col ref="mmngdtsumyn" visibility="hidden"/>
  297. <script type="javascript" ev:event="onbuttonclick">
  298. <![CDATA[
  299. if (grd_dutyworkapplist.col == grd_dutyworkapplist.colRef("emplno"))
  300. {
  301. rpbfOpenPopUpList("SPRPB00101", grd_dutyworkapplist, "emplno,emplnm,dutunitcd,dutunitnm", "", "N");
  302. grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutplcedeptcd")) = grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutunitcd"));
  303. grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutplcedeptnm")) = grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutunitnm"));
  304. }
  305. ]]>
  306. </script>
  307. <script type="javascript" ev:event="xforms-value-changed">
  308. <![CDATA[
  309. var cur_row = grd_dutyworkapplist.row;
  310. if(grd_dutyworkapplist.col == grd_dutyworkapplist.colRef("emplno"))
  311. {
  312. rpbfValidationCheck("EMPLNO", "emplno,emplnm,dutunitcd,dutunitnm");
  313. model.refresh();
  314. grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutplcedeptcd")) = grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutunitcd"));
  315. grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutplcedeptnm")) = grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutunitnm"));
  316. }
  317. else if(grd_dutyworkapplist.col == grd_dutyworkapplist.colRef("emplnm"))
  318. {
  319. rpbfValidationCheck("EMPLNO", "emplno,emplnm,dutunitcd,dutunitnm");
  320. model.refresh();
  321. grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutplcedeptcd")) = grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutunitcd"));
  322. grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutplcedeptnm")) = grd_dutyworkapplist.valueMatrix(grd_dutyworkapplist.row, grd_dutyworkapplist.colRef("dutunitnm"));
  323. }
  324. ]]>
  325. </script>
  326. </datagrid>
  327. <button id="btn_excelload" class="btn2_letter4" style="left:1018px; top:48px; width:64px; height:19px; ">
  328. <caption>엑셀입력</caption>
  329. <script type="javascript" ev:event="DOMActivate">
  330. <![CDATA[
  331. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  332. grd_dutyworkapplist.loadExcel(fileName);
  333. model.removenode("/root/main/dutyworkapplist[1]");
  334. grd_dutyworkapplist.rebuild();
  335. for(var i =1 ; i < grd_dutyworkapplist.rows; i++)
  336. {
  337. grd_dutyworkapplist.addStatus(i,"insert");
  338. }
  339. model.refresh();
  340. ]]>
  341. </script>
  342. </button>
  343. </group>
  344. <group id="group3" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  345. <line id="line75" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  346. <button id="btn_save" class="btn4_letter2" style="left:1071px; top:3px; width:56px; height:22px; ">
  347. <caption>저장</caption>
  348. <script type="javascript" ev:event="DOMActivate">
  349. <![CDATA[
  350. var updtdata = getGridUpdateData(grd_dutyworkapplist);
  351. if (updtdata == "" )
  352. {
  353. messageBox("변경된 데이터가","I004");
  354. return;
  355. }
  356. if(!checkKeyColumn("grd_dutyworkapplist")) return;
  357. misfSave("TXRPD03601");
  358. btn_search.dispatch("DOMActivate");
  359. ]]>
  360. </script>
  361. </button>
  362. <button id="btn_clear" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  363. <caption>초기화</caption>
  364. <script type="javascript" ev:event="DOMActivate">
  365. <![CDATA[
  366. var updtdata = getGridUpdateData(grd_dutyworkapplist);
  367. if (updtdata != "")
  368. {
  369. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  370. if (ret != 6)
  371. { // not OK
  372. return;
  373. }
  374. }
  375. fInitialize();
  376. ]]>
  377. </script>
  378. </button>
  379. <button id="btn_sendsms" class="btn4_letter4" visibility="hidden" style="left:905px; top:3px; width:80px; height:22px; ">
  380. <caption>SMS발송</caption>
  381. <script type="javascript" ev:event="DOMActivate">
  382. <![CDATA[
  383. fSendSms();
  384. ]]>
  385. </script>
  386. </button>
  387. <button id="btn_cnfm" class="btn4_letter4" style="left:991px; top:3px; width:80px; height:22px; ">
  388. <caption>당직확정</caption>
  389. <script type="javascript" ev:event="DOMActivate">
  390. <![CDATA[
  391. var dlgRslt = messageBox("당직 확정을 하시겠습니까?\nYes (예) / No (아니오)", "Q999");
  392. if(dlgRslt == 6)
  393. {
  394. if (submit("TXRPD03603")){
  395. btn_search.dispatch("DOMActivate");
  396. }
  397. }
  398. ]]>
  399. </script>
  400. </button>
  401. </group>
  402. </xhtml:body>
  403. </xhtml:html>